@nethesis/phone-island 1.0.14 → 1.0.15

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 (677) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/App.js.map +1 -1
  3. package/dist/components/AlertGuard.js +1 -1
  4. package/dist/components/AlertGuard.js.map +1 -1
  5. package/dist/components/AlertView/index.js +1 -1
  6. package/dist/components/AlertView/index.js.map +1 -1
  7. package/dist/components/AudioBars.js +1 -1
  8. package/dist/components/AudioBars.js.map +1 -1
  9. package/dist/components/AudioPlayerView/Avatar.js +1 -1
  10. package/dist/components/AudioPlayerView/Avatar.js.map +1 -1
  11. package/dist/components/AudioPlayerView/PlayerFooterActions.js +1 -1
  12. package/dist/components/AudioPlayerView/PlayerFooterActions.js.map +1 -1
  13. package/dist/components/AudioPlayerView/Progress.js +1 -1
  14. package/dist/components/AudioPlayerView/Progress.js.map +1 -1
  15. package/dist/components/AudioPlayerView/index.js +1 -1
  16. package/dist/components/AudioPlayerView/index.js.map +1 -1
  17. package/dist/components/AvatarGroup.js +1 -1
  18. package/dist/components/AvatarGroup.js.map +1 -1
  19. package/dist/components/CallView/Actions.js +1 -1
  20. package/dist/components/CallView/Actions.js.map +1 -1
  21. package/dist/components/CallView/Avatar.js +1 -1
  22. package/dist/components/CallView/Avatar.js.map +1 -1
  23. package/dist/components/CallView/BackCall.js +1 -1
  24. package/dist/components/CallView/BackCall.js.map +1 -1
  25. package/dist/components/CallView/DisplayName.js +1 -1
  26. package/dist/components/CallView/DisplayName.js.map +1 -1
  27. package/dist/components/CallView/Number.js +1 -1
  28. package/dist/components/CallView/Number.js.map +1 -1
  29. package/dist/components/CallView/Timer.js +1 -1
  30. package/dist/components/CallView/Timer.js.map +1 -1
  31. package/dist/components/CallView/index.js +1 -1
  32. package/dist/components/CallView/index.js.map +1 -1
  33. package/dist/components/ConferenceView/ConferenceUsersList.js +1 -1
  34. package/dist/components/ConferenceView/ConferenceUsersList.js.map +1 -1
  35. package/dist/components/ConferenceView/index.js +1 -1
  36. package/dist/components/ConferenceView/index.js.map +1 -1
  37. package/dist/components/ContactView/ContactListView.js +1 -1
  38. package/dist/components/ContactView/ContactListView.js.map +1 -1
  39. package/dist/components/ContactView/ListAvatar.js +1 -1
  40. package/dist/components/ContactView/ListAvatar.js.map +1 -1
  41. package/dist/components/ContactView/SelectContactNumberView.js +1 -1
  42. package/dist/components/ContactView/SelectContactNumberView.js.map +1 -1
  43. package/dist/components/ContactView/TransferActions.js +1 -1
  44. package/dist/components/ContactView/TransferActions.js.map +1 -1
  45. package/dist/components/CustomThemedTooltip.js +1 -1
  46. package/dist/components/CustomThemedTooltip.js.map +1 -1
  47. package/dist/components/Dropdown.js +1 -1
  48. package/dist/components/Dropdown.js.map +1 -1
  49. package/dist/components/Hangup.js +1 -1
  50. package/dist/components/Hangup.js.map +1 -1
  51. package/dist/components/Island.js +1 -1
  52. package/dist/components/Island.js.map +1 -1
  53. package/dist/components/IslandDrag.js +1 -1
  54. package/dist/components/IslandDrag.js.map +1 -1
  55. package/dist/components/IslandMotion.js +1 -1
  56. package/dist/components/IslandMotion.js.map +1 -1
  57. package/dist/components/KeypadView/Actions.js +1 -1
  58. package/dist/components/KeypadView/Actions.js.map +1 -1
  59. package/dist/components/KeypadView/index.js +1 -1
  60. package/dist/components/KeypadView/index.js.map +1 -1
  61. package/dist/components/OperatorBusyView/index.js +1 -1
  62. package/dist/components/OperatorBusyView/index.js.map +1 -1
  63. package/dist/components/PhysicalRecorderView/PhysicalRecordingTimer.js +1 -1
  64. package/dist/components/PhysicalRecorderView/PhysicalRecordingTimer.js.map +1 -1
  65. package/dist/components/PhysicalRecorderView/index.js +1 -1
  66. package/dist/components/PhysicalRecorderView/index.js.map +1 -1
  67. package/dist/components/RecorderView/Actions.js +1 -1
  68. package/dist/components/RecorderView/Actions.js.map +1 -1
  69. package/dist/components/RecorderView/Bar.js +1 -1
  70. package/dist/components/RecorderView/Bar.js.map +1 -1
  71. package/dist/components/RecorderView/BarsGroup.js +1 -1
  72. package/dist/components/RecorderView/BarsGroup.js.map +1 -1
  73. package/dist/components/RecorderView/Timer.js +1 -1
  74. package/dist/components/RecorderView/Timer.js.map +1 -1
  75. package/dist/components/RecorderView/index.js +1 -1
  76. package/dist/components/RecorderView/index.js.map +1 -1
  77. package/dist/components/RestAPI.js +1 -1
  78. package/dist/components/RestAPI.js.map +1 -1
  79. package/dist/components/SettingsView/AudioView.js +1 -1
  80. package/dist/components/SettingsView/AudioView.js.map +1 -1
  81. package/dist/components/SettingsView/MicrophoneView.js +1 -1
  82. package/dist/components/SettingsView/MicrophoneView.js.map +1 -1
  83. package/dist/components/SettingsView/SettingsHeader.js +1 -1
  84. package/dist/components/SettingsView/SettingsHeader.js.map +1 -1
  85. package/dist/components/SettingsView/ThemeView.js +1 -1
  86. package/dist/components/SettingsView/ThemeView.js.map +1 -1
  87. package/dist/components/SettingsView/VideoInputView.js +1 -1
  88. package/dist/components/SettingsView/VideoInputView.js.map +1 -1
  89. package/dist/components/SettingsView/index.js +1 -1
  90. package/dist/components/SettingsView/index.js.map +1 -1
  91. package/dist/components/SideView/SideView.js +1 -1
  92. package/dist/components/SideView/SideView.js.map +1 -1
  93. package/dist/components/SideView/components/SideViewButton.js +1 -1
  94. package/dist/components/SideView/components/SideViewButton.js.map +1 -1
  95. package/dist/components/SideView/hooks/useSideViewLogic.js +1 -1
  96. package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
  97. package/dist/components/Socket.js +1 -1
  98. package/dist/components/Socket.js.map +1 -1
  99. package/dist/components/StreamingAnswerView/index.js +1 -1
  100. package/dist/components/StreamingAnswerView/index.js.map +1 -1
  101. package/dist/components/StreamingImage/index.js +1 -1
  102. package/dist/components/StreamingImage/index.js.map +1 -1
  103. package/dist/components/SwitchDeviceView/index.js +1 -1
  104. package/dist/components/SwitchDeviceView/index.js.map +1 -1
  105. package/dist/components/SwitchInputView/DropdownContent.js +1 -1
  106. package/dist/components/SwitchInputView/DropdownContent.js.map +1 -1
  107. package/dist/components/TextScroll.js +1 -1
  108. package/dist/components/TextScroll.js.map +1 -1
  109. package/dist/components/TranscriptionView/TranscriptionView.js +1 -1
  110. package/dist/components/TranscriptionView/TranscriptionView.js.map +1 -1
  111. package/dist/components/TransferButton.js +1 -1
  112. package/dist/components/TransferButton.js.map +1 -1
  113. package/dist/components/VideoView/index.js +1 -1
  114. package/dist/components/VideoView/index.js.map +1 -1
  115. package/dist/components/ViewsTransition.js +1 -1
  116. package/dist/components/ViewsTransition.js.map +1 -1
  117. package/dist/components/WebRTC.js +1 -1
  118. package/dist/components/WebRTC.js.map +1 -1
  119. package/dist/events/CallEvents.js +1 -1
  120. package/dist/events/CallEvents.js.map +1 -1
  121. package/dist/events/PlayerEvents.js +1 -1
  122. package/dist/events/PlayerEvents.js.map +1 -1
  123. package/dist/events/RecorderEvents.js +1 -1
  124. package/dist/events/RecorderEvents.js.map +1 -1
  125. package/dist/lib/avatars/avatars.js +1 -1
  126. package/dist/lib/avatars/avatars.js.map +1 -1
  127. package/dist/lib/devices/devices.js +1 -1
  128. package/dist/lib/devices/devices.js.map +1 -1
  129. package/dist/lib/phone/audio.js +1 -1
  130. package/dist/lib/phone/audio.js.map +1 -1
  131. package/dist/lib/phone/call.js +1 -1
  132. package/dist/lib/phone/call.js.map +1 -1
  133. package/dist/lib/phone/queue.js +1 -1
  134. package/dist/lib/phone/queue.js.map +1 -1
  135. package/dist/lib/player/audio.js +1 -1
  136. package/dist/lib/player/audio.js.map +1 -1
  137. package/dist/lib/user/extensions.js +1 -1
  138. package/dist/lib/user/extensions.js.map +1 -1
  139. package/dist/lib/webrtc/janus.js +1 -1
  140. package/dist/lib/webrtc/janus.js.map +1 -1
  141. package/dist/lib/webrtc/messages.js +1 -1
  142. package/dist/lib/webrtc/messages.js.map +1 -1
  143. package/dist/models/conference.js +1 -1
  144. package/dist/models/conference.js.map +1 -1
  145. package/dist/models/currentCall.js +1 -1
  146. package/dist/models/currentCall.js.map +1 -1
  147. package/dist/models/mediaDevices.js +1 -1
  148. package/dist/models/mediaDevices.js.map +1 -1
  149. package/dist/models/player.js +1 -1
  150. package/dist/models/player.js.map +1 -1
  151. package/dist/models/queue.js +1 -1
  152. package/dist/models/queue.js.map +1 -1
  153. package/dist/models/ringtones.js +1 -1
  154. package/dist/models/ringtones.js.map +1 -1
  155. package/dist/models/streaming.js +1 -1
  156. package/dist/models/streaming.js.map +1 -1
  157. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +1 -1
  158. package/dist/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +1 -1
  159. package/dist/node_modules/@babel/runtime/helpers/esm/objectSpread2.js.map +1 -1
  160. package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js.map +1 -1
  161. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -1
  162. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +1 -1
  163. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js.map +1 -1
  164. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js.map +1 -1
  165. package/dist/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +1 -1
  166. package/dist/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js.map +1 -1
  167. package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js +1 -1
  168. package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js.map +1 -1
  169. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +1 -1
  170. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js.map +1 -1
  171. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +1 -1
  172. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js.map +1 -1
  173. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.mjs.js +1 -1
  174. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.mjs.js.map +1 -1
  175. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs.js +1 -1
  176. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs.js.map +1 -1
  177. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs.js +1 -1
  178. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs.js.map +1 -1
  179. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +1 -1
  180. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js.map +1 -1
  181. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +1 -1
  182. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js.map +1 -1
  183. package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.mjs.js +1 -1
  184. package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.mjs.js.map +1 -1
  185. package/dist/node_modules/@fortawesome/react-fontawesome/index.es.js +1 -1
  186. package/dist/node_modules/@fortawesome/react-fontawesome/index.es.js.map +1 -1
  187. package/dist/node_modules/@headlessui/react/dist/components/description/description.js +1 -1
  188. package/dist/node_modules/@headlessui/react/dist/components/description/description.js.map +1 -1
  189. package/dist/node_modules/@headlessui/react/dist/components/label/label.js +1 -1
  190. package/dist/node_modules/@headlessui/react/dist/components/label/label.js.map +1 -1
  191. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js +1 -1
  192. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js.map +1 -1
  193. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js +1 -1
  194. package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js.map +1 -1
  195. package/dist/node_modules/@headlessui/react/dist/components/menu/menu.js +1 -1
  196. package/dist/node_modules/@headlessui/react/dist/components/menu/menu.js.map +1 -1
  197. package/dist/node_modules/@headlessui/react/dist/components/portal/portal.js +1 -1
  198. package/dist/node_modules/@headlessui/react/dist/components/portal/portal.js.map +1 -1
  199. package/dist/node_modules/@headlessui/react/dist/components/transition/transition.js +1 -1
  200. package/dist/node_modules/@headlessui/react/dist/components/transition/transition.js.map +1 -1
  201. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js +1 -1
  202. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js.map +1 -1
  203. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js +1 -1
  204. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js.map +1 -1
  205. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js +1 -1
  206. package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js.map +1 -1
  207. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +1 -1
  208. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js.map +1 -1
  209. package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +1 -1
  210. package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js.map +1 -1
  211. package/dist/node_modules/@headlessui/react/dist/hooks/use-document-event.js +1 -1
  212. package/dist/node_modules/@headlessui/react/dist/hooks/use-document-event.js.map +1 -1
  213. package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.js +1 -1
  214. package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.js.map +1 -1
  215. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +1 -1
  216. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js.map +1 -1
  217. package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js +1 -1
  218. package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js.map +1 -1
  219. package/dist/node_modules/@headlessui/react/dist/hooks/use-handle-toggle.js +1 -1
  220. package/dist/node_modules/@headlessui/react/dist/hooks/use-handle-toggle.js.map +1 -1
  221. package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.js +1 -1
  222. package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.js.map +1 -1
  223. package/dist/node_modules/@headlessui/react/dist/hooks/use-is-mounted.js +1 -1
  224. package/dist/node_modules/@headlessui/react/dist/hooks/use-is-mounted.js.map +1 -1
  225. package/dist/node_modules/@headlessui/react/dist/hooks/use-is-top-layer.js +1 -1
  226. package/dist/node_modules/@headlessui/react/dist/hooks/use-is-top-layer.js.map +1 -1
  227. package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js.map +1 -1
  228. package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +1 -1
  229. package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js.map +1 -1
  230. package/dist/node_modules/@headlessui/react/dist/hooks/use-on-disappear.js +1 -1
  231. package/dist/node_modules/@headlessui/react/dist/hooks/use-on-disappear.js.map +1 -1
  232. package/dist/node_modules/@headlessui/react/dist/hooks/use-on-unmount.js +1 -1
  233. package/dist/node_modules/@headlessui/react/dist/hooks/use-on-unmount.js.map +1 -1
  234. package/dist/node_modules/@headlessui/react/dist/hooks/use-outside-click.js +1 -1
  235. package/dist/node_modules/@headlessui/react/dist/hooks/use-outside-click.js.map +1 -1
  236. package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js +1 -1
  237. package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js.map +1 -1
  238. package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.js +1 -1
  239. package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.js.map +1 -1
  240. package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +1 -1
  241. package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js.map +1 -1
  242. package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js +1 -1
  243. package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js.map +1 -1
  244. package/dist/node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js +1 -1
  245. package/dist/node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js.map +1 -1
  246. package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +1 -1
  247. package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js.map +1 -1
  248. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +1 -1
  249. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js.map +1 -1
  250. package/dist/node_modules/@headlessui/react/dist/hooks/use-text-value.js +1 -1
  251. package/dist/node_modules/@headlessui/react/dist/hooks/use-text-value.js.map +1 -1
  252. package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js +1 -1
  253. package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js.map +1 -1
  254. package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js +1 -1
  255. package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js.map +1 -1
  256. package/dist/node_modules/@headlessui/react/dist/hooks/use-window-event.js +1 -1
  257. package/dist/node_modules/@headlessui/react/dist/hooks/use-window-event.js.map +1 -1
  258. package/dist/node_modules/@headlessui/react/dist/internal/disabled.js.map +1 -1
  259. package/dist/node_modules/@headlessui/react/dist/internal/floating.js +1 -1
  260. package/dist/node_modules/@headlessui/react/dist/internal/floating.js.map +1 -1
  261. package/dist/node_modules/@headlessui/react/dist/internal/id.js.map +1 -1
  262. package/dist/node_modules/@headlessui/react/dist/machine.js +1 -1
  263. package/dist/node_modules/@headlessui/react/dist/machine.js.map +1 -1
  264. package/dist/node_modules/@headlessui/react/dist/machines/stack-machine.js +1 -1
  265. package/dist/node_modules/@headlessui/react/dist/machines/stack-machine.js.map +1 -1
  266. package/dist/node_modules/@headlessui/react/dist/react-glue.js +1 -1
  267. package/dist/node_modules/@headlessui/react/dist/react-glue.js.map +1 -1
  268. package/dist/node_modules/@headlessui/react/dist/utils/bugs.js.map +1 -1
  269. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +1 -1
  270. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js.map +1 -1
  271. package/dist/node_modules/@headlessui/react/dist/utils/default-map.js.map +1 -1
  272. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +1 -1
  273. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js.map +1 -1
  274. package/dist/node_modules/@headlessui/react/dist/utils/element-movement.js +1 -1
  275. package/dist/node_modules/@headlessui/react/dist/utils/element-movement.js.map +1 -1
  276. package/dist/node_modules/@headlessui/react/dist/utils/env.js.map +1 -1
  277. package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js +1 -1
  278. package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js.map +1 -1
  279. package/dist/node_modules/@headlessui/react/dist/utils/get-text-value.js +1 -1
  280. package/dist/node_modules/@headlessui/react/dist/utils/get-text-value.js.map +1 -1
  281. package/dist/node_modules/@headlessui/react/dist/utils/match.js +1 -1
  282. package/dist/node_modules/@headlessui/react/dist/utils/match.js.map +1 -1
  283. package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +1 -1
  284. package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js.map +1 -1
  285. package/dist/node_modules/@headlessui/react/dist/utils/owner.js.map +1 -1
  286. package/dist/node_modules/@headlessui/react/dist/utils/render.js +1 -1
  287. package/dist/node_modules/@headlessui/react/dist/utils/render.js.map +1 -1
  288. package/dist/node_modules/@headlessui/react/dist/utils/store.js +1 -1
  289. package/dist/node_modules/@headlessui/react/dist/utils/store.js.map +1 -1
  290. package/dist/node_modules/@react-aria/focus/dist/FocusScope.mjs.js +1 -1
  291. package/dist/node_modules/@react-aria/focus/dist/FocusScope.mjs.js.map +1 -1
  292. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs.js +1 -1
  293. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs.js.map +1 -1
  294. package/dist/node_modules/@react-aria/interactions/dist/useFocus.mjs.js +1 -1
  295. package/dist/node_modules/@react-aria/interactions/dist/useFocus.mjs.js.map +1 -1
  296. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.mjs.js +1 -1
  297. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.mjs.js.map +1 -1
  298. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.mjs.js +1 -1
  299. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.mjs.js.map +1 -1
  300. package/dist/node_modules/@react-aria/interactions/dist/useHover.mjs.js +1 -1
  301. package/dist/node_modules/@react-aria/interactions/dist/useHover.mjs.js.map +1 -1
  302. package/dist/node_modules/@react-aria/interactions/dist/utils.mjs.js +1 -1
  303. package/dist/node_modules/@react-aria/interactions/dist/utils.mjs.js.map +1 -1
  304. package/dist/node_modules/@react-aria/utils/dist/domHelpers.mjs.js.map +1 -1
  305. package/dist/node_modules/@react-aria/utils/dist/platform.mjs.js +1 -1
  306. package/dist/node_modules/@react-aria/utils/dist/platform.mjs.js.map +1 -1
  307. package/dist/node_modules/@react-aria/utils/dist/runAfterTransition.mjs.js +1 -1
  308. package/dist/node_modules/@react-aria/utils/dist/runAfterTransition.mjs.js.map +1 -1
  309. package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.mjs.js +1 -1
  310. package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.mjs.js.map +1 -1
  311. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs.js +1 -1
  312. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs.js.map +1 -1
  313. package/dist/node_modules/@react-aria/utils/dist/useId.mjs.js +1 -1
  314. package/dist/node_modules/@react-aria/utils/dist/useId.mjs.js.map +1 -1
  315. package/dist/node_modules/@rematch/core/dist/core.esm.js +1 -1
  316. package/dist/node_modules/@rematch/core/dist/core.esm.js.map +1 -1
  317. package/dist/node_modules/@rematch/immer/dist/immer.esm.js +1 -1
  318. package/dist/node_modules/@rematch/immer/dist/immer.esm.js.map +1 -1
  319. package/dist/node_modules/@rematch/select/dist/select.esm.js +1 -1
  320. package/dist/node_modules/@rematch/select/dist/select.esm.js.map +1 -1
  321. package/dist/node_modules/bowser/es5.js +1 -1
  322. package/dist/node_modules/bowser/es5.js.map +1 -1
  323. package/dist/node_modules/ebml-block/index.js +1 -1
  324. package/dist/node_modules/ebml-block/index.js.map +1 -1
  325. package/dist/node_modules/engine.io-client/build/esm/contrib/parseuri.js +1 -1
  326. package/dist/node_modules/engine.io-client/build/esm/contrib/parseuri.js.map +1 -1
  327. package/dist/node_modules/engine.io-client/build/esm/globals.js +2 -0
  328. package/dist/node_modules/engine.io-client/build/esm/globals.js.map +1 -0
  329. package/dist/node_modules/engine.io-client/build/esm/socket.js +1 -1
  330. package/dist/node_modules/engine.io-client/build/esm/socket.js.map +1 -1
  331. package/dist/node_modules/engine.io-client/build/esm/transport.js +1 -1
  332. package/dist/node_modules/engine.io-client/build/esm/transport.js.map +1 -1
  333. package/dist/node_modules/engine.io-client/build/esm/transports/index.js +1 -1
  334. package/dist/node_modules/engine.io-client/build/esm/transports/index.js.map +1 -1
  335. package/dist/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +2 -0
  336. package/dist/node_modules/engine.io-client/build/esm/transports/polling-xhr.js.map +1 -0
  337. package/dist/node_modules/engine.io-client/build/esm/transports/polling.js +1 -1
  338. package/dist/node_modules/engine.io-client/build/esm/transports/polling.js.map +1 -1
  339. package/dist/node_modules/engine.io-client/build/esm/transports/websocket.js +1 -1
  340. package/dist/node_modules/engine.io-client/build/esm/transports/websocket.js.map +1 -1
  341. package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js +1 -1
  342. package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js.map +1 -1
  343. package/dist/node_modules/engine.io-client/build/esm/util.js +1 -1
  344. package/dist/node_modules/engine.io-client/build/esm/util.js.map +1 -1
  345. package/dist/node_modules/engine.io-parser/build/esm/commons.js +1 -1
  346. package/dist/node_modules/engine.io-parser/build/esm/commons.js.map +1 -1
  347. package/dist/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js.map +1 -1
  348. package/dist/node_modules/engine.io-parser/build/esm/decodePacket.browser.js.map +1 -1
  349. package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +1 -1
  350. package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js.map +1 -1
  351. package/dist/node_modules/engine.io-parser/build/esm/index.js +1 -1
  352. package/dist/node_modules/engine.io-parser/build/esm/index.js.map +1 -1
  353. package/dist/node_modules/events/events.js +1 -1
  354. package/dist/node_modules/events/events.js.map +1 -1
  355. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js +1 -1
  356. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js.map +1 -1
  357. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
  358. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
  359. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js +1 -1
  360. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
  361. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
  362. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
  363. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js +1 -1
  364. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js.map +1 -1
  365. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.js +1 -1
  366. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.js.map +1 -1
  367. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs.js +1 -1
  368. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs.js.map +1 -1
  369. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
  370. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
  371. package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js +1 -1
  372. package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js.map +1 -1
  373. package/dist/node_modules/framer-motion/dist/es/gestures/focus.mjs.js +1 -1
  374. package/dist/node_modules/framer-motion/dist/es/gestures/focus.mjs.js.map +1 -1
  375. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js +1 -1
  376. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js.map +1 -1
  377. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js.map +1 -1
  378. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js +1 -1
  379. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js.map +1 -1
  380. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
  381. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
  382. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js +1 -1
  383. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js.map +1 -1
  384. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js +1 -1
  385. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js.map +1 -1
  386. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js +1 -1
  387. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map +1 -1
  388. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js +1 -1
  389. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js.map +1 -1
  390. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js.map +1 -1
  391. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs.js +1 -1
  392. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs.js.map +1 -1
  393. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js +1 -1
  394. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js.map +1 -1
  395. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js.map +1 -1
  396. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.js +1 -1
  397. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.js.map +1 -1
  398. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
  399. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
  400. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js +1 -1
  401. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js.map +1 -1
  402. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js +1 -1
  403. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js.map +1 -1
  404. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +1 -1
  405. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js +1 -1
  406. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js.map +1 -1
  407. package/dist/node_modules/i18next/dist/esm/i18next.js +1 -1
  408. package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
  409. package/dist/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js +1 -1
  410. package/dist/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js.map +1 -1
  411. package/dist/node_modules/immer/dist/immer.esm.mjs.js +1 -1
  412. package/dist/node_modules/immer/dist/immer.esm.mjs.js.map +1 -1
  413. package/dist/node_modules/int64-buffer/int64-buffer.js.map +1 -1
  414. package/dist/node_modules/js-base64/base64.mjs.js +1 -1
  415. package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
  416. package/dist/node_modules/mic-check/lib/index.js.map +1 -1
  417. package/dist/node_modules/mic-check/lib/requestMediaPermissions.js +1 -1
  418. package/dist/node_modules/mic-check/lib/requestMediaPermissions.js.map +1 -1
  419. package/dist/node_modules/moment/moment.js +1 -1
  420. package/dist/node_modules/moment/moment.js.map +1 -1
  421. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
  422. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
  423. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
  424. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
  425. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
  426. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js.map +1 -1
  427. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
  428. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
  429. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
  430. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +1 -1
  431. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -1
  432. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js +1 -1
  433. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js.map +1 -1
  434. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
  435. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
  436. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js +1 -1
  437. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -1
  438. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js +1 -1
  439. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js.map +1 -1
  440. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
  441. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
  442. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js +1 -1
  443. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
  444. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs.js +1 -1
  445. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs.js.map +1 -1
  446. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
  447. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
  448. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js +1 -1
  449. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js.map +1 -1
  450. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js +1 -1
  451. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js.map +1 -1
  452. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js.map +1 -1
  453. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js.map +1 -1
  454. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs.js +1 -1
  455. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs.js.map +1 -1
  456. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js +1 -1
  457. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js.map +1 -1
  458. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js +1 -1
  459. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js.map +1 -1
  460. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js +1 -1
  461. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
  462. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
  463. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js.map +1 -1
  464. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs.js.map +1 -1
  465. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
  466. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js.map +1 -1
  467. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
  468. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
  469. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js +1 -1
  470. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js.map +1 -1
  471. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +1 -1
  472. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -1
  473. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +1 -1
  474. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +1 -1
  475. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
  476. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.mjs.js +1 -1
  477. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.mjs.js.map +1 -1
  478. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs.js.map +1 -1
  479. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js.map +1 -1
  480. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +1 -1
  481. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -1
  482. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js +1 -1
  483. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js.map +1 -1
  484. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js.map +1 -1
  485. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs.js +1 -1
  486. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs.js.map +1 -1
  487. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +1 -1
  488. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -1
  489. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +1 -1
  490. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -1
  491. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js +1 -1
  492. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js.map +1 -1
  493. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js +1 -1
  494. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js.map +1 -1
  495. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.mjs.js +1 -1
  496. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.mjs.js.map +1 -1
  497. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js +1 -1
  498. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js.map +1 -1
  499. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.mjs.js +1 -1
  500. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.mjs.js.map +1 -1
  501. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js.map +1 -1
  502. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
  503. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js +1 -1
  504. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js.map +1 -1
  505. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js +1 -1
  506. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js.map +1 -1
  507. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js +1 -1
  508. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js.map +1 -1
  509. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs.js +1 -1
  510. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs.js.map +1 -1
  511. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs.js +1 -1
  512. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs.js.map +1 -1
  513. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
  514. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
  515. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.js.map +1 -1
  516. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.mjs.js.map +1 -1
  517. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js.map +1 -1
  518. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.mjs.js.map +1 -1
  519. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs.js.map +1 -1
  520. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
  521. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
  522. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs.js +1 -1
  523. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs.js.map +1 -1
  524. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js +1 -1
  525. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js.map +1 -1
  526. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js.map +1 -1
  527. package/dist/node_modules/motion-utils/dist/es/errors.mjs.js.map +1 -1
  528. package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js +1 -1
  529. package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js.map +1 -1
  530. package/dist/node_modules/motion-utils/dist/es/progress.mjs.js.map +1 -1
  531. package/dist/node_modules/object-assign/index.js +1 -1
  532. package/dist/node_modules/object-assign/index.js.map +1 -1
  533. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
  534. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -1
  535. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +1 -1
  536. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -1
  537. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +1 -1
  538. package/dist/node_modules/react-i18next/dist/es/context.js +1 -1
  539. package/dist/node_modules/react-i18next/dist/es/context.js.map +1 -1
  540. package/dist/node_modules/react-i18next/dist/es/defaults.js +1 -1
  541. package/dist/node_modules/react-i18next/dist/es/defaults.js.map +1 -1
  542. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +1 -1
  543. package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
  544. package/dist/node_modules/react-i18next/dist/es/utils.js +1 -1
  545. package/dist/node_modules/react-i18next/dist/es/utils.js.map +1 -1
  546. package/dist/node_modules/react-moment/dist/index.js +1 -1
  547. package/dist/node_modules/react-moment/dist/index.js.map +1 -1
  548. package/dist/node_modules/react-redux/es/components/Context.js +1 -1
  549. package/dist/node_modules/react-redux/es/components/Context.js.map +1 -1
  550. package/dist/node_modules/react-redux/es/components/Provider.js +1 -1
  551. package/dist/node_modules/react-redux/es/components/Provider.js.map +1 -1
  552. package/dist/node_modules/react-redux/es/hooks/useSelector.js.map +1 -1
  553. package/dist/node_modules/react-redux/es/utils/Subscription.js +1 -1
  554. package/dist/node_modules/react-redux/es/utils/Subscription.js.map +1 -1
  555. package/dist/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js +1 -1
  556. package/dist/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js.map +1 -1
  557. package/dist/node_modules/react-redux/es/utils/useSyncExternalStore.js.map +1 -1
  558. package/dist/node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
  559. package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js +1 -1
  560. package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js.map +1 -1
  561. package/dist/node_modules/redux/es/redux.js +1 -1
  562. package/dist/node_modules/redux/es/redux.js.map +1 -1
  563. package/dist/node_modules/reselect/es/defaultMemoize.js +1 -1
  564. package/dist/node_modules/reselect/es/defaultMemoize.js.map +1 -1
  565. package/dist/node_modules/reselect/es/index.js +1 -1
  566. package/dist/node_modules/reselect/es/index.js.map +1 -1
  567. package/dist/node_modules/sdp/sdp.js +1 -1
  568. package/dist/node_modules/sdp/sdp.js.map +1 -1
  569. package/dist/node_modules/socket.io-client/build/esm/index.js +1 -1
  570. package/dist/node_modules/socket.io-client/build/esm/index.js.map +1 -1
  571. package/dist/node_modules/socket.io-client/build/esm/manager.js +1 -1
  572. package/dist/node_modules/socket.io-client/build/esm/manager.js.map +1 -1
  573. package/dist/node_modules/socket.io-client/build/esm/socket.js +1 -1
  574. package/dist/node_modules/socket.io-client/build/esm/socket.js.map +1 -1
  575. package/dist/node_modules/socket.io-client/build/esm/url.js +1 -1
  576. package/dist/node_modules/socket.io-client/build/esm/url.js.map +1 -1
  577. package/dist/node_modules/socket.io-parser/build/esm/binary.js +1 -1
  578. package/dist/node_modules/socket.io-parser/build/esm/binary.js.map +1 -1
  579. package/dist/node_modules/socket.io-parser/build/esm/index.js +1 -1
  580. package/dist/node_modules/socket.io-parser/build/esm/index.js.map +1 -1
  581. package/dist/node_modules/socket.io-parser/build/esm/is-binary.js +1 -1
  582. package/dist/node_modules/socket.io-parser/build/esm/is-binary.js.map +1 -1
  583. package/dist/node_modules/styled-components/dist/styled-components.browser.esm.js +1 -1
  584. package/dist/node_modules/tslib/tslib.es6.js +1 -1
  585. package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
  586. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +1 -1
  587. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -1
  588. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +1 -1
  589. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +1 -1
  590. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +1 -1
  591. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -1
  592. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +1 -1
  593. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -1
  594. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +1 -1
  595. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js.map +1 -1
  596. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +1 -1
  597. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js.map +1 -1
  598. package/dist/node_modules/webm-duration-fix/lib/ebml/EBMLDecoder.js +1 -1
  599. package/dist/node_modules/webm-duration-fix/lib/ebml/EBMLDecoder.js.map +1 -1
  600. package/dist/node_modules/webm-duration-fix/lib/ebml/EBMLEncoder.js +1 -1
  601. package/dist/node_modules/webm-duration-fix/lib/ebml/EBMLEncoder.js.map +1 -1
  602. package/dist/node_modules/webm-duration-fix/lib/ebml/EBMLReader.js +1 -1
  603. package/dist/node_modules/webm-duration-fix/lib/ebml/EBMLReader.js.map +1 -1
  604. package/dist/node_modules/webm-duration-fix/lib/ebml/ebmlID.js.map +1 -1
  605. package/dist/node_modules/webm-duration-fix/lib/ebml/index.js.map +1 -1
  606. package/dist/node_modules/webm-duration-fix/lib/ebml/tools-ebml.js +1 -1
  607. package/dist/node_modules/webm-duration-fix/lib/ebml/tools-ebml.js.map +1 -1
  608. package/dist/node_modules/webm-duration-fix/lib/ebml/tools.js +1 -1
  609. package/dist/node_modules/webm-duration-fix/lib/ebml/tools.js.map +1 -1
  610. package/dist/node_modules/webm-duration-fix/lib/index.js +1 -1
  611. package/dist/node_modules/webm-duration-fix/lib/index.js.map +1 -1
  612. package/dist/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js +1 -1
  613. package/dist/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js.map +1 -1
  614. package/dist/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js +1 -1
  615. package/dist/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js.map +1 -1
  616. package/dist/node_modules/webrtc-adapter/src/js/common_shim.js +1 -1
  617. package/dist/node_modules/webrtc-adapter/src/js/common_shim.js.map +1 -1
  618. package/dist/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js +1 -1
  619. package/dist/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js.map +1 -1
  620. package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js +1 -1
  621. package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js.map +1 -1
  622. package/dist/node_modules/webrtc-adapter/src/js/utils.js +1 -1
  623. package/dist/node_modules/webrtc-adapter/src/js/utils.js.map +1 -1
  624. package/dist/package.json.js +1 -1
  625. package/dist/services/astproxy.js +1 -1
  626. package/dist/services/astproxy.js.map +1 -1
  627. package/dist/services/history_call.js +1 -1
  628. package/dist/services/history_call.js.map +1 -1
  629. package/dist/services/offhour.js +1 -1
  630. package/dist/services/offhour.js.map +1 -1
  631. package/dist/services/phonebook.js +1 -1
  632. package/dist/services/phonebook.js.map +1 -1
  633. package/dist/services/user.js +1 -1
  634. package/dist/services/user.js.map +1 -1
  635. package/dist/services/voicemail.js +1 -1
  636. package/dist/services/voicemail.js.map +1 -1
  637. package/dist/store/index.js +1 -1
  638. package/dist/store/index.js.map +1 -1
  639. package/dist/styles/Island.styles.js +1 -1
  640. package/dist/styles/Island.styles.js.map +1 -1
  641. package/dist/utils/customHooks/useCommittedRef.js +1 -1
  642. package/dist/utils/customHooks/useCommittedRef.js.map +1 -1
  643. package/dist/utils/customHooks/useEventCallback.js +1 -1
  644. package/dist/utils/customHooks/useEventCallback.js.map +1 -1
  645. package/dist/utils/customHooks/useEventListener.js +1 -1
  646. package/dist/utils/customHooks/useEventListener.js.map +1 -1
  647. package/dist/utils/customHooks/useIntersectionObserver.js +1 -1
  648. package/dist/utils/customHooks/useIntersectionObserver.js.map +1 -1
  649. package/dist/utils/customHooks/useLocalStorage.js +1 -1
  650. package/dist/utils/customHooks/useLocalStorage.js.map +1 -1
  651. package/dist/utils/customHooks/useLongPress.js +1 -1
  652. package/dist/utils/customHooks/useLongPress.js.map +1 -1
  653. package/dist/utils/deviceUtils.js +1 -1
  654. package/dist/utils/deviceUtils.js.map +1 -1
  655. package/dist/utils/genericFunctions/checkConnection.js +1 -1
  656. package/dist/utils/genericFunctions/checkConnection.js.map +1 -1
  657. package/dist/utils/genericFunctions/isBackCallVisible.js +1 -1
  658. package/dist/utils/genericFunctions/isBackCallVisible.js.map +1 -1
  659. package/dist/utils/genericFunctions/withTimeout.js +1 -1
  660. package/dist/utils/genericFunctions/withTimeout.js.map +1 -1
  661. package/dist/utils/streaming/getStreamingSourceId.js +1 -1
  662. package/dist/utils/streaming/getStreamingSourceId.js.map +1 -1
  663. package/dist/utils/streaming/isFromStreaming.js +1 -1
  664. package/dist/utils/streaming/isFromStreaming.js.map +1 -1
  665. package/dist/utils/streaming/streamingUtils.js +1 -1
  666. package/dist/utils/streaming/streamingUtils.js.map +1 -1
  667. package/dist/workers/wake_up.js +1 -1
  668. package/dist/workers/wake_up.js.map +1 -1
  669. package/package.json +1 -1
  670. package/dist/node_modules/engine.io-client/build/esm/contrib/yeast.js +0 -2
  671. package/dist/node_modules/engine.io-client/build/esm/contrib/yeast.js.map +0 -1
  672. package/dist/node_modules/engine.io-client/build/esm/globalThis.browser.js +0 -2
  673. package/dist/node_modules/engine.io-client/build/esm/globalThis.browser.js.map +0 -1
  674. package/dist/node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js +0 -2
  675. package/dist/node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js.map +0 -1
  676. package/dist/node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js +0 -2
  677. package/dist/node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../events/add-pointer-event.mjs.js"),s=require("../../events/event-info.mjs.js"),e=require("../../utils/get-context-window.mjs.js"),i=require("../../utils/is-ref-object.mjs.js"),n=require("../pan/PanSession.mjs.js"),o=require("./utils/constraints.mjs.js"),r=require("../../../../../motion-dom/dist/es/projection/geometry/models.mjs.js"),a=require("../../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),l=require("../../../../../motion-dom/dist/es/projection/utils/each-axis.mjs.js"),c=require("../../../../../motion-utils/dist/es/errors.mjs.js"),u=require("../../../../../motion-dom/dist/es/projection/utils/measure.mjs.js"),h=require("../../../../../motion-dom/dist/es/projection/geometry/conversion.mjs.js"),m=require("../../../../../motion-dom/dist/es/value/will-change/add-will-change.mjs.js"),g=require("../../../../../motion-dom/dist/es/animation/interfaces/motion-value.mjs.js"),d=require("../../../../../motion-dom/dist/es/events/add-dom-event.mjs.js"),p=require("../../../../../motion-dom/dist/es/gestures/drag/state/set-active.mjs.js"),v=require("../../../../../motion-dom/dist/es/value/types/numbers/units.mjs.js"),j=require("../../../../../motion-dom/dist/es/projection/geometry/delta-calc.mjs.js"),f=require("../../../../../motion-dom/dist/es/utils/mix/number.mjs.js"),x=require("../../../../../motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.js"),E=require("../../../../../motion-dom/dist/es/resize/index.mjs.js");const P=new WeakMap;function D(t){let s=!0;return()=>{s?s=!1:t()}}function A(t,s,e){return!(!0!==s&&s!==t||null!==e&&e!==t)}exports.VisualElementDragControls=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=r.createBox(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t){let{snapToCursor:i=!1,distanceThreshold:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:c}=this.getProps();this.panSession=new n.PanSession(t,{onSessionStart:t=>{i&&this.snapToCursor(s.extractEventInfo(t).point),this.stopAnimation()},onStart:(t,s)=>{const{drag:e,dragPropagation:i,onDragStart:n}=this.getProps();if(e&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=p.setDragLock(e),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=s,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),l.eachAxis((t=>{let s=this.getAxisMotionValue(t).get()||0;if(v.percent.test(s)){const{projection:e}=this.visualElement;if(e&&e.layout){const i=e.layout.layoutBox[t];if(i){s=j.calcLength(i)*(parseFloat(s)/100)}}}this.originPoint[t]=s})),n&&a.frame.update((()=>n(t,s)),!1,!0),m.addValueToWillChange(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,s)=>{this.latestPointerEvent=t,this.latestPanInfo=s;const{dragPropagation:e,dragDirectionLock:i,onDirectionLock:n,onDrag:o}=this.getProps();if(!e&&!this.openDragLock)return;const{offset:r}=s;if(i&&null===this.currentDirection)return this.currentDirection=function(t){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,e=null;Math.abs(t.y)>s?e="y":Math.abs(t.x)>s&&(e="x");return e}(r),void(null!==this.currentDirection&&n&&n(this.currentDirection));this.updateAxis("x",s.point,r),this.updateAxis("y",s.point,r),this.visualElement.render(),o&&a.frame.update((()=>o(t,s)),!1,!0)},onSessionEnd:(t,s)=>{this.latestPointerEvent=t,this.latestPanInfo=s,this.stop(t,s),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:e.getContextWindow(this.visualElement),element:this.visualElement.current})}stop(t,s){const e=t||this.latestPointerEvent,i=s||this.latestPanInfo,n=this.isDragging;if(this.cancel(),!n||!i||!e)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&a.frame.postRender((()=>r(e,i)))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:e}=this.getProps();!e&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,s,e){const{drag:i}=this.getProps();if(!e||!A(t,i,this.currentDirection))return;const n=this.getAxisMotionValue(t);let r=this.originPoint[t]+e[t];this.constraints&&this.constraints[t]&&(r=o.applyConstraints(r,this.constraints[t],this.elastic[t])),n.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:s}=this.getProps(),e=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&i.isRefObject(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!e)&&o.calcRelativeConstraints(e.layoutBox,t),this.elastic=o.resolveDragElastic(s),n!==this.constraints&&!i.isRefObject(t)&&e&&this.constraints&&!this.hasMutatedConstraints&&l.eachAxis((t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=o.rebaseAxisConstraints(e.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!i.isRefObject(t))return!1;const e=t.current;c.invariant(null!==e,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;n.root&&(n.root.scroll=void 0,n.root.updateScroll());const r=u.measurePageBox(e,n.root,this.visualElement.getTransformPagePoint());let a=o.calcViewportConstraints(n.layout.layoutBox,r);if(s){const t=s(h.convertBoxToBoundingBox(a));this.hasMutatedConstraints=!!t,t&&(a=h.convertBoundingBoxToBox(t))}return a}startAnimation(t){const{drag:s,dragMomentum:e,dragElastic:i,dragTransition:n,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},c=l.eachAxis((r=>{if(!A(r,s,this.currentDirection))return;let l=a&&a[r]||{};!0!==o&&o!==r||(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,h={type:"inertia",velocity:e?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...n,...l};return this.startAxisValueAnimation(r,h)}));return Promise.all(c).then(r)}startAxisValueAnimation(t,s){const e=this.getAxisMotionValue(t);return m.addValueToWillChange(this.visualElement,t),e.start(g.animateMotionValue(t,e,0,s,this.visualElement,!1))}stopAnimation(){l.eachAxis((t=>this.getAxisMotionValue(t).stop()))}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,e=this.visualElement.getProps()[s];return e||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){l.eachAxis((s=>{const{drag:e}=this.getProps();if(!A(s,e,this.currentDirection))return;const{projection:i}=this.visualElement,n=this.getAxisMotionValue(s);if(i&&i.layout){const{min:e,max:o}=i.layout.layoutBox[s],r=n.get()||0;n.set(t[s]-f.mixNumber(e,o,.5)+r)}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:e}=this.visualElement;if(!i.isRefObject(s)||!e||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};l.eachAxis((t=>{const s=this.getAxisMotionValue(t);if(s&&!1!==this.constraints){const e=s.get();n[t]=o.calcOrigin({min:e,max:e},this.constraints[t])}}));const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",e.root&&e.root.updateScroll(),e.updateLayout(),this.constraints=!1,this.resolveConstraints(),l.eachAxis((s=>{if(!A(s,t,null))return;const e=this.getAxisMotionValue(s),{min:i,max:o}=this.constraints[s];e.set(f.mixNumber(i,o,n[s]))})),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;P.set(this.visualElement,this);const s=this.visualElement.current,e=t.addPointerEvent(s,"pointerdown",(t=>{const{drag:e,dragListener:i=!0}=this.getProps(),n=t.target,o=n!==s&&x.isElementTextInput(n);e&&i&&!o&&this.start(t)}));let n;const o=()=>{const{dragConstraints:t}=this.getProps();i.isRefObject(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,s,e){const i=E.resize(t,D(e)),n=E.resize(s,D(e));return()=>{i(),n()}}(s,t.current,(()=>this.scalePositionWithinConstraints()))))},{projection:r}=this.visualElement,c=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),a.frame.read(o);const u=d.addDomEvent(window,"resize",(()=>this.scalePositionWithinConstraints())),h=r.addEventListener("didUpdate",(t=>{let{delta:s,hasLayoutChanged:e}=t;this.isDragging&&e&&(l.eachAxis((t=>{const e=this.getAxisMotionValue(t);e&&(this.originPoint[t]+=s[t].translate,e.set(e.get()+s[t].translate))})),this.visualElement.render())}));return()=>{u(),e(),c(),h&&h(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:e=!1,dragPropagation:i=!1,dragConstraints:n=!1,dragElastic:r=o.defaultElastic,dragMomentum:a=!0}=t;return{...t,drag:s,dragDirectionLock:e,dragPropagation:i,dragConstraints:n,dragElastic:r,dragMomentum:a}}},exports.elementDragControls=P;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../events/add-pointer-event.mjs.js"),s=require("../../events/event-info.mjs.js"),e=require("../../utils/get-context-window.mjs.js"),i=require("../../utils/is-ref-object.mjs.js"),n=require("../pan/PanSession.mjs.js"),o=require("./utils/constraints.mjs.js"),r=require("../../../../../motion-dom/dist/es/projection/geometry/models.mjs.js"),a=require("../../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),l=require("../../../../../motion-dom/dist/es/projection/utils/each-axis.mjs.js"),c=require("../../../../../motion-utils/dist/es/errors.mjs.js"),u=require("../../../../../motion-dom/dist/es/projection/utils/measure.mjs.js"),h=require("../../../../../motion-dom/dist/es/projection/geometry/conversion.mjs.js"),m=require("../../../../../motion-dom/dist/es/value/will-change/add-will-change.mjs.js"),g=require("../../../../../motion-dom/dist/es/animation/interfaces/motion-value.mjs.js"),d=require("../../../../../motion-dom/dist/es/events/add-dom-event.mjs.js"),p=require("../../../../../motion-dom/dist/es/gestures/drag/state/set-active.mjs.js"),v=require("../../../../../motion-dom/dist/es/value/types/numbers/units.mjs.js"),j=require("../../../../../motion-dom/dist/es/projection/geometry/delta-calc.mjs.js"),f=require("../../../../../motion-dom/dist/es/utils/mix/number.mjs.js"),x=require("../../../../../motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.js"),E=require("../../../../../motion-dom/dist/es/resize/index.mjs.js");const P=new WeakMap;function D(t){let s=!0;return()=>{s?s=!1:t()}}function A(t,s,e){return!(!0!==s&&s!==t||null!==e&&e!==t)}exports.VisualElementDragControls=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=r.createBox(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t){let{snapToCursor:i=!1,distanceThreshold:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:c}=this.getProps();this.panSession=new n.PanSession(t,{onSessionStart:t=>{i&&this.snapToCursor(s.extractEventInfo(t).point),this.stopAnimation()},onStart:(t,s)=>{const{drag:e,dragPropagation:i,onDragStart:n}=this.getProps();if(e&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=p.setDragLock(e),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=s,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),l.eachAxis(t=>{let s=this.getAxisMotionValue(t).get()||0;if(v.percent.test(s)){const{projection:e}=this.visualElement;if(e&&e.layout){const i=e.layout.layoutBox[t];if(i){s=j.calcLength(i)*(parseFloat(s)/100)}}}this.originPoint[t]=s}),n&&a.frame.update(()=>n(t,s),!1,!0),m.addValueToWillChange(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,s)=>{this.latestPointerEvent=t,this.latestPanInfo=s;const{dragPropagation:e,dragDirectionLock:i,onDirectionLock:n,onDrag:o}=this.getProps();if(!e&&!this.openDragLock)return;const{offset:r}=s;if(i&&null===this.currentDirection)return this.currentDirection=function(t){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,e=null;Math.abs(t.y)>s?e="y":Math.abs(t.x)>s&&(e="x");return e}(r),void(null!==this.currentDirection&&n&&n(this.currentDirection));this.updateAxis("x",s.point,r),this.updateAxis("y",s.point,r),this.visualElement.render(),o&&a.frame.update(()=>o(t,s),!1,!0)},onSessionEnd:(t,s)=>{this.latestPointerEvent=t,this.latestPanInfo=s,this.stop(t,s),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:e.getContextWindow(this.visualElement),element:this.visualElement.current})}stop(t,s){const e=t||this.latestPointerEvent,i=s||this.latestPanInfo,n=this.isDragging;if(this.cancel(),!n||!i||!e)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&a.frame.postRender(()=>r(e,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:e}=this.getProps();!e&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,s,e){const{drag:i}=this.getProps();if(!e||!A(t,i,this.currentDirection))return;const n=this.getAxisMotionValue(t);let r=this.originPoint[t]+e[t];this.constraints&&this.constraints[t]&&(r=o.applyConstraints(r,this.constraints[t],this.elastic[t])),n.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:s}=this.getProps(),e=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&i.isRefObject(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!e)&&o.calcRelativeConstraints(e.layoutBox,t),this.elastic=o.resolveDragElastic(s),n!==this.constraints&&!i.isRefObject(t)&&e&&this.constraints&&!this.hasMutatedConstraints&&l.eachAxis(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=o.rebaseAxisConstraints(e.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!i.isRefObject(t))return!1;const e=t.current;c.invariant(null!==e,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;n.root&&(n.root.scroll=void 0,n.root.updateScroll());const r=u.measurePageBox(e,n.root,this.visualElement.getTransformPagePoint());let a=o.calcViewportConstraints(n.layout.layoutBox,r);if(s){const t=s(h.convertBoxToBoundingBox(a));this.hasMutatedConstraints=!!t,t&&(a=h.convertBoundingBoxToBox(t))}return a}startAnimation(t){const{drag:s,dragMomentum:e,dragElastic:i,dragTransition:n,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},c=l.eachAxis(r=>{if(!A(r,s,this.currentDirection))return;let l=a&&a[r]||{};!0!==o&&o!==r||(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,h={type:"inertia",velocity:e?t[r]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...n,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(c).then(r)}startAxisValueAnimation(t,s){const e=this.getAxisMotionValue(t);return m.addValueToWillChange(this.visualElement,t),e.start(g.animateMotionValue(t,e,0,s,this.visualElement,!1))}stopAnimation(){l.eachAxis(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,e=this.visualElement.getProps()[s];return e||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){l.eachAxis(s=>{const{drag:e}=this.getProps();if(!A(s,e,this.currentDirection))return;const{projection:i}=this.visualElement,n=this.getAxisMotionValue(s);if(i&&i.layout){const{min:e,max:o}=i.layout.layoutBox[s],r=n.get()||0;n.set(t[s]-f.mixNumber(e,o,.5)+r)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:e}=this.visualElement;if(!i.isRefObject(s)||!e||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};l.eachAxis(t=>{const s=this.getAxisMotionValue(t);if(s&&!1!==this.constraints){const e=s.get();n[t]=o.calcOrigin({min:e,max:e},this.constraints[t])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",e.root&&e.root.updateScroll(),e.updateLayout(),this.constraints=!1,this.resolveConstraints(),l.eachAxis(s=>{if(!A(s,t,null))return;const e=this.getAxisMotionValue(s),{min:i,max:o}=this.constraints[s];e.set(f.mixNumber(i,o,n[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;P.set(this.visualElement,this);const s=this.visualElement.current,e=t.addPointerEvent(s,"pointerdown",t=>{const{drag:e,dragListener:i=!0}=this.getProps(),n=t.target,o=n!==s&&x.isElementTextInput(n);e&&i&&!o&&this.start(t)});let n;const o=()=>{const{dragConstraints:t}=this.getProps();i.isRefObject(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,s,e){const i=E.resize(t,D(e)),n=E.resize(s,D(e));return()=>{i(),n()}}(s,t.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,c=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),a.frame.read(o);const u=d.addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),h=r.addEventListener("didUpdate",t=>{let{delta:s,hasLayoutChanged:e}=t;this.isDragging&&e&&(l.eachAxis(t=>{const e=this.getAxisMotionValue(t);e&&(this.originPoint[t]+=s[t].translate,e.set(e.get()+s[t].translate))}),this.visualElement.render())});return()=>{u(),e(),c(),h&&h(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:e=!1,dragPropagation:i=!1,dragConstraints:n=!1,dragElastic:r=o.defaultElastic,dragMomentum:a=!0}=t;return{...t,drag:s,dragDirectionLock:e,dragPropagation:i,dragConstraints:n,dragElastic:r,dragMomentum:a}}},exports.elementDragControls=P;
2
2
  //# sourceMappingURL=VisualElementDragControls.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VisualElementDragControls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs"],"sourcesContent":["import { createBox, frame, eachAxis, measurePageBox, convertBoxToBoundingBox, convertBoundingBoxToBox, addValueToWillChange, animateMotionValue, mixNumber, addDomEvent, setDragLock, percent, calcLength, resize, isElementTextInput } from 'motion-dom';\nimport { invariant } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\n\nconst elementDragControls = new WeakMap();\nclass VisualElementDragControls {\n constructor(visualElement) {\n this.openDragLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n /**\n * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPointerEvent = null;\n /**\n * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPanInfo = null;\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false, distanceThreshold } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point);\n }\n this.stopAnimation();\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openDragLock)\n this.openDragLock();\n this.openDragLock = setDragLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock)\n return;\n }\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin and pointer offset\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.update(() => onDragStart(event, info), false, true);\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n if (onDrag) {\n frame.update(() => onDrag(event, info), false, true);\n }\n };\n const onSessionEnd = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.stop(event, info);\n this.latestPointerEvent = null;\n this.latestPanInfo = null;\n };\n const resumeAnimation = () => {\n const { dragSnapToOrigin: snap } = this.getProps();\n if (snap || this.constraints) {\n this.startAnimation({ x: 0, y: 0 });\n }\n };\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n distanceThreshold,\n contextWindow: getContextWindow(this.visualElement),\n element: this.visualElement.current,\n });\n }\n /**\n * @internal\n */\n stop(event, panInfo) {\n const finalEvent = event || this.latestPointerEvent;\n const finalPanInfo = panInfo || this.latestPanInfo;\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging || !finalPanInfo || !finalEvent)\n return;\n const { velocity } = finalPanInfo;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(finalEvent, finalPanInfo));\n }\n }\n /**\n * @internal\n */\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.endPanSession();\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock();\n this.openDragLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n /**\n * Clean up the pan session without modifying other drag state.\n * This is used during unmount to ensure event listeners are removed\n * without affecting projection animations or drag locks.\n * @internal\n */\n endPanSession() {\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : this.visualElement.projection?.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative. This only applies to relative (non-ref)\n * constraints, as ref-based constraints from calcViewportConstraints are already in the\n * correct coordinate space for the motion value transform offset.\n */\n if (prevConstraints !== this.constraints &&\n !isRefObject(dragConstraints) &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\", \"drag-constraints-ref\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n /**\n * Refresh the root scroll offset so the constraint's viewport box\n * translates to correct page coordinates. The scroll captured at\n * drag mount can be stale if the document was scrolled afterwards —\n * e.g. via the browser restoring scroll on refresh, or an ancestor\n * layout effect running after this element's mount (#2829).\n *\n * Clear the cached scroll first so `updateScroll` bypasses its\n * per-animationId cache and re-reads the live value.\n */\n if (projection.root) {\n projection.root.scroll = undefined;\n projection.root.updateScroll();\n }\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin === true ||\n dragSnapToOrigin === axis)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n /**\n * The layout measurement includes the current transform value,\n * so we need to add it back to get the correct snap position.\n * This fixes an issue where elements with initial coordinates\n * would snap to the wrong position on the first drag.\n */\n const current = axisValue.get() || 0;\n axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current);\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n /**\n * Reset constraints so resolveConstraints() will recalculate them\n * with the freshly measured layout rather than returning the cached value.\n */\n this.constraints = false;\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n /**\n * Flush the updated transform to the DOM synchronously to prevent\n * a visual flash at the element's CSS layout position (0,0) when\n * the transform was stripped for measurement.\n */\n this.visualElement.render();\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n const target = event.target;\n /**\n * Only block drag if clicking on a text input child element\n * (input, textarea, select, contenteditable) where users might\n * want to select text or interact with the control.\n *\n * Buttons and links don't block drag since they don't have\n * click-and-move actions of their own.\n */\n const isClickingTextInputChild = target !== element && isElementTextInput(target);\n if (drag && dragListener && !isClickingTextInputChild) {\n this.start(event);\n }\n });\n /**\n * If using ref-based constraints, observe both the draggable element\n * and the constraint container for size changes via ResizeObserver.\n * Setup is deferred because dragConstraints.current is null when\n * addListeners first runs (React hasn't committed the ref yet).\n */\n let stopResizeObservers;\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n if (!stopResizeObservers) {\n stopResizeObservers = startResizeObservers(element, dragConstraints.current, () => this.scalePositionWithinConstraints());\n }\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n stopResizeObservers && stopResizeObservers();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction skipFirstCall(callback) {\n let isFirst = true;\n return () => {\n if (isFirst) {\n isFirst = false;\n return;\n }\n callback();\n };\n}\nfunction startResizeObservers(element, constraintsElement, onResize) {\n const stopElement = resize(element, skipFirstCall(onResize));\n const stopContainer = resize(constraintsElement, skipFirstCall(onResize));\n return () => {\n stopElement();\n stopContainer();\n };\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n//# sourceMappingURL=VisualElementDragControls.mjs.map\n"],"names":["elementDragControls","WeakMap","skipFirstCall","callback","isFirst","shouldDrag","direction","drag","currentDirection","constructor","visualElement","this","openDragLock","isDragging","originPoint","x","y","constraints","hasMutatedConstraints","elastic","createBox","latestPointerEvent","latestPanInfo","start","originEvent","snapToCursor","distanceThreshold","arguments","length","undefined","presenceContext","isPresent","dragSnapToOrigin","getProps","panSession","PanSession","onSessionStart","event","extractEventInfo","point","stopAnimation","onStart","info","dragPropagation","onDragStart","setDragLock","resolveConstraints","projection","isAnimationBlocked","target","eachAxis","axis","current","getAxisMotionValue","get","percent","test","layout","measuredAxis","layoutBox","calcLength","parseFloat","frame","update","addValueToWillChange","animationState","setActive","onMove","dragDirectionLock","onDirectionLock","onDrag","offset","lockThreshold","Math","abs","getCurrentDirection","updateAxis","render","onSessionEnd","stop","resumeAnimation","snap","startAnimation","transformPagePoint","getTransformPagePoint","contextWindow","getContextWindow","element","panInfo","finalEvent","finalPanInfo","cancel","velocity","onDragEnd","postRender","endPanSession","end","_point","axisValue","next","applyConstraints","set","dragConstraints","dragElastic","measure","prevConstraints","isRefObject","resolveRefConstraints","calcRelativeConstraints","resolveDragElastic","rebaseAxisConstraints","onMeasureDragConstraints","constraintsElement","invariant","root","scroll","updateScroll","constraintsBox","measurePageBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","convertBoundingBoxToBox","dragMomentum","dragTransition","onDragTransitionEnd","momentumAnimations","transition","min","max","bounceStiffness","bounceDamping","inertia","type","timeConstant","restDelta","restSpeed","startAxisValueAnimation","Promise","all","then","animateMotionValue","dragKey","toUpperCase","externalMotionValue","getValue","latestValues","mixNumber","scalePositionWithinConstraints","boxProgress","latest","calcOrigin","transformTemplate","style","transform","updateLayout","addListeners","stopPointerListener","addPointerEvent","dragListener","isClickingTextInputChild","isElementTextInput","stopResizeObservers","measureDragConstraints","onResize","stopElement","resize","stopContainer","startResizeObservers","stopMeasureLayoutListener","addEventListener","read","stopResizeListener","addDomEvent","window","stopLayoutUpdateListener","_ref","delta","hasLayoutChanged","motionValue","translate","props","defaultElastic"],"mappings":"kgDAsCaA,MAAAA,EAAsB,IAAIC,QAivBvC,SAASC,EAAcC,GACnB,IAAIC,GAAU,EACd,MAAO,KACCA,EACAA,GAAU,EAGdD,GAAU,CAElB,CAeA,SAASE,EACLC,EACAC,EACAC,GAEA,SACc,IAATD,GAAiBA,IAASD,GACL,OAArBE,GAA6BA,IAAqBF,EAE3D,yCAztBIG,WAAAA,CAAYC,GA7BJC,KAAAC,aAAoC,KAE5CD,KAAAE,YAAa,EACLF,KAAAH,iBAAyC,KAEzCG,KAAAG,YAAqB,CAAEC,EAAG,EAAGC,EAAG,GAKhCL,KAAAM,aAA2C,EAE3CN,KAAAO,uBAAwB,EAKxBP,KAAAQ,QAAUC,EAAAA,YAKVT,KAAAU,mBAA0C,KAK1CV,KAAAW,cAAgC,KAGpCX,KAAKD,cAAgBA,CACzB,CAEAa,KAAAA,CACIC,GACoE,IAApEC,aAAEA,GAAe,EAAKC,kBAAEA,GAAiBC,UAAAC,OAAAD,QAAAE,IAAAF,aAAAA,UAAA,GAAyB,GAKlE,MAAMG,gBAAEA,GAAoBnB,KAAKD,cACjC,GAAIoB,IAAiD,IAA9BA,EAAgBC,UAAqB,OAE5D,MAsIMC,iBA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9H,MAAQ4H,EAAM/H,GAAMkI,WACnC,IAGL1K,KAAKD,cAAcmE,SACvB,IAIR,MAAO,KACHgG,IACAf,IACAY,IACAM,GAA4BA,IAC5Bb,GAAuBA,GAAqB,CAEpD,CAEAlI,QAAAA,GACI,MAAMqJ,EAAQ3K,KAAKD,cAAcuB,YAC3B1B,KACFA,GAAO,EAAK6D,kBACZA,GAAoB,EAAKzB,gBACzBA,GAAkB,EAAK2D,gBACvBA,GAAkB,EAAKC,YACvBA,EAAcgF,EAAcA,eAAA3D,aAC5BA,GAAe,GACf0D,EACJ,MAAO,IACAA,EACH/K,OACA6D,oBACAzB,kBACA2D,kBACAC,cACAqB,eAER"}
1
+ {"version":3,"file":"VisualElementDragControls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs"],"sourcesContent":["import { createBox, frame, eachAxis, measurePageBox, convertBoxToBoundingBox, convertBoundingBoxToBox, addValueToWillChange, animateMotionValue, mixNumber, addDomEvent, setDragLock, percent, calcLength, resize, isElementTextInput } from 'motion-dom';\nimport { invariant } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\n\nconst elementDragControls = new WeakMap();\nclass VisualElementDragControls {\n constructor(visualElement) {\n this.openDragLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n /**\n * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPointerEvent = null;\n /**\n * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.\n */\n this.latestPanInfo = null;\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false, distanceThreshold } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point);\n }\n this.stopAnimation();\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openDragLock)\n this.openDragLock();\n this.openDragLock = setDragLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock)\n return;\n }\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin and pointer offset\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.update(() => onDragStart(event, info), false, true);\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n if (onDrag) {\n frame.update(() => onDrag(event, info), false, true);\n }\n };\n const onSessionEnd = (event, info) => {\n this.latestPointerEvent = event;\n this.latestPanInfo = info;\n this.stop(event, info);\n this.latestPointerEvent = null;\n this.latestPanInfo = null;\n };\n const resumeAnimation = () => {\n const { dragSnapToOrigin: snap } = this.getProps();\n if (snap || this.constraints) {\n this.startAnimation({ x: 0, y: 0 });\n }\n };\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n distanceThreshold,\n contextWindow: getContextWindow(this.visualElement),\n element: this.visualElement.current,\n });\n }\n /**\n * @internal\n */\n stop(event, panInfo) {\n const finalEvent = event || this.latestPointerEvent;\n const finalPanInfo = panInfo || this.latestPanInfo;\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging || !finalPanInfo || !finalEvent)\n return;\n const { velocity } = finalPanInfo;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(finalEvent, finalPanInfo));\n }\n }\n /**\n * @internal\n */\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.endPanSession();\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock();\n this.openDragLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n /**\n * Clean up the pan session without modifying other drag state.\n * This is used during unmount to ensure event listeners are removed\n * without affecting projection animations or drag locks.\n * @internal\n */\n endPanSession() {\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : this.visualElement.projection?.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative. This only applies to relative (non-ref)\n * constraints, as ref-based constraints from calcViewportConstraints are already in the\n * correct coordinate space for the motion value transform offset.\n */\n if (prevConstraints !== this.constraints &&\n !isRefObject(dragConstraints) &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\", \"drag-constraints-ref\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n /**\n * Refresh the root scroll offset so the constraint's viewport box\n * translates to correct page coordinates. The scroll captured at\n * drag mount can be stale if the document was scrolled afterwards —\n * e.g. via the browser restoring scroll on refresh, or an ancestor\n * layout effect running after this element's mount (#2829).\n *\n * Clear the cached scroll first so `updateScroll` bypasses its\n * per-animationId cache and re-reads the live value.\n */\n if (projection.root) {\n projection.root.scroll = undefined;\n projection.root.updateScroll();\n }\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin === true ||\n dragSnapToOrigin === axis)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n /**\n * The layout measurement includes the current transform value,\n * so we need to add it back to get the correct snap position.\n * This fixes an issue where elements with initial coordinates\n * would snap to the wrong position on the first drag.\n */\n const current = axisValue.get() || 0;\n axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current);\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n /**\n * Reset constraints so resolveConstraints() will recalculate them\n * with the freshly measured layout rather than returning the cached value.\n */\n this.constraints = false;\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n /**\n * Flush the updated transform to the DOM synchronously to prevent\n * a visual flash at the element's CSS layout position (0,0) when\n * the transform was stripped for measurement.\n */\n this.visualElement.render();\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n const target = event.target;\n /**\n * Only block drag if clicking on a text input child element\n * (input, textarea, select, contenteditable) where users might\n * want to select text or interact with the control.\n *\n * Buttons and links don't block drag since they don't have\n * click-and-move actions of their own.\n */\n const isClickingTextInputChild = target !== element && isElementTextInput(target);\n if (drag && dragListener && !isClickingTextInputChild) {\n this.start(event);\n }\n });\n /**\n * If using ref-based constraints, observe both the draggable element\n * and the constraint container for size changes via ResizeObserver.\n * Setup is deferred because dragConstraints.current is null when\n * addListeners first runs (React hasn't committed the ref yet).\n */\n let stopResizeObservers;\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n if (!stopResizeObservers) {\n stopResizeObservers = startResizeObservers(element, dragConstraints.current, () => this.scalePositionWithinConstraints());\n }\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n stopResizeObservers && stopResizeObservers();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction skipFirstCall(callback) {\n let isFirst = true;\n return () => {\n if (isFirst) {\n isFirst = false;\n return;\n }\n callback();\n };\n}\nfunction startResizeObservers(element, constraintsElement, onResize) {\n const stopElement = resize(element, skipFirstCall(onResize));\n const stopContainer = resize(constraintsElement, skipFirstCall(onResize));\n return () => {\n stopElement();\n stopContainer();\n };\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n//# sourceMappingURL=VisualElementDragControls.mjs.map\n"],"names":["elementDragControls","WeakMap","skipFirstCall","callback","isFirst","shouldDrag","direction","drag","currentDirection","constructor","visualElement","this","openDragLock","isDragging","originPoint","x","y","constraints","hasMutatedConstraints","elastic","createBox","latestPointerEvent","latestPanInfo","start","originEvent","snapToCursor","distanceThreshold","arguments","length","undefined","presenceContext","isPresent","dragSnapToOrigin","getProps","panSession","PanSession","onSessionStart","event","extractEventInfo","point","stopAnimation","onStart","info","dragPropagation","onDragStart","setDragLock","resolveConstraints","projection","isAnimationBlocked","target","eachAxis","axis","current","getAxisMotionValue","get","percent","test","layout","measuredAxis","layoutBox","calcLength","parseFloat","frame","update","addValueToWillChange","animationState","setActive","onMove","dragDirectionLock","onDirectionLock","onDrag","offset","lockThreshold","Math","abs","getCurrentDirection","updateAxis","render","onSessionEnd","stop","resumeAnimation","snap","startAnimation","transformPagePoint","getTransformPagePoint","contextWindow","getContextWindow","element","panInfo","finalEvent","finalPanInfo","cancel","velocity","onDragEnd","postRender","endPanSession","end","_point","axisValue","next","applyConstraints","set","dragConstraints","dragElastic","measure","prevConstraints","isRefObject","resolveRefConstraints","calcRelativeConstraints","resolveDragElastic","rebaseAxisConstraints","onMeasureDragConstraints","constraintsElement","invariant","root","scroll","updateScroll","constraintsBox","measurePageBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","convertBoundingBoxToBox","dragMomentum","dragTransition","onDragTransitionEnd","momentumAnimations","transition","min","max","bounceStiffness","bounceDamping","inertia","type","timeConstant","restDelta","restSpeed","startAxisValueAnimation","Promise","all","then","animateMotionValue","dragKey","toUpperCase","externalMotionValue","getValue","latestValues","mixNumber","scalePositionWithinConstraints","boxProgress","latest","calcOrigin","transformTemplate","style","transform","updateLayout","addListeners","stopPointerListener","addPointerEvent","dragListener","isClickingTextInputChild","isElementTextInput","stopResizeObservers","measureDragConstraints","onResize","stopElement","resize","stopContainer","startResizeObservers","stopMeasureLayoutListener","addEventListener","read","stopResizeListener","addDomEvent","window","stopLayoutUpdateListener","_ref","delta","hasLayoutChanged","motionValue","translate","props","defaultElastic"],"mappings":"kgDAsCaA,MAAAA,EAAsB,IAAIC,QAivBvC,SAASC,EAAcC,GACnB,IAAIC,GAAU,EACd,MAAO,KACCA,EACAA,GAAU,EAGdD,IAER,CAeA,SAASE,EACLC,EACAC,EACAC,GAEA,SACc,IAATD,GAAiBA,IAASD,GACL,OAArBE,GAA6BA,IAAqBF,EAE3D,yCAztBIG,WAAAA,CAAYC,GA7BJC,KAAAC,aAAoC,KAE5CD,KAAAE,YAAa,EACLF,KAAAH,iBAAyC,KAEzCG,KAAAG,YAAqB,CAAEC,EAAG,EAAGC,EAAG,GAKhCL,KAAAM,aAA2C,EAE3CN,KAAAO,uBAAwB,EAKxBP,KAAAQ,QAAUC,EAAAA,YAKVT,KAAAU,mBAA0C,KAK1CV,KAA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,EAAKC,iBAAEA,GAAoCF,EACvCtK,KAAKE,YAAcsK,IACnBjI,EAAAA,SAAUC,IACN,MAAMiI,EAAczK,KAAK0C,mBAAmBF,GACvCiI,IAELzK,KAAKG,YAAYqC,IAAS+H,EAAM/H,GAAMkI,UACtCD,EAAY/E,IACR+E,EAAY9H,MAAQ4H,EAAM/H,GAAMkI,cAIxC1K,KAAKD,cAAcmE,YAK/B,MAAO,KACHgG,IACAf,IACAY,IACAM,GAA4BA,IAC5Bb,GAAuBA,IAE/B,CAEAlI,QAAAA,GACI,MAAMqJ,EAAQ3K,KAAKD,cAAcuB,YAC3B1B,KACFA,GAAO,EAAK6D,kBACZA,GAAoB,EAAKzB,gBACzBA,GAAkB,EAAK2D,gBACvBA,GAAkB,EAAKC,YACvBA,EAAcgF,EAAcA,eAAA3D,aAC5BA,GAAe,GACf0D,EACJ,MAAO,IACAA,EACH/K,OACA6D,oBACAzB,kBACA2D,kBACAC,cACAqB,eAER"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../utils/use-constant.mjs.js");class o{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,o){this.componentControls.forEach((s=>{s.start(t.nativeEvent||t,o)}))}cancel(){this.componentControls.forEach((t=>{t.cancel()}))}stop(){this.componentControls.forEach((t=>{t.stop()}))}}const s=()=>new o;exports.DragControls=o,exports.useDragControls=function(){return t.useConstant(s)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../utils/use-constant.mjs.js");class o{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,o){this.componentControls.forEach(s=>{s.start(t.nativeEvent||t,o)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const s=()=>new o;exports.DragControls=o,exports.useDragControls=function(){return t.useConstant(s)};
2
2
  //# sourceMappingURL=use-drag-controls.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-drag-controls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs"],"sourcesContent":["import { useConstant } from '../../utils/use-constant.mjs';\n\n/**\n * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n * <div onPointerDown={startDrag} />\n * <motion.div drag=\"x\" dragControls={dragControls} />\n * </>\n * )\n * ```\n *\n * @public\n */\nclass DragControls {\n constructor() {\n this.componentControls = new Set();\n }\n /**\n * Subscribe a component's internal `VisualElementDragControls` to the user-facing API.\n *\n * @internal\n */\n subscribe(controls) {\n this.componentControls.add(controls);\n return () => this.componentControls.delete(controls);\n }\n /**\n * Start a drag gesture on every `motion` component that has this set of drag controls\n * passed into it via the `dragControls` prop.\n *\n * ```jsx\n * dragControls.start(e, {\n * snapToCursor: true\n * })\n * ```\n *\n * @param event - PointerEvent\n * @param options - Options\n *\n * @public\n */\n start(event, options) {\n this.componentControls.forEach((controls) => {\n controls.start(event.nativeEvent || event, options);\n });\n }\n /**\n * Cancels a drag gesture.\n *\n * ```jsx\n * dragControls.cancel()\n * ```\n *\n * @public\n */\n cancel() {\n this.componentControls.forEach((controls) => {\n controls.cancel();\n });\n }\n /**\n * Stops a drag gesture.\n *\n * ```jsx\n * dragControls.stop()\n * ```\n *\n * @public\n */\n stop() {\n this.componentControls.forEach((controls) => {\n controls.stop();\n });\n }\n}\nconst createDragControls = () => new DragControls();\n/**\n * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop\n * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we\n * might want to initiate that dragging from a different component than the draggable one.\n *\n * By creating a `dragControls` using the `useDragControls` hook, we can pass this into\n * the draggable component's `dragControls` prop. It exposes a `start` method\n * that can start dragging from pointer events on other components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n * <div onPointerDown={startDrag} />\n * <motion.div drag=\"x\" dragControls={dragControls} />\n * </>\n * )\n * ```\n *\n * @public\n */\nfunction useDragControls() {\n return useConstant(createDragControls);\n}\n\nexport { DragControls, useDragControls };\n//# sourceMappingURL=use-drag-controls.mjs.map\n"],"names":["DragControls","constructor","this","componentControls","Set","subscribe","controls","add","delete","start","event","options","forEach","nativeEvent","cancel","stop","createDragControls","useDragControls","useConstant"],"mappings":"2HA2BaA,EAAbC,WAAAA,GACYC,KAAAC,kBAAoB,IAAIC,GAqEpC,CA9DIC,SAAAA,CAAUC,GAGN,OAFAJ,KAAKC,kBAAkBI,IAAID,GAEpB,IAAMJ,KAAKC,kBAAkBK,OAAOF,EAC/C,CAiBAG,KAAAA,CACIC,EACAC,GAEAT,KAAKC,kBAAkBS,SAASN,IAC5BA,EAASG,MACJC,EAA6BG,aAAeH,EAC7CC,EACH,GAET,CAWAG,MAAAA,GACIZ,KAAKC,kBAAkBS,SAASN,IAC5BA,EAASQ,QAAQ,GAEzB,CAWAC,IAAAA,GACIb,KAAKC,kBAAkBS,SAASN,IAC5BA,EAASS,MAAM,GAEvB,EAGJ,MAAMC,EAAqBA,IAAM,IAAIhB,iDA4BrBiB,WACZ,OAAOC,EAAAA,YAAYF,EACvB"}
1
+ {"version":3,"file":"use-drag-controls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs"],"sourcesContent":["import { useConstant } from '../../utils/use-constant.mjs';\n\n/**\n * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n * <div onPointerDown={startDrag} />\n * <motion.div drag=\"x\" dragControls={dragControls} />\n * </>\n * )\n * ```\n *\n * @public\n */\nclass DragControls {\n constructor() {\n this.componentControls = new Set();\n }\n /**\n * Subscribe a component's internal `VisualElementDragControls` to the user-facing API.\n *\n * @internal\n */\n subscribe(controls) {\n this.componentControls.add(controls);\n return () => this.componentControls.delete(controls);\n }\n /**\n * Start a drag gesture on every `motion` component that has this set of drag controls\n * passed into it via the `dragControls` prop.\n *\n * ```jsx\n * dragControls.start(e, {\n * snapToCursor: true\n * })\n * ```\n *\n * @param event - PointerEvent\n * @param options - Options\n *\n * @public\n */\n start(event, options) {\n this.componentControls.forEach((controls) => {\n controls.start(event.nativeEvent || event, options);\n });\n }\n /**\n * Cancels a drag gesture.\n *\n * ```jsx\n * dragControls.cancel()\n * ```\n *\n * @public\n */\n cancel() {\n this.componentControls.forEach((controls) => {\n controls.cancel();\n });\n }\n /**\n * Stops a drag gesture.\n *\n * ```jsx\n * dragControls.stop()\n * ```\n *\n * @public\n */\n stop() {\n this.componentControls.forEach((controls) => {\n controls.stop();\n });\n }\n}\nconst createDragControls = () => new DragControls();\n/**\n * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop\n * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we\n * might want to initiate that dragging from a different component than the draggable one.\n *\n * By creating a `dragControls` using the `useDragControls` hook, we can pass this into\n * the draggable component's `dragControls` prop. It exposes a `start` method\n * that can start dragging from pointer events on other components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n * <div onPointerDown={startDrag} />\n * <motion.div drag=\"x\" dragControls={dragControls} />\n * </>\n * )\n * ```\n *\n * @public\n */\nfunction useDragControls() {\n return useConstant(createDragControls);\n}\n\nexport { DragControls, useDragControls };\n//# sourceMappingURL=use-drag-controls.mjs.map\n"],"names":["DragControls","constructor","this","componentControls","Set","subscribe","controls","add","delete","start","event","options","forEach","nativeEvent","cancel","stop","createDragControls","useDragControls","useConstant"],"mappings":"2HA2BaA,EAAbC,WAAAA,GACYC,KAAAC,kBAAoB,IAAIC,GAqEpC,CA9DIC,SAAAA,CAAUC,GAGN,OAFAJ,KAAKC,kBAAkBI,IAAID,GAEpB,IAAMJ,KAAKC,kBAAkBK,OAAOF,EAC/C,CAiBAG,KAAAA,CACIC,EACAC,GAEAT,KAAKC,kBAAkBS,QAASN,IAC5BA,EAASG,MACJC,EAA6BG,aAAeH,EAC7CC,IAGZ,CAWAG,MAAAA,GACIZ,KAAKC,kBAAkBS,QAASN,IAC5BA,EAASQ,UAEjB,CAWAC,IAAAA,GACIb,KAAKC,kBAAkBS,QAASN,IAC5BA,EAASS,QAEjB,EAGJ,MAAMC,EAAqBA,IAAM,IAAIhB,iDA4BrBiB,WACZ,OAAOC,EAAAA,YAAYF,EACvB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../motion-utils/dist/es/pipe.mjs.js"),s=require("../../../../motion-dom/dist/es/events/add-dom-event.mjs.js");class i extends t.Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=e.pipe(s.addDomEvent(this.node.current,"focus",(()=>this.onFocus())),s.addDomEvent(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}exports.FocusGesture=i;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../motion-utils/dist/es/pipe.mjs.js"),s=require("../../../../motion-dom/dist/es/events/add-dom-event.mjs.js");class i extends t.Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=e.pipe(s.addDomEvent(this.node.current,"focus",()=>this.onFocus()),s.addDomEvent(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}exports.FocusGesture=i;
2
2
  //# sourceMappingURL=focus.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"focus.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/focus.mjs"],"sourcesContent":["import { Feature, addDomEvent } from 'motion-dom';\nimport { pipe } from 'motion-utils';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\n//# sourceMappingURL=focus.mjs.map\n"],"names":["FocusGesture","Feature","constructor","this","isActive","onFocus","isFocusVisible","node","current","matches","e","animationState","setActive","onBlur","mount","unmount","pipe","addDomEvent"],"mappings":"4QAGM,MAAOA,UAAqBC,EAAAA,QAAlCC,WAAAA,uBACYC,KAAAC,UAAW,CAqCvB,CAnCIC,OAAAA,GACI,IAAIC,GAAiB,EAQrB,IACIA,EAAiBH,KAAKI,KAAKC,QAASC,QAAQ,iBAC9C,CAAA,MAAOC,GACLJ,GAAiB,CACrB,CAEKA,GAAmBH,KAAKI,KAAKI,iBAElCR,KAAKI,KAAKI,eAAeC,UAAU,cAAc,GACjDT,KAAKC,UAAW,EACpB,CAEAS,MAAAA,GACSV,KAAKC,UAAaD,KAAKI,KAAKI,iBACjCR,KAAKI,KAAKI,eAAeC,UAAU,cAAc,GACjDT,KAAKC,UAAW,EACpB,CAEAU,KAAAA,GACIX,KAAKY,QAAUC,EAAIA,KACfC,cAAYd,KAAKI,KAAKC,QAAU,SAAS,IAAML,KAAKE,YACpDY,EAAWA,YAACd,KAAKI,KAAKC,QAAU,QAAQ,IAAML,KAAKU,WAE3D,CAEAE,OAAAA,GAAW"}
1
+ {"version":3,"file":"focus.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/focus.mjs"],"sourcesContent":["import { Feature, addDomEvent } from 'motion-dom';\nimport { pipe } from 'motion-utils';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\n//# sourceMappingURL=focus.mjs.map\n"],"names":["FocusGesture","Feature","constructor","this","isActive","onFocus","isFocusVisible","node","current","matches","e","animationState","setActive","onBlur","mount","unmount","pipe","addDomEvent"],"mappings":"4QAGM,MAAOA,UAAqBC,EAAAA,QAAlCC,WAAAA,uBACYC,KAAAC,UAAW,CAqCvB,CAnCIC,OAAAA,GACI,IAAIC,GAAiB,EAQrB,IACIA,EAAiBH,KAAKI,KAAKC,QAASC,QAAQ,iBAC9C,CAAA,MAAOC,GACLJ,GAAiB,CACrB,CAEKA,GAAmBH,KAAKI,KAAKI,iBAElCR,KAAKI,KAAKI,eAAeC,UAAU,cAAc,GACjDT,KAAKC,UAAW,EACpB,CAEAS,MAAAA,GACSV,KAAKC,UAAaD,KAAKI,KAAKI,iBACjCR,KAAKI,KAAKI,eAAeC,UAAU,cAAc,GACjDT,KAAKC,UAAW,EACpB,CAEAU,KAAAA,GACIX,KAAKY,QAAUC,EAAIA,KACfC,cAAYd,KAAKI,KAAKC,QAAU,QAAS,IAAML,KAAKE,WACpDY,EAAWA,YAACd,KAAKI,KAAKC,QAAU,OAAQ,IAAML,KAAKU,UAE3D,CAEAE,OAAAA,GAAW"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../events/event-info.mjs.js"),t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),o=require("../../../../motion-dom/dist/es/gestures/hover.mjs.js"),r=require("../../../../motion-dom/dist/es/frameloop/frame.mjs.js");function s(t,o,s){const{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===s);const i=n["onHover"+s];i&&r.frame.postRender((()=>i(o,e.extractEventInfo(o))))}class n extends t.Feature{mount(){const{current:e}=this.node;e&&(this.unmount=o.hover(e,((e,t)=>(s(this.node,t,"Start"),e=>s(this.node,e,"End")))))}unmount(){}}exports.HoverGesture=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../events/event-info.mjs.js"),t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),o=require("../../../../motion-dom/dist/es/gestures/hover.mjs.js"),r=require("../../../../motion-dom/dist/es/frameloop/frame.mjs.js");function s(t,o,s){const{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===s);const i=n["onHover"+s];i&&r.frame.postRender(()=>i(o,e.extractEventInfo(o)))}class n extends t.Feature{mount(){const{current:e}=this.node;e&&(this.unmount=o.hover(e,(e,t)=>(s(this.node,t,"Start"),e=>s(this.node,e,"End"))))}unmount(){}}exports.HoverGesture=n;
2
2
  //# sourceMappingURL=hover.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hover.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/hover.mjs"],"sourcesContent":["import { Feature, hover, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\n\nfunction handleHoverEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", lifecycle === \"Start\");\n }\n const eventName = (\"onHover\" + lifecycle);\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass HoverGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = hover(current, (_element, startEvent) => {\n handleHoverEvent(this.node, startEvent, \"Start\");\n return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\");\n });\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n//# sourceMappingURL=hover.mjs.map\n"],"names":["handleHoverEvent","node","event","lifecycle","props","animationState","whileHover","setActive","callback","frame","postRender","extractEventInfo","HoverGesture","Feature","mount","current","this","unmount","hover","_element","startEvent","endEvent"],"mappings":"wTAGA,SAASA,EACLC,EACAC,EACAC,GAEA,MAAMC,MAAEA,GAAUH,EAEdA,EAAKI,gBAAkBD,EAAME,YAC7BL,EAAKI,eAAeE,UAAU,aAA4B,UAAdJ,GAGhD,MACMK,EAAWJ,EADE,UAAYD,GAE3BK,GACAC,EAAKA,MAACC,YAAW,IAAMF,EAASN,EAAOS,mBAAiBT,KAEhE,CAEM,MAAOU,UAAqBC,EAAAA,QAC9BC,KAAAA,GACI,MAAMC,QAAEA,GAAYC,KAAKf,KACpBc,IAELC,KAAKC,QAAUC,EAAKA,MAACH,GAAS,CAACI,EAAUC,KACrCpB,EAAiBgB,KAAKf,KAAMmB,EAAY,SAEhCC,GAAarB,EAAiBgB,KAAKf,KAAMoB,EAAU,UAEnE,CAEAJ,OAAAA,GAAW"}
1
+ {"version":3,"file":"hover.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/hover.mjs"],"sourcesContent":["import { Feature, hover, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\n\nfunction handleHoverEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", lifecycle === \"Start\");\n }\n const eventName = (\"onHover\" + lifecycle);\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass HoverGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = hover(current, (_element, startEvent) => {\n handleHoverEvent(this.node, startEvent, \"Start\");\n return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\");\n });\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n//# sourceMappingURL=hover.mjs.map\n"],"names":["handleHoverEvent","node","event","lifecycle","props","animationState","whileHover","setActive","callback","frame","postRender","extractEventInfo","HoverGesture","Feature","mount","current","this","unmount","hover","_element","startEvent","endEvent"],"mappings":"wTAGA,SAASA,EACLC,EACAC,EACAC,GAEA,MAAMC,MAAEA,GAAUH,EAEdA,EAAKI,gBAAkBD,EAAME,YAC7BL,EAAKI,eAAeE,UAAU,aAA4B,UAAdJ,GAGhD,MACMK,EAAWJ,EADE,UAAYD,GAE3BK,GACAC,EAAKA,MAACC,WAAW,IAAMF,EAASN,EAAOS,mBAAiBT,IAEhE,CAEM,MAAOU,UAAqBC,EAAAA,QAC9BC,KAAAA,GACI,MAAMC,QAAEA,GAAYC,KAAKf,KACpBc,IAELC,KAAKC,QAAUC,EAAKA,MAACH,EAAS,CAACI,EAAUC,KACrCpB,EAAiBgB,KAAKf,KAAMmB,EAAY,SAEhCC,GAAarB,EAAiBgB,KAAKf,KAAMoB,EAAU,SAEnE,CAEAJ,OAAAA,GAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"PanSession.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs"],"sourcesContent":["import { frameData, frame, isPrimaryPointer, cancelFrame } from 'motion-dom';\nimport { pipe, secondsToMilliseconds, millisecondsToSeconds } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\n\nconst overflowStyles = /*#__PURE__*/ new Set([\"auto\", \"scroll\"]);\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { transformPagePoint, contextWindow = window, dragSnapToOrigin = false, distanceThreshold = 3, element, } = {}) {\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * Raw (untransformed) event info, re-transformed each frame\n * so transformPagePoint sees the current parent matrix.\n * @internal\n */\n this.lastRawMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n /**\n * @internal\n */\n this.contextWindow = window;\n /**\n * Scroll positions of scrollable ancestors and window.\n * @internal\n */\n this.scrollPositions = new Map();\n /**\n * Cleanup function for scroll listeners.\n * @internal\n */\n this.removeScrollListeners = null;\n this.onElementScroll = (event) => {\n this.handleScroll(event.target);\n };\n this.onWindowScroll = () => {\n this.handleScroll(window);\n };\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n // Re-transform raw point through current transformPagePoint so\n // animated parent transforms (e.g. rotation) are picked up each frame\n if (this.lastRawMoveEventInfo) {\n this.lastMoveEventInfo = transformPoint(this.lastRawMoveEventInfo, this.transformPagePoint);\n }\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursor.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= this.distanceThreshold;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastRawMoveEventInfo = info;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;\n // Resume animation if dragSnapToOrigin is set OR if no drag started (user just clicked)\n // This ensures constraint animations continue when interrupted by a click\n if (this.dragSnapToOrigin || !this.startEvent) {\n resumeAnimation && resumeAnimation();\n }\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.dragSnapToOrigin = dragSnapToOrigin;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n this.distanceThreshold = distanceThreshold;\n this.contextWindow = contextWindow || window;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n // Listen in the capture phase so a descendant calling\n // stopPropagation() (e.g. in its own pointerup handler) can't\n // prevent the gesture from ending. See #2794.\n const eventOptions = { passive: true, capture: true };\n this.removeListeners = pipe(addPointerEvent(this.contextWindow, \"pointermove\", this.handlePointerMove, eventOptions), addPointerEvent(this.contextWindow, \"pointerup\", this.handlePointerUp, eventOptions), addPointerEvent(this.contextWindow, \"pointercancel\", this.handlePointerUp, eventOptions));\n // Start scroll tracking if element provided\n if (element) {\n this.startScrollTracking(element);\n }\n }\n /**\n * Start tracking scroll on ancestors and window.\n */\n startScrollTracking(element) {\n // Store initial scroll positions for scrollable ancestors\n let current = element.parentElement;\n while (current) {\n const style = getComputedStyle(current);\n if (overflowStyles.has(style.overflowX) ||\n overflowStyles.has(style.overflowY)) {\n this.scrollPositions.set(current, {\n x: current.scrollLeft,\n y: current.scrollTop,\n });\n }\n current = current.parentElement;\n }\n // Track window scroll\n this.scrollPositions.set(window, {\n x: window.scrollX,\n y: window.scrollY,\n });\n // Capture listener catches element scroll events as they bubble\n window.addEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n });\n // Direct window scroll listener (window scroll doesn't bubble)\n window.addEventListener(\"scroll\", this.onWindowScroll);\n this.removeScrollListeners = () => {\n window.removeEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n });\n window.removeEventListener(\"scroll\", this.onWindowScroll);\n };\n }\n /**\n * Handle scroll compensation during drag.\n *\n * For element scroll: adjusts history origin since pageX/pageY doesn't change.\n * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.\n */\n handleScroll(target) {\n const initial = this.scrollPositions.get(target);\n if (!initial)\n return;\n const isWindow = target === window;\n const current = isWindow\n ? { x: window.scrollX, y: window.scrollY }\n : {\n x: target.scrollLeft,\n y: target.scrollTop,\n };\n const delta = { x: current.x - initial.x, y: current.y - initial.y };\n if (delta.x === 0 && delta.y === 0)\n return;\n if (isWindow) {\n // Window scroll: pageX/pageY changes, so update lastMoveEventInfo\n if (this.lastMoveEventInfo) {\n this.lastMoveEventInfo.point.x += delta.x;\n this.lastMoveEventInfo.point.y += delta.y;\n }\n }\n else {\n // Element scroll: pageX/pageY unchanged, so adjust history origin\n if (this.history.length > 0) {\n this.history[0].x -= delta.x;\n this.history[0].y -= delta.y;\n }\n }\n this.scrollPositions.set(target, current);\n frame.update(this.updatePoint, true);\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n this.removeScrollListeners && this.removeScrollListeners();\n this.scrollPositions.clear();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n /**\n * If the selected point is the pointer-down origin (history[0]),\n * there are better movement points available, and the time gap\n * is suspiciously large (>2x timeDelta), use the next point instead.\n * This prevents stale pointer-down points from diluting velocity\n * in hold-then-flick gestures.\n */\n if (timestampedPoint === history[0] &&\n history.length > 2 &&\n lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta) * 2) {\n timestampedPoint = history[1];\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n//# sourceMappingURL=PanSession.mjs.map\n"],"names":["overflowStyles","Set","transformPoint","info","transformPagePoint","point","subtractPoint","a","b","x","y","getPanInfo","_ref","history","delta","lastDevicePoint","offset","startDevicePoint","velocity","getVelocity","length","timeDelta","i","timestampedPoint","lastPoint","timestamp","secondsToMilliseconds","time","millisecondsToSeconds","currentVelocity","Infinity","constructor","event","handlers","contextWindow","window","dragSnapToOrigin","distanceThreshold","element","arguments","undefined","this","startEvent","lastMoveEvent","lastMoveEventInfo","lastRawMoveEventInfo","scrollPositions","Map","removeScrollListeners","onElementScroll","handleScroll","target","onWindowScroll","updatePoint","isPanStarted","isDistancePastThreshold","distance2D","frameData","push","onStart","onMove","handlePointerMove","frame","update","handlePointerUp","end","onEnd","onSessionEnd","resumeAnimation","panInfo","type","isPrimaryPointer","initialInfo","extractEventInfo","onSessionStart","eventOptions","passive","capture","removeListeners","pipe","addPointerEvent","startScrollTracking","current","parentElement","style","getComputedStyle","has","overflowX","overflowY","set","scrollLeft","scrollTop","scrollX","scrollY","addEventListener","removeEventListener","initial","get","isWindow","updateHandlers","clear","cancelFrame"],"mappings":"mfAuCA,MAAMA,EAA+B,IAAIC,IAAI,CAAC,OAAQ,WA2TtD,SAASC,EACLC,EACAC,GAEA,OAAOA,EAAqB,CAAEC,MAAOD,EAAmBD,EAAKE,QAAWF,CAC5E,CAEA,SAASG,EAAcC,EAAUC,GAC7B,MAAO,CAAEC,EAAGF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KY,aAAa,GACnC,CA0EA8C,cAAAA,CAAelE,GACXQ,KAAKR,SAAWA,CACpB,CAEAgC,GAAAA,GACIxB,KAAKqC,iBAAmBrC,KAAKqC,kBAC7BrC,KAAKO,uBAAyBP,KAAKO,wBACnCP,KAAKK,gBAAgBsD,QACrBC,cAAY5D,KAAKY,YACrB"}
1
+ {"version":3,"file":"PanSession.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs"],"sourcesContent":["import { frameData, frame, isPrimaryPointer, cancelFrame } from 'motion-dom';\nimport { pipe, secondsToMilliseconds, millisecondsToSeconds } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\n\nconst overflowStyles = /*#__PURE__*/ new Set([\"auto\", \"scroll\"]);\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { transformPagePoint, contextWindow = window, dragSnapToOrigin = false, distanceThreshold = 3, element, } = {}) {\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * Raw (untransformed) event info, re-transformed each frame\n * so transformPagePoint sees the current parent matrix.\n * @internal\n */\n this.lastRawMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n /**\n * @internal\n */\n this.contextWindow = window;\n /**\n * Scroll positions of scrollable ancestors and window.\n * @internal\n */\n this.scrollPositions = new Map();\n /**\n * Cleanup function for scroll listeners.\n * @internal\n */\n this.removeScrollListeners = null;\n this.onElementScroll = (event) => {\n this.handleScroll(event.target);\n };\n this.onWindowScroll = () => {\n this.handleScroll(window);\n };\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n // Re-transform raw point through current transformPagePoint so\n // animated parent transforms (e.g. rotation) are picked up each frame\n if (this.lastRawMoveEventInfo) {\n this.lastMoveEventInfo = transformPoint(this.lastRawMoveEventInfo, this.transformPagePoint);\n }\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursor.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= this.distanceThreshold;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastRawMoveEventInfo = info;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;\n // Resume animation if dragSnapToOrigin is set OR if no drag started (user just clicked)\n // This ensures constraint animations continue when interrupted by a click\n if (this.dragSnapToOrigin || !this.startEvent) {\n resumeAnimation && resumeAnimation();\n }\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.dragSnapToOrigin = dragSnapToOrigin;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n this.distanceThreshold = distanceThreshold;\n this.contextWindow = contextWindow || window;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n // Listen in the capture phase so a descendant calling\n // stopPropagation() (e.g. in its own pointerup handler) can't\n // prevent the gesture from ending. See #2794.\n const eventOptions = { passive: true, capture: true };\n this.removeListeners = pipe(addPointerEvent(this.contextWindow, \"pointermove\", this.handlePointerMove, eventOptions), addPointerEvent(this.contextWindow, \"pointerup\", this.handlePointerUp, eventOptions), addPointerEvent(this.contextWindow, \"pointercancel\", this.handlePointerUp, eventOptions));\n // Start scroll tracking if element provided\n if (element) {\n this.startScrollTracking(element);\n }\n }\n /**\n * Start tracking scroll on ancestors and window.\n */\n startScrollTracking(element) {\n // Store initial scroll positions for scrollable ancestors\n let current = element.parentElement;\n while (current) {\n const style = getComputedStyle(current);\n if (overflowStyles.has(style.overflowX) ||\n overflowStyles.has(style.overflowY)) {\n this.scrollPositions.set(current, {\n x: current.scrollLeft,\n y: current.scrollTop,\n });\n }\n current = current.parentElement;\n }\n // Track window scroll\n this.scrollPositions.set(window, {\n x: window.scrollX,\n y: window.scrollY,\n });\n // Capture listener catches element scroll events as they bubble\n window.addEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n });\n // Direct window scroll listener (window scroll doesn't bubble)\n window.addEventListener(\"scroll\", this.onWindowScroll);\n this.removeScrollListeners = () => {\n window.removeEventListener(\"scroll\", this.onElementScroll, {\n capture: true,\n });\n window.removeEventListener(\"scroll\", this.onWindowScroll);\n };\n }\n /**\n * Handle scroll compensation during drag.\n *\n * For element scroll: adjusts history origin since pageX/pageY doesn't change.\n * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.\n */\n handleScroll(target) {\n const initial = this.scrollPositions.get(target);\n if (!initial)\n return;\n const isWindow = target === window;\n const current = isWindow\n ? { x: window.scrollX, y: window.scrollY }\n : {\n x: target.scrollLeft,\n y: target.scrollTop,\n };\n const delta = { x: current.x - initial.x, y: current.y - initial.y };\n if (delta.x === 0 && delta.y === 0)\n return;\n if (isWindow) {\n // Window scroll: pageX/pageY changes, so update lastMoveEventInfo\n if (this.lastMoveEventInfo) {\n this.lastMoveEventInfo.point.x += delta.x;\n this.lastMoveEventInfo.point.y += delta.y;\n }\n }\n else {\n // Element scroll: pageX/pageY unchanged, so adjust history origin\n if (this.history.length > 0) {\n this.history[0].x -= delta.x;\n this.history[0].y -= delta.y;\n }\n }\n this.scrollPositions.set(target, current);\n frame.update(this.updatePoint, true);\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n this.removeScrollListeners && this.removeScrollListeners();\n this.scrollPositions.clear();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n /**\n * If the selected point is the pointer-down origin (history[0]),\n * there are better movement points available, and the time gap\n * is suspiciously large (>2x timeDelta), use the next point instead.\n * This prevents stale pointer-down points from diluting velocity\n * in hold-then-flick gestures.\n */\n if (timestampedPoint === history[0] &&\n history.length > 2 &&\n lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta) * 2) {\n timestampedPoint = history[1];\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n//# sourceMappingURL=PanSession.mjs.map\n"],"names":["overflowStyles","Set","transformPoint","info","transformPagePoint","point","subtractPoint","a","b","x","y","getPanInfo","_ref","history","delta","lastDevicePoint","offset","startDevicePoint","velocity","getVelocity","length","timeDelta","i","timestampedPoint","lastPoint","timestamp","secondsToMilliseconds","time","millisecondsToSeconds","currentVelocity","Infinity","constructor","event","handlers","contextWindow","window","dragSnapToOrigin","distanceThreshold","element","arguments","undefined","this","startEvent","lastMoveEvent","lastMoveEventInfo","lastRawMoveEventInfo","scrollPositions","Map","removeScrollListeners","onElementScroll","handleScroll","target","onWindowScroll","updatePoint","isPanStarted","isDistancePastThreshold","distance2D","frameData","push","onStart","onMove","handlePointerMove","frame","update","handlePointerUp","end","onEnd","onSessionEnd","resumeAnimation","panInfo","type","isPrimaryPointer","initialInfo","extractEventInfo","onSessionStart","eventOptions","passive","capture","removeListeners","pipe","addPointerEvent","startScrollTracking","current","parentElement","style","getComputedStyle","has","overflowX","overflowY","set","scrollLeft","scrollTop","scrollX","scrollY","addEventListener","removeEventListener","initial","get","isWindow","updateHandlers","clear","cancelFrame"],"mappings":"mfAuCA,MAAMA,EAA+B,IAAIC,IAAI,CAAC,OAAQ,WA2TtD,SAASC,EACLC,EACAC,GAEA,OAAOA,EAAqB,CAAEC,MAAOD,EAAmBD,EAAKE,QAAWF,CAC5E,CAEA,SAASG,EAAcC,EAAUC,GAC7B,MAAO,CAAEC,EAAGF,EAAEE,EAAID,EAAEC,EA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pB,CAEAgC,GAAAA,GACIxB,KAAKqC,iBAAmBrC,KAAKqC,kBAC7BrC,KAAKO,uBAAyBP,KAAKO,wBACnCP,KAAKK,gBAAgBsD,QACrBC,cAAY5D,KAAKY,YACrB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../events/add-pointer-event.mjs.js"),n=require("../../utils/get-context-window.mjs.js"),s=require("./PanSession.mjs.js"),t=require("../../../../../motion-dom/dist/es/render/Feature.mjs.js"),o=require("../../../../../motion-utils/dist/es/noop.mjs.js"),r=require("../../../../../motion-dom/dist/es/frameloop/frame.mjs.js");const i=e=>(n,s)=>{e&&r.frame.update((()=>e(n,s)),!1,!0)};class a extends t.Feature{constructor(){super(...arguments),this.removePointerDownListener=o.noop}onPointerDown(e){this.session=new s.PanSession(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:n.getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:t}=this.node.getProps();return{onSessionStart:i(e),onStart:i(n),onMove:i(s),onEnd:(e,n)=>{delete this.session,t&&r.frame.postRender((()=>t(e,n)))}}}mount(){this.removePointerDownListener=e.addPointerEvent(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}exports.PanGesture=a;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../events/add-pointer-event.mjs.js"),n=require("../../utils/get-context-window.mjs.js"),s=require("./PanSession.mjs.js"),t=require("../../../../../motion-dom/dist/es/render/Feature.mjs.js"),o=require("../../../../../motion-utils/dist/es/noop.mjs.js"),r=require("../../../../../motion-dom/dist/es/frameloop/frame.mjs.js");const i=e=>(n,s)=>{e&&r.frame.update(()=>e(n,s),!1,!0)};class a extends t.Feature{constructor(){super(...arguments),this.removePointerDownListener=o.noop}onPointerDown(e){this.session=new s.PanSession(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:n.getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:t}=this.node.getProps();return{onSessionStart:i(e),onStart:i(n),onMove:i(s),onEnd:(e,n)=>{delete this.session,t&&r.frame.postRender(()=>t(e,n))}}}mount(){this.removePointerDownListener=e.addPointerEvent(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}exports.PanGesture=a;
2
2
  //# sourceMappingURL=index.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs"],"sourcesContent":["import { Feature, frame } from 'motion-dom';\nimport { noop } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { PanSession } from './PanSession.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.update(() => handler(event, info), false, true);\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: asyncHandler(onPan),\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n//# sourceMappingURL=index.mjs.map\n"],"names":["asyncHandler","handler","event","info","frame","update","PanGesture","Feature","constructor","this","removePointerDownListener","noop","onPointerDown","pointerDownEvent","session","PanSession","createPanHandlers","transformPagePoint","node","getTransformPagePoint","contextWindow","getContextWindow","onPanSessionStart","onPanStart","onPan","onPanEnd","getProps","onSessionStart","onStart","onMove","onEnd","postRender","mount","addPointerEvent","current","updateHandlers","unmount","end"],"mappings":"uZAOA,MAAMA,EACDC,GAA8B,CAACC,EAAqBC,KAC7CF,GACAG,QAAMC,QAAO,IAAMJ,EAAQC,EAAOC,KAAO,GAAO,EACpD,EAGF,MAAOG,UAAmBC,EAAAA,QAAhCC,WAAAA,uBAGYC,KAAAC,0BAAsCC,MA8ClD,CA5CIC,aAAAA,CAAcC,GACVJ,KAAKK,QAAU,IAAIC,EAAAA,WACfF,EACAJ,KAAKO,oBACL,CACIC,mBAAoBR,KAAKS,KAAKC,wBAC9BC,cAAeC,EAAAA,iBAAiBZ,KAAKS,OAGjD,CAEAF,iBAAAA,GACI,MAAMM,kBAAEA,EAAiBC,WAAEA,EAAUC,MAAEA,EAAKC,SAAEA,GAC1ChB,KAAKS,KAAKQ,WAEd,MAAO,CACHC,eAAgB3B,EAAasB,GAC7BM,QAAS5B,EAAauB,GACtBM,OAAQ7B,EAAawB,GACrBM,MAAOA,CAAC5B,EAAqBC,YAClBM,KAAKK,QACRW,GACArB,EAAKA,MAAC2B,YAAW,IAAMN,EAASvB,EAAOC,IAC3C,EAGZ,CAEA6B,KAAAA,GACIvB,KAAKC,0BAA4BuB,kBAC7BxB,KAAKS,KAAKgB,QACV,eACChC,GAAwBO,KAAKG,cAAcV,IAEpD,CAEAG,MAAAA,GACII,KAAKK,SAAWL,KAAKK,QAAQqB,eAAe1B,KAAKO,oBACrD,CAEAoB,OAAAA,GACI3B,KAAKC,4BACLD,KAAKK,SAAWL,KAAKK,QAAQuB,KACjC"}
1
+ {"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs"],"sourcesContent":["import { Feature, frame } from 'motion-dom';\nimport { noop } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { PanSession } from './PanSession.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.update(() => handler(event, info), false, true);\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: asyncHandler(onPan),\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n//# sourceMappingURL=index.mjs.map\n"],"names":["asyncHandler","handler","event","info","frame","update","PanGesture","Feature","constructor","this","removePointerDownListener","noop","onPointerDown","pointerDownEvent","session","PanSession","createPanHandlers","transformPagePoint","node","getTransformPagePoint","contextWindow","getContextWindow","onPanSessionStart","onPanStart","onPan","onPanEnd","getProps","onSessionStart","onStart","onMove","onEnd","postRender","mount","addPointerEvent","current","updateHandlers","unmount","end"],"mappings":"uZAOA,MAAMA,EACDC,GAA8B,CAACC,EAAqBC,KAC7CF,GACAG,QAAMC,OAAO,IAAMJ,EAAQC,EAAOC,IAAO,GAAO,IAItD,MAAOG,UAAmBC,EAAAA,QAAhCC,WAAAA,uBAGYC,KAAAC,0BAAsCC,MA8ClD,CA5CIC,aAAAA,CAAcC,GACVJ,KAAKK,QAAU,IAAIC,EAAAA,WACfF,EACAJ,KAAKO,oBACL,CACIC,mBAAoBR,KAAKS,KAAKC,wBAC9BC,cAAeC,EAAAA,iBAAiBZ,KAAKS,OAGjD,CAEAF,iBAAAA,GACI,MAAMM,kBAAEA,EAAiBC,WAAEA,EAAUC,MAAEA,EAAKC,SAAEA,GAC1ChB,KAAKS,KAAKQ,WAEd,MAAO,CACHC,eAAgB3B,EAAasB,GAC7BM,QAAS5B,EAAauB,GACtBM,OAAQ7B,EAAawB,GACrBM,MAAOA,CAAC5B,EAAqBC,YAClBM,KAAKK,QACRW,GACArB,EAAKA,MAAC2B,WAAW,IAAMN,EAASvB,EAAOC,KAIvD,CAEA6B,KAAAA,GACIvB,KAAKC,0BAA4BuB,kBAC7BxB,KAAKS,KAAKgB,QACV,cACChC,GAAwBO,KAAKG,cAAcV,GAEpD,CAEAG,MAAAA,GACII,KAAKK,SAAWL,KAAKK,QAAQqB,eAAe1B,KAAKO,oBACrD,CAEAoB,OAAAA,GACI3B,KAAKC,4BACLD,KAAKK,SAAWL,KAAKK,QAAQuB,KACjC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../events/event-info.mjs.js"),t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),s=require("../../../../motion-dom/dist/es/gestures/press/index.mjs.js"),r=require("../../../../motion-dom/dist/es/frameloop/frame.mjs.js");function n(t,s,n){const{props:o}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&o.whileTap&&t.animationState.setActive("whileTap","Start"===n);const a=o["onTap"+("End"===n?"":n)];a&&r.frame.postRender((()=>a(s,e.extractEventInfo(s))))}class o extends t.Feature{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:r}=this.node.props;this.unmount=s.press(e,((e,t)=>(n(this.node,t,"Start"),(e,t)=>{let{success:s}=t;return n(this.node,e,s?"End":"Cancel")})),{useGlobalTarget:t,stopPropagation:!1===r?.tap})}unmount(){}}exports.PressGesture=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../events/event-info.mjs.js"),t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),s=require("../../../../motion-dom/dist/es/gestures/press/index.mjs.js"),r=require("../../../../motion-dom/dist/es/frameloop/frame.mjs.js");function n(t,s,n){const{props:o}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&o.whileTap&&t.animationState.setActive("whileTap","Start"===n);const a=o["onTap"+("End"===n?"":n)];a&&r.frame.postRender(()=>a(s,e.extractEventInfo(s)))}class o extends t.Feature{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:r}=this.node.props;this.unmount=s.press(e,(e,t)=>(n(this.node,t,"Start"),(e,t)=>{let{success:s}=t;return n(this.node,e,s?"End":"Cancel")}),{useGlobalTarget:t,stopPropagation:!1===r?.tap})}unmount(){}}exports.PressGesture=o;
2
2
  //# sourceMappingURL=press.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"press.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/press.mjs"],"sourcesContent":["import { Feature, press, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\n\nfunction handlePressEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n return;\n }\n if (node.animationState && props.whileTap) {\n node.animationState.setActive(\"whileTap\", lifecycle === \"Start\");\n }\n const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle));\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass PressGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n const { globalTapTarget, propagate } = this.node.props;\n this.unmount = press(current, (_element, startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\");\n return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? \"End\" : \"Cancel\");\n }, {\n useGlobalTarget: globalTapTarget,\n stopPropagation: propagate?.tap === false,\n });\n }\n unmount() { }\n}\n\nexport { PressGesture };\n//# sourceMappingURL=press.mjs.map\n"],"names":["handlePressEvent","node","event","lifecycle","props","current","HTMLButtonElement","disabled","animationState","whileTap","setActive","callback","frame","postRender","extractEventInfo","PressGesture","Feature","mount","this","globalTapTarget","propagate","unmount","press","_element","startEvent","endEvent","_ref","success","useGlobalTarget","stopPropagation","tap"],"mappings":"8TAGA,SAASA,EACLC,EACAC,EACAC,GAEA,MAAMC,MAAEA,GAAUH,EAElB,GAAIA,EAAKI,mBAAmBC,mBAAqBL,EAAKI,QAAQE,SAC1D,OAGAN,EAAKO,gBAAkBJ,EAAMK,UAC7BR,EAAKO,eAAeE,UAAU,WAA0B,UAAdP,GAG9C,MAKMQ,EAAWP,EALE,SAAyB,QAAdD,EAAsB,GAAKA,IAMrDQ,GACAC,EAAKA,MAACC,YAAW,IAAMF,EAAST,EAAOY,mBAAiBZ,KAEhE,CAEM,MAAOa,UAAqBC,EAAAA,QAC9BC,KAAAA,GACI,MAAMZ,QAAEA,GAAYa,KAAKjB,KACzB,IAAKI,EAAS,OAEd,MAAMc,gBAAEA,EAAeC,UAAEA,GAAcF,KAAKjB,KAAKG,MAEjDc,KAAKG,QAAUC,EAAKA,MAChBjB,GACA,CAACkB,EAAUC,KACPxB,EAAiBkB,KAAKjB,KAAMuB,EAAY,SAEjC,CAACC,EAAQC,KAAA,IAAEC,QAAEA,GAASD,EAAA,OACzB1B,EACIkB,KAAKjB,KACLwB,EACAE,EAAU,MAAQ,SACrB,IAET,CACIC,gBAAiBT,EACjBU,iBAAoC,IAAnBT,GAAWU,KAGxC,CAEAT,OAAAA,GAAW"}
1
+ {"version":3,"file":"press.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/press.mjs"],"sourcesContent":["import { Feature, press, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\n\nfunction handlePressEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n return;\n }\n if (node.animationState && props.whileTap) {\n node.animationState.setActive(\"whileTap\", lifecycle === \"Start\");\n }\n const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle));\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass PressGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n const { globalTapTarget, propagate } = this.node.props;\n this.unmount = press(current, (_element, startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\");\n return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? \"End\" : \"Cancel\");\n }, {\n useGlobalTarget: globalTapTarget,\n stopPropagation: propagate?.tap === false,\n });\n }\n unmount() { }\n}\n\nexport { PressGesture };\n//# sourceMappingURL=press.mjs.map\n"],"names":["handlePressEvent","node","event","lifecycle","props","current","HTMLButtonElement","disabled","animationState","whileTap","setActive","callback","frame","postRender","extractEventInfo","PressGesture","Feature","mount","this","globalTapTarget","propagate","unmount","press","_element","startEvent","endEvent","_ref","success","useGlobalTarget","stopPropagation","tap"],"mappings":"8TAGA,SAASA,EACLC,EACAC,EACAC,GAEA,MAAMC,MAAEA,GAAUH,EAElB,GAAIA,EAAKI,mBAAmBC,mBAAqBL,EAAKI,QAAQE,SAC1D,OAGAN,EAAKO,gBAAkBJ,EAAMK,UAC7BR,EAAKO,eAAeE,UAAU,WAA0B,UAAdP,GAG9C,MAKMQ,EAAWP,EALE,SAAyB,QAAdD,EAAsB,GAAKA,IAMrDQ,GACAC,EAAKA,MAACC,WAAW,IAAMF,EAAST,EAAOY,mBAAiBZ,IAEhE,CAEM,MAAOa,UAAqBC,EAAAA,QAC9BC,KAAAA,GACI,MAAMZ,QAAEA,GAAYa,KAAKjB,KACzB,IAAKI,EAAS,OAEd,MAAMc,gBAAEA,EAAeC,UAAEA,GAAcF,KAAKjB,KAAKG,MAEjDc,KAAKG,QAAUC,EAAKA,MAChBjB,EACA,CAACkB,EAAUC,KACPxB,EAAiBkB,KAAKjB,KAAMuB,EAAY,SAEjC,CAACC,EAAQC,KAAA,IAAEC,QAAEA,GAASD,EAAA,OACzB1B,EACIkB,KAAKjB,KACLwB,EACAE,EAAU,MAAQ,YAG9B,CACIC,gBAAiBT,EACjBU,iBAAoC,IAAnBT,GAAWU,KAGxC,CAEAT,OAAAA,GAAW"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../../motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js");let i=0;class s extends t.Feature{constructor(){super(...arguments),this.id=i++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;if(t&&!1===s){if(this.isExitComplete){const{initial:t,custom:i}=this.node.getProps();if("string"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)){const s=e.resolveVariant(this.node,t,i);if(s){const{transition:t,transitionEnd:e,...i}=s;for(const t in i)this.node.getValue(t)?.jump(i[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const n=this.node.animationState.setActive("exit",!t);i&&!t&&n.then((()=>{this.isExitComplete=!0,i(this.id)}))}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}exports.ExitAnimationFeature=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../../motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js");let i=0;class s extends t.Feature{constructor(){super(...arguments),this.id=i++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;if(t&&!1===s){if(this.isExitComplete){const{initial:t,custom:i}=this.node.getProps();if("string"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)){const s=e.resolveVariant(this.node,t,i);if(s){const{transition:t,transitionEnd:e,...i}=s;for(const t in i)this.node.getValue(t)?.jump(i[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const n=this.node.animationState.setActive("exit",!t);i&&!t&&n.then(()=>{this.isExitComplete=!0,i(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}exports.ExitAnimationFeature=s;
2
2
  //# sourceMappingURL=exit.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"exit.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs"],"sourcesContent":["import { Feature, resolveVariant } from 'motion-dom';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n this.isExitComplete = false;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n if (isPresent && prevIsPresent === false) {\n /**\n * When re-entering, if the exit animation already completed\n * (element is at rest), reset to initial values so the enter\n * animation replays from the correct position.\n */\n if (this.isExitComplete) {\n const { initial, custom } = this.node.getProps();\n if (typeof initial === \"string\" ||\n (typeof initial === \"object\" &&\n initial !== null &&\n !Array.isArray(initial))) {\n const resolved = resolveVariant(this.node, initial, custom);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n for (const key in target) {\n this.node\n .getValue(key)\n ?.jump(target[key]);\n }\n }\n }\n this.node.animationState.reset();\n this.node.animationState.animateChanges();\n }\n else {\n this.node.animationState.setActive(\"exit\", false);\n }\n this.isExitComplete = false;\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent);\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => {\n this.isExitComplete = true;\n onExitComplete(this.id);\n });\n }\n }\n mount() {\n const { register, onExitComplete } = this.node.presenceContext || {};\n if (onExitComplete) {\n onExitComplete(this.id);\n }\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n//# sourceMappingURL=exit.mjs.map\n"],"names":["id","ExitAnimationFeature","Feature","constructor","this","isExitComplete","update","node","presenceContext","isPresent","onExitComplete","prevIsPresent","prevPresenceContext","animationState","initial","custom","getProps","Array","isArray","resolved","resolveVariant","transition","transitionEnd","target","key","getValue","jump","reset","animateChanges","setActive","exitAnimation","then","mount","register","unmount"],"mappings":"+OAEA,IAAIA,EAAK,EAEH,MAAOC,UAA6BC,EAAAA,QAA1CC,WAAAA,uBACYC,KAAAJ,GAAaA,IACbI,KAAAC,gBAAiB,CAmF7B,CAjFIC,MAAAA,GACI,IAAKF,KAAKG,KAAKC,gBAAiB,OAEhC,MAAMC,UAAEA,EAASC,eAAEA,GAAmBN,KAAKG,KAAKC,iBACxCC,UAAWE,GAAkBP,KAAKG,KAAKK,qBAAuB,GAEtE,IAAKR,KAAKG,KAAKM,gBAAkBJ,IAAcE,EAC3C,OAGJ,GAAIF,IAA+B,IAAlBE,EAAyB,CAMtC,GAAIP,KAAKC,eAAgB,CACrB,MAAMS,QAAEA,EAAOC,OAAEA,GAAWX,KAAKG,KAAKS,WAEtC,GACuB,iBAAZF,GACa,iBAAZA,GACQ,OAAZA,IACCG,MAAMC,QAAQJ,GACrB,CACE,MAAMK,EAAWC,EAAAA,eACbhB,KAAKG,KACLO,EACAC,GAEJ,GAAII,EAAU,CACV,MAAME,WAAEA,EAAUC,cAAEA,KAAkBC,GAClCJ,EACJ,IAAK,MAAMK,KAAOD,EACdnB,KAAKG,KACAkB,SAASD,IACRE,KACEH,EACIC,GAIpB,CACJ,CAEApB,KAAKG,KAAKM,eAAec,QACzBvB,KAAKG,KAAKM,eAAee,sBAEzBxB,KAAKG,KAAKM,eAAegB,UAAU,QAAQ,GAI/C,YADAzB,KAAKC,gBAAiB,EAE1B,CAEA,MAAMyB,EAAgB1B,KAAKG,KAAKM,eAAegB,UAC3C,QACCpB,GAGDC,IAAmBD,GACnBqB,EAAcC,MAAK,KACf3B,KAAKC,gBAAiB,EACtBK,EAAeN,KAAKJ,GAAG,GAGnC,CAEAgC,KAAAA,GACI,MAAMC,SAAEA,EAAQvB,eAAEA,GAAmBN,KAAKG,KAAKC,iBAAmB,GAE9DE,GACAA,EAAeN,KAAKJ,IAGpBiC,IACA7B,KAAK8B,QAAUD,EAAS7B,KAAKJ,IAErC,CAEAkC,OAAAA,GAAW"}
1
+ {"version":3,"file":"exit.mjs.js","sources":["../../../../../../../../node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs"],"sourcesContent":["import { Feature, resolveVariant } from 'motion-dom';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n this.isExitComplete = false;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n if (isPresent && prevIsPresent === false) {\n /**\n * When re-entering, if the exit animation already completed\n * (element is at rest), reset to initial values so the enter\n * animation replays from the correct position.\n */\n if (this.isExitComplete) {\n const { initial, custom } = this.node.getProps();\n if (typeof initial === \"string\" ||\n (typeof initial === \"object\" &&\n initial !== null &&\n !Array.isArray(initial))) {\n const resolved = resolveVariant(this.node, initial, custom);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n for (const key in target) {\n this.node\n .getValue(key)\n ?.jump(target[key]);\n }\n }\n }\n this.node.animationState.reset();\n this.node.animationState.animateChanges();\n }\n else {\n this.node.animationState.setActive(\"exit\", false);\n }\n this.isExitComplete = false;\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent);\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => {\n this.isExitComplete = true;\n onExitComplete(this.id);\n });\n }\n }\n mount() {\n const { register, onExitComplete } = this.node.presenceContext || {};\n if (onExitComplete) {\n onExitComplete(this.id);\n }\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n//# sourceMappingURL=exit.mjs.map\n"],"names":["id","ExitAnimationFeature","Feature","constructor","this","isExitComplete","update","node","presenceContext","isPresent","onExitComplete","prevIsPresent","prevPresenceContext","animationState","initial","custom","getProps","Array","isArray","resolved","resolveVariant","transition","transitionEnd","target","key","getValue","jump","reset","animateChanges","setActive","exitAnimation","then","mount","register","unmount"],"mappings":"+OAEA,IAAIA,EAAK,EAEH,MAAOC,UAA6BC,EAAAA,QAA1CC,WAAAA,uBACYC,KAAAJ,GAAaA,IACbI,KAAAC,gBAAiB,CAmF7B,CAjFIC,MAAAA,GACI,IAAKF,KAAKG,KAAKC,gBAAiB,OAEhC,MAAMC,UAAEA,EAASC,eAAEA,GAAmBN,KAAKG,KAAKC,iBACxCC,UAAWE,GAAkBP,KAAKG,KAAKK,qBAAuB,GAEtE,IAAKR,KAAKG,KAAKM,gBAAkBJ,IAAcE,EAC3C,OAGJ,GAAIF,IAA+B,IAAlBE,EAAyB,CAMtC,GAAIP,KAAKC,eAAgB,CACrB,MAAMS,QAAEA,EAAOC,OAAEA,GAAWX,KAAKG,KAAKS,WAEtC,GACuB,iBAAZF,GACa,iBAAZA,GACQ,OAAZA,IACCG,MAAMC,QAAQJ,GACrB,CACE,MAAMK,EAAWC,EAAAA,eACbhB,KAAKG,KACLO,EACAC,GAEJ,GAAII,EAAU,CACV,MAAME,WAAEA,EAAUC,cAAEA,KAAkBC,GAClCJ,EACJ,IAAK,MAAMK,KAAOD,EACdnB,KAAKG,KACAkB,SAASD,IACRE,KACEH,EACIC,GAIpB,CACJ,CAEApB,KAAKG,KAAKM,eAAec,QACzBvB,KAAKG,KAAKM,eAAee,sBAEzBxB,KAAKG,KAAKM,eAAegB,UAAU,QAAQ,GAI/C,YADAzB,KAAKC,gBAAiB,EAE1B,CAEA,MAAMyB,EAAgB1B,KAAKG,KAAKM,eAAegB,UAC3C,QACCpB,GAGDC,IAAmBD,GACnBqB,EAAcC,KAAK,KACf3B,KAAKC,gBAAiB,EACtBK,EAAeN,KAAKJ,KAGhC,CAEAgC,KAAAA,GACI,MAAMC,SAAEA,EAAQvB,eAAEA,GAAmBN,KAAKG,KAAKC,iBAAmB,GAE9DE,GACAA,EAAeN,KAAKJ,IAGpBiC,IACA7B,KAAK8B,QAAUD,EAAS7B,KAAKJ,IAErC,CAEAkC,OAAAA,GAAW"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../motion-dom/dist/es/render/VisualElement.mjs.js");const n={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let t=!1;function i(){if(t)return;const i={};for(const e in n)i[e]={isEnabled:t=>n[e].some((e=>!!t[e]))};e.setFeatureDefinitions(i),t=!0}exports.getInitializedFeatureDefinitions=function(){return i(),e.getFeatureDefinitions()},exports.initFeatureDefinitions=i;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../motion-dom/dist/es/render/VisualElement.mjs.js");const n={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let t=!1;function i(){if(t)return;const i={};for(const e in n)i[e]={isEnabled:t=>n[e].some(e=>!!t[e])};e.setFeatureDefinitions(i),t=!0}exports.getInitializedFeatureDefinitions=function(){return i(),e.getFeatureDefinitions()},exports.initFeatureDefinitions=i;
2
2
  //# sourceMappingURL=definitions.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/motion/features/definitions.mjs"],"sourcesContent":["import { getFeatureDefinitions, setFeatureDefinitions } from 'motion-dom';\n\nconst featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n};\nlet isInitialized = false;\n/**\n * Initialize feature definitions with isEnabled checks.\n * This must be called before any motion components are rendered.\n */\nfunction initFeatureDefinitions() {\n if (isInitialized)\n return;\n const initialFeatureDefinitions = {};\n for (const key in featureProps) {\n initialFeatureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n };\n }\n setFeatureDefinitions(initialFeatureDefinitions);\n isInitialized = true;\n}\n/**\n * Get the current feature definitions, initializing if needed.\n */\nfunction getInitializedFeatureDefinitions() {\n initFeatureDefinitions();\n return getFeatureDefinitions();\n}\n\nexport { getInitializedFeatureDefinitions, initFeatureDefinitions };\n//# sourceMappingURL=definitions.mjs.map\n"],"names":["featureProps","animation","exit","drag","focus","hover","tap","pan","inView","layout","isInitialized","initFeatureDefinitions","initialFeatureDefinitions","key","isEnabled","props","some","name","setFeatureDefinitions","getInitializedFeatureDefinitions","getFeatureDefinitions"],"mappings":"mJAIA,MAAMA,EAAe,CACjBC,UAAW,CACP,UACA,WACA,aACA,WACA,OACA,cACA,aACA,aAEJC,KAAM,CAAC,QACPC,KAAM,CAAC,OAAQ,gBACfC,MAAO,CAAC,cACRC,MAAO,CAAC,aAAc,eAAgB,cACtCC,IAAK,CAAC,WAAY,QAAS,aAAc,eACzCC,IAAK,CAAC,QAAS,aAAc,oBAAqB,YAClDC,OAAQ,CAAC,cAAe,kBAAmB,mBAC3CC,OAAQ,CAAC,SAAU,aAGvB,IAAIC,GAAgB,EAMJC,SAAAA,IACZ,GAAID,EAAe,OAEnB,MAAME,EAAyD,CAAA,EAE/D,IAAK,MAAMC,KAAOb,EACdY,EACIC,GACA,CACAC,UAAYC,GACRf,EAAaa,GAAkCG,MAC1CC,KAAmBF,EAAME,MAK1CC,EAAqBA,sBAACN,GACtBF,GAAgB,CACpB,0CAKgBS,WAEZ,OADAR,IACOS,EAAqBA,uBAChC"}
1
+ {"version":3,"file":"definitions.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/motion/features/definitions.mjs"],"sourcesContent":["import { getFeatureDefinitions, setFeatureDefinitions } from 'motion-dom';\n\nconst featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n};\nlet isInitialized = false;\n/**\n * Initialize feature definitions with isEnabled checks.\n * This must be called before any motion components are rendered.\n */\nfunction initFeatureDefinitions() {\n if (isInitialized)\n return;\n const initialFeatureDefinitions = {};\n for (const key in featureProps) {\n initialFeatureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n };\n }\n setFeatureDefinitions(initialFeatureDefinitions);\n isInitialized = true;\n}\n/**\n * Get the current feature definitions, initializing if needed.\n */\nfunction getInitializedFeatureDefinitions() {\n initFeatureDefinitions();\n return getFeatureDefinitions();\n}\n\nexport { getInitializedFeatureDefinitions, initFeatureDefinitions };\n//# sourceMappingURL=definitions.mjs.map\n"],"names":["featureProps","animation","exit","drag","focus","hover","tap","pan","inView","layout","isInitialized","initFeatureDefinitions","initialFeatureDefinitions","key","isEnabled","props","some","name","setFeatureDefinitions","getInitializedFeatureDefinitions","getFeatureDefinitions"],"mappings":"mJAIA,MAAMA,EAAe,CACjBC,UAAW,CACP,UACA,WACA,aACA,WACA,OACA,cACA,aACA,aAEJC,KAAM,CAAC,QACPC,KAAM,CAAC,OAAQ,gBACfC,MAAO,CAAC,cACRC,MAAO,CAAC,aAAc,eAAgB,cACtCC,IAAK,CAAC,WAAY,QAAS,aAAc,eACzCC,IAAK,CAAC,QAAS,aAAc,oBAAqB,YAClDC,OAAQ,CAAC,cAAe,kBAAmB,mBAC3CC,OAAQ,CAAC,SAAU,aAGvB,IAAIC,GAAgB,EAMJC,SAAAA,IACZ,GAAID,EAAe,OAEnB,MAAME,EAAyD,CAAA,EAE/D,IAAK,MAAMC,KAAOb,EACdY,EACIC,GACA,CACAC,UAAYC,GACRf,EAAaa,GAAkCG,KAC1CC,KAAmBF,EAAME,KAK1CC,EAAqBA,sBAACN,GACtBF,GAAgB,CACpB,0CAKgBS,WAEZ,OADAR,IACOS,EAAqBA,uBAChC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../../react/jsx-runtime.js");var e=require("react"),t=require("../../../components/AnimatePresence/use-presence.mjs.js"),o=require("../../../context/LayoutGroupContext.mjs.js"),s=require("../../../context/SwitchLayoutGroupContext.mjs.js"),r=require("../../../../../../motion-dom/dist/es/projection/node/state.mjs.js"),n=require("../../../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),i=require("../../../../../../motion-dom/dist/es/frameloop/microtask.mjs.js"),u=require("../../../../../../../_virtual/jsx-runtime.js");let a=!1;class p extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:o,layoutId:s}=this.props,{projection:n}=e;n&&(t.group&&t.group.add(n),o&&o.register&&s&&o.register(n),a&&n.root.didUpdate(),n.addEventListener("animationComplete",(()=>{this.safeToRemove()})),n.setOptions({...n.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),r.globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:o,drag:s,isPresent:r}=this.props,{projection:i}=o;return i?(i.isPresent=r,e.layoutDependency!==t&&i.setOptions({...i.options,layoutDependency:t}),a=!0,s||e.layoutDependency!==t||void 0===t||e.isPresent!==r?i.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?i.promote():i.relegate()||n.frame.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:o}=e;o&&(o.options.layoutAnchor=t,o.root.didUpdate(),i.microtask.postRender((()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:o}=this.props,{projection:s}=e;a=!0,s&&(s.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(s),o&&o.deregister&&o.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}exports.MeasureLayout=function(r){const[n,i]=t.usePresence(),a=e.useContext(o.LayoutGroupContext);return u.exports.jsx(p,{...r,layoutGroup:a,switchLayoutGroup:e.useContext(s.SwitchLayoutGroupContext),isPresent:n,safeToRemove:i})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../../react/jsx-runtime.js");var e=require("react"),t=require("../../../components/AnimatePresence/use-presence.mjs.js"),o=require("../../../context/LayoutGroupContext.mjs.js"),s=require("../../../context/SwitchLayoutGroupContext.mjs.js"),r=require("../../../../../../motion-dom/dist/es/projection/node/state.mjs.js"),n=require("../../../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),i=require("../../../../../../motion-dom/dist/es/frameloop/microtask.mjs.js"),u=require("../../../../../../../_virtual/jsx-runtime.js");let a=!1;class p extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:o,layoutId:s}=this.props,{projection:n}=e;n&&(t.group&&t.group.add(n),o&&o.register&&s&&o.register(n),a&&n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),r.globalProjectionState.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:o,drag:s,isPresent:r}=this.props,{projection:i}=o;return i?(i.isPresent=r,e.layoutDependency!==t&&i.setOptions({...i.options,layoutDependency:t}),a=!0,s||e.layoutDependency!==t||void 0===t||e.isPresent!==r?i.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?i.promote():i.relegate()||n.frame.postRender(()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:o}=e;o&&(o.options.layoutAnchor=t,o.root.didUpdate(),i.microtask.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:o}=this.props,{projection:s}=e;a=!0,s&&(s.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(s),o&&o.deregister&&o.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}exports.MeasureLayout=function(r){const[n,i]=t.usePresence(),a=e.useContext(o.LayoutGroupContext);return u.exports.jsx(p,{...r,layoutGroup:a,switchLayoutGroup:e.useContext(s.SwitchLayoutGroupContext),isPresent:n,safeToRemove:i})};
2
2
  //# sourceMappingURL=MeasureLayout.mjs.js.map