@konstructio/ui 0.1.2-alpha.7 → 0.1.2-alpha.71

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 (892) hide show
  1. package/dist/AdditionalOptions-C2FDVZhu.js +45 -0
  2. package/dist/CalendarPanel.css +1 -0
  3. package/dist/{Combination-VYaRRJBZ.js → Combination-BtmnusWq.js} +141 -138
  4. package/dist/DayPicker-CaeUXRCF.js +2798 -0
  5. package/dist/Modal-BGcucTHv.js +120 -0
  6. package/dist/assets/icons/components/Accounts.d.ts +3 -0
  7. package/dist/assets/icons/components/Accounts.js +37 -0
  8. package/dist/assets/icons/components/AddChart.d.ts +3 -0
  9. package/dist/assets/icons/components/AddChart.js +28 -0
  10. package/dist/assets/icons/components/AlertOutline.d.ts +3 -0
  11. package/dist/assets/icons/components/AlertOutline.js +28 -0
  12. package/dist/assets/icons/components/AppRepo.d.ts +3 -0
  13. package/dist/assets/icons/components/AppRepo.js +28 -0
  14. package/dist/assets/icons/components/Apps.d.ts +3 -0
  15. package/dist/assets/icons/components/Apps.js +28 -0
  16. package/dist/assets/icons/components/Archives.d.ts +3 -0
  17. package/dist/assets/icons/components/Archives.js +28 -0
  18. package/dist/assets/icons/components/ArrowDown.d.ts +3 -0
  19. package/dist/assets/icons/components/ArrowDown.js +28 -0
  20. package/dist/assets/icons/components/ArrowLeft.d.ts +3 -0
  21. package/dist/assets/icons/components/ArrowLeft.js +28 -0
  22. package/dist/assets/icons/components/ArrowRight.d.ts +3 -0
  23. package/dist/assets/icons/components/ArrowRight.js +28 -0
  24. package/dist/assets/icons/components/ArrowUp.d.ts +3 -0
  25. package/dist/assets/icons/components/ArrowUp.js +28 -0
  26. package/dist/assets/icons/components/BarChart.d.ts +3 -0
  27. package/dist/assets/icons/components/BarChart.js +38 -0
  28. package/dist/assets/icons/components/BookOpen.d.ts +3 -0
  29. package/dist/assets/icons/components/BookOpen.js +32 -0
  30. package/dist/assets/icons/components/CalendarMonth.d.ts +3 -0
  31. package/dist/assets/icons/components/CalendarMonth.js +28 -0
  32. package/dist/assets/icons/components/Check.d.ts +3 -0
  33. package/dist/assets/icons/components/Check.js +28 -0
  34. package/dist/assets/icons/components/CheckCircle.d.ts +3 -0
  35. package/dist/assets/icons/components/CheckCircle.js +28 -0
  36. package/dist/assets/icons/components/ClockAlert.d.ts +3 -0
  37. package/dist/assets/icons/components/ClockAlert.js +28 -0
  38. package/dist/assets/icons/components/ClockOutline.d.ts +3 -0
  39. package/dist/assets/icons/components/ClockOutline.js +28 -0
  40. package/dist/assets/icons/components/Close.d.ts +3 -0
  41. package/dist/assets/icons/components/Close.js +28 -0
  42. package/dist/assets/icons/components/Cloud.d.ts +3 -0
  43. package/dist/assets/icons/components/Cloud.js +22 -0
  44. package/dist/assets/icons/components/CloudLockOutline.d.ts +3 -0
  45. package/dist/assets/icons/components/CloudLockOutline.js +28 -0
  46. package/dist/assets/icons/components/Clusters.d.ts +3 -0
  47. package/dist/assets/icons/components/Clusters.js +44 -0
  48. package/dist/assets/icons/components/CogOutline.d.ts +3 -0
  49. package/dist/assets/icons/components/CogOutline.js +28 -0
  50. package/dist/assets/icons/components/Copy.d.ts +3 -0
  51. package/dist/assets/icons/components/Copy.js +28 -0
  52. package/dist/assets/icons/components/Cpu.d.ts +3 -0
  53. package/dist/assets/icons/components/Cpu.js +41 -0
  54. package/dist/assets/icons/components/Cube.d.ts +3 -0
  55. package/dist/assets/icons/components/Cube.js +28 -0
  56. package/dist/assets/icons/components/Datacenter.d.ts +3 -0
  57. package/dist/assets/icons/components/Datacenter.js +28 -0
  58. package/dist/assets/icons/components/Delete.d.ts +3 -0
  59. package/dist/assets/icons/components/Delete.js +28 -0
  60. package/dist/assets/icons/components/DollarSign.d.ts +3 -0
  61. package/dist/assets/icons/components/DollarSign.js +30 -0
  62. package/dist/assets/icons/components/Download.d.ts +3 -0
  63. package/dist/assets/icons/components/Download.js +28 -0
  64. package/dist/assets/icons/components/Edit.d.ts +3 -0
  65. package/dist/assets/icons/components/Edit.js +28 -0
  66. package/dist/assets/icons/components/Ellipses.d.ts +3 -0
  67. package/dist/assets/icons/components/Ellipses.js +28 -0
  68. package/dist/assets/icons/components/Environments.d.ts +3 -0
  69. package/dist/assets/icons/components/Environments.js +30 -0
  70. package/dist/assets/icons/components/Error.d.ts +3 -0
  71. package/dist/assets/icons/components/Error.js +28 -0
  72. package/dist/assets/icons/components/ErrorOutline.d.ts +3 -0
  73. package/dist/assets/icons/components/ErrorOutline.js +28 -0
  74. package/dist/assets/icons/components/Exclamation.d.ts +3 -0
  75. package/dist/assets/icons/components/Exclamation.js +28 -0
  76. package/dist/assets/icons/components/Git.d.ts +3 -0
  77. package/dist/assets/icons/components/Git.js +28 -0
  78. package/dist/assets/icons/components/GitOpsCatalog.d.ts +3 -0
  79. package/dist/assets/icons/components/GitOpsCatalog.js +41 -0
  80. package/dist/assets/icons/components/GridView.d.ts +3 -0
  81. package/dist/assets/icons/components/GridView.js +22 -0
  82. package/dist/assets/icons/components/Help.d.ts +3 -0
  83. package/dist/assets/icons/components/Help.js +25 -0
  84. package/dist/assets/icons/components/HideOutline.d.ts +3 -0
  85. package/dist/assets/icons/components/HideOutline.js +37 -0
  86. package/dist/assets/icons/components/Home.d.ts +3 -0
  87. package/dist/assets/icons/components/Home.js +28 -0
  88. package/dist/assets/icons/components/Id.d.ts +3 -0
  89. package/dist/assets/icons/components/Id.js +28 -0
  90. package/dist/assets/icons/components/InformationOutline.d.ts +3 -0
  91. package/dist/assets/icons/components/InformationOutline.js +28 -0
  92. package/dist/assets/icons/components/InvoiceList.d.ts +3 -0
  93. package/dist/assets/icons/components/InvoiceList.js +28 -0
  94. package/dist/assets/icons/components/Key.d.ts +3 -0
  95. package/dist/assets/icons/components/Key.js +28 -0
  96. package/dist/assets/icons/components/LightBulb.d.ts +3 -0
  97. package/dist/assets/icons/components/LightBulb.js +43 -0
  98. package/dist/assets/icons/components/Loader.d.ts +3 -0
  99. package/dist/assets/icons/components/Loader.js +28 -0
  100. package/dist/assets/icons/components/Network.d.ts +3 -0
  101. package/dist/assets/icons/components/Network.js +28 -0
  102. package/dist/assets/icons/components/PagesStack.d.ts +3 -0
  103. package/dist/assets/icons/components/PagesStack.js +25 -0
  104. package/dist/assets/icons/components/Pageview.d.ts +3 -0
  105. package/dist/assets/icons/components/Pageview.js +28 -0
  106. package/dist/assets/icons/components/People.d.ts +3 -0
  107. package/dist/assets/icons/components/People.js +28 -0
  108. package/dist/assets/icons/components/PhotoLibrary.d.ts +3 -0
  109. package/dist/assets/icons/components/PhotoLibrary.js +28 -0
  110. package/dist/assets/icons/components/Pipeline.d.ts +3 -0
  111. package/dist/assets/icons/components/Pipeline.js +30 -0
  112. package/dist/assets/icons/components/Plus.d.ts +3 -0
  113. package/dist/assets/icons/components/Plus.js +28 -0
  114. package/dist/assets/icons/components/PowerSettings.d.ts +3 -0
  115. package/dist/assets/icons/components/PowerSettings.js +28 -0
  116. package/dist/assets/icons/components/Preview.d.ts +3 -0
  117. package/dist/assets/icons/components/Preview.js +28 -0
  118. package/dist/assets/icons/components/ReceiptLong.d.ts +3 -0
  119. package/dist/assets/icons/components/ReceiptLong.js +22 -0
  120. package/dist/assets/icons/components/Refresh.d.ts +3 -0
  121. package/dist/assets/icons/components/Refresh.js +28 -0
  122. package/dist/assets/icons/components/ScatterPlot.d.ts +3 -0
  123. package/dist/assets/icons/components/ScatterPlot.js +22 -0
  124. package/dist/assets/icons/components/Search.d.ts +3 -0
  125. package/dist/assets/icons/components/Search.js +29 -23
  126. package/dist/assets/icons/components/Server.d.ts +3 -0
  127. package/dist/assets/icons/components/Server.js +28 -0
  128. package/dist/assets/icons/components/Start.d.ts +3 -0
  129. package/dist/assets/icons/components/Start.js +28 -0
  130. package/dist/assets/icons/components/TabNew.d.ts +3 -0
  131. package/dist/assets/icons/components/TabNew.js +50 -0
  132. package/dist/assets/icons/components/Teams.d.ts +3 -0
  133. package/dist/assets/icons/components/Teams.js +28 -0
  134. package/dist/assets/icons/components/Warning.d.ts +3 -0
  135. package/dist/assets/icons/components/Warning.js +24 -18
  136. package/dist/assets/icons/components/X.d.ts +3 -0
  137. package/dist/assets/icons/components/X.js +28 -0
  138. package/dist/assets/icons/components/index.d.ts +67 -0
  139. package/dist/assets/icons/components/index.js +132 -4
  140. package/dist/assets/icons/components/types.d.ts +5 -0
  141. package/dist/assets/icons/components/types.js +0 -0
  142. package/dist/assets/icons/index.d.ts +1 -0
  143. package/dist/assets/icons/index.js +134 -0
  144. package/dist/chevron-down-BBFYYzZq.js +5 -0
  145. package/dist/chevron-left-BHBf-gQY.js +5 -0
  146. package/dist/chevron-right-DvXGOiS_.js +5 -0
  147. package/dist/chevron-up-DEfvgPCw.js +54 -0
  148. package/dist/chevron-up-IlDPxR7j.js +5 -0
  149. package/dist/components/Alert/Alert.d.ts +32 -0
  150. package/dist/components/Alert/Alert.js +2 -2
  151. package/dist/components/Alert/Alert.types.d.ts +26 -0
  152. package/dist/components/Alert/Alert.variants.d.ts +7 -0
  153. package/dist/components/AlertDialog/AlertDialog.d.ts +32 -0
  154. package/dist/components/AlertDialog/AlertDialog.js +100 -53
  155. package/dist/components/AlertDialog/AlertDialog.types.d.ts +58 -0
  156. package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +2 -0
  157. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +3 -2
  158. package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +10 -0
  159. package/dist/components/AlertDialog/components/index.d.ts +1 -0
  160. package/dist/components/AlertDialog/components/index.js +1 -1
  161. package/dist/components/AlertDialog/hooks/index.d.ts +1 -0
  162. package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +7 -0
  163. package/dist/components/Autocomplete/Autocomplete.d.ts +31 -0
  164. package/dist/components/Autocomplete/Autocomplete.js +38 -37
  165. package/dist/components/Autocomplete/Autocomplete.types.d.ts +50 -0
  166. package/dist/components/Autocomplete/Autocomplete.variants.d.ts +2 -0
  167. package/dist/components/Autocomplete/Autocomplete.variants.js +1 -6
  168. package/dist/components/Autocomplete/components/List/List.d.ts +3 -0
  169. package/dist/components/Autocomplete/components/List/List.types.d.ts +13 -0
  170. package/dist/components/Autocomplete/components/List/List.variants.d.ts +4 -0
  171. package/dist/components/Autocomplete/components/index.d.ts +1 -0
  172. package/dist/components/Autocomplete/hooks/index.d.ts +2 -0
  173. package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +17 -0
  174. package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +10 -0
  175. package/dist/components/Badge/Badge.d.ts +34 -0
  176. package/dist/components/Badge/Badge.js +48 -45
  177. package/dist/components/Badge/Badge.types.d.ts +34 -0
  178. package/dist/components/Badge/Badge.variants.d.ts +8 -0
  179. package/dist/components/Badge/Badge.variants.js +52 -13
  180. package/dist/components/Breadcrumb/Breadcrumb.d.ts +29 -0
  181. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  182. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +41 -0
  183. package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +2 -0
  184. package/dist/components/Breadcrumb/Breadcrumb.variants.js +3 -3
  185. package/dist/components/Breadcrumb/components/Item/Item.d.ts +3 -0
  186. package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
  187. package/dist/components/Breadcrumb/components/Item/Item.types.d.ts +6 -0
  188. package/dist/components/Breadcrumb/components/Item/Item.variants.d.ts +6 -0
  189. package/dist/components/Breadcrumb/components/Item/Item.variants.js +25 -14
  190. package/dist/components/Breadcrumb/components/index.d.ts +1 -0
  191. package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +3 -0
  192. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  193. package/dist/components/Button/Button.d.ts +33 -0
  194. package/dist/components/Button/Button.js +1 -1
  195. package/dist/components/Button/Button.types.d.ts +24 -0
  196. package/dist/components/Button/Button.variants.d.ts +8 -0
  197. package/dist/components/Button/Button.variants.js +115 -99
  198. package/dist/components/ButtonGroup/ButtonGroup.d.ts +34 -0
  199. package/dist/components/ButtonGroup/ButtonGroup.js +142 -0
  200. package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +100 -0
  201. package/dist/components/ButtonGroup/ButtonGroup.variants.d.ts +14 -0
  202. package/dist/components/ButtonGroup/ButtonGroup.variants.js +39 -0
  203. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.d.ts +3 -0
  204. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +116 -0
  205. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +23 -0
  206. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +27 -0
  207. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +111 -0
  208. package/dist/components/ButtonGroup/components/ButtonGroupItem/index.d.ts +2 -0
  209. package/dist/components/ButtonGroup/components/ButtonGroupItem/index.js +4 -0
  210. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.d.ts +3 -0
  211. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +45 -0
  212. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.types.d.ts +8 -0
  213. package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.d.ts +2 -0
  214. package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.js +4 -0
  215. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.d.ts +3 -0
  216. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +37 -0
  217. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.types.d.ts +6 -0
  218. package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.d.ts +2 -0
  219. package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.js +4 -0
  220. package/dist/components/ButtonGroup/components/index.d.ts +3 -0
  221. package/dist/components/ButtonGroup/components/index.js +8 -0
  222. package/dist/components/ButtonGroup/hooks/index.d.ts +2 -0
  223. package/dist/components/ButtonGroup/hooks/index.js +4 -0
  224. package/dist/components/ButtonGroup/hooks/useButtonGroup.d.ts +3 -0
  225. package/dist/components/ButtonGroup/hooks/useButtonGroup.js +67 -0
  226. package/dist/components/ButtonGroup/hooks/useButtonGroup.types.d.ts +18 -0
  227. package/dist/components/Card/Card.d.ts +28 -0
  228. package/dist/components/Card/Card.types.d.ts +24 -0
  229. package/dist/components/Card/Card.variants.d.ts +8 -0
  230. package/dist/components/Card/Card.variants.js +7 -12
  231. package/dist/components/Checkbox/Checkbox.d.ts +26 -0
  232. package/dist/components/Checkbox/Checkbox.js +189 -178
  233. package/dist/components/Checkbox/Checkbox.types.d.ts +38 -0
  234. package/dist/components/Checkbox/Checkbox.variants.d.ts +5 -0
  235. package/dist/components/Checkbox/Checkbox.variants.js +34 -7
  236. package/dist/components/Command/Command.d.ts +27 -0
  237. package/dist/components/Command/Command.js +2 -2
  238. package/dist/components/Command/Command.types.d.ts +31 -0
  239. package/dist/components/Command/Command.variants.d.ts +3 -0
  240. package/dist/components/Command/components/Command.d.ts +18 -0
  241. package/dist/components/Command/components/Command.js +1 -1
  242. package/dist/components/Command/components/CommandEmpty.d.ts +8 -0
  243. package/dist/components/Command/components/CommandEmpty.js +1 -1
  244. package/dist/components/Command/components/CommandGroup.d.ts +12 -0
  245. package/dist/components/Command/components/CommandGroup.js +1 -1
  246. package/dist/components/Command/components/CommandInput.d.ts +9 -0
  247. package/dist/components/Command/components/CommandInput.js +2 -2
  248. package/dist/components/Command/components/CommandItem.d.ts +14 -0
  249. package/dist/components/Command/components/CommandItem.js +1 -1
  250. package/dist/components/Command/components/CommandList.d.ts +10 -0
  251. package/dist/components/Command/components/CommandList.js +1 -1
  252. package/dist/components/Command/components/CommandSeparator.d.ts +8 -0
  253. package/dist/components/Command/components/CommandSeparator.js +1 -1
  254. package/dist/components/Command/components/CommandShortcut.d.ts +6 -0
  255. package/dist/components/Command/components/DialogContent.d.ts +2 -0
  256. package/dist/components/Command/components/DialogContent.js +2 -2
  257. package/dist/components/Command/components/DialogOverlay.d.ts +2 -0
  258. package/dist/components/Command/components/DialogOverlay.js +1 -1
  259. package/dist/components/Command/components/index.d.ts +9 -0
  260. package/dist/components/Command/contexts/Command.context.d.ts +2 -0
  261. package/dist/components/Command/contexts/Command.provider.d.ts +2 -0
  262. package/dist/components/Command/contexts/Command.types.d.ts +5 -0
  263. package/dist/components/Command/contexts/index.d.ts +3 -0
  264. package/dist/components/Counter/Counter.d.ts +36 -0
  265. package/dist/components/Counter/Counter.js +211 -0
  266. package/dist/components/Counter/Counter.types.d.ts +53 -0
  267. package/dist/components/Counter/Counter.variants.d.ts +7 -0
  268. package/dist/components/Counter/Counter.variants.js +70 -0
  269. package/dist/components/DateRangePicker/DateRangePicker.d.ts +31 -0
  270. package/dist/components/DateRangePicker/DateRangePicker.js +164 -0
  271. package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +125 -0
  272. package/dist/components/DateRangePicker/DateRangePicker.variants.d.ts +2 -0
  273. package/dist/components/DateRangePicker/DateRangePicker.variants.js +25 -0
  274. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.d.ts +3 -0
  275. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +120 -0
  276. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.types.d.ts +79 -0
  277. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.d.ts +8 -0
  278. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.js +56 -0
  279. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.d.ts +3 -0
  280. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +22 -0
  281. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.types.d.ts +3 -0
  282. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.d.ts +3 -0
  283. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +60 -0
  284. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.types.d.ts +17 -0
  285. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.d.ts +3 -0
  286. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +308 -0
  287. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.types.d.ts +34 -0
  288. package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.d.ts +3 -0
  289. package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +41 -0
  290. package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.types.d.ts +12 -0
  291. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.d.ts +3 -0
  292. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +136 -0
  293. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.types.d.ts +26 -0
  294. package/dist/components/DateRangePicker/components/CalendarPanel/components/index.d.ts +5 -0
  295. package/dist/components/DateRangePicker/components/CalendarPanel/components/index.js +12 -0
  296. package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.d.ts +22 -0
  297. package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +5 -0
  298. package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.d.ts +8 -0
  299. package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +149 -0
  300. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.d.ts +4 -0
  301. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +21 -0
  302. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.d.ts +24 -0
  303. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +142 -0
  304. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.d.ts +22 -0
  305. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +93 -0
  306. package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.d.ts +16 -0
  307. package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +11 -0
  308. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.d.ts +3 -0
  309. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +107 -0
  310. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.types.d.ts +37 -0
  311. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.d.ts +5 -0
  312. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.js +30 -0
  313. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.d.ts +3 -0
  314. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +92 -0
  315. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.types.d.ts +23 -0
  316. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.d.ts +3 -0
  317. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +92 -0
  318. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.types.d.ts +23 -0
  319. package/dist/components/DateRangePicker/components/DateTimeInputs/components/index.d.ts +2 -0
  320. package/dist/components/DateRangePicker/components/DateTimeInputs/components/index.js +6 -0
  321. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/index.d.ts +1 -0
  322. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/index.js +4 -0
  323. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.d.ts +29 -0
  324. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +186 -0
  325. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.d.ts +3 -0
  326. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +71 -0
  327. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.types.d.ts +31 -0
  328. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.d.ts +2 -0
  329. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.js +24 -0
  330. package/dist/components/DateRangePicker/components/index.d.ts +3 -0
  331. package/dist/components/DateRangePicker/components/index.js +8 -0
  332. package/dist/components/DateRangePicker/constants/index.d.ts +1 -0
  333. package/dist/components/DateRangePicker/constants/index.js +4 -0
  334. package/dist/components/DateRangePicker/constants/presets.d.ts +6 -0
  335. package/dist/components/DateRangePicker/constants/presets.js +10 -0
  336. package/dist/components/DateRangePicker/contexts/date-range-picker.context.d.ts +81 -0
  337. package/dist/components/DateRangePicker/contexts/date-range-picker.context.js +5 -0
  338. package/dist/components/DateRangePicker/contexts/date-range-picker.hook.d.ts +1 -0
  339. package/dist/components/DateRangePicker/contexts/date-range-picker.hook.js +13 -0
  340. package/dist/components/DateRangePicker/contexts/date-range-picker.provider.d.ts +24 -0
  341. package/dist/components/DateRangePicker/contexts/date-range-picker.provider.js +176 -0
  342. package/dist/components/DateRangePicker/contexts/index.d.ts +4 -0
  343. package/dist/components/DateRangePicker/contexts/index.js +8 -0
  344. package/dist/components/DateRangePicker/utils/disabled-dates.d.ts +26 -0
  345. package/dist/components/DateRangePicker/utils/disabled-dates.js +47 -0
  346. package/dist/components/DateRangePicker/utils/index.d.ts +6 -0
  347. package/dist/components/DateRangePicker/utils/index.js +22 -0
  348. package/dist/components/DateRangePicker/utils/presets.d.ts +5 -0
  349. package/dist/components/DateRangePicker/utils/presets.js +36 -0
  350. package/dist/components/DateRangePicker/utils/validation.d.ts +43 -0
  351. package/dist/components/DateRangePicker/utils/validation.js +79 -0
  352. package/dist/components/Datepicker/DatePicker.d.ts +26 -0
  353. package/dist/components/Datepicker/DatePicker.js +118 -2670
  354. package/dist/components/Datepicker/DatePicker.types.d.ts +29 -0
  355. package/dist/components/Datepicker/DatePicker.variants.d.ts +1 -0
  356. package/dist/components/Divider/Divider.d.ts +17 -0
  357. package/dist/components/Divider/Divider.variants.d.ts +3 -0
  358. package/dist/components/Divider/Divider.variants.js +1 -1
  359. package/dist/components/Drawer/Drawer.d.ts +36 -0
  360. package/dist/components/Drawer/Drawer.js +134 -0
  361. package/dist/components/Drawer/Drawer.types.d.ts +65 -0
  362. package/dist/components/Drawer/Drawer.variants.d.ts +8 -0
  363. package/dist/components/Drawer/Drawer.variants.js +92 -0
  364. package/dist/components/Drawer/components/Body/Body.d.ts +3 -0
  365. package/dist/components/Drawer/components/Body/Body.js +24 -0
  366. package/dist/components/Drawer/components/Body/Body.types.d.ts +7 -0
  367. package/dist/components/Drawer/components/Body/index.d.ts +2 -0
  368. package/dist/components/Drawer/components/Body/index.js +4 -0
  369. package/dist/components/Drawer/components/Footer/Footer.d.ts +3 -0
  370. package/dist/components/Drawer/components/Footer/Footer.js +26 -0
  371. package/dist/components/Drawer/components/Footer/Footer.types.d.ts +7 -0
  372. package/dist/components/Drawer/components/Footer/index.d.ts +2 -0
  373. package/dist/components/Drawer/components/Footer/index.js +4 -0
  374. package/dist/components/Drawer/components/Header/Header.d.ts +3 -0
  375. package/dist/components/Drawer/components/Header/Header.js +27 -0
  376. package/dist/components/Drawer/components/Header/Header.types.d.ts +9 -0
  377. package/dist/components/Drawer/components/Header/index.d.ts +2 -0
  378. package/dist/components/Drawer/components/Header/index.js +4 -0
  379. package/dist/components/Drawer/components/index.d.ts +3 -0
  380. package/dist/components/Drawer/components/index.js +8 -0
  381. package/dist/components/Drawer/constants/index.d.ts +6 -0
  382. package/dist/components/Drawer/constants/index.js +9 -0
  383. package/dist/components/Drawer/contexts/Drawer.context.d.ts +7 -0
  384. package/dist/components/Drawer/contexts/Drawer.context.js +6 -0
  385. package/dist/components/Drawer/contexts/index.d.ts +2 -0
  386. package/dist/components/Drawer/contexts/index.js +5 -0
  387. package/dist/components/Drawer/hooks/index.d.ts +2 -0
  388. package/dist/components/Drawer/hooks/index.js +4 -0
  389. package/dist/components/Drawer/hooks/useDrawer.d.ts +2 -0
  390. package/dist/components/Drawer/hooks/useDrawer.js +66 -0
  391. package/dist/components/Drawer/hooks/useDrawer.types.d.ts +30 -0
  392. package/dist/components/DropdownButton/DropdownButton.d.ts +20 -0
  393. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  394. package/dist/components/DropdownButton/DropdownButton.types.d.ts +36 -0
  395. package/dist/components/Filter/Filter.d.ts +26 -0
  396. package/dist/components/Filter/Filter.js +18 -12
  397. package/dist/components/Filter/Filter.types.d.ts +54 -0
  398. package/dist/components/Filter/Filter.variants.d.ts +3 -0
  399. package/dist/components/Filter/Filter.variants.js +8 -7
  400. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.d.ts +3 -0
  401. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +12 -0
  402. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +72 -45
  403. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.types.d.ts +11 -0
  404. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.d.ts +3 -0
  405. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.d.ts +12 -0
  406. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +32 -30
  407. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +81 -47
  408. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.types.d.ts +7 -0
  409. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.d.ts +3 -0
  410. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.d.ts +13 -0
  411. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +84 -0
  412. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +121 -0
  413. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.types.d.ts +25 -0
  414. package/dist/components/Filter/components/ResetButton/ResetButton.d.ts +3 -0
  415. package/dist/components/Filter/components/ResetButton/ResetButton.js +15 -12
  416. package/dist/components/Filter/components/ResetButton/ResetButton.types.d.ts +5 -0
  417. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.d.ts +3 -0
  418. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +122 -0
  419. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.types.d.ts +7 -0
  420. package/dist/components/Filter/components/index.d.ts +10 -0
  421. package/dist/components/Filter/components/index.js +6 -2
  422. package/dist/components/Filter/events/index.d.ts +6 -0
  423. package/dist/components/Filter/events/index.js +3 -3
  424. package/dist/components/Filter/utils/index.d.ts +1 -0
  425. package/dist/components/Filter/utils/index.js +2437 -0
  426. package/dist/components/ImageUpload/ImageUpload.d.ts +25 -0
  427. package/dist/components/ImageUpload/ImageUpload.js +223 -0
  428. package/dist/components/ImageUpload/ImageUpload.types.d.ts +69 -0
  429. package/dist/components/ImageUpload/ImageUpload.variants.d.ts +13 -0
  430. package/dist/components/ImageUpload/ImageUpload.variants.js +109 -0
  431. package/dist/components/Input/Input.d.ts +35 -0
  432. package/dist/components/Input/Input.js +203 -122
  433. package/dist/components/Input/Input.types.d.ts +36 -0
  434. package/dist/components/Input/Input.variants.d.ts +3 -0
  435. package/dist/components/Input/Input.variants.js +24 -19
  436. package/dist/components/Loading/Loading.d.ts +24 -0
  437. package/dist/components/Loading/Loading.js +1 -7
  438. package/dist/components/Loading/Loading.types.d.ts +17 -0
  439. package/dist/components/Loading/Loading.variants.d.ts +1 -0
  440. package/dist/components/Modal/Modal.d.ts +34 -0
  441. package/dist/components/Modal/Modal.js +1 -1
  442. package/dist/components/Modal/Modal.types.d.ts +50 -0
  443. package/dist/components/Modal/components/Body/Body.d.ts +3 -0
  444. package/dist/components/Modal/components/Body/Body.js +1 -1
  445. package/dist/components/Modal/components/Body/Body.types.d.ts +5 -0
  446. package/dist/components/Modal/components/Footer/Footer.d.ts +3 -0
  447. package/dist/components/Modal/components/Footer/Footer.js +10 -4
  448. package/dist/components/Modal/components/Footer/Footer.types.d.ts +5 -0
  449. package/dist/components/Modal/components/Header/Header.d.ts +3 -0
  450. package/dist/components/Modal/components/Header/Header.js +11 -5
  451. package/dist/components/Modal/components/Header/Header.types.d.ts +5 -0
  452. package/dist/components/Modal/components/Wrapper/Wrapper.d.ts +3 -0
  453. package/dist/components/Modal/components/Wrapper/Wrapper.js +6 -5
  454. package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +14 -0
  455. package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +2 -0
  456. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +15 -12
  457. package/dist/components/Modal/components/index.d.ts +4 -0
  458. package/dist/components/Modal/components/index.js +1 -1
  459. package/dist/components/Modal/contexts/Modal.context.d.ts +2 -0
  460. package/dist/components/Modal/contexts/Modal.provider.d.ts +4 -0
  461. package/dist/components/Modal/contexts/Modal.types.d.ts +9 -0
  462. package/dist/components/Modal/contexts/index.d.ts +1 -0
  463. package/dist/components/Modal/hooks/index.d.ts +1 -0
  464. package/dist/components/Modal/hooks/useModal.d.ts +9 -0
  465. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +23 -0
  466. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +34 -0
  467. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +76 -0
  468. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.d.ts +3 -0
  469. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +31 -0
  470. package/dist/components/MultiSelectDropdown/components/Item/Item.d.ts +3 -0
  471. package/dist/components/MultiSelectDropdown/components/Item/Item.js +30 -0
  472. package/dist/components/MultiSelectDropdown/components/Item/Item.types.d.ts +8 -0
  473. package/dist/components/MultiSelectDropdown/components/Item/Item.variants.d.ts +3 -0
  474. package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +38 -0
  475. package/dist/components/MultiSelectDropdown/components/List/List.d.ts +3 -0
  476. package/dist/components/MultiSelectDropdown/components/List/List.js +30 -0
  477. package/dist/components/MultiSelectDropdown/components/List/List.types.d.ts +4 -0
  478. package/dist/components/MultiSelectDropdown/components/List/List.variants.d.ts +1 -0
  479. package/dist/components/MultiSelectDropdown/components/List/List.variants.js +25 -0
  480. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.d.ts +3 -0
  481. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +126 -0
  482. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +7 -0
  483. package/dist/components/MultiSelectDropdown/components/index.d.ts +3 -0
  484. package/dist/components/MultiSelectDropdown/components/index.js +8 -0
  485. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.d.ts +2 -0
  486. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +21 -0
  487. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.d.ts +1 -0
  488. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +13 -0
  489. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.d.ts +3 -0
  490. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +138 -0
  491. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.types.d.ts +31 -0
  492. package/dist/components/MultiSelectDropdown/contexts/index.d.ts +2 -0
  493. package/dist/components/MultiSelectDropdown/contexts/index.js +6 -0
  494. package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.d.ts +4 -0
  495. package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +32 -0
  496. package/dist/components/PhoneNumberInput/PhoneNumberInput.d.ts +21 -0
  497. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +8 -0
  498. package/dist/components/PhoneNumberInput/PhoneNumberInput.types.d.ts +51 -0
  499. package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.d.ts +4 -0
  500. package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +46 -0
  501. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.d.ts +2 -0
  502. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +36 -0
  503. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.d.ts +3 -0
  504. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +691 -0
  505. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.types.d.ts +5 -0
  506. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.d.ts +3 -0
  507. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +60 -0
  508. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.types.d.ts +8 -0
  509. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.d.ts +3 -0
  510. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +45 -0
  511. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.types.d.ts +4 -0
  512. package/dist/components/PhoneNumberInput/components/Wrapper.d.ts +3 -0
  513. package/dist/components/PhoneNumberInput/components/Wrapper.js +652 -0
  514. package/dist/components/PhoneNumberInput/components/index.d.ts +2 -0
  515. package/dist/components/PhoneNumberInput/components/index.js +6 -0
  516. package/dist/components/PhoneNumberInput/contexts/index.d.ts +3 -0
  517. package/dist/components/PhoneNumberInput/contexts/index.js +8 -0
  518. package/dist/components/PhoneNumberInput/contexts/phone-number.context.d.ts +20 -0
  519. package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +28 -0
  520. package/dist/components/PhoneNumberInput/contexts/phone-number.hook.d.ts +2 -0
  521. package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +13 -0
  522. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.d.ts +6 -0
  523. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +6066 -0
  524. package/dist/components/PhoneNumberInput/utils/index.d.ts +2 -0
  525. package/dist/components/PhoneNumberInput/utils/index.js +11 -0
  526. package/dist/components/PieChart/PieChart.d.ts +20 -0
  527. package/dist/components/PieChart/PieChart.js +463 -482
  528. package/dist/components/PieChart/PieChart.types.d.ts +90 -0
  529. package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
  530. package/dist/components/ProgressBar/ProgressBar.js +38 -59
  531. package/dist/components/ProgressBar/ProgressBar.types.d.ts +20 -0
  532. package/dist/components/ProgressBar/ProgressBar.variants.d.ts +4 -0
  533. package/dist/components/ProgressBar/ProgressBar.variants.js +23 -24
  534. package/dist/components/Radio/Radio.d.ts +22 -0
  535. package/dist/components/Radio/Radio.js +47 -44
  536. package/dist/components/Radio/Radio.types.d.ts +44 -0
  537. package/dist/components/Radio/Radio.variants.d.ts +8 -0
  538. package/dist/components/Radio/Radio.variants.js +12 -8
  539. package/dist/components/RadioCard/RadioCard.d.ts +22 -0
  540. package/dist/components/RadioCard/RadioCard.types.d.ts +23 -0
  541. package/dist/components/RadioCard/RadioCard.variants.d.ts +1 -0
  542. package/dist/components/RadioCard/RadioCard.variants.js +1 -6
  543. package/dist/components/RadioCardGroup/RadioCardGroup.d.ts +23 -0
  544. package/dist/components/RadioCardGroup/RadioCardGroup.types.d.ts +30 -0
  545. package/dist/components/RadioCardGroup/RadioCardGroup.variants.d.ts +3 -0
  546. package/dist/components/RadioGroup/RadioGroup.d.ts +34 -0
  547. package/dist/components/RadioGroup/RadioGroup.js +34 -33
  548. package/dist/components/RadioGroup/RadioGroup.types.d.ts +44 -0
  549. package/dist/components/RadioGroup/RadioGroup.variants.d.ts +3 -0
  550. package/dist/components/Range/Range.d.ts +21 -0
  551. package/dist/components/Range/Range.js +26 -24
  552. package/dist/components/Range/Range.types.d.ts +42 -0
  553. package/dist/components/Range/Range.variants.d.ts +8 -0
  554. package/dist/components/Select/Select.d.ts +37 -0
  555. package/dist/components/Select/Select.js +71 -0
  556. package/dist/components/Select/Select.types.d.ts +137 -0
  557. package/dist/components/Select/Select.variants.d.ts +6 -0
  558. package/dist/components/{Dropdown/Dropdown.variants.js → Select/Select.variants.js} +20 -14
  559. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.d.ts +3 -0
  560. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +11 -0
  561. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.types.d.ts +4 -0
  562. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.d.ts +1 -0
  563. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +26 -0
  564. package/dist/components/Select/components/EmptyList.d.ts +2 -0
  565. package/dist/components/Select/components/List/List.d.ts +3 -0
  566. package/dist/components/Select/components/List/List.js +181 -0
  567. package/dist/components/Select/components/List/List.types.d.ts +15 -0
  568. package/dist/components/Select/components/List/List.variants.d.ts +2 -0
  569. package/dist/components/Select/components/List/List.variants.js +46 -0
  570. package/dist/components/Select/components/ListItem/ListItem.d.ts +3 -0
  571. package/dist/components/Select/components/ListItem/ListItem.js +117 -0
  572. package/dist/components/Select/components/ListItem/ListItem.types.d.ts +9 -0
  573. package/dist/components/Select/components/ListItem/ListItem.variants.d.ts +1 -0
  574. package/dist/components/{Dropdown → Select}/components/ListItem/ListItem.variants.js +5 -4
  575. package/dist/components/Select/components/Wrapper.d.ts +5 -0
  576. package/dist/components/Select/components/Wrapper.js +248 -0
  577. package/dist/components/Select/components/index.d.ts +4 -0
  578. package/dist/components/Select/components/index.js +10 -0
  579. package/dist/components/Select/constants/index.d.ts +1 -0
  580. package/dist/components/Select/constants/index.js +4 -0
  581. package/dist/components/Select/constants/pagination.d.ts +1 -0
  582. package/dist/components/Select/constants/pagination.js +4 -0
  583. package/dist/components/Select/contexts/index.d.ts +2 -0
  584. package/dist/components/Select/contexts/index.js +6 -0
  585. package/dist/components/Select/contexts/select.context.d.ts +21 -0
  586. package/dist/components/Select/contexts/select.context.js +36 -0
  587. package/dist/components/Select/contexts/select.hook.d.ts +2 -0
  588. package/dist/components/Select/contexts/select.hook.js +11 -0
  589. package/dist/components/Select/contexts/select.provider.d.ts +10 -0
  590. package/dist/components/Select/contexts/select.provider.js +58 -0
  591. package/dist/components/Select/hooks/useNavigationList.d.ts +11 -0
  592. package/dist/components/Select/hooks/useNavigationList.js +50 -0
  593. package/dist/components/Select/hooks/useSelect.d.ts +15 -0
  594. package/dist/components/Select/hooks/useSelect.js +103 -0
  595. package/dist/components/Sidebar/Sidebar.d.ts +28 -0
  596. package/dist/components/Sidebar/Sidebar.types.d.ts +54 -0
  597. package/dist/components/Sidebar/Sidebar.variants.d.ts +2 -0
  598. package/dist/components/Sidebar/Sidebar.variants.js +2 -2
  599. package/dist/components/Sidebar/components/Footer/Footer.d.ts +4 -0
  600. package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +6 -0
  601. package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +1 -0
  602. package/dist/components/Sidebar/components/Logo/Logo.d.ts +4 -0
  603. package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +6 -0
  604. package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +1 -0
  605. package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +4 -0
  606. package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +16 -0
  607. package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +1 -0
  608. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +4 -0
  609. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +8 -0
  610. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +1 -0
  611. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +4 -0
  612. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +17 -0
  613. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +3 -0
  614. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +4 -0
  615. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +5 -0
  616. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +1 -0
  617. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +4 -0
  618. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +8 -0
  619. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +1 -0
  620. package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +4 -0
  621. package/dist/components/Sidebar/components/index.d.ts +15 -0
  622. package/dist/components/Slider/Slider.d.ts +21 -0
  623. package/dist/components/Slider/Slider.js +30 -20
  624. package/dist/components/Slider/Slider.types.d.ts +42 -0
  625. package/dist/components/Slider/Slider.variants.d.ts +7 -0
  626. package/dist/components/Spinner/Spinner.d.ts +4 -0
  627. package/dist/components/Spinner/Spinner.js +57 -0
  628. package/dist/components/Spinner/Spinner.types.d.ts +13 -0
  629. package/dist/components/Spinner/Spinner.variants.d.ts +6 -0
  630. package/dist/components/Spinner/Spinner.variants.js +54 -0
  631. package/dist/components/Stepper/Stepper.d.ts +51 -0
  632. package/dist/components/Stepper/Stepper.js +75 -0
  633. package/dist/components/Stepper/Stepper.types.d.ts +73 -0
  634. package/dist/components/Stepper/Stepper.variants.d.ts +40 -0
  635. package/dist/components/Stepper/Stepper.variants.js +278 -0
  636. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.d.ts +2 -0
  637. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +200 -0
  638. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.types.d.ts +1 -0
  639. package/dist/components/Stepper/components/StepConnector/StepConnector.d.ts +2 -0
  640. package/dist/components/Stepper/components/StepConnector/StepConnector.js +29 -0
  641. package/dist/components/Stepper/components/StepConnector/StepConnector.types.d.ts +13 -0
  642. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.d.ts +2 -0
  643. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +23 -0
  644. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.types.d.ts +13 -0
  645. package/dist/components/Stepper/components/StepItem/StepItem.d.ts +2 -0
  646. package/dist/components/Stepper/components/StepItem/StepItem.js +8 -0
  647. package/dist/components/Stepper/components/StepItem/StepItem.types.d.ts +32 -0
  648. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.d.ts +2 -0
  649. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +114 -0
  650. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.types.d.ts +1 -0
  651. package/dist/components/Stepper/constants/index.d.ts +3 -0
  652. package/dist/components/Stepper/constants/index.js +13 -0
  653. package/dist/components/Stepper/hooks/index.d.ts +1 -0
  654. package/dist/components/Stepper/hooks/index.js +4 -0
  655. package/dist/components/Stepper/hooks/useStepItemLogic.d.ts +2 -0
  656. package/dist/components/Stepper/hooks/useStepItemLogic.js +27 -0
  657. package/dist/components/Stepper/hooks/useStepItemLogic.types.d.ts +16 -0
  658. package/dist/components/Stepper/utils/index.d.ts +3 -0
  659. package/dist/components/Stepper/utils/index.js +13 -0
  660. package/dist/components/Switch/Switch.d.ts +29 -0
  661. package/dist/components/Switch/Switch.js +154 -125
  662. package/dist/components/Switch/Switch.types.d.ts +43 -0
  663. package/dist/components/Switch/Switch.variants.d.ts +2 -0
  664. package/dist/components/Switch/Switch.variants.js +19 -10
  665. package/dist/components/Table/Table.d.ts +38 -0
  666. package/dist/components/Table/Table.types.d.ts +57 -0
  667. package/dist/components/Table/Table.variants.d.ts +6 -0
  668. package/dist/components/Table/components/Body.d.ts +3 -0
  669. package/dist/components/Table/components/Filter.d.ts +3 -0
  670. package/dist/components/Table/components/Head.d.ts +3 -0
  671. package/dist/components/Table/components/Row.d.ts +3 -0
  672. package/dist/components/Table/components/index.d.ts +4 -0
  673. package/dist/components/Tabs/Tabs.d.ts +37 -0
  674. package/dist/components/Tabs/Tabs.js +1 -1
  675. package/dist/components/Tabs/Tabs.types.d.ts +42 -0
  676. package/dist/components/Tabs/Tabs.variants.d.ts +12 -0
  677. package/dist/components/Tabs/Tabs.variants.js +4 -3
  678. package/dist/components/Tabs/components/Content.d.ts +4 -0
  679. package/dist/components/Tabs/components/Content.js +1 -1
  680. package/dist/components/Tabs/components/List.d.ts +4 -0
  681. package/dist/components/Tabs/components/List.js +1 -1
  682. package/dist/components/Tabs/components/Trigger.d.ts +4 -0
  683. package/dist/components/Tabs/components/Trigger.js +1 -1
  684. package/dist/components/Tabs/components/index.d.ts +3 -0
  685. package/dist/components/Tag/Tag.d.ts +16 -0
  686. package/dist/components/Tag/Tag.js +1 -1
  687. package/dist/components/Tag/Tag.types.d.ts +33 -0
  688. package/dist/components/Tag/Tag.variants.d.ts +3 -0
  689. package/dist/components/Tag/Tag.variants.js +1 -0
  690. package/dist/components/TagSelect/TagSelect.d.ts +23 -0
  691. package/dist/components/TagSelect/TagSelect.types.d.ts +39 -0
  692. package/dist/components/TagSelect/TagSelect.variants.d.ts +3 -0
  693. package/dist/components/TagSelect/TagSelect.variants.js +2 -1
  694. package/dist/components/TagSelect/components/Item/Item.d.ts +3 -0
  695. package/dist/components/TagSelect/components/Item/Item.types.d.ts +6 -0
  696. package/dist/components/TagSelect/components/Item/Item.variants.d.ts +3 -0
  697. package/dist/components/TagSelect/components/List/List.d.ts +3 -0
  698. package/dist/components/TagSelect/components/List/List.types.d.ts +4 -0
  699. package/dist/components/TagSelect/components/List/List.variants.d.ts +1 -0
  700. package/dist/components/TagSelect/components/Wrapper/Wrapper.d.ts +3 -0
  701. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +51 -99
  702. package/dist/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +7 -0
  703. package/dist/components/TagSelect/components/index.d.ts +3 -0
  704. package/dist/components/TagSelect/contexts/TagSelect.context.d.ts +2 -0
  705. package/dist/components/TagSelect/contexts/TagSelect.hook.d.ts +1 -0
  706. package/dist/components/TagSelect/contexts/TagSelect.provider.d.ts +3 -0
  707. package/dist/components/TagSelect/contexts/TagSelect.types.d.ts +15 -0
  708. package/dist/components/TagSelect/contexts/index.d.ts +2 -0
  709. package/dist/components/TagSelect/hooks/useTagSelect.d.ts +4 -0
  710. package/dist/components/TextArea/TextArea.d.ts +24 -0
  711. package/dist/components/TextArea/TextArea.js +27 -26
  712. package/dist/components/TextArea/TextArea.types.d.ts +28 -0
  713. package/dist/components/TextArea/TextArea.variants.d.ts +1 -0
  714. package/dist/components/TimePicker/TimePicker.d.ts +21 -0
  715. package/dist/components/TimePicker/TimePicker.js +12 -5
  716. package/dist/components/TimePicker/TimePicker.types.d.ts +53 -0
  717. package/dist/components/TimePicker/TimePicker.variants.d.ts +4 -0
  718. package/dist/components/TimePicker/TimePicker.variants.js +32 -22
  719. package/dist/components/TimePicker/components/HoursList/HoursList.d.ts +4 -0
  720. package/dist/components/TimePicker/components/HoursList/HoursList.js +104 -67
  721. package/dist/components/TimePicker/components/HoursList/HoursList.types.d.ts +8 -0
  722. package/dist/components/TimePicker/components/MeridianList/MeridianList.d.ts +4 -0
  723. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +51 -27
  724. package/dist/components/TimePicker/components/MeridianList/MeridianList.types.d.ts +7 -0
  725. package/dist/components/TimePicker/components/MinutesList/MinutesList.d.ts +4 -0
  726. package/dist/components/TimePicker/components/MinutesList/MinutesList.js +82 -39
  727. package/dist/components/TimePicker/components/MinutesList/MinutesList.types.d.ts +9 -0
  728. package/dist/components/TimePicker/components/Wrapper/Wrapper.d.ts +3 -0
  729. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +199 -59
  730. package/dist/components/TimePicker/components/Wrapper/Wrapper.types.d.ts +6 -0
  731. package/dist/components/TimePicker/components/WrapperList/WrapperList.d.ts +3 -0
  732. package/dist/components/TimePicker/components/WrapperList/WrapperList.js +73 -46
  733. package/dist/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +9 -0
  734. package/dist/components/TimePicker/components/index.d.ts +1 -0
  735. package/dist/components/TimePicker/contexts/index.d.ts +3 -0
  736. package/dist/components/TimePicker/contexts/time-picker.context.d.ts +15 -0
  737. package/dist/components/TimePicker/contexts/time-picker.context.js +8 -1
  738. package/dist/components/TimePicker/contexts/time-picker.hook.d.ts +2 -0
  739. package/dist/components/TimePicker/contexts/time-picker.provider.d.ts +7 -0
  740. package/dist/components/TimePicker/contexts/time-picker.provider.js +51 -36
  741. package/dist/components/TimePicker/utils/index.d.ts +8 -0
  742. package/dist/components/TimePicker/utils/index.js +29 -4
  743. package/dist/components/Toast/Toast.d.ts +25 -0
  744. package/dist/components/Toast/Toast.js +262 -236
  745. package/dist/components/Toast/Toast.types.d.ts +46 -0
  746. package/dist/components/Toast/Toast.variants.d.ts +5 -0
  747. package/dist/components/Toast/Toast.variants.js +37 -24
  748. package/dist/components/Tooltip/Tooltip.d.ts +27 -0
  749. package/dist/components/Tooltip/Tooltip.js +15 -14
  750. package/dist/components/Tooltip/Tooltip.types.d.ts +28 -0
  751. package/dist/components/Tooltip/Tooltip.variants.d.ts +6 -0
  752. package/dist/components/Tooltip/Tooltip.variants.js +5 -4
  753. package/dist/components/Tooltip/hooks/useTooltip.d.ts +4 -0
  754. package/dist/components/Typography/Typography.d.ts +18 -0
  755. package/dist/components/Typography/Typography.js +23 -25
  756. package/dist/components/Typography/Typography.types.d.ts +29 -0
  757. package/dist/components/Typography/Typography.variants.d.ts +3 -0
  758. package/dist/components/Typography/Typography.variants.js +60 -52
  759. package/dist/components/VirtualizedTable/VirtualizedTable.d.ts +16 -0
  760. package/dist/components/VirtualizedTable/VirtualizedTable.js +137 -73
  761. package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +198 -0
  762. package/dist/components/VirtualizedTable/VirtualizedTable.variants.d.ts +1 -0
  763. package/dist/components/VirtualizedTable/assets/chevron-down.d.ts +6 -0
  764. package/dist/components/VirtualizedTable/assets/chevron-up.d.ts +6 -0
  765. package/dist/components/VirtualizedTable/assets/index.d.ts +3 -0
  766. package/dist/components/VirtualizedTable/components/Actions/Actions.d.ts +3 -0
  767. package/dist/components/VirtualizedTable/components/Actions/Actions.js +105 -33
  768. package/dist/components/VirtualizedTable/components/Actions/Actions.types.d.ts +24 -0
  769. package/dist/components/VirtualizedTable/components/Body/Body.d.ts +3 -0
  770. package/dist/components/VirtualizedTable/components/Body/Body.js +112 -21
  771. package/dist/components/VirtualizedTable/components/Body/Body.types.d.ts +5 -0
  772. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.d.ts +1 -0
  773. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +95 -91
  774. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.d.ts +3 -0
  775. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +20 -20
  776. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.types.d.ts +3 -0
  777. package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.d.ts +3 -0
  778. package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +51 -0
  779. package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.types.d.ts +10 -0
  780. package/dist/components/VirtualizedTable/components/Filter/Filter.d.ts +3 -0
  781. package/dist/components/VirtualizedTable/components/Filter/Filter.js +123 -54
  782. package/dist/components/VirtualizedTable/components/Filter/Filter.types.d.ts +18 -0
  783. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.d.ts +1 -0
  784. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +33 -21
  785. package/dist/components/VirtualizedTable/components/Header/Header.d.ts +3 -0
  786. package/dist/components/VirtualizedTable/components/Header/Header.js +61 -41
  787. package/dist/components/VirtualizedTable/components/Header/Header.types.d.ts +5 -0
  788. package/dist/components/VirtualizedTable/components/Pagination/Pagination.d.ts +3 -0
  789. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +43 -22
  790. package/dist/components/VirtualizedTable/components/Pagination/Pagination.types.d.ts +9 -0
  791. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.d.ts +2 -0
  792. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +106 -0
  793. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.types.d.ts +5 -0
  794. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +2 -0
  795. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +22 -1859
  796. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +5 -0
  797. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.d.ts +3 -0
  798. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
  799. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.types.d.ts +6 -0
  800. package/dist/components/VirtualizedTable/components/index.d.ts +7 -0
  801. package/dist/components/VirtualizedTable/components/index.js +8 -6
  802. package/dist/components/VirtualizedTable/constants/index.d.ts +1 -0
  803. package/dist/components/VirtualizedTable/constants/pagination.d.ts +2 -0
  804. package/dist/components/VirtualizedTable/contexts/index.d.ts +3 -0
  805. package/dist/components/VirtualizedTable/contexts/table.context.d.ts +42 -0
  806. package/dist/components/VirtualizedTable/contexts/table.context.js +7 -0
  807. package/dist/components/VirtualizedTable/contexts/table.hook.d.ts +3 -0
  808. package/dist/components/VirtualizedTable/contexts/table.provider.d.ts +3 -0
  809. package/dist/components/VirtualizedTable/contexts/table.provider.js +242 -65
  810. package/dist/components/VirtualizedTable/contexts/table.types.d.ts +29 -0
  811. package/dist/components/VirtualizedTable/events/index.d.ts +12 -0
  812. package/dist/components/VirtualizedTable/events/index.js +29 -0
  813. package/dist/components/index.d.ts +53 -0
  814. package/dist/components/index.js +132 -94
  815. package/dist/contexts/index.d.ts +3 -0
  816. package/dist/contexts/theme.context.d.ts +6 -0
  817. package/dist/contexts/theme.hook.d.ts +7 -0
  818. package/dist/contexts/theme.provider.d.ts +38 -0
  819. package/dist/contexts/theme.provider.js +0 -1
  820. package/dist/{createLucideIcon-D2CN7Ma9.js → createLucideIcon-CP-mMPfa.js} +15 -34
  821. package/dist/debounce-DJveWHr_.js +114 -0
  822. package/dist/domain/theme.d.ts +1 -0
  823. package/dist/ellipsis-vertical-Cl3yNtOy.js +9 -0
  824. package/dist/hooks/index.d.ts +1 -0
  825. package/dist/hooks/useToggle.d.ts +1 -0
  826. package/dist/icons.d.ts +2 -0
  827. package/dist/icons.js +134 -0
  828. package/dist/index--l0zux8V.js +200 -0
  829. package/dist/{index-C1g_chDT.js → index-3fEdeexs.js} +2 -2
  830. package/dist/index-9a-FL_6D.js +479 -0
  831. package/dist/{index-bwWKd82e.js → index-BKMaItIC.js} +1 -1
  832. package/dist/index-BKjcReYh.js +55 -0
  833. package/dist/{index-N2OStZoU.js → index-BOE_3f_Z.js} +4 -25
  834. package/dist/{index-BAEWsOG1.js → index-BRXMsxSL.js} +1 -1
  835. package/dist/index-BmVmDQGH.js +662 -0
  836. package/dist/index-BvoZGpli.js +60 -0
  837. package/dist/index-CESXsoMn.js +14 -0
  838. package/dist/index-CJnS4BVW.js +93 -0
  839. package/dist/{index-Dx2grAuN.js → index-CSWGJT-v.js} +0 -20
  840. package/dist/{index-DQJhMz8c.js → index-Cmf-IG4l.js} +11 -12
  841. package/dist/index-DLcqcWxM.js +29 -0
  842. package/dist/index-DPcwqB8q.js +1878 -0
  843. package/dist/index-Dd_ZmIqU.js +139 -0
  844. package/dist/{index-0XtjXVpJ.js → index-Dfq4O3b4.js} +4 -4
  845. package/dist/{index-l3NwplN0.js → index-Jr0cra7i.js} +10 -11
  846. package/dist/{index-CffpTFMi.js → index-URQGEGX7.js} +5 -6
  847. package/dist/index.d.ts +4 -940
  848. package/dist/index.js +146 -106
  849. package/dist/isObject-9XxUefZH.js +97 -0
  850. package/dist/libphonenumber-aZ-2KWIf.js +11581 -0
  851. package/dist/package.json +69 -40
  852. package/dist/proxy-CngVm5qA.js +4942 -0
  853. package/dist/{DatePicker.css → style.css} +1 -1
  854. package/dist/styles.css +1 -1
  855. package/dist/styles.d.ts +0 -0
  856. package/dist/ui/civo-theme.css +194 -168
  857. package/dist/ui/theme.css +27 -0
  858. package/dist/useBreadcrumb-C_Wb2cXs.js +1435 -0
  859. package/dist/utils/index.d.ts +4 -0
  860. package/dist/utils/index.js +709 -517
  861. package/dist/x-B9bYxG31.js +8 -0
  862. package/dist/{x-4F_5p77m.js → x-Eoa9FJjA.js} +1 -1
  863. package/package.json +69 -40
  864. package/dist/Modal-B8jrP02v.js +0 -98
  865. package/dist/chevron-down-MZvQoT2F.js +0 -11
  866. package/dist/chevron-right-VYBOBhRt.js +0 -19
  867. package/dist/components/Dropdown/Dropdown.js +0 -42
  868. package/dist/components/Dropdown/components/List/List.js +0 -79
  869. package/dist/components/Dropdown/components/List/List.variants.js +0 -28
  870. package/dist/components/Dropdown/components/ListItem/ListItem.js +0 -67
  871. package/dist/components/Dropdown/components/Wrapper.js +0 -205
  872. package/dist/components/Dropdown/components/index.js +0 -8
  873. package/dist/components/Dropdown/contexts/dropdown.context.js +0 -19
  874. package/dist/components/Dropdown/contexts/dropdown.hook.js +0 -13
  875. package/dist/components/Dropdown/contexts/dropdown.provider.js +0 -30
  876. package/dist/components/Dropdown/contexts/index.js +0 -6
  877. package/dist/components/Dropdown/hooks/useDropdown.js +0 -58
  878. package/dist/components/Dropdown/hooks/useNavigationList.js +0 -62
  879. package/dist/components/NumberInput/NumberInput.js +0 -179
  880. package/dist/components/NumberInput/NumberInput.variants.js +0 -50
  881. package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +0 -16
  882. package/dist/debounce-BFejQm9P.js +0 -200
  883. package/dist/index-BVRIAMfe.js +0 -36
  884. package/dist/index-BfXxHr_2.js +0 -125
  885. package/dist/index-Bn4c-gww.js +0 -131
  886. package/dist/index-Cvx4lqTq.js +0 -47
  887. package/dist/index-DQH6odE9.js +0 -82
  888. package/dist/index-DdXGVVBv.js +0 -15
  889. package/dist/index-amYX3uxF.js +0 -436
  890. package/dist/index-sp5ZfG6g.js +0 -31
  891. package/dist/useBreadcrumb-B8DnuqkR.js +0 -1273
  892. /package/dist/components/{Dropdown → Select}/components/EmptyList.js +0 -0
@@ -0,0 +1,4942 @@
1
+ import { createContext as vt, useRef as st, useLayoutEffect as Fr, useEffect as Xe, useContext as O, useId as Ir, useCallback as zi, useMemo as ne, createElement as Or, Fragment as Hi, useInsertionEffect as Gi, forwardRef as jr, Component as Nr } from "react";
2
+ import { jsxs as Ur, jsx as _i } from "react/jsx-runtime";
3
+ const Xi = vt({});
4
+ function Wr(t) {
5
+ const e = st(null);
6
+ return e.current === null && (e.current = t()), e.current;
7
+ }
8
+ const Kr = typeof window < "u", $r = Kr ? Fr : Xe, Ye = /* @__PURE__ */ vt(null);
9
+ function qe(t, e) {
10
+ t.indexOf(e) === -1 && t.push(e);
11
+ }
12
+ function Xt(t, e) {
13
+ const n = t.indexOf(e);
14
+ n > -1 && t.splice(n, 1);
15
+ }
16
+ const X = (t, e, n) => n > e ? e : n < t ? t : n;
17
+ function be(t, e) {
18
+ return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
19
+ }
20
+ let Tt = () => {
21
+ }, Y = () => {
22
+ };
23
+ typeof process < "u" && process.env?.NODE_ENV !== "production" && (Tt = (t, e, n) => {
24
+ !t && typeof console < "u" && console.warn(be(e, n));
25
+ }, Y = (t, e, n) => {
26
+ if (!t)
27
+ throw new Error(be(e, n));
28
+ });
29
+ const q = {}, Yi = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
30
+ function qi(t) {
31
+ return typeof t == "object" && t !== null;
32
+ }
33
+ const Zi = (t) => /^0[^.\s]+$/u.test(t);
34
+ // @__NO_SIDE_EFFECTS__
35
+ function Ji(t) {
36
+ let e;
37
+ return () => (e === void 0 && (e = t()), e);
38
+ }
39
+ const W = /* @__NO_SIDE_EFFECTS__ */ (t) => t, zr = (t, e) => (n) => e(t(n)), Bt = (...t) => t.reduce(zr), Ct = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
40
+ const i = e - t;
41
+ return i === 0 ? 1 : (n - t) / i;
42
+ };
43
+ class Ze {
44
+ constructor() {
45
+ this.subscriptions = [];
46
+ }
47
+ add(e) {
48
+ return qe(this.subscriptions, e), () => Xt(this.subscriptions, e);
49
+ }
50
+ notify(e, n, i) {
51
+ const s = this.subscriptions.length;
52
+ if (s)
53
+ if (s === 1)
54
+ this.subscriptions[0](e, n, i);
55
+ else
56
+ for (let o = 0; o < s; o++) {
57
+ const r = this.subscriptions[o];
58
+ r && r(e, n, i);
59
+ }
60
+ }
61
+ getSize() {
62
+ return this.subscriptions.length;
63
+ }
64
+ clear() {
65
+ this.subscriptions.length = 0;
66
+ }
67
+ }
68
+ const K = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, U = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
69
+ function Qi(t, e) {
70
+ return e ? t * (1e3 / e) : 0;
71
+ }
72
+ const Mn = /* @__PURE__ */ new Set();
73
+ function Je(t, e, n) {
74
+ t || Mn.has(e) || (console.warn(be(e, n)), Mn.add(e));
75
+ }
76
+ const ts = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Hr = 1e-7, Gr = 12;
77
+ function _r(t, e, n, i, s) {
78
+ let o, r, a = 0;
79
+ do
80
+ r = e + (n - e) / 2, o = ts(r, i, s) - t, o > 0 ? n = r : e = r;
81
+ while (Math.abs(o) > Hr && ++a < Gr);
82
+ return r;
83
+ }
84
+ function Ft(t, e, n, i) {
85
+ if (t === e && n === i)
86
+ return W;
87
+ const s = (o) => _r(o, 0, 1, t, n);
88
+ return (o) => o === 0 || o === 1 ? o : ts(s(o), e, i);
89
+ }
90
+ const es = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, ns = (t) => (e) => 1 - t(1 - e), is = /* @__PURE__ */ Ft(0.33, 1.53, 0.69, 0.99), Qe = /* @__PURE__ */ ns(is), ss = /* @__PURE__ */ es(Qe), rs = (t) => (t *= 2) < 1 ? 0.5 * Qe(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), tn = (t) => 1 - Math.sin(Math.acos(t)), os = ns(tn), as = es(tn), Xr = /* @__PURE__ */ Ft(0.42, 0, 1, 1), Yr = /* @__PURE__ */ Ft(0, 0, 0.58, 1), ls = /* @__PURE__ */ Ft(0.42, 0, 0.58, 1), qr = (t) => Array.isArray(t) && typeof t[0] != "number", cs = (t) => Array.isArray(t) && typeof t[0] == "number", Cn = {
91
+ linear: W,
92
+ easeIn: Xr,
93
+ easeInOut: ls,
94
+ easeOut: Yr,
95
+ circIn: tn,
96
+ circInOut: as,
97
+ circOut: os,
98
+ backIn: Qe,
99
+ backInOut: ss,
100
+ backOut: is,
101
+ anticipate: rs
102
+ }, Zr = (t) => typeof t == "string", En = (t) => {
103
+ if (cs(t)) {
104
+ Y(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
105
+ const [e, n, i, s] = t;
106
+ return Ft(e, n, i, s);
107
+ } else if (Zr(t))
108
+ return Y(Cn[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Cn[t];
109
+ return t;
110
+ }, jt = [
111
+ "setup",
112
+ // Compute
113
+ "read",
114
+ // Read
115
+ "resolveKeyframes",
116
+ // Write/Read/Write/Read
117
+ "preUpdate",
118
+ // Compute
119
+ "update",
120
+ // Compute
121
+ "preRender",
122
+ // Compute
123
+ "render",
124
+ // Write
125
+ "postRender"
126
+ // Compute
127
+ ];
128
+ function Jr(t, e) {
129
+ let n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = !1, o = !1;
130
+ const r = /* @__PURE__ */ new WeakSet();
131
+ let a = {
132
+ delta: 0,
133
+ timestamp: 0,
134
+ isProcessing: !1
135
+ };
136
+ function l(c) {
137
+ r.has(c) && (u.schedule(c), t()), c(a);
138
+ }
139
+ const u = {
140
+ /**
141
+ * Schedule a process to run on the next frame.
142
+ */
143
+ schedule: (c, h = !1, f = !1) => {
144
+ const m = f && s ? n : i;
145
+ return h && r.add(c), m.has(c) || m.add(c), c;
146
+ },
147
+ /**
148
+ * Cancel the provided callback from running on the next frame.
149
+ */
150
+ cancel: (c) => {
151
+ i.delete(c), r.delete(c);
152
+ },
153
+ /**
154
+ * Execute all schedule callbacks.
155
+ */
156
+ process: (c) => {
157
+ if (a = c, s) {
158
+ o = !0;
159
+ return;
160
+ }
161
+ s = !0, [n, i] = [i, n], n.forEach(l), n.clear(), s = !1, o && (o = !1, u.process(c));
162
+ }
163
+ };
164
+ return u;
165
+ }
166
+ const Qr = 40;
167
+ function us(t, e) {
168
+ let n = !1, i = !0;
169
+ const s = {
170
+ delta: 0,
171
+ timestamp: 0,
172
+ isProcessing: !1
173
+ }, o = () => n = !0, r = jt.reduce((p, P) => (p[P] = Jr(o), p), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: h, preRender: f, render: d, postRender: m } = r, g = () => {
174
+ const p = q.useManualTiming ? s.timestamp : performance.now();
175
+ n = !1, q.useManualTiming || (s.delta = i ? 1e3 / 60 : Math.max(Math.min(p - s.timestamp, Qr), 1)), s.timestamp = p, s.isProcessing = !0, a.process(s), l.process(s), u.process(s), c.process(s), h.process(s), f.process(s), d.process(s), m.process(s), s.isProcessing = !1, n && e && (i = !1, t(g));
176
+ }, x = () => {
177
+ n = !0, i = !0, s.isProcessing || t(g);
178
+ };
179
+ return { schedule: jt.reduce((p, P) => {
180
+ const w = r[P];
181
+ return p[P] = (b, M = !1, S = !1) => (n || x(), w.schedule(b, M, S)), p;
182
+ }, {}), cancel: (p) => {
183
+ for (let P = 0; P < jt.length; P++)
184
+ r[jt[P]].cancel(p);
185
+ }, state: s, steps: r };
186
+ }
187
+ const { schedule: A, cancel: Q, state: L, steps: ae } = /* @__PURE__ */ us(typeof requestAnimationFrame < "u" ? requestAnimationFrame : W, !0);
188
+ let Wt;
189
+ function to() {
190
+ Wt = void 0;
191
+ }
192
+ const F = {
193
+ now: () => (Wt === void 0 && F.set(L.isProcessing || q.useManualTiming ? L.timestamp : performance.now()), Wt),
194
+ set: (t) => {
195
+ Wt = t, queueMicrotask(to);
196
+ }
197
+ }, hs = (t) => (e) => typeof e == "string" && e.startsWith(t), fs = /* @__PURE__ */ hs("--"), eo = /* @__PURE__ */ hs("var(--"), en = (t) => eo(t) ? no.test(t.split("/*")[0].trim()) : !1, no = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
198
+ function Rn(t) {
199
+ return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
200
+ }
201
+ const xt = {
202
+ test: (t) => typeof t == "number",
203
+ parse: parseFloat,
204
+ transform: (t) => t
205
+ }, Et = {
206
+ ...xt,
207
+ transform: (t) => X(0, 1, t)
208
+ }, Nt = {
209
+ ...xt,
210
+ default: 1
211
+ }, Vt = (t) => Math.round(t * 1e5) / 1e5, nn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
212
+ function io(t) {
213
+ return t == null;
214
+ }
215
+ const so = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, sn = (t, e) => (n) => !!(typeof n == "string" && so.test(n) && n.startsWith(t) || e && !io(n) && Object.prototype.hasOwnProperty.call(n, e)), ds = (t, e, n) => (i) => {
216
+ if (typeof i != "string")
217
+ return i;
218
+ const [s, o, r, a] = i.match(nn);
219
+ return {
220
+ [t]: parseFloat(s),
221
+ [e]: parseFloat(o),
222
+ [n]: parseFloat(r),
223
+ alpha: a !== void 0 ? parseFloat(a) : 1
224
+ };
225
+ }, ro = (t) => X(0, 255, t), le = {
226
+ ...xt,
227
+ transform: (t) => Math.round(ro(t))
228
+ }, rt = {
229
+ test: /* @__PURE__ */ sn("rgb", "red"),
230
+ parse: /* @__PURE__ */ ds("red", "green", "blue"),
231
+ transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + le.transform(t) + ", " + le.transform(e) + ", " + le.transform(n) + ", " + Vt(Et.transform(i)) + ")"
232
+ };
233
+ function oo(t) {
234
+ let e = "", n = "", i = "", s = "";
235
+ return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), i = t.substring(5, 7), s = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), i = t.substring(3, 4), s = t.substring(4, 5), e += e, n += n, i += i, s += s), {
236
+ red: parseInt(e, 16),
237
+ green: parseInt(n, 16),
238
+ blue: parseInt(i, 16),
239
+ alpha: s ? parseInt(s, 16) / 255 : 1
240
+ };
241
+ }
242
+ const Ae = {
243
+ test: /* @__PURE__ */ sn("#"),
244
+ parse: oo,
245
+ transform: rt.transform
246
+ }, It = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
247
+ test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
248
+ parse: parseFloat,
249
+ transform: (e) => `${e}${t}`
250
+ }), Z = /* @__PURE__ */ It("deg"), _ = /* @__PURE__ */ It("%"), y = /* @__PURE__ */ It("px"), ao = /* @__PURE__ */ It("vh"), lo = /* @__PURE__ */ It("vw"), Ln = {
251
+ ..._,
252
+ parse: (t) => _.parse(t) / 100,
253
+ transform: (t) => _.transform(t * 100)
254
+ }, ut = {
255
+ test: /* @__PURE__ */ sn("hsl", "hue"),
256
+ parse: /* @__PURE__ */ ds("hue", "saturation", "lightness"),
257
+ transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " + _.transform(Vt(e)) + ", " + _.transform(Vt(n)) + ", " + Vt(Et.transform(i)) + ")"
258
+ }, C = {
259
+ test: (t) => rt.test(t) || Ae.test(t) || ut.test(t),
260
+ parse: (t) => rt.test(t) ? rt.parse(t) : ut.test(t) ? ut.parse(t) : Ae.parse(t),
261
+ transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? rt.transform(t) : ut.transform(t),
262
+ getAnimatableNone: (t) => {
263
+ const e = C.parse(t);
264
+ return e.alpha = 0, C.transform(e);
265
+ }
266
+ }, co = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
267
+ function uo(t) {
268
+ return isNaN(t) && typeof t == "string" && (t.match(nn)?.length || 0) + (t.match(co)?.length || 0) > 0;
269
+ }
270
+ const ms = "number", ps = "color", ho = "var", fo = "var(", kn = "${}", mo = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
271
+ function Rt(t) {
272
+ const e = t.toString(), n = [], i = {
273
+ color: [],
274
+ number: [],
275
+ var: []
276
+ }, s = [];
277
+ let o = 0;
278
+ const a = e.replace(mo, (l) => (C.test(l) ? (i.color.push(o), s.push(ps), n.push(C.parse(l))) : l.startsWith(fo) ? (i.var.push(o), s.push(ho), n.push(l)) : (i.number.push(o), s.push(ms), n.push(parseFloat(l))), ++o, kn)).split(kn);
279
+ return { values: n, split: a, indexes: i, types: s };
280
+ }
281
+ function gs(t) {
282
+ return Rt(t).values;
283
+ }
284
+ function ys(t) {
285
+ const { split: e, types: n } = Rt(t), i = e.length;
286
+ return (s) => {
287
+ let o = "";
288
+ for (let r = 0; r < i; r++)
289
+ if (o += e[r], s[r] !== void 0) {
290
+ const a = n[r];
291
+ a === ms ? o += Vt(s[r]) : a === ps ? o += C.transform(s[r]) : o += s[r];
292
+ }
293
+ return o;
294
+ };
295
+ }
296
+ const po = (t) => typeof t == "number" ? 0 : C.test(t) ? C.getAnimatableNone(t) : t;
297
+ function go(t) {
298
+ const e = gs(t);
299
+ return ys(t)(e.map(po));
300
+ }
301
+ const H = {
302
+ test: uo,
303
+ parse: gs,
304
+ createTransformer: ys,
305
+ getAnimatableNone: go
306
+ };
307
+ function ce(t, e, n) {
308
+ return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
309
+ }
310
+ function yo({ hue: t, saturation: e, lightness: n, alpha: i }) {
311
+ t /= 360, e /= 100, n /= 100;
312
+ let s = 0, o = 0, r = 0;
313
+ if (!e)
314
+ s = o = r = n;
315
+ else {
316
+ const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
317
+ s = ce(l, a, t + 1 / 3), o = ce(l, a, t), r = ce(l, a, t - 1 / 3);
318
+ }
319
+ return {
320
+ red: Math.round(s * 255),
321
+ green: Math.round(o * 255),
322
+ blue: Math.round(r * 255),
323
+ alpha: i
324
+ };
325
+ }
326
+ function Yt(t, e) {
327
+ return (n) => n > 0 ? e : t;
328
+ }
329
+ const D = (t, e, n) => t + (e - t) * n, ue = (t, e, n) => {
330
+ const i = t * t, s = n * (e * e - i) + i;
331
+ return s < 0 ? 0 : Math.sqrt(s);
332
+ }, vo = [Ae, rt, ut], To = (t) => vo.find((e) => e.test(t));
333
+ function Bn(t) {
334
+ const e = To(t);
335
+ if (Tt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
336
+ return !1;
337
+ let n = e.parse(t);
338
+ return e === ut && (n = yo(n)), n;
339
+ }
340
+ const Fn = (t, e) => {
341
+ const n = Bn(t), i = Bn(e);
342
+ if (!n || !i)
343
+ return Yt(t, e);
344
+ const s = { ...n };
345
+ return (o) => (s.red = ue(n.red, i.red, o), s.green = ue(n.green, i.green, o), s.blue = ue(n.blue, i.blue, o), s.alpha = D(n.alpha, i.alpha, o), rt.transform(s));
346
+ }, Ve = /* @__PURE__ */ new Set(["none", "hidden"]);
347
+ function xo(t, e) {
348
+ return Ve.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
349
+ }
350
+ function wo(t, e) {
351
+ return (n) => D(t, e, n);
352
+ }
353
+ function rn(t) {
354
+ return typeof t == "number" ? wo : typeof t == "string" ? en(t) ? Yt : C.test(t) ? Fn : bo : Array.isArray(t) ? vs : typeof t == "object" ? C.test(t) ? Fn : Po : Yt;
355
+ }
356
+ function vs(t, e) {
357
+ const n = [...t], i = n.length, s = t.map((o, r) => rn(o)(o, e[r]));
358
+ return (o) => {
359
+ for (let r = 0; r < i; r++)
360
+ n[r] = s[r](o);
361
+ return n;
362
+ };
363
+ }
364
+ function Po(t, e) {
365
+ const n = { ...t, ...e }, i = {};
366
+ for (const s in n)
367
+ t[s] !== void 0 && e[s] !== void 0 && (i[s] = rn(t[s])(t[s], e[s]));
368
+ return (s) => {
369
+ for (const o in i)
370
+ n[o] = i[o](s);
371
+ return n;
372
+ };
373
+ }
374
+ function So(t, e) {
375
+ const n = [], i = { color: 0, var: 0, number: 0 };
376
+ for (let s = 0; s < e.values.length; s++) {
377
+ const o = e.types[s], r = t.indexes[o][i[o]], a = t.values[r] ?? 0;
378
+ n[s] = a, i[o]++;
379
+ }
380
+ return n;
381
+ }
382
+ const bo = (t, e) => {
383
+ const n = H.createTransformer(e), i = Rt(t), s = Rt(e);
384
+ return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? Ve.has(t) && !s.values.length || Ve.has(e) && !i.values.length ? xo(t, e) : Bt(vs(So(i, s), s.values), n) : (Tt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), Yt(t, e));
385
+ };
386
+ function Ts(t, e, n) {
387
+ return typeof t == "number" && typeof e == "number" && typeof n == "number" ? D(t, e, n) : rn(t)(t, e);
388
+ }
389
+ const Ao = (t) => {
390
+ const e = ({ timestamp: n }) => t(n);
391
+ return {
392
+ start: (n = !0) => A.update(e, n),
393
+ stop: () => Q(e),
394
+ /**
395
+ * If we're processing this frame we can use the
396
+ * framelocked timestamp to keep things in sync.
397
+ */
398
+ now: () => L.isProcessing ? L.timestamp : F.now()
399
+ };
400
+ }, xs = (t, e, n = 10) => {
401
+ let i = "";
402
+ const s = Math.max(Math.round(e / n), 2);
403
+ for (let o = 0; o < s; o++)
404
+ i += Math.round(t(o / (s - 1)) * 1e4) / 1e4 + ", ";
405
+ return `linear(${i.substring(0, i.length - 2)})`;
406
+ }, qt = 2e4;
407
+ function on(t) {
408
+ let e = 0;
409
+ const n = 50;
410
+ let i = t.next(e);
411
+ for (; !i.done && e < qt; )
412
+ e += n, i = t.next(e);
413
+ return e >= qt ? 1 / 0 : e;
414
+ }
415
+ function Vo(t, e = 100, n) {
416
+ const i = n({ ...t, keyframes: [0, e] }), s = Math.min(on(i), qt);
417
+ return {
418
+ type: "keyframes",
419
+ ease: (o) => i.next(s * o).value / e,
420
+ duration: /* @__PURE__ */ U(s)
421
+ };
422
+ }
423
+ const Do = 5;
424
+ function ws(t, e, n) {
425
+ const i = Math.max(e - Do, 0);
426
+ return Qi(n - t(i), e - i);
427
+ }
428
+ const V = {
429
+ // Default spring physics
430
+ stiffness: 100,
431
+ damping: 10,
432
+ mass: 1,
433
+ velocity: 0,
434
+ // Default duration/bounce-based options
435
+ duration: 800,
436
+ // in ms
437
+ bounce: 0.3,
438
+ visualDuration: 0.3,
439
+ // in seconds
440
+ // Rest thresholds
441
+ restSpeed: {
442
+ granular: 0.01,
443
+ default: 2
444
+ },
445
+ restDelta: {
446
+ granular: 5e-3,
447
+ default: 0.5
448
+ },
449
+ // Limits
450
+ minDuration: 0.01,
451
+ // in seconds
452
+ maxDuration: 10,
453
+ // in seconds
454
+ minDamping: 0.05,
455
+ maxDamping: 1
456
+ }, he = 1e-3;
457
+ function Mo({ duration: t = V.duration, bounce: e = V.bounce, velocity: n = V.velocity, mass: i = V.mass }) {
458
+ let s, o;
459
+ Tt(t <= /* @__PURE__ */ K(V.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
460
+ let r = 1 - e;
461
+ r = X(V.minDamping, V.maxDamping, r), t = X(V.minDuration, V.maxDuration, /* @__PURE__ */ U(t)), r < 1 ? (s = (u) => {
462
+ const c = u * r, h = c * t, f = c - n, d = De(u, r), m = Math.exp(-h);
463
+ return he - f / d * m;
464
+ }, o = (u) => {
465
+ const h = u * r * t, f = h * n + n, d = Math.pow(r, 2) * Math.pow(u, 2) * t, m = Math.exp(-h), g = De(Math.pow(u, 2), r);
466
+ return (-s(u) + he > 0 ? -1 : 1) * ((f - d) * m) / g;
467
+ }) : (s = (u) => {
468
+ const c = Math.exp(-u * t), h = (u - n) * t + 1;
469
+ return -he + c * h;
470
+ }, o = (u) => {
471
+ const c = Math.exp(-u * t), h = (n - u) * (t * t);
472
+ return c * h;
473
+ });
474
+ const a = 5 / t, l = Eo(s, o, a);
475
+ if (t = /* @__PURE__ */ K(t), isNaN(l))
476
+ return {
477
+ stiffness: V.stiffness,
478
+ damping: V.damping,
479
+ duration: t
480
+ };
481
+ {
482
+ const u = Math.pow(l, 2) * i;
483
+ return {
484
+ stiffness: u,
485
+ damping: r * 2 * Math.sqrt(i * u),
486
+ duration: t
487
+ };
488
+ }
489
+ }
490
+ const Co = 12;
491
+ function Eo(t, e, n) {
492
+ let i = n;
493
+ for (let s = 1; s < Co; s++)
494
+ i = i - t(i) / e(i);
495
+ return i;
496
+ }
497
+ function De(t, e) {
498
+ return t * Math.sqrt(1 - e * e);
499
+ }
500
+ const Ro = ["duration", "bounce"], Lo = ["stiffness", "damping", "mass"];
501
+ function In(t, e) {
502
+ return e.some((n) => t[n] !== void 0);
503
+ }
504
+ function ko(t) {
505
+ let e = {
506
+ velocity: V.velocity,
507
+ stiffness: V.stiffness,
508
+ damping: V.damping,
509
+ mass: V.mass,
510
+ isResolvedFromDuration: !1,
511
+ ...t
512
+ };
513
+ if (!In(t, Lo) && In(t, Ro))
514
+ if (e.velocity = 0, t.visualDuration) {
515
+ const n = t.visualDuration, i = 2 * Math.PI / (n * 1.2), s = i * i, o = 2 * X(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(s);
516
+ e = {
517
+ ...e,
518
+ mass: V.mass,
519
+ stiffness: s,
520
+ damping: o
521
+ };
522
+ } else {
523
+ const n = Mo({ ...t, velocity: 0 });
524
+ e = {
525
+ ...e,
526
+ ...n,
527
+ mass: V.mass
528
+ }, e.isResolvedFromDuration = !0;
529
+ }
530
+ return e;
531
+ }
532
+ function Zt(t = V.visualDuration, e = V.bounce) {
533
+ const n = typeof t != "object" ? {
534
+ visualDuration: t,
535
+ keyframes: [0, 1],
536
+ bounce: e
537
+ } : t;
538
+ let { restSpeed: i, restDelta: s } = n;
539
+ const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: u, mass: c, duration: h, velocity: f, isResolvedFromDuration: d } = ko({
540
+ ...n,
541
+ velocity: -/* @__PURE__ */ U(n.velocity || 0)
542
+ }), m = f || 0, g = u / (2 * Math.sqrt(l * c)), x = r - o, v = /* @__PURE__ */ U(Math.sqrt(l / c)), T = Math.abs(x) < 5;
543
+ i || (i = T ? V.restSpeed.granular : V.restSpeed.default), s || (s = T ? V.restDelta.granular : V.restDelta.default);
544
+ let p;
545
+ if (g < 1) {
546
+ const w = De(v, g);
547
+ p = (b) => {
548
+ const M = Math.exp(-g * v * b);
549
+ return r - M * ((m + g * v * x) / w * Math.sin(w * b) + x * Math.cos(w * b));
550
+ };
551
+ } else if (g === 1)
552
+ p = (w) => r - Math.exp(-v * w) * (x + (m + v * x) * w);
553
+ else {
554
+ const w = v * Math.sqrt(g * g - 1);
555
+ p = (b) => {
556
+ const M = Math.exp(-g * v * b), S = Math.min(w * b, 300);
557
+ return r - M * ((m + g * v * x) * Math.sinh(S) + w * x * Math.cosh(S)) / w;
558
+ };
559
+ }
560
+ const P = {
561
+ calculatedDuration: d && h || null,
562
+ next: (w) => {
563
+ const b = p(w);
564
+ if (d)
565
+ a.done = w >= h;
566
+ else {
567
+ let M = w === 0 ? m : 0;
568
+ g < 1 && (M = w === 0 ? /* @__PURE__ */ K(m) : ws(p, w, b));
569
+ const S = Math.abs(M) <= i, B = Math.abs(r - b) <= s;
570
+ a.done = S && B;
571
+ }
572
+ return a.value = a.done ? r : b, a;
573
+ },
574
+ toString: () => {
575
+ const w = Math.min(on(P), qt), b = xs((M) => P.next(w * M).value, w, 30);
576
+ return w + "ms " + b;
577
+ },
578
+ toTransition: () => {
579
+ }
580
+ };
581
+ return P;
582
+ }
583
+ Zt.applyToOptions = (t) => {
584
+ const e = Vo(t, 100, Zt);
585
+ return t.ease = e.ease, t.duration = /* @__PURE__ */ K(e.duration), t.type = "keyframes", t;
586
+ };
587
+ function Me({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
588
+ const h = t[0], f = {
589
+ done: !1,
590
+ value: h
591
+ }, d = (S) => a !== void 0 && S < a || l !== void 0 && S > l, m = (S) => a === void 0 ? l : l === void 0 || Math.abs(a - S) < Math.abs(l - S) ? a : l;
592
+ let g = n * e;
593
+ const x = h + g, v = r === void 0 ? x : r(x);
594
+ v !== x && (g = v - h);
595
+ const T = (S) => -g * Math.exp(-S / i), p = (S) => v + T(S), P = (S) => {
596
+ const B = T(S), j = p(S);
597
+ f.done = Math.abs(B) <= u, f.value = f.done ? v : j;
598
+ };
599
+ let w, b;
600
+ const M = (S) => {
601
+ d(f.value) && (w = S, b = Zt({
602
+ keyframes: [f.value, m(f.value)],
603
+ velocity: ws(p, S, f.value),
604
+ // TODO: This should be passing * 1000
605
+ damping: s,
606
+ stiffness: o,
607
+ restDelta: u,
608
+ restSpeed: c
609
+ }));
610
+ };
611
+ return M(0), {
612
+ calculatedDuration: null,
613
+ next: (S) => {
614
+ let B = !1;
615
+ return !b && w === void 0 && (B = !0, P(S), M(S)), w !== void 0 && S >= w ? b.next(S - w) : (!B && P(S), f);
616
+ }
617
+ };
618
+ }
619
+ function Bo(t, e, n) {
620
+ const i = [], s = n || q.mix || Ts, o = t.length - 1;
621
+ for (let r = 0; r < o; r++) {
622
+ let a = s(t[r], t[r + 1]);
623
+ if (e) {
624
+ const l = Array.isArray(e) ? e[r] || W : e;
625
+ a = Bt(l, a);
626
+ }
627
+ i.push(a);
628
+ }
629
+ return i;
630
+ }
631
+ function Fo(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
632
+ const o = t.length;
633
+ if (Y(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1)
634
+ return () => e[0];
635
+ if (o === 2 && e[0] === e[1])
636
+ return () => e[1];
637
+ const r = t[0] === t[1];
638
+ t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
639
+ const a = Bo(e, i, s), l = a.length, u = (c) => {
640
+ if (r && c < t[0])
641
+ return e[0];
642
+ let h = 0;
643
+ if (l > 1)
644
+ for (; h < t.length - 2 && !(c < t[h + 1]); h++)
645
+ ;
646
+ const f = /* @__PURE__ */ Ct(t[h], t[h + 1], c);
647
+ return a[h](f);
648
+ };
649
+ return n ? (c) => u(X(t[0], t[o - 1], c)) : u;
650
+ }
651
+ function Io(t, e) {
652
+ const n = t[t.length - 1];
653
+ for (let i = 1; i <= e; i++) {
654
+ const s = /* @__PURE__ */ Ct(0, e, i);
655
+ t.push(D(n, 1, s));
656
+ }
657
+ }
658
+ function Oo(t) {
659
+ const e = [0];
660
+ return Io(e, t.length - 1), e;
661
+ }
662
+ function jo(t, e) {
663
+ return t.map((n) => n * e);
664
+ }
665
+ function No(t, e) {
666
+ return t.map(() => e || ls).splice(0, t.length - 1);
667
+ }
668
+ function ht({ duration: t = 300, keyframes: e, times: n, ease: i = "easeInOut" }) {
669
+ const s = qr(i) ? i.map(En) : En(i), o = {
670
+ done: !1,
671
+ value: e[0]
672
+ }, r = jo(
673
+ // Only use the provided offsets if they're the correct length
674
+ // TODO Maybe we should warn here if there's a length mismatch
675
+ n && n.length === e.length ? n : Oo(e),
676
+ t
677
+ ), a = Fo(r, e, {
678
+ ease: Array.isArray(s) ? s : No(e, s)
679
+ });
680
+ return {
681
+ calculatedDuration: t,
682
+ next: (l) => (o.value = a(l), o.done = l >= t, o)
683
+ };
684
+ }
685
+ const Uo = (t) => t !== null;
686
+ function an(t, { repeat: e, repeatType: n = "loop" }, i, s = 1) {
687
+ const o = t.filter(Uo), a = s < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
688
+ return !a || i === void 0 ? o[a] : i;
689
+ }
690
+ const Wo = {
691
+ decay: Me,
692
+ inertia: Me,
693
+ tween: ht,
694
+ keyframes: ht,
695
+ spring: Zt
696
+ };
697
+ function Ps(t) {
698
+ typeof t.type == "string" && (t.type = Wo[t.type]);
699
+ }
700
+ class ln {
701
+ constructor() {
702
+ this.updateFinished();
703
+ }
704
+ get finished() {
705
+ return this._finished;
706
+ }
707
+ updateFinished() {
708
+ this._finished = new Promise((e) => {
709
+ this.resolve = e;
710
+ });
711
+ }
712
+ notifyFinished() {
713
+ this.resolve();
714
+ }
715
+ /**
716
+ * Allows the animation to be awaited.
717
+ *
718
+ * @deprecated Use `finished` instead.
719
+ */
720
+ then(e, n) {
721
+ return this.finished.then(e, n);
722
+ }
723
+ }
724
+ const Ko = (t) => t / 100;
725
+ class cn extends ln {
726
+ constructor(e) {
727
+ super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
728
+ const { motionValue: n } = this.options;
729
+ n && n.updatedAt !== F.now() && this.tick(F.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
730
+ }, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
731
+ }
732
+ initAnimation() {
733
+ const { options: e } = this;
734
+ Ps(e);
735
+ const { type: n = ht, repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = e;
736
+ let { keyframes: a } = e;
737
+ const l = n || ht;
738
+ process.env.NODE_ENV !== "production" && l !== ht && Y(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== ht && typeof a[0] != "number" && (this.mixKeyframes = Bt(Ko, Ts(a[0], a[1])), a = [0, 100]);
739
+ const u = l({ ...e, keyframes: a });
740
+ o === "mirror" && (this.mirroredGenerator = l({
741
+ ...e,
742
+ keyframes: [...a].reverse(),
743
+ velocity: -r
744
+ })), u.calculatedDuration === null && (u.calculatedDuration = on(u));
745
+ const { calculatedDuration: c } = u;
746
+ this.calculatedDuration = c, this.resolvedDuration = c + s, this.totalDuration = this.resolvedDuration * (i + 1) - s, this.generator = u;
747
+ }
748
+ updateTime(e) {
749
+ const n = Math.round(e - this.startTime) * this.playbackSpeed;
750
+ this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
751
+ }
752
+ tick(e, n = !1) {
753
+ const { generator: i, totalDuration: s, mixKeyframes: o, mirroredGenerator: r, resolvedDuration: a, calculatedDuration: l } = this;
754
+ if (this.startTime === null)
755
+ return i.next(0);
756
+ const { delay: u = 0, keyframes: c, repeat: h, repeatType: f, repeatDelay: d, type: m, onUpdate: g, finalKeyframe: x } = this.options;
757
+ this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - s / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
758
+ const v = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), T = this.playbackSpeed >= 0 ? v < 0 : v > s;
759
+ this.currentTime = Math.max(v, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = s);
760
+ let p = this.currentTime, P = i;
761
+ if (h) {
762
+ const S = Math.min(this.currentTime, s) / a;
763
+ let B = Math.floor(S), j = S % 1;
764
+ !j && S >= 1 && (j = 1), j === 1 && B--, B = Math.min(B, h + 1), B % 2 && (f === "reverse" ? (j = 1 - j, d && (j -= d / a)) : f === "mirror" && (P = r)), p = X(0, 1, j) * a;
765
+ }
766
+ const w = T ? { done: !1, value: c[0] } : P.next(p);
767
+ o && (w.value = o(w.value));
768
+ let { done: b } = w;
769
+ !T && l !== null && (b = this.playbackSpeed >= 0 ? this.currentTime >= s : this.currentTime <= 0);
770
+ const M = this.holdTime === null && (this.state === "finished" || this.state === "running" && b);
771
+ return M && m !== Me && (w.value = an(c, this.options, x, this.speed)), g && g(w.value), M && this.finish(), w;
772
+ }
773
+ /**
774
+ * Allows the returned animation to be awaited or promise-chained. Currently
775
+ * resolves when the animation finishes at all but in a future update could/should
776
+ * reject if its cancels.
777
+ */
778
+ then(e, n) {
779
+ return this.finished.then(e, n);
780
+ }
781
+ get duration() {
782
+ return /* @__PURE__ */ U(this.calculatedDuration);
783
+ }
784
+ get iterationDuration() {
785
+ const { delay: e = 0 } = this.options || {};
786
+ return this.duration + /* @__PURE__ */ U(e);
787
+ }
788
+ get time() {
789
+ return /* @__PURE__ */ U(this.currentTime);
790
+ }
791
+ set time(e) {
792
+ e = /* @__PURE__ */ K(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), this.driver?.start(!1);
793
+ }
794
+ get speed() {
795
+ return this.playbackSpeed;
796
+ }
797
+ set speed(e) {
798
+ this.updateTime(F.now());
799
+ const n = this.playbackSpeed !== e;
800
+ this.playbackSpeed = e, n && (this.time = /* @__PURE__ */ U(this.currentTime));
801
+ }
802
+ play() {
803
+ if (this.isStopped)
804
+ return;
805
+ const { driver: e = Ao, startTime: n } = this.options;
806
+ this.driver || (this.driver = e((s) => this.tick(s))), this.options.onPlay?.();
807
+ const i = this.driver.now();
808
+ this.state === "finished" ? (this.updateFinished(), this.startTime = i) : this.holdTime !== null ? this.startTime = i - this.holdTime : this.startTime || (this.startTime = n ?? i), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
809
+ }
810
+ pause() {
811
+ this.state = "paused", this.updateTime(F.now()), this.holdTime = this.currentTime;
812
+ }
813
+ complete() {
814
+ this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
815
+ }
816
+ finish() {
817
+ this.notifyFinished(), this.teardown(), this.state = "finished", this.options.onComplete?.();
818
+ }
819
+ cancel() {
820
+ this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), this.options.onCancel?.();
821
+ }
822
+ teardown() {
823
+ this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
824
+ }
825
+ stopDriver() {
826
+ this.driver && (this.driver.stop(), this.driver = void 0);
827
+ }
828
+ sample(e) {
829
+ return this.startTime = 0, this.tick(e, !0);
830
+ }
831
+ attachTimeline(e) {
832
+ return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), e.observe(this);
833
+ }
834
+ }
835
+ function $o(t) {
836
+ for (let e = 1; e < t.length; e++)
837
+ t[e] ?? (t[e] = t[e - 1]);
838
+ }
839
+ const ot = (t) => t * 180 / Math.PI, Ce = (t) => {
840
+ const e = ot(Math.atan2(t[1], t[0]));
841
+ return Ee(e);
842
+ }, zo = {
843
+ x: 4,
844
+ y: 5,
845
+ translateX: 4,
846
+ translateY: 5,
847
+ scaleX: 0,
848
+ scaleY: 3,
849
+ scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
850
+ rotate: Ce,
851
+ rotateZ: Ce,
852
+ skewX: (t) => ot(Math.atan(t[1])),
853
+ skewY: (t) => ot(Math.atan(t[2])),
854
+ skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
855
+ }, Ee = (t) => (t = t % 360, t < 0 && (t += 360), t), On = Ce, jn = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), Nn = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), Ho = {
856
+ x: 12,
857
+ y: 13,
858
+ z: 14,
859
+ translateX: 12,
860
+ translateY: 13,
861
+ translateZ: 14,
862
+ scaleX: jn,
863
+ scaleY: Nn,
864
+ scale: (t) => (jn(t) + Nn(t)) / 2,
865
+ rotateX: (t) => Ee(ot(Math.atan2(t[6], t[5]))),
866
+ rotateY: (t) => Ee(ot(Math.atan2(-t[2], t[0]))),
867
+ rotateZ: On,
868
+ rotate: On,
869
+ skewX: (t) => ot(Math.atan(t[4])),
870
+ skewY: (t) => ot(Math.atan(t[1])),
871
+ skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
872
+ };
873
+ function Re(t) {
874
+ return t.includes("scale") ? 1 : 0;
875
+ }
876
+ function Le(t, e) {
877
+ if (!t || t === "none")
878
+ return Re(e);
879
+ const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
880
+ let i, s;
881
+ if (n)
882
+ i = Ho, s = n;
883
+ else {
884
+ const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
885
+ i = zo, s = a;
886
+ }
887
+ if (!s)
888
+ return Re(e);
889
+ const o = i[e], r = s[1].split(",").map(_o);
890
+ return typeof o == "function" ? o(r) : r[o];
891
+ }
892
+ const Go = (t, e) => {
893
+ const { transform: n = "none" } = getComputedStyle(t);
894
+ return Le(n, e);
895
+ };
896
+ function _o(t) {
897
+ return parseFloat(t.trim());
898
+ }
899
+ const wt = [
900
+ "transformPerspective",
901
+ "x",
902
+ "y",
903
+ "z",
904
+ "translateX",
905
+ "translateY",
906
+ "translateZ",
907
+ "scale",
908
+ "scaleX",
909
+ "scaleY",
910
+ "rotate",
911
+ "rotateX",
912
+ "rotateY",
913
+ "rotateZ",
914
+ "skew",
915
+ "skewX",
916
+ "skewY"
917
+ ], Pt = new Set(wt), Un = (t) => t === xt || t === y, Xo = /* @__PURE__ */ new Set(["x", "y", "z"]), Yo = wt.filter((t) => !Xo.has(t));
918
+ function qo(t) {
919
+ const e = [];
920
+ return Yo.forEach((n) => {
921
+ const i = t.getValue(n);
922
+ i !== void 0 && (e.push([n, i.get()]), i.set(n.startsWith("scale") ? 1 : 0));
923
+ }), e;
924
+ }
925
+ const J = {
926
+ // Dimensions
927
+ width: ({ x: t }, { paddingLeft: e = "0", paddingRight: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
928
+ height: ({ y: t }, { paddingTop: e = "0", paddingBottom: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n),
929
+ top: (t, { top: e }) => parseFloat(e),
930
+ left: (t, { left: e }) => parseFloat(e),
931
+ bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
932
+ right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
933
+ // Transform
934
+ x: (t, { transform: e }) => Le(e, "x"),
935
+ y: (t, { transform: e }) => Le(e, "y")
936
+ };
937
+ J.translateX = J.x;
938
+ J.translateY = J.y;
939
+ const at = /* @__PURE__ */ new Set();
940
+ let ke = !1, Be = !1, Fe = !1;
941
+ function Ss() {
942
+ if (Be) {
943
+ const t = Array.from(at).filter((i) => i.needsMeasurement), e = new Set(t.map((i) => i.element)), n = /* @__PURE__ */ new Map();
944
+ e.forEach((i) => {
945
+ const s = qo(i);
946
+ s.length && (n.set(i, s), i.render());
947
+ }), t.forEach((i) => i.measureInitialState()), e.forEach((i) => {
948
+ i.render();
949
+ const s = n.get(i);
950
+ s && s.forEach(([o, r]) => {
951
+ i.getValue(o)?.set(r);
952
+ });
953
+ }), t.forEach((i) => i.measureEndState()), t.forEach((i) => {
954
+ i.suspendedScrollY !== void 0 && window.scrollTo(0, i.suspendedScrollY);
955
+ });
956
+ }
957
+ Be = !1, ke = !1, at.forEach((t) => t.complete(Fe)), at.clear();
958
+ }
959
+ function bs() {
960
+ at.forEach((t) => {
961
+ t.readKeyframes(), t.needsMeasurement && (Be = !0);
962
+ });
963
+ }
964
+ function Zo() {
965
+ Fe = !0, bs(), Ss(), Fe = !1;
966
+ }
967
+ class un {
968
+ constructor(e, n, i, s, o, r = !1) {
969
+ this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = i, this.motionValue = s, this.element = o, this.isAsync = r;
970
+ }
971
+ scheduleResolve() {
972
+ this.state = "scheduled", this.isAsync ? (at.add(this), ke || (ke = !0, A.read(bs), A.resolveKeyframes(Ss))) : (this.readKeyframes(), this.complete());
973
+ }
974
+ readKeyframes() {
975
+ const { unresolvedKeyframes: e, name: n, element: i, motionValue: s } = this;
976
+ if (e[0] === null) {
977
+ const o = s?.get(), r = e[e.length - 1];
978
+ if (o !== void 0)
979
+ e[0] = o;
980
+ else if (i && n) {
981
+ const a = i.readValue(n, r);
982
+ a != null && (e[0] = a);
983
+ }
984
+ e[0] === void 0 && (e[0] = r), s && o === void 0 && s.set(e[0]);
985
+ }
986
+ $o(e);
987
+ }
988
+ setFinalKeyframe() {
989
+ }
990
+ measureInitialState() {
991
+ }
992
+ renderEndStyles() {
993
+ }
994
+ measureEndState() {
995
+ }
996
+ complete(e = !1) {
997
+ this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), at.delete(this);
998
+ }
999
+ cancel() {
1000
+ this.state === "scheduled" && (at.delete(this), this.state = "pending");
1001
+ }
1002
+ resume() {
1003
+ this.state === "pending" && this.scheduleResolve();
1004
+ }
1005
+ }
1006
+ const Jo = (t) => t.startsWith("--");
1007
+ function Qo(t, e, n) {
1008
+ Jo(e) ? t.style.setProperty(e, n) : t.style[e] = n;
1009
+ }
1010
+ const ta = {};
1011
+ function As(t, e) {
1012
+ const n = /* @__PURE__ */ Ji(t);
1013
+ return () => ta[e] ?? n();
1014
+ }
1015
+ const ea = /* @__PURE__ */ As(() => window.ScrollTimeline !== void 0, "scrollTimeline"), Vs = /* @__PURE__ */ As(() => {
1016
+ try {
1017
+ document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1018
+ } catch {
1019
+ return !1;
1020
+ }
1021
+ return !0;
1022
+ }, "linearEasing"), At = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, Wn = {
1023
+ linear: "linear",
1024
+ ease: "ease",
1025
+ easeIn: "ease-in",
1026
+ easeOut: "ease-out",
1027
+ easeInOut: "ease-in-out",
1028
+ circIn: /* @__PURE__ */ At([0, 0.65, 0.55, 1]),
1029
+ circOut: /* @__PURE__ */ At([0.55, 0, 1, 0.45]),
1030
+ backIn: /* @__PURE__ */ At([0.31, 0.01, 0.66, -0.59]),
1031
+ backOut: /* @__PURE__ */ At([0.33, 1.53, 0.69, 0.99])
1032
+ };
1033
+ function Ds(t, e) {
1034
+ if (t)
1035
+ return typeof t == "function" ? Vs() ? xs(t, e) : "ease-out" : cs(t) ? At(t) : Array.isArray(t) ? t.map((n) => Ds(n, e) || Wn.easeOut) : Wn[t];
1036
+ }
1037
+ function na(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, u = void 0) {
1038
+ const c = {
1039
+ [e]: n
1040
+ };
1041
+ l && (c.offset = l);
1042
+ const h = Ds(a, s);
1043
+ Array.isArray(h) && (c.easing = h);
1044
+ const f = {
1045
+ delay: i,
1046
+ duration: s,
1047
+ easing: Array.isArray(h) ? "linear" : h,
1048
+ fill: "both",
1049
+ iterations: o + 1,
1050
+ direction: r === "reverse" ? "alternate" : "normal"
1051
+ };
1052
+ return u && (f.pseudoElement = u), t.animate(c, f);
1053
+ }
1054
+ function Ms(t) {
1055
+ return typeof t == "function" && "applyToOptions" in t;
1056
+ }
1057
+ function ia({ type: t, ...e }) {
1058
+ return Ms(t) && Vs() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
1059
+ }
1060
+ class Cs extends ln {
1061
+ constructor(e) {
1062
+ if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !e)
1063
+ return;
1064
+ const { element: n, name: i, keyframes: s, pseudoElement: o, allowFlatten: r = !1, finalKeyframe: a, onComplete: l } = e;
1065
+ this.isPseudoElement = !!o, this.allowFlatten = r, this.options = e, Y(typeof e.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
1066
+ const u = ia(e);
1067
+ this.animation = na(n, i, s, u, o), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1068
+ if (this.finishedTime = this.time, !o) {
1069
+ const c = an(s, this.options, a, this.speed);
1070
+ this.updateMotionValue && this.updateMotionValue(c), Qo(n, i, c), this.animation.cancel();
1071
+ }
1072
+ l?.(), this.notifyFinished();
1073
+ };
1074
+ }
1075
+ play() {
1076
+ this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
1077
+ }
1078
+ pause() {
1079
+ this.animation.pause();
1080
+ }
1081
+ complete() {
1082
+ this.animation.finish?.();
1083
+ }
1084
+ cancel() {
1085
+ try {
1086
+ this.animation.cancel();
1087
+ } catch {
1088
+ }
1089
+ }
1090
+ stop() {
1091
+ if (this.isStopped)
1092
+ return;
1093
+ this.isStopped = !0;
1094
+ const { state: e } = this;
1095
+ e === "idle" || e === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
1096
+ }
1097
+ /**
1098
+ * WAAPI doesn't natively have any interruption capabilities.
1099
+ *
1100
+ * In this method, we commit styles back to the DOM before cancelling
1101
+ * the animation.
1102
+ *
1103
+ * This is designed to be overridden by NativeAnimationExtended, which
1104
+ * will create a renderless JS animation and sample it twice to calculate
1105
+ * its current value, "previous" value, and therefore allow
1106
+ * Motion to also correctly calculate velocity for any subsequent animation
1107
+ * while deferring the commit until the next animation frame.
1108
+ */
1109
+ commitStyles() {
1110
+ const e = this.options?.element;
1111
+ !this.isPseudoElement && e?.isConnected && this.animation.commitStyles?.();
1112
+ }
1113
+ get duration() {
1114
+ const e = this.animation.effect?.getComputedTiming?.().duration || 0;
1115
+ return /* @__PURE__ */ U(Number(e));
1116
+ }
1117
+ get iterationDuration() {
1118
+ const { delay: e = 0 } = this.options || {};
1119
+ return this.duration + /* @__PURE__ */ U(e);
1120
+ }
1121
+ get time() {
1122
+ return /* @__PURE__ */ U(Number(this.animation.currentTime) || 0);
1123
+ }
1124
+ set time(e) {
1125
+ this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ K(e);
1126
+ }
1127
+ /**
1128
+ * The playback speed of the animation.
1129
+ * 1 = normal speed, 2 = double speed, 0.5 = half speed.
1130
+ */
1131
+ get speed() {
1132
+ return this.animation.playbackRate;
1133
+ }
1134
+ set speed(e) {
1135
+ e < 0 && (this.finishedTime = null), this.animation.playbackRate = e;
1136
+ }
1137
+ get state() {
1138
+ return this.finishedTime !== null ? "finished" : this.animation.playState;
1139
+ }
1140
+ get startTime() {
1141
+ return this.manualStartTime ?? Number(this.animation.startTime);
1142
+ }
1143
+ set startTime(e) {
1144
+ this.manualStartTime = this.animation.startTime = e;
1145
+ }
1146
+ /**
1147
+ * Attaches a timeline to the animation, for instance the `ScrollTimeline`.
1148
+ */
1149
+ attachTimeline({ timeline: e, observe: n }) {
1150
+ return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && ea() ? (this.animation.timeline = e, W) : n(this);
1151
+ }
1152
+ }
1153
+ const Es = {
1154
+ anticipate: rs,
1155
+ backInOut: ss,
1156
+ circInOut: as
1157
+ };
1158
+ function sa(t) {
1159
+ return t in Es;
1160
+ }
1161
+ function ra(t) {
1162
+ typeof t.ease == "string" && sa(t.ease) && (t.ease = Es[t.ease]);
1163
+ }
1164
+ const fe = 10;
1165
+ class oa extends Cs {
1166
+ constructor(e) {
1167
+ ra(e), Ps(e), super(e), e.startTime !== void 0 && (this.startTime = e.startTime), this.options = e;
1168
+ }
1169
+ /**
1170
+ * WAAPI doesn't natively have any interruption capabilities.
1171
+ *
1172
+ * Rather than read committed styles back out of the DOM, we can
1173
+ * create a renderless JS animation and sample it twice to calculate
1174
+ * its current value, "previous" value, and therefore allow
1175
+ * Motion to calculate velocity for any subsequent animation.
1176
+ */
1177
+ updateMotionValue(e) {
1178
+ const { motionValue: n, onUpdate: i, onComplete: s, element: o, ...r } = this.options;
1179
+ if (!n)
1180
+ return;
1181
+ if (e !== void 0) {
1182
+ n.set(e);
1183
+ return;
1184
+ }
1185
+ const a = new cn({
1186
+ ...r,
1187
+ autoplay: !1
1188
+ }), l = Math.max(fe, F.now() - this.startTime), u = X(0, fe, l - fe);
1189
+ n.setWithVelocity(a.sample(Math.max(0, l - u)).value, a.sample(l).value, u), a.stop();
1190
+ }
1191
+ }
1192
+ const Kn = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
1193
+ (H.test(t) || t === "0") && // And it contains numbers and/or colors
1194
+ !t.startsWith("url("));
1195
+ function aa(t) {
1196
+ const e = t[0];
1197
+ if (t.length === 1)
1198
+ return !0;
1199
+ for (let n = 0; n < t.length; n++)
1200
+ if (t[n] !== e)
1201
+ return !0;
1202
+ }
1203
+ function la(t, e, n, i) {
1204
+ const s = t[0];
1205
+ if (s === null)
1206
+ return !1;
1207
+ if (e === "display" || e === "visibility")
1208
+ return !0;
1209
+ const o = t[t.length - 1], r = Kn(s, e), a = Kn(o, e);
1210
+ return Tt(r === a, `You are trying to animate ${e} from "${s}" to "${o}". "${r ? o : s}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 : aa(t) || (n === "spring" || Ms(n)) && i;
1211
+ }
1212
+ function Ie(t) {
1213
+ t.duration = 0, t.type = "keyframes";
1214
+ }
1215
+ const ca = /* @__PURE__ */ new Set([
1216
+ "opacity",
1217
+ "clipPath",
1218
+ "filter",
1219
+ "transform"
1220
+ // TODO: Could be re-enabled now we have support for linear() easing
1221
+ // "background-color"
1222
+ ]), ua = /* @__PURE__ */ Ji(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1223
+ function ha(t) {
1224
+ const { motionValue: e, name: n, repeatDelay: i, repeatType: s, damping: o, type: r } = t;
1225
+ if (!(e?.owner?.current instanceof HTMLElement))
1226
+ return !1;
1227
+ const { onUpdate: l, transformTemplate: u } = e.owner.getProps();
1228
+ return ua() && n && ca.has(n) && (n !== "transform" || !u) && /**
1229
+ * If we're outputting values to onUpdate then we can't use WAAPI as there's
1230
+ * no way to read the value from WAAPI every frame.
1231
+ */
1232
+ !l && !i && s !== "mirror" && o !== 0 && r !== "inertia";
1233
+ }
1234
+ const fa = 40;
1235
+ class da extends ln {
1236
+ constructor({ autoplay: e = !0, delay: n = 0, type: i = "keyframes", repeat: s = 0, repeatDelay: o = 0, repeatType: r = "loop", keyframes: a, name: l, motionValue: u, element: c, ...h }) {
1237
+ super(), this.stop = () => {
1238
+ this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
1239
+ }, this.createdAt = F.now();
1240
+ const f = {
1241
+ autoplay: e,
1242
+ delay: n,
1243
+ type: i,
1244
+ repeat: s,
1245
+ repeatDelay: o,
1246
+ repeatType: r,
1247
+ name: l,
1248
+ motionValue: u,
1249
+ element: c,
1250
+ ...h
1251
+ }, d = c?.KeyframeResolver || un;
1252
+ this.keyframeResolver = new d(a, (m, g, x) => this.onKeyframesResolved(m, g, f, !x), l, u, c), this.keyframeResolver?.scheduleResolve();
1253
+ }
1254
+ onKeyframesResolved(e, n, i, s) {
1255
+ this.keyframeResolver = void 0;
1256
+ const { name: o, type: r, velocity: a, delay: l, isHandoff: u, onUpdate: c } = i;
1257
+ this.resolvedAt = F.now(), la(e, o, r, a) || ((q.instantAnimations || !l) && c?.(an(e, i, n)), e[0] = e[e.length - 1], Ie(i), i.repeat = 0);
1258
+ const f = {
1259
+ startTime: s ? this.resolvedAt ? this.resolvedAt - this.createdAt > fa ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1260
+ finalKeyframe: n,
1261
+ ...i,
1262
+ keyframes: e
1263
+ }, d = !u && ha(f), m = f.motionValue?.owner?.current, g = d ? new oa({
1264
+ ...f,
1265
+ element: m
1266
+ }) : new cn(f);
1267
+ g.finished.then(() => {
1268
+ this.notifyFinished();
1269
+ }).catch(W), this.pendingTimeline && (this.stopTimeline = g.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = g;
1270
+ }
1271
+ get finished() {
1272
+ return this._animation ? this.animation.finished : this._finished;
1273
+ }
1274
+ then(e, n) {
1275
+ return this.finished.finally(e).then(() => {
1276
+ });
1277
+ }
1278
+ get animation() {
1279
+ return this._animation || (this.keyframeResolver?.resume(), Zo()), this._animation;
1280
+ }
1281
+ get duration() {
1282
+ return this.animation.duration;
1283
+ }
1284
+ get iterationDuration() {
1285
+ return this.animation.iterationDuration;
1286
+ }
1287
+ get time() {
1288
+ return this.animation.time;
1289
+ }
1290
+ set time(e) {
1291
+ this.animation.time = e;
1292
+ }
1293
+ get speed() {
1294
+ return this.animation.speed;
1295
+ }
1296
+ get state() {
1297
+ return this.animation.state;
1298
+ }
1299
+ set speed(e) {
1300
+ this.animation.speed = e;
1301
+ }
1302
+ get startTime() {
1303
+ return this.animation.startTime;
1304
+ }
1305
+ attachTimeline(e) {
1306
+ return this._animation ? this.stopTimeline = this.animation.attachTimeline(e) : this.pendingTimeline = e, () => this.stop();
1307
+ }
1308
+ play() {
1309
+ this.animation.play();
1310
+ }
1311
+ pause() {
1312
+ this.animation.pause();
1313
+ }
1314
+ complete() {
1315
+ this.animation.complete();
1316
+ }
1317
+ cancel() {
1318
+ this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
1319
+ }
1320
+ }
1321
+ function Rs(t, e, n, i = 0, s = 1) {
1322
+ const o = Array.from(t).sort((u, c) => u.sortNodePosition(c)).indexOf(e), r = t.size, a = (r - 1) * i;
1323
+ return typeof n == "function" ? n(o, r) : s === 1 ? o * i : a - o * i;
1324
+ }
1325
+ const ma = (
1326
+ // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1327
+ /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1328
+ );
1329
+ function pa(t) {
1330
+ const e = ma.exec(t);
1331
+ if (!e)
1332
+ return [,];
1333
+ const [, n, i, s] = e;
1334
+ return [`--${n ?? i}`, s];
1335
+ }
1336
+ const ga = 4;
1337
+ function Ls(t, e, n = 1) {
1338
+ Y(n <= ga, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1339
+ const [i, s] = pa(t);
1340
+ if (!i)
1341
+ return;
1342
+ const o = window.getComputedStyle(e).getPropertyValue(i);
1343
+ if (o) {
1344
+ const r = o.trim();
1345
+ return Yi(r) ? parseFloat(r) : r;
1346
+ }
1347
+ return en(s) ? Ls(s, e, n + 1) : s;
1348
+ }
1349
+ const ya = {
1350
+ type: "spring",
1351
+ stiffness: 500,
1352
+ damping: 25,
1353
+ restSpeed: 10
1354
+ }, va = (t) => ({
1355
+ type: "spring",
1356
+ stiffness: 550,
1357
+ damping: t === 0 ? 2 * Math.sqrt(550) : 30,
1358
+ restSpeed: 10
1359
+ }), Ta = {
1360
+ type: "keyframes",
1361
+ duration: 0.8
1362
+ }, xa = {
1363
+ type: "keyframes",
1364
+ ease: [0.25, 0.1, 0.35, 1],
1365
+ duration: 0.3
1366
+ }, wa = (t, { keyframes: e }) => e.length > 2 ? Ta : Pt.has(t) ? t.startsWith("scale") ? va(e[1]) : ya : xa, Pa = (t) => t !== null;
1367
+ function Sa(t, { repeat: e, repeatType: n = "loop" }, i) {
1368
+ const s = t.filter(Pa), o = e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
1369
+ return s[o];
1370
+ }
1371
+ function ks(t, e) {
1372
+ if (t?.inherit && e) {
1373
+ const { inherit: n, ...i } = t;
1374
+ return { ...e, ...i };
1375
+ }
1376
+ return t;
1377
+ }
1378
+ function hn(t, e) {
1379
+ const n = t?.[e] ?? t?.default ?? t;
1380
+ return n !== t ? ks(n, t) : n;
1381
+ }
1382
+ function ba({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
1383
+ return !!Object.keys(c).length;
1384
+ }
1385
+ const fn = (t, e, n, i = {}, s, o) => (r) => {
1386
+ const a = hn(i, t) || {}, l = a.delay || i.delay || 0;
1387
+ let { elapsed: u = 0 } = i;
1388
+ u = u - /* @__PURE__ */ K(l);
1389
+ const c = {
1390
+ keyframes: Array.isArray(n) ? n : [null, n],
1391
+ ease: "easeOut",
1392
+ velocity: e.getVelocity(),
1393
+ ...a,
1394
+ delay: -u,
1395
+ onUpdate: (f) => {
1396
+ e.set(f), a.onUpdate && a.onUpdate(f);
1397
+ },
1398
+ onComplete: () => {
1399
+ r(), a.onComplete && a.onComplete();
1400
+ },
1401
+ name: t,
1402
+ motionValue: e,
1403
+ element: o ? void 0 : s
1404
+ };
1405
+ ba(a) || Object.assign(c, wa(t, c)), c.duration && (c.duration = /* @__PURE__ */ K(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ K(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
1406
+ let h = !1;
1407
+ if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (Ie(c), c.delay === 0 && (h = !0)), (q.instantAnimations || q.skipAnimations || s?.shouldSkipAnimations) && (h = !0, Ie(c), c.delay = 0), c.allowFlatten = !a.type && !a.ease, h && !o && e.get() !== void 0) {
1408
+ const f = Sa(c.keyframes, a);
1409
+ if (f !== void 0) {
1410
+ A.update(() => {
1411
+ c.onUpdate(f), c.onComplete();
1412
+ });
1413
+ return;
1414
+ }
1415
+ }
1416
+ return a.isSync ? new cn(c) : new da(c);
1417
+ };
1418
+ function $n(t) {
1419
+ const e = [{}, {}];
1420
+ return t?.values.forEach((n, i) => {
1421
+ e[0][i] = n.get(), e[1][i] = n.getVelocity();
1422
+ }), e;
1423
+ }
1424
+ function dn(t, e, n, i) {
1425
+ if (typeof e == "function") {
1426
+ const [s, o] = $n(i);
1427
+ e = e(n !== void 0 ? n : t.custom, s, o);
1428
+ }
1429
+ if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
1430
+ const [s, o] = $n(i);
1431
+ e = e(n !== void 0 ? n : t.custom, s, o);
1432
+ }
1433
+ return e;
1434
+ }
1435
+ function gt(t, e, n) {
1436
+ const i = t.getProps();
1437
+ return dn(i, e, n !== void 0 ? n : i.custom, t);
1438
+ }
1439
+ const Bs = /* @__PURE__ */ new Set([
1440
+ "width",
1441
+ "height",
1442
+ "top",
1443
+ "left",
1444
+ "right",
1445
+ "bottom",
1446
+ ...wt
1447
+ ]), zn = 30, Aa = (t) => !isNaN(parseFloat(t));
1448
+ class Va {
1449
+ /**
1450
+ * @param init - The initiating value
1451
+ * @param config - Optional configuration options
1452
+ *
1453
+ * - `transformer`: A function to transform incoming values with.
1454
+ */
1455
+ constructor(e, n = {}) {
1456
+ this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (i) => {
1457
+ const s = F.now();
1458
+ if (this.updatedAt !== s && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(i), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
1459
+ for (const o of this.dependents)
1460
+ o.dirty();
1461
+ }, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
1462
+ }
1463
+ setCurrent(e) {
1464
+ this.current = e, this.updatedAt = F.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Aa(this.current));
1465
+ }
1466
+ setPrevFrameValue(e = this.current) {
1467
+ this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
1468
+ }
1469
+ /**
1470
+ * Adds a function that will be notified when the `MotionValue` is updated.
1471
+ *
1472
+ * It returns a function that, when called, will cancel the subscription.
1473
+ *
1474
+ * When calling `onChange` inside a React component, it should be wrapped with the
1475
+ * `useEffect` hook. As it returns an unsubscribe function, this should be returned
1476
+ * from the `useEffect` function to ensure you don't add duplicate subscribers..
1477
+ *
1478
+ * ```jsx
1479
+ * export const MyComponent = () => {
1480
+ * const x = useMotionValue(0)
1481
+ * const y = useMotionValue(0)
1482
+ * const opacity = useMotionValue(1)
1483
+ *
1484
+ * useEffect(() => {
1485
+ * function updateOpacity() {
1486
+ * const maxXY = Math.max(x.get(), y.get())
1487
+ * const newOpacity = transform(maxXY, [0, 100], [1, 0])
1488
+ * opacity.set(newOpacity)
1489
+ * }
1490
+ *
1491
+ * const unsubscribeX = x.on("change", updateOpacity)
1492
+ * const unsubscribeY = y.on("change", updateOpacity)
1493
+ *
1494
+ * return () => {
1495
+ * unsubscribeX()
1496
+ * unsubscribeY()
1497
+ * }
1498
+ * }, [])
1499
+ *
1500
+ * return <motion.div style={{ x }} />
1501
+ * }
1502
+ * ```
1503
+ *
1504
+ * @param subscriber - A function that receives the latest value.
1505
+ * @returns A function that, when called, will cancel this subscription.
1506
+ *
1507
+ * @deprecated
1508
+ */
1509
+ onChange(e) {
1510
+ return process.env.NODE_ENV !== "production" && Je(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
1511
+ }
1512
+ on(e, n) {
1513
+ this.events[e] || (this.events[e] = new Ze());
1514
+ const i = this.events[e].add(n);
1515
+ return e === "change" ? () => {
1516
+ i(), A.read(() => {
1517
+ this.events.change.getSize() || this.stop();
1518
+ });
1519
+ } : i;
1520
+ }
1521
+ clearListeners() {
1522
+ for (const e in this.events)
1523
+ this.events[e].clear();
1524
+ }
1525
+ /**
1526
+ * Attaches a passive effect to the `MotionValue`.
1527
+ */
1528
+ attach(e, n) {
1529
+ this.passiveEffect = e, this.stopPassiveEffect = n;
1530
+ }
1531
+ /**
1532
+ * Sets the state of the `MotionValue`.
1533
+ *
1534
+ * @remarks
1535
+ *
1536
+ * ```jsx
1537
+ * const x = useMotionValue(0)
1538
+ * x.set(10)
1539
+ * ```
1540
+ *
1541
+ * @param latest - Latest value to set.
1542
+ * @param render - Whether to notify render subscribers. Defaults to `true`
1543
+ *
1544
+ * @public
1545
+ */
1546
+ set(e) {
1547
+ this.passiveEffect ? this.passiveEffect(e, this.updateAndNotify) : this.updateAndNotify(e);
1548
+ }
1549
+ setWithVelocity(e, n, i) {
1550
+ this.set(n), this.prev = void 0, this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt - i;
1551
+ }
1552
+ /**
1553
+ * Set the state of the `MotionValue`, stopping any active animations,
1554
+ * effects, and resets velocity to `0`.
1555
+ */
1556
+ jump(e, n = !0) {
1557
+ this.updateAndNotify(e), this.prev = e, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1558
+ }
1559
+ dirty() {
1560
+ this.events.change?.notify(this.current);
1561
+ }
1562
+ addDependent(e) {
1563
+ this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(e);
1564
+ }
1565
+ removeDependent(e) {
1566
+ this.dependents && this.dependents.delete(e);
1567
+ }
1568
+ /**
1569
+ * Returns the latest state of `MotionValue`
1570
+ *
1571
+ * @returns - The latest state of `MotionValue`
1572
+ *
1573
+ * @public
1574
+ */
1575
+ get() {
1576
+ return this.current;
1577
+ }
1578
+ /**
1579
+ * @public
1580
+ */
1581
+ getPrevious() {
1582
+ return this.prev;
1583
+ }
1584
+ /**
1585
+ * Returns the latest velocity of `MotionValue`
1586
+ *
1587
+ * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
1588
+ *
1589
+ * @public
1590
+ */
1591
+ getVelocity() {
1592
+ const e = F.now();
1593
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > zn)
1594
+ return 0;
1595
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, zn);
1596
+ return Qi(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1597
+ }
1598
+ /**
1599
+ * Registers a new animation to control this `MotionValue`. Only one
1600
+ * animation can drive a `MotionValue` at one time.
1601
+ *
1602
+ * ```jsx
1603
+ * value.start()
1604
+ * ```
1605
+ *
1606
+ * @param animation - A function that starts the provided animation
1607
+ */
1608
+ start(e) {
1609
+ return this.stop(), new Promise((n) => {
1610
+ this.hasAnimated = !0, this.animation = e(n), this.events.animationStart && this.events.animationStart.notify();
1611
+ }).then(() => {
1612
+ this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
1613
+ });
1614
+ }
1615
+ /**
1616
+ * Stop the currently active animation.
1617
+ *
1618
+ * @public
1619
+ */
1620
+ stop() {
1621
+ this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
1622
+ }
1623
+ /**
1624
+ * Returns `true` if this value is currently animating.
1625
+ *
1626
+ * @public
1627
+ */
1628
+ isAnimating() {
1629
+ return !!this.animation;
1630
+ }
1631
+ clearAnimation() {
1632
+ delete this.animation;
1633
+ }
1634
+ /**
1635
+ * Destroy and clean up subscribers to this `MotionValue`.
1636
+ *
1637
+ * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
1638
+ * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
1639
+ * created a `MotionValue` via the `motionValue` function.
1640
+ *
1641
+ * @public
1642
+ */
1643
+ destroy() {
1644
+ this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1645
+ }
1646
+ }
1647
+ function yt(t, e) {
1648
+ return new Va(t, e);
1649
+ }
1650
+ const Oe = (t) => Array.isArray(t);
1651
+ function Da(t, e, n) {
1652
+ t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, yt(n));
1653
+ }
1654
+ function Ma(t) {
1655
+ return Oe(t) ? t[t.length - 1] || 0 : t;
1656
+ }
1657
+ function Ca(t, e) {
1658
+ const n = gt(t, e);
1659
+ let { transitionEnd: i = {}, transition: s = {}, ...o } = n || {};
1660
+ o = { ...o, ...i };
1661
+ for (const r in o) {
1662
+ const a = Ma(o[r]);
1663
+ Da(t, r, a);
1664
+ }
1665
+ }
1666
+ const k = (t) => !!(t && t.getVelocity);
1667
+ function Ea(t) {
1668
+ return !!(k(t) && t.add);
1669
+ }
1670
+ function je(t, e) {
1671
+ const n = t.getValue("willChange");
1672
+ if (Ea(n))
1673
+ return n.add(e);
1674
+ if (!n && q.WillChange) {
1675
+ const i = new q.WillChange("auto");
1676
+ t.addValue("willChange", i), i.add(e);
1677
+ }
1678
+ }
1679
+ function mn(t) {
1680
+ return t.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
1681
+ }
1682
+ const Ra = "framerAppearId", Fs = "data-" + mn(Ra);
1683
+ function Is(t) {
1684
+ return t.props[Fs];
1685
+ }
1686
+ function La({ protectedKeys: t, needsAnimating: e }, n) {
1687
+ const i = t.hasOwnProperty(n) && e[n] !== !0;
1688
+ return e[n] = !1, i;
1689
+ }
1690
+ function Os(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
1691
+ let { transition: o, transitionEnd: r, ...a } = e;
1692
+ const l = t.getDefaultTransition();
1693
+ o = o ? ks(o, l) : l;
1694
+ const u = o?.reduceMotion;
1695
+ i && (o = i);
1696
+ const c = [], h = s && t.animationState && t.animationState.getState()[s];
1697
+ for (const f in a) {
1698
+ const d = t.getValue(f, t.latestValues[f] ?? null), m = a[f];
1699
+ if (m === void 0 || h && La(h, f))
1700
+ continue;
1701
+ const g = {
1702
+ delay: n,
1703
+ ...hn(o || {}, f)
1704
+ }, x = d.get();
1705
+ if (x !== void 0 && !d.isAnimating && !Array.isArray(m) && m === x && !g.velocity)
1706
+ continue;
1707
+ let v = !1;
1708
+ if (window.MotionHandoffAnimation) {
1709
+ const P = Is(t);
1710
+ if (P) {
1711
+ const w = window.MotionHandoffAnimation(P, f, A);
1712
+ w !== null && (g.startTime = w, v = !0);
1713
+ }
1714
+ }
1715
+ je(t, f);
1716
+ const T = u ?? t.shouldReduceMotion;
1717
+ d.start(fn(f, d, m, T && Bs.has(f) ? { type: !1 } : g, t, v));
1718
+ const p = d.animation;
1719
+ p && c.push(p);
1720
+ }
1721
+ if (r) {
1722
+ const f = () => A.update(() => {
1723
+ r && Ca(t, r);
1724
+ });
1725
+ c.length ? Promise.all(c).then(f) : f();
1726
+ }
1727
+ return c;
1728
+ }
1729
+ function Ne(t, e, n = {}) {
1730
+ const i = gt(t, e, n.type === "exit" ? t.presenceContext?.custom : void 0);
1731
+ let { transition: s = t.getDefaultTransition() || {} } = i || {};
1732
+ n.transitionOverride && (s = n.transitionOverride);
1733
+ const o = i ? () => Promise.all(Os(t, i, n)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (l = 0) => {
1734
+ const { delayChildren: u = 0, staggerChildren: c, staggerDirection: h } = s;
1735
+ return ka(t, e, l, u, c, h, n);
1736
+ } : () => Promise.resolve(), { when: a } = s;
1737
+ if (a) {
1738
+ const [l, u] = a === "beforeChildren" ? [o, r] : [r, o];
1739
+ return l().then(() => u());
1740
+ } else
1741
+ return Promise.all([o(), r(n.delay)]);
1742
+ }
1743
+ function ka(t, e, n = 0, i = 0, s = 0, o = 1, r) {
1744
+ const a = [];
1745
+ for (const l of t.variantChildren)
1746
+ l.notify("AnimationStart", e), a.push(Ne(l, e, {
1747
+ ...r,
1748
+ delay: n + (typeof i == "function" ? 0 : i) + Rs(t.variantChildren, l, i, s, o)
1749
+ }).then(() => l.notify("AnimationComplete", e)));
1750
+ return Promise.all(a);
1751
+ }
1752
+ function Ba(t, e, n = {}) {
1753
+ t.notify("AnimationStart", e);
1754
+ let i;
1755
+ if (Array.isArray(e)) {
1756
+ const s = e.map((o) => Ne(t, o, n));
1757
+ i = Promise.all(s);
1758
+ } else if (typeof e == "string")
1759
+ i = Ne(t, e, n);
1760
+ else {
1761
+ const s = typeof e == "function" ? gt(t, e, n.custom) : e;
1762
+ i = Promise.all(Os(t, s, n));
1763
+ }
1764
+ return i.then(() => {
1765
+ t.notify("AnimationComplete", e);
1766
+ });
1767
+ }
1768
+ const Fa = {
1769
+ test: (t) => t === "auto",
1770
+ parse: (t) => t
1771
+ }, js = (t) => (e) => e.test(t), Ns = [xt, y, _, Z, lo, ao, Fa], Hn = (t) => Ns.find(js(t));
1772
+ function Ia(t) {
1773
+ return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Zi(t) : !0;
1774
+ }
1775
+ const Oa = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1776
+ function ja(t) {
1777
+ const [e, n] = t.slice(0, -1).split("(");
1778
+ if (e === "drop-shadow")
1779
+ return t;
1780
+ const [i] = n.match(nn) || [];
1781
+ if (!i)
1782
+ return t;
1783
+ const s = n.replace(i, "");
1784
+ let o = Oa.has(e) ? 1 : 0;
1785
+ return i !== n && (o *= 100), e + "(" + o + s + ")";
1786
+ }
1787
+ const Na = /\b([a-z-]*)\(.*?\)/gu, Ue = {
1788
+ ...H,
1789
+ getAnimatableNone: (t) => {
1790
+ const e = t.match(Na);
1791
+ return e ? e.map(ja).join(" ") : t;
1792
+ }
1793
+ }, We = {
1794
+ ...H,
1795
+ getAnimatableNone: (t) => {
1796
+ const e = H.parse(t);
1797
+ return H.createTransformer(t)(e.map((i) => typeof i == "number" ? 0 : typeof i == "object" ? { ...i, alpha: 1 } : i));
1798
+ }
1799
+ }, Gn = {
1800
+ ...xt,
1801
+ transform: Math.round
1802
+ }, Ua = {
1803
+ rotate: Z,
1804
+ rotateX: Z,
1805
+ rotateY: Z,
1806
+ rotateZ: Z,
1807
+ scale: Nt,
1808
+ scaleX: Nt,
1809
+ scaleY: Nt,
1810
+ scaleZ: Nt,
1811
+ skew: Z,
1812
+ skewX: Z,
1813
+ skewY: Z,
1814
+ distance: y,
1815
+ translateX: y,
1816
+ translateY: y,
1817
+ translateZ: y,
1818
+ x: y,
1819
+ y,
1820
+ z: y,
1821
+ perspective: y,
1822
+ transformPerspective: y,
1823
+ opacity: Et,
1824
+ originX: Ln,
1825
+ originY: Ln,
1826
+ originZ: y
1827
+ }, pn = {
1828
+ // Border props
1829
+ borderWidth: y,
1830
+ borderTopWidth: y,
1831
+ borderRightWidth: y,
1832
+ borderBottomWidth: y,
1833
+ borderLeftWidth: y,
1834
+ borderRadius: y,
1835
+ borderTopLeftRadius: y,
1836
+ borderTopRightRadius: y,
1837
+ borderBottomRightRadius: y,
1838
+ borderBottomLeftRadius: y,
1839
+ // Positioning props
1840
+ width: y,
1841
+ maxWidth: y,
1842
+ height: y,
1843
+ maxHeight: y,
1844
+ top: y,
1845
+ right: y,
1846
+ bottom: y,
1847
+ left: y,
1848
+ inset: y,
1849
+ insetBlock: y,
1850
+ insetBlockStart: y,
1851
+ insetBlockEnd: y,
1852
+ insetInline: y,
1853
+ insetInlineStart: y,
1854
+ insetInlineEnd: y,
1855
+ // Spacing props
1856
+ padding: y,
1857
+ paddingTop: y,
1858
+ paddingRight: y,
1859
+ paddingBottom: y,
1860
+ paddingLeft: y,
1861
+ paddingBlock: y,
1862
+ paddingBlockStart: y,
1863
+ paddingBlockEnd: y,
1864
+ paddingInline: y,
1865
+ paddingInlineStart: y,
1866
+ paddingInlineEnd: y,
1867
+ margin: y,
1868
+ marginTop: y,
1869
+ marginRight: y,
1870
+ marginBottom: y,
1871
+ marginLeft: y,
1872
+ marginBlock: y,
1873
+ marginBlockStart: y,
1874
+ marginBlockEnd: y,
1875
+ marginInline: y,
1876
+ marginInlineStart: y,
1877
+ marginInlineEnd: y,
1878
+ // Typography
1879
+ fontSize: y,
1880
+ // Misc
1881
+ backgroundPositionX: y,
1882
+ backgroundPositionY: y,
1883
+ ...Ua,
1884
+ zIndex: Gn,
1885
+ // SVG
1886
+ fillOpacity: Et,
1887
+ strokeOpacity: Et,
1888
+ numOctaves: Gn
1889
+ }, Wa = {
1890
+ ...pn,
1891
+ // Color props
1892
+ color: C,
1893
+ backgroundColor: C,
1894
+ outlineColor: C,
1895
+ fill: C,
1896
+ stroke: C,
1897
+ // Border props
1898
+ borderColor: C,
1899
+ borderTopColor: C,
1900
+ borderRightColor: C,
1901
+ borderBottomColor: C,
1902
+ borderLeftColor: C,
1903
+ filter: Ue,
1904
+ WebkitFilter: Ue,
1905
+ mask: We,
1906
+ WebkitMask: We
1907
+ }, Us = (t) => Wa[t], Ka = /* @__PURE__ */ new Set([Ue, We]);
1908
+ function Ws(t, e) {
1909
+ let n = Us(t);
1910
+ return Ka.has(n) || (n = H), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
1911
+ }
1912
+ const $a = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1913
+ function za(t, e, n) {
1914
+ let i = 0, s;
1915
+ for (; i < t.length && !s; ) {
1916
+ const o = t[i];
1917
+ typeof o == "string" && !$a.has(o) && Rt(o).values.length && (s = t[i]), i++;
1918
+ }
1919
+ if (s && n)
1920
+ for (const o of e)
1921
+ t[o] = Ws(n, s);
1922
+ }
1923
+ class Ha extends un {
1924
+ constructor(e, n, i, s, o) {
1925
+ super(e, n, i, s, o, !0);
1926
+ }
1927
+ readKeyframes() {
1928
+ const { unresolvedKeyframes: e, element: n, name: i } = this;
1929
+ if (!n || !n.current)
1930
+ return;
1931
+ super.readKeyframes();
1932
+ for (let c = 0; c < e.length; c++) {
1933
+ let h = e[c];
1934
+ if (typeof h == "string" && (h = h.trim(), en(h))) {
1935
+ const f = Ls(h, n.current);
1936
+ f !== void 0 && (e[c] = f), c === e.length - 1 && (this.finalKeyframe = h);
1937
+ }
1938
+ }
1939
+ if (this.resolveNoneKeyframes(), !Bs.has(i) || e.length !== 2)
1940
+ return;
1941
+ const [s, o] = e, r = Hn(s), a = Hn(o), l = Rn(s), u = Rn(o);
1942
+ if (l !== u && J[i]) {
1943
+ this.needsMeasurement = !0;
1944
+ return;
1945
+ }
1946
+ if (r !== a)
1947
+ if (Un(r) && Un(a))
1948
+ for (let c = 0; c < e.length; c++) {
1949
+ const h = e[c];
1950
+ typeof h == "string" && (e[c] = parseFloat(h));
1951
+ }
1952
+ else J[i] && (this.needsMeasurement = !0);
1953
+ }
1954
+ resolveNoneKeyframes() {
1955
+ const { unresolvedKeyframes: e, name: n } = this, i = [];
1956
+ for (let s = 0; s < e.length; s++)
1957
+ (e[s] === null || Ia(e[s])) && i.push(s);
1958
+ i.length && za(e, i, n);
1959
+ }
1960
+ measureInitialState() {
1961
+ const { element: e, unresolvedKeyframes: n, name: i } = this;
1962
+ if (!e || !e.current)
1963
+ return;
1964
+ i === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = J[i](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
1965
+ const s = n[n.length - 1];
1966
+ s !== void 0 && e.getValue(i, s).jump(s, !1);
1967
+ }
1968
+ measureEndState() {
1969
+ const { element: e, name: n, unresolvedKeyframes: i } = this;
1970
+ if (!e || !e.current)
1971
+ return;
1972
+ const s = e.getValue(n);
1973
+ s && s.jump(this.measuredOrigin, !1);
1974
+ const o = i.length - 1, r = i[o];
1975
+ i[o] = J[n](e.measureViewportBox(), window.getComputedStyle(e.current)), r !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = r), this.removedTransforms?.length && this.removedTransforms.forEach(([a, l]) => {
1976
+ e.getValue(a).set(l);
1977
+ }), this.resolveNoneKeyframes();
1978
+ }
1979
+ }
1980
+ const Ga = /* @__PURE__ */ new Set([
1981
+ "opacity",
1982
+ "clipPath",
1983
+ "filter",
1984
+ "transform"
1985
+ // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
1986
+ // or until we implement support for linear() easing.
1987
+ // "background-color"
1988
+ ]);
1989
+ function Ks(t, e, n) {
1990
+ if (t == null)
1991
+ return [];
1992
+ if (t instanceof EventTarget)
1993
+ return [t];
1994
+ if (typeof t == "string") {
1995
+ let i = document;
1996
+ const s = n?.[t] ?? i.querySelectorAll(t);
1997
+ return s ? Array.from(s) : [];
1998
+ }
1999
+ return Array.from(t).filter((i) => i != null);
2000
+ }
2001
+ const $s = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
2002
+ function _a(t) {
2003
+ return qi(t) && "offsetHeight" in t;
2004
+ }
2005
+ const { schedule: gn } = /* @__PURE__ */ us(queueMicrotask, !1), z = {
2006
+ x: !1,
2007
+ y: !1
2008
+ };
2009
+ function zs() {
2010
+ return z.x || z.y;
2011
+ }
2012
+ function Xa(t) {
2013
+ return t === "x" || t === "y" ? z[t] ? null : (z[t] = !0, () => {
2014
+ z[t] = !1;
2015
+ }) : z.x || z.y ? null : (z.x = z.y = !0, () => {
2016
+ z.x = z.y = !1;
2017
+ });
2018
+ }
2019
+ function Hs(t, e) {
2020
+ const n = Ks(t), i = new AbortController(), s = {
2021
+ passive: !0,
2022
+ ...e,
2023
+ signal: i.signal
2024
+ };
2025
+ return [n, s, () => i.abort()];
2026
+ }
2027
+ function Ya(t) {
2028
+ return !(t.pointerType === "touch" || zs());
2029
+ }
2030
+ function qa(t, e, n = {}) {
2031
+ const [i, s, o] = Hs(t, n);
2032
+ return i.forEach((r) => {
2033
+ let a = !1, l = !1, u;
2034
+ const c = () => {
2035
+ r.removeEventListener("pointerleave", m);
2036
+ }, h = (x) => {
2037
+ u && (u(x), u = void 0), c();
2038
+ }, f = (x) => {
2039
+ a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), l && (l = !1, h(x));
2040
+ }, d = () => {
2041
+ a = !0, window.addEventListener("pointerup", f, s), window.addEventListener("pointercancel", f, s);
2042
+ }, m = (x) => {
2043
+ if (x.pointerType !== "touch") {
2044
+ if (a) {
2045
+ l = !0;
2046
+ return;
2047
+ }
2048
+ h(x);
2049
+ }
2050
+ }, g = (x) => {
2051
+ if (!Ya(x))
2052
+ return;
2053
+ l = !1;
2054
+ const v = e(r, x);
2055
+ typeof v == "function" && (u = v, r.addEventListener("pointerleave", m, s));
2056
+ };
2057
+ r.addEventListener("pointerenter", g, s), r.addEventListener("pointerdown", d, s);
2058
+ }), o;
2059
+ }
2060
+ const Gs = (t, e) => e ? t === e ? !0 : Gs(t, e.parentElement) : !1, yn = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, Za = /* @__PURE__ */ new Set([
2061
+ "BUTTON",
2062
+ "INPUT",
2063
+ "SELECT",
2064
+ "TEXTAREA",
2065
+ "A"
2066
+ ]);
2067
+ function Ja(t) {
2068
+ return Za.has(t.tagName) || t.isContentEditable === !0;
2069
+ }
2070
+ const Qa = /* @__PURE__ */ new Set(["INPUT", "SELECT", "TEXTAREA"]);
2071
+ function tl(t) {
2072
+ return Qa.has(t.tagName) || t.isContentEditable === !0;
2073
+ }
2074
+ const Kt = /* @__PURE__ */ new WeakSet();
2075
+ function _n(t) {
2076
+ return (e) => {
2077
+ e.key === "Enter" && t(e);
2078
+ };
2079
+ }
2080
+ function de(t, e) {
2081
+ t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
2082
+ }
2083
+ const el = (t, e) => {
2084
+ const n = t.currentTarget;
2085
+ if (!n)
2086
+ return;
2087
+ const i = _n(() => {
2088
+ if (Kt.has(n))
2089
+ return;
2090
+ de(n, "down");
2091
+ const s = _n(() => {
2092
+ de(n, "up");
2093
+ }), o = () => de(n, "cancel");
2094
+ n.addEventListener("keyup", s, e), n.addEventListener("blur", o, e);
2095
+ });
2096
+ n.addEventListener("keydown", i, e), n.addEventListener("blur", () => n.removeEventListener("keydown", i), e);
2097
+ };
2098
+ function Xn(t) {
2099
+ return yn(t) && !zs();
2100
+ }
2101
+ const Yn = /* @__PURE__ */ new WeakSet();
2102
+ function nl(t, e, n = {}) {
2103
+ const [i, s, o] = Hs(t, n), r = (a) => {
2104
+ const l = a.currentTarget;
2105
+ if (!Xn(a) || Yn.has(a))
2106
+ return;
2107
+ Kt.add(l), n.stopPropagation && Yn.add(a);
2108
+ const u = e(l, a), c = (d, m) => {
2109
+ window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), Kt.has(l) && Kt.delete(l), Xn(d) && typeof u == "function" && u(d, { success: m });
2110
+ }, h = (d) => {
2111
+ c(d, l === window || l === document || n.useGlobalTarget || Gs(l, d.target));
2112
+ }, f = (d) => {
2113
+ c(d, !1);
2114
+ };
2115
+ window.addEventListener("pointerup", h, s), window.addEventListener("pointercancel", f, s);
2116
+ };
2117
+ return i.forEach((a) => {
2118
+ (n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, s), _a(a) && (a.addEventListener("focus", (u) => el(u, s)), !Ja(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
2119
+ }), o;
2120
+ }
2121
+ function vn(t) {
2122
+ return qi(t) && "ownerSVGElement" in t;
2123
+ }
2124
+ const $t = /* @__PURE__ */ new WeakMap();
2125
+ let zt;
2126
+ const _s = (t, e, n) => (i, s) => s && s[0] ? s[0][t + "Size"] : vn(i) && "getBBox" in i ? i.getBBox()[e] : i[n], il = /* @__PURE__ */ _s("inline", "width", "offsetWidth"), sl = /* @__PURE__ */ _s("block", "height", "offsetHeight");
2127
+ function rl({ target: t, borderBoxSize: e }) {
2128
+ $t.get(t)?.forEach((n) => {
2129
+ n(t, {
2130
+ get width() {
2131
+ return il(t, e);
2132
+ },
2133
+ get height() {
2134
+ return sl(t, e);
2135
+ }
2136
+ });
2137
+ });
2138
+ }
2139
+ function ol(t) {
2140
+ t.forEach(rl);
2141
+ }
2142
+ function al() {
2143
+ typeof ResizeObserver > "u" || (zt = new ResizeObserver(ol));
2144
+ }
2145
+ function ll(t, e) {
2146
+ zt || al();
2147
+ const n = Ks(t);
2148
+ return n.forEach((i) => {
2149
+ let s = $t.get(i);
2150
+ s || (s = /* @__PURE__ */ new Set(), $t.set(i, s)), s.add(e), zt?.observe(i);
2151
+ }), () => {
2152
+ n.forEach((i) => {
2153
+ const s = $t.get(i);
2154
+ s?.delete(e), s?.size || zt?.unobserve(i);
2155
+ });
2156
+ };
2157
+ }
2158
+ const Ht = /* @__PURE__ */ new Set();
2159
+ let ft;
2160
+ function cl() {
2161
+ ft = () => {
2162
+ const t = {
2163
+ get width() {
2164
+ return window.innerWidth;
2165
+ },
2166
+ get height() {
2167
+ return window.innerHeight;
2168
+ }
2169
+ };
2170
+ Ht.forEach((e) => e(t));
2171
+ }, window.addEventListener("resize", ft);
2172
+ }
2173
+ function ul(t) {
2174
+ return Ht.add(t), ft || cl(), () => {
2175
+ Ht.delete(t), !Ht.size && typeof ft == "function" && (window.removeEventListener("resize", ft), ft = void 0);
2176
+ };
2177
+ }
2178
+ function qn(t, e) {
2179
+ return typeof t == "function" ? ul(t) : ll(t, e);
2180
+ }
2181
+ function hl(t) {
2182
+ return vn(t) && t.tagName === "svg";
2183
+ }
2184
+ const fl = [...Ns, C, H], dl = (t) => fl.find(js(t)), Zn = () => ({
2185
+ translate: 0,
2186
+ scale: 1,
2187
+ origin: 0,
2188
+ originPoint: 0
2189
+ }), dt = () => ({
2190
+ x: Zn(),
2191
+ y: Zn()
2192
+ }), Jn = () => ({ min: 0, max: 0 }), E = () => ({
2193
+ x: Jn(),
2194
+ y: Jn()
2195
+ }), ml = /* @__PURE__ */ new WeakMap();
2196
+ function ie(t) {
2197
+ return t !== null && typeof t == "object" && typeof t.start == "function";
2198
+ }
2199
+ function Lt(t) {
2200
+ return typeof t == "string" || Array.isArray(t);
2201
+ }
2202
+ const Tn = [
2203
+ "animate",
2204
+ "whileInView",
2205
+ "whileFocus",
2206
+ "whileHover",
2207
+ "whileTap",
2208
+ "whileDrag",
2209
+ "exit"
2210
+ ], xn = ["initial", ...Tn];
2211
+ function se(t) {
2212
+ return ie(t.animate) || xn.some((e) => Lt(t[e]));
2213
+ }
2214
+ function Xs(t) {
2215
+ return !!(se(t) || t.variants);
2216
+ }
2217
+ function pl(t, e, n) {
2218
+ for (const i in e) {
2219
+ const s = e[i], o = n[i];
2220
+ if (k(s))
2221
+ t.addValue(i, s);
2222
+ else if (k(o))
2223
+ t.addValue(i, yt(s, { owner: t }));
2224
+ else if (o !== s)
2225
+ if (t.hasValue(i)) {
2226
+ const r = t.getValue(i);
2227
+ r.liveStyle === !0 ? r.jump(s) : r.hasAnimated || r.set(s);
2228
+ } else {
2229
+ const r = t.getStaticValue(i);
2230
+ t.addValue(i, yt(r !== void 0 ? r : s, { owner: t }));
2231
+ }
2232
+ }
2233
+ for (const i in n)
2234
+ e[i] === void 0 && t.removeValue(i);
2235
+ return e;
2236
+ }
2237
+ const Ke = { current: null }, Ys = { current: !1 }, gl = typeof window < "u";
2238
+ function yl() {
2239
+ if (Ys.current = !0, !!gl)
2240
+ if (window.matchMedia) {
2241
+ const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Ke.current = t.matches;
2242
+ t.addEventListener("change", e), e();
2243
+ } else
2244
+ Ke.current = !1;
2245
+ }
2246
+ const Qn = [
2247
+ "AnimationStart",
2248
+ "AnimationComplete",
2249
+ "Update",
2250
+ "BeforeLayoutMeasure",
2251
+ "LayoutMeasure",
2252
+ "LayoutAnimationStart",
2253
+ "LayoutAnimationComplete"
2254
+ ];
2255
+ let Jt = {};
2256
+ function qs(t) {
2257
+ Jt = t;
2258
+ }
2259
+ function vl() {
2260
+ return Jt;
2261
+ }
2262
+ class Tl {
2263
+ /**
2264
+ * This method takes React props and returns found MotionValues. For example, HTML
2265
+ * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
2266
+ *
2267
+ * This isn't an abstract method as it needs calling in the constructor, but it is
2268
+ * intended to be one.
2269
+ */
2270
+ scrapeMotionValuesFromProps(e, n, i) {
2271
+ return {};
2272
+ }
2273
+ constructor({ parent: e, props: n, presenceContext: i, reducedMotionConfig: s, skipAnimations: o, blockInitialAnimation: r, visualState: a }, l = {}) {
2274
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = un, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2275
+ this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2276
+ }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2277
+ const d = F.now();
2278
+ this.renderScheduledAt < d && (this.renderScheduledAt = d, A.render(this.render, !1, !0));
2279
+ };
2280
+ const { latestValues: u, renderState: c } = a;
2281
+ this.latestValues = u, this.baseTarget = { ...u }, this.initialValues = n.initial ? { ...u } : {}, this.renderState = c, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.skipAnimationsConfig = o, this.options = l, this.blockInitialAnimation = !!r, this.isControllingVariants = se(n), this.isVariantNode = Xs(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2282
+ const { willChange: h, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
2283
+ for (const d in f) {
2284
+ const m = f[d];
2285
+ u[d] !== void 0 && k(m) && m.set(u[d]);
2286
+ }
2287
+ }
2288
+ mount(e) {
2289
+ if (this.hasBeenMounted)
2290
+ for (const n in this.initialValues)
2291
+ this.values.get(n)?.jump(this.initialValues[n]), this.latestValues[n] = this.initialValues[n];
2292
+ this.current = e, ml.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, i) => this.bindToMotionValue(i, n)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (Ys.current || yl(), this.shouldReduceMotion = Ke.current), process.env.NODE_ENV !== "production" && Je(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
2293
+ }
2294
+ unmount() {
2295
+ this.projection && this.projection.unmount(), Q(this.notifyUpdate), Q(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
2296
+ for (const e in this.events)
2297
+ this.events[e].clear();
2298
+ for (const e in this.features) {
2299
+ const n = this.features[e];
2300
+ n && (n.unmount(), n.isMounted = !1);
2301
+ }
2302
+ this.current = null;
2303
+ }
2304
+ addChild(e) {
2305
+ this.children.add(e), this.enteringChildren ?? (this.enteringChildren = /* @__PURE__ */ new Set()), this.enteringChildren.add(e);
2306
+ }
2307
+ removeChild(e) {
2308
+ this.children.delete(e), this.enteringChildren && this.enteringChildren.delete(e);
2309
+ }
2310
+ bindToMotionValue(e, n) {
2311
+ if (this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)(), n.accelerate && Ga.has(e) && this.current instanceof HTMLElement) {
2312
+ const { factory: r, keyframes: a, times: l, ease: u, duration: c } = n.accelerate, h = new Cs({
2313
+ element: this.current,
2314
+ name: e,
2315
+ keyframes: a,
2316
+ times: l,
2317
+ ease: u,
2318
+ duration: /* @__PURE__ */ K(c)
2319
+ }), f = r(h);
2320
+ this.valueSubscriptions.set(e, () => {
2321
+ f(), h.cancel();
2322
+ });
2323
+ return;
2324
+ }
2325
+ const i = Pt.has(e);
2326
+ i && this.onBindTransform && this.onBindTransform();
2327
+ const s = n.on("change", (r) => {
2328
+ this.latestValues[e] = r, this.props.onUpdate && A.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
2329
+ });
2330
+ let o;
2331
+ typeof window < "u" && window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
2332
+ s(), o && o(), n.owner && n.stop();
2333
+ });
2334
+ }
2335
+ sortNodePosition(e) {
2336
+ return !this.current || !this.sortInstanceNodePosition || this.type !== e.type ? 0 : this.sortInstanceNodePosition(this.current, e.current);
2337
+ }
2338
+ updateFeatures() {
2339
+ let e = "animation";
2340
+ for (e in Jt) {
2341
+ const n = Jt[e];
2342
+ if (!n)
2343
+ continue;
2344
+ const { isEnabled: i, Feature: s } = n;
2345
+ if (!this.features[e] && s && i(this.props) && (this.features[e] = new s(this)), this.features[e]) {
2346
+ const o = this.features[e];
2347
+ o.isMounted ? o.update() : (o.mount(), o.isMounted = !0);
2348
+ }
2349
+ }
2350
+ }
2351
+ triggerBuild() {
2352
+ this.build(this.renderState, this.latestValues, this.props);
2353
+ }
2354
+ /**
2355
+ * Measure the current viewport box with or without transforms.
2356
+ * Only measures axis-aligned boxes, rotate and skew must be manually
2357
+ * removed with a re-render to work.
2358
+ */
2359
+ measureViewportBox() {
2360
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : E();
2361
+ }
2362
+ getStaticValue(e) {
2363
+ return this.latestValues[e];
2364
+ }
2365
+ setStaticValue(e, n) {
2366
+ this.latestValues[e] = n;
2367
+ }
2368
+ /**
2369
+ * Update the provided props. Ensure any newly-added motion values are
2370
+ * added to our map, old ones removed, and listeners updated.
2371
+ */
2372
+ update(e, n) {
2373
+ (e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
2374
+ for (let i = 0; i < Qn.length; i++) {
2375
+ const s = Qn[i];
2376
+ this.propEventSubscriptions[s] && (this.propEventSubscriptions[s](), delete this.propEventSubscriptions[s]);
2377
+ const o = "on" + s, r = e[o];
2378
+ r && (this.propEventSubscriptions[s] = this.on(s, r));
2379
+ }
2380
+ this.prevMotionValues = pl(this, this.scrapeMotionValuesFromProps(e, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2381
+ }
2382
+ getProps() {
2383
+ return this.props;
2384
+ }
2385
+ /**
2386
+ * Returns the variant definition with a given name.
2387
+ */
2388
+ getVariant(e) {
2389
+ return this.props.variants ? this.props.variants[e] : void 0;
2390
+ }
2391
+ /**
2392
+ * Returns the defined default transition on this component.
2393
+ */
2394
+ getDefaultTransition() {
2395
+ return this.props.transition;
2396
+ }
2397
+ getTransformPagePoint() {
2398
+ return this.props.transformPagePoint;
2399
+ }
2400
+ getClosestVariantNode() {
2401
+ return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
2402
+ }
2403
+ /**
2404
+ * Add a child visual element to our set of children.
2405
+ */
2406
+ addVariantChild(e) {
2407
+ const n = this.getClosestVariantNode();
2408
+ if (n)
2409
+ return n.variantChildren && n.variantChildren.add(e), () => n.variantChildren.delete(e);
2410
+ }
2411
+ /**
2412
+ * Add a motion value and bind it to this visual element.
2413
+ */
2414
+ addValue(e, n) {
2415
+ const i = this.values.get(e);
2416
+ n !== i && (i && this.removeValue(e), this.bindToMotionValue(e, n), this.values.set(e, n), this.latestValues[e] = n.get());
2417
+ }
2418
+ /**
2419
+ * Remove a motion value and unbind any active subscriptions.
2420
+ */
2421
+ removeValue(e) {
2422
+ this.values.delete(e);
2423
+ const n = this.valueSubscriptions.get(e);
2424
+ n && (n(), this.valueSubscriptions.delete(e)), delete this.latestValues[e], this.removeValueFromRenderState(e, this.renderState);
2425
+ }
2426
+ /**
2427
+ * Check whether we have a motion value for this key
2428
+ */
2429
+ hasValue(e) {
2430
+ return this.values.has(e);
2431
+ }
2432
+ getValue(e, n) {
2433
+ if (this.props.values && this.props.values[e])
2434
+ return this.props.values[e];
2435
+ let i = this.values.get(e);
2436
+ return i === void 0 && n !== void 0 && (i = yt(n === null ? void 0 : n, { owner: this }), this.addValue(e, i)), i;
2437
+ }
2438
+ /**
2439
+ * If we're trying to animate to a previously unencountered value,
2440
+ * we need to check for it in our state and as a last resort read it
2441
+ * directly from the instance (which might have performance implications).
2442
+ */
2443
+ readValue(e, n) {
2444
+ let i = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
2445
+ return i != null && (typeof i == "string" && (Yi(i) || Zi(i)) ? i = parseFloat(i) : !dl(i) && H.test(n) && (i = Ws(e, n)), this.setBaseTarget(e, k(i) ? i.get() : i)), k(i) ? i.get() : i;
2446
+ }
2447
+ /**
2448
+ * Set the base target to later animate back to. This is currently
2449
+ * only hydrated on creation and when we first read a value.
2450
+ */
2451
+ setBaseTarget(e, n) {
2452
+ this.baseTarget[e] = n;
2453
+ }
2454
+ /**
2455
+ * Find the base target for a value thats been removed from all animation
2456
+ * props.
2457
+ */
2458
+ getBaseTarget(e) {
2459
+ const { initial: n } = this.props;
2460
+ let i;
2461
+ if (typeof n == "string" || typeof n == "object") {
2462
+ const o = dn(this.props, n, this.presenceContext?.custom);
2463
+ o && (i = o[e]);
2464
+ }
2465
+ if (n && i !== void 0)
2466
+ return i;
2467
+ const s = this.getBaseTargetFromProps(this.props, e);
2468
+ return s !== void 0 && !k(s) ? s : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e];
2469
+ }
2470
+ on(e, n) {
2471
+ return this.events[e] || (this.events[e] = new Ze()), this.events[e].add(n);
2472
+ }
2473
+ notify(e, ...n) {
2474
+ this.events[e] && this.events[e].notify(...n);
2475
+ }
2476
+ scheduleRenderMicrotask() {
2477
+ gn.render(this.render);
2478
+ }
2479
+ }
2480
+ class Zs extends Tl {
2481
+ constructor() {
2482
+ super(...arguments), this.KeyframeResolver = Ha;
2483
+ }
2484
+ sortInstanceNodePosition(e, n) {
2485
+ return e.compareDocumentPosition(n) & 2 ? 1 : -1;
2486
+ }
2487
+ getBaseTargetFromProps(e, n) {
2488
+ const i = e.style;
2489
+ return i ? i[n] : void 0;
2490
+ }
2491
+ removeValueFromRenderState(e, { vars: n, style: i }) {
2492
+ delete n[e], delete i[e];
2493
+ }
2494
+ handleChildMotionValue() {
2495
+ this.childSubscription && (this.childSubscription(), delete this.childSubscription);
2496
+ const { children: e } = this.props;
2497
+ k(e) && (this.childSubscription = e.on("change", (n) => {
2498
+ this.current && (this.current.textContent = `${n}`);
2499
+ }));
2500
+ }
2501
+ }
2502
+ class tt {
2503
+ constructor(e) {
2504
+ this.isMounted = !1, this.node = e;
2505
+ }
2506
+ update() {
2507
+ }
2508
+ }
2509
+ function Js({ top: t, left: e, right: n, bottom: i }) {
2510
+ return {
2511
+ x: { min: e, max: n },
2512
+ y: { min: t, max: i }
2513
+ };
2514
+ }
2515
+ function xl({ x: t, y: e }) {
2516
+ return { top: e.min, right: t.max, bottom: e.max, left: t.min };
2517
+ }
2518
+ function wl(t, e) {
2519
+ if (!e)
2520
+ return t;
2521
+ const n = e({ x: t.left, y: t.top }), i = e({ x: t.right, y: t.bottom });
2522
+ return {
2523
+ top: n.y,
2524
+ left: n.x,
2525
+ bottom: i.y,
2526
+ right: i.x
2527
+ };
2528
+ }
2529
+ function me(t) {
2530
+ return t === void 0 || t === 1;
2531
+ }
2532
+ function $e({ scale: t, scaleX: e, scaleY: n }) {
2533
+ return !me(t) || !me(e) || !me(n);
2534
+ }
2535
+ function it(t) {
2536
+ return $e(t) || Qs(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
2537
+ }
2538
+ function Qs(t) {
2539
+ return ti(t.x) || ti(t.y);
2540
+ }
2541
+ function ti(t) {
2542
+ return t && t !== "0%";
2543
+ }
2544
+ function Qt(t, e, n) {
2545
+ const i = t - n, s = e * i;
2546
+ return n + s;
2547
+ }
2548
+ function ei(t, e, n, i, s) {
2549
+ return s !== void 0 && (t = Qt(t, s, i)), Qt(t, n, i) + e;
2550
+ }
2551
+ function ze(t, e = 0, n = 1, i, s) {
2552
+ t.min = ei(t.min, e, n, i, s), t.max = ei(t.max, e, n, i, s);
2553
+ }
2554
+ function tr(t, { x: e, y: n }) {
2555
+ ze(t.x, e.translate, e.scale, e.originPoint), ze(t.y, n.translate, n.scale, n.originPoint);
2556
+ }
2557
+ const ni = 0.999999999999, ii = 1.0000000000001;
2558
+ function Pl(t, e, n, i = !1) {
2559
+ const s = n.length;
2560
+ if (!s)
2561
+ return;
2562
+ e.x = e.y = 1;
2563
+ let o, r;
2564
+ for (let a = 0; a < s; a++) {
2565
+ o = n[a], r = o.projectionDelta;
2566
+ const { visualElement: l } = o.options;
2567
+ l && l.props.style && l.props.style.display === "contents" || (i && o.options.layoutScroll && o.scroll && o !== o.root && pt(t, {
2568
+ x: -o.scroll.offset.x,
2569
+ y: -o.scroll.offset.y
2570
+ }), r && (e.x *= r.x.scale, e.y *= r.y.scale, tr(t, r)), i && it(o.latestValues) && pt(t, o.latestValues));
2571
+ }
2572
+ e.x < ii && e.x > ni && (e.x = 1), e.y < ii && e.y > ni && (e.y = 1);
2573
+ }
2574
+ function mt(t, e) {
2575
+ t.min = t.min + e, t.max = t.max + e;
2576
+ }
2577
+ function si(t, e, n, i, s = 0.5) {
2578
+ const o = D(t.min, t.max, s);
2579
+ ze(t, e, n, o, i);
2580
+ }
2581
+ function pt(t, e) {
2582
+ si(t.x, e.x, e.scaleX, e.scale, e.originX), si(t.y, e.y, e.scaleY, e.scale, e.originY);
2583
+ }
2584
+ function er(t, e) {
2585
+ return Js(wl(t.getBoundingClientRect(), e));
2586
+ }
2587
+ function Sl(t, e, n) {
2588
+ const i = er(t, n), { scroll: s } = e;
2589
+ return s && (mt(i.x, s.offset.x), mt(i.y, s.offset.y)), i;
2590
+ }
2591
+ const bl = {
2592
+ x: "translateX",
2593
+ y: "translateY",
2594
+ z: "translateZ",
2595
+ transformPerspective: "perspective"
2596
+ }, Al = wt.length;
2597
+ function Vl(t, e, n) {
2598
+ let i = "", s = !0;
2599
+ for (let o = 0; o < Al; o++) {
2600
+ const r = wt[o], a = t[r];
2601
+ if (a === void 0)
2602
+ continue;
2603
+ let l = !0;
2604
+ if (typeof a == "number")
2605
+ l = a === (r.startsWith("scale") ? 1 : 0);
2606
+ else {
2607
+ const u = parseFloat(a);
2608
+ l = r.startsWith("scale") ? u === 1 : u === 0;
2609
+ }
2610
+ if (!l || n) {
2611
+ const u = $s(a, pn[r]);
2612
+ if (!l) {
2613
+ s = !1;
2614
+ const c = bl[r] || r;
2615
+ i += `${c}(${u}) `;
2616
+ }
2617
+ n && (e[r] = u);
2618
+ }
2619
+ }
2620
+ return i = i.trim(), n ? i = n(e, s ? "" : i) : s && (i = "none"), i;
2621
+ }
2622
+ function wn(t, e, n) {
2623
+ const { style: i, vars: s, transformOrigin: o } = t;
2624
+ let r = !1, a = !1;
2625
+ for (const l in e) {
2626
+ const u = e[l];
2627
+ if (Pt.has(l)) {
2628
+ r = !0;
2629
+ continue;
2630
+ } else if (fs(l)) {
2631
+ s[l] = u;
2632
+ continue;
2633
+ } else {
2634
+ const c = $s(u, pn[l]);
2635
+ l.startsWith("origin") ? (a = !0, o[l] = c) : i[l] = c;
2636
+ }
2637
+ }
2638
+ if (e.transform || (r || n ? i.transform = Vl(e, t.transform, n) : i.transform && (i.transform = "none")), a) {
2639
+ const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = o;
2640
+ i.transformOrigin = `${l} ${u} ${c}`;
2641
+ }
2642
+ }
2643
+ function nr(t, { style: e, vars: n }, i, s) {
2644
+ const o = t.style;
2645
+ let r;
2646
+ for (r in e)
2647
+ o[r] = e[r];
2648
+ s?.applyProjectionStyles(o, i);
2649
+ for (r in n)
2650
+ o.setProperty(r, n[r]);
2651
+ }
2652
+ function ri(t, e) {
2653
+ return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
2654
+ }
2655
+ const bt = {
2656
+ correct: (t, e) => {
2657
+ if (!e.target)
2658
+ return t;
2659
+ if (typeof t == "string")
2660
+ if (y.test(t))
2661
+ t = parseFloat(t);
2662
+ else
2663
+ return t;
2664
+ const n = ri(t, e.target.x), i = ri(t, e.target.y);
2665
+ return `${n}% ${i}%`;
2666
+ }
2667
+ }, Dl = {
2668
+ correct: (t, { treeScale: e, projectionDelta: n }) => {
2669
+ const i = t, s = H.parse(t);
2670
+ if (s.length > 5)
2671
+ return i;
2672
+ const o = H.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
2673
+ s[0 + r] /= a, s[1 + r] /= l;
2674
+ const u = D(a, l, 0.5);
2675
+ return typeof s[2 + r] == "number" && (s[2 + r] /= u), typeof s[3 + r] == "number" && (s[3 + r] /= u), o(s);
2676
+ }
2677
+ }, He = {
2678
+ borderRadius: {
2679
+ ...bt,
2680
+ applyTo: [
2681
+ "borderTopLeftRadius",
2682
+ "borderTopRightRadius",
2683
+ "borderBottomLeftRadius",
2684
+ "borderBottomRightRadius"
2685
+ ]
2686
+ },
2687
+ borderTopLeftRadius: bt,
2688
+ borderTopRightRadius: bt,
2689
+ borderBottomLeftRadius: bt,
2690
+ borderBottomRightRadius: bt,
2691
+ boxShadow: Dl
2692
+ };
2693
+ function ir(t, { layout: e, layoutId: n }) {
2694
+ return Pt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!He[t] || t === "opacity");
2695
+ }
2696
+ function Pn(t, e, n) {
2697
+ const i = t.style, s = e?.style, o = {};
2698
+ if (!i)
2699
+ return o;
2700
+ for (const r in i)
2701
+ (k(i[r]) || s && k(s[r]) || ir(r, t) || n?.getValue(r)?.liveStyle !== void 0) && (o[r] = i[r]);
2702
+ return o;
2703
+ }
2704
+ function Ml(t) {
2705
+ return window.getComputedStyle(t);
2706
+ }
2707
+ class Cl extends Zs {
2708
+ constructor() {
2709
+ super(...arguments), this.type = "html", this.renderInstance = nr;
2710
+ }
2711
+ readValueFromInstance(e, n) {
2712
+ if (Pt.has(n))
2713
+ return this.projection?.isProjecting ? Re(n) : Go(e, n);
2714
+ {
2715
+ const i = Ml(e), s = (fs(n) ? i.getPropertyValue(n) : i[n]) || 0;
2716
+ return typeof s == "string" ? s.trim() : s;
2717
+ }
2718
+ }
2719
+ measureInstanceViewportBox(e, { transformPagePoint: n }) {
2720
+ return er(e, n);
2721
+ }
2722
+ build(e, n, i) {
2723
+ wn(e, n, i.transformTemplate);
2724
+ }
2725
+ scrapeMotionValuesFromProps(e, n, i) {
2726
+ return Pn(e, n, i);
2727
+ }
2728
+ }
2729
+ const El = {
2730
+ offset: "stroke-dashoffset",
2731
+ array: "stroke-dasharray"
2732
+ }, Rl = {
2733
+ offset: "strokeDashoffset",
2734
+ array: "strokeDasharray"
2735
+ };
2736
+ function Ll(t, e, n = 1, i = 0, s = !0) {
2737
+ t.pathLength = 1;
2738
+ const o = s ? El : Rl;
2739
+ t[o.offset] = `${-i}`, t[o.array] = `${e} ${n}`;
2740
+ }
2741
+ const kl = [
2742
+ "offsetDistance",
2743
+ "offsetPath",
2744
+ "offsetRotate",
2745
+ "offsetAnchor"
2746
+ ];
2747
+ function sr(t, {
2748
+ attrX: e,
2749
+ attrY: n,
2750
+ attrScale: i,
2751
+ pathLength: s,
2752
+ pathSpacing: o = 1,
2753
+ pathOffset: r = 0,
2754
+ // This is object creation, which we try to avoid per-frame.
2755
+ ...a
2756
+ }, l, u, c) {
2757
+ if (wn(t, a, u), l) {
2758
+ t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
2759
+ return;
2760
+ }
2761
+ t.attrs = t.style, t.style = {};
2762
+ const { attrs: h, style: f } = t;
2763
+ h.transform && (f.transform = h.transform, delete h.transform), (f.transform || h.transformOrigin) && (f.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), f.transform && (f.transformBox = c?.transformBox ?? "fill-box", delete h.transformBox);
2764
+ for (const d of kl)
2765
+ h[d] !== void 0 && (f[d] = h[d], delete h[d]);
2766
+ e !== void 0 && (h.x = e), n !== void 0 && (h.y = n), i !== void 0 && (h.scale = i), s !== void 0 && Ll(h, s, o, r, !1);
2767
+ }
2768
+ const rr = /* @__PURE__ */ new Set([
2769
+ "baseFrequency",
2770
+ "diffuseConstant",
2771
+ "kernelMatrix",
2772
+ "kernelUnitLength",
2773
+ "keySplines",
2774
+ "keyTimes",
2775
+ "limitingConeAngle",
2776
+ "markerHeight",
2777
+ "markerWidth",
2778
+ "numOctaves",
2779
+ "targetX",
2780
+ "targetY",
2781
+ "surfaceScale",
2782
+ "specularConstant",
2783
+ "specularExponent",
2784
+ "stdDeviation",
2785
+ "tableValues",
2786
+ "viewBox",
2787
+ "gradientTransform",
2788
+ "pathLength",
2789
+ "startOffset",
2790
+ "textLength",
2791
+ "lengthAdjust"
2792
+ ]), or = (t) => typeof t == "string" && t.toLowerCase() === "svg";
2793
+ function Bl(t, e, n, i) {
2794
+ nr(t, e, void 0, i);
2795
+ for (const s in e.attrs)
2796
+ t.setAttribute(rr.has(s) ? s : mn(s), e.attrs[s]);
2797
+ }
2798
+ function ar(t, e, n) {
2799
+ const i = Pn(t, e, n);
2800
+ for (const s in t)
2801
+ if (k(t[s]) || k(e[s])) {
2802
+ const o = wt.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
2803
+ i[o] = t[s];
2804
+ }
2805
+ return i;
2806
+ }
2807
+ class Fl extends Zs {
2808
+ constructor() {
2809
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = E;
2810
+ }
2811
+ getBaseTargetFromProps(e, n) {
2812
+ return e[n];
2813
+ }
2814
+ readValueFromInstance(e, n) {
2815
+ if (Pt.has(n)) {
2816
+ const i = Us(n);
2817
+ return i && i.default || 0;
2818
+ }
2819
+ return n = rr.has(n) ? n : mn(n), e.getAttribute(n);
2820
+ }
2821
+ scrapeMotionValuesFromProps(e, n, i) {
2822
+ return ar(e, n, i);
2823
+ }
2824
+ build(e, n, i) {
2825
+ sr(e, n, this.isSVGTag, i.transformTemplate, i.style);
2826
+ }
2827
+ renderInstance(e, n, i, s) {
2828
+ Bl(e, n, i, s);
2829
+ }
2830
+ mount(e) {
2831
+ this.isSVGTag = or(e.tagName), super.mount(e);
2832
+ }
2833
+ }
2834
+ const Il = xn.length;
2835
+ function lr(t) {
2836
+ if (!t)
2837
+ return;
2838
+ if (!t.isControllingVariants) {
2839
+ const n = t.parent ? lr(t.parent) || {} : {};
2840
+ return t.props.initial !== void 0 && (n.initial = t.props.initial), n;
2841
+ }
2842
+ const e = {};
2843
+ for (let n = 0; n < Il; n++) {
2844
+ const i = xn[n], s = t.props[i];
2845
+ (Lt(s) || s === !1) && (e[i] = s);
2846
+ }
2847
+ return e;
2848
+ }
2849
+ function cr(t, e) {
2850
+ if (!Array.isArray(e))
2851
+ return !1;
2852
+ const n = e.length;
2853
+ if (n !== t.length)
2854
+ return !1;
2855
+ for (let i = 0; i < n; i++)
2856
+ if (e[i] !== t[i])
2857
+ return !1;
2858
+ return !0;
2859
+ }
2860
+ const Ol = [...Tn].reverse(), jl = Tn.length;
2861
+ function Nl(t) {
2862
+ return (e) => Promise.all(e.map(({ animation: n, options: i }) => Ba(t, n, i)));
2863
+ }
2864
+ function Ul(t) {
2865
+ let e = Nl(t), n = oi(), i = !0, s = !1;
2866
+ const o = (u) => (c, h) => {
2867
+ const f = gt(t, h, u === "exit" ? t.presenceContext?.custom : void 0);
2868
+ if (f) {
2869
+ const { transition: d, transitionEnd: m, ...g } = f;
2870
+ c = { ...c, ...g, ...m };
2871
+ }
2872
+ return c;
2873
+ };
2874
+ function r(u) {
2875
+ e = u(t);
2876
+ }
2877
+ function a(u) {
2878
+ const { props: c } = t, h = lr(t.parent) || {}, f = [], d = /* @__PURE__ */ new Set();
2879
+ let m = {}, g = 1 / 0;
2880
+ for (let v = 0; v < jl; v++) {
2881
+ const T = Ol[v], p = n[T], P = c[T] !== void 0 ? c[T] : h[T], w = Lt(P), b = T === u ? p.isActive : null;
2882
+ b === !1 && (g = v);
2883
+ let M = P === h[T] && P !== c[T] && w;
2884
+ if (M && (i || s) && t.manuallyAnimateOnMount && (M = !1), p.protectedKeys = { ...m }, // If it isn't active and hasn't *just* been set as inactive
2885
+ !p.isActive && b === null || // If we didn't and don't have any defined prop for this animation type
2886
+ !P && !p.prevProp || // Or if the prop doesn't define an animation
2887
+ ie(P) || typeof P == "boolean")
2888
+ continue;
2889
+ if (T === "exit" && p.isActive && b !== !0) {
2890
+ p.prevResolvedValues && (m = {
2891
+ ...m,
2892
+ ...p.prevResolvedValues
2893
+ });
2894
+ continue;
2895
+ }
2896
+ const S = Wl(p.prevProp, P);
2897
+ let B = S || // If we're making this variant active, we want to always make it active
2898
+ T === u && p.isActive && !M && w || // If we removed a higher-priority variant (i is in reverse order)
2899
+ v > g && w, j = !1;
2900
+ const oe = Array.isArray(P) ? P : [P];
2901
+ let St = oe.reduce(o(T), {});
2902
+ b === !1 && (St = {});
2903
+ const { prevResolvedValues: An = {} } = p, kr = {
2904
+ ...An,
2905
+ ...St
2906
+ }, Vn = (R) => {
2907
+ B = !0, d.has(R) && (j = !0, d.delete(R)), p.needsAnimating[R] = !0;
2908
+ const N = t.getValue(R);
2909
+ N && (N.liveStyle = !1);
2910
+ };
2911
+ for (const R in kr) {
2912
+ const N = St[R], et = An[R];
2913
+ if (m.hasOwnProperty(R))
2914
+ continue;
2915
+ let lt = !1;
2916
+ Oe(N) && Oe(et) ? lt = !cr(N, et) : lt = N !== et, lt ? N != null ? Vn(R) : d.add(R) : N !== void 0 && d.has(R) ? Vn(R) : p.protectedKeys[R] = !0;
2917
+ }
2918
+ p.prevProp = P, p.prevResolvedValues = St, p.isActive && (m = { ...m, ...St }), (i || s) && t.blockInitialAnimation && (B = !1);
2919
+ const Dn = M && S;
2920
+ B && (!Dn || j) && f.push(...oe.map((R) => {
2921
+ const N = { type: T };
2922
+ if (typeof R == "string" && (i || s) && !Dn && t.manuallyAnimateOnMount && t.parent) {
2923
+ const { parent: et } = t, lt = gt(et, R);
2924
+ if (et.enteringChildren && lt) {
2925
+ const { delayChildren: Br } = lt.transition || {};
2926
+ N.delay = Rs(et.enteringChildren, t, Br);
2927
+ }
2928
+ }
2929
+ return {
2930
+ animation: R,
2931
+ options: N
2932
+ };
2933
+ }));
2934
+ }
2935
+ if (d.size) {
2936
+ const v = {};
2937
+ if (typeof c.initial != "boolean") {
2938
+ const T = gt(t, Array.isArray(c.initial) ? c.initial[0] : c.initial);
2939
+ T && T.transition && (v.transition = T.transition);
2940
+ }
2941
+ d.forEach((T) => {
2942
+ const p = t.getBaseTarget(T), P = t.getValue(T);
2943
+ P && (P.liveStyle = !0), v[T] = p ?? null;
2944
+ }), f.push({ animation: v });
2945
+ }
2946
+ let x = !!f.length;
2947
+ return i && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (x = !1), i = !1, s = !1, x ? e(f) : Promise.resolve();
2948
+ }
2949
+ function l(u, c) {
2950
+ if (n[u].isActive === c)
2951
+ return Promise.resolve();
2952
+ t.variantChildren?.forEach((f) => f.animationState?.setActive(u, c)), n[u].isActive = c;
2953
+ const h = a(u);
2954
+ for (const f in n)
2955
+ n[f].protectedKeys = {};
2956
+ return h;
2957
+ }
2958
+ return {
2959
+ animateChanges: a,
2960
+ setActive: l,
2961
+ setAnimateFunction: r,
2962
+ getState: () => n,
2963
+ reset: () => {
2964
+ n = oi(), s = !0;
2965
+ }
2966
+ };
2967
+ }
2968
+ function Wl(t, e) {
2969
+ return typeof e == "string" ? e !== t : Array.isArray(e) ? !cr(e, t) : !1;
2970
+ }
2971
+ function nt(t = !1) {
2972
+ return {
2973
+ isActive: t,
2974
+ protectedKeys: {},
2975
+ needsAnimating: {},
2976
+ prevResolvedValues: {}
2977
+ };
2978
+ }
2979
+ function oi() {
2980
+ return {
2981
+ animate: nt(!0),
2982
+ whileInView: nt(),
2983
+ whileHover: nt(),
2984
+ whileTap: nt(),
2985
+ whileDrag: nt(),
2986
+ whileFocus: nt(),
2987
+ exit: nt()
2988
+ };
2989
+ }
2990
+ function ai(t, e) {
2991
+ t.min = e.min, t.max = e.max;
2992
+ }
2993
+ function $(t, e) {
2994
+ ai(t.x, e.x), ai(t.y, e.y);
2995
+ }
2996
+ function li(t, e) {
2997
+ t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
2998
+ }
2999
+ const ur = 1e-4, Kl = 1 - ur, $l = 1 + ur, hr = 0.01, zl = 0 - hr, Hl = 0 + hr;
3000
+ function I(t) {
3001
+ return t.max - t.min;
3002
+ }
3003
+ function Gl(t, e, n) {
3004
+ return Math.abs(t - e) <= n;
3005
+ }
3006
+ function ci(t, e, n, i = 0.5) {
3007
+ t.origin = i, t.originPoint = D(e.min, e.max, t.origin), t.scale = I(n) / I(e), t.translate = D(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Kl && t.scale <= $l || isNaN(t.scale)) && (t.scale = 1), (t.translate >= zl && t.translate <= Hl || isNaN(t.translate)) && (t.translate = 0);
3008
+ }
3009
+ function Dt(t, e, n, i) {
3010
+ ci(t.x, e.x, n.x, i ? i.originX : void 0), ci(t.y, e.y, n.y, i ? i.originY : void 0);
3011
+ }
3012
+ function ui(t, e, n) {
3013
+ t.min = n.min + e.min, t.max = t.min + I(e);
3014
+ }
3015
+ function _l(t, e, n) {
3016
+ ui(t.x, e.x, n.x), ui(t.y, e.y, n.y);
3017
+ }
3018
+ function hi(t, e, n) {
3019
+ t.min = e.min - n.min, t.max = t.min + I(e);
3020
+ }
3021
+ function te(t, e, n) {
3022
+ hi(t.x, e.x, n.x), hi(t.y, e.y, n.y);
3023
+ }
3024
+ function fi(t, e, n, i, s) {
3025
+ return t -= e, t = Qt(t, 1 / n, i), s !== void 0 && (t = Qt(t, 1 / s, i)), t;
3026
+ }
3027
+ function Xl(t, e = 0, n = 1, i = 0.5, s, o = t, r = t) {
3028
+ if (_.test(e) && (e = parseFloat(e), e = D(r.min, r.max, e / 100) - r.min), typeof e != "number")
3029
+ return;
3030
+ let a = D(o.min, o.max, i);
3031
+ t === o && (a -= e), t.min = fi(t.min, e, n, a, s), t.max = fi(t.max, e, n, a, s);
3032
+ }
3033
+ function di(t, e, [n, i, s], o, r) {
3034
+ Xl(t, e[n], e[i], e[s], e.scale, o, r);
3035
+ }
3036
+ const Yl = ["x", "scaleX", "originX"], ql = ["y", "scaleY", "originY"];
3037
+ function mi(t, e, n, i) {
3038
+ di(t.x, e, Yl, n ? n.x : void 0, i ? i.x : void 0), di(t.y, e, ql, n ? n.y : void 0, i ? i.y : void 0);
3039
+ }
3040
+ function pi(t) {
3041
+ return t.translate === 0 && t.scale === 1;
3042
+ }
3043
+ function fr(t) {
3044
+ return pi(t.x) && pi(t.y);
3045
+ }
3046
+ function gi(t, e) {
3047
+ return t.min === e.min && t.max === e.max;
3048
+ }
3049
+ function Zl(t, e) {
3050
+ return gi(t.x, e.x) && gi(t.y, e.y);
3051
+ }
3052
+ function yi(t, e) {
3053
+ return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
3054
+ }
3055
+ function dr(t, e) {
3056
+ return yi(t.x, e.x) && yi(t.y, e.y);
3057
+ }
3058
+ function vi(t) {
3059
+ return I(t.x) / I(t.y);
3060
+ }
3061
+ function Ti(t, e) {
3062
+ return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
3063
+ }
3064
+ function G(t) {
3065
+ return [t("x"), t("y")];
3066
+ }
3067
+ function Jl(t, e, n) {
3068
+ let i = "";
3069
+ const s = t.x.translate / e.x, o = t.y.translate / e.y, r = n?.z || 0;
3070
+ if ((s || o || r) && (i = `translate3d(${s}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (i += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
3071
+ const { transformPerspective: u, rotate: c, rotateX: h, rotateY: f, skewX: d, skewY: m } = n;
3072
+ u && (i = `perspective(${u}px) ${i}`), c && (i += `rotate(${c}deg) `), h && (i += `rotateX(${h}deg) `), f && (i += `rotateY(${f}deg) `), d && (i += `skewX(${d}deg) `), m && (i += `skewY(${m}deg) `);
3073
+ }
3074
+ const a = t.x.scale * e.x, l = t.y.scale * e.y;
3075
+ return (a !== 1 || l !== 1) && (i += `scale(${a}, ${l})`), i || "none";
3076
+ }
3077
+ const mr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Ql = mr.length, xi = (t) => typeof t == "string" ? parseFloat(t) : t, wi = (t) => typeof t == "number" || y.test(t);
3078
+ function tc(t, e, n, i, s, o) {
3079
+ s ? (t.opacity = D(0, n.opacity ?? 1, ec(i)), t.opacityExit = D(e.opacity ?? 1, 0, nc(i))) : o && (t.opacity = D(e.opacity ?? 1, n.opacity ?? 1, i));
3080
+ for (let r = 0; r < Ql; r++) {
3081
+ const a = `border${mr[r]}Radius`;
3082
+ let l = Pi(e, a), u = Pi(n, a);
3083
+ if (l === void 0 && u === void 0)
3084
+ continue;
3085
+ l || (l = 0), u || (u = 0), l === 0 || u === 0 || wi(l) === wi(u) ? (t[a] = Math.max(D(xi(l), xi(u), i), 0), (_.test(u) || _.test(l)) && (t[a] += "%")) : t[a] = u;
3086
+ }
3087
+ (e.rotate || n.rotate) && (t.rotate = D(e.rotate || 0, n.rotate || 0, i));
3088
+ }
3089
+ function Pi(t, e) {
3090
+ return t[e] !== void 0 ? t[e] : t.borderRadius;
3091
+ }
3092
+ const ec = /* @__PURE__ */ pr(0, 0.5, os), nc = /* @__PURE__ */ pr(0.5, 0.95, W);
3093
+ function pr(t, e, n) {
3094
+ return (i) => i < t ? 0 : i > e ? 1 : n(/* @__PURE__ */ Ct(t, e, i));
3095
+ }
3096
+ function ic(t, e, n) {
3097
+ const i = k(t) ? t : yt(t);
3098
+ return i.start(fn("", i, e, n)), i.animation;
3099
+ }
3100
+ function kt(t, e, n, i = { passive: !0 }) {
3101
+ return t.addEventListener(e, n, i), () => t.removeEventListener(e, n);
3102
+ }
3103
+ const sc = (t, e) => t.depth - e.depth;
3104
+ class rc {
3105
+ constructor() {
3106
+ this.children = [], this.isDirty = !1;
3107
+ }
3108
+ add(e) {
3109
+ qe(this.children, e), this.isDirty = !0;
3110
+ }
3111
+ remove(e) {
3112
+ Xt(this.children, e), this.isDirty = !0;
3113
+ }
3114
+ forEach(e) {
3115
+ this.isDirty && this.children.sort(sc), this.isDirty = !1, this.children.forEach(e);
3116
+ }
3117
+ }
3118
+ function oc(t, e) {
3119
+ const n = F.now(), i = ({ timestamp: s }) => {
3120
+ const o = s - n;
3121
+ o >= e && (Q(i), t(o - e));
3122
+ };
3123
+ return A.setup(i, !0), () => Q(i);
3124
+ }
3125
+ function Gt(t) {
3126
+ return k(t) ? t.get() : t;
3127
+ }
3128
+ class ac {
3129
+ constructor() {
3130
+ this.members = [];
3131
+ }
3132
+ add(e) {
3133
+ qe(this.members, e);
3134
+ for (let n = this.members.length - 1; n >= 0; n--) {
3135
+ const i = this.members[n];
3136
+ if (i === e || i === this.lead || i === this.prevLead)
3137
+ continue;
3138
+ const s = i.instance;
3139
+ (!s || s.isConnected === !1) && !i.snapshot && (Xt(this.members, i), i.unmount());
3140
+ }
3141
+ e.scheduleRender();
3142
+ }
3143
+ remove(e) {
3144
+ if (Xt(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
3145
+ const n = this.members[this.members.length - 1];
3146
+ n && this.promote(n);
3147
+ }
3148
+ }
3149
+ relegate(e) {
3150
+ for (let n = this.members.indexOf(e) - 1; n >= 0; n--) {
3151
+ const i = this.members[n];
3152
+ if (i.isPresent !== !1 && i.instance?.isConnected !== !1)
3153
+ return this.promote(i), !0;
3154
+ }
3155
+ return !1;
3156
+ }
3157
+ promote(e, n) {
3158
+ const i = this.lead;
3159
+ if (e !== i && (this.prevLead = i, this.lead = e, e.show(), i)) {
3160
+ i.updateSnapshot(), e.scheduleRender();
3161
+ const { layoutDependency: s } = i.options, { layoutDependency: o } = e.options;
3162
+ (s === void 0 || s !== o) && (e.resumeFrom = i, n && (i.preserveOpacity = !0), i.snapshot && (e.snapshot = i.snapshot, e.snapshot.latestValues = i.animationValues || i.latestValues), e.root?.isUpdating && (e.isLayoutDirty = !0)), e.options.crossfade === !1 && i.hide();
3163
+ }
3164
+ }
3165
+ exitAnimationComplete() {
3166
+ this.members.forEach((e) => {
3167
+ e.options.onExitComplete?.(), e.resumingFrom?.options.onExitComplete?.();
3168
+ });
3169
+ }
3170
+ scheduleRender() {
3171
+ this.members.forEach((e) => e.instance && e.scheduleRender(!1));
3172
+ }
3173
+ removeLeadSnapshot() {
3174
+ this.lead?.snapshot && (this.lead.snapshot = void 0);
3175
+ }
3176
+ }
3177
+ const _t = {
3178
+ /**
3179
+ * Global flag as to whether the tree has animated since the last time
3180
+ * we resized the window
3181
+ */
3182
+ hasAnimatedSinceResize: !0,
3183
+ /**
3184
+ * We set this to true once, on the first update. Any nodes added to the tree beyond that
3185
+ * update will be given a `data-projection-id` attribute.
3186
+ */
3187
+ hasEverUpdated: !1
3188
+ }, pe = ["", "X", "Y", "Z"], lc = 1e3;
3189
+ let cc = 0;
3190
+ function ge(t, e, n, i) {
3191
+ const { latestValues: s } = e;
3192
+ s[t] && (n[t] = s[t], e.setStaticValue(t, 0), i && (i[t] = 0));
3193
+ }
3194
+ function gr(t) {
3195
+ if (t.hasCheckedOptimisedAppear = !0, t.root === t)
3196
+ return;
3197
+ const { visualElement: e } = t.options;
3198
+ if (!e)
3199
+ return;
3200
+ const n = Is(e);
3201
+ if (window.MotionHasOptimisedAnimation(n, "transform")) {
3202
+ const { layout: s, layoutId: o } = t.options;
3203
+ window.MotionCancelOptimisedAnimation(n, "transform", A, !(s || o));
3204
+ }
3205
+ const { parent: i } = t;
3206
+ i && !i.hasCheckedOptimisedAppear && gr(i);
3207
+ }
3208
+ function yr({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: i, resetTransform: s }) {
3209
+ return class {
3210
+ constructor(r = {}, a = e?.()) {
3211
+ this.id = cc++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
3212
+ this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
3213
+ }, this.updateProjection = () => {
3214
+ this.projectionUpdateScheduled = !1, this.nodes.forEach(fc), this.nodes.forEach(gc), this.nodes.forEach(yc), this.nodes.forEach(dc);
3215
+ }, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
3216
+ for (let l = 0; l < this.path.length; l++)
3217
+ this.path[l].shouldResetTransform = !0;
3218
+ this.root === this && (this.nodes = new rc());
3219
+ }
3220
+ addEventListener(r, a) {
3221
+ return this.eventHandlers.has(r) || this.eventHandlers.set(r, new Ze()), this.eventHandlers.get(r).add(a);
3222
+ }
3223
+ notifyListeners(r, ...a) {
3224
+ const l = this.eventHandlers.get(r);
3225
+ l && l.notify(...a);
3226
+ }
3227
+ hasListeners(r) {
3228
+ return this.eventHandlers.has(r);
3229
+ }
3230
+ /**
3231
+ * Lifecycles
3232
+ */
3233
+ mount(r) {
3234
+ if (this.instance)
3235
+ return;
3236
+ this.isSVG = vn(r) && !hl(r), this.instance = r;
3237
+ const { layoutId: a, layout: l, visualElement: u } = this.options;
3238
+ if (u && !u.current && u.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
3239
+ let c, h = 0;
3240
+ const f = () => this.root.updateBlockedByResize = !1;
3241
+ A.read(() => {
3242
+ h = window.innerWidth;
3243
+ }), t(r, () => {
3244
+ const d = window.innerWidth;
3245
+ d !== h && (h = d, this.root.updateBlockedByResize = !0, c && c(), c = oc(f, 250), _t.hasAnimatedSinceResize && (_t.hasAnimatedSinceResize = !1, this.nodes.forEach(Ai)));
3246
+ });
3247
+ }
3248
+ a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && u && (a || l) && this.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: d }) => {
3249
+ if (this.isTreeAnimationBlocked()) {
3250
+ this.target = void 0, this.relativeTarget = void 0;
3251
+ return;
3252
+ }
3253
+ const m = this.options.transition || u.getDefaultTransition() || Pc, { onLayoutAnimationStart: g, onLayoutAnimationComplete: x } = u.getProps(), v = !this.targetLayout || !dr(this.targetLayout, d), T = !h && f;
3254
+ if (this.options.layoutRoot || this.resumeFrom || T || h && (v || !this.currentAnimation)) {
3255
+ this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
3256
+ const p = {
3257
+ ...hn(m, "layout"),
3258
+ onPlay: g,
3259
+ onComplete: x
3260
+ };
3261
+ (u.shouldReduceMotion || this.options.layoutRoot) && (p.delay = 0, p.type = !1), this.startAnimation(p), this.setAnimationOrigin(c, T);
3262
+ } else
3263
+ h || Ai(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
3264
+ this.targetLayout = d;
3265
+ });
3266
+ }
3267
+ unmount() {
3268
+ this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
3269
+ const r = this.getStack();
3270
+ r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), Q(this.updateProjection);
3271
+ }
3272
+ // only on the root
3273
+ blockUpdate() {
3274
+ this.updateManuallyBlocked = !0;
3275
+ }
3276
+ unblockUpdate() {
3277
+ this.updateManuallyBlocked = !1;
3278
+ }
3279
+ isUpdateBlocked() {
3280
+ return this.updateManuallyBlocked || this.updateBlockedByResize;
3281
+ }
3282
+ isTreeAnimationBlocked() {
3283
+ return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1;
3284
+ }
3285
+ // Note: currently only running on root node
3286
+ startUpdate() {
3287
+ this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(vc), this.animationId++);
3288
+ }
3289
+ getTransformTemplate() {
3290
+ const { visualElement: r } = this.options;
3291
+ return r && r.getProps().transformTemplate;
3292
+ }
3293
+ willUpdate(r = !0) {
3294
+ if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
3295
+ this.options.onExitComplete && this.options.onExitComplete();
3296
+ return;
3297
+ }
3298
+ if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && gr(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
3299
+ return;
3300
+ this.isLayoutDirty = !0;
3301
+ for (let c = 0; c < this.path.length; c++) {
3302
+ const h = this.path[c];
3303
+ h.shouldResetTransform = !0, h.updateScroll("snapshot"), h.options.layoutRoot && h.willUpdate(!1);
3304
+ }
3305
+ const { layoutId: a, layout: l } = this.options;
3306
+ if (a === void 0 && !l)
3307
+ return;
3308
+ const u = this.getTransformTemplate();
3309
+ this.prevTransformTemplateValue = u ? u(this.latestValues, "") : void 0, this.updateSnapshot(), r && this.notifyListeners("willUpdate");
3310
+ }
3311
+ update() {
3312
+ if (this.updateScheduled = !1, this.isUpdateBlocked()) {
3313
+ this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Si);
3314
+ return;
3315
+ }
3316
+ if (this.animationId <= this.animationCommitId) {
3317
+ this.nodes.forEach(bi);
3318
+ return;
3319
+ }
3320
+ this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(pc), this.nodes.forEach(uc), this.nodes.forEach(hc)) : this.nodes.forEach(bi), this.clearAllSnapshots();
3321
+ const a = F.now();
3322
+ L.delta = X(0, 1e3 / 60, a - L.timestamp), L.timestamp = a, L.isProcessing = !0, ae.update.process(L), ae.preRender.process(L), ae.render.process(L), L.isProcessing = !1;
3323
+ }
3324
+ didUpdate() {
3325
+ this.updateScheduled || (this.updateScheduled = !0, gn.read(this.scheduleUpdate));
3326
+ }
3327
+ clearAllSnapshots() {
3328
+ this.nodes.forEach(mc), this.sharedNodes.forEach(Tc);
3329
+ }
3330
+ scheduleUpdateProjection() {
3331
+ this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, A.preRender(this.updateProjection, !1, !0));
3332
+ }
3333
+ scheduleCheckAfterUnmount() {
3334
+ A.postRender(() => {
3335
+ this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
3336
+ });
3337
+ }
3338
+ /**
3339
+ * Update measurements
3340
+ */
3341
+ updateSnapshot() {
3342
+ this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !I(this.snapshot.measuredBox.x) && !I(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
3343
+ }
3344
+ updateLayout() {
3345
+ if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
3346
+ return;
3347
+ if (this.resumeFrom && !this.resumeFrom.instance)
3348
+ for (let l = 0; l < this.path.length; l++)
3349
+ this.path[l].updateScroll();
3350
+ const r = this.layout;
3351
+ this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected = E(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
3352
+ const { visualElement: a } = this.options;
3353
+ a && a.notify("LayoutMeasure", this.layout.layoutBox, r ? r.layoutBox : void 0);
3354
+ }
3355
+ updateScroll(r = "measure") {
3356
+ let a = !!(this.options.layoutScroll && this.instance);
3357
+ if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === r && (a = !1), a && this.instance) {
3358
+ const l = i(this.instance);
3359
+ this.scroll = {
3360
+ animationId: this.root.animationId,
3361
+ phase: r,
3362
+ isRoot: l,
3363
+ offset: n(this.instance),
3364
+ wasRoot: this.scroll ? this.scroll.isRoot : l
3365
+ };
3366
+ }
3367
+ }
3368
+ resetTransform() {
3369
+ if (!s)
3370
+ return;
3371
+ const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !fr(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
3372
+ r && this.instance && (a || it(this.latestValues) || c) && (s(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
3373
+ }
3374
+ measure(r = !0) {
3375
+ const a = this.measurePageBox();
3376
+ let l = this.removeElementScroll(a);
3377
+ return r && (l = this.removeTransform(l)), Sc(l), {
3378
+ animationId: this.root.animationId,
3379
+ measuredBox: a,
3380
+ layoutBox: l,
3381
+ latestValues: {},
3382
+ source: this.id
3383
+ };
3384
+ }
3385
+ measurePageBox() {
3386
+ const { visualElement: r } = this.options;
3387
+ if (!r)
3388
+ return E();
3389
+ const a = r.measureViewportBox();
3390
+ if (!(this.scroll?.wasRoot || this.path.some(bc))) {
3391
+ const { scroll: u } = this.root;
3392
+ u && (mt(a.x, u.offset.x), mt(a.y, u.offset.y));
3393
+ }
3394
+ return a;
3395
+ }
3396
+ removeElementScroll(r) {
3397
+ const a = E();
3398
+ if ($(a, r), this.scroll?.wasRoot)
3399
+ return a;
3400
+ for (let l = 0; l < this.path.length; l++) {
3401
+ const u = this.path[l], { scroll: c, options: h } = u;
3402
+ u !== this.root && c && h.layoutScroll && (c.wasRoot && $(a, r), mt(a.x, c.offset.x), mt(a.y, c.offset.y));
3403
+ }
3404
+ return a;
3405
+ }
3406
+ applyTransform(r, a = !1) {
3407
+ const l = E();
3408
+ $(l, r);
3409
+ for (let u = 0; u < this.path.length; u++) {
3410
+ const c = this.path[u];
3411
+ !a && c.options.layoutScroll && c.scroll && c !== c.root && pt(l, {
3412
+ x: -c.scroll.offset.x,
3413
+ y: -c.scroll.offset.y
3414
+ }), it(c.latestValues) && pt(l, c.latestValues);
3415
+ }
3416
+ return it(this.latestValues) && pt(l, this.latestValues), l;
3417
+ }
3418
+ removeTransform(r) {
3419
+ const a = E();
3420
+ $(a, r);
3421
+ for (let l = 0; l < this.path.length; l++) {
3422
+ const u = this.path[l];
3423
+ if (!u.instance || !it(u.latestValues))
3424
+ continue;
3425
+ $e(u.latestValues) && u.updateSnapshot();
3426
+ const c = E(), h = u.measurePageBox();
3427
+ $(c, h), mi(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
3428
+ }
3429
+ return it(this.latestValues) && mi(a, this.latestValues), a;
3430
+ }
3431
+ setTargetDelta(r) {
3432
+ this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
3433
+ }
3434
+ setOptions(r) {
3435
+ this.options = {
3436
+ ...this.options,
3437
+ ...r,
3438
+ crossfade: r.crossfade !== void 0 ? r.crossfade : !0
3439
+ };
3440
+ }
3441
+ clearMeasurements() {
3442
+ this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
3443
+ }
3444
+ forceRelativeParentToResolveTarget() {
3445
+ this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== L.timestamp && this.relativeParent.resolveTargetDelta(!0);
3446
+ }
3447
+ resolveTargetDelta(r = !1) {
3448
+ const a = this.getLead();
3449
+ this.isProjectionDirty || (this.isProjectionDirty = a.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = a.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = a.isSharedProjectionDirty);
3450
+ const l = !!this.resumingFrom || this !== a;
3451
+ if (!(r || l && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
3452
+ return;
3453
+ const { layout: c, layoutId: h } = this.options;
3454
+ if (!this.layout || !(c || h))
3455
+ return;
3456
+ this.resolvedRelativeTargetAt = L.timestamp;
3457
+ const f = this.getClosestProjectingParent();
3458
+ f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = E(), this.targetWithTransforms = E()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), _l(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : $(this.target, this.layout.layoutBox), tr(this.target, this.targetDelta)) : $(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
3459
+ }
3460
+ getClosestProjectingParent() {
3461
+ if (!(!this.parent || $e(this.parent.latestValues) || Qs(this.parent.latestValues)))
3462
+ return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
3463
+ }
3464
+ isProjecting() {
3465
+ return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
3466
+ }
3467
+ createRelativeTarget(r, a, l) {
3468
+ this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = E(), this.relativeTargetOrigin = E(), te(this.relativeTargetOrigin, a, l), $(this.relativeTarget, this.relativeTargetOrigin);
3469
+ }
3470
+ removeRelativeTarget() {
3471
+ this.relativeParent = this.relativeTarget = void 0;
3472
+ }
3473
+ calcProjection() {
3474
+ const r = this.getLead(), a = !!this.resumingFrom || this !== r;
3475
+ let l = !0;
3476
+ if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === L.timestamp && (l = !1), l)
3477
+ return;
3478
+ const { layout: u, layoutId: c } = this.options;
3479
+ if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || c))
3480
+ return;
3481
+ $(this.layoutCorrected, this.layout.layoutBox);
3482
+ const h = this.treeScale.x, f = this.treeScale.y;
3483
+ Pl(this.layoutCorrected, this.treeScale, this.path, a), r.layout && !r.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (r.target = r.layout.layoutBox, r.targetWithTransforms = E());
3484
+ const { target: d } = r;
3485
+ if (!d) {
3486
+ this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
3487
+ return;
3488
+ }
3489
+ !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (li(this.prevProjectionDelta.x, this.projectionDelta.x), li(this.prevProjectionDelta.y, this.projectionDelta.y)), Dt(this.projectionDelta, this.layoutCorrected, d, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== f || !Ti(this.projectionDelta.x, this.prevProjectionDelta.x) || !Ti(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", d));
3490
+ }
3491
+ hide() {
3492
+ this.isVisible = !1;
3493
+ }
3494
+ show() {
3495
+ this.isVisible = !0;
3496
+ }
3497
+ scheduleRender(r = !0) {
3498
+ if (this.options.visualElement?.scheduleRender(), r) {
3499
+ const a = this.getStack();
3500
+ a && a.scheduleRender();
3501
+ }
3502
+ this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
3503
+ }
3504
+ createProjectionDeltas() {
3505
+ this.prevProjectionDelta = dt(), this.projectionDelta = dt(), this.projectionDeltaWithTransform = dt();
3506
+ }
3507
+ setAnimationOrigin(r, a = !1) {
3508
+ const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, h = dt();
3509
+ (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
3510
+ const f = E(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, g = d !== m, x = this.getStack(), v = !x || x.members.length <= 1, T = !!(g && !v && this.options.crossfade === !0 && !this.path.some(wc));
3511
+ this.animationProgress = 0;
3512
+ let p;
3513
+ this.mixTargetDelta = (P) => {
3514
+ const w = P / 1e3;
3515
+ Vi(h.x, r.x, w), Vi(h.y, r.y, w), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (te(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), xc(this.relativeTarget, this.relativeTargetOrigin, f, w), p && Zl(this.relativeTarget, p) && (this.isProjectionDirty = !1), p || (p = E()), $(p, this.relativeTarget)), g && (this.animationValues = c, tc(c, u, this.latestValues, w, T, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = w;
3516
+ }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
3517
+ }
3518
+ startAnimation(r) {
3519
+ this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (Q(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = A.update(() => {
3520
+ _t.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = yt(0)), this.motionValue.jump(0, !1), this.currentAnimation = ic(this.motionValue, [0, 1e3], {
3521
+ ...r,
3522
+ velocity: 0,
3523
+ isSync: !0,
3524
+ onUpdate: (a) => {
3525
+ this.mixTargetDelta(a), r.onUpdate && r.onUpdate(a);
3526
+ },
3527
+ onStop: () => {
3528
+ },
3529
+ onComplete: () => {
3530
+ r.onComplete && r.onComplete(), this.completeAnimation();
3531
+ }
3532
+ }), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
3533
+ });
3534
+ }
3535
+ completeAnimation() {
3536
+ this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
3537
+ const r = this.getStack();
3538
+ r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
3539
+ }
3540
+ finishAnimation() {
3541
+ this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(lc), this.currentAnimation.stop()), this.completeAnimation();
3542
+ }
3543
+ applyTransformsToTarget() {
3544
+ const r = this.getLead();
3545
+ let { targetWithTransforms: a, target: l, layout: u, latestValues: c } = r;
3546
+ if (!(!a || !l || !u)) {
3547
+ if (this !== r && this.layout && u && vr(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
3548
+ l = this.target || E();
3549
+ const h = I(this.layout.layoutBox.x);
3550
+ l.x.min = r.target.x.min, l.x.max = l.x.min + h;
3551
+ const f = I(this.layout.layoutBox.y);
3552
+ l.y.min = r.target.y.min, l.y.max = l.y.min + f;
3553
+ }
3554
+ $(a, l), pt(a, c), Dt(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
3555
+ }
3556
+ }
3557
+ registerSharedNode(r, a) {
3558
+ this.sharedNodes.has(r) || this.sharedNodes.set(r, new ac()), this.sharedNodes.get(r).add(a);
3559
+ const u = a.options.initialPromotionConfig;
3560
+ a.promote({
3561
+ transition: u ? u.transition : void 0,
3562
+ preserveFollowOpacity: u && u.shouldPreserveFollowOpacity ? u.shouldPreserveFollowOpacity(a) : void 0
3563
+ });
3564
+ }
3565
+ isLead() {
3566
+ const r = this.getStack();
3567
+ return r ? r.lead === this : !0;
3568
+ }
3569
+ getLead() {
3570
+ const { layoutId: r } = this.options;
3571
+ return r ? this.getStack()?.lead || this : this;
3572
+ }
3573
+ getPrevLead() {
3574
+ const { layoutId: r } = this.options;
3575
+ return r ? this.getStack()?.prevLead : void 0;
3576
+ }
3577
+ getStack() {
3578
+ const { layoutId: r } = this.options;
3579
+ if (r)
3580
+ return this.root.sharedNodes.get(r);
3581
+ }
3582
+ promote({ needsReset: r, transition: a, preserveFollowOpacity: l } = {}) {
3583
+ const u = this.getStack();
3584
+ u && u.promote(this, l), r && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
3585
+ }
3586
+ relegate() {
3587
+ const r = this.getStack();
3588
+ return r ? r.relegate(this) : !1;
3589
+ }
3590
+ resetSkewAndRotation() {
3591
+ const { visualElement: r } = this.options;
3592
+ if (!r)
3593
+ return;
3594
+ let a = !1;
3595
+ const { latestValues: l } = r;
3596
+ if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
3597
+ return;
3598
+ const u = {};
3599
+ l.z && ge("z", r, u, this.animationValues);
3600
+ for (let c = 0; c < pe.length; c++)
3601
+ ge(`rotate${pe[c]}`, r, u, this.animationValues), ge(`skew${pe[c]}`, r, u, this.animationValues);
3602
+ r.render();
3603
+ for (const c in u)
3604
+ r.setStaticValue(c, u[c]), this.animationValues && (this.animationValues[c] = u[c]);
3605
+ r.scheduleRender();
3606
+ }
3607
+ applyProjectionStyles(r, a) {
3608
+ if (!this.instance || this.isSVG)
3609
+ return;
3610
+ if (!this.isVisible) {
3611
+ r.visibility = "hidden";
3612
+ return;
3613
+ }
3614
+ const l = this.getTransformTemplate();
3615
+ if (this.needsReset) {
3616
+ this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = Gt(a?.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
3617
+ return;
3618
+ }
3619
+ const u = this.getLead();
3620
+ if (!this.projectionDelta || !this.layout || !u.target) {
3621
+ this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = Gt(a?.pointerEvents) || ""), this.hasProjected && !it(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
3622
+ return;
3623
+ }
3624
+ r.visibility = "";
3625
+ const c = u.animationValues || u.latestValues;
3626
+ this.applyTransformsToTarget();
3627
+ let h = Jl(this.projectionDeltaWithTransform, this.treeScale, c);
3628
+ l && (h = l(c, h)), r.transform = h;
3629
+ const { x: f, y: d } = this.projectionDelta;
3630
+ r.transformOrigin = `${f.origin * 100}% ${d.origin * 100}% 0`, u.animationValues ? r.opacity = u === this ? c.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : c.opacityExit : r.opacity = u === this ? c.opacity !== void 0 ? c.opacity : "" : c.opacityExit !== void 0 ? c.opacityExit : 0;
3631
+ for (const m in He) {
3632
+ if (c[m] === void 0)
3633
+ continue;
3634
+ const { correct: g, applyTo: x, isCSSVariable: v } = He[m], T = h === "none" ? c[m] : g(c[m], u);
3635
+ if (x) {
3636
+ const p = x.length;
3637
+ for (let P = 0; P < p; P++)
3638
+ r[x[P]] = T;
3639
+ } else
3640
+ v ? this.options.visualElement.renderState.vars[m] = T : r[m] = T;
3641
+ }
3642
+ this.options.layoutId && (r.pointerEvents = u === this ? Gt(a?.pointerEvents) || "" : "none");
3643
+ }
3644
+ clearSnapshot() {
3645
+ this.resumeFrom = this.snapshot = void 0;
3646
+ }
3647
+ // Only run on root
3648
+ resetTree() {
3649
+ this.root.nodes.forEach((r) => r.currentAnimation?.stop()), this.root.nodes.forEach(Si), this.root.sharedNodes.clear();
3650
+ }
3651
+ };
3652
+ }
3653
+ function uc(t) {
3654
+ t.updateLayout();
3655
+ }
3656
+ function hc(t) {
3657
+ const e = t.resumeFrom?.snapshot || t.snapshot;
3658
+ if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
3659
+ const { layoutBox: n, measuredBox: i } = t.layout, { animationType: s } = t.options, o = e.source !== t.layout.source;
3660
+ s === "size" ? G((c) => {
3661
+ const h = o ? e.measuredBox[c] : e.layoutBox[c], f = I(h);
3662
+ h.min = n[c].min, h.max = h.min + f;
3663
+ }) : vr(s, e.layoutBox, n) && G((c) => {
3664
+ const h = o ? e.measuredBox[c] : e.layoutBox[c], f = I(n[c]);
3665
+ h.max = h.min + f, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[c].max = t.relativeTarget[c].min + f);
3666
+ });
3667
+ const r = dt();
3668
+ Dt(r, n, e.layoutBox);
3669
+ const a = dt();
3670
+ o ? Dt(a, t.applyTransform(i, !0), e.measuredBox) : Dt(a, n, e.layoutBox);
3671
+ const l = !fr(r);
3672
+ let u = !1;
3673
+ if (!t.resumeFrom) {
3674
+ const c = t.getClosestProjectingParent();
3675
+ if (c && !c.resumeFrom) {
3676
+ const { snapshot: h, layout: f } = c;
3677
+ if (h && f) {
3678
+ const d = E();
3679
+ te(d, e.layoutBox, h.layoutBox);
3680
+ const m = E();
3681
+ te(m, n, f.layoutBox), dr(d, m) || (u = !0), c.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = d, t.relativeParent = c);
3682
+ }
3683
+ }
3684
+ }
3685
+ t.notifyListeners("didUpdate", {
3686
+ layout: n,
3687
+ snapshot: e,
3688
+ delta: a,
3689
+ layoutDelta: r,
3690
+ hasLayoutChanged: l,
3691
+ hasRelativeLayoutChanged: u
3692
+ });
3693
+ } else if (t.isLead()) {
3694
+ const { onExitComplete: n } = t.options;
3695
+ n && n();
3696
+ }
3697
+ t.options.transition = void 0;
3698
+ }
3699
+ function fc(t) {
3700
+ t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
3701
+ }
3702
+ function dc(t) {
3703
+ t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
3704
+ }
3705
+ function mc(t) {
3706
+ t.clearSnapshot();
3707
+ }
3708
+ function Si(t) {
3709
+ t.clearMeasurements();
3710
+ }
3711
+ function bi(t) {
3712
+ t.isLayoutDirty = !1;
3713
+ }
3714
+ function pc(t) {
3715
+ const { visualElement: e } = t.options;
3716
+ e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
3717
+ }
3718
+ function Ai(t) {
3719
+ t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
3720
+ }
3721
+ function gc(t) {
3722
+ t.resolveTargetDelta();
3723
+ }
3724
+ function yc(t) {
3725
+ t.calcProjection();
3726
+ }
3727
+ function vc(t) {
3728
+ t.resetSkewAndRotation();
3729
+ }
3730
+ function Tc(t) {
3731
+ t.removeLeadSnapshot();
3732
+ }
3733
+ function Vi(t, e, n) {
3734
+ t.translate = D(e.translate, 0, n), t.scale = D(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
3735
+ }
3736
+ function Di(t, e, n, i) {
3737
+ t.min = D(e.min, n.min, i), t.max = D(e.max, n.max, i);
3738
+ }
3739
+ function xc(t, e, n, i) {
3740
+ Di(t.x, e.x, n.x, i), Di(t.y, e.y, n.y, i);
3741
+ }
3742
+ function wc(t) {
3743
+ return t.animationValues && t.animationValues.opacityExit !== void 0;
3744
+ }
3745
+ const Pc = {
3746
+ duration: 0.45,
3747
+ ease: [0.4, 0, 0.1, 1]
3748
+ }, Mi = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Ci = Mi("applewebkit/") && !Mi("chrome/") ? Math.round : W;
3749
+ function Ei(t) {
3750
+ t.min = Ci(t.min), t.max = Ci(t.max);
3751
+ }
3752
+ function Sc(t) {
3753
+ Ei(t.x), Ei(t.y);
3754
+ }
3755
+ function vr(t, e, n) {
3756
+ return t === "position" || t === "preserve-aspect" && !Gl(vi(e), vi(n), 0.2);
3757
+ }
3758
+ function bc(t) {
3759
+ return t !== t.root && t.scroll?.wasRoot;
3760
+ }
3761
+ const Ac = yr({
3762
+ attachResizeListener: (t, e) => kt(t, "resize", e),
3763
+ measureScroll: () => ({
3764
+ x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
3765
+ y: document.documentElement.scrollTop || document.body?.scrollTop || 0
3766
+ }),
3767
+ checkIsScrollRoot: () => !0
3768
+ }), ye = {
3769
+ current: void 0
3770
+ }, Tr = yr({
3771
+ measureScroll: (t) => ({
3772
+ x: t.scrollLeft,
3773
+ y: t.scrollTop
3774
+ }),
3775
+ defaultParent: () => {
3776
+ if (!ye.current) {
3777
+ const t = new Ac({});
3778
+ t.mount(window), t.setOptions({ layoutScroll: !0 }), ye.current = t;
3779
+ }
3780
+ return ye.current;
3781
+ },
3782
+ resetTransform: (t, e) => {
3783
+ t.style.transform = e !== void 0 ? e : "none";
3784
+ },
3785
+ checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
3786
+ }), xr = vt({
3787
+ transformPagePoint: (t) => t,
3788
+ isStatic: !1,
3789
+ reducedMotion: "never"
3790
+ });
3791
+ function Vc(t = !0) {
3792
+ const e = O(Ye);
3793
+ if (e === null)
3794
+ return [!0, null];
3795
+ const { isPresent: n, onExitComplete: i, register: s } = e, o = Ir();
3796
+ Xe(() => {
3797
+ if (t)
3798
+ return s(o);
3799
+ }, [t]);
3800
+ const r = zi(() => t && i && i(o), [o, i, t]);
3801
+ return !n && i ? [!1, r] : [!0];
3802
+ }
3803
+ const wr = vt({ strict: !1 }), Ri = {
3804
+ animation: [
3805
+ "animate",
3806
+ "variants",
3807
+ "whileHover",
3808
+ "whileTap",
3809
+ "exit",
3810
+ "whileInView",
3811
+ "whileFocus",
3812
+ "whileDrag"
3813
+ ],
3814
+ exit: ["exit"],
3815
+ drag: ["drag", "dragControls"],
3816
+ focus: ["whileFocus"],
3817
+ hover: ["whileHover", "onHoverStart", "onHoverEnd"],
3818
+ tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
3819
+ pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
3820
+ inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
3821
+ layout: ["layout", "layoutId"]
3822
+ };
3823
+ let Li = !1;
3824
+ function Dc() {
3825
+ if (Li)
3826
+ return;
3827
+ const t = {};
3828
+ for (const e in Ri)
3829
+ t[e] = {
3830
+ isEnabled: (n) => Ri[e].some((i) => !!n[i])
3831
+ };
3832
+ qs(t), Li = !0;
3833
+ }
3834
+ function Pr() {
3835
+ return Dc(), vl();
3836
+ }
3837
+ function Mc(t) {
3838
+ const e = Pr();
3839
+ for (const n in t)
3840
+ e[n] = {
3841
+ ...e[n],
3842
+ ...t[n]
3843
+ };
3844
+ qs(e);
3845
+ }
3846
+ const Cc = /* @__PURE__ */ new Set([
3847
+ "animate",
3848
+ "exit",
3849
+ "variants",
3850
+ "initial",
3851
+ "style",
3852
+ "values",
3853
+ "variants",
3854
+ "transition",
3855
+ "transformTemplate",
3856
+ "custom",
3857
+ "inherit",
3858
+ "onBeforeLayoutMeasure",
3859
+ "onAnimationStart",
3860
+ "onAnimationComplete",
3861
+ "onUpdate",
3862
+ "onDragStart",
3863
+ "onDrag",
3864
+ "onDragEnd",
3865
+ "onMeasureDragConstraints",
3866
+ "onDirectionLock",
3867
+ "onDragTransitionEnd",
3868
+ "_dragX",
3869
+ "_dragY",
3870
+ "onHoverStart",
3871
+ "onHoverEnd",
3872
+ "onViewportEnter",
3873
+ "onViewportLeave",
3874
+ "globalTapTarget",
3875
+ "propagate",
3876
+ "ignoreStrict",
3877
+ "viewport"
3878
+ ]);
3879
+ function ee(t) {
3880
+ return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Cc.has(t);
3881
+ }
3882
+ let Sr = (t) => !ee(t);
3883
+ function Ec(t) {
3884
+ typeof t == "function" && (Sr = (e) => e.startsWith("on") ? !ee(e) : t(e));
3885
+ }
3886
+ try {
3887
+ Ec(require("@emotion/is-prop-valid").default);
3888
+ } catch {
3889
+ }
3890
+ function Rc(t, e, n) {
3891
+ const i = {};
3892
+ for (const s in t)
3893
+ s === "values" && typeof t.values == "object" || (Sr(s) || n === !0 && ee(s) || !e && !ee(s) || // If trying to use native HTML drag events, forward drag listeners
3894
+ t.draggable && s.startsWith("onDrag")) && (i[s] = t[s]);
3895
+ return i;
3896
+ }
3897
+ const re = /* @__PURE__ */ vt({});
3898
+ function Lc(t, e) {
3899
+ if (se(t)) {
3900
+ const { initial: n, animate: i } = t;
3901
+ return {
3902
+ initial: n === !1 || Lt(n) ? n : void 0,
3903
+ animate: Lt(i) ? i : void 0
3904
+ };
3905
+ }
3906
+ return t.inherit !== !1 ? e : {};
3907
+ }
3908
+ function kc(t) {
3909
+ const { initial: e, animate: n } = Lc(t, O(re));
3910
+ return ne(() => ({ initial: e, animate: n }), [ki(e), ki(n)]);
3911
+ }
3912
+ function ki(t) {
3913
+ return Array.isArray(t) ? t.join(" ") : t;
3914
+ }
3915
+ const Sn = () => ({
3916
+ style: {},
3917
+ transform: {},
3918
+ transformOrigin: {},
3919
+ vars: {}
3920
+ });
3921
+ function br(t, e, n) {
3922
+ for (const i in e)
3923
+ !k(e[i]) && !ir(i, n) && (t[i] = e[i]);
3924
+ }
3925
+ function Bc({ transformTemplate: t }, e) {
3926
+ return ne(() => {
3927
+ const n = Sn();
3928
+ return wn(n, e, t), Object.assign({}, n.vars, n.style);
3929
+ }, [e]);
3930
+ }
3931
+ function Fc(t, e) {
3932
+ const n = t.style || {}, i = {};
3933
+ return br(i, n, t), Object.assign(i, Bc(t, e)), i;
3934
+ }
3935
+ function Ic(t, e) {
3936
+ const n = {}, i = Fc(t, e);
3937
+ return t.drag && t.dragListener !== !1 && (n.draggable = !1, i.userSelect = i.WebkitUserSelect = i.WebkitTouchCallout = "none", i.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = i, n;
3938
+ }
3939
+ const Ar = () => ({
3940
+ ...Sn(),
3941
+ attrs: {}
3942
+ });
3943
+ function Oc(t, e, n, i) {
3944
+ const s = ne(() => {
3945
+ const o = Ar();
3946
+ return sr(o, e, or(i), t.transformTemplate, t.style), {
3947
+ ...o.attrs,
3948
+ style: { ...o.style }
3949
+ };
3950
+ }, [e]);
3951
+ if (t.style) {
3952
+ const o = {};
3953
+ br(o, t.style, t), s.style = { ...o, ...s.style };
3954
+ }
3955
+ return s;
3956
+ }
3957
+ const jc = [
3958
+ "animate",
3959
+ "circle",
3960
+ "defs",
3961
+ "desc",
3962
+ "ellipse",
3963
+ "g",
3964
+ "image",
3965
+ "line",
3966
+ "filter",
3967
+ "marker",
3968
+ "mask",
3969
+ "metadata",
3970
+ "path",
3971
+ "pattern",
3972
+ "polygon",
3973
+ "polyline",
3974
+ "rect",
3975
+ "stop",
3976
+ "switch",
3977
+ "symbol",
3978
+ "svg",
3979
+ "text",
3980
+ "tspan",
3981
+ "use",
3982
+ "view"
3983
+ ];
3984
+ function bn(t) {
3985
+ return (
3986
+ /**
3987
+ * If it's not a string, it's a custom React component. Currently we only support
3988
+ * HTML custom React components.
3989
+ */
3990
+ typeof t != "string" || /**
3991
+ * If it contains a dash, the element is a custom HTML webcomponent.
3992
+ */
3993
+ t.includes("-") ? !1 : (
3994
+ /**
3995
+ * If it's in our list of lowercase SVG tags, it's an SVG component
3996
+ */
3997
+ !!(jc.indexOf(t) > -1 || /**
3998
+ * If it contains a capital letter, it's an SVG component
3999
+ */
4000
+ /[A-Z]/u.test(t))
4001
+ )
4002
+ );
4003
+ }
4004
+ function Nc(t, e, n, { latestValues: i }, s, o = !1, r) {
4005
+ const l = (r ?? bn(t) ? Oc : Ic)(e, i, s, t), u = Rc(e, typeof t == "string", o), c = t !== Hi ? { ...u, ...l, ref: n } : {}, { children: h } = e, f = ne(() => k(h) ? h.get() : h, [h]);
4006
+ return Or(t, {
4007
+ ...c,
4008
+ children: f
4009
+ });
4010
+ }
4011
+ function Uc({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, i, s) {
4012
+ return {
4013
+ latestValues: Wc(n, i, s, t),
4014
+ renderState: e()
4015
+ };
4016
+ }
4017
+ function Wc(t, e, n, i) {
4018
+ const s = {}, o = i(t, {});
4019
+ for (const f in o)
4020
+ s[f] = Gt(o[f]);
4021
+ let { initial: r, animate: a } = t;
4022
+ const l = se(t), u = Xs(t);
4023
+ e && u && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
4024
+ let c = n ? n.initial === !1 : !1;
4025
+ c = c || r === !1;
4026
+ const h = c ? a : r;
4027
+ if (h && typeof h != "boolean" && !ie(h)) {
4028
+ const f = Array.isArray(h) ? h : [h];
4029
+ for (let d = 0; d < f.length; d++) {
4030
+ const m = dn(t, f[d]);
4031
+ if (m) {
4032
+ const { transitionEnd: g, transition: x, ...v } = m;
4033
+ for (const T in v) {
4034
+ let p = v[T];
4035
+ if (Array.isArray(p)) {
4036
+ const P = c ? p.length - 1 : 0;
4037
+ p = p[P];
4038
+ }
4039
+ p !== null && (s[T] = p);
4040
+ }
4041
+ for (const T in g)
4042
+ s[T] = g[T];
4043
+ }
4044
+ }
4045
+ }
4046
+ return s;
4047
+ }
4048
+ const Vr = (t) => (e, n) => {
4049
+ const i = O(re), s = O(Ye), o = () => Uc(t, e, i, s);
4050
+ return n ? o() : Wr(o);
4051
+ }, Kc = /* @__PURE__ */ Vr({
4052
+ scrapeMotionValuesFromProps: Pn,
4053
+ createRenderState: Sn
4054
+ }), $c = /* @__PURE__ */ Vr({
4055
+ scrapeMotionValuesFromProps: ar,
4056
+ createRenderState: Ar
4057
+ }), zc = /* @__PURE__ */ Symbol.for("motionComponentSymbol");
4058
+ function Hc(t, e, n) {
4059
+ const i = st(n);
4060
+ Gi(() => {
4061
+ i.current = n;
4062
+ });
4063
+ const s = st(null);
4064
+ return zi((o) => {
4065
+ o && t.onMount?.(o), e && (o ? e.mount(o) : e.unmount());
4066
+ const r = i.current;
4067
+ if (typeof r == "function")
4068
+ if (o) {
4069
+ const a = r(o);
4070
+ typeof a == "function" && (s.current = a);
4071
+ } else s.current ? (s.current(), s.current = null) : r(o);
4072
+ else r && (r.current = o);
4073
+ }, [e]);
4074
+ }
4075
+ const Dr = vt({});
4076
+ function ct(t) {
4077
+ return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
4078
+ }
4079
+ function Gc(t, e, n, i, s, o) {
4080
+ const { visualElement: r } = O(re), a = O(wr), l = O(Ye), u = O(xr), c = u.reducedMotion, h = u.skipAnimations, f = st(null), d = st(!1);
4081
+ i = i || a.renderer, !f.current && i && (f.current = i(t, {
4082
+ visualState: e,
4083
+ parent: r,
4084
+ props: n,
4085
+ presenceContext: l,
4086
+ blockInitialAnimation: l ? l.initial === !1 : !1,
4087
+ reducedMotionConfig: c,
4088
+ skipAnimations: h,
4089
+ isSVG: o
4090
+ }), d.current && f.current && (f.current.manuallyAnimateOnMount = !0));
4091
+ const m = f.current, g = O(Dr);
4092
+ m && !m.projection && s && (m.type === "html" || m.type === "svg") && _c(f.current, n, s, g);
4093
+ const x = st(!1);
4094
+ Gi(() => {
4095
+ m && x.current && m.update(n, l);
4096
+ });
4097
+ const v = n[Fs], T = st(!!v && typeof window < "u" && !window.MotionHandoffIsComplete?.(v) && window.MotionHasOptimisedAnimation?.(v));
4098
+ return $r(() => {
4099
+ d.current = !0, m && (x.current = !0, window.MotionIsMounted = !0, m.updateFeatures(), m.scheduleRenderMicrotask(), T.current && m.animationState && m.animationState.animateChanges());
4100
+ }), Xe(() => {
4101
+ m && (!T.current && m.animationState && m.animationState.animateChanges(), T.current && (queueMicrotask(() => {
4102
+ window.MotionHandoffMarkAsComplete?.(v);
4103
+ }), T.current = !1), m.enteringChildren = void 0);
4104
+ }), m;
4105
+ }
4106
+ function _c(t, e, n, i) {
4107
+ const { layoutId: s, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: u, layoutCrossfade: c } = e;
4108
+ t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Mr(t.parent)), t.projection.setOptions({
4109
+ layoutId: s,
4110
+ layout: o,
4111
+ alwaysMeasureLayout: !!r || a && ct(a),
4112
+ visualElement: t,
4113
+ /**
4114
+ * TODO: Update options in an effect. This could be tricky as it'll be too late
4115
+ * to update by the time layout animations run.
4116
+ * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
4117
+ * ensuring it gets called if there's no potential layout animations.
4118
+ *
4119
+ */
4120
+ animationType: typeof o == "string" ? o : "both",
4121
+ initialPromotionConfig: i,
4122
+ crossfade: c,
4123
+ layoutScroll: l,
4124
+ layoutRoot: u
4125
+ });
4126
+ }
4127
+ function Mr(t) {
4128
+ if (t)
4129
+ return t.options.allowProjection !== !1 ? t.projection : Mr(t.parent);
4130
+ }
4131
+ function ve(t, { forwardMotionProps: e = !1, type: n } = {}, i, s) {
4132
+ i && Mc(i);
4133
+ const o = n ? n === "svg" : bn(t), r = o ? $c : Kc;
4134
+ function a(u, c) {
4135
+ let h;
4136
+ const f = {
4137
+ ...O(xr),
4138
+ ...u,
4139
+ layoutId: Xc(u)
4140
+ }, { isStatic: d } = f, m = kc(u), g = r(u, d);
4141
+ if (!d && typeof window < "u") {
4142
+ Yc(f, i);
4143
+ const x = qc(f);
4144
+ h = x.MeasureLayout, m.visualElement = Gc(t, g, f, s, x.ProjectionNode, o);
4145
+ }
4146
+ return Ur(re.Provider, { value: m, children: [h && m.visualElement ? _i(h, { visualElement: m.visualElement, ...f }) : null, Nc(t, u, Hc(g, m.visualElement, c), g, d, e, o)] });
4147
+ }
4148
+ a.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
4149
+ const l = jr(a);
4150
+ return l[zc] = t, l;
4151
+ }
4152
+ function Xc({ layoutId: t }) {
4153
+ const e = O(Xi).id;
4154
+ return e && t !== void 0 ? e + "-" + t : t;
4155
+ }
4156
+ function Yc(t, e) {
4157
+ const n = O(wr).strict;
4158
+ if (process.env.NODE_ENV !== "production" && e && n) {
4159
+ const i = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
4160
+ t.ignoreStrict ? Tt(!1, i, "lazy-strict-mode") : Y(!1, i, "lazy-strict-mode");
4161
+ }
4162
+ }
4163
+ function qc(t) {
4164
+ const e = Pr(), { drag: n, layout: i } = e;
4165
+ if (!n && !i)
4166
+ return {};
4167
+ const s = { ...n, ...i };
4168
+ return {
4169
+ MeasureLayout: n?.isEnabled(t) || i?.isEnabled(t) ? s.MeasureLayout : void 0,
4170
+ ProjectionNode: s.ProjectionNode
4171
+ };
4172
+ }
4173
+ function Zc(t, e) {
4174
+ if (typeof Proxy > "u")
4175
+ return ve;
4176
+ const n = /* @__PURE__ */ new Map(), i = (o, r) => ve(o, r, t, e), s = (o, r) => (process.env.NODE_ENV !== "production" && Je(!1, "motion() is deprecated. Use motion.create() instead."), i(o, r));
4177
+ return new Proxy(s, {
4178
+ /**
4179
+ * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
4180
+ * The prop name is passed through as `key` and we can use that to generate a `motion`
4181
+ * DOM component with that name.
4182
+ */
4183
+ get: (o, r) => r === "create" ? i : (n.has(r) || n.set(r, ve(r, void 0, t, e)), n.get(r))
4184
+ });
4185
+ }
4186
+ const Jc = (t, e) => e.isSVG ?? bn(t) ? new Fl(e) : new Cl(e, {
4187
+ allowProjection: t !== Hi
4188
+ });
4189
+ class Qc extends tt {
4190
+ /**
4191
+ * We dynamically generate the AnimationState manager as it contains a reference
4192
+ * to the underlying animation library. We only want to load that if we load this,
4193
+ * so people can optionally code split it out using the `m` component.
4194
+ */
4195
+ constructor(e) {
4196
+ super(e), e.animationState || (e.animationState = Ul(e));
4197
+ }
4198
+ updateAnimationControlsSubscription() {
4199
+ const { animate: e } = this.node.getProps();
4200
+ ie(e) && (this.unmountControls = e.subscribe(this.node));
4201
+ }
4202
+ /**
4203
+ * Subscribe any provided AnimationControls to the component's VisualElement
4204
+ */
4205
+ mount() {
4206
+ this.updateAnimationControlsSubscription();
4207
+ }
4208
+ update() {
4209
+ const { animate: e } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
4210
+ e !== n && this.updateAnimationControlsSubscription();
4211
+ }
4212
+ unmount() {
4213
+ this.node.animationState.reset(), this.unmountControls?.();
4214
+ }
4215
+ }
4216
+ let tu = 0;
4217
+ class eu extends tt {
4218
+ constructor() {
4219
+ super(...arguments), this.id = tu++;
4220
+ }
4221
+ update() {
4222
+ if (!this.node.presenceContext)
4223
+ return;
4224
+ const { isPresent: e, onExitComplete: n } = this.node.presenceContext, { isPresent: i } = this.node.prevPresenceContext || {};
4225
+ if (!this.node.animationState || e === i)
4226
+ return;
4227
+ const s = this.node.animationState.setActive("exit", !e);
4228
+ n && !e && s.then(() => {
4229
+ n(this.id);
4230
+ });
4231
+ }
4232
+ mount() {
4233
+ const { register: e, onExitComplete: n } = this.node.presenceContext || {};
4234
+ n && n(this.id), e && (this.unmount = e(this.id));
4235
+ }
4236
+ unmount() {
4237
+ }
4238
+ }
4239
+ const nu = {
4240
+ animation: {
4241
+ Feature: Qc
4242
+ },
4243
+ exit: {
4244
+ Feature: eu
4245
+ }
4246
+ };
4247
+ function Ot(t) {
4248
+ return {
4249
+ point: {
4250
+ x: t.pageX,
4251
+ y: t.pageY
4252
+ }
4253
+ };
4254
+ }
4255
+ const iu = (t) => (e) => yn(e) && t(e, Ot(e));
4256
+ function Mt(t, e, n, i) {
4257
+ return kt(t, e, iu(n), i);
4258
+ }
4259
+ const Cr = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Bi = (t, e) => Math.abs(t - e);
4260
+ function su(t, e) {
4261
+ const n = Bi(t.x, e.x), i = Bi(t.y, e.y);
4262
+ return Math.sqrt(n ** 2 + i ** 2);
4263
+ }
4264
+ const Fi = /* @__PURE__ */ new Set(["auto", "scroll"]);
4265
+ class Er {
4266
+ constructor(e, n, { transformPagePoint: i, contextWindow: s = window, dragSnapToOrigin: o = !1, distanceThreshold: r = 3, element: a } = {}) {
4267
+ if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (d) => {
4268
+ this.handleScroll(d.target);
4269
+ }, this.onWindowScroll = () => {
4270
+ this.handleScroll(window);
4271
+ }, this.updatePoint = () => {
4272
+ if (!(this.lastMoveEvent && this.lastMoveEventInfo))
4273
+ return;
4274
+ const d = xe(this.lastMoveEventInfo, this.history), m = this.startEvent !== null, g = su(d.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
4275
+ if (!m && !g)
4276
+ return;
4277
+ const { point: x } = d, { timestamp: v } = L;
4278
+ this.history.push({ ...x, timestamp: v });
4279
+ const { onStart: T, onMove: p } = this.handlers;
4280
+ m || (T && T(this.lastMoveEvent, d), this.startEvent = this.lastMoveEvent), p && p(this.lastMoveEvent, d);
4281
+ }, this.handlePointerMove = (d, m) => {
4282
+ this.lastMoveEvent = d, this.lastMoveEventInfo = Te(m, this.transformPagePoint), A.update(this.updatePoint, !0);
4283
+ }, this.handlePointerUp = (d, m) => {
4284
+ this.end();
4285
+ const { onEnd: g, onSessionEnd: x, resumeAnimation: v } = this.handlers;
4286
+ if ((this.dragSnapToOrigin || !this.startEvent) && v && v(), !(this.lastMoveEvent && this.lastMoveEventInfo))
4287
+ return;
4288
+ const T = xe(d.type === "pointercancel" ? this.lastMoveEventInfo : Te(m, this.transformPagePoint), this.history);
4289
+ this.startEvent && g && g(d, T), x && x(d, T);
4290
+ }, !yn(e))
4291
+ return;
4292
+ this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = i, this.distanceThreshold = r, this.contextWindow = s || window;
4293
+ const l = Ot(e), u = Te(l, this.transformPagePoint), { point: c } = u, { timestamp: h } = L;
4294
+ this.history = [{ ...c, timestamp: h }];
4295
+ const { onSessionStart: f } = n;
4296
+ f && f(e, xe(u, this.history)), this.removeListeners = Bt(Mt(this.contextWindow, "pointermove", this.handlePointerMove), Mt(this.contextWindow, "pointerup", this.handlePointerUp), Mt(this.contextWindow, "pointercancel", this.handlePointerUp)), a && this.startScrollTracking(a);
4297
+ }
4298
+ /**
4299
+ * Start tracking scroll on ancestors and window.
4300
+ */
4301
+ startScrollTracking(e) {
4302
+ let n = e.parentElement;
4303
+ for (; n; ) {
4304
+ const i = getComputedStyle(n);
4305
+ (Fi.has(i.overflowX) || Fi.has(i.overflowY)) && this.scrollPositions.set(n, {
4306
+ x: n.scrollLeft,
4307
+ y: n.scrollTop
4308
+ }), n = n.parentElement;
4309
+ }
4310
+ this.scrollPositions.set(window, {
4311
+ x: window.scrollX,
4312
+ y: window.scrollY
4313
+ }), window.addEventListener("scroll", this.onElementScroll, {
4314
+ capture: !0
4315
+ }), window.addEventListener("scroll", this.onWindowScroll), this.removeScrollListeners = () => {
4316
+ window.removeEventListener("scroll", this.onElementScroll, {
4317
+ capture: !0
4318
+ }), window.removeEventListener("scroll", this.onWindowScroll);
4319
+ };
4320
+ }
4321
+ /**
4322
+ * Handle scroll compensation during drag.
4323
+ *
4324
+ * For element scroll: adjusts history origin since pageX/pageY doesn't change.
4325
+ * For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.
4326
+ */
4327
+ handleScroll(e) {
4328
+ const n = this.scrollPositions.get(e);
4329
+ if (!n)
4330
+ return;
4331
+ const i = e === window, s = i ? { x: window.scrollX, y: window.scrollY } : {
4332
+ x: e.scrollLeft,
4333
+ y: e.scrollTop
4334
+ }, o = { x: s.x - n.x, y: s.y - n.y };
4335
+ o.x === 0 && o.y === 0 || (i ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += o.x, this.lastMoveEventInfo.point.y += o.y) : this.history.length > 0 && (this.history[0].x -= o.x, this.history[0].y -= o.y), this.scrollPositions.set(e, s), A.update(this.updatePoint, !0));
4336
+ }
4337
+ updateHandlers(e) {
4338
+ this.handlers = e;
4339
+ }
4340
+ end() {
4341
+ this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), Q(this.updatePoint);
4342
+ }
4343
+ }
4344
+ function Te(t, e) {
4345
+ return e ? { point: e(t.point) } : t;
4346
+ }
4347
+ function Ii(t, e) {
4348
+ return { x: t.x - e.x, y: t.y - e.y };
4349
+ }
4350
+ function xe({ point: t }, e) {
4351
+ return {
4352
+ point: t,
4353
+ delta: Ii(t, Rr(e)),
4354
+ offset: Ii(t, ru(e)),
4355
+ velocity: ou(e, 0.1)
4356
+ };
4357
+ }
4358
+ function ru(t) {
4359
+ return t[0];
4360
+ }
4361
+ function Rr(t) {
4362
+ return t[t.length - 1];
4363
+ }
4364
+ function ou(t, e) {
4365
+ if (t.length < 2)
4366
+ return { x: 0, y: 0 };
4367
+ let n = t.length - 1, i = null;
4368
+ const s = Rr(t);
4369
+ for (; n >= 0 && (i = t[n], !(s.timestamp - i.timestamp > /* @__PURE__ */ K(e))); )
4370
+ n--;
4371
+ if (!i)
4372
+ return { x: 0, y: 0 };
4373
+ i === t[0] && t.length > 2 && s.timestamp - i.timestamp > /* @__PURE__ */ K(e) * 2 && (i = t[1]);
4374
+ const o = /* @__PURE__ */ U(s.timestamp - i.timestamp);
4375
+ if (o === 0)
4376
+ return { x: 0, y: 0 };
4377
+ const r = {
4378
+ x: (s.x - i.x) / o,
4379
+ y: (s.y - i.y) / o
4380
+ };
4381
+ return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
4382
+ }
4383
+ function au(t, { min: e, max: n }, i) {
4384
+ return e !== void 0 && t < e ? t = i ? D(e, t, i.min) : Math.max(t, e) : n !== void 0 && t > n && (t = i ? D(n, t, i.max) : Math.min(t, n)), t;
4385
+ }
4386
+ function Oi(t, e, n) {
4387
+ return {
4388
+ min: e !== void 0 ? t.min + e : void 0,
4389
+ max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
4390
+ };
4391
+ }
4392
+ function lu(t, { top: e, left: n, bottom: i, right: s }) {
4393
+ return {
4394
+ x: Oi(t.x, n, s),
4395
+ y: Oi(t.y, e, i)
4396
+ };
4397
+ }
4398
+ function ji(t, e) {
4399
+ let n = e.min - t.min, i = e.max - t.max;
4400
+ return e.max - e.min < t.max - t.min && ([n, i] = [i, n]), { min: n, max: i };
4401
+ }
4402
+ function cu(t, e) {
4403
+ return {
4404
+ x: ji(t.x, e.x),
4405
+ y: ji(t.y, e.y)
4406
+ };
4407
+ }
4408
+ function uu(t, e) {
4409
+ let n = 0.5;
4410
+ const i = I(t), s = I(e);
4411
+ return s > i ? n = /* @__PURE__ */ Ct(e.min, e.max - i, t.min) : i > s && (n = /* @__PURE__ */ Ct(t.min, t.max - s, e.min)), X(0, 1, n);
4412
+ }
4413
+ function hu(t, e) {
4414
+ const n = {};
4415
+ return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
4416
+ }
4417
+ const Ge = 0.35;
4418
+ function fu(t = Ge) {
4419
+ return t === !1 ? t = 0 : t === !0 && (t = Ge), {
4420
+ x: Ni(t, "left", "right"),
4421
+ y: Ni(t, "top", "bottom")
4422
+ };
4423
+ }
4424
+ function Ni(t, e, n) {
4425
+ return {
4426
+ min: Ui(t, e),
4427
+ max: Ui(t, n)
4428
+ };
4429
+ }
4430
+ function Ui(t, e) {
4431
+ return typeof t == "number" ? t : t[e] || 0;
4432
+ }
4433
+ const du = /* @__PURE__ */ new WeakMap();
4434
+ class mu {
4435
+ constructor(e) {
4436
+ this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = E(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
4437
+ }
4438
+ start(e, { snapToCursor: n = !1, distanceThreshold: i } = {}) {
4439
+ const { presenceContext: s } = this.visualElement;
4440
+ if (s && s.isPresent === !1)
4441
+ return;
4442
+ const o = (h) => {
4443
+ n && this.snapToCursor(Ot(h).point), this.stopAnimation();
4444
+ }, r = (h, f) => {
4445
+ const { drag: d, dragPropagation: m, onDragStart: g } = this.getProps();
4446
+ if (d && !m && (this.openDragLock && this.openDragLock(), this.openDragLock = Xa(d), !this.openDragLock))
4447
+ return;
4448
+ this.latestPointerEvent = h, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), G((v) => {
4449
+ let T = this.getAxisMotionValue(v).get() || 0;
4450
+ if (_.test(T)) {
4451
+ const { projection: p } = this.visualElement;
4452
+ if (p && p.layout) {
4453
+ const P = p.layout.layoutBox[v];
4454
+ P && (T = I(P) * (parseFloat(T) / 100));
4455
+ }
4456
+ }
4457
+ this.originPoint[v] = T;
4458
+ }), g && A.update(() => g(h, f), !1, !0), je(this.visualElement, "transform");
4459
+ const { animationState: x } = this.visualElement;
4460
+ x && x.setActive("whileDrag", !0);
4461
+ }, a = (h, f) => {
4462
+ this.latestPointerEvent = h, this.latestPanInfo = f;
4463
+ const { dragPropagation: d, dragDirectionLock: m, onDirectionLock: g, onDrag: x } = this.getProps();
4464
+ if (!d && !this.openDragLock)
4465
+ return;
4466
+ const { offset: v } = f;
4467
+ if (m && this.currentDirection === null) {
4468
+ this.currentDirection = gu(v), this.currentDirection !== null && g && g(this.currentDirection);
4469
+ return;
4470
+ }
4471
+ this.updateAxis("x", f.point, v), this.updateAxis("y", f.point, v), this.visualElement.render(), x && A.update(() => x(h, f), !1, !0);
4472
+ }, l = (h, f) => {
4473
+ this.latestPointerEvent = h, this.latestPanInfo = f, this.stop(h, f), this.latestPointerEvent = null, this.latestPanInfo = null;
4474
+ }, u = () => {
4475
+ const { dragSnapToOrigin: h } = this.getProps();
4476
+ (h || this.constraints) && this.startAnimation({ x: 0, y: 0 });
4477
+ }, { dragSnapToOrigin: c } = this.getProps();
4478
+ this.panSession = new Er(e, {
4479
+ onSessionStart: o,
4480
+ onStart: r,
4481
+ onMove: a,
4482
+ onSessionEnd: l,
4483
+ resumeAnimation: u
4484
+ }, {
4485
+ transformPagePoint: this.visualElement.getTransformPagePoint(),
4486
+ dragSnapToOrigin: c,
4487
+ distanceThreshold: i,
4488
+ contextWindow: Cr(this.visualElement),
4489
+ element: this.visualElement.current
4490
+ });
4491
+ }
4492
+ /**
4493
+ * @internal
4494
+ */
4495
+ stop(e, n) {
4496
+ const i = e || this.latestPointerEvent, s = n || this.latestPanInfo, o = this.isDragging;
4497
+ if (this.cancel(), !o || !s || !i)
4498
+ return;
4499
+ const { velocity: r } = s;
4500
+ this.startAnimation(r);
4501
+ const { onDragEnd: a } = this.getProps();
4502
+ a && A.postRender(() => a(i, s));
4503
+ }
4504
+ /**
4505
+ * @internal
4506
+ */
4507
+ cancel() {
4508
+ this.isDragging = !1;
4509
+ const { projection: e, animationState: n } = this.visualElement;
4510
+ e && (e.isAnimationBlocked = !1), this.endPanSession();
4511
+ const { dragPropagation: i } = this.getProps();
4512
+ !i && this.openDragLock && (this.openDragLock(), this.openDragLock = null), n && n.setActive("whileDrag", !1);
4513
+ }
4514
+ /**
4515
+ * Clean up the pan session without modifying other drag state.
4516
+ * This is used during unmount to ensure event listeners are removed
4517
+ * without affecting projection animations or drag locks.
4518
+ * @internal
4519
+ */
4520
+ endPanSession() {
4521
+ this.panSession && this.panSession.end(), this.panSession = void 0;
4522
+ }
4523
+ updateAxis(e, n, i) {
4524
+ const { drag: s } = this.getProps();
4525
+ if (!i || !Ut(e, s, this.currentDirection))
4526
+ return;
4527
+ const o = this.getAxisMotionValue(e);
4528
+ let r = this.originPoint[e] + i[e];
4529
+ this.constraints && this.constraints[e] && (r = au(r, this.constraints[e], this.elastic[e])), o.set(r);
4530
+ }
4531
+ resolveConstraints() {
4532
+ const { dragConstraints: e, dragElastic: n } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, s = this.constraints;
4533
+ e && ct(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && i ? this.constraints = lu(i.layoutBox, e) : this.constraints = !1, this.elastic = fu(n), s !== this.constraints && !ct(e) && i && this.constraints && !this.hasMutatedConstraints && G((o) => {
4534
+ this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = hu(i.layoutBox[o], this.constraints[o]));
4535
+ });
4536
+ }
4537
+ resolveRefConstraints() {
4538
+ const { dragConstraints: e, onMeasureDragConstraints: n } = this.getProps();
4539
+ if (!e || !ct(e))
4540
+ return !1;
4541
+ const i = e.current;
4542
+ Y(i !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
4543
+ const { projection: s } = this.visualElement;
4544
+ if (!s || !s.layout)
4545
+ return !1;
4546
+ const o = Sl(i, s.root, this.visualElement.getTransformPagePoint());
4547
+ let r = cu(s.layout.layoutBox, o);
4548
+ if (n) {
4549
+ const a = n(xl(r));
4550
+ this.hasMutatedConstraints = !!a, a && (r = Js(a));
4551
+ }
4552
+ return r;
4553
+ }
4554
+ startAnimation(e) {
4555
+ const { drag: n, dragMomentum: i, dragElastic: s, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = G((c) => {
4556
+ if (!Ut(c, n, this.currentDirection))
4557
+ return;
4558
+ let h = l && l[c] || {};
4559
+ r && (h = { min: 0, max: 0 });
4560
+ const f = s ? 200 : 1e6, d = s ? 40 : 1e7, m = {
4561
+ type: "inertia",
4562
+ velocity: i ? e[c] : 0,
4563
+ bounceStiffness: f,
4564
+ bounceDamping: d,
4565
+ timeConstant: 750,
4566
+ restDelta: 1,
4567
+ restSpeed: 10,
4568
+ ...o,
4569
+ ...h
4570
+ };
4571
+ return this.startAxisValueAnimation(c, m);
4572
+ });
4573
+ return Promise.all(u).then(a);
4574
+ }
4575
+ startAxisValueAnimation(e, n) {
4576
+ const i = this.getAxisMotionValue(e);
4577
+ return je(this.visualElement, e), i.start(fn(e, i, 0, n, this.visualElement, !1));
4578
+ }
4579
+ stopAnimation() {
4580
+ G((e) => this.getAxisMotionValue(e).stop());
4581
+ }
4582
+ /**
4583
+ * Drag works differently depending on which props are provided.
4584
+ *
4585
+ * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
4586
+ * - Otherwise, we apply the delta to the x/y motion values.
4587
+ */
4588
+ getAxisMotionValue(e) {
4589
+ const n = `_drag${e.toUpperCase()}`, i = this.visualElement.getProps(), s = i[n];
4590
+ return s || this.visualElement.getValue(e, (i.initial ? i.initial[e] : void 0) || 0);
4591
+ }
4592
+ snapToCursor(e) {
4593
+ G((n) => {
4594
+ const { drag: i } = this.getProps();
4595
+ if (!Ut(n, i, this.currentDirection))
4596
+ return;
4597
+ const { projection: s } = this.visualElement, o = this.getAxisMotionValue(n);
4598
+ if (s && s.layout) {
4599
+ const { min: r, max: a } = s.layout.layoutBox[n], l = o.get() || 0;
4600
+ o.set(e[n] - D(r, a, 0.5) + l);
4601
+ }
4602
+ });
4603
+ }
4604
+ /**
4605
+ * When the viewport resizes we want to check if the measured constraints
4606
+ * have changed and, if so, reposition the element within those new constraints
4607
+ * relative to where it was before the resize.
4608
+ */
4609
+ scalePositionWithinConstraints() {
4610
+ if (!this.visualElement.current)
4611
+ return;
4612
+ const { drag: e, dragConstraints: n } = this.getProps(), { projection: i } = this.visualElement;
4613
+ if (!ct(n) || !i || !this.constraints)
4614
+ return;
4615
+ this.stopAnimation();
4616
+ const s = { x: 0, y: 0 };
4617
+ G((r) => {
4618
+ const a = this.getAxisMotionValue(r);
4619
+ if (a && this.constraints !== !1) {
4620
+ const l = a.get();
4621
+ s[r] = uu({ min: l, max: l }, this.constraints[r]);
4622
+ }
4623
+ });
4624
+ const { transformTemplate: o } = this.visualElement.getProps();
4625
+ this.visualElement.current.style.transform = o ? o({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.constraints = !1, this.resolveConstraints(), G((r) => {
4626
+ if (!Ut(r, e, null))
4627
+ return;
4628
+ const a = this.getAxisMotionValue(r), { min: l, max: u } = this.constraints[r];
4629
+ a.set(D(l, u, s[r]));
4630
+ }), this.visualElement.render();
4631
+ }
4632
+ addListeners() {
4633
+ if (!this.visualElement.current)
4634
+ return;
4635
+ du.set(this.visualElement, this);
4636
+ const e = this.visualElement.current, n = Mt(e, "pointerdown", (u) => {
4637
+ const { drag: c, dragListener: h = !0 } = this.getProps(), f = u.target, d = f !== e && tl(f);
4638
+ c && h && !d && this.start(u);
4639
+ });
4640
+ let i;
4641
+ const s = () => {
4642
+ const { dragConstraints: u } = this.getProps();
4643
+ ct(u) && u.current && (this.constraints = this.resolveRefConstraints(), i || (i = pu(e, u.current, () => this.scalePositionWithinConstraints())));
4644
+ }, { projection: o } = this.visualElement, r = o.addEventListener("measure", s);
4645
+ o && !o.layout && (o.root && o.root.updateScroll(), o.updateLayout()), A.read(s);
4646
+ const a = kt(window, "resize", () => this.scalePositionWithinConstraints()), l = o.addEventListener("didUpdate", (({ delta: u, hasLayoutChanged: c }) => {
4647
+ this.isDragging && c && (G((h) => {
4648
+ const f = this.getAxisMotionValue(h);
4649
+ f && (this.originPoint[h] += u[h].translate, f.set(f.get() + u[h].translate));
4650
+ }), this.visualElement.render());
4651
+ }));
4652
+ return () => {
4653
+ a(), n(), r(), l && l(), i && i();
4654
+ };
4655
+ }
4656
+ getProps() {
4657
+ const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: i = !1, dragPropagation: s = !1, dragConstraints: o = !1, dragElastic: r = Ge, dragMomentum: a = !0 } = e;
4658
+ return {
4659
+ ...e,
4660
+ drag: n,
4661
+ dragDirectionLock: i,
4662
+ dragPropagation: s,
4663
+ dragConstraints: o,
4664
+ dragElastic: r,
4665
+ dragMomentum: a
4666
+ };
4667
+ }
4668
+ }
4669
+ function Wi(t) {
4670
+ let e = !0;
4671
+ return () => {
4672
+ if (e) {
4673
+ e = !1;
4674
+ return;
4675
+ }
4676
+ t();
4677
+ };
4678
+ }
4679
+ function pu(t, e, n) {
4680
+ const i = qn(t, Wi(n)), s = qn(e, Wi(n));
4681
+ return () => {
4682
+ i(), s();
4683
+ };
4684
+ }
4685
+ function Ut(t, e, n) {
4686
+ return (e === !0 || e === t) && (n === null || n === t);
4687
+ }
4688
+ function gu(t, e = 10) {
4689
+ let n = null;
4690
+ return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
4691
+ }
4692
+ class yu extends tt {
4693
+ constructor(e) {
4694
+ super(e), this.removeGroupControls = W, this.removeListeners = W, this.controls = new mu(e);
4695
+ }
4696
+ mount() {
4697
+ const { dragControls: e } = this.node.getProps();
4698
+ e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || W;
4699
+ }
4700
+ update() {
4701
+ const { dragControls: e } = this.node.getProps(), { dragControls: n } = this.node.prevProps || {};
4702
+ e !== n && (this.removeGroupControls(), e && (this.removeGroupControls = e.subscribe(this.controls)));
4703
+ }
4704
+ unmount() {
4705
+ this.removeGroupControls(), this.removeListeners(), this.controls.isDragging || this.controls.endPanSession();
4706
+ }
4707
+ }
4708
+ const we = (t) => (e, n) => {
4709
+ t && A.update(() => t(e, n), !1, !0);
4710
+ };
4711
+ class vu extends tt {
4712
+ constructor() {
4713
+ super(...arguments), this.removePointerDownListener = W;
4714
+ }
4715
+ onPointerDown(e) {
4716
+ this.session = new Er(e, this.createPanHandlers(), {
4717
+ transformPagePoint: this.node.getTransformPagePoint(),
4718
+ contextWindow: Cr(this.node)
4719
+ });
4720
+ }
4721
+ createPanHandlers() {
4722
+ const { onPanSessionStart: e, onPanStart: n, onPan: i, onPanEnd: s } = this.node.getProps();
4723
+ return {
4724
+ onSessionStart: we(e),
4725
+ onStart: we(n),
4726
+ onMove: we(i),
4727
+ onEnd: (o, r) => {
4728
+ delete this.session, s && A.postRender(() => s(o, r));
4729
+ }
4730
+ };
4731
+ }
4732
+ mount() {
4733
+ this.removePointerDownListener = Mt(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
4734
+ }
4735
+ update() {
4736
+ this.session && this.session.updateHandlers(this.createPanHandlers());
4737
+ }
4738
+ unmount() {
4739
+ this.removePointerDownListener(), this.session && this.session.end();
4740
+ }
4741
+ }
4742
+ let Pe = !1;
4743
+ class Tu extends Nr {
4744
+ /**
4745
+ * This only mounts projection nodes for components that
4746
+ * need measuring, we might want to do it for all components
4747
+ * in order to incorporate transforms
4748
+ */
4749
+ componentDidMount() {
4750
+ const { visualElement: e, layoutGroup: n, switchLayoutGroup: i, layoutId: s } = this.props, { projection: o } = e;
4751
+ o && (n.group && n.group.add(o), i && i.register && s && i.register(o), Pe && o.root.didUpdate(), o.addEventListener("animationComplete", () => {
4752
+ this.safeToRemove();
4753
+ }), o.setOptions({
4754
+ ...o.options,
4755
+ layoutDependency: this.props.layoutDependency,
4756
+ onExitComplete: () => this.safeToRemove()
4757
+ })), _t.hasEverUpdated = !0;
4758
+ }
4759
+ getSnapshotBeforeUpdate(e) {
4760
+ const { layoutDependency: n, visualElement: i, drag: s, isPresent: o } = this.props, { projection: r } = i;
4761
+ return r && (r.isPresent = o, e.layoutDependency !== n && r.setOptions({
4762
+ ...r.options,
4763
+ layoutDependency: n
4764
+ }), Pe = !0, s || e.layoutDependency !== n || n === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || A.postRender(() => {
4765
+ const a = r.getStack();
4766
+ (!a || !a.members.length) && this.safeToRemove();
4767
+ }))), null;
4768
+ }
4769
+ componentDidUpdate() {
4770
+ const { projection: e } = this.props.visualElement;
4771
+ e && (e.root.didUpdate(), gn.postRender(() => {
4772
+ !e.currentAnimation && e.isLead() && this.safeToRemove();
4773
+ }));
4774
+ }
4775
+ componentWillUnmount() {
4776
+ const { visualElement: e, layoutGroup: n, switchLayoutGroup: i } = this.props, { projection: s } = e;
4777
+ Pe = !0, s && (s.scheduleCheckAfterUnmount(), n && n.group && n.group.remove(s), i && i.deregister && i.deregister(s));
4778
+ }
4779
+ safeToRemove() {
4780
+ const { safeToRemove: e } = this.props;
4781
+ e && e();
4782
+ }
4783
+ render() {
4784
+ return null;
4785
+ }
4786
+ }
4787
+ function Lr(t) {
4788
+ const [e, n] = Vc(), i = O(Xi);
4789
+ return _i(Tu, { ...t, layoutGroup: i, switchLayoutGroup: O(Dr), isPresent: e, safeToRemove: n });
4790
+ }
4791
+ const xu = {
4792
+ pan: {
4793
+ Feature: vu
4794
+ },
4795
+ drag: {
4796
+ Feature: yu,
4797
+ ProjectionNode: Tr,
4798
+ MeasureLayout: Lr
4799
+ }
4800
+ };
4801
+ function Ki(t, e, n) {
4802
+ const { props: i } = t;
4803
+ t.animationState && i.whileHover && t.animationState.setActive("whileHover", n === "Start");
4804
+ const s = "onHover" + n, o = i[s];
4805
+ o && A.postRender(() => o(e, Ot(e)));
4806
+ }
4807
+ class wu extends tt {
4808
+ mount() {
4809
+ const { current: e } = this.node;
4810
+ e && (this.unmount = qa(e, (n, i) => (Ki(this.node, i, "Start"), (s) => Ki(this.node, s, "End"))));
4811
+ }
4812
+ unmount() {
4813
+ }
4814
+ }
4815
+ class Pu extends tt {
4816
+ constructor() {
4817
+ super(...arguments), this.isActive = !1;
4818
+ }
4819
+ onFocus() {
4820
+ let e = !1;
4821
+ try {
4822
+ e = this.node.current.matches(":focus-visible");
4823
+ } catch {
4824
+ e = !0;
4825
+ }
4826
+ !e || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
4827
+ }
4828
+ onBlur() {
4829
+ !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
4830
+ }
4831
+ mount() {
4832
+ this.unmount = Bt(kt(this.node.current, "focus", () => this.onFocus()), kt(this.node.current, "blur", () => this.onBlur()));
4833
+ }
4834
+ unmount() {
4835
+ }
4836
+ }
4837
+ function $i(t, e, n) {
4838
+ const { props: i } = t;
4839
+ if (t.current instanceof HTMLButtonElement && t.current.disabled)
4840
+ return;
4841
+ t.animationState && i.whileTap && t.animationState.setActive("whileTap", n === "Start");
4842
+ const s = "onTap" + (n === "End" ? "" : n), o = i[s];
4843
+ o && A.postRender(() => o(e, Ot(e)));
4844
+ }
4845
+ class Su extends tt {
4846
+ mount() {
4847
+ const { current: e } = this.node;
4848
+ if (!e)
4849
+ return;
4850
+ const { globalTapTarget: n, propagate: i } = this.node.props;
4851
+ this.unmount = nl(e, (s, o) => ($i(this.node, o, "Start"), (r, { success: a }) => $i(this.node, r, a ? "End" : "Cancel")), {
4852
+ useGlobalTarget: n,
4853
+ stopPropagation: i?.tap === !1
4854
+ });
4855
+ }
4856
+ unmount() {
4857
+ }
4858
+ }
4859
+ const _e = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), bu = (t) => {
4860
+ const e = _e.get(t.target);
4861
+ e && e(t);
4862
+ }, Au = (t) => {
4863
+ t.forEach(bu);
4864
+ };
4865
+ function Vu({ root: t, ...e }) {
4866
+ const n = t || document;
4867
+ Se.has(n) || Se.set(n, {});
4868
+ const i = Se.get(n), s = JSON.stringify(e);
4869
+ return i[s] || (i[s] = new IntersectionObserver(Au, { root: t, ...e })), i[s];
4870
+ }
4871
+ function Du(t, e, n) {
4872
+ const i = Vu(e);
4873
+ return _e.set(t, n), i.observe(t), () => {
4874
+ _e.delete(t), i.unobserve(t);
4875
+ };
4876
+ }
4877
+ const Mu = {
4878
+ some: 0,
4879
+ all: 1
4880
+ };
4881
+ class Cu extends tt {
4882
+ constructor() {
4883
+ super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
4884
+ }
4885
+ startObserver() {
4886
+ this.unmount();
4887
+ const { viewport: e = {} } = this.node.getProps(), { root: n, margin: i, amount: s = "some", once: o } = e, r = {
4888
+ root: n ? n.current : void 0,
4889
+ rootMargin: i,
4890
+ threshold: typeof s == "number" ? s : Mu[s]
4891
+ }, a = (l) => {
4892
+ const { isIntersecting: u } = l;
4893
+ if (this.isInView === u || (this.isInView = u, o && !u && this.hasEnteredView))
4894
+ return;
4895
+ u && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", u);
4896
+ const { onViewportEnter: c, onViewportLeave: h } = this.node.getProps(), f = u ? c : h;
4897
+ f && f(l);
4898
+ };
4899
+ return Du(this.node.current, r, a);
4900
+ }
4901
+ mount() {
4902
+ this.startObserver();
4903
+ }
4904
+ update() {
4905
+ if (typeof IntersectionObserver > "u")
4906
+ return;
4907
+ const { props: e, prevProps: n } = this.node;
4908
+ ["amount", "margin", "root"].some(Eu(e, n)) && this.startObserver();
4909
+ }
4910
+ unmount() {
4911
+ }
4912
+ }
4913
+ function Eu({ viewport: t = {} }, { viewport: e = {} } = {}) {
4914
+ return (n) => t[n] !== e[n];
4915
+ }
4916
+ const Ru = {
4917
+ inView: {
4918
+ Feature: Cu
4919
+ },
4920
+ tap: {
4921
+ Feature: Su
4922
+ },
4923
+ focus: {
4924
+ Feature: Pu
4925
+ },
4926
+ hover: {
4927
+ Feature: wu
4928
+ }
4929
+ }, Lu = {
4930
+ layout: {
4931
+ ProjectionNode: Tr,
4932
+ MeasureLayout: Lr
4933
+ }
4934
+ }, ku = {
4935
+ ...nu,
4936
+ ...Ru,
4937
+ ...xu,
4938
+ ...Lu
4939
+ }, ju = /* @__PURE__ */ Zc(ku, Jc);
4940
+ export {
4941
+ ju as m
4942
+ };