@servicetitan/anvil2 1.2.4 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/{Alert-6faa0b05.js → Alert-9a5ff517.js} +28 -27
  2. package/Alert-9a5ff517.js.map +1 -0
  3. package/Alert-df710e2c.cjs +2 -0
  4. package/Alert-df710e2c.cjs.map +1 -0
  5. package/Alert.cjs +1 -1
  6. package/Alert.js +1 -1
  7. package/{Announcement-d04009ea.js → Announcement-115eb041.js} +18 -17
  8. package/Announcement-115eb041.js.map +1 -0
  9. package/Announcement-4c075fdb.cjs +2 -0
  10. package/Announcement-4c075fdb.cjs.map +1 -0
  11. package/Announcement.cjs +1 -1
  12. package/Announcement.js +1 -1
  13. package/Avatar.cjs +1 -1
  14. package/Avatar.js +1 -1
  15. package/Badge-b8764640.cjs +2 -0
  16. package/Badge-b8764640.cjs.map +1 -0
  17. package/Badge-df96f15a.js +45 -0
  18. package/Badge-df96f15a.js.map +1 -0
  19. package/Badge.cjs +1 -1
  20. package/Badge.js +1 -1
  21. package/Button-04337e26.cjs +2 -0
  22. package/Button-04337e26.cjs.map +1 -0
  23. package/{Button-d05507c5.js → Button-45864cc0.js} +72 -72
  24. package/Button-45864cc0.js.map +1 -0
  25. package/Button.cjs +1 -1
  26. package/Button.js +27 -27
  27. package/ButtonCompound.cjs +1 -1
  28. package/ButtonCompound.js +27 -27
  29. package/ButtonLink.cjs +1 -1
  30. package/ButtonLink.js +27 -27
  31. package/ButtonToggle.cjs +1 -1
  32. package/ButtonToggle.js +27 -27
  33. package/{Calendar-706f41ff.cjs → Calendar-06ced77e.cjs} +2 -2
  34. package/{Calendar-706f41ff.cjs.map → Calendar-06ced77e.cjs.map} +1 -1
  35. package/{Calendar-073dc10d.js → Calendar-c8bc215f.js} +84 -78
  36. package/{Calendar-073dc10d.js.map → Calendar-c8bc215f.js.map} +1 -1
  37. package/Calendar.cjs +1 -1
  38. package/Calendar.js +1 -1
  39. package/{Card-92ebca1f.cjs → Card-20628287.cjs} +2 -2
  40. package/{Card-92ebca1f.cjs.map → Card-20628287.cjs.map} +1 -1
  41. package/{Card-33f3ad0a.js → Card-bb358803.js} +6 -6
  42. package/{Card-33f3ad0a.js.map → Card-bb358803.js.map} +1 -1
  43. package/Card.cjs +1 -1
  44. package/Card.js +1 -1
  45. package/{Checkbox-d503c3b6.js → Checkbox-3de9628c.js} +24 -24
  46. package/Checkbox-3de9628c.js.map +1 -0
  47. package/Checkbox-d325d851.cjs +2 -0
  48. package/Checkbox-d325d851.cjs.map +1 -0
  49. package/Checkbox.cjs +1 -1
  50. package/Checkbox.js +1 -1
  51. package/{Chip-b52e1bd7.cjs → Chip-95370241.cjs} +2 -2
  52. package/{Chip-b52e1bd7.cjs.map → Chip-95370241.cjs.map} +1 -1
  53. package/{Chip-a8eb2656.js → Chip-c0f71a26.js} +15 -15
  54. package/Chip-c0f71a26.js.map +1 -0
  55. package/Chip.cjs +1 -1
  56. package/Chip.js +1 -1
  57. package/Combobox.cjs +1 -1
  58. package/Combobox.js +27 -27
  59. package/Details.cjs +1 -1
  60. package/Details.js +27 -27
  61. package/Dialog.cjs +1 -1
  62. package/Dialog.js +27 -27
  63. package/{Divider-86c1f4ea.cjs → Divider-cdc54ec4.cjs} +2 -2
  64. package/{Divider-86c1f4ea.cjs.map → Divider-cdc54ec4.cjs.map} +1 -1
  65. package/{Divider-edca965e.js → Divider-e5d4cede.js} +6 -6
  66. package/{Divider-edca965e.js.map → Divider-e5d4cede.js.map} +1 -1
  67. package/Divider.cjs +1 -1
  68. package/Divider.js +1 -1
  69. package/{Drawer-f68286e8.js → Drawer-d34989aa.js} +67 -48
  70. package/Drawer-d34989aa.js.map +1 -0
  71. package/Drawer-ec654d43.cjs +2 -0
  72. package/Drawer-ec654d43.cjs.map +1 -0
  73. package/Drawer.cjs +1 -1
  74. package/Drawer.js +1 -1
  75. package/{Flex-4b128a0e.cjs → Flex-971b5295.cjs} +2 -2
  76. package/{Flex-4b128a0e.cjs.map → Flex-971b5295.cjs.map} +1 -1
  77. package/{Flex-f6e67921.js → Flex-d338e855.js} +2 -2
  78. package/{Flex-f6e67921.js.map → Flex-d338e855.js.map} +1 -1
  79. package/Flex.cjs +1 -1
  80. package/Flex.js +1 -1
  81. package/{Grid-8226f7a1.cjs → Grid-37ded954.cjs} +2 -2
  82. package/{Grid-8226f7a1.cjs.map → Grid-37ded954.cjs.map} +1 -1
  83. package/{Grid-992de375.js → Grid-5bad450f.js} +4 -4
  84. package/{Grid-992de375.js.map → Grid-5bad450f.js.map} +1 -1
  85. package/Grid.cjs +1 -1
  86. package/Grid.js +1 -1
  87. package/{Helper-74a1f07f-6cf9865b.cjs → Helper-74a1f07f-30e4fd46.cjs} +2 -2
  88. package/{Helper-74a1f07f-6cf9865b.cjs.map → Helper-74a1f07f-30e4fd46.cjs.map} +1 -1
  89. package/{Helper-74a1f07f-067ae3f7.js → Helper-74a1f07f-60547798.js} +3 -3
  90. package/{Helper-74a1f07f-067ae3f7.js.map → Helper-74a1f07f-60547798.js.map} +1 -1
  91. package/{Icon-ae9b951b.cjs → Icon-43ce0e6c.cjs} +2 -2
  92. package/{Icon-ae9b951b.cjs.map → Icon-43ce0e6c.cjs.map} +1 -1
  93. package/{Icon-fa8f3dc8.js → Icon-b443eea4.js} +8 -8
  94. package/Icon-b443eea4.js.map +1 -0
  95. package/Icon.cjs +1 -1
  96. package/Icon.js +1 -1
  97. package/Link.cjs +1 -1
  98. package/Link.js +27 -27
  99. package/ListView-43bbc290.cjs +2 -0
  100. package/ListView-43bbc290.cjs.map +1 -0
  101. package/{ListView-1f75e2de.js → ListView-482c54ad.js} +100 -100
  102. package/ListView-482c54ad.js.map +1 -0
  103. package/ListView.cjs +1 -1
  104. package/ListView.js +1 -1
  105. package/Listbox-8c610bf2.cjs +2 -0
  106. package/Listbox-8c610bf2.cjs.map +1 -0
  107. package/{Listbox-cdf02568.js → Listbox-b110c64d.js} +68 -68
  108. package/Listbox-b110c64d.js.map +1 -0
  109. package/Listbox.cjs +1 -1
  110. package/Listbox.js +1 -1
  111. package/Menu.cjs +1 -1
  112. package/Menu.js +1 -1
  113. package/Overflow.cjs +1 -1
  114. package/Overflow.js +27 -27
  115. package/Popover.cjs +1 -1
  116. package/Popover.js +39 -39
  117. package/{ProgressBar-5f350a3f.js → ProgressBar-91240dab.js} +94 -92
  118. package/ProgressBar-91240dab.js.map +1 -0
  119. package/ProgressBar-b25b2493.cjs +2 -0
  120. package/ProgressBar-b25b2493.cjs.map +1 -0
  121. package/ProgressBar.cjs +1 -1
  122. package/ProgressBar.js +1 -1
  123. package/{Radio-4189b000.js → Radio-a747c89a.js} +13 -13
  124. package/Radio-a747c89a.js.map +1 -0
  125. package/Radio-ed00ea9d.cjs +2 -0
  126. package/Radio-ed00ea9d.cjs.map +1 -0
  127. package/Radio.cjs +1 -1
  128. package/Radio.js +1 -1
  129. package/{SideNav-e92d850f.js → SideNav-b5ef91d4.js} +118 -118
  130. package/SideNav-b5ef91d4.js.map +1 -0
  131. package/{SideNav-6de704fd.cjs → SideNav-dbcdf7cb.cjs} +6 -6
  132. package/SideNav-dbcdf7cb.cjs.map +1 -0
  133. package/SideNav.cjs +1 -1
  134. package/SideNav.js +1 -1
  135. package/{SrOnly-0c13a721.js → SrOnly-864bd4cb.js} +3 -3
  136. package/SrOnly-864bd4cb.js.map +1 -0
  137. package/SrOnly-88e8fca6.cjs +2 -0
  138. package/SrOnly-88e8fca6.cjs.map +1 -0
  139. package/SrOnly.cjs +1 -1
  140. package/SrOnly.js +1 -1
  141. package/Stepper-24609fae.cjs +2 -0
  142. package/Stepper-24609fae.cjs.map +1 -0
  143. package/{Stepper-fa554908.js → Stepper-af4bf5a4.js} +109 -109
  144. package/Stepper-af4bf5a4.js.map +1 -0
  145. package/Stepper.cjs +1 -1
  146. package/Stepper.js +1 -1
  147. package/{Switch-b0a37fc1.js → Switch-39010760.js} +21 -21
  148. package/{Switch-b0a37fc1.js.map → Switch-39010760.js.map} +1 -1
  149. package/Switch-c0bea091.cjs +2 -0
  150. package/{Switch-285b3272.cjs.map → Switch-c0bea091.cjs.map} +1 -1
  151. package/Switch.cjs +1 -1
  152. package/Switch.js +1 -1
  153. package/Tab-0bcbe9c7.cjs +10 -0
  154. package/Tab-0bcbe9c7.cjs.map +1 -0
  155. package/Tab-f636d6c5.js +422 -0
  156. package/Tab-f636d6c5.js.map +1 -0
  157. package/Tab.cjs +1 -1
  158. package/Tab.js +1 -1
  159. package/{Text-4c30916c.js → Text-465104f6.js} +46 -46
  160. package/Text-465104f6.js.map +1 -0
  161. package/Text-631c229a.cjs +2 -0
  162. package/Text-631c229a.cjs.map +1 -0
  163. package/Text.cjs +1 -1
  164. package/Text.js +1 -1
  165. package/TextField.cjs +1 -1
  166. package/TextField.js +27 -27
  167. package/Textarea.cjs +1 -1
  168. package/Textarea.js +27 -27
  169. package/{Toast-f15e9d36.js → Toast-70eeeb27.js} +90 -74
  170. package/Toast-70eeeb27.js.map +1 -0
  171. package/{Toast-834c85cd.cjs → Toast-f681677a.cjs} +5 -5
  172. package/Toast-f681677a.cjs.map +1 -0
  173. package/Toast.cjs +1 -1
  174. package/Toast.js +1 -1
  175. package/Tooltip.cjs +1 -1
  176. package/Tooltip.js +29 -29
  177. package/anvil2.cjs +1 -1
  178. package/anvil2.js +27 -27
  179. package/assets/icons/st/batch.svg +1 -1
  180. package/assets/icons/st/call.svg +1 -1
  181. package/assets/icons/st/call_inbound.svg +1 -1
  182. package/assets/icons/st/call_outbound.svg +1 -1
  183. package/assets/icons/st/customer.svg +1 -1
  184. package/assets/icons/st/equipment.svg +1 -1
  185. package/assets/icons/st/estimate.svg +1 -1
  186. package/assets/icons/st/form.svg +1 -1
  187. package/assets/icons/st/invoice.svg +1 -1
  188. package/assets/icons/st/job.svg +1 -1
  189. package/assets/icons/st/local_settings.svg +1 -1
  190. package/assets/icons/st/location.svg +1 -1
  191. package/assets/icons/st/memberships.svg +1 -1
  192. package/assets/icons/st/payment.svg +1 -1
  193. package/assets/icons/st/pro_tip.svg +1 -1
  194. package/assets/icons/st/project.svg +1 -1
  195. package/assets/icons/st/proposal.svg +1 -1
  196. package/assets/icons/st/purchase_order.svg +1 -1
  197. package/assets/icons/st/service_agreements.svg +1 -1
  198. package/assets/icons/st/sms.svg +1 -1
  199. package/assets/icons/st/text_inbound.svg +1 -1
  200. package/assets/icons/st/text_outbound.svg +1 -1
  201. package/assets/icons/st/upsell.svg +1 -1
  202. package/assets/icons/st/virtual_agent.svg +1 -1
  203. package/assets/icons/st/web_chat.svg +1 -1
  204. package/{index-dfb6272f.cjs → index-96006246.cjs} +5 -5
  205. package/{index-dfb6272f.cjs.map → index-96006246.cjs.map} +1 -1
  206. package/index-afacb017-461bfee6.cjs +2 -0
  207. package/index-afacb017-461bfee6.cjs.map +1 -0
  208. package/{index-098ca719-3c14c40c.js → index-afacb017-9c38f9e0.js} +65 -62
  209. package/index-afacb017-9c38f9e0.js.map +1 -0
  210. package/{index-8ee9499c.js → index-d1828774.js} +833 -771
  211. package/{index-8ee9499c.js.map → index-d1828774.js.map} +1 -1
  212. package/index-f91265d9-04a0345c.cjs +2 -0
  213. package/index-f91265d9-04a0345c.cjs.map +1 -0
  214. package/index-f91265d9-3d747651.js +121 -0
  215. package/index-f91265d9-3d747651.js.map +1 -0
  216. package/{motion-9462a11a.js → motion-a0a946d6.js} +1696 -1638
  217. package/motion-a0a946d6.js.map +1 -0
  218. package/motion-dae3950e.cjs +2 -0
  219. package/motion-dae3950e.cjs.map +1 -0
  220. package/package.json +3 -4
  221. package/use-reduced-motion-a766a46b.cjs +2 -0
  222. package/use-reduced-motion-a766a46b.cjs.map +1 -0
  223. package/{use-reduced-motion-fa02c531.js → use-reduced-motion-b359504d.js} +11 -11
  224. package/use-reduced-motion-b359504d.js.map +1 -0
  225. package/useAccessibleColor.cjs +1 -1
  226. package/useAccessibleColor.js +27 -27
  227. package/useLinkStyles.cjs +1 -1
  228. package/useLinkStyles.js +27 -27
  229. package/useMergeRefs.cjs +1 -1
  230. package/useMergeRefs.js +27 -27
  231. package/usePrefersColorScheme.cjs +1 -1
  232. package/usePrefersColorScheme.js +27 -27
  233. package/useSwipe.cjs +1 -1
  234. package/useSwipe.js +27 -27
  235. package/Alert-6336e146.cjs +0 -2
  236. package/Alert-6336e146.cjs.map +0 -1
  237. package/Alert-6faa0b05.js.map +0 -1
  238. package/Announcement-d04009ea.js.map +0 -1
  239. package/Announcement-fff87b68.cjs +0 -2
  240. package/Announcement-fff87b68.cjs.map +0 -1
  241. package/Badge-0073b5a1.cjs +0 -2
  242. package/Badge-0073b5a1.cjs.map +0 -1
  243. package/Badge-f761458c.js +0 -35
  244. package/Badge-f761458c.js.map +0 -1
  245. package/Button-268ba8a9.cjs +0 -2
  246. package/Button-268ba8a9.cjs.map +0 -1
  247. package/Button-d05507c5.js.map +0 -1
  248. package/Checkbox-d503c3b6.js.map +0 -1
  249. package/Checkbox-edf070c3.cjs +0 -2
  250. package/Checkbox-edf070c3.cjs.map +0 -1
  251. package/Chip-a8eb2656.js.map +0 -1
  252. package/Drawer-6c2a6e0c.cjs +0 -2
  253. package/Drawer-6c2a6e0c.cjs.map +0 -1
  254. package/Drawer-f68286e8.js.map +0 -1
  255. package/Icon-fa8f3dc8.js.map +0 -1
  256. package/ListView-14d80585.cjs +0 -2
  257. package/ListView-14d80585.cjs.map +0 -1
  258. package/ListView-1f75e2de.js.map +0 -1
  259. package/Listbox-306a8d62.cjs +0 -2
  260. package/Listbox-306a8d62.cjs.map +0 -1
  261. package/Listbox-cdf02568.js.map +0 -1
  262. package/ProgressBar-29d21945.cjs +0 -2
  263. package/ProgressBar-29d21945.cjs.map +0 -1
  264. package/ProgressBar-5f350a3f.js.map +0 -1
  265. package/Radio-4189b000.js.map +0 -1
  266. package/Radio-abd4d3fd.cjs +0 -2
  267. package/Radio-abd4d3fd.cjs.map +0 -1
  268. package/SideNav-6de704fd.cjs.map +0 -1
  269. package/SideNav-e92d850f.js.map +0 -1
  270. package/SrOnly-0c13a721.js.map +0 -1
  271. package/SrOnly-ecf7240b.cjs +0 -2
  272. package/SrOnly-ecf7240b.cjs.map +0 -1
  273. package/Stepper-e776cc28.cjs +0 -2
  274. package/Stepper-e776cc28.cjs.map +0 -1
  275. package/Stepper-fa554908.js.map +0 -1
  276. package/Switch-285b3272.cjs +0 -2
  277. package/Tab-1934a4ca.js +0 -448
  278. package/Tab-1934a4ca.js.map +0 -1
  279. package/Tab-ad70a0a5.cjs +0 -10
  280. package/Tab-ad70a0a5.cjs.map +0 -1
  281. package/Text-4c30916c.js.map +0 -1
  282. package/Text-ed02cc62.cjs +0 -2
  283. package/Text-ed02cc62.cjs.map +0 -1
  284. package/Toast-834c85cd.cjs.map +0 -1
  285. package/Toast-f15e9d36.js.map +0 -1
  286. package/index-098ca719-3c14c40c.js.map +0 -1
  287. package/index-098ca719-8e068129.cjs +0 -2
  288. package/index-098ca719-8e068129.cjs.map +0 -1
  289. package/index-da56edbc-372336bd.js +0 -120
  290. package/index-da56edbc-372336bd.js.map +0 -1
  291. package/index-da56edbc-53f59f54.cjs +0 -2
  292. package/index-da56edbc-53f59f54.cjs.map +0 -1
  293. package/motion-9462a11a.js.map +0 -1
  294. package/motion-ee26ec15.cjs +0 -2
  295. package/motion-ee26ec15.cjs.map +0 -1
  296. package/use-reduced-motion-00575ab2.cjs +0 -2
  297. package/use-reduced-motion-00575ab2.cjs.map +0 -1
  298. package/use-reduced-motion-fa02c531.js.map +0 -1
  299. /package/{index-098ca719.css → index-afacb017.css} +0 -0
  300. /package/{index-da56edbc.css → index-f91265d9.css} +0 -0
@@ -1,2 +0,0 @@
1
- "use strict";const he=require("./jsx-runtime-494437bb.cjs"),P=require("react"),q=require("./use-reduced-motion-00575ab2.cjs"),Ae=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Wt=P.createContext({}),Gt=P.createContext(null),ds=q.isBrowser?P.useLayoutEffect:P.useEffect,ps=P.createContext({strict:!1}),we=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ki="framerAppearId",ms="data-"+we(ki),Oi={skipAnimations:!1,useManualTiming:!1};class en{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function ji(t){let e=new en,n=new en,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const h=u&&i,f=h?e:n;return c&&r.add(l),f.add(l)&&h&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),r.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let c=0;c<s;c++){const u=e.order[c];r.has(u)&&(a.schedule(u),t()),u(l)}i=!1,o&&(o=!1,a.process(l))}};return a}const Rt=["read","resolveKeyframes","update","preRender","render","postRender"],Ii=40;function gs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Rt.reduce((h,f)=>(h[f]=ji(()=>n=!0),h),{}),r=h=>{o[h].process(i)},a=()=>{const h=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(h-i.timestamp,Ii),1),i.timestamp=h,i.isProcessing=!0,Rt.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Rt.reduce((h,f)=>{const d=o[f];return h[f]=(p,m=!1,y=!1)=>(n||l(),d.schedule(p,m,y)),h},{}),cancel:h=>Rt.forEach(f=>o[f].cancel(h)),state:i,steps:o}}const{schedule:Ce,cancel:ql}=gs(queueMicrotask,!1);function lt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const ys=P.createContext({});let nn=!1;function Ni(t,e,n,s,i){const{visualElement:o}=P.useContext(Wt),r=P.useContext(ps),a=P.useContext(Gt),l=P.useContext(Ae).reducedMotion,c=P.useRef();s=s||r.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,h=P.useContext(ys);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&Ki(c.current,n,i,h),P.useInsertionEffect(()=>{u&&u.update(n,a)});const f=P.useRef(!!(n[ms]&&!window.HandoffComplete));return ds(()=>{u&&(u.updateFeatures(),Ce.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),P.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,nn||(nn=!0,queueMicrotask(Ui))))}),u}function Ui(){window.HandoffComplete=!0}function Ki(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:vs(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&lt(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:c})}function vs(t){if(t)return t.options.allowProjection!==!1?t.projection:vs(t.parent)}function $i(t,e,n){return P.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):lt(n)&&(n.current=s))},[e])}function bt(t){return typeof t=="string"||Array.isArray(t)}function _t(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const De=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Me=["initial",...De];function Ht(t){return _t(t.animate)||Me.some(e=>bt(t[e]))}function xs(t){return!!(Ht(t)||t.variants)}function Wi(t,e){if(Ht(t)){const{initial:n,animate:s}=t;return{initial:n===!1||bt(n)?n:void 0,animate:bt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Gi(t){const{initial:e,animate:n}=Wi(t,P.useContext(Wt));return P.useMemo(()=>({initial:e,animate:n}),[sn(e),sn(n)])}function sn(t){return Array.isArray(t)?t.join(" "):t}const rn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ft={};for(const t in rn)ft[t]={isEnabled:e=>rn[t].some(n=>!!e[n])};function _i(t){for(const e in t)ft[e]={...ft[e],...t[e]}}const Re=P.createContext({}),Hi=Symbol.for("motionComponentSymbol"),M=t=>t;let pt=M;exports.invariant=M;process.env.NODE_ENV!=="production"&&(pt=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},exports.invariant=(t,e)=>{if(!t)throw new Error(e)});function zi({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&_i(t);function o(a,l){let c;const u={...P.useContext(Ae),...a,layoutId:Yi(a)},{isStatic:h}=u,f=Gi(a),d=s(a,h);if(!h&&q.isBrowser){Xi(u,t);const p=qi(u);c=p.MeasureLayout,f.visualElement=Ni(i,d,u,e,p.ProjectionNode)}return he.jsxRuntimeExports.jsxs(Wt.Provider,{value:f,children:[c&&f.visualElement?he.jsxRuntimeExports.jsx(c,{visualElement:f.visualElement,...u}):null,n(i,a,$i(d,f.visualElement,l),d,h,f.visualElement)]})}const r=P.forwardRef(o);return r[Hi]=i,r}function Yi({layoutId:t}){const e=P.useContext(Re).id;return e&&t!==void 0?e+"-"+t:t}function Xi(t,e){const n=P.useContext(ps).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?pt(!1,s):exports.invariant(!1,s)}}function qi(t){const{drag:e,layout:n}=ft;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Zi(t){function e(s,i={}){return zi(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const Ji=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ee(t){return typeof t!="string"||t.includes("-")?!1:!!(Ji.indexOf(t)>-1||/[A-Z]/u.test(t))}const Ot={};function Qi(t){Object.assign(Ot,t)}const wt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ot=new Set(wt);function Ts(t,{layout:e,layoutId:n}){return ot.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ot[t]||t==="opacity")}const L=t=>!!(t&&t.getVelocity),tr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},er=wt.length;function nr(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;r<er;r++){const a=wt[r];if(t[a]!==void 0){const l=tr[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const Ps=t=>e=>typeof e=="string"&&e.startsWith(t),bs=Ps("--"),sr=Ps("var(--"),Le=t=>sr(t)?ir.test(t.split("/*")[0].trim()):!1,ir=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,rr=(t,e)=>e&&typeof t=="number"?e.transform(t):t,J=(t,e,n)=>n>e?e:n<t?t:n,mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},vt={...mt,transform:t=>J(0,1,t)},Et={...mt,default:1},xt=t=>Math.round(t*1e5)/1e5,Fe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,or=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,ar=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ct(t){return typeof t=="string"}const Dt=t=>({test:e=>Ct(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Y=Dt("deg"),N=Dt("%"),x=Dt("px"),lr=Dt("vh"),ur=Dt("vw"),on={...N,parse:t=>N.parse(t)/100,transform:t=>N.transform(t*100)},an={...mt,transform:Math.round},Ss={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,size:x,top:x,right:x,bottom:x,left:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,rotate:Y,rotateX:Y,rotateY:Y,rotateZ:Y,scale:Et,scaleX:Et,scaleY:Et,scaleZ:Et,skew:Y,skewX:Y,skewY:Y,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:vt,originX:on,originY:on,originZ:x,zIndex:an,backgroundPositionX:x,backgroundPositionY:x,fillOpacity:vt,strokeOpacity:vt,numOctaves:an};function Be(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const h in e){const f=e[h];if(bs(h)){o[h]=f;continue}const d=Ss[h],p=rr(f,d);if(ot.has(h)){if(l=!0,r[h]=p,!u)continue;f!==(d.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,a[h]=p):i[h]=p}if(e.transform||(l||s?i.transform=nr(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:h="50%",originY:f="50%",originZ:d=0}=a;i.transformOrigin=`${h} ${f} ${d}`}}const ke=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Vs(t,e,n){for(const s in e)!L(e[s])&&!Ts(s,n)&&(t[s]=e[s])}function cr({transformTemplate:t},e,n){return P.useMemo(()=>{const s=ke();return Be(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function hr(t,e,n){const s=t.style||{},i={};return Vs(i,s,t),Object.assign(i,cr(t,e,n)),i}function fr(t,e,n){const s={},i=hr(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const dr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function jt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||dr.has(t)}let As=t=>!jt(t);function pr(t){t&&(As=e=>e.startsWith("on")?!jt(e):t(e))}try{pr(require("@emotion/is-prop-valid").default)}catch{}function mr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(As(i)||n===!0&&jt(i)||!e&&!jt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function ln(t,e,n){return typeof t=="string"?t:x.transform(e+n*t)}function gr(t,e,n){const s=ln(e,t.x,t.width),i=ln(n,t.y,t.height);return`${s} ${i}`}const yr={offset:"stroke-dashoffset",array:"stroke-dasharray"},vr={offset:"strokeDashoffset",array:"strokeDasharray"};function xr(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?yr:vr;t[o.offset]=x.transform(-s);const r=x.transform(e),a=x.transform(n);t[o.array]=`${r} ${a}`}function Oe(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h,f){if(Be(t,c,u,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=gr(m,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&xr(d,r,a,l,!1)}const ws=()=>({...ke(),attrs:{}}),je=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Tr(t,e,n,s){const i=P.useMemo(()=>{const o=ws();return Oe(o,e,{enableHardwareAcceleration:!1},je(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Vs(o,t.style,t),i.style={...o,...i.style}}return i}function Pr(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=(Ee(n)?Tr:fr)(s,o,r,n),c=mr(s,typeof n=="string",t),u=n!==P.Fragment?{...c,...l,ref:i}:{},{children:h}=s,f=P.useMemo(()=>L(h)?h.get():h,[h]);return P.createElement(n,{...u,children:f})}}function Cs(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Ds=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ms(t,e,n,s){Cs(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ds.has(i)?i:we(i),e.attrs[i])}function Ie(t,e,n){var s;const{style:i}=t,o={};for(const r in i)(L(i[r])||e.style&&L(e.style[r])||Ts(r,t)||((s=n==null?void 0:n.getValue(r))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[r]=i[r]);return o}function Rs(t,e,n){const s=Ie(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const o=wt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}function un(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ne(t,e,n,s){if(typeof e=="function"){const[i,o]=un(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=un(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Es(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const fe=t=>Array.isArray(t),br=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Sr=t=>fe(t)?t[t.length-1]||0:t;function Ft(t){const e=L(t)?t.get():t;return br(e)?e.toValue():e}function Vr({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Ar(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Ls=t=>(e,n)=>{const s=P.useContext(Wt),i=P.useContext(Gt),o=()=>Vr(t,e,s,i);return n?o():Es(o)};function Ar(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Ft(o[f]);let{initial:r,animate:a}=t;const l=Ht(t),c=xs(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;return h&&typeof h!="boolean"&&!_t(h)&&(Array.isArray(h)?h:[h]).forEach(d=>{const p=Ne(t,d);if(!p)return;const{transitionEnd:m,transition:y,...v}=p;for(const T in v){let g=v[T];if(Array.isArray(g)){const b=u?g.length-1:0;g=g[b]}g!==null&&(i[T]=g)}for(const T in m)i[T]=m[T]}),i}const{schedule:A,cancel:H,state:D,steps:Jt}=gs(typeof requestAnimationFrame<"u"?requestAnimationFrame:M,!0),wr={useVisualState:Ls({scrapeMotionValuesFromProps:Rs,createRenderState:ws,onMount:(t,e,{renderState:n,latestValues:s})=>{A.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),A.render(()=>{Oe(n,s,{enableHardwareAcceleration:!1},je(e.tagName),t.transformTemplate),Ms(e,n)})}})},Cr={useVisualState:Ls({scrapeMotionValuesFromProps:Ie,createRenderState:ke})};function Dr(t,{forwardMotionProps:e=!1},n,s){return{...Ee(t)?wr:Cr,preloadedFeatures:n,useRender:Pr(e),createVisualElement:s,Component:t}}function K(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Fs=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function zt(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const Mr=t=>e=>Fs(e)&&t(e,zt(e));function $(t,e,n,s){return K(t,e,Mr(n),s)}const Rr=(t,e)=>n=>e(t(n)),W=(...t)=>t.reduce(Rr);function Bs(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const cn=Bs("dragHorizontal"),hn=Bs("dragVertical");function ks(t){let e=!1;if(t==="y")e=hn();else if(t==="x")e=cn();else{const n=cn(),s=hn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Os(){const t=ks(!0);return t?(t(),!1):!0}class tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function fn(t,e){const n=e?"pointerenter":"pointerleave",s=e?"onHoverStart":"onHoverEnd",i=(o,r)=>{if(o.pointerType==="touch"||Os())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[s];l&&A.postRender(()=>l(o,r))};return $(t.current,n,i,{passive:!t.getProps()[s]})}class Er extends tt{mount(){this.unmount=W(fn(this.node,!0),fn(this.node,!1))}unmount(){}}class Lr extends tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=W(K(this.node.current,"focus",()=>this.onFocus()),K(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const js=(t,e)=>e?t===e?!0:js(t,e.parentElement):!1;function Qt(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,zt(n))}class Fr extends tt{constructor(){super(...arguments),this.removeStartListeners=M,this.removeEndListeners=M,this.removeAccessibleListeners=M,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),o=$(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:h}=this.node.getProps(),f=!h&&!js(this.node.current,a.target)?u:c;f&&A.update(()=>f(a,l))},{passive:!(s.onTap||s.onPointerUp)}),r=$(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=W(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||Qt("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&A.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=K(this.node.current,"keyup",r),Qt("down",(a,l)=>{this.startPress(a,l)})},n=K(this.node.current,"keydown",e),s=()=>{this.isPressing&&Qt("cancel",(o,r)=>this.cancelPress(o,r))},i=K(this.node.current,"blur",s);this.removeAccessibleListeners=W(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&A.postRender(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Os()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&A.postRender(()=>s(e,n))}mount(){const e=this.node.getProps(),n=$(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=K(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=W(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const de=new WeakMap,te=new WeakMap,Br=t=>{const e=de.get(t.target);e&&e(t)},kr=t=>{t.forEach(Br)};function Or({root:t,...e}){const n=t||document;te.has(n)||te.set(n,{});const s=te.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(kr,{root:t,...e})),s[i]}function jr(t,e,n){const s=Or(e);return de.set(t,n),s.observe(t),()=>{de.delete(t),s.unobserve(t)}}const Ir={some:0,all:1};class Nr extends tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Ir[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=c?u:h;f&&f(l)};return jr(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Ur(e,n))&&this.startObserver()}unmount(){}}function Ur({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Kr={inView:{Feature:Nr},tap:{Feature:Fr},focus:{Feature:Lr},hover:{Feature:Er}};function Is(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function Yt(t,e,n){const s=t.getProps();return Ne(s,e,n!==void 0?n:s.custom,t)}const G=t=>t*1e3,_=t=>t/1e3,$r={type:"spring",stiffness:500,damping:25,restSpeed:10},Wr=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Gr={type:"keyframes",duration:.8},_r={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Hr=(t,{keyframes:e})=>e.length>2?Gr:ot.has(t)?t.startsWith("scale")?Wr(e[1]):$r:_r;function zr({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Ue(t,e){return t[e]||t.default||t}const Yr=t=>t!==null;function Xt(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Yr),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}let Bt;function Xr(){Bt=void 0}const Z={now:()=>(Bt===void 0&&Z.set(D.isProcessing||Oi.useManualTiming?D.timestamp:performance.now()),Bt),set:t=>{Bt=t,queueMicrotask(Xr)}},Ns=t=>/^0[^.\s]+$/u.test(t);function qr(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ns(t):!0}const Us=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Zr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Jr(t){const e=Zr.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const Qr=4;function Ks(t,e,n=1){exports.invariant(n<=Qr,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[s,i]=Jr(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Us(r)?parseFloat(r):r}return Le(i)?Ks(i,e,n+1):i}const to=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),dn=t=>t===mt||t===x,pn=(t,e)=>parseFloat(t.split(", ")[e]),mn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return pn(i[1],e);{const o=s.match(/^matrix\((.+)\)$/u);return o?pn(o[1],t):0}},eo=new Set(["x","y","z"]),no=wt.filter(t=>!eo.has(t));function so(t){const e=[];return no.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const dt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:mn(4,13),y:mn(5,14)};dt.translateX=dt.x;dt.translateY=dt.y;const $s=t=>e=>e.test(t),io={test:t=>t==="auto",parse:t=>t},Ws=[mt,x,N,Y,ur,lr,io],gn=t=>Ws.find($s(t)),rt=new Set;let pe=!1,me=!1;function Gs(){if(me){const t=Array.from(rt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=so(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))===null||a===void 0||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}me=!1,pe=!1,rt.forEach(t=>t.complete()),rt.clear()}function _s(){rt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(me=!0)})}function ro(){_s(),Gs()}class Ke{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(rt.add(this),pe||(pe=!0,A.read(_s),A.resolveKeyframes(Gs))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const r=i==null?void 0:i.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),rt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,rt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const $e=(t,e)=>n=>!!(Ct(n)&&ar.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Hs=(t,e,n)=>s=>{if(!Ct(s))return s;const[i,o,r,a]=s.match(Fe);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},oo=t=>J(0,255,t),ee={...mt,transform:t=>Math.round(oo(t))},it={test:$e("rgb","red"),parse:Hs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ee.transform(t)+", "+ee.transform(e)+", "+ee.transform(n)+", "+xt(vt.transform(s))+")"};function ao(t){let e="",n="",s="",i="";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),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ge={test:$e("#"),parse:ao,transform:it.transform},ut={test:$e("hsl","hue"),parse:Hs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+N.transform(xt(e))+", "+N.transform(xt(n))+", "+xt(vt.transform(s))+")"},E={test:t=>it.test(t)||ge.test(t)||ut.test(t),parse:t=>it.test(t)?it.parse(t):ut.test(t)?ut.parse(t):ge.parse(t),transform:t=>Ct(t)?t:t.hasOwnProperty("red")?it.transform(t):ut.transform(t)};function lo(t){var e,n;return isNaN(t)&&Ct(t)&&(((e=t.match(Fe))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(or))===null||n===void 0?void 0:n.length)||0)>0}const zs="number",Ys="color",uo="var",co="var(",yn="${}",ho=/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;function St(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(ho,l=>(E.test(l)?(s.color.push(o),i.push(Ys),n.push(E.parse(l))):l.startsWith(co)?(s.var.push(o),i.push(uo),n.push(l)):(s.number.push(o),i.push(zs),n.push(parseFloat(l))),++o,yn)).split(yn);return{values:n,split:a,indexes:s,types:i}}function Xs(t){return St(t).values}function qs(t){const{split:e,types:n}=St(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===zs?o+=xt(i[r]):a===Ys?o+=E.transform(i[r]):o+=i[r]}return o}}const fo=t=>typeof t=="number"?0:t;function po(t){const e=Xs(t);return qs(t)(e.map(fo))}const Q={test:lo,parse:Xs,createTransformer:qs,getAnimatableNone:po},mo=new Set(["brightness","contrast","saturate","opacity"]);function go(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Fe)||[];if(!s)return t;const i=n.replace(s,"");let o=mo.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const yo=/\b([a-z-]*)\(.*?\)/gu,ye={...Q,getAnimatableNone:t=>{const e=t.match(yo);return e?e.map(go).join(" "):t}},vo={...Ss,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:ye,WebkitFilter:ye},We=t=>vo[t];function Zs(t,e){let n=We(t);return n!==ye&&(n=Q),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const xo=new Set(["auto","none","0"]);function To(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!xo.has(o)&&St(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Zs(n,i)}class Js extends Ke{constructor(e,n,s,i){super(e,n,s,i,i==null?void 0:i.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Le(c))){const u=Ks(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!to.has(s)||e.length!==2)return;const[i,o]=e,r=gn(i),a=gn(o);if(r!==a)if(dn(r)&&dn(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)qr(e[i])&&s.push(i);s.length&&To(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n.current)return;const o=n.getValue(s);o&&o.jump(this.measuredOrigin,!1);const r=i.length-1,a=i[r];i[r]=dt[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Qs(t){let e;return()=>(e===void 0&&(e=t()),e)}const vn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Q.test(t)||t==="0")&&!t.startsWith("url("));function Po(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function bo(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=vn(i,e),a=vn(o,e);return pt(r===a,`You are trying to animate ${e} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!r||!a?!1:Po(t)||n==="spring"&&s}class ti{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ro(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:o,delay:r,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!bo(e,s,i,o))if(r)this.options.duration=0;else{l==null||l(Xt(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function ei(t,e){return e?t*(1e3/e):0}const So=5;function ni(t,e,n){const s=Math.max(e-So,0);return ei(n-t(s),e-s)}const ne=.001,Vo=.01,xn=10,Ao=.05,wo=1;function Co({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;pt(t<=G(xn),"Spring duration must be 10 seconds or less");let r=1-e;r=J(Ao,wo,r),t=J(Vo,xn,_(t)),r<1?(i=c=>{const u=c*r,h=u*t,f=u-n,d=ve(c,r),p=Math.exp(-h);return ne-f/d*p},o=c=>{const h=c*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(c,2)*t,p=Math.exp(-h),m=ve(Math.pow(c,2),r);return(-i(c)+ne>0?-1:1)*((f-d)*p)/m}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-ne+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=Mo(i,o,a);if(t=G(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const Do=12;function Mo(t,e,n){let s=n;for(let i=1;i<Do;i++)s=s-t(s)/e(s);return s}function ve(t,e){return t*Math.sqrt(1-e*e)}const Ro=["duration","bounce"],Eo=["stiffness","damping","mass"];function Tn(t,e){return e.some(n=>t[n]!==void 0)}function Lo(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Tn(t,Eo)&&Tn(t,Ro)){const n=Co(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function si({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:u,velocity:h,isResolvedFromDuration:f}=Lo({...s,velocity:-_(s.velocity||0)}),d=h||0,p=l/(2*Math.sqrt(a*c)),m=o-i,y=_(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let T;if(p<1){const g=ve(y,p);T=b=>{const V=Math.exp(-p*y*b);return o-V*((d+p*y*m)/g*Math.sin(g*b)+m*Math.cos(g*b))}}else if(p===1)T=g=>o-Math.exp(-y*g)*(m+(d+y*m)*g);else{const g=y*Math.sqrt(p*p-1);T=b=>{const V=Math.exp(-p*y*b),R=Math.min(g*b,300);return o-V*((d+p*y*m)*Math.sinh(R)+g*m*Math.cosh(R))/g}}return{calculatedDuration:f&&u||null,next:g=>{const b=T(g);if(f)r.done=g>=u;else{let V=d;g!==0&&(p<1?V=ni(T,g,b):V=0);const R=Math.abs(V)<=n,z=Math.abs(o-b)<=e;r.done=R&&z}return r.value=r.done?o:b,r}}}function Pn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=S=>a!==void 0&&S<a||l!==void 0&&S>l,p=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let m=n*e;const y=h+m,v=r===void 0?y:r(y);v!==y&&(m=v-h);const T=S=>-m*Math.exp(-S/s),g=S=>v+T(S),b=S=>{const k=T(S),O=g(S);f.done=Math.abs(k)<=c,f.value=f.done?v:O};let V,R;const z=S=>{d(f.value)&&(V=S,R=si({keyframes:[f.value,p(f.value)],velocity:ni(g,S,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return z(0),{calculatedDuration:null,next:S=>{let k=!1;return!R&&V===void 0&&(k=!0,b(S),z(S)),V!==void 0&&S>=V?R.next(S-V):(!k&&b(S),f)}}}const ii=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Fo=1e-7,Bo=12;function ko(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=ii(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Fo&&++a<Bo);return r}function Mt(t,e,n,s){if(t===e&&n===s)return M;const i=o=>ko(o,0,1,t,n);return o=>o===0||o===1?o:ii(i(o),e,s)}const Oo=Mt(.42,0,1,1),jo=Mt(0,0,.58,1),ri=Mt(.42,0,.58,1),Io=t=>Array.isArray(t)&&typeof t[0]!="number",oi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ai=t=>e=>1-t(1-e),Ge=t=>1-Math.sin(Math.acos(t)),li=ai(Ge),No=oi(Ge),ui=Mt(.33,1.53,.69,.99),_e=ai(ui),Uo=oi(_e),Ko=t=>(t*=2)<1?.5*_e(t):.5*(2-Math.pow(2,-10*(t-1))),bn={linear:M,easeIn:Oo,easeInOut:ri,easeOut:jo,circIn:Ge,circInOut:No,circOut:li,backIn:_e,backInOut:Uo,backOut:ui,anticipate:Ko},Sn=t=>{if(Array.isArray(t)){exports.invariant(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,s,i]=t;return Mt(e,n,s,i)}else if(typeof t=="string")return exports.invariant(bn[t]!==void 0,`Invalid easing type '${t}'`),bn[t];return t},Vt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},w=(t,e,n)=>t+(e-t)*n;function se(t,e,n){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}function $o({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=se(l,a,t+1/3),o=se(l,a,t),r=se(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function It(t,e){return n=>n>0?e:t}const ie=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Wo=[ge,it,ut],Go=t=>Wo.find(e=>e.test(t));function Vn(t){const e=Go(t);if(pt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===ut&&(n=$o(n)),n}const An=(t,e)=>{const n=Vn(t),s=Vn(e);if(!n||!s)return It(t,e);const i={...n};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=w(n.alpha,s.alpha,o),it.transform(i))},xe=new Set(["none","hidden"]);function _o(t,e){return xe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Ho(t,e){return n=>w(t,e,n)}function He(t){return typeof t=="number"?Ho:typeof t=="string"?Le(t)?It:E.test(t)?An:Xo:Array.isArray(t)?ci:typeof t=="object"?E.test(t)?An:zo:It}function ci(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>He(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function zo(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=He(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Yo(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][i[r]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[o]=l,i[r]++}return s}const Xo=(t,e)=>{const n=Q.createTransformer(e),s=St(t),i=St(e);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?xe.has(t)&&!i.values.length||xe.has(e)&&!s.values.length?_o(t,e):W(ci(Yo(s,i),i.values),n):(pt(!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.`),It(t,e))};function hi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?w(t,e,n):He(t)(t,e)}function qo(t,e,n){const s=[],i=n||hi,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||M:e;a=W(l,a)}s.push(a)}return s}function Zo(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(exports.invariant(o===e.length,"Both input and output ranges must be the same length"),o===1)return()=>e[0];if(o===2&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=qo(e,s,i),a=r.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const h=Vt(t[u],t[u+1],c);return r[u](h)};return n?c=>l(J(t[0],t[o-1],c)):l}function Jo(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Vt(0,e,s);t.push(w(n,1,i))}}function Qo(t){const e=[0];return Jo(e,t.length-1),e}function ta(t,e){return t.map(n=>n*e)}function ea(t,e){return t.map(()=>e||ri).splice(0,t.length-1)}function Nt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Io(s)?s.map(Sn):Sn(s),o={done:!1,value:e[0]},r=ta(n&&n.length===e.length?n:Qo(e),t),a=Zo(r,e,{ease:Array.isArray(i)?i:ea(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const wn=2e4;function na(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<wn;)e+=n,s=t.next(e);return e>=wn?1/0:e}const sa=t=>{const e=({timestamp:n})=>t(n);return{start:()=>A.update(e,!0),stop:()=>H(e),now:()=>D.isProcessing?D.timestamp:Z.now()}},ia={decay:Pn,inertia:Pn,tween:Nt,keyframes:Nt,spring:si},ra=t=>t/100;class ze extends ti{constructor({KeyframeResolver:e=Ke,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:s,motionValue:i,keyframes:o}=this.options,r=(a,l)=>this.onKeyframesResolved(a,l);s&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,r,s,i):this.resolver=new e(o,r,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=ia[n]||Nt;let l,c;a!==Nt&&typeof e[0]!="number"&&(process.env.NODE_ENV!=="production"&&exports.invariant(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=W(ra,hi(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});o==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=na(u));const{calculatedDuration:h}=u,f=h+i,d=f*(s+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:S}=this.options;return{done:!0,value:S[S.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:h}=s;if(this.startTime===null)return o.next(0);const{delay:f,repeat:d,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),T=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,b=o;if(d){const S=Math.min(this.currentTime,u)/h;let k=Math.floor(S),O=S%1;!O&&S>=1&&(O=1),O===1&&k--,k=Math.min(k,d+1),!!(k%2)&&(p==="reverse"?(O=1-O,m&&(O-=m/h)):p==="mirror"&&(b=r)),g=J(0,1,O)*h}const V=T?{done:!1,value:l[0]}:b.next(g);a&&(V.value=a(V.value));let{done:R}=V;!T&&c!==null&&(R=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return z&&i!==void 0&&(V.value=Xt(l,this.options,i)),y&&y(V.value),z&&this.finish(),V}get duration(){const{resolved:e}=this;return e?_(e.calculatedDuration):0}get time(){return _(this.currentTime)}set time(e){e=G(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=_(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=sa,onPlay:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=s),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const fi=t=>Array.isArray(t)&&typeof t[0]=="number";function di(t){return!!(!t||typeof t=="string"&&t in Ye||fi(t)||Array.isArray(t)&&t.every(di))}const yt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ye={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yt([0,.65,.55,1]),circOut:yt([.55,0,1,.45]),backIn:yt([.31,.01,.66,-.59]),backOut:yt([.33,1.53,.69,.99])};function oa(t){return pi(t)||Ye.easeOut}function pi(t){if(t)return fi(t)?yt(t):Array.isArray(t)?t.map(oa):Ye[t]}function aa(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=pi(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const la=Qs(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ua=new Set(["opacity","clipPath","filter","transform"]),Ut=10,ca=2e4;function ha(t){return t.type==="spring"||t.name==="backgroundColor"||!di(t.ease)}function fa(t,e){const n=new ze({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&o<ca;)s=n.sample(o),i.push(s.value),o+=Ut;return{times:void 0,keyframes:i,duration:o-Ut,ease:"linear"}}class Cn extends ti{constructor(e){super(e);const{name:n,motionValue:s,keyframes:i}=this.options;this.resolver=new Js(i,(o,r)=>this.onKeyframesResolved(o,r),n,s),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:o,ease:r,type:a,motionValue:l,name:c}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(ha(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,...p}=this.options,m=fa(e,p);e=m.keyframes,e.length===1&&(e[1]=e[0]),i=m.duration,o=m.times,r=m.ease,a="keyframes"}const u=aa(l.owner.current,c,e,{...this.options,duration:i,times:o,ease:r});return u.startTime=Z.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:h}=this.options;l.set(Xt(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:o,type:a,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return _(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return _(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=G(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return M;const{animation:s}=n;s.timeline=e,s.onfinish=null}return M}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:o,ease:r,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:c,onComplete:u,...h}=this.options,f=new ze({...h,keyframes:s,duration:i,type:o,ease:r,times:a,isGenerator:!0}),d=G(this.time);l.setWithVelocity(f.sample(d-Ut).value,f.sample(d).value,Ut)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:o,damping:r,type:a}=e;return la()&&s&&ua.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}function da(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return A.update(s,!0),()=>H(s)}const pa=Qs(()=>window.ScrollTimeline!==void 0);class ma{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e){const n=this.animations.map(s=>{if(pa()&&s.attachTimeline)s.attachTimeline(e);else return s.pause(),da(i=>{s.time=s.duration*i},e)});return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Xe=(t,e,n,s={},i,o)=>r=>{const a=Ue(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-G(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};zr(a)||(u={...u,...Hr(t,u)}),u.duration&&(u.duration=G(u.duration)),u.repeatDelay&&(u.repeatDelay=G(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(h=!0)),h&&!o&&e.get()!==void 0){const f=Xt(u.keyframes,a);if(f!==void 0)return A.update(()=>{u.onUpdate(f),u.onComplete()}),new ma([])}return!o&&Cn.supports(u)?new Cn(u):new ze(u)};function Kt(t){return!!(L(t)&&t.add)}function qe(t,e){t.indexOf(e)===-1&&t.push(e)}function Ze(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Je{constructor(){this.subscriptions=[]}add(e){return qe(this.subscriptions,e),()=>Ze(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Dn=30,ga=t=>!isNaN(parseFloat(t));class ya{constructor(e,n={}){this.version="11.2.12",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=Z.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Z.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ga(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&q.warnOnce(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Je);const s=this.events[e].add(n);return e==="change"?()=>{s(),A.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Dn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dn);return ei(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function At(t,e){return new ya(t,e)}function va(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,At(n))}function xa(t,e){const n=Yt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Sr(o[r]);va(t,r,a)}}function mi(t){return t.getProps()[ms]}function Ta({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function gi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;const c=t.getValue("willChange");s&&(r=s);const u=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in l){const d=t.getValue(f,(o=t.latestValues[f])!==null&&o!==void 0?o:null),p=l[f];if(p===void 0||h&&Ta(h,f))continue;const m={delay:n,elapsed:0,...Ue(r||{},f)};let y=!1;if(window.HandoffAppearAnimations){const T=mi(t);if(T){const g=window.HandoffAppearAnimations(T,f,d,A);g!==null&&(m.elapsed=g,y=!0)}}d.start(Xe(f,d,p,t.shouldReduceMotion&&ot.has(f)?{type:!1}:m,t,y));const v=d.animation;v&&(Kt(c)&&(c.add(f),v.then(()=>c.remove(f))),u.push(v))}return a&&Promise.all(u).then(()=>{A.update(()=>{a&&xa(t,a)})}),u}function Te(t,e,n={}){var s;const i=Yt(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(gi(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:f}=o;return Pa(t,e,u+c,h,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[r,a]:[a,r];return c().then(()=>u())}else return Promise.all([r(),a(n.delay)])}function Pa(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort(ba).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(Te(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function ba(t,e){return t.sortNodePosition(e)}function Sa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Te(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Te(t,e,n);else{const i=typeof e=="function"?Yt(t,e,n.custom):e;s=Promise.all(gi(t,i,n))}return s.then(()=>{A.postRender(()=>{t.notify("AnimationComplete",e)})})}const Va=[...De].reverse(),Aa=De.length;function wa(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Sa(t,n,s)))}function Ca(t){let e=wa(t),n=Mn(),s=!0;const i=l=>(c,u)=>{var h;const f=Yt(t,u,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function o(l){e=l(t)}function r(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},h=[],f=new Set;let d={},p=1/0;for(let y=0;y<Aa;y++){const v=Va[y],T=n[v],g=c[v]!==void 0?c[v]:u[v],b=bt(g),V=v===l?T.isActive:null;V===!1&&(p=y);let R=g===u[v]&&g!==c[v]&&b;if(R&&s&&t.manuallyAnimateOnMount&&(R=!1),T.protectedKeys={...d},!T.isActive&&V===null||!g&&!T.prevProp||_t(g)||typeof g=="boolean")continue;let S=Da(T.prevProp,g)||v===l&&T.isActive&&!R&&b||y>p&&b,k=!1;const O=Array.isArray(g)?g:[g];let at=O.reduce(i(v),{});V===!1&&(at={});const{prevResolvedValues:Qe={}}=T,Bi={...Qe,...at},tn=F=>{S=!0,f.has(F)&&(k=!0,f.delete(F)),T.needsAnimating[F]=!0;const U=t.getValue(F);U&&(U.liveStyle=!1)};for(const F in Bi){const U=at[F],qt=Qe[F];if(d.hasOwnProperty(F))continue;let Zt=!1;fe(U)&&fe(qt)?Zt=!Is(U,qt):Zt=U!==qt,Zt?U!=null?tn(F):f.add(F):U!==void 0&&f.has(F)?tn(F):T.protectedKeys[F]=!0}T.prevProp=g,T.prevResolvedValues=at,T.isActive&&(d={...d,...at}),s&&t.blockInitialAnimation&&(S=!1),S&&(!R||k)&&h.push(...O.map(F=>({animation:F,options:{type:v}})))}if(f.size){const y={};f.forEach(v=>{const T=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),y[v]=T??null}),h.push({animation:y})}let m=!!h.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,c)}),n[l].isActive=c;const h=r(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Mn(),s=!0}}}function Da(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Is(e,t):!1}function et(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mn(){return{animate:et(!0),whileInView:et(),whileHover:et(),whileTap:et(),whileDrag:et(),whileFocus:et(),exit:et()}}class Ma extends tt{constructor(e){super(e),e.animationState||(e.animationState=Ca(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();_t(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let Ra=0;class Ea extends tt{constructor(){super(...arguments),this.id=Ra++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const La={animation:{Feature:Ma},exit:{Feature:Ea}},Rn=(t,e)=>Math.abs(t-e);function Fa(t,e){const n=Rn(t.x,e.x),s=Rn(t.y,e.y);return Math.sqrt(n**2+s**2)}class yi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=oe(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Fa(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:p}=h,{timestamp:m}=D;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=re(f,this.transformPagePoint),A.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=oe(h.type==="pointercancel"?this.lastMoveEventInfo:re(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),p&&p(h,y)},!Fs(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=zt(e),a=re(r,this.transformPagePoint),{point:l}=a,{timestamp:c}=D;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,oe(a,this.history)),this.removeListeners=W($(this.contextWindow,"pointermove",this.handlePointerMove),$(this.contextWindow,"pointerup",this.handlePointerUp),$(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),H(this.updatePoint)}}function re(t,e){return e?{point:e(t.point)}:t}function En(t,e){return{x:t.x-e.x,y:t.y-e.y}}function oe({point:t},e){return{point:t,delta:En(t,vi(e)),offset:En(t,Ba(e)),velocity:ka(e,.1)}}function Ba(t){return t[0]}function vi(t){return t[t.length-1]}function ka(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=vi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>G(e)));)n--;if(!s)return{x:0,y:0};const o=_(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function B(t){return t.max-t.min}function Pe(t,e=0,n=.01){return Math.abs(t-e)<=n}function Ln(t,e,n,s=.5){t.origin=s,t.originPoint=w(e.min,e.max,t.origin),t.scale=B(n)/B(e),(Pe(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=w(n.min,n.max,t.origin)-t.originPoint,(Pe(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Tt(t,e,n,s){Ln(t.x,e.x,n.x,s?s.originX:void 0),Ln(t.y,e.y,n.y,s?s.originY:void 0)}function Fn(t,e,n){t.min=n.min+e.min,t.max=t.min+B(e)}function Oa(t,e,n){Fn(t.x,e.x,n.x),Fn(t.y,e.y,n.y)}function Bn(t,e,n){t.min=e.min-n.min,t.max=t.min+B(e)}function Pt(t,e,n){Bn(t.x,e.x,n.x),Bn(t.y,e.y,n.y)}function ja(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?w(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?w(n,t,s.max):Math.min(t,n)),t}function kn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Ia(t,{top:e,left:n,bottom:s,right:i}){return{x:kn(t.x,n,i),y:kn(t.y,e,s)}}function On(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Na(t,e){return{x:On(t.x,e.x),y:On(t.y,e.y)}}function Ua(t,e){let n=.5;const s=B(t),i=B(e);return i>s?n=Vt(e.min,e.max-s,t.min):s>i&&(n=Vt(t.min,t.max-i,e.min)),J(0,1,n)}function Ka(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const be=.35;function $a(t=be){return t===!1?t=0:t===!0&&(t=be),{x:jn(t,"left","right"),y:jn(t,"top","bottom")}}function jn(t,e,n){return{min:In(t,e),max:In(t,n)}}function In(t,e){return typeof t=="number"?t:t[e]||0}const Nn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ct=()=>({x:Nn(),y:Nn()}),Un=()=>({min:0,max:0}),C=()=>({x:Un(),y:Un()});function I(t){return[t("x"),t("y")]}function xi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Wa({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ga(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ae(t){return t===void 0||t===1}function Se({scale:t,scaleX:e,scaleY:n}){return!ae(t)||!ae(e)||!ae(n)}function nt(t){return Se(t)||Ti(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ti(t){return Kn(t.x)||Kn(t.y)}function Kn(t){return t&&t!=="0%"}function $t(t,e,n){const s=t-n,i=e*s;return n+i}function $n(t,e,n,s,i){return i!==void 0&&(t=$t(t,i,s)),$t(t,n,s)+e}function Ve(t,e=0,n=1,s,i){t.min=$n(t.min,e,n,s,i),t.max=$n(t.max,e,n,s,i)}function Pi(t,{x:e,y:n}){Ve(t.x,e.translate,e.scale,e.originPoint),Ve(t.y,n.translate,n.scale,n.originPoint)}function _a(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ht(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Pi(t,r)),s&&nt(o.latestValues)&&ht(t,o.latestValues))}e.x=Wn(e.x),e.y=Wn(e.y)}function Wn(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function X(t,e){t.min=t.min+e,t.max=t.max+e}function Gn(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=w(t.min,t.max,o);Ve(t,e[n],e[s],r,e.scale)}const Ha=["x","scaleX","originX"],za=["y","scaleY","originY"];function ht(t,e){Gn(t.x,e,Ha),Gn(t.y,e,za)}function bi(t,e){return xi(Ga(t.getBoundingClientRect(),e))}function Ya(t,e,n){const s=bi(t,n),{scroll:i}=e;return i&&(X(s.x,i.offset.x),X(s.y,i.offset.y)),s}const Si=({current:t})=>t?t.ownerDocument.defaultView:null,Xa=new WeakMap;class qa{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=C(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zt(u,"page").point)},o=(u,h)=>{const{drag:f,dragPropagation:d,onDragStart:p}=this.getProps();if(f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ks(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),I(y=>{let v=this.getAxisMotionValue(y).get()||0;if(N.test(v)){const{projection:T}=this.visualElement;if(T&&T.layout){const g=T.layout.layoutBox[y];g&&(v=B(g)*(parseFloat(v)/100))}}this.originPoint[y]=v}),p&&A.postRender(()=>p(u,h));const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},r=(u,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=Za(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),m&&m(u,h)},a=(u,h)=>this.stop(u,h),l=()=>I(u=>{var h;return this.getAnimationState(u)==="paused"&&((h=this.getAxisMotionValue(u).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new yi(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Si(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&A.postRender(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Lt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=ja(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&lt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Ia(i.layoutBox,n):this.constraints=!1,this.elastic=$a(s),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&I(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Ka(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!lt(e))return!1;const s=e.current;exports.invariant(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Ya(s,i.root,this.visualElement.getTransformPagePoint());let r=Na(i.layout.layoutBox,o);if(n){const a=n(Wa(r));this.hasMutatedConstraints=!!a,a&&(r=xi(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=I(u=>{if(!Lt(u,n,this.currentDirection))return;let h=l&&l[u]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(Xe(e,s,0,n,this.visualElement))}stopAnimation(){I(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){I(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){I(n=>{const{drag:s}=this.getProps();if(!Lt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-w(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!lt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};I(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Ua({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),I(r=>{if(!Lt(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(w(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;Xa.set(this.visualElement,this);const e=this.visualElement.current,n=$(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();lt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),A.read(s);const r=K(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(I(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=be,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Lt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Za(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ja extends tt{constructor(e){super(e),this.removeGroupControls=M,this.removeListeners=M,this.controls=new qa(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||M}unmount(){this.removeGroupControls(),this.removeListeners()}}const _n=t=>(e,n)=>{t&&A.postRender(()=>t(e,n))};class Qa extends tt{constructor(){super(...arguments),this.removePointerDownListener=M}onPointerDown(e){this.session=new yi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Si(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:_n(e),onStart:_n(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&A.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=$(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function tl(){const t=P.useContext(Gt);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=P.useId();return P.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const kt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Hn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const gt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=Hn(t,e.target.x),s=Hn(t,e.target.y);return`${n}% ${s}%`}},el={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Q.parse(t);if(i.length>5)return s;const o=Q.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=w(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}};class nl extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Qi(sl),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),kt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||A.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Ce.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Vi(t){const[e,n]=tl(),s=P.useContext(Re);return he.jsxRuntimeExports.jsx(nl,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(ys),isPresent:e,safeToRemove:n})}const sl={borderRadius:{...gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomLeftRadius:gt,borderBottomRightRadius:gt,boxShadow:el},Ai=["TopLeft","TopRight","BottomLeft","BottomRight"],il=Ai.length,zn=t=>typeof t=="string"?parseFloat(t):t,Yn=t=>typeof t=="number"||x.test(t);function rl(t,e,n,s,i,o){i?(t.opacity=w(0,n.opacity!==void 0?n.opacity:1,ol(s)),t.opacityExit=w(e.opacity!==void 0?e.opacity:1,0,al(s))):o&&(t.opacity=w(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<il;r++){const a=`border${Ai[r]}Radius`;let l=Xn(e,a),c=Xn(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Yn(l)===Yn(c)?(t[a]=Math.max(w(zn(l),zn(c),s),0),(N.test(c)||N.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=w(e.rotate||0,n.rotate||0,s))}function Xn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const ol=wi(0,.5,li),al=wi(.5,.95,M);function wi(t,e,n){return s=>s<t?0:s>e?1:n(Vt(t,e,s))}function qn(t,e){t.min=e.min,t.max=e.max}function j(t,e){qn(t.x,e.x),qn(t.y,e.y)}function Zn(t,e,n,s,i){return t-=e,t=$t(t,1/n,s),i!==void 0&&(t=$t(t,1/i,s)),t}function ll(t,e=0,n=1,s=.5,i,o=t,r=t){if(N.test(e)&&(e=parseFloat(e),e=w(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=w(o.min,o.max,s);t===o&&(a-=e),t.min=Zn(t.min,e,n,a,i),t.max=Zn(t.max,e,n,a,i)}function Jn(t,e,[n,s,i],o,r){ll(t,e[n],e[s],e[i],e.scale,o,r)}const ul=["x","scaleX","originX"],cl=["y","scaleY","originY"];function Qn(t,e,n,s){Jn(t.x,e,ul,n?n.x:void 0,s?s.x:void 0),Jn(t.y,e,cl,n?n.y:void 0,s?s.y:void 0)}function ts(t){return t.translate===0&&t.scale===1}function Ci(t){return ts(t.x)&&ts(t.y)}function hl(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Di(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function es(t){return B(t.x)/B(t.y)}class fl{constructor(){this.members=[]}add(e){qe(this.members,e),e.scheduleRender()}remove(e){if(Ze(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),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);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ns(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0:n.z)||0;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){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const dl=(t,e)=>t.depth-e.depth;class pl{constructor(){this.children=[],this.isDirty=!1}add(e){qe(this.children,e),this.isDirty=!0}remove(e){Ze(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(dl),this.isDirty=!1,this.children.forEach(e)}}function ml(t,e){const n=Z.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(H(s),t(o-e))};return A.read(s,!0),()=>H(s)}function gl(t){window.MotionDebug&&window.MotionDebug.record(t)}function yl(t){return t instanceof SVGElement&&t.tagName!=="svg"}function vl(t,e,n){const s=L(t)?t:At(t);return s.start(Xe("",s,e,n)),s.animation}const le=["","X","Y","Z"],xl={visibility:"hidden"},ss=1e3;let Tl=0;const st={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ue(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Mi(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return!1;const{visualElement:e}=t.options;return e?mi(e)?!0:t.parent&&!t.parent.hasCheckedOptimisedAppear?Mi(t.parent):!1:!1}function Ri({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Tl++,this.animationId=0,this.children=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=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,st.totalNodes=st.resolvedTargetDeltas=st.recalculatedProjection=0,this.nodes.forEach(Sl),this.nodes.forEach(Dl),this.nodes.forEach(Ml),this.nodes.forEach(Vl),gl(st)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=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;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new pl)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Je),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=yl(r),this.instance=r;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=ml(f,250),kt.hasAnimatedSinceResize&&(kt.hasAnimatedSinceResize=!1,this.nodes.forEach(rs))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Bl,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),T=!this.targetLayout||!Di(this.targetLayout,p)||d,g=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,g);const b={...Ue(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||rs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,H(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Rl),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Mi(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(is);return}this.isUpdating||this.nodes.forEach(wl),this.isUpdating=!1,this.nodes.forEach(Cl),this.nodes.forEach(Pl),this.nodes.forEach(bl),this.clearAllSnapshots();const a=Z.now();D.delta=J(0,1e3/60,a-D.timestamp),D.timestamp=a,D.isProcessing=!0,Jt.update.process(D),Jt.preRender.process(D),Jt.render.process(D),D.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ce.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Al),this.sharedNodes.forEach(El)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,A.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){A.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=C(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:r,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ci(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&(a||nt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),kl(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return C();const a=r.measureViewportBox(),{scroll:l}=this.root;return l&&(X(a.x,l.offset.x),X(a.y,l.offset.y)),a}removeElementScroll(r){const a=C();j(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;if(c!==this.root&&u&&h.layoutScroll){if(u.isRoot){j(a,r);const{scroll:f}=this.root;f&&(X(a.x,-f.offset.x),X(a.y,-f.offset.y))}X(a.x,u.offset.x),X(a.y,u.offset.y)}}return a}applyTransform(r,a=!1){const l=C();j(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ht(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nt(u.latestValues)&&ht(l,u.latestValues)}return nt(this.latestValues)&&ht(l,this.latestValues),l}removeTransform(r){const a=C();j(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!nt(c.latestValues))continue;Se(c.latestValues)&&c.updateSnapshot();const u=C(),h=c.measurePageBox();j(u,h),Qn(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return nt(this.latestValues)&&Qn(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){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}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==D.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=D.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),Pt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),j(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=C(),this.targetWithTransforms=C()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Oa(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):j(this.target,this.layout.layoutBox),Pi(this.target,this.targetDelta)):j(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),Pt(this.relativeTargetOrigin,this.target,d.target),j(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}st.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Se(this.parent.latestValues)||Ti(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var r;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===D.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;j(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;_a(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=C());const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=ct(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=ct(),this.projectionDeltaWithTransform=ct());const m=this.projectionTransform;Tt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=ns(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==f||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),st.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ct();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=C(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,y=this.getStack(),v=!y||y.members.length<=1,T=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(Fl));this.animationProgress=0;let g;this.mixTargetDelta=b=>{const V=b/1e3;os(h.x,r.x,V),os(h.y,r.y,V),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ll(this.relativeTarget,this.relativeTargetOrigin,f,V),g&&hl(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=C()),j(g,this.relativeTarget)),m&&(this.animationValues=u,rl(u,c,this.latestValues,V,T,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(H(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=A.update(()=>{kt.hasAnimatedSinceResize=!0,this.currentAnimation=vl(0,ss,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ss),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&Ei(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||C();const h=B(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=B(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}j(a,l),ht(a,u),Tt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new fl),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ue("z",r,c,this.animationValues);for(let u=0;u<le.length;u++)ue(`rotate${le[u]}`,r,c,this.animationValues),ue(`skew${le[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}getProjectionStyles(r){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return xl;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ft(r==null?void 0:r.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Ft(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),c.transform=ns(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:d,y:p}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,h.animationValues?c.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Ot){if(f[m]===void 0)continue;const{correct:y,applyTo:v}=Ot[m],T=c.transform==="none"?f[m]:y(f[m],h);if(v){const g=v.length;for(let b=0;b<g;b++)c[v[b]]=T}else c[m]=T}return this.options.layoutId&&(c.pointerEvents=h===this?Ft(r==null?void 0:r.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(is),this.root.sharedNodes.clear()}}}function Pl(t){t.updateLayout()}function bl(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?I(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=B(f);f.min=s[h].min,f.max=f.min+d}):Ei(o,n.layoutBox,s)&&I(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=B(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=ct();Tt(a,s,n.layoutBox);const l=ct();r?Tt(l,t.applyTransform(i,!0),n.measuredBox):Tt(l,s,n.layoutBox);const c=!Ci(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=C();Pt(p,n.layoutBox,f.layoutBox);const m=C();Pt(m,s,d.layoutBox),Di(p,m)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Sl(t){st.totalNodes++,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))}function Vl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Al(t){t.clearSnapshot()}function is(t){t.clearMeasurements()}function wl(t){t.isLayoutDirty=!1}function Cl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Dl(t){t.resolveTargetDelta()}function Ml(t){t.calcProjection()}function Rl(t){t.resetSkewAndRotation()}function El(t){t.removeLeadSnapshot()}function os(t,e,n){t.translate=w(e.translate,0,n),t.scale=w(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function as(t,e,n,s){t.min=w(e.min,n.min,s),t.max=w(e.max,n.max,s)}function Ll(t,e,n,s){as(t.x,e.x,n.x,s),as(t.y,e.y,n.y,s)}function Fl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Bl={duration:.45,ease:[.4,0,.1,1]},ls=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),us=ls("applewebkit/")&&!ls("chrome/")?Math.round:M;function cs(t){t.min=us(t.min),t.max=us(t.max)}function kl(t){cs(t.x),cs(t.y)}function Ei(t,e,n){return t==="position"||t==="preserve-aspect"&&!Pe(es(e),es(n),.2)}const Ol=Ri({attachResizeListener:(t,e)=>K(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ce={current:void 0},Li=Ri({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ce.current){const t=new Ol({});t.mount(window),t.setOptions({layoutScroll:!0}),ce.current=t}return ce.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),jl={pan:{Feature:Qa},drag:{Feature:Ja,ProjectionNode:Li,MeasureLayout:Vi}};function Il(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(L(o))t.addValue(i,o),Kt(s)&&s.add(i),process.env.NODE_ENV==="development"&&q.warnOnce(o.version==="11.2.12",`Attempting to mix Framer Motion versions ${o.version} with 11.2.12 may not work as expected.`);else if(L(r))t.addValue(i,At(o,{owner:t})),Kt(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,At(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const hs=new WeakMap,Nl=[...Ws,E,Q],Ul=t=>Nl.find($s(t)),fs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Kl=Me.length;class $l{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.resolveKeyframes=(f,d,p,m)=>new this.KeyframeResolver(f,d,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ke,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>A.render(this.render,!1,!0);const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,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=Ht(n),this.isVariantNode=xs(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&L(d)&&(d.set(l[f],!1),Kt(u)&&u.add(f))}}mount(e){this.current=e,hs.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)),q.hasReducedMotionListener.current||q.initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:q.prefersReducedMotion.current,process.env.NODE_ENV!=="production"&&q.warnOnce(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){hs.delete(this.current),this.projection&&this.projection.unmount(),H(this.notifyUpdate),H(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){const s=ot.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&A.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ft){const n=ft[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):C()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<fs.length;s++){const i=fs[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Il(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<Kl;s++){const i=Me[s],o=this.props[i];(bt(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=At(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Us(i)||Ns(i))?i=parseFloat(i):!Ul(i)&&Q.test(n)&&(i=Zs(e,n)),this.setBaseTarget(e,L(i)?i.get():i)),L(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const r=Ne(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);r&&(i=r[e])}if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!L(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Je),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Fi extends $l{constructor(){super(...arguments),this.KeyframeResolver=Js}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}}function Wl(t){return window.getComputedStyle(t)}class Gl extends Fi{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(ot.has(n)){const s=We(n);return s&&s.default||0}else{const s=Wl(e),i=(bs(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return bi(e,n)}build(e,n,s,i){Be(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ie(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){Cs(e,n,s,i)}}class _l extends Fi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ot.has(n)){const s=We(n);return s&&s.default||0}return n=Ds.has(n)?n:we(n),e.getAttribute(n)}measureInstanceViewportBox(){return C()}scrapeMotionValuesFromProps(e,n,s){return Rs(e,n,s)}build(e,n,s,i){Oe(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Ms(e,n,s,i)}mount(e){this.isSVGTag=je(e.tagName),super.mount(e)}}const Hl=(t,e)=>Ee(t)?new _l(e,{enableHardwareAcceleration:!1}):new Gl(e,{allowProjection:t!==P.Fragment,enableHardwareAcceleration:!0}),zl={layout:{ProjectionNode:Li,MeasureLayout:Vi}},Yl={...La,...Kr,...jl,...zl},Xl=Zi((t,e)=>Dr(t,e,Yl,Hl));exports.LayoutGroupContext=Re;exports.MotionConfigContext=Ae;exports.PresenceContext=Gt;exports.frame=A;exports.motion=Xl;exports.useConstant=Es;exports.useIsomorphicLayoutEffect=ds;
2
- //# sourceMappingURL=motion-ee26ec15.cjs.map