motionary 0.0.0-stage → 6.2.0

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 (374) hide show
  1. package/CHANGELOG.md +803 -0
  2. package/LICENSE +21 -0
  3. package/README.md +218 -2
  4. package/README_ja.md +219 -0
  5. package/README_zh.md +219 -0
  6. package/bin/usa-codemod-5.mjs +79 -0
  7. package/bin/usa-codemod-6.mjs +146 -0
  8. package/dist/chunks/base-BaQV-2ha.cjs +436 -0
  9. package/dist/chunks/base-BaQV-2ha.cjs.map +1 -0
  10. package/dist/chunks/base-C_3cAoRz.js +404 -0
  11. package/dist/chunks/base-C_3cAoRz.js.map +1 -0
  12. package/dist/chunks/bind-B_CTL6Qn.js +22 -0
  13. package/dist/chunks/bind-B_CTL6Qn.js.map +1 -0
  14. package/dist/chunks/bind-Ui43-n2d.cjs +25 -0
  15. package/dist/chunks/bind-Ui43-n2d.cjs.map +1 -0
  16. package/dist/chunks/core-B5T0dhFH.cjs +920 -0
  17. package/dist/chunks/core-B5T0dhFH.cjs.map +1 -0
  18. package/dist/chunks/core-BGAyaY6L.cjs +265 -0
  19. package/dist/chunks/core-BGAyaY6L.cjs.map +1 -0
  20. package/dist/chunks/core-D7cVumUu.js +909 -0
  21. package/dist/chunks/core-D7cVumUu.js.map +1 -0
  22. package/dist/chunks/core-VEBw36QK.js +260 -0
  23. package/dist/chunks/core-VEBw36QK.js.map +1 -0
  24. package/dist/chunks/core-ps8uvYuN.js +181 -0
  25. package/dist/chunks/core-ps8uvYuN.js.map +1 -0
  26. package/dist/chunks/core-zq17EeCI.cjs +185 -0
  27. package/dist/chunks/core-zq17EeCI.cjs.map +1 -0
  28. package/dist/chunks/fx-Bs6IrV4Q.js +109 -0
  29. package/dist/chunks/fx-Bs6IrV4Q.js.map +1 -0
  30. package/dist/chunks/fx-lBGVtQO1.cjs +114 -0
  31. package/dist/chunks/fx-lBGVtQO1.cjs.map +1 -0
  32. package/dist/chunks/generative-D2YyhaeO.js +336 -0
  33. package/dist/chunks/generative-D2YyhaeO.js.map +1 -0
  34. package/dist/chunks/generative-DzIZq-_g.cjs +348 -0
  35. package/dist/chunks/generative-DzIZq-_g.cjs.map +1 -0
  36. package/dist/chunks/gpu-Bu7qwugO.js +380 -0
  37. package/dist/chunks/gpu-Bu7qwugO.js.map +1 -0
  38. package/dist/chunks/gpu-CenK2l6b.cjs +387 -0
  39. package/dist/chunks/gpu-CenK2l6b.cjs.map +1 -0
  40. package/dist/chunks/index-tags-DucKMQr_.js +26 -0
  41. package/dist/chunks/index-tags-DucKMQr_.js.map +1 -0
  42. package/dist/chunks/index-tags-wv0R_vkO.cjs +28 -0
  43. package/dist/chunks/index-tags-wv0R_vkO.cjs.map +1 -0
  44. package/dist/chunks/presets-BYBVJVeP.js +226 -0
  45. package/dist/chunks/presets-BYBVJVeP.js.map +1 -0
  46. package/dist/chunks/presets-CUHys3sK.cjs +233 -0
  47. package/dist/chunks/presets-CUHys3sK.cjs.map +1 -0
  48. package/dist/chunks/registry-CKNLQpwd.js +121 -0
  49. package/dist/chunks/registry-CKNLQpwd.js.map +1 -0
  50. package/dist/chunks/registry-DehBVRDV.cjs +131 -0
  51. package/dist/chunks/registry-DehBVRDV.cjs.map +1 -0
  52. package/dist/chunks/spring-CbvHfVtP.js +219 -0
  53. package/dist/chunks/spring-CbvHfVtP.js.map +1 -0
  54. package/dist/chunks/spring-Dgx187Vh.cjs +232 -0
  55. package/dist/chunks/spring-Dgx187Vh.cjs.map +1 -0
  56. package/dist/chunks/stagger-CCFyhzSw.cjs +86 -0
  57. package/dist/chunks/stagger-CCFyhzSw.cjs.map +1 -0
  58. package/dist/chunks/stagger-DtMKo2SK.js +84 -0
  59. package/dist/chunks/stagger-DtMKo2SK.js.map +1 -0
  60. package/dist/chunks/variants-BhjyddG8.cjs +39 -0
  61. package/dist/chunks/variants-BhjyddG8.cjs.map +1 -0
  62. package/dist/chunks/variants-DRlKVHvu.js +35 -0
  63. package/dist/chunks/variants-DRlKVHvu.js.map +1 -0
  64. package/dist/components/a11y.cjs +276 -0
  65. package/dist/components/a11y.cjs.map +1 -0
  66. package/dist/components/a11y.d.cts +131 -0
  67. package/dist/components/a11y.d.ts +131 -0
  68. package/dist/components/a11y.js +259 -0
  69. package/dist/components/a11y.js.map +1 -0
  70. package/dist/components/angular.cjs +76 -0
  71. package/dist/components/angular.cjs.map +1 -0
  72. package/dist/components/angular.d.cts +1734 -0
  73. package/dist/components/angular.d.ts +1734 -0
  74. package/dist/components/angular.js +70 -0
  75. package/dist/components/angular.js.map +1 -0
  76. package/dist/components/background.cjs +659 -0
  77. package/dist/components/background.cjs.map +1 -0
  78. package/dist/components/background.css +9 -0
  79. package/dist/components/background.d.cts +166 -0
  80. package/dist/components/background.d.ts +166 -0
  81. package/dist/components/background.js +647 -0
  82. package/dist/components/background.js.map +1 -0
  83. package/dist/components/bridge.cjs +154 -0
  84. package/dist/components/bridge.cjs.map +1 -0
  85. package/dist/components/bridge.d.cts +63 -0
  86. package/dist/components/bridge.d.ts +63 -0
  87. package/dist/components/bridge.js +147 -0
  88. package/dist/components/bridge.js.map +1 -0
  89. package/dist/components/cards.cjs +561 -0
  90. package/dist/components/cards.cjs.map +1 -0
  91. package/dist/components/cards.css +6 -0
  92. package/dist/components/cards.d.cts +115 -0
  93. package/dist/components/cards.d.ts +115 -0
  94. package/dist/components/cards.js +554 -0
  95. package/dist/components/cards.js.map +1 -0
  96. package/dist/components/click.cjs +877 -0
  97. package/dist/components/click.cjs.map +1 -0
  98. package/dist/components/click.css +9 -0
  99. package/dist/components/click.d.cts +218 -0
  100. package/dist/components/click.d.ts +218 -0
  101. package/dist/components/click.js +863 -0
  102. package/dist/components/click.js.map +1 -0
  103. package/dist/components/depth.cjs +250 -0
  104. package/dist/components/depth.cjs.map +1 -0
  105. package/dist/components/depth.css +3 -0
  106. package/dist/components/depth.d.cts +86 -0
  107. package/dist/components/depth.d.ts +86 -0
  108. package/dist/components/depth.js +242 -0
  109. package/dist/components/depth.js.map +1 -0
  110. package/dist/components/effects.cjs +2258 -0
  111. package/dist/components/effects.cjs.map +1 -0
  112. package/dist/components/effects.d.cts +545 -0
  113. package/dist/components/effects.d.ts +545 -0
  114. package/dist/components/effects.js +2200 -0
  115. package/dist/components/effects.js.map +1 -0
  116. package/dist/components/feedback.cjs +442 -0
  117. package/dist/components/feedback.cjs.map +1 -0
  118. package/dist/components/feedback.css +7 -0
  119. package/dist/components/feedback.d.cts +144 -0
  120. package/dist/components/feedback.d.ts +144 -0
  121. package/dist/components/feedback.js +433 -0
  122. package/dist/components/feedback.js.map +1 -0
  123. package/dist/components/fx-gpu.cjs +12 -0
  124. package/dist/components/fx-gpu.cjs.map +1 -0
  125. package/dist/components/fx-gpu.d.cts +63 -0
  126. package/dist/components/fx-gpu.d.ts +63 -0
  127. package/dist/components/fx-gpu.js +5 -0
  128. package/dist/components/fx-gpu.js.map +1 -0
  129. package/dist/components/fx.cjs +169 -0
  130. package/dist/components/fx.cjs.map +1 -0
  131. package/dist/components/fx.css +3 -0
  132. package/dist/components/fx.d.cts +114 -0
  133. package/dist/components/fx.d.ts +114 -0
  134. package/dist/components/fx.js +156 -0
  135. package/dist/components/fx.js.map +1 -0
  136. package/dist/components/fx2.cjs +25 -0
  137. package/dist/components/fx2.cjs.map +1 -0
  138. package/dist/components/fx2.d.cts +136 -0
  139. package/dist/components/fx2.d.ts +136 -0
  140. package/dist/components/fx2.js +17 -0
  141. package/dist/components/fx2.js.map +1 -0
  142. package/dist/components/gesture.cjs +209 -0
  143. package/dist/components/gesture.cjs.map +1 -0
  144. package/dist/components/gesture.css +3 -0
  145. package/dist/components/gesture.d.cts +134 -0
  146. package/dist/components/gesture.d.ts +134 -0
  147. package/dist/components/gesture.js +203 -0
  148. package/dist/components/gesture.js.map +1 -0
  149. package/dist/components/interaction.cjs +424 -0
  150. package/dist/components/interaction.cjs.map +1 -0
  151. package/dist/components/interaction.css +8 -0
  152. package/dist/components/interaction.d.cts +115 -0
  153. package/dist/components/interaction.d.ts +115 -0
  154. package/dist/components/interaction.js +416 -0
  155. package/dist/components/interaction.js.map +1 -0
  156. package/dist/components/jsx.cjs +3 -0
  157. package/dist/components/jsx.cjs.map +1 -0
  158. package/dist/components/jsx.d.cts +53 -0
  159. package/dist/components/jsx.d.ts +53 -0
  160. package/dist/components/jsx.js +2 -0
  161. package/dist/components/jsx.js.map +1 -0
  162. package/dist/components/layout.cjs +257 -0
  163. package/dist/components/layout.cjs.map +1 -0
  164. package/dist/components/layout.css +3 -0
  165. package/dist/components/layout.d.cts +99 -0
  166. package/dist/components/layout.d.ts +99 -0
  167. package/dist/components/layout.js +249 -0
  168. package/dist/components/layout.js.map +1 -0
  169. package/dist/components/lazy.cjs +92 -0
  170. package/dist/components/lazy.cjs.map +1 -0
  171. package/dist/components/lazy.d.cts +48 -0
  172. package/dist/components/lazy.d.ts +48 -0
  173. package/dist/components/lazy.js +87 -0
  174. package/dist/components/lazy.js.map +1 -0
  175. package/dist/components/lite.cjs +11095 -0
  176. package/dist/components/lite.cjs.map +1 -0
  177. package/dist/components/lite.d.cts +4 -0
  178. package/dist/components/lite.d.ts +4 -0
  179. package/dist/components/lite.js +10827 -0
  180. package/dist/components/lite.js.map +1 -0
  181. package/dist/components/packs.cjs +192 -0
  182. package/dist/components/packs.cjs.map +1 -0
  183. package/dist/components/packs.css +3 -0
  184. package/dist/components/packs.d.cts +72 -0
  185. package/dist/components/packs.d.ts +72 -0
  186. package/dist/components/packs.js +184 -0
  187. package/dist/components/packs.js.map +1 -0
  188. package/dist/components/page.cjs +824 -0
  189. package/dist/components/page.cjs.map +1 -0
  190. package/dist/components/page.css +11 -0
  191. package/dist/components/page.d.cts +249 -0
  192. package/dist/components/page.d.ts +249 -0
  193. package/dist/components/page.js +799 -0
  194. package/dist/components/page.js.map +1 -0
  195. package/dist/components/perf.cjs +120 -0
  196. package/dist/components/perf.cjs.map +1 -0
  197. package/dist/components/perf.d.cts +98 -0
  198. package/dist/components/perf.d.ts +98 -0
  199. package/dist/components/perf.js +110 -0
  200. package/dist/components/perf.js.map +1 -0
  201. package/dist/components/physics.cjs +448 -0
  202. package/dist/components/physics.cjs.map +1 -0
  203. package/dist/components/physics.css +5 -0
  204. package/dist/components/physics.d.cts +189 -0
  205. package/dist/components/physics.d.ts +189 -0
  206. package/dist/components/physics.js +430 -0
  207. package/dist/components/physics.js.map +1 -0
  208. package/dist/components/react.cjs +96 -0
  209. package/dist/components/react.cjs.map +1 -0
  210. package/dist/components/react.d.cts +18 -0
  211. package/dist/components/react.d.ts +18 -0
  212. package/dist/components/react.js +91 -0
  213. package/dist/components/react.js.map +1 -0
  214. package/dist/components/reveal.cjs +362 -0
  215. package/dist/components/reveal.cjs.map +1 -0
  216. package/dist/components/reveal.css +5 -0
  217. package/dist/components/reveal.d.cts +105 -0
  218. package/dist/components/reveal.d.ts +105 -0
  219. package/dist/components/reveal.js +353 -0
  220. package/dist/components/reveal.js.map +1 -0
  221. package/dist/components/solid.cjs +86 -0
  222. package/dist/components/solid.cjs.map +1 -0
  223. package/dist/components/solid.d.cts +1751 -0
  224. package/dist/components/solid.d.ts +1751 -0
  225. package/dist/components/solid.js +82 -0
  226. package/dist/components/solid.js.map +1 -0
  227. package/dist/components/svelte.cjs +68 -0
  228. package/dist/components/svelte.cjs.map +1 -0
  229. package/dist/components/svelte.d.cts +1733 -0
  230. package/dist/components/svelte.d.ts +1733 -0
  231. package/dist/components/svelte.js +64 -0
  232. package/dist/components/svelte.js.map +1 -0
  233. package/dist/components/svg.cjs +359 -0
  234. package/dist/components/svg.cjs.map +1 -0
  235. package/dist/components/svg.css +3 -0
  236. package/dist/components/svg.d.cts +113 -0
  237. package/dist/components/svg.d.ts +113 -0
  238. package/dist/components/svg.js +347 -0
  239. package/dist/components/svg.js.map +1 -0
  240. package/dist/components/text.cjs +968 -0
  241. package/dist/components/text.cjs.map +1 -0
  242. package/dist/components/text.css +8 -0
  243. package/dist/components/text.d.cts +342 -0
  244. package/dist/components/text.d.ts +342 -0
  245. package/dist/components/text.js +947 -0
  246. package/dist/components/text.js.map +1 -0
  247. package/dist/components/timeline.cjs +109 -0
  248. package/dist/components/timeline.cjs.map +1 -0
  249. package/dist/components/timeline.css +3 -0
  250. package/dist/components/timeline.d.cts +155 -0
  251. package/dist/components/timeline.d.ts +155 -0
  252. package/dist/components/timeline.js +103 -0
  253. package/dist/components/timeline.js.map +1 -0
  254. package/dist/components/tokens.cjs +226 -0
  255. package/dist/components/tokens.cjs.map +1 -0
  256. package/dist/components/tokens.d.cts +74 -0
  257. package/dist/components/tokens.d.ts +74 -0
  258. package/dist/components/tokens.js +211 -0
  259. package/dist/components/tokens.js.map +1 -0
  260. package/dist/components/transitions.cjs +430 -0
  261. package/dist/components/transitions.cjs.map +1 -0
  262. package/dist/components/transitions.css +5 -0
  263. package/dist/components/transitions.d.cts +126 -0
  264. package/dist/components/transitions.d.ts +126 -0
  265. package/dist/components/transitions.js +423 -0
  266. package/dist/components/transitions.js.map +1 -0
  267. package/dist/components/ui.cjs +1050 -0
  268. package/dist/components/ui.cjs.map +1 -0
  269. package/dist/components/ui.css +14 -0
  270. package/dist/components/ui.d.cts +224 -0
  271. package/dist/components/ui.d.ts +224 -0
  272. package/dist/components/ui.js +1034 -0
  273. package/dist/components/ui.js.map +1 -0
  274. package/dist/components/vue.cjs +67 -0
  275. package/dist/components/vue.cjs.map +1 -0
  276. package/dist/components/vue.d.cts +1722 -0
  277. package/dist/components/vue.d.ts +1722 -0
  278. package/dist/components/vue.js +64 -0
  279. package/dist/components/vue.js.map +1 -0
  280. package/dist/components/webgl.cjs +459 -0
  281. package/dist/components/webgl.cjs.map +1 -0
  282. package/dist/components/webgl.css +3 -0
  283. package/dist/components/webgl.d.cts +133 -0
  284. package/dist/components/webgl.d.ts +133 -0
  285. package/dist/components/webgl.js +442 -0
  286. package/dist/components/webgl.js.map +1 -0
  287. package/dist/components/widgets.cjs +591 -0
  288. package/dist/components/widgets.cjs.map +1 -0
  289. package/dist/components/widgets.d.cts +110 -0
  290. package/dist/components/widgets.d.ts +110 -0
  291. package/dist/components/widgets.js +581 -0
  292. package/dist/components/widgets.js.map +1 -0
  293. package/dist/components.cjs +351 -0
  294. package/dist/components.cjs.map +1 -0
  295. package/dist/components.css +75 -0
  296. package/dist/components.d.cts +2997 -0
  297. package/dist/components.d.ts +2997 -0
  298. package/dist/components.js +106 -0
  299. package/dist/components.js.map +1 -0
  300. package/dist/components.umd.js +23 -0
  301. package/dist/components.umd.js.map +1 -0
  302. package/dist/element.cjs +97 -0
  303. package/dist/element.cjs.map +1 -0
  304. package/dist/element.d.cts +215 -0
  305. package/dist/element.d.ts +215 -0
  306. package/dist/element.js +95 -0
  307. package/dist/element.js.map +1 -0
  308. package/dist/element.umd.js +2 -0
  309. package/dist/element.umd.js.map +1 -0
  310. package/dist/index.cjs +149 -0
  311. package/dist/index.cjs.map +1 -0
  312. package/dist/index.d.cts +425 -0
  313. package/dist/index.d.ts +425 -0
  314. package/dist/index.js +131 -0
  315. package/dist/index.js.map +1 -0
  316. package/dist/index.umd.js +15 -0
  317. package/dist/index.umd.js.map +1 -0
  318. package/dist/presets/extended.cjs +243 -0
  319. package/dist/presets/extended.cjs.map +1 -0
  320. package/dist/presets/extended.d.cts +37 -0
  321. package/dist/presets/extended.d.ts +37 -0
  322. package/dist/presets/extended.js +239 -0
  323. package/dist/presets/extended.js.map +1 -0
  324. package/dist/presets-extended.umd.js +2 -0
  325. package/dist/presets-extended.umd.js.map +1 -0
  326. package/dist/react.cjs +68 -0
  327. package/dist/react.cjs.map +1 -0
  328. package/dist/react.d.cts +158 -0
  329. package/dist/react.d.ts +158 -0
  330. package/dist/react.js +65 -0
  331. package/dist/react.js.map +1 -0
  332. package/dist/solid.cjs +93 -0
  333. package/dist/solid.cjs.map +1 -0
  334. package/dist/solid.d.cts +249 -0
  335. package/dist/solid.d.ts +249 -0
  336. package/dist/solid.js +89 -0
  337. package/dist/solid.js.map +1 -0
  338. package/dist/svelte.cjs +66 -0
  339. package/dist/svelte.cjs.map +1 -0
  340. package/dist/svelte.d.cts +243 -0
  341. package/dist/svelte.d.ts +243 -0
  342. package/dist/svelte.js +63 -0
  343. package/dist/svelte.js.map +1 -0
  344. package/dist/vue.cjs +62 -0
  345. package/dist/vue.cjs.map +1 -0
  346. package/dist/vue.d.cts +158 -0
  347. package/dist/vue.d.ts +158 -0
  348. package/dist/vue.js +60 -0
  349. package/dist/vue.js.map +1 -0
  350. package/dist/widgets.umd.js +2 -0
  351. package/dist/widgets.umd.js.map +1 -0
  352. package/docs/API.md +147 -0
  353. package/docs/ROADMAP.md +14 -0
  354. package/docs/accessibility.md +60 -0
  355. package/docs/components.md +564 -0
  356. package/docs/deprecations.md +30 -0
  357. package/docs/frameworks-ssr.md +100 -0
  358. package/docs/hybrid-apps.md +145 -0
  359. package/docs/images/showcase-detail.png +0 -0
  360. package/docs/images/showcase-grid.png +0 -0
  361. package/docs/images/showcase-mobile.png +0 -0
  362. package/docs/migration-from-aos.md +67 -0
  363. package/docs/migration-from-gsap-scrolltrigger.md +80 -0
  364. package/docs/motion-tokens.css +31 -0
  365. package/docs/motion-tokens.md +46 -0
  366. package/docs/motion.tokens.json +132 -0
  367. package/docs/performance.md +24 -0
  368. package/docs/presets.md +310 -0
  369. package/docs/upgrading-3.md +21 -0
  370. package/docs/upgrading-4.md +65 -0
  371. package/docs/upgrading-5.md +31 -0
  372. package/docs/upgrading-6.md +32 -0
  373. package/docs/windows-apps.md +119 -0
  374. package/package.json +562 -4
package/dist/vue.d.ts ADDED
@@ -0,0 +1,158 @@
1
+ /**
2
+ * motionary - Core Type Definitions
3
+ * A lightweight, high-performance scroll animation library
4
+ */
5
+ /** The 33 core presets (always available in `PRESETS`). */
6
+ type CorePreset = 'fade-in' | 'fade-in-up' | 'fade-in-down' | 'fade-in-left' | 'fade-in-right' | 'zoom-in' | 'zoom-out' | 'flip-x' | 'flip-y' | 'slide-up' | 'slide-down' | 'slide-left' | 'slide-right' | 'bounce' | 'rotate-in' | 'blur-in' | 'skew-in' | 'scale-x' | 'scale-y' | 'shimmer' | 'pulse' | 'swing' | 'scale-up' | 'blur-in-up' | 'flip-up' | 'flip-down' | 'rotate-left' | 'rotate-right' | 'clip-up' | 'clip-down' | 'clip-left' | 'clip-right' | 'clip-circle';
7
+ /**
8
+ * Every built-in preset name: the core set plus the 6.1 extended set, which is
9
+ * available once `motionary/presets/extended` is loaded (or after
10
+ * `registerPresets(EXTENDED_PRESETS)`).
11
+ */
12
+ type AnimationPreset = CorePreset | ExtendedPreset;
13
+ /**
14
+ * How `onProgress` / `progressVar` progress is measured.
15
+ * - `'ratio'` (default): the element's visible ratio (IntersectionObserver `intersectionRatio`).
16
+ * - `'scroll'`: true scroll progress, 0 when the element's top touches the bottom of the
17
+ * viewport and 1 when its bottom leaves the top. Works for elements taller than the screen.
18
+ */
19
+ type ProgressMode = 'ratio' | 'scroll';
20
+ /**
21
+ * Which engine runs the entrance animation.
22
+ * - `'js'`: IntersectionObserver triggers a time-based Web Animation.
23
+ * - `'css'`: the preset runs on the browser's native scroll-driven timeline
24
+ * (`animation-timeline: view()`), so its progress follows the scroll position
25
+ * off the main thread. Falls back to `'js'` where unsupported.
26
+ * - `'auto'` (default since 2.0): native when supported, JS otherwise — and JS
27
+ * whenever the element sets `duration`, `delay`, `offset` or `stagger` itself,
28
+ * since those only mean something for a time-based animation.
29
+ */
30
+ type ScrollEngine = 'auto' | 'js' | 'css';
31
+ /** The 6.1 extended presets (`motionary/presets/extended`). */
32
+ type ExtendedPreset = 'fade-in-up-sm' | 'fade-in-down-sm' | 'fade-in-left-sm' | 'fade-in-right-sm' | 'fade-in-up-lg' | 'fade-in-down-lg' | 'fade-in-left-lg' | 'fade-in-right-lg' | 'fade-in-up-left' | 'fade-in-up-right' | 'fade-in-down-left' | 'fade-in-down-right' | 'fade-in-scale' | 'fade-in-half' | 'zoom-in-up' | 'zoom-in-down' | 'zoom-in-left' | 'zoom-in-right' | 'zoom-out-up' | 'zoom-out-down' | 'zoom-out-left' | 'zoom-out-right' | 'zoom-in-big' | 'zoom-out-big' | 'zoom-bounce' | 'zoom-in-rotate' | 'scale-x-left' | 'scale-x-right' | 'scale-y-top' | 'scale-y-bottom' | 'stretch-x' | 'stretch-y' | 'flip-x-reverse' | 'flip-y-reverse' | 'flip-y-full' | 'flip-diagonal' | 'flip-diagonal-reverse' | 'flip-left' | 'flip-right' | 'unfold-down' | 'unfold-up' | 'door-open-left' | 'door-open-right' | 'fold-in' | 'flip-x-bounce' | 'flip-y-bounce' | 'swing-in-top' | 'swing-in-bottom' | 'swing-in-left' | 'swing-in-right' | 'slide-up-spring' | 'slide-down-spring' | 'slide-left-spring' | 'slide-right-spring' | 'slide-up-sm' | 'slide-down-sm' | 'back-in-up' | 'back-in-down' | 'back-in-left' | 'back-in-right' | 'light-speed-in-left' | 'light-speed-in-right' | 'rise-in' | 'sink-in' | 'float-in-up' | 'float-in-down' | 'roll-in-left' | 'roll-in-right' | 'spiral-in' | 'spiral-in-reverse' | 'spin-in' | 'rotate-in-up-left' | 'rotate-in-up-right' | 'rotate-in-down-left' | 'rotate-in-down-right' | 'skew-in-left' | 'skew-in-y' | 'shear-in' | 'shear-in-reverse' | 'twist-in' | 'tilt-in-left' | 'tilt-in-right' | 'blur-in-down' | 'blur-in-left' | 'blur-in-right' | 'blur-in-strong' | 'blur-in-zoom' | 'blur-in-scale' | 'blur-in-x' | 'mask-up' | 'mask-down' | 'mask-left' | 'mask-right' | 'blur-mask-up' | 'clip-circle-top' | 'clip-circle-bottom' | 'clip-circle-left' | 'clip-circle-right' | 'clip-circle-corner' | 'clip-ellipse' | 'clip-diamond' | 'clip-split-x' | 'clip-split-y' | 'clip-box' | 'clip-pill' | 'clip-blinds' | 'clip-blinds-x' | 'clip-diagonal' | 'clip-diagonal-reverse' | 'clip-slant-right' | 'clip-slant-left' | 'bounce-in' | 'bounce-in-up' | 'bounce-in-down' | 'bounce-in-left' | 'bounce-in-right' | 'elastic-in' | 'elastic-in-x' | 'rubber-in' | 'jello-in' | 'wobble-in' | 'tada-in' | 'heartbeat-in' | 'drop-in' | 'pop-in' | 'squash-in' | 'shake-in' | 'swing-in' | 'brightness-in' | 'darken-in' | 'color-in' | 'saturate-in' | 'hue-in' | 'sepia-in' | 'invert-in' | 'contrast-in' | 'exposure-in' | 'vintage-in' | 'blur-bright-in' | 'shadow-lift' | 'neon-glow-in' | 'glow-in' | 'perspective-in-up' | 'perspective-in-down' | 'perspective-in-left' | 'perspective-in-right' | 'depth-push' | 'depth-pull' | 'depth-in-up' | 'swoop-in-left' | 'swoop-in-right' | 'card-tilt-in' | 'glitch-in' | 'glitch-in-color' | 'typewriter' | 'typewriter-lines' | 'hinge-in' | 'flicker-in' | 'scan-in' | 'materialize' | 'teleport-in' | 'stagger-fade-up' | 'stagger-pop' | 'stagger-rise' | 'stagger-slide' | 'stagger-flip' | 'stagger-blur' | 'stagger-zoom' | 'stagger-drop' | 'scrub-parallax-up' | 'scrub-parallax-down' | 'scrub-rotate' | 'scrub-spin' | 'scrub-scale' | 'scrub-shrink' | 'scrub-pan-left' | 'scrub-pan-right' | 'scrub-tilt' | 'scrub-fade-through' | 'scrub-blur-through' | 'scrub-reveal-x';
33
+ /** Easing function types */
34
+ type EasingType = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'soft-spring' | 'heavy-bounce' | [number, number, number, number] | ((t: number) => number) | string;
35
+ /** Keyframe definition for custom animations */
36
+ interface AnimationKeyframe {
37
+ [property: string]: string | number;
38
+ }
39
+ /** One intermediate keyframe of a preset: `offset` is 0 < offset < 1. */
40
+ interface AnimationFrame extends AnimationKeyframe {
41
+ offset: number;
42
+ }
43
+ /** Custom animation definition */
44
+ interface CustomAnimation {
45
+ from: AnimationKeyframe;
46
+ to: AnimationKeyframe;
47
+ /** Optional intermediate keyframes (overshoot, bounce, …), played between `from` and `to`. */
48
+ frames?: AnimationFrame[];
49
+ }
50
+ /** Per-element animation options */
51
+ interface AnimateOptions {
52
+ /** Animation preset name, array of presets, or custom animation object */
53
+ animation?: AnimationPreset | AnimationPreset[] | CustomAnimation;
54
+ /** Duration in milliseconds (default: 600) */
55
+ duration?: number;
56
+ /** Delay in milliseconds (default: 0) */
57
+ delay?: number;
58
+ /** Easing function (default: 'ease') */
59
+ easing?: EasingType;
60
+ /** Intersection threshold 0-1 (default: 0.1) */
61
+ threshold?: number | number[];
62
+ /** Root margin for IntersectionObserver (default: '0px') */
63
+ rootMargin?: string;
64
+ /** Whether to replay animation each time element enters viewport (default: false) */
65
+ repeat?: boolean;
66
+ /** Whether to trigger animation only once (default: true if repeat is false) */
67
+ once?: boolean;
68
+ /** Offset in pixels from the viewport edge to trigger animation (default: 0) */
69
+ offset?: number;
70
+ /** Stagger delay for child elements in ms (default: 0) */
71
+ stagger?: number;
72
+ /** Callback fired when animation starts */
73
+ onStart?: (element: Element) => void;
74
+ /** Callback fired when animation completes */
75
+ onComplete?: (element: Element) => void;
76
+ /** Callback fired when element enters viewport */
77
+ onEnter?: (element: Element) => void;
78
+ /** Callback fired when element leaves viewport */
79
+ onLeave?: (element: Element) => void;
80
+ /** Callback fired with scroll progress (0 to 1) */
81
+ onProgress?: (element: Element, progress: number) => void;
82
+ /** How progress for `onProgress`/`progressVar` is measured (default: 'ratio') */
83
+ progressMode?: ProgressMode;
84
+ /**
85
+ * Name of a CSS custom property (e.g. `'--sa-progress'`) that receives the
86
+ * element's progress (0 to 1, same value as `onProgress`) as an inline
87
+ * style, for scroll-driven effects written in plain CSS. Off by default.
88
+ */
89
+ progressVar?: string;
90
+ /**
91
+ * Animation engine (default: `'auto'`, see `ScrollEngine`). With the native
92
+ * engine the animation is linked to scroll position: `duration`, `delay`,
93
+ * `threshold`, `offset` and `stagger` do not apply; `viewRange` does.
94
+ */
95
+ engine?: ScrollEngine;
96
+ /**
97
+ * Native engine only: the view-timeline range the entrance animation spans,
98
+ * as `[rangeStart, rangeEnd]` (default: `['entry 0%', 'entry 100%']`).
99
+ */
100
+ viewRange?: [string, string];
101
+ /**
102
+ * Animate out when the element leaves the viewport, and back in when it
103
+ * re-enters (implies `repeat: true` unless `repeat` is set).
104
+ * - `true`: play the entrance animation in reverse.
105
+ * - a preset / presets / `{ from, to }`: play that animation in reverse
106
+ * (e.g. `exit: 'fade-in-down'` leaves upwards).
107
+ * Skipped under reduced motion. (default: `false`)
108
+ */
109
+ exit?: boolean | AnimationPreset | AnimationPreset[] | CustomAnimation;
110
+ }
111
+
112
+ /**
113
+ * motionary - Staggered children
114
+ * Reveal a container's children one after another when the container scrolls
115
+ * into view, optionally also animating children that are added later.
116
+ */
117
+
118
+ interface StaggerOptions extends AnimateOptions {
119
+ /** Delay between consecutive children in ms (default: 80) */
120
+ stagger?: number;
121
+ /**
122
+ * Watch the container with a MutationObserver and animate children added
123
+ * later (e.g. infinite lists). Children added after the container was
124
+ * revealed animate when they scroll into view, staggered per batch.
125
+ * (default: false)
126
+ */
127
+ observeChildren?: boolean;
128
+ }
129
+
130
+ /**
131
+ * motionary - Vue 3 Integration
132
+ * Provides useScrollAnimate and useScrollStagger composables for Vue 3 applications.
133
+ *
134
+ * A thin wrapper around the core engine, so it shares its behaviour: `once`,
135
+ * `offset`, custom easing functions, progress, `prefers-reduced-motion`
136
+ * support, and cleanup on unmount.
137
+ */
138
+
139
+ declare function createVueComposables(Vue: {
140
+ ref: <T>(value: T | null) => {
141
+ value: T | null;
142
+ };
143
+ onMounted: (fn: () => void) => void;
144
+ onUnmounted: (fn: () => void) => void;
145
+ }): {
146
+ useScrollAnimate: (options?: AnimateOptions) => {
147
+ animateRef: {
148
+ value: Element | null;
149
+ };
150
+ };
151
+ useScrollStagger: (options?: StaggerOptions) => {
152
+ staggerRef: {
153
+ value: Element | null;
154
+ };
155
+ };
156
+ };
157
+
158
+ export { createVueComposables };
package/dist/vue.js ADDED
@@ -0,0 +1,60 @@
1
+ import { c as createScrollAnimate } from './chunks/core-D7cVumUu.js';
2
+ import { s as staggerChildren } from './chunks/stagger-DtMKo2SK.js';
3
+ import './chunks/presets-BYBVJVeP.js';
4
+
5
+ /**
6
+ * motionary - Vue 3 Integration
7
+ * Provides useScrollAnimate and useScrollStagger composables for Vue 3 applications.
8
+ *
9
+ * A thin wrapper around the core engine, so it shares its behaviour: `once`,
10
+ * `offset`, custom easing functions, progress, `prefers-reduced-motion`
11
+ * support, and cleanup on unmount.
12
+ */
13
+ /** Support refs on components (`$el`) as well as plain elements. */
14
+ function unwrap(value) {
15
+ if (value && typeof Element !== 'undefined' && !(value instanceof Element) && value.$el instanceof Element) {
16
+ return value.$el;
17
+ }
18
+ return value || null;
19
+ }
20
+ function createVueComposables(Vue) {
21
+ // Created lazily on the client so importing on the server is side-effect free.
22
+ let instance = null;
23
+ const getInstance = () => instance || (instance = createScrollAnimate());
24
+ function useScrollAnimate(options = {}) {
25
+ const animateRef = Vue.ref(null);
26
+ let el = null;
27
+ Vue.onMounted(() => {
28
+ const target = unwrap(animateRef.value);
29
+ if (!target)
30
+ return;
31
+ el = target;
32
+ getInstance().observe(el, options);
33
+ });
34
+ Vue.onUnmounted(() => {
35
+ if (el)
36
+ getInstance().unobserve(el);
37
+ el = null;
38
+ });
39
+ return { animateRef };
40
+ }
41
+ /** Stagger the children of `staggerRef`; `observeChildren: true` also animates children added later. */
42
+ function useScrollStagger(options = {}) {
43
+ const staggerRef = Vue.ref(null);
44
+ let stop;
45
+ Vue.onMounted(() => {
46
+ const target = unwrap(staggerRef.value);
47
+ if (target)
48
+ stop = staggerChildren(target, options, getInstance());
49
+ });
50
+ Vue.onUnmounted(() => {
51
+ stop?.();
52
+ stop = undefined;
53
+ });
54
+ return { staggerRef };
55
+ }
56
+ return { useScrollAnimate, useScrollStagger };
57
+ }
58
+
59
+ export { createVueComposables };
60
+ //# sourceMappingURL=vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vue.js","sources":["../src/vue.ts"],"sourcesContent":["/**\n * motionary - Vue 3 Integration\n * Provides useScrollAnimate and useScrollStagger composables for Vue 3 applications.\n *\n * A thin wrapper around the core engine, so it shares its behaviour: `once`,\n * `offset`, custom easing functions, progress, `prefers-reduced-motion`\n * support, and cleanup on unmount.\n */\n\nimport type { AnimateOptions, ScrollAnimateInstance } from './types';\nimport { createScrollAnimate } from './core';\nimport { staggerChildren, type StaggerOptions } from './stagger';\n\n/** Support refs on components (`$el`) as well as plain elements. */\nfunction unwrap(value: unknown): Element | null {\n if (value && typeof Element !== 'undefined' && !(value instanceof Element) && (value as any).$el instanceof Element) {\n return (value as any).$el as Element;\n }\n return (value as Element | null) || null;\n}\n\nexport function createVueComposables(Vue: {\n ref: <T>(value: T | null) => { value: T | null };\n onMounted: (fn: () => void) => void;\n onUnmounted: (fn: () => void) => void;\n}) {\n // Created lazily on the client so importing on the server is side-effect free.\n let instance: ScrollAnimateInstance | null = null;\n const getInstance = () => instance || (instance = createScrollAnimate());\n\n function useScrollAnimate(options: AnimateOptions = {}) {\n const animateRef = Vue.ref<Element>(null);\n let el: Element | null = null;\n\n Vue.onMounted(() => {\n const target = unwrap(animateRef.value);\n if (!target) return;\n el = target;\n getInstance().observe(el, options);\n });\n\n Vue.onUnmounted(() => {\n if (el) getInstance().unobserve(el);\n el = null;\n });\n\n return { animateRef };\n }\n\n /** Stagger the children of `staggerRef`; `observeChildren: true` also animates children added later. */\n function useScrollStagger(options: StaggerOptions = {}) {\n const staggerRef = Vue.ref<Element>(null);\n let stop: (() => void) | undefined;\n\n Vue.onMounted(() => {\n const target = unwrap(staggerRef.value);\n if (target) stop = staggerChildren(target, options, getInstance());\n });\n\n Vue.onUnmounted(() => {\n stop?.();\n stop = undefined;\n });\n\n return { staggerRef };\n }\n\n return { useScrollAnimate, useScrollStagger };\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;AAOG;AAMH;AACA,SAAS,MAAM,CAAC,KAAc,EAAA;IAC5B,IAAI,KAAK,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,EAAE,KAAK,YAAY,OAAO,CAAC,IAAK,KAAa,CAAC,GAAG,YAAY,OAAO,EAAE;QACnH,OAAQ,KAAa,CAAC,GAAc;IACtC;IACA,OAAQ,KAAwB,IAAI,IAAI;AAC1C;AAEM,SAAU,oBAAoB,CAAC,GAIpC,EAAA;;IAEC,IAAI,QAAQ,GAAiC,IAAI;AACjD,IAAA,MAAM,WAAW,GAAG,MAAM,QAAQ,KAAK,QAAQ,GAAG,mBAAmB,EAAE,CAAC;IAExE,SAAS,gBAAgB,CAAC,OAAA,GAA0B,EAAE,EAAA;QACpD,MAAM,UAAU,GAAG,GAAG,CAAC,GAAG,CAAU,IAAI,CAAC;QACzC,IAAI,EAAE,GAAmB,IAAI;AAE7B,QAAA,GAAG,CAAC,SAAS,CAAC,MAAK;YACjB,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC;AACvC,YAAA,IAAI,CAAC,MAAM;gBAAE;YACb,EAAE,GAAG,MAAM;YACX,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC;AACpC,QAAA,CAAC,CAAC;AAEF,QAAA,GAAG,CAAC,WAAW,CAAC,MAAK;AACnB,YAAA,IAAI,EAAE;AAAE,gBAAA,WAAW,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;YACnC,EAAE,GAAG,IAAI;AACX,QAAA,CAAC,CAAC;QAEF,OAAO,EAAE,UAAU,EAAE;IACvB;;IAGA,SAAS,gBAAgB,CAAC,OAAA,GAA0B,EAAE,EAAA;QACpD,MAAM,UAAU,GAAG,GAAG,CAAC,GAAG,CAAU,IAAI,CAAC;AACzC,QAAA,IAAI,IAA8B;AAElC,QAAA,GAAG,CAAC,SAAS,CAAC,MAAK;YACjB,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC;AACvC,YAAA,IAAI,MAAM;gBAAE,IAAI,GAAG,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;AACpE,QAAA,CAAC,CAAC;AAEF,QAAA,GAAG,CAAC,WAAW,CAAC,MAAK;YACnB,IAAI,IAAI;YACR,IAAI,GAAG,SAAS;AAClB,QAAA,CAAC,CAAC;QAEF,OAAO,EAAE,UAAU,EAAE;IACvB;AAEA,IAAA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE;AAC/C;;;;"}
@@ -0,0 +1,2 @@
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).UsaWidgets={})}(this,function(t){"use strict";const e="full",s=/rotate|scale|skew|perspective|matrix3d/;const i=new Set;function a(t,e){if(!e||i.has(t)||"undefined"==typeof document)return;i.add(t);try{if("function"==typeof CSSStyleSheet&&"adoptedStyleSheets"in document){const t=new CSSStyleSheet;return t.replaceSync(e),void(document.adoptedStyleSheets=[...document.adoptedStyleSheets,t])}}catch{}const s=document.createElement("style");s.setAttribute("data-usa",t),s.textContent=e,(document.head||document.documentElement).appendChild(s)}let n=null;function o(){if(n)return n;class t extends HTMLElement{constructor(){super(...arguments),this._cleanups=[],this._connected=!1}get reduced(){return"function"==typeof matchMedia&&!!matchMedia("(prefers-reduced-motion: reduce)").matches}connectedCallback(){if(!this._connected){if(this._connected=!0,"undefined"!=typeof document&&"loading"===document.readyState&&!this.nextSibling&&!this.childNodes.length){const t=()=>{this._connected&&this.isConnected&&this.mount()};return document.addEventListener("DOMContentLoaded",t,{once:!0}),void this._cleanups.push(()=>document.removeEventListener("DOMContentLoaded",t))}this.mount()}}disconnectedCallback(){this._connected=!1,this.teardown()}attributeChangedCallback(t,e,s){this._connected&&e!==s&&this.changed(t)}changed(t){this.teardown(),this.mount()}teardown(){this._cleanups.splice(0).reverse().forEach(t=>t()),this.unmount()}mount(){}unmount(){}str(t,e=""){const s=this.getAttribute(t);return null===s?e:s}num(t,e){const s=this.getAttribute(t),i=null===s||""===s.trim()?NaN:Number(s);return Number.isFinite(i)?i:e}flag(t){const e=this.getAttribute(t);return null!==e&&"false"!==e}setFlag(t,e){e?this.setAttribute(t,""):this.removeAttribute(t)}onCleanup(t){this._cleanups.push(t)}listen(t,e,s,i){t.addEventListener(e,s,i),this.onCleanup(()=>t.removeEventListener(e,s,i))}inView(t,e,s=this){if("undefined"==typeof IntersectionObserver)return void t(!0);const i=new IntersectionObserver(e=>{for(const s of e)t(s.isIntersecting,s)},e);i.observe(s),this.onCleanup(()=>i.disconnect())}motion(t,i,a){return function(t,i,a){if("function"!=typeof t.animate||"static"===e)return r(t,i[i.length-1]),null;if(i=function(t,i=e){return"full"!==i&&t.length?"static"===i?[t[t.length-1]]:t.map(t=>{const e={};for(const[a,n]of Object.entries(t))if("offset"===a||"easing"===a||"composite"===a)e[a]=n;else if("minimal"===i)"opacity"===a&&(e[a]=n);else{if("rotate"===a||"scale"===a||"transform"===a&&s.test(String(n)))continue;e[a]=n}return e}):t}(i),u>=d)return r(t,i[i.length-1]),null;const n=t.animate(i,a);if(a.iterations!==1/0){u++;let t=!1;const e=()=>{t||(t=!0,u--)};n?.finished?.then(e,e)}return n}(t,i,a)}emit(t,e){return this.dispatchEvent(new CustomEvent(`usa:${t}`,{detail:e,bubbles:!0,cancelable:!0}))}}return n=t,n}function r(t,e){if(e)for(const[s,i]of Object.entries(e))"offset"!==s&&"easing"!==s&&"composite"!==s&&null!=i&&(t.style[s]=String(i))}function l(t,e,s){if("undefined"==typeof customElements||"undefined"==typeof HTMLElement)return;a("base",c),s&&a(s.id,s.text);const i=customElements.get(t);if(i)return i;const n=e(o());return customElements.define(t,n),n}const c=".usa-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}";let u=0,d=1/0;const h=(t,e,s)=>Math.min(s,Math.max(e,t)),f=(t,e="[data-usa-part]")=>Array.from(t.children).filter(t=>t instanceof HTMLElement&&!t.matches(e));function p(t,e,s={},i=""){const a=document.createElement(t);a.className=e,a.setAttribute("data-usa-part","");for(const[t,e]of Object.entries(s))a.setAttribute(t,e);return i&&(a.innerHTML=i),a}const b=t=>t.querySelectorAll(":scope > [data-usa-part]").forEach(t=>t.remove());let m=0;const g=t=>`${t}-${++m}`;const x=["slide","fade","scale","cards"];function v(t="usa-carousel"){return l(t,t=>class extends t{constructor(){super(...arguments),this._i=0,this._slides=[],this._track=null,this._timer=0,this._hold=!1,this._dots=[]}static get observedAttributes(){return["effect","autoplay","loop","no-controls","no-dots"]}get length(){return this._slides.length}get index(){return this._i}set index(t){this.goTo(t)}get effect(){const t=this.str("effect","slide");return x.includes(t)?t:"slide"}mount(){this.dataset.effect=this.effect,this.toggleAttribute("data-reduced",this.reduced);const t=this.querySelector(":scope > .usa-carousel-viewport");this._slides=f(t?t.firstElementChild:this),b(this);const e=p("div","usa-carousel-viewport",{"aria-live":this.num("autoplay",0)?"off":"polite"}),s=p("div","usa-carousel-track");this._track=s,e.append(s);const i=this._slides.length;if(this._slides.forEach((t,e)=>{t.setAttribute("role","group"),t.setAttribute("aria-roledescription","slide"),t.setAttribute("aria-label",`${e+1} of ${i}`),s.append(t)}),this.prepend(e),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.setAttribute("aria-label",this.str("label","Carousel")),this.hasAttribute("tabindex")||(this.tabIndex=0),i>1&&!this.flag("no-controls")){const t=p("button","usa-carousel-nav usa-carousel-prev",{type:"button","aria-label":"Previous slide"},"‹"),e=p("button","usa-carousel-nav usa-carousel-next",{type:"button","aria-label":"Next slide"},"›");this.listen(t,"click",()=>this.prev()),this.listen(e,"click",()=>this.next()),this.append(t,e)}if(this._dots=[],i>1&&!this.flag("no-dots")){const t=p("div","usa-carousel-dots",{role:"group","aria-label":"Choose slide"});for(let e=0;e<i;e++){const s=p("button","usa-carousel-dot",{type:"button","aria-label":`Slide ${e+1}`});this.listen(s,"click",()=>this.goTo(e)),this._dots.push(s),t.append(s)}this.append(t)}this._i=h(Math.round(this.num("index",0)),0,Math.max(0,i-1)),this.layout(0),this.listen(this,"keydown",t=>{"ArrowRight"===t.key?(t.preventDefault(),this.next()):"ArrowLeft"===t.key&&(t.preventDefault(),this.prev())}),this.drag(e);const a=this.num("autoplay",0);if(a>0&&i>1&&!this.reduced){let t=!0;this.inView(e=>t=e);const e=t=>()=>this._hold=t;this.listen(this,"pointerenter",e(!0)),this.listen(this,"pointerleave",e(!1)),this.listen(this,"focusin",e(!0)),this.listen(this,"focusout",e(!1)),this._timer=window.setInterval(()=>{!t||this._hold||document.hidden||this.next()},Math.max(1200,a)),this.onCleanup(()=>clearInterval(this._timer))}}drag(t){let e=0,s=0,i=-1;this.listen(t,"pointerdown",t=>{this.length<2||t.target.closest("button,a,input")||(i=t.pointerId,e=t.clientX,s=0,this.setAttribute("data-dragging",""))}),this.listen(window,"pointermove",a=>{a.pointerId===i&&(s=a.clientX-e,this.layout(s/Math.max(1,t.clientWidth)))});const a=e=>{if(e.pointerId!==i)return;i=-1,this.removeAttribute("data-dragging");const a=Math.max(1,t.clientWidth);Math.abs(s)>.18*a?s<0?this.next():this.prev():this.layout(0)};this.listen(window,"pointerup",a),this.listen(window,"pointercancel",a)}layout(t){const e=this.length,s=this._i,i=this.effect;this._track&&(this._track.style.transform="slide"===i?`translateX(${100*(-s+t)}%)`:""),this._slides.forEach((a,n)=>{let o=n-s+t;this.flag("loop")&&e>2&&(o>e/2&&(o-=e),o<-e/2&&(o+=e));const r=n===s;if(a.toggleAttribute("data-active",r),a.setAttribute("aria-hidden",String(!r)),a.inert=!r,"slide"===i)return void(a.style.transform=a.style.opacity=a.style.zIndex=a.style.filter="");const l=Math.abs(o);"fade"===i?(a.style.opacity=String(h(1-l,0,1)),a.style.transform=""):"scale"===i?(a.style.opacity=String(h(1-l,0,1)),a.style.transform=`scale(${1+Math.min(1,l)*(o<0?.12:-.12)})`):(a.style.opacity=l>2.2?"0":String(1-.28*Math.min(l,2)),a.style.transform=`translateX(${58*o}%) translateZ(${140*-l}px) rotateY(${h(38*-o,-60,60)}deg)`,a.style.filter=l>.5?`brightness(${1-.18*Math.min(l,2)})`:""),a.style.zIndex=String(100-Math.round(10*l))}),this._dots.forEach((t,e)=>t.setAttribute("aria-current",String(e===s)))}goTo(t){const e=this.length;if(!e)return;const s=this.flag("loop")?(Math.round(t)%e+e)%e:h(Math.round(t),0,e-1),i=this._i;this._i=s,this.layout(0),s!==i&&this.emit("change",{index:s,from:i})}next(){this.goTo(this._i+1>=this.length&&!this.flag("loop")?0:this._i+1)}prev(){this.goTo(this._i-1<0&&!this.flag("loop")?this.length-1:this._i-1)}},{id:"carousel",text:'usa-carousel{display:block;position:relative;--usa-carousel-dur:520ms;--usa-carousel-ease:cubic-bezier(.22,1,.36,1);overflow:hidden;border-radius:var(--usa-radius,14px);touch-action:pan-y}.usa-carousel-viewport{position:relative;overflow:hidden;height:100%;min-height:inherit}.usa-carousel-track{display:flex;height:100%;transition:transform var(--usa-carousel-dur) var(--usa-carousel-ease);will-change:transform}.usa-carousel-track>*{flex:0 0 100%;min-width:0;box-sizing:border-box}usa-carousel:not([data-effect="slide"]) .usa-carousel-track{display:grid}usa-carousel:not([data-effect="slide"]) .usa-carousel-track>*{grid-area:1/1;transition:opacity var(--usa-carousel-dur) ease,transform var(--usa-carousel-dur) var(--usa-carousel-ease),filter var(--usa-carousel-dur) ease}usa-carousel[data-effect="cards"] .usa-carousel-viewport{perspective:900px}usa-carousel[data-dragging] .usa-carousel-track,usa-carousel[data-dragging] .usa-carousel-track>*{transition:none}.usa-carousel-nav{position:absolute;top:50%;translate:0 -50%;z-index:2;width:36px;height:36px;border-radius:50%;border:0;background:rgba(255,255,255,.85);color:#111;font:600 18px/1 system-ui;cursor:pointer;display:grid;place-items:center;box-shadow:0 4px 14px rgba(0,0,0,.18);transition:transform .2s}.usa-carousel-nav:hover{transform:scale(1.08)}.usa-carousel-nav:focus-visible{outline:2px solid #7c5cff;outline-offset:2px}.usa-carousel-prev{left:10px}.usa-carousel-next{right:10px}.usa-carousel-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:6px;z-index:2}.usa-carousel-dot{width:8px;height:8px;padding:0;border:0;border-radius:99px;background:rgba(255,255,255,.55);cursor:pointer;transition:width .35s var(--usa-carousel-ease),background .35s}.usa-carousel-dot[aria-current="true"]{width:22px;background:#fff}@media (prefers-reduced-motion:reduce){usa-carousel .usa-carousel-track,usa-carousel .usa-carousel-track>*,.usa-carousel-dot{transition:none!important}}usa-carousel[data-reduced] .usa-carousel-track,usa-carousel[data-reduced] .usa-carousel-track>*{transition:none!important}'})}const y=["pill","underline","glow","gooey"];function w(t="usa-tab-bar"){return l(t,t=>class extends t{constructor(){super(...arguments),this._tabs=[],this._panels=[],this._ink=null,this._i=0}static get observedAttributes(){return["indicator"]}get selected(){return this._i}set selected(t){this.select(t)}mount(){const t=this.str("indicator","pill");this.dataset.indicator=y.includes(t)?t:"pill";let e=this.querySelector(":scope > .usa-tab-bar-list");e||(e=p("div","usa-tab-bar-list"),this.prepend(e)),e.setAttribute("role","tablist"),e.setAttribute("aria-label",this.str("label","Tabs"));const s=f(this);this._panels=s.filter(t=>t.hasAttribute("data-panel"));for(const t of s)!t.hasAttribute("data-panel")&&t.matches("button,[data-tab]")&&e.append(t);if(this._tabs=Array.from(e.children).filter(t=>t instanceof HTMLElement&&!t.classList.contains("usa-tab-bar-ink")),this._ink=e.querySelector(".usa-tab-bar-ink")||p("span","usa-tab-bar-ink",{"aria-hidden":"true"}),e.prepend(this._ink),this._tabs.forEach((t,e)=>{t.setAttribute("role","tab"),"button"!==t.localName||t.hasAttribute("type")||t.setAttribute("type","button"),t.id||(t.id=g("usa-tab"));const s=this._panels[e];s&&(s.id||(s.id=g("usa-tabpanel")),s.classList.add("usa-tab-bar-panel"),s.setAttribute("role","tabpanel"),s.setAttribute("aria-labelledby",t.id),s.tabIndex=0,t.setAttribute("aria-controls",s.id)),this.listen(t,"click",()=>this.select(e))}),this.listen(e,"keydown",t=>{const e=function(t,e,s,i=!1){const a=i?"ArrowUp":"ArrowLeft",n=i?"ArrowDown":"ArrowRight";return t.key===a?(e-1+s)%s:t.key===n?(e+1)%s:"Home"===t.key?0:"End"===t.key?s-1:-1}(t,this._i,this._tabs.length);e<0||(t.preventDefault(),this.select(e),this._tabs[e].focus())}),this._i=Math.min(Math.max(0,Math.round(this.num("selected",0))),Math.max(0,this._tabs.length-1)),this.sync(-1),"function"==typeof ResizeObserver){const t=new ResizeObserver(()=>this.place());t.observe(e),this.onCleanup(()=>t.disconnect())}}rect(t){const e=this._tabs[t];return e?[e.offsetLeft,e.offsetWidth]:[0,0]}place(){if(!this._ink)return;const[t,e]=this.rect(this._i);this._ink.style.transform=`translateX(${t}px)`,this._ink.style.width=`${e}px`}sync(t){if(this._tabs.forEach((t,e)=>{t.setAttribute("aria-selected",String(e===this._i)),t.tabIndex=e===this._i?0:-1}),this._panels.forEach((t,e)=>t.hidden=e!==this._i),this.place(),t<0||t===this._i||!this._ink||this.reduced)return;const[e,s]=this.rect(t),[i,a]=this.rect(this._i),n=i>e,o=n?{transform:`translateX(${e}px)`,width:i+a-e+"px"}:{transform:`translateX(${i}px)`,width:e+s-i+"px"};this.motion(this._ink,[{transform:`translateX(${e}px)`,width:`${s}px`},{...o,offset:.45},{transform:`translateX(${i}px)`,width:`${a}px`}],{duration:480,easing:"cubic-bezier(.22,1,.36,1)"});const r=this._panels[this._i];r&&this.motion(r,[{opacity:0,transform:`translateX(${n?24:-24}px)`},{opacity:1,transform:"none"}],{duration:320,easing:"cubic-bezier(.22,1,.36,1)"})}select(t){const e=Math.min(Math.max(0,Math.round(t)),this._tabs.length-1);if(e===this._i||e<0)return;const s=this._i;this._i=e,this.sync(s),this.emit("change",{index:e,from:s})}},{id:"tab-bar",text:'usa-tab-bar{display:block;--usa-tab-accent:#7c5cff;--usa-tab-ease:cubic-bezier(.22,1,.36,1)}.usa-tab-bar-list{position:relative;display:flex;gap:4px;padding:4px;border-radius:12px;background:rgba(127,127,127,.12);isolation:isolate;overflow-x:auto;scrollbar-width:none}.usa-tab-bar-list::-webkit-scrollbar{display:none}.usa-tab-bar-list>[role="tab"]{position:relative;z-index:1;flex:1 0 auto;border:0;background:none;color:inherit;font:inherit;font-weight:600;padding:8px 14px;border-radius:9px;cursor:pointer;opacity:.7;transition:opacity .25s,color .25s;white-space:nowrap}.usa-tab-bar-list>[role="tab"][aria-selected="true"]{opacity:1}.usa-tab-bar-list>[role="tab"]:focus-visible{outline:2px solid var(--usa-tab-accent);outline-offset:1px}.usa-tab-bar-ink{position:absolute;z-index:0;left:0;top:4px;bottom:4px;width:0;border-radius:9px;background:var(--usa-tab-accent);pointer-events:none}usa-tab-bar[data-indicator="pill"] [aria-selected="true"]{color:#fff}usa-tab-bar[data-indicator="underline"] .usa-tab-bar-list{background:none;border-bottom:1px solid rgba(127,127,127,.25);border-radius:0}usa-tab-bar[data-indicator="underline"] .usa-tab-bar-ink{top:auto;bottom:0;height:3px;border-radius:3px}usa-tab-bar[data-indicator="glow"] .usa-tab-bar-ink{background:transparent;box-shadow:0 0 0 2px var(--usa-tab-accent),0 0 18px var(--usa-tab-accent)}usa-tab-bar[data-indicator="gooey"] .usa-tab-bar-ink{filter:blur(.5px);border-radius:999px}usa-tab-bar[data-indicator="gooey"] [aria-selected="true"]{color:#fff}.usa-tab-bar-panel{padding:14px 2px}.usa-tab-bar-panel[hidden]{display:none}'})}const _={default:{stiffness:170,damping:26,mass:1},gentle:{stiffness:120,damping:14,mass:1},wobbly:{stiffness:180,damping:12,mass:1},stiff:{stiffness:210,damping:20,mass:1},bouncy:{stiffness:300,damping:10,mass:1},slow:{stiffness:280,damping:60,mass:1},molasses:{stiffness:280,damping:120,mass:1}};function M(t,e,s,i,a){const n=s+(-t.stiffness*(e-i)-t.damping*s)/t.mass*a;return[e+n*a,n]}const k=new Map;function A(t,e=60){const s=function(t){const e="string"==typeof t?_[t]||_.default:{..._.default,...t||{}},s=(t,e)=>"number"==typeof t&&Number.isFinite(t)&&t>0?t:e,i="object"==typeof t&&t||{};return{stiffness:s(e.stiffness,170),damping:Math.max(0,Number.isFinite(e.damping)?e.damping:26),mass:s(e.mass,1),velocity:Number.isFinite(i.velocity)?i.velocity:0,precision:s(i.precision,.001)}}(t),i=`${s.stiffness}|${s.damping}|${s.mass}|${s.velocity}|${s.precision}|${e}`,a=k.get(i);if(a)return a;const n=[0];let o=0,r=s.velocity;const l=1e3/e;let c=0,u=l;for(;c<1e4&&([o,r]=M(s,o,r,1,.001),c+=1,!(c>=u&&(n.push(o),u+=l,Math.abs(1-o)<s.precision&&Math.abs(r)<10*s.precision))););n[n.length-1]=1;const d={values:n,duration:Math.round(c)};return k.size>64&&k.clear(),k.set(i,d),d}function S(t,e=48){const{values:s,duration:i}=A(t);return"undefined"!=typeof CSS&&"function"==typeof CSS.supports&&CSS.supports("animation-timing-function","linear(0, 1)")?{easing:E(s,e),duration:i}:{easing:"cubic-bezier(0.34, 1.56, 0.64, 1)",duration:Math.min(i,1200)}}function E(t,e=48){const s=t.length,i=Math.max(1,Math.ceil((s-1)/Math.max(2,e-1))),a=[];for(let e=0;e<s-1;e+=i)a.push(String(Math.round(1e3*t[e])/1e3));return a.push("1"),`linear(${a.join(", ")})`}function C(t="usa-disclosure"){return l(t,t=>class extends t{constructor(){super(...arguments),this._anims=new WeakMap}get items(){return Array.from(this.children).filter(t=>"details"===t.localName)}mount(){this.listen(this,"click",t=>{const e=t.target.closest("summary"),s=e?.parentElement;e&&s&&s.parentElement===this&&(t.preventDefault(),this.set(s,!s.open))})}set(t,e){if(e&&!this.flag("multiple"))for(const e of this.items)e!==t&&e.open&&this.set(e,!1);if(t.open===e&&!this._anims.get(t))return;const s=t.querySelector("summary"),i=s?s.offsetHeight:0,a=t.offsetHeight;this._anims.get(t)?.cancel(),e&&(t.open=!0);const n=e?t.scrollHeight:i,o=S(this.str("spring","gentle")),r=this.reduced?null:this.motion(t,[{height:`${a}px`},{height:`${n}px`}],{duration:Math.min(o.duration,700),easing:o.easing,fill:"forwards"}),l=Array.from(t.children).filter(t=>"summary"!==t.localName);e&&!this.reduced&&l.forEach(t=>this.motion(t,[{opacity:0,transform:"translateY(-6px)"},{opacity:1,transform:"none"}],{duration:300,delay:60,easing:"ease-out"}));const c=()=>{this._anims.delete(t),e||(t.open=!1),r?.cancel()};r?(this._anims.set(t,r),r.finished.then(()=>this._anims.get(t)===r&&c(),()=>{})):c(),this.emit("toggle",{index:this.items.indexOf(t),open:e})}toggle(t,e){const s=this.items[t];s&&this.set(s,e??!s.open)}openAll(){this.items.forEach(t=>t.open=!0)}closeAll(){this.items.forEach(t=>this.set(t,!1))}},{id:"disclosure",text:'usa-disclosure{display:block;--usa-disclosure-accent:#7c5cff}usa-disclosure>details{border-bottom:1px solid rgba(127,127,127,.25);overflow:hidden}usa-disclosure>details>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 4px;font-weight:600}usa-disclosure>details>summary::-webkit-details-marker{display:none}usa-disclosure>details>summary::after{content:"";flex:none;width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;rotate:45deg;translate:0 -3px;transition:rotate .35s cubic-bezier(.34,1.56,.64,1),translate .35s}usa-disclosure>details[open]>summary::after{rotate:225deg;translate:0 2px}usa-disclosure>details>summary:focus-visible{outline:2px solid var(--usa-disclosure-accent);outline-offset:2px;border-radius:6px}usa-disclosure>details>:not(summary){padding:0 4px 12px}usa-disclosure[variant="cards"]>details{border:1px solid rgba(127,127,127,.25);border-radius:12px;margin-bottom:8px;padding:0 10px;transition:box-shadow .3s,border-color .3s}usa-disclosure[variant="cards"]>details[open]{border-color:var(--usa-disclosure-accent);box-shadow:0 8px 24px rgba(124,92,255,.16)}@media (prefers-reduced-motion:reduce){usa-disclosure>details>summary::after{transition:none}}'})}function $(t="usa-stories"){return l(t,t=>class extends t{constructor(){super(...arguments),this._i=0,this._items=[],this._bars=[],this._fill=null,this._btn=null}static get observedAttributes(){return["duration","loop"]}get index(){return this._i}mount(){b(this),this._items=f(this);const t=p("div","usa-stories-bars",{"aria-hidden":"true"});this._bars=this._items.map(()=>{const e=p("div","usa-stories-bar",{},"<i></i>");return t.append(e),e}),this._btn=p("button","usa-stories-toggle",{type:"button"}),this.listen(this._btn,"click",t=>{t.stopPropagation(),this.hasAttribute("paused")?this.play():this.pause()}),this.append(t,this._btn),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","stories"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Stories"),this.hasAttribute("tabindex")||(this.tabIndex=0),this.reduced&&this.setAttribute("paused","");let e=!1,s=0;this.listen(this,"pointerdown",t=>{t.target.closest("button,a")||(s=performance.now(),e=!this.hasAttribute("paused"),e&&this._fill?.pause())}),this.listen(this,"pointerup",t=>{if(t.target.closest("button,a")||!s)return;const i=performance.now()-s>350;if(s=0,e&&!this.hasAttribute("paused")&&this._fill?.play(),i)return;const a=this.getBoundingClientRect();t.clientX-a.left<a.width/3?this.prev():this.next()}),this.listen(this,"keydown",t=>{"ArrowRight"===t.key?this.next():"ArrowLeft"===t.key?this.prev():" "===t.key&&(t.preventDefault(),this.hasAttribute("paused")?this.play():this.pause())}),this.onCleanup(()=>this._fill?.cancel()),this.goTo(Math.min(this._i,Math.max(0,this._items.length-1)),!0)}label(){if(this._btn){const t=this.hasAttribute("paused");this._btn.textContent=t?"▶":"❚❚",this._btn.setAttribute("aria-label",t?"Play stories":"Pause stories")}}goTo(t,e=!1){const s=this._items.length;if(!s)return;if(t>=s&&!this.flag("loop"))return this.emit("end"),void this.pause();const i=(t%s+s)%s,a=i!==this._i||e;this._i=i,this._items.forEach((t,e)=>{t.toggleAttribute("data-active",e===i),t.setAttribute("aria-hidden",String(e!==i))}),this._bars.forEach((t,e)=>t.toggleAttribute("data-done",e<i)),this._fill?.cancel();const n=this._bars[i]?.firstElementChild;if(this._fill=n?n.animate?.([{transform:"scaleX(0)"},{transform:"scaleX(1)"}],{duration:Math.max(800,this.num("duration",5e3)),fill:"forwards"})??null:null,this._fill){const t=this._fill;t.onfinish=()=>this._fill===t&&this.goTo(this._i+1),this.hasAttribute("paused")&&t.pause()}this.label(),a&&!e&&this.emit("change",{index:i})}next(){this.goTo(this._i+1)}prev(){this.goTo(Math.max(0,this._i-1))}pause(){this.setAttribute("paused",""),this._fill?.pause(),this.label()}play(){this.removeAttribute("paused"),"finished"===this._fill?.playState?this.goTo(this._i+1>=this._items.length?0:this._i+1):this._fill?.play(),this.label()}},{id:"stories",text:"usa-stories{display:block;position:relative;overflow:hidden;border-radius:var(--usa-radius,16px);background:#111;color:#fff;aspect-ratio:9/14;max-height:520px;user-select:none;-webkit-user-select:none;touch-action:manipulation}usa-stories>:not([data-usa-part]){position:absolute;inset:0;opacity:0;transition:opacity .35s ease,transform .5s cubic-bezier(.22,1,.36,1);transform:scale(1.04);pointer-events:none;box-sizing:border-box}usa-stories>[data-active]:not([data-usa-part]){opacity:1;transform:none;pointer-events:auto}usa-stories>img:not([data-usa-part]){width:100%;height:100%;object-fit:cover}.usa-stories-bars{position:absolute;z-index:3;top:8px;left:8px;right:48px;display:flex;gap:4px}.usa-stories-bar{flex:1;height:3px;border-radius:3px;background:rgba(255,255,255,.35);overflow:hidden}.usa-stories-bar>i{display:block;height:100%;width:100%;background:#fff;transform-origin:left;transform:scaleX(0)}.usa-stories-bar[data-done]>i{transform:scaleX(1)}.usa-stories-toggle{position:absolute;z-index:3;top:2px;right:6px;width:36px;height:30px;border:0;background:none;color:#fff;font:700 14px/1 system-ui;cursor:pointer;border-radius:8px}.usa-stories-toggle:focus-visible{outline:2px solid #fff}@media (prefers-reduced-motion:reduce){usa-stories>*{transition:none!important;transform:none!important}}"})}const T={6.2:{"usa-carousel":v,"usa-tab-bar":w,"usa-disclosure":C,"usa-stories":$}},L=Object.values(T).flatMap(t=>Object.keys(t));function R(t){for(const[e,s]of Object.entries(T))if(!t||t===e)for(const[t,e]of Object.entries(s))e(t)}var I;const z=["enter","exit","attention","click","hover","card","loop","page","background","text","cursor","scroll"],q=Symbol.for("use-scroll-animate.effects"),D=(I=globalThis)[q]||(I[q]=new Map);function O(t,e={}){if(!/^[a-z][a-z0-9-]*$/.test(t.name))throw new Error(`[motionary] invalid effect name "${t.name}"`);if(!z.includes(t.kind))throw new Error(`[motionary] unknown effect kind "${t.kind}"`);if(D.has(t.name)&&!e.override)throw new Error(`[motionary] effect "${t.name}" is already registered`);return D.set(t.name,t),()=>{D.get(t.name)===t&&D.delete(t.name)}}let P=null;function F(t,e,s,i,a,n,o=""){const r=document.createElement("span");r.style.cssText=`position:absolute;left:${t}px;top:${e}px;${s}`,o&&(r.textContent=o),(P?.isConnected||(P=document.createElement("div"),P.setAttribute("aria-hidden","true"),P.setAttribute("data-usa-fx-layer",""),P.style.cssText="position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:2147483000;contain:strict",document.body.appendChild(P)),P).appendChild(r);const l=i.animate(r,a,{fill:"forwards",...n}),c=()=>r.remove();return l?l.finished.then(c,c):c(),l}const N=["#7c5cff","#ff5c8a","#22d3ee","#facc15","#34d399"],X=(t,e)=>t+Math.random()*(e-t);function B(t,e,s=0){return(Math.sin(1.7*t+s)*Math.cos(1.3*e-.7*s)+.5*Math.sin(.9*(t+e)+.5*s)+.5*Math.cos(.6*t-1.1*e-.3*s))/2}function G(t){const e=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(t.trim());return e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[124,92,255]}function W(t,e,s,i){const a=document.createElement("canvas");a.setAttribute("aria-hidden","true"),a.setAttribute("data-usa-fx-canvas",""),a.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1;border-radius:inherit";const n=[],o=(e,s)=>{n.push([e,t.style[e]]),t.style[e]=s};"static"===getComputedStyle(t).position&&o("position","relative"),o("isolation","isolate"),t.prepend(a);const r=a.getContext("2d");let l=0,c=!0,u=Math.min(1,Math.max(.35,Number(i.quality)||1)),d=0,h=0,f=null;const p=performance.now();let b=p,m=0,g=0;const x=()=>{const e=t.getBoundingClientRect();d=Math.max(1,Math.round(e.width)),h=Math.max(1,Math.round(e.height));const n=Math.min(2,("number"==typeof devicePixelRatio?devicePixelRatio:1)||1)*u;a.width=Math.max(1,Math.round(d*n)),a.height=Math.max(1,Math.round(h*n)),r&&r.setTransform(n,0,0,n,0,0),f=s.init?s.init(d,h,i):{}},v=t=>{if(l=0,!r)return;const e=t-b;b=t,e>28?m++:e<18&&g++,m>20&&u>.35?(u=Math.max(.35,u-.15),m=g=0,x()):g>240&&u<1&&(u=Math.min(1,u+.15),m=g=0,x()),s.draw({ctx:r,w:d,h:h,t:(t-p)/1e3,quality:u,state:f,o:i}),c&&!document.hidden&&(l=requestAnimationFrame(v))},y=()=>{l||!r||e.reduced||(b=performance.now(),l=requestAnimationFrame(v))};x(),r&&s.draw({ctx:r,w:d,h:h,t:0,quality:u,state:f,o:i});const w="function"==typeof IntersectionObserver?new IntersectionObserver(t=>{c=t.some(t=>t.isIntersecting),c&&y()}):null;w?.observe(t);const _="function"==typeof ResizeObserver?new ResizeObserver(()=>{x(),r&&e.reduced&&s.draw({ctx:r,w:d,h:h,t:0,quality:u,state:f,o:i})}):null;_?.observe(t);const M=()=>!document.hidden&&c&&y();return document.addEventListener("visibilitychange",M),y(),()=>{cancelAnimationFrame(l),l=0,w?.disconnect(),_?.disconnect(),document.removeEventListener("visibilitychange",M),a.remove();for(const[e,s]of n)t.style[e]=s}}const j=(t,e,s,i)=>({name:t,kind:"background",description:e,reduced:"run",defaults:{colors:N,background:"#0b0d12",speed:1,quality:1,...s},run:(t,e,s)=>W(t,s,i,e)});function H(t,e,s){const i=Math.max(2,Math.round(e/t.quality)),a=Math.max(1,Math.ceil(t.w/i)),n=Math.max(1,Math.ceil(t.h/i)),o=t.state;if(o.buf&&o.buf.width===a&&o.buf.height===n||(o.buf=document.createElement("canvas"),o.buf.width=a,o.buf.height=n,o.bctx=o.buf.getContext("2d"),o.img=o.bctx?.createImageData(a,n)),!o.bctx||!o.img)return;const r=o.img.data;for(let t=0;t<n;t++)for(let e=0;e<a;e++)s(e*i,t*i,r,4*(t*a+e));o.bctx.putImageData(o.img,0,0),t.ctx.imageSmoothingEnabled=!0,t.ctx.drawImage(o.buf,0,0,t.w,t.h)}j("flow-field","Particles drift along a slowly changing flow field, leaving silky trails.",{count:600,fade:.06},{init:(t,e,s)=>({p:Array.from({length:s.count},()=>[Math.random()*t,Math.random()*e])}),draw:({ctx:t,w:e,h:s,t:i,state:a,o:n,quality:o})=>{t.fillStyle=n.background,t.globalAlpha=0===i?1:n.fade,t.fillRect(0,0,e,s),t.globalAlpha=.8;const r=Math.round(a.p.length*o),l=0===i?40:1;for(let o=0;o<r;o++){const r=a.p[o];t.fillStyle=n.colors[o%n.colors.length];for(let a=0;a<l;a++){const a=B(.004*r[0],.004*r[1],.15*i*n.speed)*Math.PI*2;r[0]+=1.2*Math.cos(a)*n.speed,r[1]+=1.2*Math.sin(a)*n.speed,(r[0]<0||r[0]>e||r[1]<0||r[1]>s)&&(r[0]=Math.random()*e,r[1]=Math.random()*s),t.fillRect(r[0],r[1],1.4,1.4)}}t.globalAlpha=1}}),j("voronoi","Drifting Voronoi cells in the palette, with darker borders.",{seeds:14,cell:6},{init:(t,e,s)=>({s:Array.from({length:s.seeds},(i,a)=>({x:Math.random()*t,y:Math.random()*e,vx:Math.random()-.5,vy:Math.random()-.5,c:G(s.colors[a%s.colors.length])}))}),draw:t=>{const{w:e,h:s,state:i,o:a}=t;for(const t of i.s)t.x+=t.vx*a.speed,t.y+=t.vy*a.speed,(t.x<0||t.x>e)&&(t.vx*=-1),(t.y<0||t.y>s)&&(t.vy*=-1);H(t,a.cell,(t,e,s,a)=>{let n=1/0,o=1/0,r=i.s[0].c;for(const s of i.s){const i=(s.x-t)**2+(s.y-e)**2;i<n?(o=n,n=i,r=s.c):i<o&&(o=i)}const l=Math.sqrt(o)-Math.sqrt(n)<6?.55:1;s[a]=r[0]*l,s[a+1]=r[1]*l,s[a+2]=r[2]*l,s[a+3]=255})}}),j("mesh-gradient","Soft blobs of colour orbit and blend into a living mesh gradient.",{blobs:4,blur:.65},{draw:({ctx:t,w:e,h:s,t:i,o:a})=>{t.fillStyle=a.background,t.fillRect(0,0,e,s);const n=Math.max(e,s)*a.blur;for(let o=0;o<a.blobs;o++){const r=.25*i*a.speed+o*Math.PI*2/a.blobs,l=e/2+Math.cos(r*(1+.13*o))*e*.32,c=s/2+Math.sin(r*(.8+.11*o))*s*.32,[u,d,h]=G(a.colors[o%a.colors.length]),f=t.createRadialGradient(l,c,0,l,c,n);f.addColorStop(0,`rgba(${u},${d},${h},0.7)`),f.addColorStop(1,`rgba(${u},${d},${h},0)`),t.fillStyle=f,t.fillRect(0,0,e,s)}}}),j("starfield","Stars stream toward the viewer (warp speed with `speed: 4`).",{stars:400,color:"#ffffff"},{init:(t,e,s)=>({s:Array.from({length:s.stars},()=>[2*Math.random()-1,2*Math.random()-1,Math.random()])}),draw:({ctx:t,w:e,h:s,t:i,state:a,o:n,quality:o})=>{t.fillStyle=n.background,t.fillRect(0,0,e,s),t.fillStyle=n.color;const r=Math.round(a.s.length*o);for(let o=0;o<r;o++){const r=a.s[o];i>0&&(r[2]-=.004*n.speed),r[2]<=.01&&(r[0]=2*Math.random()-1,r[1]=2*Math.random()-1,r[2]=1);const l=e/2+r[0]/r[2]*e*.5,c=s/2+r[1]/r[2]*s*.5;if(l<0||l>e||c<0||c>s)continue;const u=2.6*(1-r[2]);t.globalAlpha=Math.min(1,1.6*(1-r[2])),t.fillRect(l,c,u,u)}t.globalAlpha=1}}),j("metaballs","Gooey blobs that merge and split (low-resolution field, scaled up).",{balls:6,cell:5,threshold:1},{init:(t,e,s)=>({b:Array.from({length:s.balls},()=>({x:Math.random()*t,y:Math.random()*e,vx:1.6*(Math.random()-.5),vy:1.6*(Math.random()-.5),r:Math.min(t,e)*(.08+.08*Math.random())}))}),draw:t=>{const{w:e,h:s,state:i,o:a}=t;for(const t of i.b)t.x+=t.vx*a.speed,t.y+=t.vy*a.speed,(t.x<0||t.x>e)&&(t.vx*=-1),(t.y<0||t.y>s)&&(t.vy*=-1);const[n,o,r]=G(a.colors[0]),[l,c,u]=G(a.colors[1]||a.colors[0]),[d,h,f]=G(a.background);H(t,a.cell,(t,e,s,p)=>{let b=0;for(const s of i.b)b+=s.r*s.r/((s.x-t)**2+(s.y-e)**2+1);const m=b>=a.threshold,g=Math.min(1,.8*(b-a.threshold));s[p]=m?n+(l-n)*g:d,s[p+1]=m?o+(c-o)*g:h,s[p+2]=m?r+(u-r)*g:f,s[p+3]=255})}}),j("contours","Topographic contour lines over a slowly shifting height field.",{levels:9,cell:4,color:"#7c5cff"},{draw:t=>{const{t:e,o:s}=t,[i,a,n]=G(s.color),[o,r,l]=G(s.background),c=(t,i)=>(B(.006*t,.006*i,.2*e*s.speed)+1)/2,u=Math.max(2,Math.round(s.cell/t.quality));H(t,s.cell,(t,e,d,h)=>{const f=Math.floor(c(t,e)*s.levels),p=f!==Math.floor(c(t+u,e)*s.levels)||f!==Math.floor(c(t,e+u)*s.levels),b=.12+f/s.levels*.18;d[h]=p?i:o+(i-o)*b,d[h+1]=p?a:r+(a-r)*b,d[h+2]=p?n:l+(n-l)*b,d[h+3]=255})}});const U="#version 300 es\nprecision highp float;\nuniform vec2 u_res;uniform float u_t;uniform vec3 u_c0,u_c1,u_c2;uniform vec2 u_ptr;uniform float u_speed,u_scale;\nout vec4 o;\nfloat h(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);}\nfloat n(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.-2.*f);return mix(mix(h(i),h(i+vec2(1,0)),f.x),mix(h(i+vec2(0,1)),h(i+1.),f.x),f.y);}\nfloat fbm(vec2 p){float v=0.,a=.5;for(int k=0;k<5;k++){v+=a*n(p);p=p*2.03+vec2(1.7,9.2);a*=.5;}return v;}\n";let Y=null;function V(){if(null!==Y)return Y;try{Y="undefined"!=typeof document&&!!document.createElement("canvas").getContext("webgl2")}catch{Y=!1}return Y}function K(t,e,s,i){const a=()=>{t.dataset.usaBackend="canvas";const a=W(t,e,s.fallback,i);return()=>{a(),delete t.dataset.usaBackend}};if("canvas"===i.backend||!V())return a();const n=document.createElement("canvas"),o=n.getContext("webgl2",{alpha:!1,antialias:!1,preserveDrawingBuffer:!1}),r=o&&function(t,e){const s=(e,s)=>{const i=t.createShader(e);return t.shaderSource(i,s),t.compileShader(i),t.getShaderParameter(i,t.COMPILE_STATUS)?i:null},i=s(t.VERTEX_SHADER,"#version 300 es\nin vec2 a;void main(){gl_Position=vec4(a,0.,1.);}"),a=s(t.FRAGMENT_SHADER,e);if(!i||!a)return null;const n=t.createProgram();return t.attachShader(n,i),t.attachShader(n,a),t.bindAttribLocation(n,0,"a"),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS)?n:null}(o,`${U}void main(){vec2 uv=gl_FragCoord.xy/u_res;vec2 p=uv*vec2(u_res.x/u_res.y,1.)*u_scale;float t=u_t*u_speed;${s.body}}`);if(!o||!r)return a();t.dataset.usaBackend="webgl2",n.setAttribute("aria-hidden","true"),n.setAttribute("data-usa-fx-canvas",""),n.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1;border-radius:inherit";const l=[],c=(e,s)=>{l.push([e,t.style[e]]),t.style[e]=s};"static"===getComputedStyle(t).position&&c("position","relative"),c("isolation","isolate"),t.prepend(n),o.useProgram(r);const u=o.createBuffer();o.bindBuffer(o.ARRAY_BUFFER,u),o.bufferData(o.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),o.STATIC_DRAW),o.enableVertexAttribArray(0),o.vertexAttribPointer(0,2,o.FLOAT,!1,0,0);const d=t=>o.getUniformLocation(r,t),h=i.colors||[];["u_c0","u_c1","u_c2"].forEach((t,e)=>o.uniform3fv(d(t),G(h[e]||h[0]||"#7c5cff").map(t=>t/255))),o.uniform1f(d("u_speed"),Number(i.speed)||1),o.uniform1f(d("u_scale"),Number(i.scale)||3);const f=d("u_res"),p=d("u_t"),b=d("u_ptr");let m=[.5,.5],g=Math.min(1,Math.max(.3,Number(i.quality)||.75)),x=0,v=!0,y=0,w=0;const _=performance.now(),M=()=>{const e=t.getBoundingClientRect(),s=Math.min(2,devicePixelRatio||1)*g;n.width=Math.max(1,Math.round(e.width*s)),n.height=Math.max(1,Math.round(e.height*s)),o.viewport(0,0,n.width,n.height),o.uniform2f(f,n.width,n.height)},k=t=>{o.uniform1f(p,t),o.uniform2f(b,m[0],m[1]),o.drawArrays(o.TRIANGLES,0,3)},A=t=>{x=0,w&&t-w>34&&++y>24&&g>.3&&(g=Math.max(.3,g-.15),y=0,M()),w=t,k((t-_)/1e3),v&&!document.hidden&&(x=requestAnimationFrame(A))},S=()=>{x||e.reduced||(x=requestAnimationFrame(A))};M(),k(e.reduced?7:0);const E=e=>{const s=t.getBoundingClientRect();m=[(e.clientX-s.left)/Math.max(1,s.width),1-(e.clientY-s.top)/Math.max(1,s.height)]};t.addEventListener("pointermove",E);const C="function"==typeof IntersectionObserver?new IntersectionObserver(t=>(v=t.some(t=>t.isIntersecting))&&S()):null;C?.observe(t);const $="function"==typeof ResizeObserver?new ResizeObserver(()=>(M(),e.reduced&&k(7))):null;$?.observe(t);const T=()=>!document.hidden&&v&&S();document.addEventListener("visibilitychange",T);let L=null;const R=t=>{t.preventDefault(),I(),L=a()};n.addEventListener("webglcontextlost",R);const I=()=>{cancelAnimationFrame(x),x=0,C?.disconnect(),$?.disconnect(),t.removeEventListener("pointermove",E),document.removeEventListener("visibilitychange",T),n.removeEventListener("webglcontextlost",R),n.remove();for(const[e,s]of l)t.style[e]=s};return S(),()=>{if(L)return L();I(),o.getExtension("WEBGL_lose_context")?.loseContext(),delete t.dataset.usaBackend}}function Z(t,e=8){return{init:(t,s)=>{const i=document.createElement("canvas");i.width=Math.max(2,Math.ceil(t/e)),i.height=Math.max(2,Math.ceil(s/e));const a=i.getContext("2d");return{c:i,x:a,img:a?.createImageData(i.width,i.height)}},draw:({ctx:e,w:s,h:i,t:a,state:n,o:o})=>{const{c:r,x:l,img:c}=n;if(!l||!c)return;const u=c.data;for(let e=0;e<r.height;e++)for(let s=0;s<r.width;s++){const[i,n,l]=t(s/r.width,1-e/r.height,a*(Number(o.speed)||1),o),c=4*(e*r.width+s);u[c]=i,u[c+1]=n,u[c+2]=l,u[c+3]=255}l.putImageData(c,0,0),e.imageSmoothingEnabled=!0,e.drawImage(r,0,0,s,i)}}}const J=(t,e,s)=>{const i=Math.min(1,Math.max(0,s));return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i,t[2]+(e[2]-t[2])*i]},Q=(t,e,s)=>{const i=Math.min(1,Math.max(0,(s-t)/(e-t)));return i*i*(3-2*i)},tt=(t,e,s=0)=>.5+.35*B(t,e,s)+.15*B(2.1*t+3,2.1*e-1,1.3*s),et=(t,e,s,i,a={})=>({name:t,kind:"background",description:e,reduced:"run",defaults:{colors:s,speed:1,scale:3,quality:.75,backend:"auto",...a},run:(t,e,s)=>{const a=K(t,s,i,e);return s.onCleanup(a),a}}),st=t=>t.colors.map(G),it=[et("fluid","Domain-warped fluid colors that swirl around the pointer (WebGL2, Canvas 2D fallback).",["#1b1446","#7c5cff","#22d3ee"],{body:"vec2 q=vec2(fbm(p+t*.1),fbm(p+vec2(5.2,1.3)-t*.08));vec2 d=uv-u_ptr;q+=.5*exp(-dot(d,d)*14.)*vec2(sin(t*1.3),cos(t*1.1));float f=fbm(p+3.*q+t*.05);vec3 c=mix(u_c0,u_c1,clamp(f*1.7-.2,0.,1.));c=mix(c,u_c2,clamp(length(q)*1.1-.45,0.,1.));o=vec4(c,1.);",fallback:Z((t,e,s,i)=>{const[a,n,o]=st(i),r=tt(3*t+.1*s,3*e),l=tt(3*t+2*r,3*e+2*r,.3*s);return J(J(a,n,1.7*l-.2),o,1.1*r-.45)})}),et("smoke","Soft smoke rising and curling (WebGL2, Canvas 2D fallback).",["#0f172a","#cbd5e1","#64748b"],{body:"vec2 s=p;s.y-=t*.25;float f=fbm(s+fbm(s*1.5+t*.1));float a=smoothstep(.38,.92,f)*(1.05-uv.y*.55);o=vec4(mix(u_c0,mix(u_c2,u_c1,f),a),1.);",fallback:Z((t,e,s,i)=>{const[a,n,o]=st(i),r=tt(3*t,3*e-.25*s,.2*s);return J(a,J(o,n,r),Q(.38,.92,r)*(1.05-.55*e))})}),et("fire","Licking flames from the bottom edge (WebGL2, Canvas 2D fallback).",["#140404","#e2401b","#fbbf24"],{body:"vec2 s=p*vec2(1.,1.4);s.y-=t*.9;float f=fbm(s*1.6+fbm(s*2.+t*.3));float g=f*(1.3-uv.y)*1.7-.3;vec3 c=mix(u_c0,u_c1,smoothstep(0.,.4,g));c=mix(c,u_c2,smoothstep(.35,.72,g));c=mix(c,vec3(1.,.96,.82),smoothstep(.72,1.05,g));o=vec4(c,1.);",fallback:Z((t,e,s,i)=>{const[a,n,o]=st(i),r=tt(4*t,5*e-.9*s,s)*(1.3-e)*1.7-.3;return J(J(J(a,n,Q(0,.4,r)),o,Q(.35,.72,r)),[255,245,210],Q(.72,1.05,r))},6)}),et("ink","Ink blooming and drifting in water on a paper background (WebGL2, Canvas 2D fallback).",["#f6f1e7","#1e1b4b","#be185d"],{body:"vec2 q=vec2(fbm(p*.8+t*.04),fbm(p*.8+vec2(3.1,7.7)+t*.05));float f=fbm(p*1.2+2.5*q);float b=smoothstep(.48,.74,f+.12*sin(t*.4));o=vec4(mix(u_c0,mix(u_c1,u_c2,clamp(q.x*1.4-.2,0.,1.)),b),1.);",fallback:Z((t,e,s,i)=>{const[a,n,o]=st(i),r=tt(2*t+.04*s,2*e),l=tt(3*t+2.5*r,3*e+2.5*r,.1*s);return J(a,J(n,o,1.4*r-.2),Q(.48,.74,l))})},{scale:2.4}),et("fireflies","Glowing fireflies wandering and blinking at dusk (WebGL2, Canvas 2D fallback).",["#06121f","#facc15","#a3e635"],{body:"vec3 c=u_c0*(.55+.45*uv.y);float ar=u_res.x/u_res.y;for(int i=0;i<28;i++){float fi=float(i);vec2 b=vec2(h(vec2(fi,1.)),h(vec2(fi,2.)));vec2 pos=fract(b+.07*vec2(sin(t*.3+fi),cos(t*.23+fi*1.7)));vec2 d=(uv-pos)*vec2(ar,1.);float k=.5+.5*sin(t*(1.+h(vec2(fi,3.))*2.)+fi*2.1);c+=mix(u_c1,u_c2,h(vec2(fi,4.)))*k*.00055/(dot(d,d)+.0003);}o=vec4(min(c,vec3(1.)),1.);",fallback:{init:(t,e)=>({f:Array.from({length:28},()=>[Math.random(),Math.random(),6*Math.random(),Math.random()])}),draw:({ctx:t,w:e,h:s,t:i,state:a,o:n})=>{t.fillStyle=n.colors[0],t.fillRect(0,0,e,s);for(const[o,r,l,c]of a.f){const a=(o+.07*Math.sin(.3*i+l))%1*e,u=(r+.07*Math.cos(.23*i+l))%1*s,d=.5+.5*Math.sin(2*i+3*l),h=t.createRadialGradient(a,u,0,a,u,14);h.addColorStop(0,c>.5?n.colors[1]:n.colors[2]),h.addColorStop(1,"transparent"),t.globalAlpha=.25+.75*d,t.fillStyle=h,t.fillRect(a-14,u-14,28,28)}t.globalAlpha=1}}})],at=t=>({init:(t,e,s)=>({f:Array.from({length:s.count},()=>({x:Math.random()*t,y:Math.random()*e,r:X(5,11)*(s.size||1),a:X(0,6.3),va:X(-1.5,1.5),vy:X(18,46),ph:X(0,6.3),c:s.colors[Math.floor(Math.random()*s.colors.length)]})),last:0}),draw:({ctx:e,w:s,h:i,t:a,state:n,o:o,quality:r})=>{const l=n.last?Math.min(.05,a-n.last):0;n.last=a,e.clearRect(0,0,s,i);const c=Math.max(4,Math.round(n.f.length*r));for(let r=0;r<c;r++){const c=n.f[r];c.y+=c.vy*l*o.speed,c.x+=(22*Math.sin(1.2*a+c.ph)+(o.wind||0))*l*o.speed,c.a+=c.va*l*o.speed,c.y>i+16&&(c.y=-16,c.x=Math.random()*s),c.x>s+16&&(c.x=-16),c.x<-16&&(c.x=s+16),e.save(),e.translate(c.x,c.y),e.rotate(c.a),e.scale(1,.55+.45*Math.abs(Math.cos(1.7*a+c.ph))),e.fillStyle=c.c,t(e,c),e.restore()}}}),nt=(t,e,s,i)=>({name:t,kind:"background",description:e,reduced:"run",defaults:{speed:1,quality:1,...s},run:(t,e,s)=>{const a=W(t,s,i,e);return s.onCleanup(a),a}});function ot(){!function(t){for(const e of t)D.has(e.name)||O(e)}(it)}it.push(nt("sakura","Cherry-blossom petals drifting down, swaying and flipping (Canvas 2D).",{count:46,colors:["#ffc8dd","#ffafcc","#fde2e4","#f9a8d4"],wind:14},at((t,e)=>{t.beginPath(),t.moveTo(0,-e.r),t.bezierCurveTo(e.r,-e.r,.9*e.r,.6*e.r,0,e.r),t.bezierCurveTo(.9*-e.r,.6*e.r,-e.r,-e.r,0,.55*-e.r),t.fill()})),nt("leaves","Autumn leaves tumbling down in the wind (Canvas 2D).",{count:30,size:1.4,colors:["#ea580c","#d97706","#b45309","#dc2626","#ca8a04"],wind:26},at((t,e)=>{t.beginPath(),t.moveTo(0,-e.r),t.quadraticCurveTo(.9*e.r,.2*-e.r,0,e.r),t.quadraticCurveTo(.9*-e.r,.2*-e.r,0,-e.r),t.fill(),t.strokeStyle="rgba(0,0,0,.25)",t.lineWidth=1,t.beginPath(),t.moveTo(0,.8*-e.r),t.lineTo(0,1.25*e.r),t.stroke()}))),it.push({name:"splash",kind:"click",description:"A water splash from the pointer: a ring plus droplets that arc out and fall with gravity.",defaults:{color:"#38bdf8",count:14},run:(t,e,s)=>{const{x:i,y:a}=function(t,e){const s=e.event,i=t.getBoundingClientRect();return s&&"number"==typeof s.clientX&&(s.clientX||s.clientY)?{x:s.clientX,y:s.clientY}:{x:i.left+i.width/2,y:i.top+i.height/2}}(t,s);if(s.reduced)return F(i-12,a-12,`width:24px;height:24px;border-radius:50%;background:${e.color};opacity:.5`,s,[{opacity:.5},{opacity:0}],{duration:300});const n=[F(i-30,a-30,`width:60px;height:60px;border-radius:50%;border:3px solid ${e.color}`,s,[{transform:"scale(.2)",opacity:1},{transform:"scale(1.6)",opacity:0}],{duration:520,easing:"cubic-bezier(.2,.8,.3,1)"})];for(let t=0;t<e.count;t++){const t=-Math.PI/2+X(-1.15,1.15),o=X(50,110),r=Math.cos(t)*o,l=X(4,9),c=Math.sin(t)*o;n.push(F(i-l/2,a-l/2,`width:${l}px;height:${1.25*l}px;border-radius:50% 50% 50% 50%/60% 60% 40% 40%;background:${e.color}`,s,[{transform:"translate(0,0) scale(1)",opacity:1},{transform:`translate(${.6*r}px,${c}px) scale(1)`,opacity:1,offset:.45,easing:"cubic-bezier(.3,0,.7,1)"},{transform:`translate(${r}px,${c+90}px) scale(.6)`,opacity:0}],{duration:X(650,900),easing:"cubic-bezier(.15,.6,.4,1)"}))}return(t=>Promise.all(t.filter(Boolean).map(t=>t.finished.catch(()=>{}))))(n)}});const rt={gpu:it};function lt(){ot()}R(),lt(),t.CAROUSEL_EFFECTS=x,t.FX2_PACKS=rt,t.GLSL_HEAD=U,t.GPU_FX=it,t.TAB_INDICATORS=y,t.WIDGETS=T,t.WIDGET_TAGS=L,t.defineCarousel=v,t.defineDisclosure=C,t.defineStories=$,t.defineTabBar=w,t.defineWidgets=R,t.fieldFallback=Z,t.registerFx2=lt,t.registerGpuEffects=ot,t.shaderBackground=K,t.supportsWebGL2=V});
2
+ //# sourceMappingURL=widgets.umd.js.map