@konstructio/ui 0.1.2-alpha.52 → 0.1.2-alpha.53

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