@shepai/cli 1.65.1 → 1.66.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 (326) hide show
  1. package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts +1 -1
  2. package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts.map +1 -1
  3. package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.d.ts +62 -0
  4. package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.d.ts.map +1 -0
  5. package/dist/packages/core/src/application/ports/output/services/deployment-service.interface.js +12 -0
  6. package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -0
  7. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  8. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
  9. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +4 -1
  10. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  11. package/dist/packages/core/src/infrastructure/di/container.js +3 -0
  12. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
  13. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +25 -0
  14. package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts +1 -1
  15. package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts.map +1 -1
  16. package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.js +5 -2
  17. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
  18. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +6 -2
  19. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.d.ts.map +1 -1
  20. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.js +11 -7
  21. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.d.ts.map +1 -1
  22. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.js +11 -7
  23. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.d.ts.map +1 -1
  24. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.js +11 -7
  25. package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts +57 -0
  26. package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts.map +1 -0
  27. package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.js +192 -0
  28. package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.d.ts +26 -0
  29. package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.d.ts.map +1 -0
  30. package/dist/packages/core/src/infrastructure/services/deployment/detect-dev-script.js +59 -0
  31. package/dist/packages/core/src/infrastructure/services/deployment/parse-port.d.ts +15 -0
  32. package/dist/packages/core/src/infrastructure/services/deployment/parse-port.d.ts.map +1 -0
  33. package/dist/packages/core/src/infrastructure/services/deployment/parse-port.js +52 -0
  34. package/dist/src/presentation/cli/commands/_serve.command.d.ts.map +1 -1
  35. package/dist/src/presentation/cli/commands/_serve.command.js +2 -0
  36. package/dist/src/presentation/web/app/actions/deploy-feature.d.ts +7 -0
  37. package/dist/src/presentation/web/app/actions/deploy-feature.d.ts.map +1 -0
  38. package/dist/src/presentation/web/app/actions/deploy-feature.js +28 -0
  39. package/dist/src/presentation/web/app/actions/deploy-repository.d.ts +7 -0
  40. package/dist/src/presentation/web/app/actions/deploy-repository.d.ts.map +1 -0
  41. package/dist/src/presentation/web/app/actions/deploy-repository.js +21 -0
  42. package/dist/src/presentation/web/app/actions/get-deployment-status.d.ts +3 -0
  43. package/dist/src/presentation/web/app/actions/get-deployment-status.d.ts.map +1 -0
  44. package/dist/src/presentation/web/app/actions/get-deployment-status.js +9 -0
  45. package/dist/src/presentation/web/app/actions/stop-deployment.d.ts +5 -0
  46. package/dist/src/presentation/web/app/actions/stop-deployment.d.ts.map +1 -0
  47. package/dist/src/presentation/web/app/actions/stop-deployment.js +16 -0
  48. package/dist/src/presentation/web/app/build-graph-nodes.d.ts +20 -0
  49. package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -0
  50. package/dist/src/presentation/web/app/build-graph-nodes.js +142 -0
  51. package/dist/src/presentation/web/app/page.d.ts.map +1 -1
  52. package/dist/src/presentation/web/app/page.js +2 -112
  53. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts +3 -1
  54. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.d.ts.map +1 -1
  55. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +13 -3
  56. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.d.ts +2 -0
  57. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.d.ts.map +1 -1
  58. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.stories.js +9 -0
  59. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.d.ts +7 -0
  60. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.d.ts.map +1 -0
  61. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.js +14 -0
  62. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.d.ts +14 -0
  63. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.d.ts.map +1 -0
  64. package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.js +27 -0
  65. package/dist/src/presentation/web/components/common/deployment-status-badge/index.d.ts +2 -0
  66. package/dist/src/presentation/web/components/common/deployment-status-badge/index.d.ts.map +1 -0
  67. package/dist/src/presentation/web/components/common/deployment-status-badge/index.js +1 -0
  68. package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.d.ts.map +1 -1
  69. package/dist/src/presentation/web/components/common/feature-drawer/feature-drawer.js +8 -1
  70. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.d.ts.map +1 -1
  71. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.js +7 -1
  72. package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
  73. package/dist/src/presentation/web/components/common/repository-node/repository-node.js +13 -2
  74. package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.d.ts.map +1 -1
  75. package/dist/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.js +12 -2
  76. package/dist/src/presentation/web/hooks/use-deploy-action.d.ts +18 -0
  77. package/dist/src/presentation/web/hooks/use-deploy-action.d.ts.map +1 -0
  78. package/dist/src/presentation/web/hooks/use-deploy-action.js +130 -0
  79. package/dist/src/presentation/web/lib/feature-flags.d.ts +1 -0
  80. package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
  81. package/dist/src/presentation/web/lib/feature-flags.js +1 -0
  82. package/dist/tsconfig.build.tsbuildinfo +1 -1
  83. package/package.json +1 -1
  84. package/web/.next/BUILD_ID +1 -1
  85. package/web/.next/build-manifest.json +7 -6
  86. package/web/.next/cache/.previewinfo +1 -1
  87. package/web/.next/cache/.rscinfo +1 -1
  88. package/web/.next/cache/.tsbuildinfo +1 -1
  89. package/web/.next/cache/config.json +3 -3
  90. package/web/.next/fallback-build-manifest.json +2 -2
  91. package/web/.next/prerender-manifest.json +3 -3
  92. package/web/.next/required-server-files.js +1 -1
  93. package/web/.next/required-server-files.json +1 -1
  94. package/web/.next/server/app/_global-error/page/build-manifest.json +5 -4
  95. package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  96. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  97. package/web/.next/server/app/_global-error.html +2 -2
  98. package/web/.next/server/app/_global-error.rsc +1 -1
  99. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  100. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  101. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  102. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  103. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  104. package/web/.next/server/app/_not-found/page/build-manifest.json +5 -4
  105. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  106. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  107. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  108. package/web/.next/server/app/api/tools/[id]/install/route.js +1 -1
  109. package/web/.next/server/app/api/tools/[id]/install/route.js.nft.json +1 -1
  110. package/web/.next/server/app/page/build-manifest.json +5 -4
  111. package/web/.next/server/app/page/server-reference-manifest.json +88 -28
  112. package/web/.next/server/app/page.js +2 -2
  113. package/web/.next/server/app/page.js.nft.json +1 -1
  114. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  115. package/web/.next/server/app/skills/page/build-manifest.json +5 -4
  116. package/web/.next/server/app/skills/page/server-reference-manifest.json +62 -2
  117. package/web/.next/server/app/skills/page.js +2 -2
  118. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  119. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  120. package/web/.next/server/app/tools/page/build-manifest.json +5 -4
  121. package/web/.next/server/app/tools/page/server-reference-manifest.json +1 -1
  122. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  123. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  124. package/web/.next/server/app/version/page/build-manifest.json +5 -4
  125. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  126. package/web/.next/server/app/version/page.js +1 -1
  127. package/web/.next/server/app/version/page.js.nft.json +1 -1
  128. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  129. package/web/.next/server/chunks/{[root-of-the-server]__e926de65._.js → [root-of-the-server]__09413611._.js} +2 -2
  130. package/web/.next/server/chunks/{[root-of-the-server]__e926de65._.js.map → [root-of-the-server]__09413611._.js.map} +1 -1
  131. package/web/.next/server/chunks/ssr/403f9_next_dist_623b646a._.js +3 -0
  132. package/web/.next/server/chunks/ssr/403f9_next_dist_623b646a._.js.map +1 -0
  133. package/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js +1 -1
  134. package/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js.map +1 -1
  135. package/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js → [root-of-the-server]__248ee887._.js} +2 -2
  136. package/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js.map → [root-of-the-server]__248ee887._.js.map} +1 -1
  137. package/web/.next/{standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__fbc89707._.js → server/chunks/ssr/[root-of-the-server]__249c74f6._.js} +2 -2
  138. package/web/.next/server/chunks/ssr/[root-of-the-server]__551fb7e1._.js +4 -0
  139. package/web/.next/server/chunks/ssr/[root-of-the-server]__551fb7e1._.js.map +1 -0
  140. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  141. package/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js.map +1 -1
  142. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb51fac._.js +3 -0
  143. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bb51fac._.js.map +1 -0
  144. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  145. package/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js.map +1 -1
  146. package/web/.next/server/chunks/ssr/[root-of-the-server]__9add7c3a._.js +4 -4
  147. package/web/.next/server/chunks/ssr/[root-of-the-server]__9add7c3a._.js.map +1 -1
  148. package/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0f2a8._.js +3 -0
  149. package/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0f2a8._.js.map +1 -0
  150. package/web/.next/{standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__dd5b62cb._.js → server/chunks/ssr/[root-of-the-server]__f5830fa9._.js} +2 -2
  151. package/web/.next/server/chunks/ssr/[root-of-the-server]__f5830fa9._.js.map +1 -0
  152. package/web/.next/server/chunks/ssr/[root-of-the-server]__f648005b._.js +9 -0
  153. package/web/.next/server/chunks/ssr/[root-of-the-server]__f648005b._.js.map +1 -0
  154. package/web/.next/server/chunks/ssr/_28993370._.js +3 -0
  155. package/web/.next/server/chunks/ssr/_28993370._.js.map +1 -0
  156. package/web/.next/server/chunks/ssr/_380c6567._.js +1 -1
  157. package/web/.next/server/chunks/ssr/_380c6567._.js.map +1 -1
  158. package/web/.next/server/chunks/ssr/_45715073._.js +3 -0
  159. package/web/.next/server/chunks/ssr/{_d81184e2._.js.map → _45715073._.js.map} +1 -1
  160. package/web/.next/server/chunks/ssr/_6978d868._.js +3 -0
  161. package/web/.next/server/chunks/ssr/_6978d868._.js.map +1 -0
  162. package/web/.next/server/chunks/ssr/_85965278._.js +6 -0
  163. package/web/.next/server/chunks/ssr/_85965278._.js.map +1 -0
  164. package/web/.next/server/chunks/ssr/_c52cace8._.js +3 -0
  165. package/web/.next/server/chunks/ssr/_c52cace8._.js.map +1 -0
  166. package/web/.next/server/chunks/ssr/_ed9132c9._.js +3 -0
  167. package/web/.next/server/chunks/ssr/_ed9132c9._.js.map +1 -0
  168. package/web/.next/server/chunks/ssr/{node_modules__pnpm_87f920e7._.js → node_modules__pnpm_febcbea6._.js} +2 -2
  169. package/web/.next/server/chunks/ssr/node_modules__pnpm_febcbea6._.js.map +1 -0
  170. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  171. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +1 -1
  173. package/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js.map +1 -1
  174. package/web/.next/server/middleware-build-manifest.js +5 -4
  175. package/web/.next/server/pages/500.html +2 -2
  176. package/web/.next/server/server-reference-manifest.js +1 -1
  177. package/web/.next/server/server-reference-manifest.json +118 -30
  178. package/web/.next/standalone/src/presentation/web/.next/BUILD_ID +1 -1
  179. package/web/.next/standalone/src/presentation/web/.next/build-manifest.json +7 -6
  180. package/web/.next/standalone/src/presentation/web/.next/prerender-manifest.json +3 -3
  181. package/web/.next/standalone/src/presentation/web/.next/required-server-files.json +1 -1
  182. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page/build-manifest.json +5 -4
  183. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  184. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  185. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.html +2 -2
  186. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.rsc +1 -1
  187. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  188. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  189. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  190. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  191. package/web/.next/standalone/src/presentation/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  192. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page/build-manifest.json +5 -4
  193. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  194. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  195. package/web/.next/standalone/src/presentation/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  196. package/web/.next/standalone/src/presentation/web/.next/server/app/api/tools/[id]/install/route.js +1 -1
  197. package/web/.next/standalone/src/presentation/web/.next/server/app/api/tools/[id]/install/route.js.nft.json +1 -1
  198. package/web/.next/standalone/src/presentation/web/.next/server/app/page/build-manifest.json +5 -4
  199. package/web/.next/standalone/src/presentation/web/.next/server/app/page/server-reference-manifest.json +88 -28
  200. package/web/.next/standalone/src/presentation/web/.next/server/app/page.js +2 -2
  201. package/web/.next/standalone/src/presentation/web/.next/server/app/page.js.nft.json +1 -1
  202. package/web/.next/standalone/src/presentation/web/.next/server/app/page_client-reference-manifest.js +1 -1
  203. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page/build-manifest.json +5 -4
  204. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page/server-reference-manifest.json +62 -2
  205. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page.js +2 -2
  206. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page.js.nft.json +1 -1
  207. package/web/.next/standalone/src/presentation/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  208. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page/build-manifest.json +5 -4
  209. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page/server-reference-manifest.json +1 -1
  210. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page.js.nft.json +1 -1
  211. package/web/.next/standalone/src/presentation/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  212. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page/build-manifest.json +5 -4
  213. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  214. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page.js +1 -1
  215. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page.js.nft.json +1 -1
  216. package/web/.next/standalone/src/presentation/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  217. package/web/.next/standalone/src/presentation/web/.next/server/chunks/{[root-of-the-server]__e926de65._.js → [root-of-the-server]__09413611._.js} +2 -2
  218. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/403f9_next_dist_623b646a._.js +3 -0
  219. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__08ba9bd3._.js +1 -1
  220. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/{[root-of-the-server]__685eaa45._.js → [root-of-the-server]__248ee887._.js} +2 -2
  221. package/web/.next/{server/chunks/ssr/[root-of-the-server]__fbc89707._.js → standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__249c74f6._.js} +2 -2
  222. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__551fb7e1._.js +4 -0
  223. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6b17a22d._.js +1 -1
  224. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__6bb51fac._.js +3 -0
  225. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__804c006d._.js +1 -1
  226. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__9add7c3a._.js +4 -4
  227. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0f2a8._.js +3 -0
  228. package/web/.next/{server/chunks/ssr/[root-of-the-server]__dd5b62cb._.js → standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__f5830fa9._.js} +2 -2
  229. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__f648005b._.js +9 -0
  230. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_28993370._.js +3 -0
  231. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_380c6567._.js +1 -1
  232. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_45715073._.js +3 -0
  233. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_6978d868._.js +3 -0
  234. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_85965278._.js +6 -0
  235. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_c52cace8._.js +3 -0
  236. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_ed9132c9._.js +3 -0
  237. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/{node_modules__pnpm_87f920e7._.js → node_modules__pnpm_febcbea6._.js} +2 -2
  238. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  239. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_ed0934e5._.js +1 -1
  240. package/web/.next/standalone/src/presentation/web/.next/server/middleware-build-manifest.js +5 -4
  241. package/web/.next/standalone/src/presentation/web/.next/server/pages/500.html +2 -2
  242. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.js +1 -1
  243. package/web/.next/standalone/src/presentation/web/.next/server/server-reference-manifest.json +118 -30
  244. package/web/.next/standalone/src/presentation/web/app/actions/deploy-feature.ts +39 -0
  245. package/web/.next/standalone/src/presentation/web/app/actions/deploy-repository.ts +28 -0
  246. package/web/.next/standalone/src/presentation/web/app/actions/get-deployment-status.ts +16 -0
  247. package/web/.next/standalone/src/presentation/web/app/actions/stop-deployment.ts +22 -0
  248. package/web/.next/standalone/src/presentation/web/app/build-graph-nodes.ts +180 -0
  249. package/web/.next/standalone/src/presentation/web/app/page.tsx +2 -129
  250. package/web/.next/standalone/src/presentation/web/components/common/base-drawer/base-drawer.stories.tsx +26 -0
  251. package/web/.next/standalone/src/presentation/web/components/common/base-drawer/base-drawer.tsx +45 -1
  252. package/web/.next/standalone/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.stories.tsx +35 -0
  253. package/web/.next/standalone/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.tsx +42 -0
  254. package/web/.next/standalone/src/presentation/web/components/common/deployment-status-badge/index.ts +1 -0
  255. package/web/.next/standalone/src/presentation/web/components/common/feature-drawer/feature-drawer.tsx +10 -0
  256. package/web/.next/standalone/src/presentation/web/components/common/repository-node/repository-drawer.tsx +9 -0
  257. package/web/.next/standalone/src/presentation/web/components/common/repository-node/repository-node.tsx +43 -2
  258. package/web/.next/standalone/src/presentation/web/components/common/review-drawer-shell/review-drawer-shell.tsx +79 -44
  259. package/web/.next/standalone/src/presentation/web/hooks/use-deploy-action.ts +161 -0
  260. package/web/.next/standalone/src/presentation/web/lib/feature-flags.ts +1 -0
  261. package/web/.next/standalone/src/presentation/web/server.js +1 -1
  262. package/web/.next/static/chunks/0b99eb9664d47ca7.js +1 -0
  263. package/web/.next/static/chunks/177f1dcbe83c136a.js +1 -0
  264. package/web/.next/static/chunks/41a2adc09edfffaf.js +1 -0
  265. package/web/.next/static/chunks/5054c72b1c8f5912.js +1 -0
  266. package/web/.next/static/chunks/71d2618e41d7da6d.js +1 -0
  267. package/web/.next/static/chunks/7ad36bef63f15bc6.js +1 -0
  268. package/web/.next/static/chunks/{3b941e59ac013e12.js → 87421ab1062a39b7.js} +2 -2
  269. package/web/.next/static/chunks/{21541b346dd4dd28.js → 8c60d1bd87239066.js} +1 -1
  270. package/web/.next/static/chunks/96f49affaceab206.css +2 -0
  271. package/web/.next/static/chunks/a6d1d774260fc927.js +2 -0
  272. package/web/.next/static/chunks/c7e793951b20a67f.js +1 -0
  273. package/web/.next/static/chunks/f54ff9c15fb7b383.js +1 -0
  274. package/web/.next/static/chunks/f5fb2f182ae9b015.js +1 -0
  275. package/web/.next/static/chunks/{15f4f62844c3ea0e.js → f6766e799a69fb5d.js} +7 -7
  276. package/web/.next/static/chunks/turbopack-b6b5b4f015327a9a.js +4 -0
  277. package/web/.next/trace +1 -1
  278. package/web/.next/trace-build +1 -1
  279. package/web/.next/server/chunks/ssr/[root-of-the-server]__5e0f14e9._.js +0 -3
  280. package/web/.next/server/chunks/ssr/[root-of-the-server]__5e0f14e9._.js.map +0 -1
  281. package/web/.next/server/chunks/ssr/[root-of-the-server]__ae251147._.js +0 -3
  282. package/web/.next/server/chunks/ssr/[root-of-the-server]__ae251147._.js.map +0 -1
  283. package/web/.next/server/chunks/ssr/[root-of-the-server]__b6839c3f._.js +0 -9
  284. package/web/.next/server/chunks/ssr/[root-of-the-server]__b6839c3f._.js.map +0 -1
  285. package/web/.next/server/chunks/ssr/[root-of-the-server]__da0ade1f._.js +0 -4
  286. package/web/.next/server/chunks/ssr/[root-of-the-server]__da0ade1f._.js.map +0 -1
  287. package/web/.next/server/chunks/ssr/[root-of-the-server]__dd5b62cb._.js.map +0 -1
  288. package/web/.next/server/chunks/ssr/[root-of-the-server]__edca9510._.js +0 -3
  289. package/web/.next/server/chunks/ssr/[root-of-the-server]__edca9510._.js.map +0 -1
  290. package/web/.next/server/chunks/ssr/_73d14b70._.js +0 -3
  291. package/web/.next/server/chunks/ssr/_73d14b70._.js.map +0 -1
  292. package/web/.next/server/chunks/ssr/_7f386377._.js +0 -3
  293. package/web/.next/server/chunks/ssr/_7f386377._.js.map +0 -1
  294. package/web/.next/server/chunks/ssr/_d3711354._.js +0 -6
  295. package/web/.next/server/chunks/ssr/_d3711354._.js.map +0 -1
  296. package/web/.next/server/chunks/ssr/_d81184e2._.js +0 -3
  297. package/web/.next/server/chunks/ssr/node_modules__pnpm_0ce0b44d._.js +0 -3
  298. package/web/.next/server/chunks/ssr/node_modules__pnpm_0ce0b44d._.js.map +0 -1
  299. package/web/.next/server/chunks/ssr/node_modules__pnpm_87f920e7._.js.map +0 -1
  300. package/web/.next/server/chunks/ssr/src_presentation_web_components_7a0b09da._.js +0 -3
  301. package/web/.next/server/chunks/ssr/src_presentation_web_components_7a0b09da._.js.map +0 -1
  302. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__5e0f14e9._.js +0 -3
  303. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__ae251147._.js +0 -3
  304. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__b6839c3f._.js +0 -9
  305. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__da0ade1f._.js +0 -4
  306. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/[root-of-the-server]__edca9510._.js +0 -3
  307. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_73d14b70._.js +0 -3
  308. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_7f386377._.js +0 -3
  309. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_d3711354._.js +0 -6
  310. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/_d81184e2._.js +0 -3
  311. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/node_modules__pnpm_0ce0b44d._.js +0 -3
  312. package/web/.next/standalone/src/presentation/web/.next/server/chunks/ssr/src_presentation_web_components_7a0b09da._.js +0 -3
  313. package/web/.next/static/chunks/0c6654ec27f11c7e.js +0 -1
  314. package/web/.next/static/chunks/12c70bfd5951cf9b.js +0 -1
  315. package/web/.next/static/chunks/1887af4ad3781531.js +0 -2
  316. package/web/.next/static/chunks/78919481e7c5ad4f.js +0 -1
  317. package/web/.next/static/chunks/a5b6a22de303e877.css +0 -2
  318. package/web/.next/static/chunks/aa33d2874dacee4a.js +0 -1
  319. package/web/.next/static/chunks/acdb8af5a21f1ae9.js +0 -1
  320. package/web/.next/static/chunks/af7a5bcb7c49e46e.js +0 -1
  321. package/web/.next/static/chunks/be784143669bb992.js +0 -1
  322. package/web/.next/static/chunks/turbopack-eb24b869babb34b4.js +0 -4
  323. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__fbc89707._.js.map → [root-of-the-server]__249c74f6._.js.map} +0 -0
  324. /package/web/.next/static/{7tTtII__gsa2CGwarYgOr → 5RMUwLfTnzL0pvJOwfuxg}/_buildManifest.js +0 -0
  325. /package/web/.next/static/{7tTtII__gsa2CGwarYgOr → 5RMUwLfTnzL0pvJOwfuxg}/_clientMiddlewareManifest.json +0 -0
  326. /package/web/.next/static/{7tTtII__gsa2CGwarYgOr → 5RMUwLfTnzL0pvJOwfuxg}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/hooks/use-notifications.ts","../../../../../../../node_modules/.pnpm/%40radix-ui%2Bnumber%401.1.1/node_modules/%40radix-ui/number/dist/index.mjs","../../../../../../../src/presentation/web/components/layouts/app-shell/app-shell.tsx","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-scroll-area%401.2.10_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types_ba0b3d60c668755d5c2d6349c8477ebb/node_modules/%40radix-ui/react-scroll-area/dist/index.mjs","../../../../../../../src/presentation/web/components/ui/scroll-area.tsx","../../../../../../../src/presentation/web/hooks/use-deferred-mount.ts","../../../../../../../src/presentation/web/lib/feature-flags.ts","../../../../../../../src/presentation/web/components/layouts/app-sidebar/app-sidebar.tsx","../../../../../../../src/presentation/web/components/common/sound-toggle/sound-toggle.tsx","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/volume-off.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/house.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/volume-2.ts","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-scroll-area%401.2.10_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types_ba0b3d60c668755d5c2d6349c8477ebb/node_modules/%40radix-ui/react-scroll-area/src/scroll-area.tsx","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-scroll-area%401.2.10_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types_ba0b3d60c668755d5c2d6349c8477ebb/node_modules/%40radix-ui/react-scroll-area/src/use-state-machine.ts","../../../../../../../src/presentation/web/components/ui/sonner.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { toast } from 'sonner';\nimport type { NotificationEvent } from '@shepai/core/domain/generated/output';\nimport { NotificationEventType, NotificationSeverity } from '@shepai/core/domain/generated/output';\nimport { useAgentEventsContext } from './agent-events-provider';\nimport { useSoundAction } from './use-sound-action';\nimport type { SoundAction } from './use-sound-action';\n\nexport interface UseNotificationsResult {\n requestBrowserPermission: () => Promise<void>;\n browserPermissionState: NotificationPermission;\n}\n\nconst SEVERITY_TO_TOAST: Record<NotificationSeverity, 'success' | 'error' | 'warning' | 'info'> = {\n [NotificationSeverity.Success]: 'success',\n [NotificationSeverity.Error]: 'error',\n [NotificationSeverity.Warning]: 'warning',\n [NotificationSeverity.Info]: 'info',\n};\n\nfunction dispatchToast(event: NotificationEvent): void {\n const method = SEVERITY_TO_TOAST[event.severity] ?? 'info';\n const isActionable = event.eventType === NotificationEventType.WaitingApproval;\n toast[method](event.featureName, {\n description: event.message,\n ...(isActionable && {\n action: {\n label: 'Review',\n onClick: () => {\n window.dispatchEvent(\n new CustomEvent('shep:select-feature', { detail: { featureId: event.featureId } })\n );\n },\n },\n }),\n });\n}\n\nfunction dispatchBrowserNotification(event: NotificationEvent): void {\n if (globalThis.Notification?.permission !== 'granted') {\n return;\n }\n new Notification(`Shep: ${event.featureName}`, {\n body: event.message,\n icon: '/favicon-light.svg',\n });\n}\n\nconst SEVERITY_TO_ACTION: Record<NotificationSeverity, SoundAction> = {\n [NotificationSeverity.Success]: 'notification-success',\n [NotificationSeverity.Error]: 'notification-error',\n [NotificationSeverity.Warning]: 'notification-warning',\n [NotificationSeverity.Info]: 'notification-info',\n};\n\nexport function useNotifications(): UseNotificationsResult {\n const { events } = useAgentEventsContext();\n\n const successSound = useSoundAction('notification-success');\n const errorSound = useSoundAction('notification-error');\n const warningSound = useSoundAction('notification-warning');\n const infoSound = useSoundAction('notification-info');\n\n const soundsByAction = useMemo<Record<string, { play: () => void }>>(\n () => ({\n 'notification-success': successSound,\n 'notification-error': errorSound,\n 'notification-warning': warningSound,\n 'notification-info': infoSound,\n }),\n [successSound, errorSound, warningSound, infoSound]\n );\n\n const [browserPermissionState, setBrowserPermissionState] = useState<NotificationPermission>(\n () => {\n if (typeof globalThis.Notification === 'undefined') return 'default';\n return globalThis.Notification.permission;\n }\n );\n\n // Track how many events from the array we've already processed.\n // Using the array index (instead of lastEvent) prevents React batching\n // from silently dropping events when multiple SSE messages arrive together.\n const processedCountRef = useRef(0);\n\n useEffect(() => {\n if (events.length <= processedCountRef.current) return;\n\n const newEvents = events.slice(processedCountRef.current);\n processedCountRef.current = events.length;\n\n for (const event of newEvents) {\n // Only notify for actionable events and completion celebrations\n if (\n event.severity !== NotificationSeverity.Error &&\n event.severity !== NotificationSeverity.Warning &&\n event.severity !== NotificationSeverity.Success\n ) {\n continue;\n }\n\n dispatchToast(event);\n dispatchBrowserNotification(event);\n\n const actionName = SEVERITY_TO_ACTION[event.severity];\n soundsByAction[actionName]?.play();\n }\n }, [events, soundsByAction]);\n\n const requestBrowserPermission = useCallback(async () => {\n if (typeof globalThis.Notification === 'undefined') return;\n const result = await globalThis.Notification.requestPermission();\n setBrowserPermissionState(result);\n }, []);\n\n return {\n requestBrowserPermission,\n browserPermissionState,\n };\n}\n","// packages/core/number/src/number.ts\nfunction clamp(value, [min, max]) {\n return Math.min(max, Math.max(min, value));\n}\nexport {\n clamp\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport { useCallback, type ReactNode } from 'react';\nimport { SidebarProvider, SidebarInset } from '@/components/ui/sidebar';\nimport { AppSidebar } from '@/components/layouts/app-sidebar';\nimport { AddRepositoryButton } from '@/components/common/add-repository-node';\nimport { ThemeToggle } from '@/components/common/theme-toggle';\nimport { SoundToggle } from '@/components/common/sound-toggle';\nimport { AgentEventsProvider } from '@/hooks/agent-events-provider';\nimport { useNotifications } from '@/hooks/use-notifications';\n\ninterface AppShellProps {\n children: ReactNode;\n}\n\n/** Inner shell that consumes the agent-events context for notifications. */\nfunction AppShellInner({ children }: AppShellProps) {\n // Subscribe to agent lifecycle events and dispatch toast/browser notifications\n useNotifications();\n\n const handleNewFeature = useCallback(() => {\n window.dispatchEvent(new CustomEvent('shep:open-create-drawer'));\n }, []);\n\n const handleRepositorySelect = useCallback((path: string) => {\n window.dispatchEvent(new CustomEvent('shep:add-repository', { detail: { path } }));\n }, []);\n\n return (\n <SidebarProvider>\n <AppSidebar features={[]} onNewFeature={handleNewFeature} />\n <SidebarInset>\n <div className=\"relative h-full\">\n <div className=\"absolute top-3 right-3 z-50 flex gap-1\">\n <AddRepositoryButton onSelect={handleRepositorySelect} />\n <SoundToggle />\n <ThemeToggle />\n </div>\n <main className=\"h-full\">{children}</main>\n </div>\n </SidebarInset>\n </SidebarProvider>\n );\n}\n\nexport function AppShell({ children }: AppShellProps) {\n return (\n <AgentEventsProvider>\n <AppShellInner>{children}</AppShellInner>\n </AgentEventsProvider>\n );\n}\n","\"use client\";\n\n// src/scroll-area.tsx\nimport * as React2 from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { clamp } from \"@radix-ui/number\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\n\n// src/use-state-machine.ts\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/scroll-area.tsx\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar SCROLL_AREA_NAME = \"ScrollArea\";\nvar [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);\nvar [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);\nvar ScrollArea = React2.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeScrollArea,\n type = \"hover\",\n dir,\n scrollHideDelay = 600,\n ...scrollAreaProps\n } = props;\n const [scrollArea, setScrollArea] = React2.useState(null);\n const [viewport, setViewport] = React2.useState(null);\n const [content, setContent] = React2.useState(null);\n const [scrollbarX, setScrollbarX] = React2.useState(null);\n const [scrollbarY, setScrollbarY] = React2.useState(null);\n const [cornerWidth, setCornerWidth] = React2.useState(0);\n const [cornerHeight, setCornerHeight] = React2.useState(0);\n const [scrollbarXEnabled, setScrollbarXEnabled] = React2.useState(false);\n const [scrollbarYEnabled, setScrollbarYEnabled] = React2.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));\n const direction = useDirection(dir);\n return /* @__PURE__ */ jsx(\n ScrollAreaProvider,\n {\n scope: __scopeScrollArea,\n type,\n dir: direction,\n scrollHideDelay,\n scrollArea,\n viewport,\n onViewportChange: setViewport,\n content,\n onContentChange: setContent,\n scrollbarX,\n onScrollbarXChange: setScrollbarX,\n scrollbarXEnabled,\n onScrollbarXEnabledChange: setScrollbarXEnabled,\n scrollbarY,\n onScrollbarYChange: setScrollbarY,\n scrollbarYEnabled,\n onScrollbarYEnabledChange: setScrollbarYEnabled,\n onCornerWidthChange: setCornerWidth,\n onCornerHeightChange: setCornerHeight,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n ...scrollAreaProps,\n ref: composedRefs,\n style: {\n position: \"relative\",\n // Pass corner sizes as CSS vars to reduce re-renders of context consumers\n [\"--radix-scroll-area-corner-width\"]: cornerWidth + \"px\",\n [\"--radix-scroll-area-corner-height\"]: cornerHeight + \"px\",\n ...props.style\n }\n }\n )\n }\n );\n }\n);\nScrollArea.displayName = SCROLL_AREA_NAME;\nvar VIEWPORT_NAME = \"ScrollAreaViewport\";\nvar ScrollAreaViewport = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeScrollArea, children, nonce, ...viewportProps } = props;\n const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);\n const ref = React2.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n \"style\",\n {\n dangerouslySetInnerHTML: {\n __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`\n },\n nonce\n }\n ),\n /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-radix-scroll-area-viewport\": \"\",\n ...viewportProps,\n ref: composedRefs,\n style: {\n /**\n * We don't support `visible` because the intention is to have at least one scrollbar\n * if this component is used and `visible` will behave like `auto` in that case\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description\n *\n * We don't handle `auto` because the intention is for the native implementation\n * to be hidden if using this component. We just want to ensure the node is scrollable\n * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent\n * the browser from having to work out whether to render native scrollbars or not,\n * we tell it to with the intention of hiding them in CSS.\n */\n overflowX: context.scrollbarXEnabled ? \"scroll\" : \"hidden\",\n overflowY: context.scrollbarYEnabled ? \"scroll\" : \"hidden\",\n ...props.style\n },\n children: /* @__PURE__ */ jsx(\"div\", { ref: context.onContentChange, style: { minWidth: \"100%\", display: \"table\" }, children })\n }\n )\n ] });\n }\n);\nScrollAreaViewport.displayName = VIEWPORT_NAME;\nvar SCROLLBAR_NAME = \"ScrollAreaScrollbar\";\nvar ScrollAreaScrollbar = React2.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;\n const isHorizontal = props.orientation === \"horizontal\";\n React2.useEffect(() => {\n isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);\n return () => {\n isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);\n };\n }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);\n return context.type === \"hover\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"scroll\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"auto\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"always\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null;\n }\n);\nScrollAreaScrollbar.displayName = SCROLLBAR_NAME;\nvar ScrollAreaScrollbarHover = React2.forwardRef((props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [visible, setVisible] = React2.useState(false);\n React2.useEffect(() => {\n const scrollArea = context.scrollArea;\n let hideTimer = 0;\n if (scrollArea) {\n const handlePointerEnter = () => {\n window.clearTimeout(hideTimer);\n setVisible(true);\n };\n const handlePointerLeave = () => {\n hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);\n };\n scrollArea.addEventListener(\"pointerenter\", handlePointerEnter);\n scrollArea.addEventListener(\"pointerleave\", handlePointerLeave);\n return () => {\n window.clearTimeout(hideTimer);\n scrollArea.removeEventListener(\"pointerenter\", handlePointerEnter);\n scrollArea.removeEventListener(\"pointerleave\", handlePointerLeave);\n };\n }\n }, [context.scrollArea, context.scrollHideDelay]);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarAuto,\n {\n \"data-state\": visible ? \"visible\" : \"hidden\",\n ...scrollbarProps,\n ref: forwardedRef\n }\n ) });\n});\nvar ScrollAreaScrollbarScroll = React2.forwardRef((props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const isHorizontal = props.orientation === \"horizontal\";\n const debounceScrollEnd = useDebounceCallback(() => send(\"SCROLL_END\"), 100);\n const [state, send] = useStateMachine(\"hidden\", {\n hidden: {\n SCROLL: \"scrolling\"\n },\n scrolling: {\n SCROLL_END: \"idle\",\n POINTER_ENTER: \"interacting\"\n },\n interacting: {\n SCROLL: \"interacting\",\n POINTER_LEAVE: \"idle\"\n },\n idle: {\n HIDE: \"hidden\",\n SCROLL: \"scrolling\",\n POINTER_ENTER: \"interacting\"\n }\n });\n React2.useEffect(() => {\n if (state === \"idle\") {\n const hideTimer = window.setTimeout(() => send(\"HIDE\"), context.scrollHideDelay);\n return () => window.clearTimeout(hideTimer);\n }\n }, [state, context.scrollHideDelay, send]);\n React2.useEffect(() => {\n const viewport = context.viewport;\n const scrollDirection = isHorizontal ? \"scrollLeft\" : \"scrollTop\";\n if (viewport) {\n let prevScrollPos = viewport[scrollDirection];\n const handleScroll = () => {\n const scrollPos = viewport[scrollDirection];\n const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;\n if (hasScrollInDirectionChanged) {\n send(\"SCROLL\");\n debounceScrollEnd();\n }\n prevScrollPos = scrollPos;\n };\n viewport.addEventListener(\"scroll\", handleScroll);\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }\n }, [context.viewport, isHorizontal, send, debounceScrollEnd]);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || state !== \"hidden\", children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarVisible,\n {\n \"data-state\": state === \"hidden\" ? \"hidden\" : \"visible\",\n ...scrollbarProps,\n ref: forwardedRef,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send(\"POINTER_ENTER\")),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send(\"POINTER_LEAVE\"))\n }\n ) });\n});\nvar ScrollAreaScrollbarAuto = React2.forwardRef((props, forwardedRef) => {\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { forceMount, ...scrollbarProps } = props;\n const [visible, setVisible] = React2.useState(false);\n const isHorizontal = props.orientation === \"horizontal\";\n const handleResize = useDebounceCallback(() => {\n if (context.viewport) {\n const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;\n const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;\n setVisible(isHorizontal ? isOverflowX : isOverflowY);\n }\n }, 10);\n useResizeObserver(context.viewport, handleResize);\n useResizeObserver(context.content, handleResize);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarVisible,\n {\n \"data-state\": visible ? \"visible\" : \"hidden\",\n ...scrollbarProps,\n ref: forwardedRef\n }\n ) });\n});\nvar ScrollAreaScrollbarVisible = React2.forwardRef((props, forwardedRef) => {\n const { orientation = \"vertical\", ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const thumbRef = React2.useRef(null);\n const pointerOffsetRef = React2.useRef(0);\n const [sizes, setSizes] = React2.useState({\n content: 0,\n viewport: 0,\n scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }\n });\n const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);\n const commonProps = {\n ...scrollbarProps,\n sizes,\n onSizesChange: setSizes,\n hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),\n onThumbChange: (thumb) => thumbRef.current = thumb,\n onThumbPointerUp: () => pointerOffsetRef.current = 0,\n onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos\n };\n function getScrollPosition(pointerPos, dir) {\n return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);\n }\n if (orientation === \"horizontal\") {\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarX,\n {\n ...commonProps,\n ref: forwardedRef,\n onThumbPositionChange: () => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollLeft;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);\n thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;\n }\n },\n onWheelScroll: (scrollPos) => {\n if (context.viewport) context.viewport.scrollLeft = scrollPos;\n },\n onDragScroll: (pointerPos) => {\n if (context.viewport) {\n context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);\n }\n }\n }\n );\n }\n if (orientation === \"vertical\") {\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarY,\n {\n ...commonProps,\n ref: forwardedRef,\n onThumbPositionChange: () => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollTop;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes);\n thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;\n }\n },\n onWheelScroll: (scrollPos) => {\n if (context.viewport) context.viewport.scrollTop = scrollPos;\n },\n onDragScroll: (pointerPos) => {\n if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);\n }\n }\n );\n }\n return null;\n});\nvar ScrollAreaScrollbarX = React2.forwardRef((props, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React2.useState();\n const ref = React2.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);\n React2.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarImpl,\n {\n \"data-orientation\": \"horizontal\",\n ...scrollbarProps,\n ref: composeRefs,\n sizes,\n style: {\n bottom: 0,\n left: context.dir === \"rtl\" ? \"var(--radix-scroll-area-corner-width)\" : 0,\n right: context.dir === \"ltr\" ? \"var(--radix-scroll-area-corner-width)\" : 0,\n [\"--radix-scroll-area-thumb-width\"]: getThumbSize(sizes) + \"px\",\n ...props.style\n },\n onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x),\n onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x),\n onWheelScroll: (event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollLeft + event.deltaX;\n props.onWheelScroll(scrollPos);\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n },\n onResize: () => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollWidth,\n viewport: context.viewport.offsetWidth,\n scrollbar: {\n size: ref.current.clientWidth,\n paddingStart: toInt(computedStyle.paddingLeft),\n paddingEnd: toInt(computedStyle.paddingRight)\n }\n });\n }\n }\n }\n );\n});\nvar ScrollAreaScrollbarY = React2.forwardRef((props, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React2.useState();\n const ref = React2.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);\n React2.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarImpl,\n {\n \"data-orientation\": \"vertical\",\n ...scrollbarProps,\n ref: composeRefs,\n sizes,\n style: {\n top: 0,\n right: context.dir === \"ltr\" ? 0 : void 0,\n left: context.dir === \"rtl\" ? 0 : void 0,\n bottom: \"var(--radix-scroll-area-corner-height)\",\n [\"--radix-scroll-area-thumb-height\"]: getThumbSize(sizes) + \"px\",\n ...props.style\n },\n onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y),\n onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y),\n onWheelScroll: (event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollTop + event.deltaY;\n props.onWheelScroll(scrollPos);\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n },\n onResize: () => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollHeight,\n viewport: context.viewport.offsetHeight,\n scrollbar: {\n size: ref.current.clientHeight,\n paddingStart: toInt(computedStyle.paddingTop),\n paddingEnd: toInt(computedStyle.paddingBottom)\n }\n });\n }\n }\n }\n );\n});\nvar [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME);\nvar ScrollAreaScrollbarImpl = React2.forwardRef((props, forwardedRef) => {\n const {\n __scopeScrollArea,\n sizes,\n hasThumb,\n onThumbChange,\n onThumbPointerUp,\n onThumbPointerDown,\n onThumbPositionChange,\n onDragScroll,\n onWheelScroll,\n onResize,\n ...scrollbarProps\n } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);\n const [scrollbar, setScrollbar] = React2.useState(null);\n const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node));\n const rectRef = React2.useRef(null);\n const prevWebkitUserSelectRef = React2.useRef(\"\");\n const viewport = context.viewport;\n const maxScrollPos = sizes.content - sizes.viewport;\n const handleWheelScroll = useCallbackRef(onWheelScroll);\n const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);\n const handleResize = useDebounceCallback(onResize, 10);\n function handleDragScroll(event) {\n if (rectRef.current) {\n const x = event.clientX - rectRef.current.left;\n const y = event.clientY - rectRef.current.top;\n onDragScroll({ x, y });\n }\n }\n React2.useEffect(() => {\n const handleWheel = (event) => {\n const element = event.target;\n const isScrollbarWheel = scrollbar?.contains(element);\n if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);\n };\n document.addEventListener(\"wheel\", handleWheel, { passive: false });\n return () => document.removeEventListener(\"wheel\", handleWheel, { passive: false });\n }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);\n React2.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);\n useResizeObserver(scrollbar, handleResize);\n useResizeObserver(context.content, handleResize);\n return /* @__PURE__ */ jsx(\n ScrollbarProvider,\n {\n scope: __scopeScrollArea,\n scrollbar,\n hasThumb,\n onThumbChange: useCallbackRef(onThumbChange),\n onThumbPointerUp: useCallbackRef(onThumbPointerUp),\n onThumbPositionChange: handleThumbPositionChange,\n onThumbPointerDown: useCallbackRef(onThumbPointerDown),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...scrollbarProps,\n ref: composeRefs,\n style: { position: \"absolute\", ...scrollbarProps.style },\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n const mainPointer = 0;\n if (event.button === mainPointer) {\n const element = event.target;\n element.setPointerCapture(event.pointerId);\n rectRef.current = scrollbar.getBoundingClientRect();\n prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;\n document.body.style.webkitUserSelect = \"none\";\n if (context.viewport) context.viewport.style.scrollBehavior = \"auto\";\n handleDragScroll(event);\n }\n }),\n onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n const element = event.target;\n if (element.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId);\n }\n document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;\n if (context.viewport) context.viewport.style.scrollBehavior = \"\";\n rectRef.current = null;\n })\n }\n )\n }\n );\n});\nvar THUMB_NAME = \"ScrollAreaThumb\";\nvar ScrollAreaThumb = React2.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...thumbProps } = props;\n const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });\n }\n);\nvar ScrollAreaThumbImpl = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeScrollArea, style, ...thumbProps } = props;\n const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);\n const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);\n const { onThumbPositionChange } = scrollbarContext;\n const composedRef = useComposedRefs(\n forwardedRef,\n (node) => scrollbarContext.onThumbChange(node)\n );\n const removeUnlinkedScrollListenerRef = React2.useRef(void 0);\n const debounceScrollEnd = useDebounceCallback(() => {\n if (removeUnlinkedScrollListenerRef.current) {\n removeUnlinkedScrollListenerRef.current();\n removeUnlinkedScrollListenerRef.current = void 0;\n }\n }, 100);\n React2.useEffect(() => {\n const viewport = scrollAreaContext.viewport;\n if (viewport) {\n const handleScroll = () => {\n debounceScrollEnd();\n if (!removeUnlinkedScrollListenerRef.current) {\n const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);\n removeUnlinkedScrollListenerRef.current = listener;\n onThumbPositionChange();\n }\n };\n onThumbPositionChange();\n viewport.addEventListener(\"scroll\", handleScroll);\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }\n }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": scrollbarContext.hasThumb ? \"visible\" : \"hidden\",\n ...thumbProps,\n ref: composedRef,\n style: {\n width: \"var(--radix-scroll-area-thumb-width)\",\n height: \"var(--radix-scroll-area-thumb-height)\",\n ...style\n },\n onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {\n const thumb = event.target;\n const thumbRect = thumb.getBoundingClientRect();\n const x = event.clientX - thumbRect.left;\n const y = event.clientY - thumbRect.top;\n scrollbarContext.onThumbPointerDown({ x, y });\n }),\n onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)\n }\n );\n }\n);\nScrollAreaThumb.displayName = THUMB_NAME;\nvar CORNER_NAME = \"ScrollAreaCorner\";\nvar ScrollAreaCorner = React2.forwardRef(\n (props, forwardedRef) => {\n const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);\n const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);\n const hasCorner = context.type !== \"scroll\" && hasBothScrollbarsVisible;\n return hasCorner ? /* @__PURE__ */ jsx(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null;\n }\n);\nScrollAreaCorner.displayName = CORNER_NAME;\nvar ScrollAreaCornerImpl = React2.forwardRef((props, forwardedRef) => {\n const { __scopeScrollArea, ...cornerProps } = props;\n const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);\n const [width, setWidth] = React2.useState(0);\n const [height, setHeight] = React2.useState(0);\n const hasSize = Boolean(width && height);\n useResizeObserver(context.scrollbarX, () => {\n const height2 = context.scrollbarX?.offsetHeight || 0;\n context.onCornerHeightChange(height2);\n setHeight(height2);\n });\n useResizeObserver(context.scrollbarY, () => {\n const width2 = context.scrollbarY?.offsetWidth || 0;\n context.onCornerWidthChange(width2);\n setWidth(width2);\n });\n return hasSize ? /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...cornerProps,\n ref: forwardedRef,\n style: {\n width,\n height,\n position: \"absolute\",\n right: context.dir === \"ltr\" ? 0 : void 0,\n left: context.dir === \"rtl\" ? 0 : void 0,\n bottom: 0,\n ...props.style\n }\n }\n ) : null;\n});\nfunction toInt(value) {\n return value ? parseInt(value, 10) : 0;\n}\nfunction getThumbRatio(viewportSize, contentSize) {\n const ratio = viewportSize / contentSize;\n return isNaN(ratio) ? 0 : ratio;\n}\nfunction getThumbSize(sizes) {\n const ratio = getThumbRatio(sizes.viewport, sizes.content);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;\n return Math.max(thumbSize, 18);\n}\nfunction getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = \"ltr\") {\n const thumbSizePx = getThumbSize(sizes);\n const thumbCenter = thumbSizePx / 2;\n const offset = pointerOffset || thumbCenter;\n const thumbOffsetFromEnd = thumbSizePx - offset;\n const minPointerPos = sizes.scrollbar.paddingStart + offset;\n const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;\n const maxScrollPos = sizes.content - sizes.viewport;\n const scrollRange = dir === \"ltr\" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange);\n return interpolate(pointerPos);\n}\nfunction getThumbOffsetFromScroll(scrollPos, sizes, dir = \"ltr\") {\n const thumbSizePx = getThumbSize(sizes);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const scrollbar = sizes.scrollbar.size - scrollbarPadding;\n const maxScrollPos = sizes.content - sizes.viewport;\n const maxThumbPos = scrollbar - thumbSizePx;\n const scrollClampRange = dir === \"ltr\" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange);\n const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);\n return interpolate(scrollWithoutMomentum);\n}\nfunction linearScale(input, output) {\n return (value) => {\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\nfunction isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {\n return scrollPos > 0 && scrollPos < maxScrollPos;\n}\nvar addUnlinkedScrollListener = (node, handler = () => {\n}) => {\n let prevPosition = { left: node.scrollLeft, top: node.scrollTop };\n let rAF = 0;\n (function loop() {\n const position = { left: node.scrollLeft, top: node.scrollTop };\n const isHorizontalScroll = prevPosition.left !== position.left;\n const isVerticalScroll = prevPosition.top !== position.top;\n if (isHorizontalScroll || isVerticalScroll) handler();\n prevPosition = position;\n rAF = window.requestAnimationFrame(loop);\n })();\n return () => window.cancelAnimationFrame(rAF);\n};\nfunction useDebounceCallback(callback, delay) {\n const handleCallback = useCallbackRef(callback);\n const debounceTimerRef = React2.useRef(0);\n React2.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);\n return React2.useCallback(() => {\n window.clearTimeout(debounceTimerRef.current);\n debounceTimerRef.current = window.setTimeout(handleCallback, delay);\n }, [handleCallback, delay]);\n}\nfunction useResizeObserver(element, onResize) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\nvar Root = ScrollArea;\nvar Viewport = ScrollAreaViewport;\nvar Scrollbar = ScrollAreaScrollbar;\nvar Thumb = ScrollAreaThumb;\nvar Corner = ScrollAreaCorner;\nexport {\n Corner,\n Root,\n ScrollArea,\n ScrollAreaCorner,\n ScrollAreaScrollbar,\n ScrollAreaThumb,\n ScrollAreaViewport,\n Scrollbar,\n Thumb,\n Viewport,\n createScrollAreaScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nimport { cn } from '@/lib/utils';\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn('relative', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\nfunction ScrollBar({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none',\n orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent',\n orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"bg-border relative flex-1 rounded-full\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n","'use client';\n\nimport { useState, useEffect } from 'react';\n\n/**\n * Defers mount/unmount of content to allow opacity transitions.\n * When expanding: mounts immediately, then sets visible on next frame.\n * When collapsing: hides immediately, then unmounts after `ms` delay.\n */\nexport function useDeferredMount(isCollapsed: boolean, ms: number) {\n const [mounted, setMounted] = useState(!isCollapsed);\n const [visible, setVisible] = useState(!isCollapsed);\n\n useEffect(() => {\n if (!isCollapsed) {\n setMounted(true);\n // delay visibility by one frame so the element mounts at opacity-0 first\n const raf = requestAnimationFrame(() => setVisible(true));\n return () => cancelAnimationFrame(raf);\n }\n setVisible(false);\n const t = window.setTimeout(() => setMounted(false), ms);\n return () => window.clearTimeout(t);\n }, [isCollapsed, ms]);\n\n return { mounted, visible };\n}\n","/**\n * Feature flags for the web UI.\n *\n * Toggle via environment variables (NEXT_PUBLIC_ prefix for client access).\n * All flags default to **off** unless explicitly set to \"true\" or \"1\".\n */\n\nfunction isEnabled(envVar: string | undefined): boolean {\n return envVar === 'true' || envVar === '1';\n}\n\nexport const featureFlags = {\n skills: isEnabled(process.env.NEXT_PUBLIC_FLAG_SKILLS),\n} as const;\n","'use client';\n\nimport { usePathname } from 'next/navigation';\nimport { Home, Wrench, Puzzle, Plus } from 'lucide-react';\nimport {\n Sidebar,\n SidebarHeader,\n SidebarContent,\n SidebarFooter,\n SidebarMenu,\n SidebarMenuItem,\n SidebarMenuButton,\n SidebarRail,\n useSidebar,\n} from '@/components/ui/sidebar';\nimport { ScrollArea } from '@/components/ui/scroll-area';\nimport { SidebarNavItem } from '@/components/common/sidebar-nav-item';\nimport { SidebarCollapseToggle } from '@/components/common/sidebar-collapse-toggle';\nimport { ShepLogo } from '@/components/common/shep-logo';\nimport { FeatureListItem } from '@/components/common/feature-list-item';\nimport { FeatureStatusGroup } from '@/components/common/feature-status-group';\nimport { SidebarSectionHeader } from '@/components/common/sidebar-section-header';\nimport { featureStatusConfig, featureStatusOrder } from '@/components/common/feature-status-config';\nimport type { FeatureStatus } from '@/components/common/feature-status-config';\nimport { useDeferredMount } from '@/hooks/use-deferred-mount';\nimport { featureFlags } from '@/lib/feature-flags';\n\ninterface FeatureItem {\n name: string;\n status: FeatureStatus;\n startedAt?: number;\n duration?: string;\n}\n\nexport interface AppSidebarProps {\n features: FeatureItem[];\n onNewFeature?: () => void;\n onFeatureClick?: (name: string) => void;\n onFeaturesFolderClick?: () => void;\n onFeaturesMenuClick?: () => void;\n}\n\nexport function AppSidebar({\n features,\n onNewFeature,\n onFeatureClick,\n onFeaturesFolderClick,\n onFeaturesMenuClick,\n}: AppSidebarProps) {\n const pathname = usePathname();\n const { state } = useSidebar();\n const collapsed = state === 'collapsed';\n const { mounted: showExpanded, visible: expandedVisible } = useDeferredMount(collapsed, 200);\n\n const grouped = featureStatusOrder.map((key) => {\n const { label } = featureStatusConfig[key];\n const items = features.filter((f) => f.status === key);\n return { key, label, items };\n });\n\n return (\n <Sidebar data-testid=\"app-sidebar\" collapsible=\"icon\">\n <SidebarHeader>\n <SidebarMenu>\n <SidebarMenuItem>\n <div className=\"flex h-8 items-center group-data-[collapsible=icon]:justify-center\">\n {showExpanded ? (\n <div\n className={[\n 'flex min-w-0 flex-1 items-center gap-2 overflow-hidden px-2',\n 'transition-opacity duration-200 ease-out',\n expandedVisible ? 'opacity-100' : 'opacity-0',\n ].join(' ')}\n aria-hidden={!expandedVisible}\n >\n <ShepLogo className=\"shrink-0\" size={20} />\n <span className=\"truncate text-sm font-semibold tracking-tight\">Shep</span>\n </div>\n ) : null}\n <SidebarCollapseToggle className=\"shrink-0 transition-all duration-200\" />\n </div>\n </SidebarMenuItem>\n\n <SidebarNavItem icon={Home} label=\"Control Center\" href=\"/\" active={pathname === '/'} />\n <SidebarNavItem\n icon={Wrench}\n label=\"Tools\"\n href=\"/tools\"\n active={pathname === '/tools'}\n />\n {featureFlags.skills ? (\n <SidebarNavItem\n icon={Puzzle}\n label=\"Skills\"\n href=\"/skills\"\n active={pathname === '/skills'}\n />\n ) : null}\n </SidebarMenu>\n </SidebarHeader>\n\n <SidebarContent>\n {showExpanded ? (\n <div\n className={[\n 'min-w-0 overflow-hidden transition-opacity duration-200 ease-out',\n '[&_[data-sidebar=group-label]]:!mt-0 [&_[data-sidebar=group-label]]:!opacity-100 [&_[data-sidebar=group-label]]:!transition-none',\n expandedVisible ? 'opacity-100' : 'opacity-0',\n ].join(' ')}\n >\n <SidebarSectionHeader\n label=\"Features\"\n onFolderClick={onFeaturesFolderClick}\n onMenuClick={onFeaturesMenuClick}\n />\n <ScrollArea>\n {grouped.map(({ key, label, items }) =>\n items.length > 0 ? (\n <FeatureStatusGroup key={key} label={label} count={items.length}>\n {items.map((feature) => (\n <FeatureListItem\n key={feature.name}\n name={feature.name}\n status={feature.status}\n startedAt={feature.startedAt}\n duration={feature.duration}\n onClick={onFeatureClick ? () => onFeatureClick(feature.name) : undefined}\n />\n ))}\n </FeatureStatusGroup>\n ) : null\n )}\n </ScrollArea>\n </div>\n ) : null}\n </SidebarContent>\n\n <SidebarFooter>\n <SidebarMenu>\n <SidebarMenuItem>\n <SidebarMenuButton onClick={onNewFeature} tooltip=\"New feature\">\n <Plus />\n <span>New feature</span>\n </SidebarMenuButton>\n </SidebarMenuItem>\n </SidebarMenu>\n </SidebarFooter>\n\n <SidebarRail />\n </Sidebar>\n );\n}\n","'use client';\n\nimport { Volume2, VolumeOff } from 'lucide-react';\nimport { Button } from '@/components/ui/button';\nimport { useSoundEnabled } from '@/hooks/use-sound-enabled';\n\nexport function SoundToggle() {\n const { enabled, toggle } = useSoundEnabled();\n\n return (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={toggle}\n aria-label={enabled ? 'Mute sounds' : 'Unmute sounds'}\n >\n {enabled ? <Volume2 className=\"h-5 w-5\" /> : <VolumeOff className=\"h-5 w-5\" />}\n <span className=\"sr-only\">Toggle sound</span>\n </Button>\n );\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M16 9a5 5 0 0 1 .95 2.293', key: '1fgyg8' }],\n ['path', { d: 'M19.364 5.636a9 9 0 0 1 1.889 9.96', key: 'l3zxae' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n [\n 'path',\n {\n d: 'm7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11',\n key: '1gbwow',\n },\n ],\n ['path', { d: 'M9.828 4.172A.686.686 0 0 1 11 4.657v.686', key: 's2je0y' }],\n];\n\n/**\n * @component @name VolumeOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgOWE1IDUgMCAwIDEgLjk1IDIuMjkzIiAvPgogIDxwYXRoIGQ9Ik0xOS4zNjQgNS42MzZhOSA5IDAgMCAxIDEuODg5IDkuOTYiIC8+CiAgPHBhdGggZD0ibTIgMiAyMCAyMCIgLz4KICA8cGF0aCBkPSJtNyA3LS41ODcuNTg3QTEuNCAxLjQgMCAwIDEgNS40MTYgOEgzYTEgMSAwIDAgMC0xIDF2NmExIDEgMCAwIDAgMSAxaDIuNDE2YTEuNCAxLjQgMCAwIDEgLjk5Ny40MTNsMy4zODMgMy4zODRBLjcwNS43MDUgMCAwIDAgMTEgMTkuMjk4VjExIiAvPgogIDxwYXRoIGQ9Ik05LjgyOCA0LjE3MkEuNjg2LjY4NiAwIDAgMSAxMSA0LjY1N3YuNjg2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/volume-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst VolumeOff = createLucideIcon('volume-off', __iconNode);\n\nexport default VolumeOff;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8', key: '5wwlr5' }],\n [\n 'path',\n {\n d: 'M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z',\n key: 'r6nss1',\n },\n ],\n];\n\n/**\n * @component @name House\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMjF2LThhMSAxIDAgMCAwLTEtMWgtNGExIDEgMCAwIDAtMSAxdjgiIC8+CiAgPHBhdGggZD0iTTMgMTBhMiAyIDAgMCAxIC43MDktMS41MjhsNy02YTIgMiAwIDAgMSAyLjU4MiAwbDcgNkEyIDIgMCAwIDEgMjEgMTB2OWEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/house\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst House = createLucideIcon('house', __iconNode);\n\nexport default House;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z',\n key: 'uqj9uw',\n },\n ],\n ['path', { d: 'M16 9a5 5 0 0 1 0 6', key: '1q6k2b' }],\n ['path', { d: 'M19.364 18.364a9 9 0 0 0 0-12.728', key: 'ijwkga' }],\n];\n\n/**\n * @component @name Volume2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTEgNC43MDJhLjcwNS43MDUgMCAwIDAtMS4yMDMtLjQ5OEw2LjQxMyA3LjU4N0ExLjQgMS40IDAgMCAxIDUuNDE2IDhIM2ExIDEgMCAwIDAtMSAxdjZhMSAxIDAgMCAwIDEgMWgyLjQxNmExLjQgMS40IDAgMCAxIC45OTcuNDEzbDMuMzgzIDMuMzg0QS43MDUuNzA1IDAgMCAwIDExIDE5LjI5OHoiIC8+CiAgPHBhdGggZD0iTTE2IDlhNSA1IDAgMCAxIDAgNiIgLz4KICA8cGF0aCBkPSJNMTkuMzY0IDE4LjM2NGE5IDkgMCAwIDAgMC0xMi43MjgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/volume-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Volume2 = createLucideIcon('volume-2', __iconNode);\n\nexport default Volume2;\n","import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Presence } from '@radix-ui/react-presence';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { clamp } from '@radix-ui/number';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useStateMachine } from './use-state-machine';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Sizes = {\n content: number;\n viewport: number;\n scrollbar: {\n size: number;\n paddingStart: number;\n paddingEnd: number;\n };\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollArea\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLL_AREA_NAME = 'ScrollArea';\n\ntype ScopedProps<P> = P & { __scopeScrollArea?: Scope };\nconst [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);\n\ntype ScrollAreaContextValue = {\n type: 'auto' | 'always' | 'scroll' | 'hover';\n dir: Direction;\n scrollHideDelay: number;\n scrollArea: ScrollAreaElement | null;\n viewport: ScrollAreaViewportElement | null;\n onViewportChange(viewport: ScrollAreaViewportElement | null): void;\n content: HTMLDivElement | null;\n onContentChange(content: HTMLDivElement): void;\n scrollbarX: ScrollAreaScrollbarElement | null;\n onScrollbarXChange(scrollbar: ScrollAreaScrollbarElement | null): void;\n scrollbarXEnabled: boolean;\n onScrollbarXEnabledChange(rendered: boolean): void;\n scrollbarY: ScrollAreaScrollbarElement | null;\n onScrollbarYChange(scrollbar: ScrollAreaScrollbarElement | null): void;\n scrollbarYEnabled: boolean;\n onScrollbarYEnabledChange(rendered: boolean): void;\n onCornerWidthChange(width: number): void;\n onCornerHeightChange(height: number): void;\n};\n\nconst [ScrollAreaProvider, useScrollAreaContext] =\n createScrollAreaContext<ScrollAreaContextValue>(SCROLL_AREA_NAME);\n\ntype ScrollAreaElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface ScrollAreaProps extends PrimitiveDivProps {\n type?: ScrollAreaContextValue['type'];\n dir?: ScrollAreaContextValue['dir'];\n scrollHideDelay?: number;\n}\n\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>(\n (props: ScopedProps<ScrollAreaProps>, forwardedRef) => {\n const {\n __scopeScrollArea,\n type = 'hover',\n dir,\n scrollHideDelay = 600,\n ...scrollAreaProps\n } = props;\n const [scrollArea, setScrollArea] = React.useState<ScrollAreaElement | null>(null);\n const [viewport, setViewport] = React.useState<ScrollAreaViewportElement | null>(null);\n const [content, setContent] = React.useState<HTMLDivElement | null>(null);\n const [scrollbarX, setScrollbarX] = React.useState<ScrollAreaScrollbarElement | null>(null);\n const [scrollbarY, setScrollbarY] = React.useState<ScrollAreaScrollbarElement | null>(null);\n const [cornerWidth, setCornerWidth] = React.useState(0);\n const [cornerHeight, setCornerHeight] = React.useState(0);\n const [scrollbarXEnabled, setScrollbarXEnabled] = React.useState(false);\n const [scrollbarYEnabled, setScrollbarYEnabled] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));\n const direction = useDirection(dir);\n\n return (\n <ScrollAreaProvider\n scope={__scopeScrollArea}\n type={type}\n dir={direction}\n scrollHideDelay={scrollHideDelay}\n scrollArea={scrollArea}\n viewport={viewport}\n onViewportChange={setViewport}\n content={content}\n onContentChange={setContent}\n scrollbarX={scrollbarX}\n onScrollbarXChange={setScrollbarX}\n scrollbarXEnabled={scrollbarXEnabled}\n onScrollbarXEnabledChange={setScrollbarXEnabled}\n scrollbarY={scrollbarY}\n onScrollbarYChange={setScrollbarY}\n scrollbarYEnabled={scrollbarYEnabled}\n onScrollbarYEnabledChange={setScrollbarYEnabled}\n onCornerWidthChange={setCornerWidth}\n onCornerHeightChange={setCornerHeight}\n >\n <Primitive.div\n dir={direction}\n {...scrollAreaProps}\n ref={composedRefs}\n style={{\n position: 'relative',\n // Pass corner sizes as CSS vars to reduce re-renders of context consumers\n ['--radix-scroll-area-corner-width' as any]: cornerWidth + 'px',\n ['--radix-scroll-area-corner-height' as any]: cornerHeight + 'px',\n ...props.style,\n }}\n />\n </ScrollAreaProvider>\n );\n }\n);\n\nScrollArea.displayName = SCROLL_AREA_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaViewport\n * -----------------------------------------------------------------------------------------------*/\n\nconst VIEWPORT_NAME = 'ScrollAreaViewport';\n\ntype ScrollAreaViewportElement = React.ComponentRef<typeof Primitive.div>;\ninterface ScrollAreaViewportProps extends PrimitiveDivProps {\n nonce?: string;\n}\n\nconst ScrollAreaViewport = React.forwardRef<ScrollAreaViewportElement, ScrollAreaViewportProps>(\n (props: ScopedProps<ScrollAreaViewportProps>, forwardedRef) => {\n const { __scopeScrollArea, children, nonce, ...viewportProps } = props;\n const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);\n const ref = React.useRef<ScrollAreaViewportElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n return (\n <>\n {/* Hide scrollbars cross-browser and enable momentum scroll for touch devices */}\n <style\n dangerouslySetInnerHTML={{\n __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`,\n }}\n nonce={nonce}\n />\n <Primitive.div\n data-radix-scroll-area-viewport=\"\"\n {...viewportProps}\n ref={composedRefs}\n style={{\n /**\n * We don't support `visible` because the intention is to have at least one scrollbar\n * if this component is used and `visible` will behave like `auto` in that case\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description\n *\n * We don't handle `auto` because the intention is for the native implementation\n * to be hidden if using this component. We just want to ensure the node is scrollable\n * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent\n * the browser from having to work out whether to render native scrollbars or not,\n * we tell it to with the intention of hiding them in CSS.\n */\n overflowX: context.scrollbarXEnabled ? 'scroll' : 'hidden',\n overflowY: context.scrollbarYEnabled ? 'scroll' : 'hidden',\n ...props.style,\n }}\n >\n {/**\n * `display: table` ensures our content div will match the size of its children in both\n * horizontal and vertical axis so we can determine if scroll width/height changed and\n * recalculate thumb sizes. This doesn't account for children with *percentage*\n * widths that change. We'll wait to see what use-cases consumers come up with there\n * before trying to resolve it.\n */}\n <div ref={context.onContentChange} style={{ minWidth: '100%', display: 'table' }}>\n {children}\n </div>\n </Primitive.div>\n </>\n );\n }\n);\n\nScrollAreaViewport.displayName = VIEWPORT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaScrollbar\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLLBAR_NAME = 'ScrollAreaScrollbar';\n\ntype ScrollAreaScrollbarElement = ScrollAreaScrollbarVisibleElement;\ninterface ScrollAreaScrollbarProps extends ScrollAreaScrollbarVisibleProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbar = React.forwardRef<ScrollAreaScrollbarElement, ScrollAreaScrollbarProps>(\n (props: ScopedProps<ScrollAreaScrollbarProps>, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;\n const isHorizontal = props.orientation === 'horizontal';\n\n React.useEffect(() => {\n isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);\n return () => {\n isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);\n };\n }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);\n\n return context.type === 'hover' ? (\n <ScrollAreaScrollbarHover {...scrollbarProps} ref={forwardedRef} forceMount={forceMount} />\n ) : context.type === 'scroll' ? (\n <ScrollAreaScrollbarScroll {...scrollbarProps} ref={forwardedRef} forceMount={forceMount} />\n ) : context.type === 'auto' ? (\n <ScrollAreaScrollbarAuto {...scrollbarProps} ref={forwardedRef} forceMount={forceMount} />\n ) : context.type === 'always' ? (\n <ScrollAreaScrollbarVisible {...scrollbarProps} ref={forwardedRef} />\n ) : null;\n }\n);\n\nScrollAreaScrollbar.displayName = SCROLLBAR_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaScrollbarHoverElement = ScrollAreaScrollbarAutoElement;\ninterface ScrollAreaScrollbarHoverProps extends ScrollAreaScrollbarAutoProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbarHover = React.forwardRef<\n ScrollAreaScrollbarHoverElement,\n ScrollAreaScrollbarHoverProps\n>((props: ScopedProps<ScrollAreaScrollbarHoverProps>, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [visible, setVisible] = React.useState(false);\n\n React.useEffect(() => {\n const scrollArea = context.scrollArea;\n let hideTimer = 0;\n if (scrollArea) {\n const handlePointerEnter = () => {\n window.clearTimeout(hideTimer);\n setVisible(true);\n };\n const handlePointerLeave = () => {\n hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);\n };\n scrollArea.addEventListener('pointerenter', handlePointerEnter);\n scrollArea.addEventListener('pointerleave', handlePointerLeave);\n return () => {\n window.clearTimeout(hideTimer);\n scrollArea.removeEventListener('pointerenter', handlePointerEnter);\n scrollArea.removeEventListener('pointerleave', handlePointerLeave);\n };\n }\n }, [context.scrollArea, context.scrollHideDelay]);\n\n return (\n <Presence present={forceMount || visible}>\n <ScrollAreaScrollbarAuto\n data-state={visible ? 'visible' : 'hidden'}\n {...scrollbarProps}\n ref={forwardedRef}\n />\n </Presence>\n );\n});\n\ntype ScrollAreaScrollbarScrollElement = ScrollAreaScrollbarVisibleElement;\ninterface ScrollAreaScrollbarScrollProps extends ScrollAreaScrollbarVisibleProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbarScroll = React.forwardRef<\n ScrollAreaScrollbarScrollElement,\n ScrollAreaScrollbarScrollProps\n>((props: ScopedProps<ScrollAreaScrollbarScrollProps>, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const isHorizontal = props.orientation === 'horizontal';\n const debounceScrollEnd = useDebounceCallback(() => send('SCROLL_END'), 100);\n const [state, send] = useStateMachine('hidden', {\n hidden: {\n SCROLL: 'scrolling',\n },\n scrolling: {\n SCROLL_END: 'idle',\n POINTER_ENTER: 'interacting',\n },\n interacting: {\n SCROLL: 'interacting',\n POINTER_LEAVE: 'idle',\n },\n idle: {\n HIDE: 'hidden',\n SCROLL: 'scrolling',\n POINTER_ENTER: 'interacting',\n },\n });\n\n React.useEffect(() => {\n if (state === 'idle') {\n const hideTimer = window.setTimeout(() => send('HIDE'), context.scrollHideDelay);\n return () => window.clearTimeout(hideTimer);\n }\n }, [state, context.scrollHideDelay, send]);\n\n React.useEffect(() => {\n const viewport = context.viewport;\n const scrollDirection = isHorizontal ? 'scrollLeft' : 'scrollTop';\n\n if (viewport) {\n let prevScrollPos = viewport[scrollDirection];\n const handleScroll = () => {\n const scrollPos = viewport[scrollDirection];\n const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;\n if (hasScrollInDirectionChanged) {\n send('SCROLL');\n debounceScrollEnd();\n }\n prevScrollPos = scrollPos;\n };\n viewport.addEventListener('scroll', handleScroll);\n return () => viewport.removeEventListener('scroll', handleScroll);\n }\n }, [context.viewport, isHorizontal, send, debounceScrollEnd]);\n\n return (\n <Presence present={forceMount || state !== 'hidden'}>\n <ScrollAreaScrollbarVisible\n data-state={state === 'hidden' ? 'hidden' : 'visible'}\n {...scrollbarProps}\n ref={forwardedRef}\n onPointerEnter={composeEventHandlers(props.onPointerEnter, () => send('POINTER_ENTER'))}\n onPointerLeave={composeEventHandlers(props.onPointerLeave, () => send('POINTER_LEAVE'))}\n />\n </Presence>\n );\n});\n\ntype ScrollAreaScrollbarAutoElement = ScrollAreaScrollbarVisibleElement;\ninterface ScrollAreaScrollbarAutoProps extends ScrollAreaScrollbarVisibleProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbarAuto = React.forwardRef<\n ScrollAreaScrollbarAutoElement,\n ScrollAreaScrollbarAutoProps\n>((props: ScopedProps<ScrollAreaScrollbarAutoProps>, forwardedRef) => {\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { forceMount, ...scrollbarProps } = props;\n const [visible, setVisible] = React.useState(false);\n const isHorizontal = props.orientation === 'horizontal';\n const handleResize = useDebounceCallback(() => {\n if (context.viewport) {\n const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;\n const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;\n setVisible(isHorizontal ? isOverflowX : isOverflowY);\n }\n }, 10);\n\n useResizeObserver(context.viewport, handleResize);\n useResizeObserver(context.content, handleResize);\n\n return (\n <Presence present={forceMount || visible}>\n <ScrollAreaScrollbarVisible\n data-state={visible ? 'visible' : 'hidden'}\n {...scrollbarProps}\n ref={forwardedRef}\n />\n </Presence>\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaScrollbarVisibleElement = ScrollAreaScrollbarAxisElement;\ninterface ScrollAreaScrollbarVisibleProps\n extends Omit<ScrollAreaScrollbarAxisProps, keyof ScrollAreaScrollbarAxisPrivateProps> {\n orientation?: 'horizontal' | 'vertical';\n}\n\nconst ScrollAreaScrollbarVisible = React.forwardRef<\n ScrollAreaScrollbarVisibleElement,\n ScrollAreaScrollbarVisibleProps\n>((props: ScopedProps<ScrollAreaScrollbarVisibleProps>, forwardedRef) => {\n const { orientation = 'vertical', ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const thumbRef = React.useRef<ScrollAreaThumbElement | null>(null);\n const pointerOffsetRef = React.useRef(0);\n const [sizes, setSizes] = React.useState<Sizes>({\n content: 0,\n viewport: 0,\n scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 },\n });\n const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);\n\n type UncommonProps = 'onThumbPositionChange' | 'onDragScroll' | 'onWheelScroll';\n const commonProps: Omit<ScrollAreaScrollbarAxisPrivateProps, UncommonProps> = {\n ...scrollbarProps,\n sizes,\n onSizesChange: setSizes,\n hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),\n onThumbChange: (thumb) => (thumbRef.current = thumb),\n onThumbPointerUp: () => (pointerOffsetRef.current = 0),\n onThumbPointerDown: (pointerPos) => (pointerOffsetRef.current = pointerPos),\n };\n\n function getScrollPosition(pointerPos: number, dir?: Direction) {\n return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);\n }\n\n if (orientation === 'horizontal') {\n return (\n <ScrollAreaScrollbarX\n {...commonProps}\n ref={forwardedRef}\n onThumbPositionChange={() => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollLeft;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);\n thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;\n }\n }}\n onWheelScroll={(scrollPos) => {\n if (context.viewport) context.viewport.scrollLeft = scrollPos;\n }}\n onDragScroll={(pointerPos) => {\n if (context.viewport) {\n context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);\n }\n }}\n />\n );\n }\n\n if (orientation === 'vertical') {\n return (\n <ScrollAreaScrollbarY\n {...commonProps}\n ref={forwardedRef}\n onThumbPositionChange={() => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollTop;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes);\n thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;\n }\n }}\n onWheelScroll={(scrollPos) => {\n if (context.viewport) context.viewport.scrollTop = scrollPos;\n }}\n onDragScroll={(pointerPos) => {\n if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);\n }}\n />\n );\n }\n\n return null;\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaScrollbarAxisPrivateProps = {\n hasThumb: boolean;\n sizes: Sizes;\n onSizesChange(sizes: Sizes): void;\n onThumbChange(thumb: ScrollAreaThumbElement | null): void;\n onThumbPointerDown(pointerPos: number): void;\n onThumbPointerUp(): void;\n onThumbPositionChange(): void;\n onWheelScroll(scrollPos: number): void;\n onDragScroll(pointerPos: number): void;\n};\n\ntype ScrollAreaScrollbarAxisElement = ScrollAreaScrollbarImplElement;\ninterface ScrollAreaScrollbarAxisProps\n extends Omit<ScrollAreaScrollbarImplProps, keyof ScrollAreaScrollbarImplPrivateProps>,\n ScrollAreaScrollbarAxisPrivateProps {}\n\nconst ScrollAreaScrollbarX = React.forwardRef<\n ScrollAreaScrollbarAxisElement,\n ScrollAreaScrollbarAxisProps\n>((props: ScopedProps<ScrollAreaScrollbarAxisProps>, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React.useState<CSSStyleDeclaration>();\n const ref = React.useRef<ScrollAreaScrollbarAxisElement>(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);\n\n React.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n\n return (\n <ScrollAreaScrollbarImpl\n data-orientation=\"horizontal\"\n {...scrollbarProps}\n ref={composeRefs}\n sizes={sizes}\n style={{\n bottom: 0,\n left: context.dir === 'rtl' ? 'var(--radix-scroll-area-corner-width)' : 0,\n right: context.dir === 'ltr' ? 'var(--radix-scroll-area-corner-width)' : 0,\n ['--radix-scroll-area-thumb-width' as any]: getThumbSize(sizes) + 'px',\n ...props.style,\n }}\n onThumbPointerDown={(pointerPos) => props.onThumbPointerDown(pointerPos.x)}\n onDragScroll={(pointerPos) => props.onDragScroll(pointerPos.x)}\n onWheelScroll={(event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollLeft + event.deltaX;\n props.onWheelScroll(scrollPos);\n // prevent window scroll when wheeling on scrollbar\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n }}\n onResize={() => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollWidth,\n viewport: context.viewport.offsetWidth,\n scrollbar: {\n size: ref.current.clientWidth,\n paddingStart: toInt(computedStyle.paddingLeft),\n paddingEnd: toInt(computedStyle.paddingRight),\n },\n });\n }\n }}\n />\n );\n});\n\nconst ScrollAreaScrollbarY = React.forwardRef<\n ScrollAreaScrollbarAxisElement,\n ScrollAreaScrollbarAxisProps\n>((props: ScopedProps<ScrollAreaScrollbarAxisProps>, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React.useState<CSSStyleDeclaration>();\n const ref = React.useRef<ScrollAreaScrollbarAxisElement>(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);\n\n React.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n\n return (\n <ScrollAreaScrollbarImpl\n data-orientation=\"vertical\"\n {...scrollbarProps}\n ref={composeRefs}\n sizes={sizes}\n style={{\n top: 0,\n right: context.dir === 'ltr' ? 0 : undefined,\n left: context.dir === 'rtl' ? 0 : undefined,\n bottom: 'var(--radix-scroll-area-corner-height)',\n ['--radix-scroll-area-thumb-height' as any]: getThumbSize(sizes) + 'px',\n ...props.style,\n }}\n onThumbPointerDown={(pointerPos) => props.onThumbPointerDown(pointerPos.y)}\n onDragScroll={(pointerPos) => props.onDragScroll(pointerPos.y)}\n onWheelScroll={(event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollTop + event.deltaY;\n props.onWheelScroll(scrollPos);\n // prevent window scroll when wheeling on scrollbar\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n }}\n onResize={() => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollHeight,\n viewport: context.viewport.offsetHeight,\n scrollbar: {\n size: ref.current.clientHeight,\n paddingStart: toInt(computedStyle.paddingTop),\n paddingEnd: toInt(computedStyle.paddingBottom),\n },\n });\n }\n }}\n />\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollbarContext = {\n hasThumb: boolean;\n scrollbar: ScrollAreaScrollbarElement | null;\n onThumbChange(thumb: ScrollAreaThumbElement | null): void;\n onThumbPointerUp(): void;\n onThumbPointerDown(pointerPos: { x: number; y: number }): void;\n onThumbPositionChange(): void;\n};\n\nconst [ScrollbarProvider, useScrollbarContext] =\n createScrollAreaContext<ScrollbarContext>(SCROLLBAR_NAME);\n\ntype ScrollAreaScrollbarImplElement = React.ComponentRef<typeof Primitive.div>;\ntype ScrollAreaScrollbarImplPrivateProps = {\n sizes: Sizes;\n hasThumb: boolean;\n onThumbChange: ScrollbarContext['onThumbChange'];\n onThumbPointerUp: ScrollbarContext['onThumbPointerUp'];\n onThumbPointerDown: ScrollbarContext['onThumbPointerDown'];\n onThumbPositionChange: ScrollbarContext['onThumbPositionChange'];\n onWheelScroll(event: WheelEvent, maxScrollPos: number): void;\n onDragScroll(pointerPos: { x: number; y: number }): void;\n onResize(): void;\n};\ninterface ScrollAreaScrollbarImplProps\n extends Omit<PrimitiveDivProps, keyof ScrollAreaScrollbarImplPrivateProps>,\n ScrollAreaScrollbarImplPrivateProps {}\n\nconst ScrollAreaScrollbarImpl = React.forwardRef<\n ScrollAreaScrollbarImplElement,\n ScrollAreaScrollbarImplProps\n>((props: ScopedProps<ScrollAreaScrollbarImplProps>, forwardedRef) => {\n const {\n __scopeScrollArea,\n sizes,\n hasThumb,\n onThumbChange,\n onThumbPointerUp,\n onThumbPointerDown,\n onThumbPositionChange,\n onDragScroll,\n onWheelScroll,\n onResize,\n ...scrollbarProps\n } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);\n const [scrollbar, setScrollbar] = React.useState<ScrollAreaScrollbarElement | null>(null);\n const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node));\n const rectRef = React.useRef<DOMRect | null>(null);\n const prevWebkitUserSelectRef = React.useRef<string>('');\n const viewport = context.viewport;\n const maxScrollPos = sizes.content - sizes.viewport;\n const handleWheelScroll = useCallbackRef(onWheelScroll);\n const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);\n const handleResize = useDebounceCallback(onResize, 10);\n\n function handleDragScroll(event: React.PointerEvent<HTMLElement>) {\n if (rectRef.current) {\n const x = event.clientX - rectRef.current.left;\n const y = event.clientY - rectRef.current.top;\n onDragScroll({ x, y });\n }\n }\n\n /**\n * We bind wheel event imperatively so we can switch off passive\n * mode for document wheel event to allow it to be prevented\n */\n React.useEffect(() => {\n const handleWheel = (event: WheelEvent) => {\n const element = event.target as HTMLElement;\n const isScrollbarWheel = scrollbar?.contains(element);\n if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);\n };\n document.addEventListener('wheel', handleWheel, { passive: false });\n return () => document.removeEventListener('wheel', handleWheel, { passive: false } as any);\n }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);\n\n /**\n * Update thumb position on sizes change\n */\n React.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);\n\n useResizeObserver(scrollbar, handleResize);\n useResizeObserver(context.content, handleResize);\n\n return (\n <ScrollbarProvider\n scope={__scopeScrollArea}\n scrollbar={scrollbar}\n hasThumb={hasThumb}\n onThumbChange={useCallbackRef(onThumbChange)}\n onThumbPointerUp={useCallbackRef(onThumbPointerUp)}\n onThumbPositionChange={handleThumbPositionChange}\n onThumbPointerDown={useCallbackRef(onThumbPointerDown)}\n >\n <Primitive.div\n {...scrollbarProps}\n ref={composeRefs}\n style={{ position: 'absolute', ...scrollbarProps.style }}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n const mainPointer = 0;\n if (event.button === mainPointer) {\n const element = event.target as HTMLElement;\n element.setPointerCapture(event.pointerId);\n rectRef.current = scrollbar!.getBoundingClientRect();\n // pointer capture doesn't prevent text selection in Safari\n // so we remove text selection manually when scrolling\n prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;\n document.body.style.webkitUserSelect = 'none';\n if (context.viewport) context.viewport.style.scrollBehavior = 'auto';\n handleDragScroll(event);\n }\n })}\n onPointerMove={composeEventHandlers(props.onPointerMove, handleDragScroll)}\n onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {\n const element = event.target as HTMLElement;\n if (element.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId);\n }\n document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;\n if (context.viewport) context.viewport.style.scrollBehavior = '';\n rectRef.current = null;\n })}\n />\n </ScrollbarProvider>\n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaThumb\n * -----------------------------------------------------------------------------------------------*/\n\nconst THUMB_NAME = 'ScrollAreaThumb';\n\ntype ScrollAreaThumbElement = ScrollAreaThumbImplElement;\ninterface ScrollAreaThumbProps extends ScrollAreaThumbImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst ScrollAreaThumb = React.forwardRef<ScrollAreaThumbElement, ScrollAreaThumbProps>(\n (props: ScopedProps<ScrollAreaThumbProps>, forwardedRef) => {\n const { forceMount, ...thumbProps } = props;\n const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);\n return (\n <Presence present={forceMount || scrollbarContext.hasThumb}>\n <ScrollAreaThumbImpl ref={forwardedRef} {...thumbProps} />\n </Presence>\n );\n }\n);\n\ntype ScrollAreaThumbImplElement = React.ComponentRef<typeof Primitive.div>;\ninterface ScrollAreaThumbImplProps extends PrimitiveDivProps {}\n\nconst ScrollAreaThumbImpl = React.forwardRef<ScrollAreaThumbImplElement, ScrollAreaThumbImplProps>(\n (props: ScopedProps<ScrollAreaThumbImplProps>, forwardedRef) => {\n const { __scopeScrollArea, style, ...thumbProps } = props;\n const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);\n const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);\n const { onThumbPositionChange } = scrollbarContext;\n const composedRef = useComposedRefs(forwardedRef, (node) =>\n scrollbarContext.onThumbChange(node)\n );\n const removeUnlinkedScrollListenerRef = React.useRef<() => void>(undefined);\n const debounceScrollEnd = useDebounceCallback(() => {\n if (removeUnlinkedScrollListenerRef.current) {\n removeUnlinkedScrollListenerRef.current();\n removeUnlinkedScrollListenerRef.current = undefined;\n }\n }, 100);\n\n React.useEffect(() => {\n const viewport = scrollAreaContext.viewport;\n if (viewport) {\n /**\n * We only bind to native scroll event so we know when scroll starts and ends.\n * When scroll starts we start a requestAnimationFrame loop that checks for\n * changes to scroll position. That rAF loop triggers our thumb position change\n * when relevant to avoid scroll-linked effects. We cancel the loop when scroll ends.\n * https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects\n */\n const handleScroll = () => {\n debounceScrollEnd();\n if (!removeUnlinkedScrollListenerRef.current) {\n const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);\n removeUnlinkedScrollListenerRef.current = listener;\n onThumbPositionChange();\n }\n };\n onThumbPositionChange();\n viewport.addEventListener('scroll', handleScroll);\n return () => viewport.removeEventListener('scroll', handleScroll);\n }\n }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);\n\n return (\n <Primitive.div\n data-state={scrollbarContext.hasThumb ? 'visible' : 'hidden'}\n {...thumbProps}\n ref={composedRef}\n style={{\n width: 'var(--radix-scroll-area-thumb-width)',\n height: 'var(--radix-scroll-area-thumb-height)',\n ...style,\n }}\n onPointerDownCapture={composeEventHandlers(props.onPointerDownCapture, (event) => {\n const thumb = event.target as HTMLElement;\n const thumbRect = thumb.getBoundingClientRect();\n const x = event.clientX - thumbRect.left;\n const y = event.clientY - thumbRect.top;\n scrollbarContext.onThumbPointerDown({ x, y });\n })}\n onPointerUp={composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)}\n />\n );\n }\n);\n\nScrollAreaThumb.displayName = THUMB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaCorner\n * -----------------------------------------------------------------------------------------------*/\n\nconst CORNER_NAME = 'ScrollAreaCorner';\n\ntype ScrollAreaCornerElement = ScrollAreaCornerImplElement;\ninterface ScrollAreaCornerProps extends ScrollAreaCornerImplProps {}\n\nconst ScrollAreaCorner = React.forwardRef<ScrollAreaCornerElement, ScrollAreaCornerProps>(\n (props: ScopedProps<ScrollAreaCornerProps>, forwardedRef) => {\n const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);\n const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);\n const hasCorner = context.type !== 'scroll' && hasBothScrollbarsVisible;\n return hasCorner ? <ScrollAreaCornerImpl {...props} ref={forwardedRef} /> : null;\n }\n);\n\nScrollAreaCorner.displayName = CORNER_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaCornerImplElement = React.ComponentRef<typeof Primitive.div>;\ninterface ScrollAreaCornerImplProps extends PrimitiveDivProps {}\n\nconst ScrollAreaCornerImpl = React.forwardRef<\n ScrollAreaCornerImplElement,\n ScrollAreaCornerImplProps\n>((props: ScopedProps<ScrollAreaCornerImplProps>, forwardedRef) => {\n const { __scopeScrollArea, ...cornerProps } = props;\n const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);\n const [width, setWidth] = React.useState(0);\n const [height, setHeight] = React.useState(0);\n const hasSize = Boolean(width && height);\n\n useResizeObserver(context.scrollbarX, () => {\n const height = context.scrollbarX?.offsetHeight || 0;\n context.onCornerHeightChange(height);\n setHeight(height);\n });\n\n useResizeObserver(context.scrollbarY, () => {\n const width = context.scrollbarY?.offsetWidth || 0;\n context.onCornerWidthChange(width);\n setWidth(width);\n });\n\n return hasSize ? (\n <Primitive.div\n {...cornerProps}\n ref={forwardedRef}\n style={{\n width,\n height,\n position: 'absolute',\n right: context.dir === 'ltr' ? 0 : undefined,\n left: context.dir === 'rtl' ? 0 : undefined,\n bottom: 0,\n ...props.style,\n }}\n />\n ) : null;\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction toInt(value?: string) {\n return value ? parseInt(value, 10) : 0;\n}\n\nfunction getThumbRatio(viewportSize: number, contentSize: number) {\n const ratio = viewportSize / contentSize;\n return isNaN(ratio) ? 0 : ratio;\n}\n\nfunction getThumbSize(sizes: Sizes) {\n const ratio = getThumbRatio(sizes.viewport, sizes.content);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;\n // minimum of 18 matches macOS minimum\n return Math.max(thumbSize, 18);\n}\n\nfunction getScrollPositionFromPointer(\n pointerPos: number,\n pointerOffset: number,\n sizes: Sizes,\n dir: Direction = 'ltr'\n) {\n const thumbSizePx = getThumbSize(sizes);\n const thumbCenter = thumbSizePx / 2;\n const offset = pointerOffset || thumbCenter;\n const thumbOffsetFromEnd = thumbSizePx - offset;\n const minPointerPos = sizes.scrollbar.paddingStart + offset;\n const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;\n const maxScrollPos = sizes.content - sizes.viewport;\n const scrollRange = dir === 'ltr' ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange as [number, number]);\n return interpolate(pointerPos);\n}\n\nfunction getThumbOffsetFromScroll(scrollPos: number, sizes: Sizes, dir: Direction = 'ltr') {\n const thumbSizePx = getThumbSize(sizes);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const scrollbar = sizes.scrollbar.size - scrollbarPadding;\n const maxScrollPos = sizes.content - sizes.viewport;\n const maxThumbPos = scrollbar - thumbSizePx;\n const scrollClampRange = dir === 'ltr' ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange as [number, number]);\n const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);\n return interpolate(scrollWithoutMomentum);\n}\n\n// https://github.com/tmcw-up-for-adoption/simple-linear-scale/blob/master/index.js\nfunction linearScale(input: readonly [number, number], output: readonly [number, number]) {\n return (value: number) => {\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\n\nfunction isScrollingWithinScrollbarBounds(scrollPos: number, maxScrollPos: number) {\n return scrollPos > 0 && scrollPos < maxScrollPos;\n}\n\n// Custom scroll handler to avoid scroll-linked effects\n// https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects\nconst addUnlinkedScrollListener = (node: HTMLElement, handler = () => {}) => {\n let prevPosition = { left: node.scrollLeft, top: node.scrollTop };\n let rAF = 0;\n (function loop() {\n const position = { left: node.scrollLeft, top: node.scrollTop };\n const isHorizontalScroll = prevPosition.left !== position.left;\n const isVerticalScroll = prevPosition.top !== position.top;\n if (isHorizontalScroll || isVerticalScroll) handler();\n prevPosition = position;\n rAF = window.requestAnimationFrame(loop);\n })();\n return () => window.cancelAnimationFrame(rAF);\n};\n\nfunction useDebounceCallback(callback: () => void, delay: number) {\n const handleCallback = useCallbackRef(callback);\n const debounceTimerRef = React.useRef(0);\n React.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);\n return React.useCallback(() => {\n window.clearTimeout(debounceTimerRef.current);\n debounceTimerRef.current = window.setTimeout(handleCallback, delay);\n }, [handleCallback, delay]);\n}\n\nfunction useResizeObserver(element: HTMLElement | null, onResize: () => void) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n /**\n * Resize Observer will throw an often benign error that says `ResizeObserver loop\n * completed with undelivered notifications`. This means that ResizeObserver was not\n * able to deliver all observations within a single animation frame, so we use\n * `requestAnimationFrame` to ensure we don't deliver unnecessary observations.\n * Further reading: https://github.com/WICG/resize-observer/issues/38\n */\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = ScrollArea;\nconst Viewport = ScrollAreaViewport;\nconst Scrollbar = ScrollAreaScrollbar;\nconst Thumb = ScrollAreaThumb;\nconst Corner = ScrollAreaCorner;\n\nexport {\n createScrollAreaScope,\n //\n ScrollArea,\n ScrollAreaViewport,\n ScrollAreaScrollbar,\n ScrollAreaThumb,\n ScrollAreaCorner,\n //\n Root,\n Viewport,\n Scrollbar,\n Thumb,\n Corner,\n};\nexport type {\n ScrollAreaProps,\n ScrollAreaViewportProps,\n ScrollAreaScrollbarProps,\n ScrollAreaThumbProps,\n ScrollAreaCornerProps,\n};\n","import * as React from 'react';\n\ntype Machine<S> = { [k: string]: { [k: string]: S } };\ntype MachineState<T> = keyof T;\ntype MachineEvent<T> = keyof UnionToIntersection<T[keyof T]>;\n\n// 🤯 https://fettblog.eu/typescript-union-to-intersection/\ntype UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any\n ? R\n : never;\n\nexport function useStateMachine<M>(\n initialState: MachineState<M>,\n machine: M & Machine<MachineState<M>>\n) {\n return React.useReducer((state: MachineState<M>, event: MachineEvent<M>): MachineState<M> => {\n const nextState = (machine[state] as any)[event];\n return nextState ?? state;\n }, initialState);\n}\n","'use client';\n\nimport { Toaster as Sonner } from 'sonner';\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>;\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n return (\n <Sonner\n className=\"toaster group\"\n toastOptions={{\n classNames: {\n toast:\n 'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',\n description: 'group-[.toast]:text-muted-foreground',\n actionButton: 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',\n cancelButton: 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',\n },\n }}\n {...props}\n />\n );\n};\n\nexport { Toaster };\n"],"names":[],"mappings":"2CMOmB,MAA0B,SJL7C,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OKDA,EAAA,EAAA,CAAA,CAAA,wBGuBM,EAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,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,CACL,UAAU,gBACV,aAAc,CACZ,WAAY,CACV,MACE,wIACF,YAAa,uCACb,aAAc,mEACd,aAAc,8DAChB,CACF,EACC,GAAG,CAAK","ignoreList":[1,3,9,10,11,12,13]}
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/hooks/use-notifications.ts","../../../../../../../node_modules/.pnpm/%40radix-ui%2Bnumber%401.1.1/node_modules/%40radix-ui/number/dist/index.mjs","../../../../../../../src/presentation/web/components/layouts/app-shell/app-shell.tsx","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-scroll-area%401.2.10_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types_ba0b3d60c668755d5c2d6349c8477ebb/node_modules/%40radix-ui/react-scroll-area/dist/index.mjs","../../../../../../../src/presentation/web/components/ui/scroll-area.tsx","../../../../../../../src/presentation/web/hooks/use-deferred-mount.ts","../../../../../../../src/presentation/web/components/layouts/app-sidebar/app-sidebar.tsx","../../../../../../../src/presentation/web/components/common/sound-toggle/sound-toggle.tsx","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/volume-off.ts","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-scroll-area%401.2.10_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types_ba0b3d60c668755d5c2d6349c8477ebb/node_modules/%40radix-ui/react-scroll-area/src/scroll-area.tsx","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/house.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/volume-2.ts","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-scroll-area%401.2.10_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types_ba0b3d60c668755d5c2d6349c8477ebb/node_modules/%40radix-ui/react-scroll-area/src/use-state-machine.ts","../../../../../../../src/presentation/web/components/ui/sonner.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { toast } from 'sonner';\nimport type { NotificationEvent } from '@shepai/core/domain/generated/output';\nimport { NotificationEventType, NotificationSeverity } from '@shepai/core/domain/generated/output';\nimport { useAgentEventsContext } from './agent-events-provider';\nimport { useSoundAction } from './use-sound-action';\nimport type { SoundAction } from './use-sound-action';\n\nexport interface UseNotificationsResult {\n requestBrowserPermission: () => Promise<void>;\n browserPermissionState: NotificationPermission;\n}\n\nconst SEVERITY_TO_TOAST: Record<NotificationSeverity, 'success' | 'error' | 'warning' | 'info'> = {\n [NotificationSeverity.Success]: 'success',\n [NotificationSeverity.Error]: 'error',\n [NotificationSeverity.Warning]: 'warning',\n [NotificationSeverity.Info]: 'info',\n};\n\nfunction dispatchToast(event: NotificationEvent): void {\n const method = SEVERITY_TO_TOAST[event.severity] ?? 'info';\n const isActionable = event.eventType === NotificationEventType.WaitingApproval;\n toast[method](event.featureName, {\n description: event.message,\n ...(isActionable && {\n action: {\n label: 'Review',\n onClick: () => {\n window.dispatchEvent(\n new CustomEvent('shep:select-feature', { detail: { featureId: event.featureId } })\n );\n },\n },\n }),\n });\n}\n\nfunction dispatchBrowserNotification(event: NotificationEvent): void {\n if (globalThis.Notification?.permission !== 'granted') {\n return;\n }\n new Notification(`Shep: ${event.featureName}`, {\n body: event.message,\n icon: '/favicon-light.svg',\n });\n}\n\nconst SEVERITY_TO_ACTION: Record<NotificationSeverity, SoundAction> = {\n [NotificationSeverity.Success]: 'notification-success',\n [NotificationSeverity.Error]: 'notification-error',\n [NotificationSeverity.Warning]: 'notification-warning',\n [NotificationSeverity.Info]: 'notification-info',\n};\n\nexport function useNotifications(): UseNotificationsResult {\n const { events } = useAgentEventsContext();\n\n const successSound = useSoundAction('notification-success');\n const errorSound = useSoundAction('notification-error');\n const warningSound = useSoundAction('notification-warning');\n const infoSound = useSoundAction('notification-info');\n\n const soundsByAction = useMemo<Record<string, { play: () => void }>>(\n () => ({\n 'notification-success': successSound,\n 'notification-error': errorSound,\n 'notification-warning': warningSound,\n 'notification-info': infoSound,\n }),\n [successSound, errorSound, warningSound, infoSound]\n );\n\n const [browserPermissionState, setBrowserPermissionState] = useState<NotificationPermission>(\n () => {\n if (typeof globalThis.Notification === 'undefined') return 'default';\n return globalThis.Notification.permission;\n }\n );\n\n // Track how many events from the array we've already processed.\n // Using the array index (instead of lastEvent) prevents React batching\n // from silently dropping events when multiple SSE messages arrive together.\n const processedCountRef = useRef(0);\n\n useEffect(() => {\n if (events.length <= processedCountRef.current) return;\n\n const newEvents = events.slice(processedCountRef.current);\n processedCountRef.current = events.length;\n\n for (const event of newEvents) {\n // Only notify for actionable events and completion celebrations\n if (\n event.severity !== NotificationSeverity.Error &&\n event.severity !== NotificationSeverity.Warning &&\n event.severity !== NotificationSeverity.Success\n ) {\n continue;\n }\n\n dispatchToast(event);\n dispatchBrowserNotification(event);\n\n const actionName = SEVERITY_TO_ACTION[event.severity];\n soundsByAction[actionName]?.play();\n }\n }, [events, soundsByAction]);\n\n const requestBrowserPermission = useCallback(async () => {\n if (typeof globalThis.Notification === 'undefined') return;\n const result = await globalThis.Notification.requestPermission();\n setBrowserPermissionState(result);\n }, []);\n\n return {\n requestBrowserPermission,\n browserPermissionState,\n };\n}\n","// packages/core/number/src/number.ts\nfunction clamp(value, [min, max]) {\n return Math.min(max, Math.max(min, value));\n}\nexport {\n clamp\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport { useCallback, type ReactNode } from 'react';\nimport { SidebarProvider, SidebarInset } from '@/components/ui/sidebar';\nimport { AppSidebar } from '@/components/layouts/app-sidebar';\nimport { AddRepositoryButton } from '@/components/common/add-repository-node';\nimport { ThemeToggle } from '@/components/common/theme-toggle';\nimport { SoundToggle } from '@/components/common/sound-toggle';\nimport { AgentEventsProvider } from '@/hooks/agent-events-provider';\nimport { useNotifications } from '@/hooks/use-notifications';\n\ninterface AppShellProps {\n children: ReactNode;\n}\n\n/** Inner shell that consumes the agent-events context for notifications. */\nfunction AppShellInner({ children }: AppShellProps) {\n // Subscribe to agent lifecycle events and dispatch toast/browser notifications\n useNotifications();\n\n const handleNewFeature = useCallback(() => {\n window.dispatchEvent(new CustomEvent('shep:open-create-drawer'));\n }, []);\n\n const handleRepositorySelect = useCallback((path: string) => {\n window.dispatchEvent(new CustomEvent('shep:add-repository', { detail: { path } }));\n }, []);\n\n return (\n <SidebarProvider>\n <AppSidebar features={[]} onNewFeature={handleNewFeature} />\n <SidebarInset>\n <div className=\"relative h-full\">\n <div className=\"absolute top-3 right-3 z-50 flex gap-1\">\n <AddRepositoryButton onSelect={handleRepositorySelect} />\n <SoundToggle />\n <ThemeToggle />\n </div>\n <main className=\"h-full\">{children}</main>\n </div>\n </SidebarInset>\n </SidebarProvider>\n );\n}\n\nexport function AppShell({ children }: AppShellProps) {\n return (\n <AgentEventsProvider>\n <AppShellInner>{children}</AppShellInner>\n </AgentEventsProvider>\n );\n}\n","\"use client\";\n\n// src/scroll-area.tsx\nimport * as React2 from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { clamp } from \"@radix-ui/number\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\n\n// src/use-state-machine.ts\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/scroll-area.tsx\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar SCROLL_AREA_NAME = \"ScrollArea\";\nvar [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);\nvar [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);\nvar ScrollArea = React2.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeScrollArea,\n type = \"hover\",\n dir,\n scrollHideDelay = 600,\n ...scrollAreaProps\n } = props;\n const [scrollArea, setScrollArea] = React2.useState(null);\n const [viewport, setViewport] = React2.useState(null);\n const [content, setContent] = React2.useState(null);\n const [scrollbarX, setScrollbarX] = React2.useState(null);\n const [scrollbarY, setScrollbarY] = React2.useState(null);\n const [cornerWidth, setCornerWidth] = React2.useState(0);\n const [cornerHeight, setCornerHeight] = React2.useState(0);\n const [scrollbarXEnabled, setScrollbarXEnabled] = React2.useState(false);\n const [scrollbarYEnabled, setScrollbarYEnabled] = React2.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));\n const direction = useDirection(dir);\n return /* @__PURE__ */ jsx(\n ScrollAreaProvider,\n {\n scope: __scopeScrollArea,\n type,\n dir: direction,\n scrollHideDelay,\n scrollArea,\n viewport,\n onViewportChange: setViewport,\n content,\n onContentChange: setContent,\n scrollbarX,\n onScrollbarXChange: setScrollbarX,\n scrollbarXEnabled,\n onScrollbarXEnabledChange: setScrollbarXEnabled,\n scrollbarY,\n onScrollbarYChange: setScrollbarY,\n scrollbarYEnabled,\n onScrollbarYEnabledChange: setScrollbarYEnabled,\n onCornerWidthChange: setCornerWidth,\n onCornerHeightChange: setCornerHeight,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n ...scrollAreaProps,\n ref: composedRefs,\n style: {\n position: \"relative\",\n // Pass corner sizes as CSS vars to reduce re-renders of context consumers\n [\"--radix-scroll-area-corner-width\"]: cornerWidth + \"px\",\n [\"--radix-scroll-area-corner-height\"]: cornerHeight + \"px\",\n ...props.style\n }\n }\n )\n }\n );\n }\n);\nScrollArea.displayName = SCROLL_AREA_NAME;\nvar VIEWPORT_NAME = \"ScrollAreaViewport\";\nvar ScrollAreaViewport = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeScrollArea, children, nonce, ...viewportProps } = props;\n const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);\n const ref = React2.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n \"style\",\n {\n dangerouslySetInnerHTML: {\n __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`\n },\n nonce\n }\n ),\n /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-radix-scroll-area-viewport\": \"\",\n ...viewportProps,\n ref: composedRefs,\n style: {\n /**\n * We don't support `visible` because the intention is to have at least one scrollbar\n * if this component is used and `visible` will behave like `auto` in that case\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description\n *\n * We don't handle `auto` because the intention is for the native implementation\n * to be hidden if using this component. We just want to ensure the node is scrollable\n * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent\n * the browser from having to work out whether to render native scrollbars or not,\n * we tell it to with the intention of hiding them in CSS.\n */\n overflowX: context.scrollbarXEnabled ? \"scroll\" : \"hidden\",\n overflowY: context.scrollbarYEnabled ? \"scroll\" : \"hidden\",\n ...props.style\n },\n children: /* @__PURE__ */ jsx(\"div\", { ref: context.onContentChange, style: { minWidth: \"100%\", display: \"table\" }, children })\n }\n )\n ] });\n }\n);\nScrollAreaViewport.displayName = VIEWPORT_NAME;\nvar SCROLLBAR_NAME = \"ScrollAreaScrollbar\";\nvar ScrollAreaScrollbar = React2.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;\n const isHorizontal = props.orientation === \"horizontal\";\n React2.useEffect(() => {\n isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);\n return () => {\n isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);\n };\n }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);\n return context.type === \"hover\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"scroll\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"auto\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"always\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null;\n }\n);\nScrollAreaScrollbar.displayName = SCROLLBAR_NAME;\nvar ScrollAreaScrollbarHover = React2.forwardRef((props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [visible, setVisible] = React2.useState(false);\n React2.useEffect(() => {\n const scrollArea = context.scrollArea;\n let hideTimer = 0;\n if (scrollArea) {\n const handlePointerEnter = () => {\n window.clearTimeout(hideTimer);\n setVisible(true);\n };\n const handlePointerLeave = () => {\n hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);\n };\n scrollArea.addEventListener(\"pointerenter\", handlePointerEnter);\n scrollArea.addEventListener(\"pointerleave\", handlePointerLeave);\n return () => {\n window.clearTimeout(hideTimer);\n scrollArea.removeEventListener(\"pointerenter\", handlePointerEnter);\n scrollArea.removeEventListener(\"pointerleave\", handlePointerLeave);\n };\n }\n }, [context.scrollArea, context.scrollHideDelay]);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarAuto,\n {\n \"data-state\": visible ? \"visible\" : \"hidden\",\n ...scrollbarProps,\n ref: forwardedRef\n }\n ) });\n});\nvar ScrollAreaScrollbarScroll = React2.forwardRef((props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const isHorizontal = props.orientation === \"horizontal\";\n const debounceScrollEnd = useDebounceCallback(() => send(\"SCROLL_END\"), 100);\n const [state, send] = useStateMachine(\"hidden\", {\n hidden: {\n SCROLL: \"scrolling\"\n },\n scrolling: {\n SCROLL_END: \"idle\",\n POINTER_ENTER: \"interacting\"\n },\n interacting: {\n SCROLL: \"interacting\",\n POINTER_LEAVE: \"idle\"\n },\n idle: {\n HIDE: \"hidden\",\n SCROLL: \"scrolling\",\n POINTER_ENTER: \"interacting\"\n }\n });\n React2.useEffect(() => {\n if (state === \"idle\") {\n const hideTimer = window.setTimeout(() => send(\"HIDE\"), context.scrollHideDelay);\n return () => window.clearTimeout(hideTimer);\n }\n }, [state, context.scrollHideDelay, send]);\n React2.useEffect(() => {\n const viewport = context.viewport;\n const scrollDirection = isHorizontal ? \"scrollLeft\" : \"scrollTop\";\n if (viewport) {\n let prevScrollPos = viewport[scrollDirection];\n const handleScroll = () => {\n const scrollPos = viewport[scrollDirection];\n const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;\n if (hasScrollInDirectionChanged) {\n send(\"SCROLL\");\n debounceScrollEnd();\n }\n prevScrollPos = scrollPos;\n };\n viewport.addEventListener(\"scroll\", handleScroll);\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }\n }, [context.viewport, isHorizontal, send, debounceScrollEnd]);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || state !== \"hidden\", children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarVisible,\n {\n \"data-state\": state === \"hidden\" ? \"hidden\" : \"visible\",\n ...scrollbarProps,\n ref: forwardedRef,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send(\"POINTER_ENTER\")),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send(\"POINTER_LEAVE\"))\n }\n ) });\n});\nvar ScrollAreaScrollbarAuto = React2.forwardRef((props, forwardedRef) => {\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { forceMount, ...scrollbarProps } = props;\n const [visible, setVisible] = React2.useState(false);\n const isHorizontal = props.orientation === \"horizontal\";\n const handleResize = useDebounceCallback(() => {\n if (context.viewport) {\n const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;\n const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;\n setVisible(isHorizontal ? isOverflowX : isOverflowY);\n }\n }, 10);\n useResizeObserver(context.viewport, handleResize);\n useResizeObserver(context.content, handleResize);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarVisible,\n {\n \"data-state\": visible ? \"visible\" : \"hidden\",\n ...scrollbarProps,\n ref: forwardedRef\n }\n ) });\n});\nvar ScrollAreaScrollbarVisible = React2.forwardRef((props, forwardedRef) => {\n const { orientation = \"vertical\", ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const thumbRef = React2.useRef(null);\n const pointerOffsetRef = React2.useRef(0);\n const [sizes, setSizes] = React2.useState({\n content: 0,\n viewport: 0,\n scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }\n });\n const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);\n const commonProps = {\n ...scrollbarProps,\n sizes,\n onSizesChange: setSizes,\n hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),\n onThumbChange: (thumb) => thumbRef.current = thumb,\n onThumbPointerUp: () => pointerOffsetRef.current = 0,\n onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos\n };\n function getScrollPosition(pointerPos, dir) {\n return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);\n }\n if (orientation === \"horizontal\") {\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarX,\n {\n ...commonProps,\n ref: forwardedRef,\n onThumbPositionChange: () => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollLeft;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);\n thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;\n }\n },\n onWheelScroll: (scrollPos) => {\n if (context.viewport) context.viewport.scrollLeft = scrollPos;\n },\n onDragScroll: (pointerPos) => {\n if (context.viewport) {\n context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);\n }\n }\n }\n );\n }\n if (orientation === \"vertical\") {\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarY,\n {\n ...commonProps,\n ref: forwardedRef,\n onThumbPositionChange: () => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollTop;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes);\n thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;\n }\n },\n onWheelScroll: (scrollPos) => {\n if (context.viewport) context.viewport.scrollTop = scrollPos;\n },\n onDragScroll: (pointerPos) => {\n if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);\n }\n }\n );\n }\n return null;\n});\nvar ScrollAreaScrollbarX = React2.forwardRef((props, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React2.useState();\n const ref = React2.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);\n React2.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarImpl,\n {\n \"data-orientation\": \"horizontal\",\n ...scrollbarProps,\n ref: composeRefs,\n sizes,\n style: {\n bottom: 0,\n left: context.dir === \"rtl\" ? \"var(--radix-scroll-area-corner-width)\" : 0,\n right: context.dir === \"ltr\" ? \"var(--radix-scroll-area-corner-width)\" : 0,\n [\"--radix-scroll-area-thumb-width\"]: getThumbSize(sizes) + \"px\",\n ...props.style\n },\n onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x),\n onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x),\n onWheelScroll: (event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollLeft + event.deltaX;\n props.onWheelScroll(scrollPos);\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n },\n onResize: () => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollWidth,\n viewport: context.viewport.offsetWidth,\n scrollbar: {\n size: ref.current.clientWidth,\n paddingStart: toInt(computedStyle.paddingLeft),\n paddingEnd: toInt(computedStyle.paddingRight)\n }\n });\n }\n }\n }\n );\n});\nvar ScrollAreaScrollbarY = React2.forwardRef((props, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React2.useState();\n const ref = React2.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);\n React2.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarImpl,\n {\n \"data-orientation\": \"vertical\",\n ...scrollbarProps,\n ref: composeRefs,\n sizes,\n style: {\n top: 0,\n right: context.dir === \"ltr\" ? 0 : void 0,\n left: context.dir === \"rtl\" ? 0 : void 0,\n bottom: \"var(--radix-scroll-area-corner-height)\",\n [\"--radix-scroll-area-thumb-height\"]: getThumbSize(sizes) + \"px\",\n ...props.style\n },\n onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y),\n onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y),\n onWheelScroll: (event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollTop + event.deltaY;\n props.onWheelScroll(scrollPos);\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n },\n onResize: () => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollHeight,\n viewport: context.viewport.offsetHeight,\n scrollbar: {\n size: ref.current.clientHeight,\n paddingStart: toInt(computedStyle.paddingTop),\n paddingEnd: toInt(computedStyle.paddingBottom)\n }\n });\n }\n }\n }\n );\n});\nvar [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME);\nvar ScrollAreaScrollbarImpl = React2.forwardRef((props, forwardedRef) => {\n const {\n __scopeScrollArea,\n sizes,\n hasThumb,\n onThumbChange,\n onThumbPointerUp,\n onThumbPointerDown,\n onThumbPositionChange,\n onDragScroll,\n onWheelScroll,\n onResize,\n ...scrollbarProps\n } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);\n const [scrollbar, setScrollbar] = React2.useState(null);\n const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node));\n const rectRef = React2.useRef(null);\n const prevWebkitUserSelectRef = React2.useRef(\"\");\n const viewport = context.viewport;\n const maxScrollPos = sizes.content - sizes.viewport;\n const handleWheelScroll = useCallbackRef(onWheelScroll);\n const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);\n const handleResize = useDebounceCallback(onResize, 10);\n function handleDragScroll(event) {\n if (rectRef.current) {\n const x = event.clientX - rectRef.current.left;\n const y = event.clientY - rectRef.current.top;\n onDragScroll({ x, y });\n }\n }\n React2.useEffect(() => {\n const handleWheel = (event) => {\n const element = event.target;\n const isScrollbarWheel = scrollbar?.contains(element);\n if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);\n };\n document.addEventListener(\"wheel\", handleWheel, { passive: false });\n return () => document.removeEventListener(\"wheel\", handleWheel, { passive: false });\n }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);\n React2.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);\n useResizeObserver(scrollbar, handleResize);\n useResizeObserver(context.content, handleResize);\n return /* @__PURE__ */ jsx(\n ScrollbarProvider,\n {\n scope: __scopeScrollArea,\n scrollbar,\n hasThumb,\n onThumbChange: useCallbackRef(onThumbChange),\n onThumbPointerUp: useCallbackRef(onThumbPointerUp),\n onThumbPositionChange: handleThumbPositionChange,\n onThumbPointerDown: useCallbackRef(onThumbPointerDown),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...scrollbarProps,\n ref: composeRefs,\n style: { position: \"absolute\", ...scrollbarProps.style },\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n const mainPointer = 0;\n if (event.button === mainPointer) {\n const element = event.target;\n element.setPointerCapture(event.pointerId);\n rectRef.current = scrollbar.getBoundingClientRect();\n prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;\n document.body.style.webkitUserSelect = \"none\";\n if (context.viewport) context.viewport.style.scrollBehavior = \"auto\";\n handleDragScroll(event);\n }\n }),\n onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n const element = event.target;\n if (element.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId);\n }\n document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;\n if (context.viewport) context.viewport.style.scrollBehavior = \"\";\n rectRef.current = null;\n })\n }\n )\n }\n );\n});\nvar THUMB_NAME = \"ScrollAreaThumb\";\nvar ScrollAreaThumb = React2.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...thumbProps } = props;\n const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });\n }\n);\nvar ScrollAreaThumbImpl = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeScrollArea, style, ...thumbProps } = props;\n const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);\n const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);\n const { onThumbPositionChange } = scrollbarContext;\n const composedRef = useComposedRefs(\n forwardedRef,\n (node) => scrollbarContext.onThumbChange(node)\n );\n const removeUnlinkedScrollListenerRef = React2.useRef(void 0);\n const debounceScrollEnd = useDebounceCallback(() => {\n if (removeUnlinkedScrollListenerRef.current) {\n removeUnlinkedScrollListenerRef.current();\n removeUnlinkedScrollListenerRef.current = void 0;\n }\n }, 100);\n React2.useEffect(() => {\n const viewport = scrollAreaContext.viewport;\n if (viewport) {\n const handleScroll = () => {\n debounceScrollEnd();\n if (!removeUnlinkedScrollListenerRef.current) {\n const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);\n removeUnlinkedScrollListenerRef.current = listener;\n onThumbPositionChange();\n }\n };\n onThumbPositionChange();\n viewport.addEventListener(\"scroll\", handleScroll);\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }\n }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": scrollbarContext.hasThumb ? \"visible\" : \"hidden\",\n ...thumbProps,\n ref: composedRef,\n style: {\n width: \"var(--radix-scroll-area-thumb-width)\",\n height: \"var(--radix-scroll-area-thumb-height)\",\n ...style\n },\n onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {\n const thumb = event.target;\n const thumbRect = thumb.getBoundingClientRect();\n const x = event.clientX - thumbRect.left;\n const y = event.clientY - thumbRect.top;\n scrollbarContext.onThumbPointerDown({ x, y });\n }),\n onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)\n }\n );\n }\n);\nScrollAreaThumb.displayName = THUMB_NAME;\nvar CORNER_NAME = \"ScrollAreaCorner\";\nvar ScrollAreaCorner = React2.forwardRef(\n (props, forwardedRef) => {\n const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);\n const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);\n const hasCorner = context.type !== \"scroll\" && hasBothScrollbarsVisible;\n return hasCorner ? /* @__PURE__ */ jsx(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null;\n }\n);\nScrollAreaCorner.displayName = CORNER_NAME;\nvar ScrollAreaCornerImpl = React2.forwardRef((props, forwardedRef) => {\n const { __scopeScrollArea, ...cornerProps } = props;\n const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);\n const [width, setWidth] = React2.useState(0);\n const [height, setHeight] = React2.useState(0);\n const hasSize = Boolean(width && height);\n useResizeObserver(context.scrollbarX, () => {\n const height2 = context.scrollbarX?.offsetHeight || 0;\n context.onCornerHeightChange(height2);\n setHeight(height2);\n });\n useResizeObserver(context.scrollbarY, () => {\n const width2 = context.scrollbarY?.offsetWidth || 0;\n context.onCornerWidthChange(width2);\n setWidth(width2);\n });\n return hasSize ? /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...cornerProps,\n ref: forwardedRef,\n style: {\n width,\n height,\n position: \"absolute\",\n right: context.dir === \"ltr\" ? 0 : void 0,\n left: context.dir === \"rtl\" ? 0 : void 0,\n bottom: 0,\n ...props.style\n }\n }\n ) : null;\n});\nfunction toInt(value) {\n return value ? parseInt(value, 10) : 0;\n}\nfunction getThumbRatio(viewportSize, contentSize) {\n const ratio = viewportSize / contentSize;\n return isNaN(ratio) ? 0 : ratio;\n}\nfunction getThumbSize(sizes) {\n const ratio = getThumbRatio(sizes.viewport, sizes.content);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;\n return Math.max(thumbSize, 18);\n}\nfunction getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = \"ltr\") {\n const thumbSizePx = getThumbSize(sizes);\n const thumbCenter = thumbSizePx / 2;\n const offset = pointerOffset || thumbCenter;\n const thumbOffsetFromEnd = thumbSizePx - offset;\n const minPointerPos = sizes.scrollbar.paddingStart + offset;\n const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;\n const maxScrollPos = sizes.content - sizes.viewport;\n const scrollRange = dir === \"ltr\" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange);\n return interpolate(pointerPos);\n}\nfunction getThumbOffsetFromScroll(scrollPos, sizes, dir = \"ltr\") {\n const thumbSizePx = getThumbSize(sizes);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const scrollbar = sizes.scrollbar.size - scrollbarPadding;\n const maxScrollPos = sizes.content - sizes.viewport;\n const maxThumbPos = scrollbar - thumbSizePx;\n const scrollClampRange = dir === \"ltr\" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange);\n const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);\n return interpolate(scrollWithoutMomentum);\n}\nfunction linearScale(input, output) {\n return (value) => {\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\nfunction isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {\n return scrollPos > 0 && scrollPos < maxScrollPos;\n}\nvar addUnlinkedScrollListener = (node, handler = () => {\n}) => {\n let prevPosition = { left: node.scrollLeft, top: node.scrollTop };\n let rAF = 0;\n (function loop() {\n const position = { left: node.scrollLeft, top: node.scrollTop };\n const isHorizontalScroll = prevPosition.left !== position.left;\n const isVerticalScroll = prevPosition.top !== position.top;\n if (isHorizontalScroll || isVerticalScroll) handler();\n prevPosition = position;\n rAF = window.requestAnimationFrame(loop);\n })();\n return () => window.cancelAnimationFrame(rAF);\n};\nfunction useDebounceCallback(callback, delay) {\n const handleCallback = useCallbackRef(callback);\n const debounceTimerRef = React2.useRef(0);\n React2.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);\n return React2.useCallback(() => {\n window.clearTimeout(debounceTimerRef.current);\n debounceTimerRef.current = window.setTimeout(handleCallback, delay);\n }, [handleCallback, delay]);\n}\nfunction useResizeObserver(element, onResize) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\nvar Root = ScrollArea;\nvar Viewport = ScrollAreaViewport;\nvar Scrollbar = ScrollAreaScrollbar;\nvar Thumb = ScrollAreaThumb;\nvar Corner = ScrollAreaCorner;\nexport {\n Corner,\n Root,\n ScrollArea,\n ScrollAreaCorner,\n ScrollAreaScrollbar,\n ScrollAreaThumb,\n ScrollAreaViewport,\n Scrollbar,\n Thumb,\n Viewport,\n createScrollAreaScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nimport { cn } from '@/lib/utils';\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn('relative', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\nfunction ScrollBar({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none',\n orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent',\n orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"bg-border relative flex-1 rounded-full\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n","'use client';\n\nimport { useState, useEffect } from 'react';\n\n/**\n * Defers mount/unmount of content to allow opacity transitions.\n * When expanding: mounts immediately, then sets visible on next frame.\n * When collapsing: hides immediately, then unmounts after `ms` delay.\n */\nexport function useDeferredMount(isCollapsed: boolean, ms: number) {\n const [mounted, setMounted] = useState(!isCollapsed);\n const [visible, setVisible] = useState(!isCollapsed);\n\n useEffect(() => {\n if (!isCollapsed) {\n setMounted(true);\n // delay visibility by one frame so the element mounts at opacity-0 first\n const raf = requestAnimationFrame(() => setVisible(true));\n return () => cancelAnimationFrame(raf);\n }\n setVisible(false);\n const t = window.setTimeout(() => setMounted(false), ms);\n return () => window.clearTimeout(t);\n }, [isCollapsed, ms]);\n\n return { mounted, visible };\n}\n","'use client';\n\nimport { usePathname } from 'next/navigation';\nimport { Home, Wrench, Puzzle, Plus } from 'lucide-react';\nimport {\n Sidebar,\n SidebarHeader,\n SidebarContent,\n SidebarFooter,\n SidebarMenu,\n SidebarMenuItem,\n SidebarMenuButton,\n SidebarRail,\n useSidebar,\n} from '@/components/ui/sidebar';\nimport { ScrollArea } from '@/components/ui/scroll-area';\nimport { SidebarNavItem } from '@/components/common/sidebar-nav-item';\nimport { SidebarCollapseToggle } from '@/components/common/sidebar-collapse-toggle';\nimport { ShepLogo } from '@/components/common/shep-logo';\nimport { FeatureListItem } from '@/components/common/feature-list-item';\nimport { FeatureStatusGroup } from '@/components/common/feature-status-group';\nimport { SidebarSectionHeader } from '@/components/common/sidebar-section-header';\nimport { featureStatusConfig, featureStatusOrder } from '@/components/common/feature-status-config';\nimport type { FeatureStatus } from '@/components/common/feature-status-config';\nimport { useDeferredMount } from '@/hooks/use-deferred-mount';\nimport { featureFlags } from '@/lib/feature-flags';\n\ninterface FeatureItem {\n name: string;\n status: FeatureStatus;\n startedAt?: number;\n duration?: string;\n}\n\nexport interface AppSidebarProps {\n features: FeatureItem[];\n onNewFeature?: () => void;\n onFeatureClick?: (name: string) => void;\n onFeaturesFolderClick?: () => void;\n onFeaturesMenuClick?: () => void;\n}\n\nexport function AppSidebar({\n features,\n onNewFeature,\n onFeatureClick,\n onFeaturesFolderClick,\n onFeaturesMenuClick,\n}: AppSidebarProps) {\n const pathname = usePathname();\n const { state } = useSidebar();\n const collapsed = state === 'collapsed';\n const { mounted: showExpanded, visible: expandedVisible } = useDeferredMount(collapsed, 200);\n\n const grouped = featureStatusOrder.map((key) => {\n const { label } = featureStatusConfig[key];\n const items = features.filter((f) => f.status === key);\n return { key, label, items };\n });\n\n return (\n <Sidebar data-testid=\"app-sidebar\" collapsible=\"icon\">\n <SidebarHeader>\n <SidebarMenu>\n <SidebarMenuItem>\n <div className=\"flex h-8 items-center group-data-[collapsible=icon]:justify-center\">\n {showExpanded ? (\n <div\n className={[\n 'flex min-w-0 flex-1 items-center gap-2 overflow-hidden px-2',\n 'transition-opacity duration-200 ease-out',\n expandedVisible ? 'opacity-100' : 'opacity-0',\n ].join(' ')}\n aria-hidden={!expandedVisible}\n >\n <ShepLogo className=\"shrink-0\" size={20} />\n <span className=\"truncate text-sm font-semibold tracking-tight\">Shep</span>\n </div>\n ) : null}\n <SidebarCollapseToggle className=\"shrink-0 transition-all duration-200\" />\n </div>\n </SidebarMenuItem>\n\n <SidebarNavItem icon={Home} label=\"Control Center\" href=\"/\" active={pathname === '/'} />\n <SidebarNavItem\n icon={Wrench}\n label=\"Tools\"\n href=\"/tools\"\n active={pathname === '/tools'}\n />\n {featureFlags.skills ? (\n <SidebarNavItem\n icon={Puzzle}\n label=\"Skills\"\n href=\"/skills\"\n active={pathname === '/skills'}\n />\n ) : null}\n </SidebarMenu>\n </SidebarHeader>\n\n <SidebarContent>\n {showExpanded ? (\n <div\n className={[\n 'min-w-0 overflow-hidden transition-opacity duration-200 ease-out',\n '[&_[data-sidebar=group-label]]:!mt-0 [&_[data-sidebar=group-label]]:!opacity-100 [&_[data-sidebar=group-label]]:!transition-none',\n expandedVisible ? 'opacity-100' : 'opacity-0',\n ].join(' ')}\n >\n <SidebarSectionHeader\n label=\"Features\"\n onFolderClick={onFeaturesFolderClick}\n onMenuClick={onFeaturesMenuClick}\n />\n <ScrollArea>\n {grouped.map(({ key, label, items }) =>\n items.length > 0 ? (\n <FeatureStatusGroup key={key} label={label} count={items.length}>\n {items.map((feature) => (\n <FeatureListItem\n key={feature.name}\n name={feature.name}\n status={feature.status}\n startedAt={feature.startedAt}\n duration={feature.duration}\n onClick={onFeatureClick ? () => onFeatureClick(feature.name) : undefined}\n />\n ))}\n </FeatureStatusGroup>\n ) : null\n )}\n </ScrollArea>\n </div>\n ) : null}\n </SidebarContent>\n\n <SidebarFooter>\n <SidebarMenu>\n <SidebarMenuItem>\n <SidebarMenuButton onClick={onNewFeature} tooltip=\"New feature\">\n <Plus />\n <span>New feature</span>\n </SidebarMenuButton>\n </SidebarMenuItem>\n </SidebarMenu>\n </SidebarFooter>\n\n <SidebarRail />\n </Sidebar>\n );\n}\n","'use client';\n\nimport { Volume2, VolumeOff } from 'lucide-react';\nimport { Button } from '@/components/ui/button';\nimport { useSoundEnabled } from '@/hooks/use-sound-enabled';\n\nexport function SoundToggle() {\n const { enabled, toggle } = useSoundEnabled();\n\n return (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={toggle}\n aria-label={enabled ? 'Mute sounds' : 'Unmute sounds'}\n >\n {enabled ? <Volume2 className=\"h-5 w-5\" /> : <VolumeOff className=\"h-5 w-5\" />}\n <span className=\"sr-only\">Toggle sound</span>\n </Button>\n );\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M16 9a5 5 0 0 1 .95 2.293', key: '1fgyg8' }],\n ['path', { d: 'M19.364 5.636a9 9 0 0 1 1.889 9.96', key: 'l3zxae' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n [\n 'path',\n {\n d: 'm7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11',\n key: '1gbwow',\n },\n ],\n ['path', { d: 'M9.828 4.172A.686.686 0 0 1 11 4.657v.686', key: 's2je0y' }],\n];\n\n/**\n * @component @name VolumeOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgOWE1IDUgMCAwIDEgLjk1IDIuMjkzIiAvPgogIDxwYXRoIGQ9Ik0xOS4zNjQgNS42MzZhOSA5IDAgMCAxIDEuODg5IDkuOTYiIC8+CiAgPHBhdGggZD0ibTIgMiAyMCAyMCIgLz4KICA8cGF0aCBkPSJtNyA3LS41ODcuNTg3QTEuNCAxLjQgMCAwIDEgNS40MTYgOEgzYTEgMSAwIDAgMC0xIDF2NmExIDEgMCAwIDAgMSAxaDIuNDE2YTEuNCAxLjQgMCAwIDEgLjk5Ny40MTNsMy4zODMgMy4zODRBLjcwNS43MDUgMCAwIDAgMTEgMTkuMjk4VjExIiAvPgogIDxwYXRoIGQ9Ik05LjgyOCA0LjE3MkEuNjg2LjY4NiAwIDAgMSAxMSA0LjY1N3YuNjg2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/volume-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst VolumeOff = createLucideIcon('volume-off', __iconNode);\n\nexport default VolumeOff;\n","import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Presence } from '@radix-ui/react-presence';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { useLayoutEffect } from '@radix-ui/react-use-layout-effect';\nimport { clamp } from '@radix-ui/number';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useStateMachine } from './use-state-machine';\n\nimport type { Scope } from '@radix-ui/react-context';\n\ntype Direction = 'ltr' | 'rtl';\ntype Sizes = {\n content: number;\n viewport: number;\n scrollbar: {\n size: number;\n paddingStart: number;\n paddingEnd: number;\n };\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollArea\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLL_AREA_NAME = 'ScrollArea';\n\ntype ScopedProps<P> = P & { __scopeScrollArea?: Scope };\nconst [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);\n\ntype ScrollAreaContextValue = {\n type: 'auto' | 'always' | 'scroll' | 'hover';\n dir: Direction;\n scrollHideDelay: number;\n scrollArea: ScrollAreaElement | null;\n viewport: ScrollAreaViewportElement | null;\n onViewportChange(viewport: ScrollAreaViewportElement | null): void;\n content: HTMLDivElement | null;\n onContentChange(content: HTMLDivElement): void;\n scrollbarX: ScrollAreaScrollbarElement | null;\n onScrollbarXChange(scrollbar: ScrollAreaScrollbarElement | null): void;\n scrollbarXEnabled: boolean;\n onScrollbarXEnabledChange(rendered: boolean): void;\n scrollbarY: ScrollAreaScrollbarElement | null;\n onScrollbarYChange(scrollbar: ScrollAreaScrollbarElement | null): void;\n scrollbarYEnabled: boolean;\n onScrollbarYEnabledChange(rendered: boolean): void;\n onCornerWidthChange(width: number): void;\n onCornerHeightChange(height: number): void;\n};\n\nconst [ScrollAreaProvider, useScrollAreaContext] =\n createScrollAreaContext<ScrollAreaContextValue>(SCROLL_AREA_NAME);\n\ntype ScrollAreaElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface ScrollAreaProps extends PrimitiveDivProps {\n type?: ScrollAreaContextValue['type'];\n dir?: ScrollAreaContextValue['dir'];\n scrollHideDelay?: number;\n}\n\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>(\n (props: ScopedProps<ScrollAreaProps>, forwardedRef) => {\n const {\n __scopeScrollArea,\n type = 'hover',\n dir,\n scrollHideDelay = 600,\n ...scrollAreaProps\n } = props;\n const [scrollArea, setScrollArea] = React.useState<ScrollAreaElement | null>(null);\n const [viewport, setViewport] = React.useState<ScrollAreaViewportElement | null>(null);\n const [content, setContent] = React.useState<HTMLDivElement | null>(null);\n const [scrollbarX, setScrollbarX] = React.useState<ScrollAreaScrollbarElement | null>(null);\n const [scrollbarY, setScrollbarY] = React.useState<ScrollAreaScrollbarElement | null>(null);\n const [cornerWidth, setCornerWidth] = React.useState(0);\n const [cornerHeight, setCornerHeight] = React.useState(0);\n const [scrollbarXEnabled, setScrollbarXEnabled] = React.useState(false);\n const [scrollbarYEnabled, setScrollbarYEnabled] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));\n const direction = useDirection(dir);\n\n return (\n <ScrollAreaProvider\n scope={__scopeScrollArea}\n type={type}\n dir={direction}\n scrollHideDelay={scrollHideDelay}\n scrollArea={scrollArea}\n viewport={viewport}\n onViewportChange={setViewport}\n content={content}\n onContentChange={setContent}\n scrollbarX={scrollbarX}\n onScrollbarXChange={setScrollbarX}\n scrollbarXEnabled={scrollbarXEnabled}\n onScrollbarXEnabledChange={setScrollbarXEnabled}\n scrollbarY={scrollbarY}\n onScrollbarYChange={setScrollbarY}\n scrollbarYEnabled={scrollbarYEnabled}\n onScrollbarYEnabledChange={setScrollbarYEnabled}\n onCornerWidthChange={setCornerWidth}\n onCornerHeightChange={setCornerHeight}\n >\n <Primitive.div\n dir={direction}\n {...scrollAreaProps}\n ref={composedRefs}\n style={{\n position: 'relative',\n // Pass corner sizes as CSS vars to reduce re-renders of context consumers\n ['--radix-scroll-area-corner-width' as any]: cornerWidth + 'px',\n ['--radix-scroll-area-corner-height' as any]: cornerHeight + 'px',\n ...props.style,\n }}\n />\n </ScrollAreaProvider>\n );\n }\n);\n\nScrollArea.displayName = SCROLL_AREA_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaViewport\n * -----------------------------------------------------------------------------------------------*/\n\nconst VIEWPORT_NAME = 'ScrollAreaViewport';\n\ntype ScrollAreaViewportElement = React.ComponentRef<typeof Primitive.div>;\ninterface ScrollAreaViewportProps extends PrimitiveDivProps {\n nonce?: string;\n}\n\nconst ScrollAreaViewport = React.forwardRef<ScrollAreaViewportElement, ScrollAreaViewportProps>(\n (props: ScopedProps<ScrollAreaViewportProps>, forwardedRef) => {\n const { __scopeScrollArea, children, nonce, ...viewportProps } = props;\n const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);\n const ref = React.useRef<ScrollAreaViewportElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n return (\n <>\n {/* Hide scrollbars cross-browser and enable momentum scroll for touch devices */}\n <style\n dangerouslySetInnerHTML={{\n __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`,\n }}\n nonce={nonce}\n />\n <Primitive.div\n data-radix-scroll-area-viewport=\"\"\n {...viewportProps}\n ref={composedRefs}\n style={{\n /**\n * We don't support `visible` because the intention is to have at least one scrollbar\n * if this component is used and `visible` will behave like `auto` in that case\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description\n *\n * We don't handle `auto` because the intention is for the native implementation\n * to be hidden if using this component. We just want to ensure the node is scrollable\n * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent\n * the browser from having to work out whether to render native scrollbars or not,\n * we tell it to with the intention of hiding them in CSS.\n */\n overflowX: context.scrollbarXEnabled ? 'scroll' : 'hidden',\n overflowY: context.scrollbarYEnabled ? 'scroll' : 'hidden',\n ...props.style,\n }}\n >\n {/**\n * `display: table` ensures our content div will match the size of its children in both\n * horizontal and vertical axis so we can determine if scroll width/height changed and\n * recalculate thumb sizes. This doesn't account for children with *percentage*\n * widths that change. We'll wait to see what use-cases consumers come up with there\n * before trying to resolve it.\n */}\n <div ref={context.onContentChange} style={{ minWidth: '100%', display: 'table' }}>\n {children}\n </div>\n </Primitive.div>\n </>\n );\n }\n);\n\nScrollAreaViewport.displayName = VIEWPORT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaScrollbar\n * -----------------------------------------------------------------------------------------------*/\n\nconst SCROLLBAR_NAME = 'ScrollAreaScrollbar';\n\ntype ScrollAreaScrollbarElement = ScrollAreaScrollbarVisibleElement;\ninterface ScrollAreaScrollbarProps extends ScrollAreaScrollbarVisibleProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbar = React.forwardRef<ScrollAreaScrollbarElement, ScrollAreaScrollbarProps>(\n (props: ScopedProps<ScrollAreaScrollbarProps>, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;\n const isHorizontal = props.orientation === 'horizontal';\n\n React.useEffect(() => {\n isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);\n return () => {\n isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);\n };\n }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);\n\n return context.type === 'hover' ? (\n <ScrollAreaScrollbarHover {...scrollbarProps} ref={forwardedRef} forceMount={forceMount} />\n ) : context.type === 'scroll' ? (\n <ScrollAreaScrollbarScroll {...scrollbarProps} ref={forwardedRef} forceMount={forceMount} />\n ) : context.type === 'auto' ? (\n <ScrollAreaScrollbarAuto {...scrollbarProps} ref={forwardedRef} forceMount={forceMount} />\n ) : context.type === 'always' ? (\n <ScrollAreaScrollbarVisible {...scrollbarProps} ref={forwardedRef} />\n ) : null;\n }\n);\n\nScrollAreaScrollbar.displayName = SCROLLBAR_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaScrollbarHoverElement = ScrollAreaScrollbarAutoElement;\ninterface ScrollAreaScrollbarHoverProps extends ScrollAreaScrollbarAutoProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbarHover = React.forwardRef<\n ScrollAreaScrollbarHoverElement,\n ScrollAreaScrollbarHoverProps\n>((props: ScopedProps<ScrollAreaScrollbarHoverProps>, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [visible, setVisible] = React.useState(false);\n\n React.useEffect(() => {\n const scrollArea = context.scrollArea;\n let hideTimer = 0;\n if (scrollArea) {\n const handlePointerEnter = () => {\n window.clearTimeout(hideTimer);\n setVisible(true);\n };\n const handlePointerLeave = () => {\n hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);\n };\n scrollArea.addEventListener('pointerenter', handlePointerEnter);\n scrollArea.addEventListener('pointerleave', handlePointerLeave);\n return () => {\n window.clearTimeout(hideTimer);\n scrollArea.removeEventListener('pointerenter', handlePointerEnter);\n scrollArea.removeEventListener('pointerleave', handlePointerLeave);\n };\n }\n }, [context.scrollArea, context.scrollHideDelay]);\n\n return (\n <Presence present={forceMount || visible}>\n <ScrollAreaScrollbarAuto\n data-state={visible ? 'visible' : 'hidden'}\n {...scrollbarProps}\n ref={forwardedRef}\n />\n </Presence>\n );\n});\n\ntype ScrollAreaScrollbarScrollElement = ScrollAreaScrollbarVisibleElement;\ninterface ScrollAreaScrollbarScrollProps extends ScrollAreaScrollbarVisibleProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbarScroll = React.forwardRef<\n ScrollAreaScrollbarScrollElement,\n ScrollAreaScrollbarScrollProps\n>((props: ScopedProps<ScrollAreaScrollbarScrollProps>, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const isHorizontal = props.orientation === 'horizontal';\n const debounceScrollEnd = useDebounceCallback(() => send('SCROLL_END'), 100);\n const [state, send] = useStateMachine('hidden', {\n hidden: {\n SCROLL: 'scrolling',\n },\n scrolling: {\n SCROLL_END: 'idle',\n POINTER_ENTER: 'interacting',\n },\n interacting: {\n SCROLL: 'interacting',\n POINTER_LEAVE: 'idle',\n },\n idle: {\n HIDE: 'hidden',\n SCROLL: 'scrolling',\n POINTER_ENTER: 'interacting',\n },\n });\n\n React.useEffect(() => {\n if (state === 'idle') {\n const hideTimer = window.setTimeout(() => send('HIDE'), context.scrollHideDelay);\n return () => window.clearTimeout(hideTimer);\n }\n }, [state, context.scrollHideDelay, send]);\n\n React.useEffect(() => {\n const viewport = context.viewport;\n const scrollDirection = isHorizontal ? 'scrollLeft' : 'scrollTop';\n\n if (viewport) {\n let prevScrollPos = viewport[scrollDirection];\n const handleScroll = () => {\n const scrollPos = viewport[scrollDirection];\n const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;\n if (hasScrollInDirectionChanged) {\n send('SCROLL');\n debounceScrollEnd();\n }\n prevScrollPos = scrollPos;\n };\n viewport.addEventListener('scroll', handleScroll);\n return () => viewport.removeEventListener('scroll', handleScroll);\n }\n }, [context.viewport, isHorizontal, send, debounceScrollEnd]);\n\n return (\n <Presence present={forceMount || state !== 'hidden'}>\n <ScrollAreaScrollbarVisible\n data-state={state === 'hidden' ? 'hidden' : 'visible'}\n {...scrollbarProps}\n ref={forwardedRef}\n onPointerEnter={composeEventHandlers(props.onPointerEnter, () => send('POINTER_ENTER'))}\n onPointerLeave={composeEventHandlers(props.onPointerLeave, () => send('POINTER_LEAVE'))}\n />\n </Presence>\n );\n});\n\ntype ScrollAreaScrollbarAutoElement = ScrollAreaScrollbarVisibleElement;\ninterface ScrollAreaScrollbarAutoProps extends ScrollAreaScrollbarVisibleProps {\n forceMount?: true;\n}\n\nconst ScrollAreaScrollbarAuto = React.forwardRef<\n ScrollAreaScrollbarAutoElement,\n ScrollAreaScrollbarAutoProps\n>((props: ScopedProps<ScrollAreaScrollbarAutoProps>, forwardedRef) => {\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { forceMount, ...scrollbarProps } = props;\n const [visible, setVisible] = React.useState(false);\n const isHorizontal = props.orientation === 'horizontal';\n const handleResize = useDebounceCallback(() => {\n if (context.viewport) {\n const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;\n const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;\n setVisible(isHorizontal ? isOverflowX : isOverflowY);\n }\n }, 10);\n\n useResizeObserver(context.viewport, handleResize);\n useResizeObserver(context.content, handleResize);\n\n return (\n <Presence present={forceMount || visible}>\n <ScrollAreaScrollbarVisible\n data-state={visible ? 'visible' : 'hidden'}\n {...scrollbarProps}\n ref={forwardedRef}\n />\n </Presence>\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaScrollbarVisibleElement = ScrollAreaScrollbarAxisElement;\ninterface ScrollAreaScrollbarVisibleProps\n extends Omit<ScrollAreaScrollbarAxisProps, keyof ScrollAreaScrollbarAxisPrivateProps> {\n orientation?: 'horizontal' | 'vertical';\n}\n\nconst ScrollAreaScrollbarVisible = React.forwardRef<\n ScrollAreaScrollbarVisibleElement,\n ScrollAreaScrollbarVisibleProps\n>((props: ScopedProps<ScrollAreaScrollbarVisibleProps>, forwardedRef) => {\n const { orientation = 'vertical', ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const thumbRef = React.useRef<ScrollAreaThumbElement | null>(null);\n const pointerOffsetRef = React.useRef(0);\n const [sizes, setSizes] = React.useState<Sizes>({\n content: 0,\n viewport: 0,\n scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 },\n });\n const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);\n\n type UncommonProps = 'onThumbPositionChange' | 'onDragScroll' | 'onWheelScroll';\n const commonProps: Omit<ScrollAreaScrollbarAxisPrivateProps, UncommonProps> = {\n ...scrollbarProps,\n sizes,\n onSizesChange: setSizes,\n hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),\n onThumbChange: (thumb) => (thumbRef.current = thumb),\n onThumbPointerUp: () => (pointerOffsetRef.current = 0),\n onThumbPointerDown: (pointerPos) => (pointerOffsetRef.current = pointerPos),\n };\n\n function getScrollPosition(pointerPos: number, dir?: Direction) {\n return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);\n }\n\n if (orientation === 'horizontal') {\n return (\n <ScrollAreaScrollbarX\n {...commonProps}\n ref={forwardedRef}\n onThumbPositionChange={() => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollLeft;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);\n thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;\n }\n }}\n onWheelScroll={(scrollPos) => {\n if (context.viewport) context.viewport.scrollLeft = scrollPos;\n }}\n onDragScroll={(pointerPos) => {\n if (context.viewport) {\n context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);\n }\n }}\n />\n );\n }\n\n if (orientation === 'vertical') {\n return (\n <ScrollAreaScrollbarY\n {...commonProps}\n ref={forwardedRef}\n onThumbPositionChange={() => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollTop;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes);\n thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;\n }\n }}\n onWheelScroll={(scrollPos) => {\n if (context.viewport) context.viewport.scrollTop = scrollPos;\n }}\n onDragScroll={(pointerPos) => {\n if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);\n }}\n />\n );\n }\n\n return null;\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaScrollbarAxisPrivateProps = {\n hasThumb: boolean;\n sizes: Sizes;\n onSizesChange(sizes: Sizes): void;\n onThumbChange(thumb: ScrollAreaThumbElement | null): void;\n onThumbPointerDown(pointerPos: number): void;\n onThumbPointerUp(): void;\n onThumbPositionChange(): void;\n onWheelScroll(scrollPos: number): void;\n onDragScroll(pointerPos: number): void;\n};\n\ntype ScrollAreaScrollbarAxisElement = ScrollAreaScrollbarImplElement;\ninterface ScrollAreaScrollbarAxisProps\n extends Omit<ScrollAreaScrollbarImplProps, keyof ScrollAreaScrollbarImplPrivateProps>,\n ScrollAreaScrollbarAxisPrivateProps {}\n\nconst ScrollAreaScrollbarX = React.forwardRef<\n ScrollAreaScrollbarAxisElement,\n ScrollAreaScrollbarAxisProps\n>((props: ScopedProps<ScrollAreaScrollbarAxisProps>, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React.useState<CSSStyleDeclaration>();\n const ref = React.useRef<ScrollAreaScrollbarAxisElement>(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);\n\n React.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n\n return (\n <ScrollAreaScrollbarImpl\n data-orientation=\"horizontal\"\n {...scrollbarProps}\n ref={composeRefs}\n sizes={sizes}\n style={{\n bottom: 0,\n left: context.dir === 'rtl' ? 'var(--radix-scroll-area-corner-width)' : 0,\n right: context.dir === 'ltr' ? 'var(--radix-scroll-area-corner-width)' : 0,\n ['--radix-scroll-area-thumb-width' as any]: getThumbSize(sizes) + 'px',\n ...props.style,\n }}\n onThumbPointerDown={(pointerPos) => props.onThumbPointerDown(pointerPos.x)}\n onDragScroll={(pointerPos) => props.onDragScroll(pointerPos.x)}\n onWheelScroll={(event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollLeft + event.deltaX;\n props.onWheelScroll(scrollPos);\n // prevent window scroll when wheeling on scrollbar\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n }}\n onResize={() => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollWidth,\n viewport: context.viewport.offsetWidth,\n scrollbar: {\n size: ref.current.clientWidth,\n paddingStart: toInt(computedStyle.paddingLeft),\n paddingEnd: toInt(computedStyle.paddingRight),\n },\n });\n }\n }}\n />\n );\n});\n\nconst ScrollAreaScrollbarY = React.forwardRef<\n ScrollAreaScrollbarAxisElement,\n ScrollAreaScrollbarAxisProps\n>((props: ScopedProps<ScrollAreaScrollbarAxisProps>, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React.useState<CSSStyleDeclaration>();\n const ref = React.useRef<ScrollAreaScrollbarAxisElement>(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);\n\n React.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n\n return (\n <ScrollAreaScrollbarImpl\n data-orientation=\"vertical\"\n {...scrollbarProps}\n ref={composeRefs}\n sizes={sizes}\n style={{\n top: 0,\n right: context.dir === 'ltr' ? 0 : undefined,\n left: context.dir === 'rtl' ? 0 : undefined,\n bottom: 'var(--radix-scroll-area-corner-height)',\n ['--radix-scroll-area-thumb-height' as any]: getThumbSize(sizes) + 'px',\n ...props.style,\n }}\n onThumbPointerDown={(pointerPos) => props.onThumbPointerDown(pointerPos.y)}\n onDragScroll={(pointerPos) => props.onDragScroll(pointerPos.y)}\n onWheelScroll={(event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollTop + event.deltaY;\n props.onWheelScroll(scrollPos);\n // prevent window scroll when wheeling on scrollbar\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n }}\n onResize={() => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollHeight,\n viewport: context.viewport.offsetHeight,\n scrollbar: {\n size: ref.current.clientHeight,\n paddingStart: toInt(computedStyle.paddingTop),\n paddingEnd: toInt(computedStyle.paddingBottom),\n },\n });\n }\n }}\n />\n );\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollbarContext = {\n hasThumb: boolean;\n scrollbar: ScrollAreaScrollbarElement | null;\n onThumbChange(thumb: ScrollAreaThumbElement | null): void;\n onThumbPointerUp(): void;\n onThumbPointerDown(pointerPos: { x: number; y: number }): void;\n onThumbPositionChange(): void;\n};\n\nconst [ScrollbarProvider, useScrollbarContext] =\n createScrollAreaContext<ScrollbarContext>(SCROLLBAR_NAME);\n\ntype ScrollAreaScrollbarImplElement = React.ComponentRef<typeof Primitive.div>;\ntype ScrollAreaScrollbarImplPrivateProps = {\n sizes: Sizes;\n hasThumb: boolean;\n onThumbChange: ScrollbarContext['onThumbChange'];\n onThumbPointerUp: ScrollbarContext['onThumbPointerUp'];\n onThumbPointerDown: ScrollbarContext['onThumbPointerDown'];\n onThumbPositionChange: ScrollbarContext['onThumbPositionChange'];\n onWheelScroll(event: WheelEvent, maxScrollPos: number): void;\n onDragScroll(pointerPos: { x: number; y: number }): void;\n onResize(): void;\n};\ninterface ScrollAreaScrollbarImplProps\n extends Omit<PrimitiveDivProps, keyof ScrollAreaScrollbarImplPrivateProps>,\n ScrollAreaScrollbarImplPrivateProps {}\n\nconst ScrollAreaScrollbarImpl = React.forwardRef<\n ScrollAreaScrollbarImplElement,\n ScrollAreaScrollbarImplProps\n>((props: ScopedProps<ScrollAreaScrollbarImplProps>, forwardedRef) => {\n const {\n __scopeScrollArea,\n sizes,\n hasThumb,\n onThumbChange,\n onThumbPointerUp,\n onThumbPointerDown,\n onThumbPositionChange,\n onDragScroll,\n onWheelScroll,\n onResize,\n ...scrollbarProps\n } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);\n const [scrollbar, setScrollbar] = React.useState<ScrollAreaScrollbarElement | null>(null);\n const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node));\n const rectRef = React.useRef<DOMRect | null>(null);\n const prevWebkitUserSelectRef = React.useRef<string>('');\n const viewport = context.viewport;\n const maxScrollPos = sizes.content - sizes.viewport;\n const handleWheelScroll = useCallbackRef(onWheelScroll);\n const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);\n const handleResize = useDebounceCallback(onResize, 10);\n\n function handleDragScroll(event: React.PointerEvent<HTMLElement>) {\n if (rectRef.current) {\n const x = event.clientX - rectRef.current.left;\n const y = event.clientY - rectRef.current.top;\n onDragScroll({ x, y });\n }\n }\n\n /**\n * We bind wheel event imperatively so we can switch off passive\n * mode for document wheel event to allow it to be prevented\n */\n React.useEffect(() => {\n const handleWheel = (event: WheelEvent) => {\n const element = event.target as HTMLElement;\n const isScrollbarWheel = scrollbar?.contains(element);\n if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);\n };\n document.addEventListener('wheel', handleWheel, { passive: false });\n return () => document.removeEventListener('wheel', handleWheel, { passive: false } as any);\n }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);\n\n /**\n * Update thumb position on sizes change\n */\n React.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);\n\n useResizeObserver(scrollbar, handleResize);\n useResizeObserver(context.content, handleResize);\n\n return (\n <ScrollbarProvider\n scope={__scopeScrollArea}\n scrollbar={scrollbar}\n hasThumb={hasThumb}\n onThumbChange={useCallbackRef(onThumbChange)}\n onThumbPointerUp={useCallbackRef(onThumbPointerUp)}\n onThumbPositionChange={handleThumbPositionChange}\n onThumbPointerDown={useCallbackRef(onThumbPointerDown)}\n >\n <Primitive.div\n {...scrollbarProps}\n ref={composeRefs}\n style={{ position: 'absolute', ...scrollbarProps.style }}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n const mainPointer = 0;\n if (event.button === mainPointer) {\n const element = event.target as HTMLElement;\n element.setPointerCapture(event.pointerId);\n rectRef.current = scrollbar!.getBoundingClientRect();\n // pointer capture doesn't prevent text selection in Safari\n // so we remove text selection manually when scrolling\n prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;\n document.body.style.webkitUserSelect = 'none';\n if (context.viewport) context.viewport.style.scrollBehavior = 'auto';\n handleDragScroll(event);\n }\n })}\n onPointerMove={composeEventHandlers(props.onPointerMove, handleDragScroll)}\n onPointerUp={composeEventHandlers(props.onPointerUp, (event) => {\n const element = event.target as HTMLElement;\n if (element.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId);\n }\n document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;\n if (context.viewport) context.viewport.style.scrollBehavior = '';\n rectRef.current = null;\n })}\n />\n </ScrollbarProvider>\n );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaThumb\n * -----------------------------------------------------------------------------------------------*/\n\nconst THUMB_NAME = 'ScrollAreaThumb';\n\ntype ScrollAreaThumbElement = ScrollAreaThumbImplElement;\ninterface ScrollAreaThumbProps extends ScrollAreaThumbImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst ScrollAreaThumb = React.forwardRef<ScrollAreaThumbElement, ScrollAreaThumbProps>(\n (props: ScopedProps<ScrollAreaThumbProps>, forwardedRef) => {\n const { forceMount, ...thumbProps } = props;\n const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);\n return (\n <Presence present={forceMount || scrollbarContext.hasThumb}>\n <ScrollAreaThumbImpl ref={forwardedRef} {...thumbProps} />\n </Presence>\n );\n }\n);\n\ntype ScrollAreaThumbImplElement = React.ComponentRef<typeof Primitive.div>;\ninterface ScrollAreaThumbImplProps extends PrimitiveDivProps {}\n\nconst ScrollAreaThumbImpl = React.forwardRef<ScrollAreaThumbImplElement, ScrollAreaThumbImplProps>(\n (props: ScopedProps<ScrollAreaThumbImplProps>, forwardedRef) => {\n const { __scopeScrollArea, style, ...thumbProps } = props;\n const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);\n const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);\n const { onThumbPositionChange } = scrollbarContext;\n const composedRef = useComposedRefs(forwardedRef, (node) =>\n scrollbarContext.onThumbChange(node)\n );\n const removeUnlinkedScrollListenerRef = React.useRef<() => void>(undefined);\n const debounceScrollEnd = useDebounceCallback(() => {\n if (removeUnlinkedScrollListenerRef.current) {\n removeUnlinkedScrollListenerRef.current();\n removeUnlinkedScrollListenerRef.current = undefined;\n }\n }, 100);\n\n React.useEffect(() => {\n const viewport = scrollAreaContext.viewport;\n if (viewport) {\n /**\n * We only bind to native scroll event so we know when scroll starts and ends.\n * When scroll starts we start a requestAnimationFrame loop that checks for\n * changes to scroll position. That rAF loop triggers our thumb position change\n * when relevant to avoid scroll-linked effects. We cancel the loop when scroll ends.\n * https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects\n */\n const handleScroll = () => {\n debounceScrollEnd();\n if (!removeUnlinkedScrollListenerRef.current) {\n const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);\n removeUnlinkedScrollListenerRef.current = listener;\n onThumbPositionChange();\n }\n };\n onThumbPositionChange();\n viewport.addEventListener('scroll', handleScroll);\n return () => viewport.removeEventListener('scroll', handleScroll);\n }\n }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);\n\n return (\n <Primitive.div\n data-state={scrollbarContext.hasThumb ? 'visible' : 'hidden'}\n {...thumbProps}\n ref={composedRef}\n style={{\n width: 'var(--radix-scroll-area-thumb-width)',\n height: 'var(--radix-scroll-area-thumb-height)',\n ...style,\n }}\n onPointerDownCapture={composeEventHandlers(props.onPointerDownCapture, (event) => {\n const thumb = event.target as HTMLElement;\n const thumbRect = thumb.getBoundingClientRect();\n const x = event.clientX - thumbRect.left;\n const y = event.clientY - thumbRect.top;\n scrollbarContext.onThumbPointerDown({ x, y });\n })}\n onPointerUp={composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)}\n />\n );\n }\n);\n\nScrollAreaThumb.displayName = THUMB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ScrollAreaCorner\n * -----------------------------------------------------------------------------------------------*/\n\nconst CORNER_NAME = 'ScrollAreaCorner';\n\ntype ScrollAreaCornerElement = ScrollAreaCornerImplElement;\ninterface ScrollAreaCornerProps extends ScrollAreaCornerImplProps {}\n\nconst ScrollAreaCorner = React.forwardRef<ScrollAreaCornerElement, ScrollAreaCornerProps>(\n (props: ScopedProps<ScrollAreaCornerProps>, forwardedRef) => {\n const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);\n const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);\n const hasCorner = context.type !== 'scroll' && hasBothScrollbarsVisible;\n return hasCorner ? <ScrollAreaCornerImpl {...props} ref={forwardedRef} /> : null;\n }\n);\n\nScrollAreaCorner.displayName = CORNER_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype ScrollAreaCornerImplElement = React.ComponentRef<typeof Primitive.div>;\ninterface ScrollAreaCornerImplProps extends PrimitiveDivProps {}\n\nconst ScrollAreaCornerImpl = React.forwardRef<\n ScrollAreaCornerImplElement,\n ScrollAreaCornerImplProps\n>((props: ScopedProps<ScrollAreaCornerImplProps>, forwardedRef) => {\n const { __scopeScrollArea, ...cornerProps } = props;\n const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);\n const [width, setWidth] = React.useState(0);\n const [height, setHeight] = React.useState(0);\n const hasSize = Boolean(width && height);\n\n useResizeObserver(context.scrollbarX, () => {\n const height = context.scrollbarX?.offsetHeight || 0;\n context.onCornerHeightChange(height);\n setHeight(height);\n });\n\n useResizeObserver(context.scrollbarY, () => {\n const width = context.scrollbarY?.offsetWidth || 0;\n context.onCornerWidthChange(width);\n setWidth(width);\n });\n\n return hasSize ? (\n <Primitive.div\n {...cornerProps}\n ref={forwardedRef}\n style={{\n width,\n height,\n position: 'absolute',\n right: context.dir === 'ltr' ? 0 : undefined,\n left: context.dir === 'rtl' ? 0 : undefined,\n bottom: 0,\n ...props.style,\n }}\n />\n ) : null;\n});\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction toInt(value?: string) {\n return value ? parseInt(value, 10) : 0;\n}\n\nfunction getThumbRatio(viewportSize: number, contentSize: number) {\n const ratio = viewportSize / contentSize;\n return isNaN(ratio) ? 0 : ratio;\n}\n\nfunction getThumbSize(sizes: Sizes) {\n const ratio = getThumbRatio(sizes.viewport, sizes.content);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;\n // minimum of 18 matches macOS minimum\n return Math.max(thumbSize, 18);\n}\n\nfunction getScrollPositionFromPointer(\n pointerPos: number,\n pointerOffset: number,\n sizes: Sizes,\n dir: Direction = 'ltr'\n) {\n const thumbSizePx = getThumbSize(sizes);\n const thumbCenter = thumbSizePx / 2;\n const offset = pointerOffset || thumbCenter;\n const thumbOffsetFromEnd = thumbSizePx - offset;\n const minPointerPos = sizes.scrollbar.paddingStart + offset;\n const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;\n const maxScrollPos = sizes.content - sizes.viewport;\n const scrollRange = dir === 'ltr' ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange as [number, number]);\n return interpolate(pointerPos);\n}\n\nfunction getThumbOffsetFromScroll(scrollPos: number, sizes: Sizes, dir: Direction = 'ltr') {\n const thumbSizePx = getThumbSize(sizes);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const scrollbar = sizes.scrollbar.size - scrollbarPadding;\n const maxScrollPos = sizes.content - sizes.viewport;\n const maxThumbPos = scrollbar - thumbSizePx;\n const scrollClampRange = dir === 'ltr' ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange as [number, number]);\n const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);\n return interpolate(scrollWithoutMomentum);\n}\n\n// https://github.com/tmcw-up-for-adoption/simple-linear-scale/blob/master/index.js\nfunction linearScale(input: readonly [number, number], output: readonly [number, number]) {\n return (value: number) => {\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\n\nfunction isScrollingWithinScrollbarBounds(scrollPos: number, maxScrollPos: number) {\n return scrollPos > 0 && scrollPos < maxScrollPos;\n}\n\n// Custom scroll handler to avoid scroll-linked effects\n// https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects\nconst addUnlinkedScrollListener = (node: HTMLElement, handler = () => {}) => {\n let prevPosition = { left: node.scrollLeft, top: node.scrollTop };\n let rAF = 0;\n (function loop() {\n const position = { left: node.scrollLeft, top: node.scrollTop };\n const isHorizontalScroll = prevPosition.left !== position.left;\n const isVerticalScroll = prevPosition.top !== position.top;\n if (isHorizontalScroll || isVerticalScroll) handler();\n prevPosition = position;\n rAF = window.requestAnimationFrame(loop);\n })();\n return () => window.cancelAnimationFrame(rAF);\n};\n\nfunction useDebounceCallback(callback: () => void, delay: number) {\n const handleCallback = useCallbackRef(callback);\n const debounceTimerRef = React.useRef(0);\n React.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);\n return React.useCallback(() => {\n window.clearTimeout(debounceTimerRef.current);\n debounceTimerRef.current = window.setTimeout(handleCallback, delay);\n }, [handleCallback, delay]);\n}\n\nfunction useResizeObserver(element: HTMLElement | null, onResize: () => void) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n /**\n * Resize Observer will throw an often benign error that says `ResizeObserver loop\n * completed with undelivered notifications`. This means that ResizeObserver was not\n * able to deliver all observations within a single animation frame, so we use\n * `requestAnimationFrame` to ensure we don't deliver unnecessary observations.\n * Further reading: https://github.com/WICG/resize-observer/issues/38\n */\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = ScrollArea;\nconst Viewport = ScrollAreaViewport;\nconst Scrollbar = ScrollAreaScrollbar;\nconst Thumb = ScrollAreaThumb;\nconst Corner = ScrollAreaCorner;\n\nexport {\n createScrollAreaScope,\n //\n ScrollArea,\n ScrollAreaViewport,\n ScrollAreaScrollbar,\n ScrollAreaThumb,\n ScrollAreaCorner,\n //\n Root,\n Viewport,\n Scrollbar,\n Thumb,\n Corner,\n};\nexport type {\n ScrollAreaProps,\n ScrollAreaViewportProps,\n ScrollAreaScrollbarProps,\n ScrollAreaThumbProps,\n ScrollAreaCornerProps,\n};\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8', key: '5wwlr5' }],\n [\n 'path',\n {\n d: 'M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z',\n key: 'r6nss1',\n },\n ],\n];\n\n/**\n * @component @name House\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMjF2LThhMSAxIDAgMCAwLTEtMWgtNGExIDEgMCAwIDAtMSAxdjgiIC8+CiAgPHBhdGggZD0iTTMgMTBhMiAyIDAgMCAxIC43MDktMS41MjhsNy02YTIgMiAwIDAgMSAyLjU4MiAwbDcgNkEyIDIgMCAwIDEgMjEgMTB2OWEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/house\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst House = createLucideIcon('house', __iconNode);\n\nexport default House;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z',\n key: 'uqj9uw',\n },\n ],\n ['path', { d: 'M16 9a5 5 0 0 1 0 6', key: '1q6k2b' }],\n ['path', { d: 'M19.364 18.364a9 9 0 0 0 0-12.728', key: 'ijwkga' }],\n];\n\n/**\n * @component @name Volume2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTEgNC43MDJhLjcwNS43MDUgMCAwIDAtMS4yMDMtLjQ5OEw2LjQxMyA3LjU4N0ExLjQgMS40IDAgMCAxIDUuNDE2IDhIM2ExIDEgMCAwIDAtMSAxdjZhMSAxIDAgMCAwIDEgMWgyLjQxNmExLjQgMS40IDAgMCAxIC45OTcuNDEzbDMuMzgzIDMuMzg0QS43MDUuNzA1IDAgMCAwIDExIDE5LjI5OHoiIC8+CiAgPHBhdGggZD0iTTE2IDlhNSA1IDAgMCAxIDAgNiIgLz4KICA8cGF0aCBkPSJNMTkuMzY0IDE4LjM2NGE5IDkgMCAwIDAgMC0xMi43MjgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/volume-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Volume2 = createLucideIcon('volume-2', __iconNode);\n\nexport default Volume2;\n","import * as React from 'react';\n\ntype Machine<S> = { [k: string]: { [k: string]: S } };\ntype MachineState<T> = keyof T;\ntype MachineEvent<T> = keyof UnionToIntersection<T[keyof T]>;\n\n// 🤯 https://fettblog.eu/typescript-union-to-intersection/\ntype UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any\n ? R\n : never;\n\nexport function useStateMachine<M>(\n initialState: MachineState<M>,\n machine: M & Machine<MachineState<M>>\n) {\n return React.useReducer((state: MachineState<M>, event: MachineEvent<M>): MachineState<M> => {\n const nextState = (machine[state] as any)[event];\n return nextState ?? state;\n }, initialState);\n}\n","'use client';\n\nimport { Toaster as Sonner } from 'sonner';\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>;\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n return (\n <Sonner\n className=\"toaster group\"\n toastOptions={{\n classNames: {\n toast:\n 'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',\n description: 'group-[.toast]:text-muted-foreground',\n actionButton: 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',\n cancelButton: 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',\n },\n }}\n {...props}\n />\n );\n};\n\nexport { Toaster };\n"],"names":[],"mappings":"wDEEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OIDA,EAAA,EAAA,CAAA,CAAA,wBIuBM,EAAQ,CAAA,CAAA,CAAA,EAAA,OAAA,EAAA,SAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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