@shepai/cli 1.202.1-pr606.60460ac → 1.202.2

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 (372) hide show
  1. package/package.json +1 -1
  2. package/web/.next/BUILD_ID +1 -1
  3. package/web/.next/build-manifest.json +2 -2
  4. package/web/.next/fallback-build-manifest.json +2 -2
  5. package/web/.next/prerender-manifest.json +3 -3
  6. package/web/.next/required-server-files.js +2 -2
  7. package/web/.next/required-server-files.json +2 -2
  8. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/react-loadable-manifest.json +4 -4
  9. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +37 -37
  10. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  11. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  12. package/web/.next/server/app/(dashboard)/@drawer/chat/page/react-loadable-manifest.json +4 -4
  13. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +35 -35
  14. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  15. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  16. package/web/.next/server/app/(dashboard)/@drawer/create/page/react-loadable-manifest.json +4 -4
  17. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +38 -38
  18. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  19. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  20. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/react-loadable-manifest.json +4 -4
  21. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +47 -47
  22. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  23. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  24. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/react-loadable-manifest.json +4 -4
  25. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +47 -47
  26. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  27. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  28. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +4 -4
  29. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +36 -36
  30. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  31. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  32. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/react-loadable-manifest.json +4 -4
  33. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +36 -36
  34. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  35. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  36. package/web/.next/server/app/(dashboard)/chat/page/react-loadable-manifest.json +4 -4
  37. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +35 -35
  38. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  39. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  40. package/web/.next/server/app/(dashboard)/control-center/page/react-loadable-manifest.json +4 -4
  41. package/web/.next/server/app/(dashboard)/control-center/page/server-reference-manifest.json +35 -35
  42. package/web/.next/server/app/(dashboard)/control-center/page.js.nft.json +1 -1
  43. package/web/.next/server/app/(dashboard)/control-center/page_client-reference-manifest.js +1 -1
  44. package/web/.next/server/app/(dashboard)/create/page/react-loadable-manifest.json +4 -4
  45. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +38 -38
  46. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  47. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  48. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/react-loadable-manifest.json +4 -4
  49. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +47 -47
  50. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  51. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  52. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/react-loadable-manifest.json +4 -4
  53. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +47 -47
  54. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  55. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  56. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +4 -4
  57. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +36 -36
  58. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  59. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  60. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/react-loadable-manifest.json +4 -4
  61. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +36 -36
  62. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/_global-error.html +2 -2
  65. package/web/.next/server/app/_global-error.rsc +1 -1
  66. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  67. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  68. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  69. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  70. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  71. package/web/.next/server/app/_not-found/page/react-loadable-manifest.json +4 -4
  72. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +9 -9
  73. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  74. package/web/.next/server/app/agent-questions/page/react-loadable-manifest.json +4 -4
  75. package/web/.next/server/app/agent-questions/page/server-reference-manifest.json +11 -11
  76. package/web/.next/server/app/agent-questions/page_client-reference-manifest.js +1 -1
  77. package/web/.next/server/app/agents/[agentType]/page/react-loadable-manifest.json +4 -4
  78. package/web/.next/server/app/agents/[agentType]/page/server-reference-manifest.json +13 -13
  79. package/web/.next/server/app/agents/[agentType]/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/agents/page/react-loadable-manifest.json +4 -4
  81. package/web/.next/server/app/agents/page/server-reference-manifest.json +10 -10
  82. package/web/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  83. package/web/.next/server/app/application/[id]/page/react-loadable-manifest.json +4 -4
  84. package/web/.next/server/app/application/[id]/page/server-reference-manifest.json +18 -18
  85. package/web/.next/server/app/application/[id]/page.js.nft.json +1 -1
  86. package/web/.next/server/app/application/[id]/page_client-reference-manifest.js +1 -1
  87. package/web/.next/server/app/application/[id]/supervisor/page/react-loadable-manifest.json +4 -4
  88. package/web/.next/server/app/application/[id]/supervisor/page/server-reference-manifest.json +10 -10
  89. package/web/.next/server/app/application/[id]/supervisor/page_client-reference-manifest.js +1 -1
  90. package/web/.next/server/app/applications/page/react-loadable-manifest.json +4 -4
  91. package/web/.next/server/app/applications/page/server-reference-manifest.json +20 -20
  92. package/web/.next/server/app/applications/page.js.nft.json +1 -1
  93. package/web/.next/server/app/applications/page_client-reference-manifest.js +1 -1
  94. package/web/.next/server/app/features/page/react-loadable-manifest.json +4 -4
  95. package/web/.next/server/app/features/page/server-reference-manifest.json +31 -31
  96. package/web/.next/server/app/features/page.js.nft.json +1 -1
  97. package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
  98. package/web/.next/server/app/onboarding/page/react-loadable-manifest.json +4 -4
  99. package/web/.next/server/app/onboarding/page/server-reference-manifest.json +9 -9
  100. package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  101. package/web/.next/server/app/page/react-loadable-manifest.json +4 -4
  102. package/web/.next/server/app/page/server-reference-manifest.json +9 -9
  103. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  104. package/web/.next/server/app/projects/[slug]/items/[itemId]/page/react-loadable-manifest.json +4 -4
  105. package/web/.next/server/app/projects/[slug]/items/[itemId]/page/server-reference-manifest.json +16 -16
  106. package/web/.next/server/app/projects/[slug]/items/[itemId]/page_client-reference-manifest.js +1 -1
  107. package/web/.next/server/app/projects/[slug]/page/react-loadable-manifest.json +4 -4
  108. package/web/.next/server/app/projects/[slug]/page/server-reference-manifest.json +28 -28
  109. package/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  110. package/web/.next/server/app/projects/[slug]/pages/page/react-loadable-manifest.json +4 -4
  111. package/web/.next/server/app/projects/[slug]/pages/page/server-reference-manifest.json +12 -12
  112. package/web/.next/server/app/projects/[slug]/pages/page_client-reference-manifest.js +1 -1
  113. package/web/.next/server/app/projects/[slug]/settings/page/react-loadable-manifest.json +4 -4
  114. package/web/.next/server/app/projects/[slug]/settings/page/server-reference-manifest.json +18 -18
  115. package/web/.next/server/app/projects/[slug]/settings/page_client-reference-manifest.js +1 -1
  116. package/web/.next/server/app/projects/page/react-loadable-manifest.json +4 -4
  117. package/web/.next/server/app/projects/page/server-reference-manifest.json +10 -10
  118. package/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  119. package/web/.next/server/app/settings/page/react-loadable-manifest.json +4 -4
  120. package/web/.next/server/app/settings/page/server-reference-manifest.json +15 -15
  121. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  122. package/web/.next/server/app/skills/page/react-loadable-manifest.json +4 -4
  123. package/web/.next/server/app/skills/page/server-reference-manifest.json +17 -17
  124. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  125. package/web/.next/server/app/supervisor/feature/[featureId]/page/react-loadable-manifest.json +4 -4
  126. package/web/.next/server/app/supervisor/feature/[featureId]/page/server-reference-manifest.json +10 -10
  127. package/web/.next/server/app/supervisor/feature/[featureId]/page_client-reference-manifest.js +1 -1
  128. package/web/.next/server/app/supervisor/page/react-loadable-manifest.json +4 -4
  129. package/web/.next/server/app/supervisor/page/server-reference-manifest.json +10 -10
  130. package/web/.next/server/app/supervisor/page_client-reference-manifest.js +1 -1
  131. package/web/.next/server/app/supervisor/repo/[repositoryId]/page/react-loadable-manifest.json +4 -4
  132. package/web/.next/server/app/supervisor/repo/[repositoryId]/page/server-reference-manifest.json +10 -10
  133. package/web/.next/server/app/supervisor/repo/[repositoryId]/page_client-reference-manifest.js +1 -1
  134. package/web/.next/server/app/tools/page/react-loadable-manifest.json +4 -4
  135. package/web/.next/server/app/tools/page/server-reference-manifest.json +15 -15
  136. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  137. package/web/.next/server/app/version/page/react-loadable-manifest.json +4 -4
  138. package/web/.next/server/app/version/page/server-reference-manifest.json +9 -9
  139. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  140. package/web/.next/server/chunks/[root-of-the-server]__10e976f3._.js +1 -1
  141. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_agent-questions_page_actions_4b694f8d.js +1 -1
  142. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_agent-questions_page_actions_4b694f8d.js.map +1 -1
  143. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_agents_[agentType]_page_actions_103679a6.js +1 -1
  144. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_agents_[agentType]_page_actions_103679a6.js.map +1 -1
  145. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_projects_[slug]_pages_page_actions_19d50f6c.js +1 -1
  146. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_projects_[slug]_pages_page_actions_19d50f6c.js.map +1 -1
  147. package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_items_[itemId]_work-item-detail-client_tsx_d2e02407._.js +1 -1
  148. package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_items_[itemId]_work-item-detail-client_tsx_d2e02407._.js.map +1 -1
  149. package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_settings_project-settings-client_tsx_e8b85ddc._.js +1 -1
  150. package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_settings_project-settings-client_tsx_e8b85ddc._.js.map +1 -1
  151. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  152. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  153. package/web/.next/server/chunks/ssr/744ca_web_components_features_applications_applications-page-client_tsx_d0db9938._.js +1 -1
  154. package/web/.next/server/chunks/ssr/744ca_web_components_features_applications_applications-page-client_tsx_d0db9938._.js.map +1 -1
  155. package/web/.next/server/chunks/ssr/[root-of-the-server]__0af8610a._.js +3 -3
  156. package/web/.next/server/chunks/ssr/[root-of-the-server]__0af8610a._.js.map +1 -1
  157. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b652a2f._.js +1 -1
  158. package/web/.next/server/chunks/ssr/{[root-of-the-server]__8b73253b._.js → [root-of-the-server]__2e388ba3._.js} +2 -2
  159. package/web/.next/server/chunks/ssr/{[root-of-the-server]__8b73253b._.js.map → [root-of-the-server]__2e388ba3._.js.map} +1 -1
  160. package/web/.next/server/chunks/ssr/[root-of-the-server]__56cf47e7._.js +1 -1
  161. package/web/.next/server/chunks/ssr/[root-of-the-server]__56cf47e7._.js.map +1 -1
  162. package/web/.next/server/chunks/ssr/[root-of-the-server]__648730d4._.js +1 -1
  163. package/web/.next/server/chunks/ssr/[root-of-the-server]__68df6415._.js +1 -1
  164. package/web/.next/server/chunks/ssr/[root-of-the-server]__68df6415._.js.map +1 -1
  165. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bc6bf96._.js +1 -1
  166. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bc6bf96._.js.map +1 -1
  167. package/web/.next/server/chunks/ssr/[root-of-the-server]__9852cb08._.js +2 -2
  168. package/web/.next/server/chunks/ssr/[root-of-the-server]__9852cb08._.js.map +1 -1
  169. package/web/.next/server/chunks/ssr/[root-of-the-server]__a1167cec._.js +1 -1
  170. package/web/.next/server/chunks/ssr/[root-of-the-server]__a1167cec._.js.map +1 -1
  171. package/web/.next/server/chunks/ssr/[root-of-the-server]__a12d0ad7._.js +3 -0
  172. package/web/.next/server/chunks/ssr/{[root-of-the-server]__52ca7f88._.js.map → [root-of-the-server]__a12d0ad7._.js.map} +1 -1
  173. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba699bec._.js +1 -1
  174. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba699bec._.js.map +1 -1
  175. package/web/.next/server/chunks/ssr/[root-of-the-server]__e0741ee1._.js +1 -1
  176. package/web/.next/server/chunks/ssr/[root-of-the-server]__e0fa59e6._.js +1 -1
  177. package/web/.next/server/chunks/ssr/[root-of-the-server]__e0fa59e6._.js.map +1 -1
  178. package/web/.next/server/chunks/ssr/[root-of-the-server]__ea26ff90._.js +3 -3
  179. package/web/.next/server/chunks/ssr/[root-of-the-server]__ff0095e3._.js +1 -1
  180. package/web/.next/server/chunks/ssr/_07036593._.js +1 -1
  181. package/web/.next/server/chunks/ssr/_07036593._.js.map +1 -1
  182. package/web/.next/server/chunks/ssr/_0d2a7595._.js +1 -1
  183. package/web/.next/server/chunks/ssr/_0d2a7595._.js.map +1 -1
  184. package/web/.next/server/chunks/ssr/_101de7c3._.js +1 -1
  185. package/web/.next/server/chunks/ssr/_101de7c3._.js.map +1 -1
  186. package/web/.next/server/chunks/ssr/{_db111d21._.js → _10f54ace._.js} +2 -2
  187. package/web/.next/server/chunks/ssr/{_db111d21._.js.map → _10f54ace._.js.map} +1 -1
  188. package/web/.next/server/chunks/ssr/_24fca3cf._.js +1 -1
  189. package/web/.next/server/chunks/ssr/_24fca3cf._.js.map +1 -1
  190. package/web/.next/server/chunks/ssr/{_6ff832ad._.js → _2759af76._.js} +2 -2
  191. package/web/.next/server/chunks/ssr/{_6ff832ad._.js.map → _2759af76._.js.map} +1 -1
  192. package/web/.next/server/chunks/ssr/_2bc48f3d._.js +1 -1
  193. package/web/.next/server/chunks/ssr/_2bc48f3d._.js.map +1 -1
  194. package/web/.next/server/chunks/ssr/{_fb539286._.js → _2bef1982._.js} +2 -2
  195. package/web/.next/server/chunks/ssr/{_fb539286._.js.map → _2bef1982._.js.map} +1 -1
  196. package/web/.next/server/chunks/ssr/_32f66845._.js +1 -1
  197. package/web/.next/server/chunks/ssr/_408848e6._.js +1 -1
  198. package/web/.next/server/chunks/ssr/_408848e6._.js.map +1 -1
  199. package/web/.next/server/chunks/ssr/_40e02782._.js +1 -1
  200. package/web/.next/server/chunks/ssr/_40e02782._.js.map +1 -1
  201. package/web/.next/server/chunks/ssr/_486d45d6._.js +1 -1
  202. package/web/.next/server/chunks/ssr/_486d45d6._.js.map +1 -1
  203. package/web/.next/server/chunks/ssr/{_824d5772._.js → _498cba11._.js} +2 -2
  204. package/web/.next/server/chunks/ssr/{_824d5772._.js.map → _498cba11._.js.map} +1 -1
  205. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  206. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  207. package/web/.next/server/chunks/ssr/_5cbb0e22._.js +1 -1
  208. package/web/.next/server/chunks/ssr/_5cbb0e22._.js.map +1 -1
  209. package/web/.next/server/chunks/ssr/{_5a3edc88._.js → _673be4f1._.js} +2 -2
  210. package/web/.next/server/chunks/ssr/{_5a3edc88._.js.map → _673be4f1._.js.map} +1 -1
  211. package/web/.next/server/chunks/ssr/_7ba67729._.js +1 -1
  212. package/web/.next/server/chunks/ssr/_7ba67729._.js.map +1 -1
  213. package/web/.next/server/chunks/ssr/_805ae1aa._.js +1 -1
  214. package/web/.next/server/chunks/ssr/_805ae1aa._.js.map +1 -1
  215. package/web/.next/server/chunks/ssr/_87cf18c3._.js +1 -1
  216. package/web/.next/server/chunks/ssr/_87cf18c3._.js.map +1 -1
  217. package/web/.next/server/chunks/ssr/_8a700ff4._.js +1 -1
  218. package/web/.next/server/chunks/ssr/_8a700ff4._.js.map +1 -1
  219. package/web/.next/server/chunks/ssr/_95b97274._.js +1 -1
  220. package/web/.next/server/chunks/ssr/_95b97274._.js.map +1 -1
  221. package/web/.next/server/chunks/ssr/{_fbcfaf3a._.js → _9d18d1b1._.js} +2 -2
  222. package/web/.next/server/chunks/ssr/{_fbcfaf3a._.js.map → _9d18d1b1._.js.map} +1 -1
  223. package/web/.next/server/chunks/ssr/{_70ff64a1._.js → _a93687e6._.js} +2 -2
  224. package/web/.next/server/chunks/ssr/{_70ff64a1._.js.map → _a93687e6._.js.map} +1 -1
  225. package/web/.next/server/chunks/ssr/_c2e196ee._.js +1 -1
  226. package/web/.next/server/chunks/ssr/_c2e196ee._.js.map +1 -1
  227. package/web/.next/server/chunks/ssr/_ca3b7bf7._.js +1 -1
  228. package/web/.next/server/chunks/ssr/_ca3b7bf7._.js.map +1 -1
  229. package/web/.next/server/chunks/ssr/_d53224a9._.js +1 -1
  230. package/web/.next/server/chunks/ssr/_d53224a9._.js.map +1 -1
  231. package/web/.next/server/chunks/ssr/_d573dcc2._.js +1 -1
  232. package/web/.next/server/chunks/ssr/_e2671e14._.js +1 -1
  233. package/web/.next/server/chunks/ssr/_e2671e14._.js.map +1 -1
  234. package/web/.next/server/chunks/ssr/_ecd45b17._.js +1 -1
  235. package/web/.next/server/chunks/ssr/_ecd45b17._.js.map +1 -1
  236. package/web/.next/server/chunks/ssr/{_f0d45e47._.js → _f46d2018._.js} +2 -2
  237. package/web/.next/server/chunks/ssr/{_f0d45e47._.js.map → _f46d2018._.js.map} +1 -1
  238. package/web/.next/server/chunks/ssr/_f602cc9f._.js +1 -1
  239. package/web/.next/server/chunks/ssr/_f602cc9f._.js.map +1 -1
  240. package/web/.next/server/chunks/ssr/{_20a56008._.js → _f71954a5._.js} +2 -2
  241. package/web/.next/server/chunks/ssr/{_20a56008._.js.map → _f71954a5._.js.map} +1 -1
  242. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  243. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  244. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  245. package/web/.next/server/chunks/ssr/src_presentation_web_0e291f0b._.js +1 -1
  246. package/web/.next/server/chunks/ssr/src_presentation_web_0e291f0b._.js.map +1 -1
  247. package/web/.next/server/chunks/ssr/{src_presentation_web_40673f0c._.js → src_presentation_web_16c83ab4._.js} +2 -2
  248. package/web/.next/server/chunks/ssr/{src_presentation_web_40673f0c._.js.map → src_presentation_web_16c83ab4._.js.map} +1 -1
  249. package/web/.next/server/chunks/ssr/src_presentation_web_1d8d177f._.js +1 -1
  250. package/web/.next/server/chunks/ssr/src_presentation_web_1d8d177f._.js.map +1 -1
  251. package/web/.next/server/chunks/ssr/src_presentation_web_450b58fc._.js +1 -1
  252. package/web/.next/server/chunks/ssr/src_presentation_web_450b58fc._.js.map +1 -1
  253. package/web/.next/server/chunks/ssr/src_presentation_web_47727150._.js +1 -1
  254. package/web/.next/server/chunks/ssr/src_presentation_web_47727150._.js.map +1 -1
  255. package/web/.next/server/chunks/ssr/src_presentation_web_64fcfc84._.js +1 -1
  256. package/web/.next/server/chunks/ssr/src_presentation_web_64fcfc84._.js.map +1 -1
  257. package/web/.next/server/chunks/ssr/src_presentation_web_74b7bdb2._.js +1 -1
  258. package/web/.next/server/chunks/ssr/src_presentation_web_74b7bdb2._.js.map +1 -1
  259. package/web/.next/server/chunks/ssr/src_presentation_web_82aeca34._.js +1 -1
  260. package/web/.next/server/chunks/ssr/src_presentation_web_82aeca34._.js.map +1 -1
  261. package/web/.next/server/chunks/ssr/src_presentation_web_8a564d47._.js +1 -1
  262. package/web/.next/server/chunks/ssr/src_presentation_web_8a564d47._.js.map +1 -1
  263. package/web/.next/server/chunks/ssr/src_presentation_web_9a543843._.js +1 -1
  264. package/web/.next/server/chunks/ssr/src_presentation_web_9a543843._.js.map +1 -1
  265. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_f4f3fad9.js +1 -1
  266. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_f4f3fad9.js.map +1 -1
  267. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_agents_page_actions_d4bd4711.js +1 -1
  268. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_agents_page_actions_d4bd4711.js.map +1 -1
  269. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_onboarding_page_actions_bb695e8d.js +1 -1
  270. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_onboarding_page_actions_bb695e8d.js.map +1 -1
  271. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_page_actions_ac47e420.js +1 -1
  272. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_page_actions_ac47e420.js.map +1 -1
  273. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_projects_page_actions_c91a23a8.js +1 -1
  274. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_projects_page_actions_c91a23a8.js.map +1 -1
  275. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_63c2d912.js +1 -1
  276. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_63c2d912.js.map +1 -1
  277. package/web/.next/server/chunks/ssr/src_presentation_web_a53a3da6._.js +1 -1
  278. package/web/.next/server/chunks/ssr/src_presentation_web_a53a3da6._.js.map +1 -1
  279. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_246617fe._.js +3 -3
  280. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_adopt-local-directory_ts_75f1f28c._.js +1 -1
  281. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_adopt-local-directory_ts_75f1f28c._.js.map +1 -1
  282. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_9453ce8b._.js +1 -1
  283. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-directory_ts_1209d917._.js +1 -1
  284. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-directory_ts_1209d917._.js.map +1 -1
  285. package/web/.next/server/chunks/ssr/src_presentation_web_app_features_feature-tree-page-client_tsx_34c5cbbf._.js +1 -1
  286. package/web/.next/server/chunks/ssr/src_presentation_web_b1b3c26c._.js +1 -1
  287. package/web/.next/server/chunks/ssr/src_presentation_web_b1b3c26c._.js.map +1 -1
  288. package/web/.next/server/chunks/ssr/src_presentation_web_b98a4353._.js +1 -1
  289. package/web/.next/server/chunks/ssr/src_presentation_web_b98a4353._.js.map +1 -1
  290. package/web/.next/server/chunks/ssr/src_presentation_web_c96ca051._.js +1 -1
  291. package/web/.next/server/chunks/ssr/src_presentation_web_c96ca051._.js.map +1 -1
  292. package/web/.next/server/chunks/ssr/{src_presentation_web_e812a69b._.js → src_presentation_web_cb0d2c28._.js} +2 -2
  293. package/web/.next/server/chunks/ssr/{src_presentation_web_e812a69b._.js.map → src_presentation_web_cb0d2c28._.js.map} +1 -1
  294. package/web/.next/server/chunks/ssr/src_presentation_web_components_66643378._.js +1 -1
  295. package/web/.next/server/chunks/ssr/src_presentation_web_components_66643378._.js.map +1 -1
  296. package/web/.next/server/chunks/ssr/src_presentation_web_components_agent-editor_agent-editor-tabs_tsx_d5a954b4._.js +1 -1
  297. package/web/.next/server/chunks/ssr/src_presentation_web_components_agent-editor_agent-editor-tabs_tsx_d5a954b4._.js.map +1 -1
  298. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
  299. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
  300. package/web/.next/server/chunks/ssr/src_presentation_web_d3858f16._.js +1 -1
  301. package/web/.next/server/chunks/ssr/src_presentation_web_d3858f16._.js.map +1 -1
  302. package/web/.next/server/chunks/ssr/src_presentation_web_d7f8130c._.js +1 -1
  303. package/web/.next/server/chunks/ssr/src_presentation_web_d7f8130c._.js.map +1 -1
  304. package/web/.next/server/chunks/ssr/src_presentation_web_dddd8ccd._.js +1 -1
  305. package/web/.next/server/chunks/ssr/src_presentation_web_dddd8ccd._.js.map +1 -1
  306. package/web/.next/server/chunks/ssr/src_presentation_web_e13d58b0._.js +1 -1
  307. package/web/.next/server/chunks/ssr/src_presentation_web_e13d58b0._.js.map +1 -1
  308. package/web/.next/server/chunks/ssr/src_presentation_web_ee94a9aa._.js +1 -1
  309. package/web/.next/server/chunks/ssr/src_presentation_web_ee94a9aa._.js.map +1 -1
  310. package/web/.next/server/chunks/ssr/src_presentation_web_f0fcfdff._.js +1 -1
  311. package/web/.next/server/chunks/ssr/src_presentation_web_f0fcfdff._.js.map +1 -1
  312. package/web/.next/server/chunks/ssr/src_presentation_web_f17e8516._.js +1 -1
  313. package/web/.next/server/chunks/ssr/src_presentation_web_f17e8516._.js.map +1 -1
  314. package/web/.next/server/chunks/ssr/src_presentation_web_f7180fec._.js +1 -1
  315. package/web/.next/server/chunks/ssr/src_presentation_web_f7180fec._.js.map +1 -1
  316. package/web/.next/server/pages/500.html +2 -2
  317. package/web/.next/server/server-reference-manifest.js +1 -1
  318. package/web/.next/server/server-reference-manifest.json +111 -111
  319. package/web/.next/static/chunks/{5faa828877b1e669.js → 03dda23205877d8b.js} +1 -1
  320. package/web/.next/static/chunks/{4bf4f333302e24a4.js → 054e3a5f5ff4db71.js} +1 -1
  321. package/web/.next/static/chunks/{a868014dbe1b4e42.js → 06e58041911c290b.js} +1 -1
  322. package/web/.next/static/chunks/{b5ff852fee23795d.js → 089ef5b749d79ebd.js} +1 -1
  323. package/web/.next/static/chunks/{1a093b13a9d6952e.js → 0d106010c498c198.js} +2 -2
  324. package/web/.next/static/chunks/193e5a0540757f5e.js +1 -0
  325. package/web/.next/static/chunks/{9abc3e68af98e636.js → 25111a2f2597f500.js} +1 -1
  326. package/web/.next/static/chunks/285e724d07901ef6.js +1 -0
  327. package/web/.next/static/chunks/{3c396f63ebefe875.js → 2b2bfc0465b18a7d.js} +1 -1
  328. package/web/.next/static/chunks/{6af99a08ccacdbce.js → 2b436562e69d2827.js} +1 -1
  329. package/web/.next/static/chunks/{8c96a835b3b0dc44.js → 2e3844d0ac487ac7.js} +1 -1
  330. package/web/.next/static/chunks/325859b8a9482427.js +1 -0
  331. package/web/.next/static/chunks/{2773e7b2587bc9cc.js → 44ab458ceb89d85d.js} +1 -1
  332. package/web/.next/static/chunks/4fdf36904f5421a6.js +1 -0
  333. package/web/.next/static/chunks/59004c65d552581c.js +1 -0
  334. package/web/.next/static/chunks/{0edcdc8a2dd06b7a.js → 5c4837e88a3431b8.js} +1 -1
  335. package/web/.next/static/chunks/{a131f868af7f1f7c.js → 74cdd562eb663f72.js} +1 -1
  336. package/web/.next/static/chunks/{0315591c972888a6.js → 7670d76d4ee743e6.js} +1 -1
  337. package/web/.next/static/chunks/{02d88da9fd656fcd.js → 83fc784ce05a701e.js} +1 -1
  338. package/web/.next/static/chunks/{460cedaa85c821e7.js → 8dd4fdd20b103a66.js} +1 -1
  339. package/web/.next/static/chunks/9336bdc7fc319282.js +1 -0
  340. package/web/.next/static/chunks/9d285565922b2de7.js +1 -0
  341. package/web/.next/static/chunks/{45eeca36eabbed23.js → 9f7f2a11937d87eb.js} +1 -1
  342. package/web/.next/static/chunks/{c3931fdbae836be6.js → a7c7bcfb6f7696a3.js} +1 -1
  343. package/web/.next/static/chunks/{9f7985e2a73929a2.js → a8f57d2a12849f32.js} +1 -1
  344. package/web/.next/static/chunks/{0e1c933065a1100a.js → abe98954ccdf29db.js} +1 -1
  345. package/web/.next/static/chunks/{4378715fa2b5e7de.js → b05808da85e8b34c.js} +1 -1
  346. package/web/.next/static/chunks/{b5dc7979d66caa38.js → b5f83e5e1dad23d5.js} +1 -1
  347. package/web/.next/static/chunks/{6d2074fa3453d333.js → b8293a56f257e5a2.js} +1 -1
  348. package/web/.next/static/chunks/{bc5b87e4068ba11d.js → c61c5e97c76dc733.js} +1 -1
  349. package/web/.next/static/chunks/c6b411bf31744ca7.js +1 -0
  350. package/web/.next/static/chunks/{bdaa907bf3d1d932.js → c732d6cc4c5e4343.js} +1 -1
  351. package/web/.next/static/chunks/{25a200f055ae5cba.js → d214d6a670f48d79.js} +1 -1
  352. package/web/.next/static/chunks/{6901861cb53ab483.js → d7b17a93a26e97c8.js} +1 -1
  353. package/web/.next/static/chunks/{a0325f77bbccc63d.js → d8f14fac959a6bd0.js} +1 -1
  354. package/web/.next/static/chunks/{24ea54516dc249c0.js → d98912f5b6cf4938.js} +1 -1
  355. package/web/.next/static/chunks/{21500b3fe3754296.js → df79667c16344317.js} +1 -1
  356. package/web/.next/static/chunks/{05e8df10619fb980.js → ec8f19328ad1ecd4.js} +1 -1
  357. package/web/.next/static/chunks/{e6e6ba783b2e4d14.js → f0157331838ac962.js} +1 -1
  358. package/web/.next/static/chunks/{c687ed21b9518d73.js → f757d865fae71faf.js} +1 -1
  359. package/web/.next/static/chunks/fb3cbb7f575a7128.js +1 -0
  360. package/web/.next/server/chunks/ssr/[root-of-the-server]__52ca7f88._.js +0 -3
  361. package/web/.next/static/chunks/03d7b81c2554d52f.js +0 -1
  362. package/web/.next/static/chunks/15acdaaea57bb459.js +0 -1
  363. package/web/.next/static/chunks/39fe1c1397d5483b.js +0 -1
  364. package/web/.next/static/chunks/495883829026f13f.js +0 -1
  365. package/web/.next/static/chunks/4b3a4f416a6eb1ac.js +0 -1
  366. package/web/.next/static/chunks/4b4160f36cf2a3d6.js +0 -1
  367. package/web/.next/static/chunks/7269537b2188650d.js +0 -1
  368. package/web/.next/static/chunks/b1534b2f3d814fef.js +0 -1
  369. package/web/.next/static/chunks/f6dc1ba364203bb2.js +0 -1
  370. /package/web/.next/static/{My4IQDygZ4BFTXkkKanja → 9zd-B2rWybTaAgE74IKiK}/_buildManifest.js +0 -0
  371. /package/web/.next/static/{My4IQDygZ4BFTXkkKanja → 9zd-B2rWybTaAgE74IKiK}/_clientMiddlewareManifest.json +0 -0
  372. /package/web/.next/static/{My4IQDygZ4BFTXkkKanja → 9zd-B2rWybTaAgE74IKiK}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81846,e=>{"use strict";var t=e.i(679606),r=e.i(294237),n=e.i(131777);let i=(0,r.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function a({className:e,variant:r,...a}){return(0,t.jsx)("div",{className:(0,n.cn)(i({variant:r}),e),...a})}e.s(["Badge",()=>a])},787342,e=>{"use strict";var t=e.i(152155),r=e.i(922528),n=e.i(205978),i=e.i(786874),a=e.i(679606);function o(e){let o=e+"CollectionProvider",[s,d]=(0,r.createContextScope)(o),[l,u]=s(o,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:r,children:n}=e,i=t.default.useRef(null),o=t.default.useRef(new Map).current;return(0,a.jsx)(l,{scope:r,itemMap:o,collectionRef:i,children:n})};c.displayName=o;let h=e+"CollectionSlot",f=(0,i.createSlot)(h),p=t.default.forwardRef((e,t)=>{let{scope:r,children:i}=e,o=u(h,r),s=(0,n.useComposedRefs)(t,o.collectionRef);return(0,a.jsx)(f,{ref:s,children:i})});p.displayName=h;let g=e+"CollectionItemSlot",v="data-radix-collection-item",m=(0,i.createSlot)(g),b=t.default.forwardRef((e,r)=>{let{scope:i,children:o,...s}=e,d=t.default.useRef(null),l=(0,n.useComposedRefs)(r,d),c=u(g,i);return t.default.useEffect(()=>(c.itemMap.set(d,{ref:d,...s}),()=>void c.itemMap.delete(d))),(0,a.jsx)(m,{...{[v]:""},ref:l,children:o})});return b.displayName=g,[{Provider:c,Slot:p,ItemSlot:b},function(r){let n=u(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${v}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},d]}var s=new WeakMap;function d(e,t){var r,n;let i,a,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let s=(r=e,n=t,i=r.length,(o=(a=l(n))>=0?a:i+a)<0||o>=i?-1:o);return -1===s?void 0:e[s]}function l(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],s.set(this,!0)}set(e,t){return s.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),a=this.#e.length,o=l(e),s=o>=0?o:a+o,d=s<0||s>=a?-1:s;if(d===this.size||i&&d===this.size-1||-1===d)return this.set(t,r),this;let u=this.size+ +!i;o<0&&s++;let c=[...this.#e],h=!1;for(let e=s;e<u;e++)if(s===e){let a=c[e];c[e]===t&&(a=c[e+1]),i&&this.delete(t),n=this.get(a),this.set(t,r)}else{h||c[e-1]!==t||(h=!0);let r=c[h?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=d(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=d(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return d(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>o])},151080,e=>{"use strict";var t=e.i(152155),r=e.i(291967),n=e.i(787342),i=e.i(205978),a=e.i(922528),o=e.i(713123),s=e.i(287620),d=e.i(929297),l=e.i(936589),u=e.i(566033),c=e.i(679606),h="rovingFocusGroup.onEntryFocus",f={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[g,v,m]=(0,n.createCollection)(p),[b,x]=(0,a.createContextScope)(p,[m]),[y,w]=b(p),E=t.forwardRef((e,t)=>(0,c.jsx)(g.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,c.jsx)(g.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,c.jsx)(k,{...e,ref:t})})}));E.displayName=p;var k=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:a,orientation:o,loop:g=!1,dir:m,currentTabStopId:b,defaultCurrentTabStopId:x,onCurrentTabStopIdChange:w,onEntryFocus:E,preventScrollOnEntryFocus:k=!1,...j}=e,N=t.useRef(null),_=(0,i.useComposedRefs)(n,N),C=(0,u.useDirection)(m),[R,M]=(0,l.useControllableState)({prop:b,defaultProp:x??null,onChange:w,caller:p}),[S,L]=t.useState(!1),T=(0,d.useCallbackRef)(E),D=v(a),$=t.useRef(!1),[A,P]=t.useState(0);return t.useEffect(()=>{let e=N.current;if(e)return e.addEventListener(h,T),()=>e.removeEventListener(h,T)},[T]),(0,c.jsx)(y,{scope:a,orientation:o,dir:C,loop:g,currentTabStopId:R,onItemFocus:t.useCallback(e=>M(e),[M]),onItemShiftTab:t.useCallback(()=>L(!0),[]),onFocusableItemAdd:t.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>P(e=>e-1),[]),children:(0,c.jsx)(s.Primitive.div,{tabIndex:S||0===A?-1:0,"data-orientation":o,...j,ref:_,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{$.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!$.current;if(e.target===e.currentTarget&&t&&!S){let t=new CustomEvent(h,f);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=D().filter(e=>e.focusable);O([e.find(e=>e.active),e.find(e=>e.id===R),...e].filter(Boolean).map(e=>e.ref.current),k)}}$.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>L(!1))})})}),j="RovingFocusGroupItem",N=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:a=!0,active:d=!1,tabStopId:l,children:u,...h}=e,f=(0,o.useId)(),p=l||f,m=w(j,i),b=m.currentTabStopId===p,x=v(i),{onFocusableItemAdd:y,onFocusableItemRemove:E,currentTabStopId:k}=m;return t.useEffect(()=>{if(a)return y(),()=>E()},[a,y,E]),(0,c.jsx)(g.ItemSlot,{scope:i,id:p,focusable:a,active:d,children:(0,c.jsx)(s.Primitive.span,{tabIndex:b?0:-1,"data-orientation":m.orientation,...h,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{a?m.onItemFocus(p):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>m.onItemFocus(p)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return _[i]}(e,m.orientation,m.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=x().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let a=i.indexOf(e.currentTarget);i=m.loop?(r=i,n=a+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(a+1)}setTimeout(()=>O(i))}}),children:"function"==typeof u?u({isCurrentTabStop:b,hasTabStop:null!=k}):u})})});N.displayName=j;var _={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function O(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>N,"Root",()=>E,"createRovingFocusGroupScope",()=>x])},468304,e=>{"use strict";var t=e.i(679606),r=e.i(152155),n=e.i(291967),i=e.i(922528),a=e.i(151080),o=e.i(685995),s=e.i(287620),d=e.i(566033),l=e.i(936589),u=e.i(713123),c="Tabs",[h,f]=(0,i.createContextScope)(c,[a.createRovingFocusGroupScope]),p=(0,a.createRovingFocusGroupScope)(),[g,v]=h(c),m=r.forwardRef((e,r)=>{let{__scopeTabs:n,value:i,onValueChange:a,defaultValue:o,orientation:h="horizontal",dir:f,activationMode:p="automatic",...v}=e,m=(0,d.useDirection)(f),[b,x]=(0,l.useControllableState)({prop:i,onChange:a,defaultProp:o??"",caller:c});return(0,t.jsx)(g,{scope:n,baseId:(0,u.useId)(),value:b,onValueChange:x,orientation:h,dir:m,activationMode:p,children:(0,t.jsx)(s.Primitive.div,{dir:m,"data-orientation":h,...v,ref:r})})});m.displayName=c;var b="TabsList",x=r.forwardRef((e,r)=>{let{__scopeTabs:n,loop:i=!0,...o}=e,d=v(b,n),l=p(n);return(0,t.jsx)(a.Root,{asChild:!0,...l,orientation:d.orientation,dir:d.dir,loop:i,children:(0,t.jsx)(s.Primitive.div,{role:"tablist","aria-orientation":d.orientation,...o,ref:r})})});x.displayName=b;var y="TabsTrigger",w=r.forwardRef((e,r)=>{let{__scopeTabs:i,value:o,disabled:d=!1,...l}=e,u=v(y,i),c=p(i),h=j(u.baseId,o),f=N(u.baseId,o),g=o===u.value;return(0,t.jsx)(a.Item,{asChild:!0,...c,focusable:!d,active:g,children:(0,t.jsx)(s.Primitive.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":f,"data-state":g?"active":"inactive","data-disabled":d?"":void 0,disabled:d,id:h,...l,ref:r,onMouseDown:(0,n.composeEventHandlers)(e.onMouseDown,e=>{d||0!==e.button||!1!==e.ctrlKey?e.preventDefault():u.onValueChange(o)}),onKeyDown:(0,n.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&u.onValueChange(o)}),onFocus:(0,n.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==u.activationMode;g||d||!e||u.onValueChange(o)})})})});w.displayName=y;var E="TabsContent",k=r.forwardRef((e,n)=>{let{__scopeTabs:i,value:a,forceMount:d,children:l,...u}=e,c=v(E,i),h=j(c.baseId,a),f=N(c.baseId,a),p=a===c.value,g=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(o.Presence,{present:d||p,children:({present:r})=>(0,t.jsx)(s.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":h,hidden:!r,id:f,tabIndex:0,...u,ref:n,style:{...e.style,animationDuration:g.current?"0s":void 0},children:r&&l})})});function j(e,t){return`${e}-trigger-${t}`}function N(e,t){return`${e}-content-${t}`}k.displayName=E,e.s(["Content",()=>k,"List",()=>x,"Root",()=>m,"Tabs",()=>m,"TabsContent",()=>k,"TabsList",()=>x,"TabsTrigger",()=>w,"Trigger",()=>w,"createTabsScope",()=>f],743133);var _=e.i(743133),_=_,O=e.i(131777);let C=_.Root,R=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(_.List,{ref:n,className:(0,O.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...r}));R.displayName=_.List.displayName;let M=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(_.Trigger,{ref:n,className:(0,O.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...r}));M.displayName=_.Trigger.displayName;let S=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(_.Content,{ref:n,className:(0,O.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...r}));S.displayName=_.Content.displayName,e.s(["Tabs",()=>C,"TabsContent",()=>S,"TabsList",()=>R,"TabsTrigger",()=>M],468304)},123620,e=>{"use strict";var t=e.i(679606),r=e.i(152155),n=e.i(294237),i=e.i(131777);let a=(0,n.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg]:absolute [&>svg]:top-4 [&>svg]:start-4 [&>svg]:text-foreground [&>svg+div]:translate-y-[-3px] [&>svg~*]:ps-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),o=r.forwardRef(({className:e,variant:r,...n},o)=>(0,t.jsx)("div",{ref:o,role:"alert",className:(0,i.cn)(a({variant:r}),e),...n}));o.displayName="Alert",r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("h5",{ref:n,className:(0,i.cn)("mb-1 leading-none font-medium tracking-tight",e),...r})).displayName="AlertTitle";let s=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,className:(0,i.cn)("text-sm [&_p]:leading-relaxed",e),...r}));s.displayName="AlertDescription",e.s(["Alert",()=>o,"AlertDescription",()=>s])},998798,e=>{"use strict";let t=(0,e.i(903645).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",()=>t],998798)},48306,e=>{"use strict";var t=e.i(679606),r=e.i(131777);function n({className:e,...n}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}e.s(["Textarea",()=>n])},267669,e=>{"use strict";let t=(0,e.i(903645).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],267669)},438227,e=>{"use strict";let t=(0,e.i(903645).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>t],438227)},220206,(e,t,r)=>{"use strict";var n=e.r(152155),i=e.r(56032),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=i.useSyncExternalStore,s=n.useRef,d=n.useEffect,l=n.useMemo,u=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var c=s(null);if(null===c.current){var h={hasValue:!1,value:null};c.current=h}else h=c.current;var f=o(e,(c=l(function(){function e(e){if(!d){if(d=!0,o=e,e=n(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return s=t}return s=e}if(t=s,a(o,e))return t;var r=n(e);return void 0!==i&&i(t,r)?(o=e,t):(o=e,s=r)}var o,s,d=!1,l=void 0===r?null:r;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,r,n,i]))[0],c[1]);return d(function(){h.hasValue=!0,h.value=f},[f]),u(f),f}},596482,(e,t,r)=>{"use strict";t.exports=e.r(220206)},842541,e=>{"use strict";e.s(["default",0,function(e,t){return e*=1,t*=1,function(r){return e*(1-r)+t*r}}])},161610,321137,e=>{"use strict";function t(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function r(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function n(){}var i="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3,8})$/,d=RegExp(`^rgb\\(${i},${i},${i}\\)$`),l=RegExp(`^rgb\\(${o},${o},${o}\\)$`),u=RegExp(`^rgba\\(${i},${i},${i},${a}\\)$`),c=RegExp(`^rgba\\(${o},${o},${o},${a}\\)$`),h=RegExp(`^hsl\\(${a},${o},${o}\\)$`),f=RegExp(`^hsla\\(${a},${o},${o},${a}\\)$`),p={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function g(){return this.rgb().formatHex()}function v(){return this.rgb().formatRgb()}function m(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=s.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?b(t):3===r?new w(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?x(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?x(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=d.exec(e))?new w(t[1],t[2],t[3],1):(t=l.exec(e))?new w(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=u.exec(e))?x(t[1],t[2],t[3],t[4]):(t=c.exec(e))?x(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=h.exec(e))?O(t[1],t[2]/100,t[3]/100,1):(t=f.exec(e))?O(t[1],t[2]/100,t[3]/100,t[4]):p.hasOwnProperty(e)?b(p[e]):"transparent"===e?new w(NaN,NaN,NaN,0):null}function b(e){return new w(e>>16&255,e>>8&255,255&e,1)}function x(e,t,r,n){return n<=0&&(e=t=r=NaN),new w(e,t,r,n)}function y(e,t,r,i){var a;return 1==arguments.length?((a=e)instanceof n||(a=m(a)),a)?new w((a=a.rgb()).r,a.g,a.b,a.opacity):new w:new w(e,t,r,null==i?1:i)}function w(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function E(){return`#${_(this.r)}${_(this.g)}${_(this.b)}`}function k(){let e=j(this.opacity);return`${1===e?"rgb(":"rgba("}${N(this.r)}, ${N(this.g)}, ${N(this.b)}${1===e?")":`, ${e})`}`}function j(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function N(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _(e){return((e=N(e))<16?"0":"")+e.toString(16)}function O(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new R(e,t,r,n)}function C(e){if(e instanceof R)return new R(e.h,e.s,e.l,e.opacity);if(e instanceof n||(e=m(e)),!e)return new R;if(e instanceof R)return e;var t=(e=e.rgb()).r/255,r=e.g/255,i=e.b/255,a=Math.min(t,r,i),o=Math.max(t,r,i),s=NaN,d=o-a,l=(o+a)/2;return d?(s=t===o?(r-i)/d+(r<i)*6:r===o?(i-t)/d+2:(t-r)/d+4,d/=l<.5?o+a:2-o-a,s*=60):d=l>0&&l<1?0:s,new R(s,d,l,e.opacity)}function R(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function M(e){return(e=(e||0)%360)<0?e+360:e}function S(e){return Math.max(0,Math.min(1,e||0))}function L(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}t(n,m,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:g,formatHex:g,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return C(this).formatHsl()},formatRgb:v,toString:v}),t(w,y,r(n,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new w(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new w(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new w(N(this.r),N(this.g),N(this.b),j(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:E,formatHex:E,formatHex8:function(){return`#${_(this.r)}${_(this.g)}${_(this.b)}${_((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:k,toString:k})),t(R,function(e,t,r,n){return 1==arguments.length?C(e):new R(e,t,r,null==n?1:n)},r(n,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new R(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new R(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new w(L(e>=240?e-240:e+120,i,n),L(e,i,n),L(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new R(M(this.h),S(this.s),S(this.l),j(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=j(this.opacity);return`${1===e?"hsl(":"hsla("}${M(this.h)}, ${100*S(this.s)}%, ${100*S(this.l)}%${1===e?")":`, ${e})`}`}})),e.s(["default",()=>m,"rgb",()=>y],321137),e.s(["color",()=>m],161610)},77075,e=>{"use strict";var t=e.i(842541);e.s(["interpolateNumber",()=>t.default])},145665,181503,e=>{"use strict";var t=e.i(321137);function r(e,t,r,n,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*n+o*i)/6}let n=e=>()=>e;function i(e,t){var r=t-e;return r?function(t){return e+t*r}:n(isNaN(e)?t:e)}e.s(["default",0,n],181503);let a=function e(r){var a,o=1==(a=+r)?i:function(e,t){var r,i,o;return t-e?(r=e,i=t,r=Math.pow(r,o=a),i=Math.pow(i,o)-r,o=1/o,function(e){return Math.pow(r+e*i,o)}):n(isNaN(e)?t:e)};function s(e,r){var n=o((e=(0,t.rgb)(e)).r,(r=(0,t.rgb)(r)).r),a=o(e.g,r.g),s=o(e.b,r.b),d=i(e.opacity,r.opacity);return function(t){return e.r=n(t),e.g=a(t),e.b=s(t),e.opacity=d(t),e+""}}return s.gamma=e,s}(1);function o(e){return function(r){var n,i,a=r.length,o=Array(a),s=Array(a),d=Array(a);for(n=0;n<a;++n)i=(0,t.rgb)(r[n]),o[n]=i.r||0,s[n]=i.g||0,d[n]=i.b||0;return o=e(o),s=e(s),d=e(d),i.opacity=1,function(e){return i.r=o(e),i.g=s(e),i.b=d(e),i+""}}}o(function(e){var t=e.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),a=e[i],o=e[i+1],s=i>0?e[i-1]:2*a-o,d=i<t-1?e[i+2]:2*o-a;return r((n-i/t)*t,s,a,o,d)}}),o(function(e){var t=e.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*t),a=e[(i+t-1)%t],o=e[i%t],s=e[(i+1)%t],d=e[(i+2)%t];return r((n-i/t)*t,a,o,s,d)}}),e.s(["default",0,a],145665)},647483,e=>{"use strict";var t=e.i(842541),r=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,n=RegExp(r.source,"g");e.s(["default",0,function(e,i){var a,o,s,d,l,u=r.lastIndex=n.lastIndex=0,c=-1,h=[],f=[];for(e+="",i+="";(s=r.exec(e))&&(d=n.exec(i));)(l=d.index)>u&&(l=i.slice(u,l),h[c]?h[c]+=l:h[++c]=l),(s=s[0])===(d=d[0])?h[c]?h[c]+=d:h[++c]=d:(h[++c]=null,f.push({i:c,x:(0,t.default)(s,d)})),u=n.lastIndex;return u<i.length&&(l=i.slice(u),h[c]?h[c]+=l:h[++c]=l),h.length<2?f[0]?(a=f[0].x,function(e){return a(e)+""}):(o=i,function(){return o}):(i=f.length,function(e){for(var t,r=0;r<i;++r)h[(t=f[r]).i]=t.x(e);return h.join("")})}])},819505,238816,97376,e=>{"use strict";e.s(["genericArray",()=>n],819505);var t=e.i(213570);function r(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function n(e,r){var n,i=r?r.length:0,a=e?Math.min(i,e.length):0,o=Array(a),s=Array(i);for(n=0;n<a;++n)o[n]=(0,t.default)(e[n],r[n]);for(;n<i;++n)s[n]=r[n];return function(e){for(n=0;n<a;++n)s[n]=o[n](e);return s}}e.s(["default",0,function(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(r=0;r<n;++r)i[r]=e[r]*(1-a)+t[r]*a;return i}},"isNumberArray",()=>r],238816),e.s(["default",0,function(e,t){var r=new Date;return e*=1,t*=1,function(n){return r.setTime(e*(1-n)+t*n),r}}],97376)},905660,e=>{"use strict";e.s(["default",()=>r]);var t=e.i(213570);function r(e,r){var n,i={},a={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===r||"object"!=typeof r)&&(r={}),r)n in e?i[n]=(0,t.default)(e[n],r[n]):a[n]=r[n];return function(e){for(n in i)a[n]=i[n](e);return a}}},678152,213570,e=>{"use strict";e.s(["default",()=>u],213570);var t=e.i(161610),r=e.i(145665),n=e.i(819505),i=e.i(97376),a=e.i(842541),o=e.i(905660),s=e.i(647483),d=e.i(181503),l=e.i(238816);function u(e,u){var c,h=typeof u;return null==u||"boolean"===h?(0,d.default)(u):("number"===h?a.default:"string"===h?(c=(0,t.color)(u))?(u=c,r.default):s.default:u instanceof t.color?r.default:u instanceof Date?i.default:(0,l.isNumberArray)(u)?l.default:Array.isArray(u)?n.genericArray:"function"!=typeof u.valueOf&&"function"!=typeof u.toString||isNaN(u)?o.default:a.default)(e,u)}e.s(["interpolate",0,u],678152)},675112,e=>{"use strict";let t=(0,e.i(903645).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);e.s(["Send",()=>t],675112)},698071,e=>{"use strict";let t=(0,e.i(903645).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",()=>t],698071)},939835,e=>{"use strict";var t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),r=t((e,t)=>{var r=Object.defineProperty,n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),i=(e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?r(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n},a=n((e,t)=>{function r(e,t){e[t]?e[t]++:e[t]=1}function n(e,t){--e[t]||delete e[t]}function a(e,t,r,n){var i=""+t,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}return i+"\x01"+a+"\x01"+(void 0===n?"\0":n)}function o(e,t){return a(e,t.v,t.w,t.name)}t.exports=class{constructor(e){i(this,"_isDirected",!0),i(this,"_isMultigraph",!1),i(this,"_isCompound",!1),i(this,"_label"),i(this,"_defaultNodeLabelFn",()=>{}),i(this,"_defaultEdgeLabelFn",()=>{}),i(this,"_nodes",{}),i(this,"_in",{}),i(this,"_preds",{}),i(this,"_out",{}),i(this,"_sucs",{}),i(this,"_edgeObjs",{}),i(this,"_edgeLabels",{}),i(this,"_nodeCount",0),i(this,"_edgeCount",0),i(this,"_parent"),i(this,"_children"),e&&(this._isDirected=!Object.hasOwn(e,"directed")||e.directed,this._isMultigraph=!!Object.hasOwn(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.hasOwn(e,"compound")&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!=typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._in[t]).length)}sinks(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._out[t]).length)}setNodes(e,t){var r=arguments,n=this;return e.forEach(function(e){r.length>1?n.setNode(e,t):n.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?arguments.length>1&&(this._nodes[e]=t):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var r=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(r),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(void 0===t)t="\0";else{t+="";for(var r=t;void 0!==r;r=this.parent(r))if(r===e)throw Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}}children(e="\0"){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let n=new Set(t);for(var r of this.successors(e))n.add(r);return Array.from(n.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([r,n]){e(r)&&t.setNode(r,n)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))});var n={};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,function e(i){var a=r.parent(i);return void 0===a||t.hasNode(a)?(n[i]=a,a):a in n?n[a]:e(a)}(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!=typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var r=this,n=arguments;return e.reduce(function(e,i){return n.length>1?r.setEdge(e,i,t):r.setEdge(e,i),i}),this}setEdge(){var e,t,n,i,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2==arguments.length&&(i=arguments[1],o=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),e=""+e,t=""+t,void 0!==n&&(n=""+n);var d=a(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,d))return o&&(this._edgeLabels[d]=i),this;if(void 0!==n&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[d]=o?i:this._defaultEdgeLabelFn(e,t,n);var l=function(e,t,r,n){var i=""+t,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return n&&(s.name=n),s}(this._isDirected,e,t,n);return e=l.v,t=l.w,Object.freeze(l),this._edgeObjs[d]=l,r(this._preds[t],e),r(this._sucs[e],t),this._in[t][d]=l,this._out[e][d]=l,this._edgeCount++,this}edge(e,t,r){var n=1==arguments.length?o(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return this._edgeLabels[n]}edgeAsObj(){let e=this.edge(...arguments);return"object"!=typeof e?{label:e}:e}hasEdge(e,t,r){var n=1==arguments.length?o(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return Object.hasOwn(this._edgeLabels,n)}removeEdge(e,t,r){var i=1==arguments.length?o(this._isDirected,arguments[0]):a(this._isDirected,e,t,r),s=this._edgeObjs[i];return s&&(e=s.v,t=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],n(this._preds[t],e),n(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}filterEdges(e,t,r){if(e){var n=Object.values(e);return r?n.filter(function(e){return e.v===t&&e.w===r||e.v===r&&e.w===t}):n}}}}),o=n((e,t)=>{t.exports="3.0.2"}),s=n((e,t)=>{t.exports={Graph:a(),version:o()}}),d=n((e,t)=>{var r=a();t.exports={write:function(e){var t,r,n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(t=e).nodes().map(function(e){var r=t.node(e),n=t.parent(e),i={v:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.parent=n),i}),edges:(r=e).edges().map(function(e){var t=r.edge(e),n={v:e.v,w:e.w};return void 0!==e.name&&(n.name=e.name),void 0!==t&&(n.value=t),n})};return void 0!==e.graph()&&(n.value=structuredClone(e.graph())),n},read:function(e){var t=new r(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}}),l=n((e,t)=>{t.exports=function(e,t,n,i){return function(e,t,r,n){var i={},a=!0,o=0,s=e.nodes(),d=function(e){var t=r(e);i[e.v].distance+t<i[e.w].distance&&(i[e.w]={distance:i[e.v].distance+t,predecessor:e.v},a=!0)},l=function(){s.forEach(function(e){n(e).forEach(function(t){var r=t.v===e?t.v:t.w,n=r===t.v?t.w:t.v;d({v:r,w:n})})})};s.forEach(function(e){i[e]={distance:e===t?0:1/0}});for(var u=s.length,c=1;c<u&&(a=!1,o++,l(),a);c++);if(o===u-1&&(a=!1,l(),a))throw Error("The graph contains a negative weight cycle");return i}(e,String(t),n||r,i||function(t){return e.outEdges(t)})};var r=()=>1}),u=n((e,t)=>{t.exports=function(e){var t,r={},n=[];return e.nodes().forEach(function(i){t=[],function n(i){Object.hasOwn(r,i)||(r[i]=!0,t.push(i),e.successors(i).forEach(n),e.predecessors(i).forEach(n))}(i),t.length&&n.push(t)}),n}}),c=n((e,t)=>{t.exports=class{constructor(){i(this,"_arr",[]),i(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key}add(e,t){var r=this._keyIndices;if(!Object.hasOwn(r,e=String(e))){var n=this._arr,i=n.length;return r[e]=i,n.push({key:e,priority:t}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)}_heapify(e){var t=this._arr,r=2*e,n=r+1,i=e;r<t.length&&(i=t[r].priority<t[i].priority?r:i,n<t.length&&(i=t[n].priority<t[i].priority?n:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t}_swap(e,t){var r=this._arr,n=this._keyIndices,i=r[e],a=r[t];r[e]=a,r[t]=i,n[a.key]=e,n[i.key]=t}}}),h=n((e,t)=>{var r=c();t.exports=function(e,t,i,a){return function(e,t,n,i){var a,o,s={},d=new r,l=function(e){var t=e.v!==a?e.v:e.w,r=s[t],i=n(e),l=o.distance+i;if(i<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+i);l<r.distance&&(r.distance=l,r.predecessor=a,d.decrease(t,l))};for(e.nodes().forEach(function(e){var r=e===t?0:1/0;s[e]={distance:r},d.add(e,r)});d.size()>0&&(o=s[a=d.removeMin()]).distance!==1/0;)i(a).forEach(l);return s}(e,String(t),i||n,a||function(t){return e.outEdges(t)})};var n=()=>1}),f=n((e,t)=>{var r=h();t.exports=function(e,t,n){return e.nodes().reduce(function(i,a){return i[a]=r(e,a,t,n),i},{})}}),p=n((e,t)=>{t.exports=function(e,t,r){if(void 0!==e[t].predecessor)throw Error("Invalid source vertex");if(void 0===e[r].predecessor&&r!==t)throw Error("Invalid destination vertex");return{weight:e[r].distance,path:function(e,t,r){for(var n=[],i=r;i!==t;)n.push(i),i=e[i].predecessor;return n.push(t),n.reverse()}(e,t,r)}}}),g=n((e,t)=>{t.exports=function(e){var t=0,r=[],n={},i=[];return e.nodes().forEach(function(a){Object.hasOwn(n,a)||function a(o){var s=n[o]={onStack:!0,lowlink:t,index:t++};if(r.push(o),e.successors(o).forEach(function(e){Object.hasOwn(n,e)?n[e].onStack&&(s.lowlink=Math.min(s.lowlink,n[e].index)):(a(e),s.lowlink=Math.min(s.lowlink,n[e].lowlink))}),s.lowlink===s.index){var d,l=[];do n[d=r.pop()].onStack=!1,l.push(d);while(o!==d)i.push(l)}}(a)}),i}}),v=n((e,t)=>{var r=g();t.exports=function(e){return r(e).filter(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}}),m=n((e,t)=>{t.exports=function(e,t,n){var i,a,o,s,d;return i=e,a=t||r,o=n||function(t){return e.outEdges(t)},s={},(d=i.nodes()).forEach(function(e){s[e]={},s[e][e]={distance:0},d.forEach(function(t){e!==t&&(s[e][t]={distance:1/0})}),o(e).forEach(function(t){var r=t.v===e?t.w:t.v,n=a(t);s[e][r]={distance:n,predecessor:e}})}),d.forEach(function(e){var t=s[e];d.forEach(function(r){var n=s[r];d.forEach(function(r){var i=n[e],a=t[r],o=n[r],s=i.distance+a.distance;s<o.distance&&(o.distance=s,o.predecessor=a.predecessor)})})}),s};var r=()=>1}),b=n((e,t)=>{function r(e){var t={},r={},i=[];if(e.sinks().forEach(function a(o){if(Object.hasOwn(r,o))throw new n;Object.hasOwn(t,o)||(r[o]=!0,t[o]=!0,e.predecessors(o).forEach(a),delete r[o],i.push(o))}),Object.keys(t).length!==e.nodeCount())throw new n;return i}var n=class extends Error{constructor(){super(...arguments)}};t.exports=r,r.CycleException=n}),x=n((e,t)=>{var r=b();t.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}}),y=n((e,t)=>{t.exports=function(e,t,r,n,i){Array.isArray(t)||(t=[t]);var a=(e.isDirected()?e.successors:e.neighbors).bind(e),o={};return t.forEach(function(t){if(!e.hasNode(t))throw Error("Graph does not have node: "+t);i=function e(t,r,n,i,a,o,s){return Object.hasOwn(i,r)||(i[r]=!0,n||(s=o(s,r)),a(r).forEach(function(r){s=e(t,r,n,i,a,o,s)}),n&&(s=o(s,r))),s}(e,t,"post"===r,o,a,n,i)}),i}}),w=n((e,t)=>{var r=y();t.exports=function(e,t,n){return r(e,t,n,function(e,t){return e.push(t),e},[])}}),E=n((e,t)=>{var r=w();t.exports=function(e,t){return r(e,t,"post")}}),k=n((e,t)=>{var r=w();t.exports=function(e,t){return r(e,t,"pre")}}),j=n((e,t)=>{var r=a(),n=c();t.exports=function(e,t){var i,a=new r,o={},s=new n;function d(e){var r=e.v===i?e.w:e.v,n=s.priority(r);if(void 0!==n){var a=t(e);a<n&&(o[r]=i,s.decrease(r,a))}}if(0===e.nodeCount())return a;e.nodes().forEach(function(e){s.add(e,1/0),a.setNode(e)}),s.decrease(e.nodes()[0],0);for(var l=!1;s.size()>0;){if(Object.hasOwn(o,i=s.removeMin()))a.setEdge(i,o[i]);else{if(l)throw Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(i).forEach(d)}return a}}),N=n((e,t)=>{var r=h(),n=l();t.exports=function(e,t,i,a){return function(e,t,i,a){if(void 0===i)return r(e,t,i,a);for(var o=!1,s=e.nodes(),d=0;d<s.length;d++){for(var l=a(s[d]),u=0;u<l.length;u++){var c=l[u],h=c.v===s[d]?c.v:c.w,f=h===c.v?c.w:c.v;0>i({v:h,w:f})&&(o=!0)}if(o)return n(e,t,i,a)}return r(e,t,i,a)}(e,t,i,a||function(t){return e.outEdges(t)})}}),_=n((e,t)=>{t.exports={bellmanFord:l(),components:u(),dijkstra:h(),dijkstraAll:f(),extractPath:p(),findCycles:v(),floydWarshall:m(),isAcyclic:x(),postorder:E(),preorder:k(),prim:j(),shortestPaths:N(),reduce:y(),tarjan:g(),topsort:b()}}),O=s();t.exports={Graph:O.Graph,json:d(),alg:_(),version:O.version}}),n=t((e,t)=>{function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function n(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,r=t._prev;for(;r!==t;)e.push(JSON.stringify(r,n)),r=r._prev;return"["+e.join(", ")+"]"}}}),i=t((e,t)=>{var i=r().Graph,a=n();t.exports=function(e,t){var r,n;let l,u,c,h,f;if(1>=e.nodeCount())return[];let p=(r=e,n=t||o,l=new i,u=0,c=0,r.nodes().forEach(e=>{l.setNode(e,{v:e,in:0,out:0})}),r.edges().forEach(e=>{let t=l.edge(e.v,e.w)||0,r=n(e);l.setEdge(e.v,e.w,t+r),c=Math.max(c,l.node(e.v).out+=r),u=Math.max(u,l.node(e.w).in+=r)}),h=(function(e){let t=[];for(let r=0;r<e;r++)t.push(r);return t})(c+u+3).map(()=>new a),f=u+1,l.nodes().forEach(e=>{d(h,f,l.node(e))}),{graph:l,buckets:h,zeroIdx:f});return(function(e,t,r){let n=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)s(e,t,r,o);for(;o=i.dequeue();)s(e,t,r,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i].dequeue()){n=n.concat(s(e,t,r,o,!0));break}}}return n})(p.graph,p.buckets,p.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))};var o=()=>1;function s(e,t,r,n,i){let a=i?[]:void 0;return e.inEdges(n.v).forEach(n=>{let o=e.edge(n),s=e.node(n.v);i&&a.push({v:n.v,w:n.w}),s.out-=o,d(t,r,s)}),e.outEdges(n.v).forEach(n=>{let i=e.edge(n),a=n.w,o=e.node(a);o.in-=i,d(t,r,o)}),e.removeNode(n.v),a}function d(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}}),a=t((e,t)=>{var n=r().Graph;function i(e,t,r,n){for(var i=n;e.hasNode(i);)i=d(n);return r.dummy=t,e.setNode(i,r),i}t.exports={addBorderNode:function(e,t,r,n){let a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=n),i(e,"border",a,t)},addDummyNode:i,applyWithChunking:a,asNonCompoundGraph:function(e){let t=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r))}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r))}),t},buildLayerMatrix:function(e){let t=l(o(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),i=n.rank;void 0!==i&&(t[i][n.order]=r)}),t},intersectRect:function(e,t){let r,n,i=e.x,a=e.y,o=t.x-i,s=t.y-a,d=e.width/2,l=e.height/2;if(!o&&!s)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*d>Math.abs(o)*l?(s<0&&(l=-l),r=l*o/s,n=l):(o<0&&(d=-d),r=d,n=d*s/o),{x:i+r,y:a+n}},mapValues:function(e,t){let r=t;return"string"==typeof t&&(r=e=>e[t]),Object.entries(e).reduce((e,[t,n])=>(e[t]=r(n,t),e),{})},maxRank:o,normalizeRanks:function(e){let t=a(Math.min,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?Number.MAX_VALUE:r}));e.nodes().forEach(r=>{let n=e.node(r);Object.hasOwn(n,"rank")&&(n.rank-=t)})},notime:function(e,t){return t()},partition:function(e,t){let r={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?r.lhs.push(e):r.rhs.push(e)}),r},pick:function(e,t){let r={};for(let n of t)void 0!==e[n]&&(r[n]=e[n]);return r},predecessorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.inEdges(t).forEach(t=>{r[t.v]=(r[t.v]||0)+e.edge(t).weight}),r});return u(e.nodes(),t)},range:l,removeEmptyRanks:function(e){let t=a(Math.min,e.nodes().map(t=>e.node(t).rank).filter(e=>void 0!==e)),r=[];e.nodes().forEach(n=>{let i=e.node(n).rank-t;r[i]||(r[i]=[]),r[i].push(n)});let n=0,i=e.graph().nodeRankFactor;Array.from(r).forEach((t,r)=>{void 0===t&&r%i!=0?--n:void 0!==t&&n&&t.forEach(t=>e.node(t).rank+=n)})},simplify:function(e){let t=new n().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t},successorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.outEdges(t).forEach(t=>{r[t.w]=(r[t.w]||0)+e.edge(t).weight}),r});return u(e.nodes(),t)},time:function(e,t){let r=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-r)+"ms")}},uniqueId:d,zipObject:u};function a(e,t){if(!(t.length>65535))return e.apply(null,t);{let r=function(e,t=65535){let r=[];for(let n=0;n<e.length;n+=t){let i=e.slice(n,n+t);r.push(i)}return r}(t);return e.apply(null,r.map(t=>e.apply(null,t)))}}function o(e){return a(Math.max,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?5e-324:r}))}var s=0;function d(e){return e+""+ ++s}function l(e,t,r=1){null==t&&(t=e,e=0);let n=e=>e<t;r<0&&(n=e=>t<e);let i=[];for(let t=e;n(t);t+=r)i.push(t);return i}function u(e,t){return e.reduce((e,r,n)=>(e[r]=t[n],e),{})}}),o=t((e,t)=>{var r=i(),n=a().uniqueId;t.exports={run:function(e){var t,i;let a,o,s;("greedy"===e.graph().acyclicer?r(e,(t=e,e=>t.edge(e).weight)):(a=[],o={},s={},(i=e).nodes().forEach(function e(t){Object.hasOwn(s,t)||(s[t]=!0,o[t]=!0,i.outEdges(t).forEach(t=>{Object.hasOwn(o,t.w)?a.push(t):e(t.w)}),delete o[t])}),a)).forEach(t=>{let r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,n("rev"))})},undo:function(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}}}),s=t((e,t)=>{var r=a();t.exports={run:function(e){e.graph().dummyChains=[],e.edges().forEach(t=>(function(e,t){let n,i,a,o=t.v,s=e.node(o).rank,d=t.w,l=e.node(d).rank,u=t.name,c=e.edge(t),h=c.labelRank;if(l!==s+1){for(e.removeEdge(t),a=0,++s;s<l;++a,++s)c.points=[],i={width:0,height:0,edgeLabel:c,edgeObj:t,rank:s},n=r.addDummyNode(e,"edge",i,"_d"),s===h&&(i.width=c.width,i.height=c.height,i.dummy="edge-label",i.labelpos=c.labelpos),e.setEdge(o,n,{weight:c.weight},u),0===a&&e.graph().dummyChains.push(n),o=n;e.setEdge(o,d,{weight:c.weight},u)}})(e,t))},undo:function(e){e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeLabel,i;for(e.setEdge(r.edgeObj,n);r.dummy;)i=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=i,r=e.node(t)})}}}),d=t((e,t)=>{var{applyWithChunking:r}=a();t.exports={longestPath:function(e){var t={};e.sources().forEach(function n(i){var a=e.node(i);if(Object.hasOwn(t,i))return a.rank;t[i]=!0;var o=r(Math.min,e.outEdges(i).map(t=>null==t?1/0:n(t.w)-e.edge(t).minlen));return o===1/0&&(o=0),a.rank=o})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}}),l=t((e,t)=>{var n=r().Graph,i=d().slack;t.exports=function(e){var t,r,a,o,s=new n({directed:!1}),d=e.nodes()[0],l=e.nodeCount();for(s.setNode(d,{});t=s,r=e,t.nodes().forEach(function e(n){r.nodeEdges(n).forEach(a=>{var o=a.v,s=n===o?a.w:o;t.hasNode(s)||i(r,a)||(t.setNode(s,{}),t.setEdge(n,s,{}),e(s))})}),t.nodeCount()<l;)a=function(e,t){return t.edges().reduce((r,n)=>{let a=1/0;return e.hasNode(n.v)!==e.hasNode(n.w)&&(a=i(t,n)),a<r[0]?[a,n]:r},[1/0,null])[1]}(s,e),o=s.hasNode(a.v)?i(e,a):-i(e,a),function(e,t,r){e.nodes().forEach(e=>t.node(e).rank+=r)}(s,e,o);return s}}),u=t((e,t)=>{var n=l(),i=d().slack,o=d().longestPath,s=r().alg.preorder,u=r().alg.postorder,c=a().simplify;function h(e){o(e=c(e));var t,r,i=n(e);for(g(i),f(i,e);t=v(i);)r=m(i,e,t),b(i,e,t,r)}function f(e,t){var r=u(e,e.nodes());(r=r.slice(0,r.length-1)).forEach(r=>{var n,i,a,o;return n=e,i=t,a=r,o=n.node(a).parent,void(n.edge(a,o).cutvalue=p(n,i,a))})}function p(e,t,r){var n=e.node(r).parent,i=!0,a=t.edge(r,n),o=0;return a||(i=!1,a=t.edge(n,r)),o=a.weight,t.nodeEdges(r).forEach(a=>{var s=a.v===r,d=s?a.w:a.v;if(d!==n){var l,u,c,h=s===i,f=t.edge(a).weight;if(o+=h?f:-f,l=e,u=r,c=d,l.hasEdge(u,c)){var p=e.edge(r,d).cutvalue;o+=h?-p:p}}}),o}function g(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,r,n,i,a){var o=n,s=t.node(i);return r[i]=!0,t.neighbors(i).forEach(a=>{Object.hasOwn(r,a)||(n=e(t,r,n,a,i))}),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}(e,{},1,t)}function v(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function m(e,t,r){var n=r.v,a=r.w;t.hasEdge(n,a)||(n=r.w,a=r.v);var o=e.node(n),s=e.node(a),d=o,l=!1;return o.lim>s.lim&&(d=s,l=!0),t.edges().filter(t=>l===x(e,e.node(t.v),d)&&l!==x(e,e.node(t.w),d)).reduce((e,r)=>i(t,r)<i(t,e)?r:e)}function b(e,t,r,n){var i,a,o,d,l=r.v,u=r.w;e.removeEdge(l,u),e.setEdge(n.v,n.w,{}),g(e),f(e,t),i=e,a=t,o=i.nodes().find(e=>!a.node(e).parent),(d=(d=s(i,o)).slice(1)).forEach(e=>{var t=i.node(e).parent,r=a.edge(e,t),n=!1;r||(r=a.edge(t,e),n=!0),a.node(e).rank=a.node(t).rank+(n?r.minlen:-r.minlen)})}function x(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}t.exports=h,h.initLowLimValues=g,h.initCutValues=f,h.calcCutValue=p,h.leaveEdge=v,h.enterEdge=m,h.exchangeEdges=b}),c=t((e,t)=>{var r=d().longestPath,n=l(),i=u();t.exports=function(e){var t,o=e.graph().ranker;if(o instanceof Function)return o(e);switch(e.graph().ranker){case"network-simplex":default:i(e);break;case"tight-tree":r(t=e),n(t);break;case"longest-path":a(e);case"none":}};var a=r}),h=t((e,t)=>{t.exports=function(e){var t;let r,n,i=(r={},n=0,(t=e).children().forEach(function e(i){let a=n;t.children(i).forEach(e),r[i]={low:a,lim:n++}}),r);e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeObj,a=function(e,t,r,n){let i=[],a=[],o=Math.min(t[r].low,t[n].low),s=Math.max(t[r].lim,t[n].lim),d,l;d=r;do i.push(d=e.parent(d));while(d&&(t[d].low>o||s>t[d].lim))for(l=d,d=n;(d=e.parent(d))!==l;)a.push(d);return{path:i.concat(a.reverse()),lca:l}}(e,i,n.v,n.w),o=a.path,s=a.lca,d=0,l=o[0],u=!0;for(;t!==n.w;){if(r=e.node(t),u){for(;(l=o[d])!==s&&e.node(l).maxRank<r.rank;)d++;l===s&&(u=!1)}if(!u){for(;d<o.length-1&&e.node(l=o[d+1]).minRank<=r.rank;)d++;l=o[d]}e.setParent(t,l),t=e.successors(t)[0]}})}}),f=t((e,t)=>{var r=a();t.exports={run:function(e){var t,n,i;let a=r.addDummyNode(e,"root",{},"_root"),o=(n={},(t=e).children().forEach(e=>(function e(r,i){var a=t.children(r);a&&a.length&&a.forEach(t=>e(t,i+1)),n[r]=i})(e,1)),n),s=Object.values(o),d=r.applyWithChunking(Math.max,s)-1,l=2*d+1;e.graph().nestingRoot=a,e.edges().forEach(t=>e.edge(t).minlen*=l);let u=(i=e).edges().reduce((e,t)=>e+i.edge(t).weight,0)+1;e.children().forEach(t=>(function e(t,n,i,a,o,s,d){let l=t.children(d);if(!l.length){d!==n&&t.setEdge(n,d,{weight:0,minlen:i});return}let u=r.addBorderNode(t,"_bt"),c=r.addBorderNode(t,"_bb"),h=t.node(d);t.setParent(u,d),h.borderTop=u,t.setParent(c,d),h.borderBottom=c,l.forEach(r=>{e(t,n,i,a,o,s,r);let l=t.node(r),h=l.borderTop?l.borderTop:r,f=l.borderBottom?l.borderBottom:r,p=l.borderTop?a:2*a,g=h!==f?1:o-s[d]+1;t.setEdge(u,h,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(f,c,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(d)||t.setEdge(n,u,{weight:0,minlen:o+s[d]})})(e,a,l,u,d,o,t)),e.graph().nodeRankFactor=l},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}}}),p=t((e,t)=>{var r=a();function n(e,t,n,i,a,o){let s=a[t][o-1],d=r.addDummyNode(e,"border",{width:0,height:0,rank:o,borderType:t},n);a[t][o]=d,e.setParent(d,i),s&&e.setEdge(s,d,{weight:1})}t.exports=function(e){e.children().forEach(function t(r){let i=e.children(r),a=e.node(r);if(i.length&&i.forEach(t),Object.hasOwn(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,i=a.maxRank+1;t<i;++t)n(e,"borderLeft","_bl",r,a,t),n(e,"borderRight","_br",r,a,t)}})}}),g=t((e,t)=>{function r(e){e.nodes().forEach(t=>n(e.node(t))),e.edges().forEach(t=>n(e.edge(t)))}function n(e){let t=e.width;e.width=e.height,e.height=t}function i(e){e.y=-e.y}function a(e){let t=e.x;e.x=e.y,e.y=t}t.exports={adjust:function(e){let t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&r(e)},undo:function(e){var t,n;let o=e.graph().rankdir.toLowerCase();("bt"===o||"rl"===o)&&((t=e).nodes().forEach(e=>i(t.node(e))),t.edges().forEach(e=>{let r=t.edge(e);r.points.forEach(i),Object.hasOwn(r,"y")&&i(r)})),("lr"===o||"rl"===o)&&((n=e).nodes().forEach(e=>a(n.node(e))),n.edges().forEach(e=>{let t=n.edge(e);t.points.forEach(a),Object.hasOwn(t,"x")&&a(t)}),r(e))}}}),v=t((e,t)=>{var r=a();t.exports=function(e){let t={},n=e.nodes().filter(t=>!e.children(t).length),i=n.map(t=>e.node(t).rank),a=r.applyWithChunking(Math.max,i),o=r.range(a+1).map(()=>[]);return n.sort((t,r)=>e.node(t).rank-e.node(r).rank).forEach(function r(n){t[n]||(t[n]=!0,o[e.node(n).rank].push(n),e.successors(n).forEach(r))}),o}}),m=t((e,t)=>{var r=a().zipObject;t.exports=function(e,t){let n=0;for(let i=1;i<t.length;++i)n+=function(e,t,n){let i=r(n,n.map((e,t)=>t)),a=t.flatMap(t=>e.outEdges(t).map(t=>({pos:i[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),o=1;for(;o<n.length;)o<<=1;let s=2*o-1;o-=1;let d=Array(s).fill(0),l=0;return a.forEach(e=>{let t=e.pos+o;d[t]+=e.weight;let r=0;for(;t>0;)t%2&&(r+=d[t+1]),t=t-1>>1,d[t]+=e.weight;l+=e.weight*r}),l}(e,t[i-1],t[i]);return n}}),b=t((e,t)=>{t.exports=function(e,t=[]){return t.map(t=>{let r=e.inEdges(t);if(!r.length)return{v:t};{let n=r.reduce((t,r)=>{let n=e.edge(r),i=e.node(r.v);return{sum:t.sum+n.weight*i.order,weight:t.weight+n.weight}},{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}})}}),x=t((e,t)=>{var r=a();t.exports=function(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];void 0!==t&&void 0!==r&&(r.indegree++,t.out.push(n[e.w]))}),function(e){let t=[];for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(function(e){return t=>{t.merged||(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}(r)),r.out.forEach(function(t){return r=>{r.in.push(t),0==--r.indegree&&e.push(r)}}(r))}return t.filter(e=>!e.merged).map(e=>r.pick(e,["vs","i","barycenter","weight"]))}(Object.values(n).filter(e=>!e.indegree))}}),y=t((e,t)=>{var r=a();function n(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}t.exports=function(e,t){var i;let a=r.partition(e,e=>Object.hasOwn(e,"barycenter")),o=a.lhs,s=a.rhs.sort((e,t)=>t.i-e.i),d=[],l=0,u=0,c=0;o.sort((i=!!t,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:i?t.i-e.i:e.i-t.i)),c=n(d,s,c),o.forEach(e=>{c+=e.vs.length,d.push(e.vs),l+=e.barycenter*e.weight,u+=e.weight,c=n(d,s,c)});let h={vs:d.flat(!0)};return u&&(h.barycenter=l/u,h.weight=u),h}}),w=t((e,t)=>{var r=b(),n=x(),i=y();t.exports=function e(t,a,o,s){var d,l;let u=t.children(a),c=t.node(a),h=c?c.borderLeft:void 0,f=c?c.borderRight:void 0,p={};h&&(u=u.filter(e=>e!==h&&e!==f));let g=r(t,u);g.forEach(r=>{if(t.children(r.v).length){var n,i;let a=e(t,r.v,o,s);p[r.v]=a,Object.hasOwn(a,"barycenter")&&(n=r,i=a,void 0!==n.barycenter?(n.barycenter=(n.barycenter*n.weight+i.barycenter*i.weight)/(n.weight+i.weight),n.weight+=i.weight):(n.barycenter=i.barycenter,n.weight=i.weight))}});let v=n(g,o);d=v,l=p,d.forEach(e=>{e.vs=e.vs.flatMap(e=>l[e]?l[e].vs:e)});let m=i(v,s);if(h&&(m.vs=[h,m.vs,f].flat(!0),t.predecessors(h).length)){let e=t.node(t.predecessors(h)[0]),r=t.node(t.predecessors(f)[0]);Object.hasOwn(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+e.order+r.order)/(m.weight+2),m.weight+=2}return m}}),E=t((e,t)=>{var n=r().Graph,i=a();t.exports=function(e,t,r,a){a||(a=e.nodes());let o=function(e){for(var t;e.hasNode(t=i.uniqueId("_root")););return t}(e),s=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(t=>e.node(t));return a.forEach(n=>{let i=e.node(n),a=e.parent(n);(i.rank===t||i.minRank<=t&&t<=i.maxRank)&&(s.setNode(n),s.setParent(n,a||o),e[r](n).forEach(t=>{let r=t.v===n?t.w:t.v,i=s.edge(r,n),a=void 0!==i?i.weight:0;s.setEdge(r,n,{weight:e.edge(t).weight+a})}),Object.hasOwn(i,"minRank")&&s.setNode(n,{borderLeft:i.borderLeft[t],borderRight:i.borderRight[t]}))}),s}}),k=t((e,t)=>{t.exports=function(e,t,r){let n={},i;r.forEach(r=>{let a=e.parent(r),o,s;for(;a;){if((o=e.parent(a))?(s=n[o],n[o]=a):(s=i,i=a),s&&s!==a)return void t.setEdge(s,a);a=o}})}}),j=t((e,t)=>{var n=v(),i=m(),o=w(),s=E(),d=k(),l=r().Graph,u=a();function c(e,t,r){let n=new Map,i=(e,t)=>{n.has(e)||n.set(e,[]),n.get(e).push(t)};for(let t of e.nodes()){let r=e.node(t);if("number"==typeof r.rank&&i(r.rank,t),"number"==typeof r.minRank&&"number"==typeof r.maxRank)for(let e=r.minRank;e<=r.maxRank;e++)e!==r.rank&&i(e,t)}return t.map(function(t){return s(e,t,r,n.get(t)||[])})}function h(e,t){Object.values(t).forEach(t=>t.forEach((t,r)=>e.node(t).order=r))}t.exports=function e(t,r={}){if("function"==typeof r.customOrder)return void r.customOrder(t,e);let a=u.maxRank(t),s=c(t,u.range(1,a+1),"inEdges"),f=c(t,u.range(a-1,-1,-1),"outEdges"),p=n(t);if(h(t,p),r.disableOptimalOrderHeuristic)return;let g=1/0,v,m=r.constraints||[];for(let e=0,r=0;r<4;++e,++r){(function(e,t,r){let n=new l;e.forEach(function(e){r.forEach(e=>n.setEdge(e.left,e.right));let i=e.graph().root,a=o(e,i,n,t);a.vs.forEach((t,r)=>e.node(t).order=r),d(e,n,a.vs)})})(e%2?s:f,e%4>=2,m),p=u.buildLayerMatrix(t);let n=i(t,p);n<g?(r=0,v=Object.assign({},p),g=n):n===g&&(v=structuredClone(p))}h(t,v)}}),N=t((e,t)=>{var n=r().Graph,i=a();function o(e,t){let r={};return t.length&&t.reduce(function(t,n){let i=0,a=0,o=t.length,s=n[n.length-1];return n.forEach((t,l)=>{let u=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}(e,t),c=u?e.node(u).order:o;(u||t===s)&&(n.slice(a,l+1).forEach(t=>{e.predecessors(t).forEach(n=>{let a=e.node(n),o=a.order;(o<i||c<o)&&!(a.dummy&&e.node(t).dummy)&&d(r,n,t)})}),a=l+1,i=c)}),n}),r}function s(e,t){let r={};function n(t,n,a,o,s){let l;i.range(n,a).forEach(n=>{l=t[n],e.node(l).dummy&&e.predecessors(l).forEach(t=>{let n=e.node(t);n.dummy&&(n.order<o||n.order>s)&&d(r,t,l)})})}return t.length&&t.reduce(function(t,r){let i=-1,a,o=0;return r.forEach((s,d)=>{if("border"===e.node(s).dummy){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,n(r,o,d,i,a),o=d,i=a)}n(r,o,r.length,a,t.length)}),r}),r}function d(e,t,r){if(t>r){let e=t;t=r,r=e}let n=e[t];n||(e[t]=n={}),n[r]=!0}function l(e,t,r){if(t>r){let e=t;t=r,r=e}return!!e[t]&&Object.hasOwn(e[t],r)}function u(e,t,r,n){let i={},a={},o={};return t.forEach(e=>{e.forEach((e,t)=>{i[e]=e,a[e]=e,o[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=n(e);if(s.length){let n=((s=s.sort((e,t)=>o[e]-o[t])).length-1)/2;for(let d=Math.floor(n),u=Math.ceil(n);d<=u;++d){let n=s[d];a[e]===e&&t<o[n]&&!l(r,e,n)&&(a[n]=e,a[e]=i[e]=i[n],t=o[n])}}})}),{root:i,align:a}}function c(e,t,r,i,a){var o,s,d,l,u,c,h;let f,p,g,v={},m=(o=e,s=t,d=r,l=a,f=new n,g=(u=(p=o.graph()).nodesep,c=p.edgesep,h=l,(e,t,r)=>{let n=e.node(t),i=e.node(r),a,o;if(a=0+n.width/2,Object.hasOwn(n,"labelpos"))switch(n.labelpos.toLowerCase()){case"l":o=-n.width/2;break;case"r":o=n.width/2}if(o&&(a+=h?o:-o),o=0,a+=(n.dummy?c:u)/2,a+=(i.dummy?c:u)/2,a+=i.width/2,Object.hasOwn(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":o=i.width/2;break;case"r":o=-i.width/2}return o&&(a+=h?o:-o),o=0,a}),s.forEach(e=>{let t;e.forEach(e=>{let r=d[e];if(f.setNode(r),t){var n=d[t],i=f.edge(n,r);f.setEdge(n,r,Math.max(g(o,e,t),i||0))}t=e})}),f),b=a?"borderLeft":"borderRight";function x(e,t){let r=m.nodes().slice(),n={},i=r.pop();for(;i;){if(n[i])e(i);else for(let e of(n[i]=!0,r.push(i),t(i)))r.push(e);i=r.pop()}}return x(function(e){v[e]=m.inEdges(e).reduce((e,t)=>Math.max(e,v[t.v]+m.edge(t)),0)},m.predecessors.bind(m)),x(function(t){let r=m.outEdges(t).reduce((e,t)=>Math.min(e,v[t.w]-m.edge(t)),1/0),n=e.node(t);r!==1/0&&n.borderType!==b&&(v[t]=Math.max(v[t],r))},m.successors.bind(m)),Object.keys(i).forEach(e=>v[e]=v[r[e]]),v}function h(e,t){return Object.values(t).reduce((t,r)=>{let n=-1/0,i=1/0;Object.entries(r).forEach(([t,r])=>{var a,o;let s=(a=e,o=t,a.node(o).width/2);n=Math.max(r+s,n),i=Math.min(r-s,i)});let a=n-i;return a<t[0]&&(t=[a,r]),t},[1/0,null])[1]}function f(e,t){let r=Object.values(t),n=i.applyWithChunking(Math.min,r),a=i.applyWithChunking(Math.max,r);["u","d"].forEach(r=>{["l","r"].forEach(o=>{let s=r+o,d=e[s];if(d===t)return;let l=Object.values(d),u=n-i.applyWithChunking(Math.min,l);"l"!==o&&(u=a-i.applyWithChunking(Math.max,l)),u&&(e[s]=i.mapValues(d,e=>e+u))})})}function p(e,t){return i.mapValues(e.ul,(r,n)=>{if(t)return e[t.toLowerCase()][n];{let t=Object.values(e).map(e=>e[n]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}t.exports={positionX:function(e){let t=i.buildLayerMatrix(e),r=Object.assign(o(e,t),s(e,t)),n={},a;["u","d"].forEach(o=>{a="u"===o?t:Object.values(t).reverse(),["l","r"].forEach(t=>{"r"===t&&(a=a.map(e=>Object.values(e).reverse()));let s=("u"===o?e.predecessors:e.successors).bind(e),d=u(e,a,r,s),l=c(e,a,d.root,d.align,"r"===t);"r"===t&&(l=i.mapValues(l,e=>-e)),n[o+t]=l})});let d=h(e,n);return f(n,d),p(n,e.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:d,hasConflict:l,verticalAlignment:u,horizontalCompaction:c,alignCoordinates:f,findSmallestWidthAlignment:h,balance:p}}),_=t((e,t)=>{var r=a(),n=N().positionX;t.exports=function(e){var t;let i,a,o,s;t=e=r.asNonCompoundGraph(e),i=r.buildLayerMatrix(t),a=t.graph().ranksep,o=t.graph().rankalign,s=0,i.forEach(e=>{let r=e.reduce((e,r)=>{let n=t.node(r).height;return e>n?e:n},0);e.forEach(e=>{let n=t.node(e);"top"===o?n.y=s+n.height/2:"bottom"===o?n.y=s+r-n.height/2:n.y=s+r/2}),s+=r+a}),Object.entries(n(e)).forEach(([t,r])=>e.node(t).x=r)}}),O=t((e,t)=>{var n=o(),i=s(),d=c(),l=a().normalizeRanks,u=h(),v=a().removeEmptyRanks,m=f(),b=p(),x=g(),y=j(),w=_(),E=a(),k=r().Graph;t.exports=function(e,t={}){let r=t.debugTiming?E.time:E.notime;return r("layout",()=>{let a=r(" buildLayoutGraph",()=>{var t;let r,n;return t=e,r=new k({multigraph:!0,compound:!0}),n=$(t.graph()),r.setGraph(Object.assign({},O,D(n,N),E.pick(n,C))),t.nodes().forEach(e=>{let n=D($(t.node(e)),R);Object.keys(M).forEach(e=>{void 0===n[e]&&(n[e]=M[e])}),r.setNode(e,n),r.setParent(e,t.parent(e))}),t.edges().forEach(e=>{let n=$(t.edge(e));r.setEdge(e,Object.assign({},L,D(n,S),E.pick(n,T)))}),r});return r(" runLayout",()=>{var e,o,s;return e=a,o=r,s=t,void(o(" makeSpaceForEdgeLabels",()=>{var t;let r;return r=(t=e).graph(),void(r.ranksep/=2,t.edges().forEach(e=>{let n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}),o(" removeSelfEdges",()=>{var t;(t=e).edges().forEach(e=>{if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),o(" acyclic",()=>n.run(e)),o(" nestingGraph.run",()=>m.run(e)),o(" rank",()=>d(E.asNonCompoundGraph(e))),o(" injectEdgeLabelProxies",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(r.width&&r.height){let r=t.node(e.v),n={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};E.addDummyNode(t,"edge-proxy",n,"_ep")}})}),o(" removeEmptyRanks",()=>v(e)),o(" nestingGraph.cleanup",()=>m.cleanup(e)),o(" normalizeRanks",()=>l(e)),o(" assignRankMinMax",()=>{var t;let r;return r=0,void((t=e).nodes().forEach(e=>{let n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,r=Math.max(r,n.maxRank))}),t.graph().maxRank=r)}),o(" removeEdgeLabelProxies",()=>{var t;(t=e).nodes().forEach(e=>{let r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}),o(" normalize.run",()=>i.run(e)),o(" parentDummyChains",()=>u(e)),o(" addBorderSegments",()=>b(e)),o(" order",()=>y(e,s)),o(" insertSelfEdges",()=>{var t;return t=e,void E.buildLayerMatrix(t).forEach(e=>{var r=0;e.forEach((e,n)=>{var i=t.node(e);i.order=n+r,(i.selfEdges||[]).forEach(e=>{E.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:n+ ++r,e:e.e,label:e.label},"_se")}),delete i.selfEdges})})}),o(" adjustCoordinateSystem",()=>x.adjust(e)),o(" position",()=>w(e)),o(" positionSelfEdges",()=>{var t;(t=e).nodes().forEach(e=>{var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,o=r.x-i,s=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],r.label.x=r.x,r.label.y=r.y}})}),o(" removeBorderNodes",()=>{var t;(t=e).nodes().forEach(e=>{if(t.children(e).length){let r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(r.borderLeft[r.borderLeft.length-1]),o=t.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),t.nodes().forEach(e=>{"border"===t.node(e).dummy&&t.removeNode(e)})}),o(" normalize.undo",()=>i.undo(e)),o(" fixupEdgeLabelCoords",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(Object.hasOwn(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),o(" undoCoordinateSystem",()=>x.undo(e)),o(" translateGraph",()=>(function(e){let t=1/0,r=0,n=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function d(e){let a=e.x,o=e.y,s=e.width,d=e.height;t=Math.min(t,a-s/2),r=Math.max(r,a+s/2),n=Math.min(n,o-d/2),i=Math.max(i,o+d/2)}e.nodes().forEach(t=>d(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);Object.hasOwn(r,"x")&&d(r)}),t-=o,n-=s,e.nodes().forEach(r=>{let i=e.node(r);i.x-=t,i.y-=n}),e.edges().forEach(r=>{let i=e.edge(r);i.points.forEach(e=>{e.x-=t,e.y-=n}),Object.hasOwn(i,"x")&&(i.x-=t),Object.hasOwn(i,"y")&&(i.y-=n)}),a.width=r-t+o,a.height=i-n+s})(e)),o(" assignNodeIntersects",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=i,o=n),r.points.unshift(E.intersectRect(n,a)),r.points.push(E.intersectRect(i,o))})}),o(" reversePoints",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);r.reversed&&r.points.reverse()})}),o(" acyclic.undo",()=>n.undo(e)))}),r(" updateInputGraph",()=>{var t,r;return t=e,r=a,void(t.nodes().forEach(e=>{let n=t.node(e),i=r.node(e);n&&(n.x=i.x,n.y=i.y,n.order=i.order,n.rank=i.rank,r.children(e).length&&(n.width=i.width,n.height=i.height))}),t.edges().forEach(e=>{let n=t.edge(e),i=r.edge(e);n.points=i.points,Object.hasOwn(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=r.graph().width,t.graph().height=r.graph().height)}),a})};var N=["nodesep","edgesep","ranksep","marginx","marginy"],O={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},C=["acyclicer","ranker","rankdir","align","rankalign"],R=["width","height","rank"],M={width:0,height:0},S=["minlen","weight","width","height","labeloffset"],L={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function D(e,t){return E.mapValues(E.pick(e,t),Number)}function $(e){var t={};return e&&Object.entries(e).forEach(([e,r])=>{"string"==typeof e&&(e=e.toLowerCase()),t[e]=r}),t}}),C=t((e,t)=>{var n=a(),i=r().Graph;t.exports={debugOrdering:function(e){let t=n.buildLayerMatrix(e),r=new i({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{r.setNode(t,{label:t}),r.setParent(t,"layer"+e.node(t).rank)}),e.edges().forEach(e=>r.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{r.setNode("layer"+t,{rank:"same"}),e.reduce((e,t)=>(r.setEdge(e,t,{style:"invis"}),t))}),r}}}),R=t((e,t)=>{t.exports="2.0.4"});let M=t((e,t)=>{t.exports={graphlib:r(),layout:O(),debug:C(),util:{time:a().time,notime:a().notime},version:R()}})(),S={direction:"LR",ranksep:200,nodesep:48};function L(e="ltr"){return{...S,direction:"rtl"===e?"RL":"LR"}}let T={featureNode:{width:388,height:140},repositoryNode:{width:416,height:140},applicationNode:{width:416,height:110}};function D(e,t){let r=e.data;return r&&"number"==typeof r.width&&"number"==typeof r.height?{width:r.width,height:r.height}:T[e.type??""]??t}function $(e,t,r={}){let{direction:n="TB",nodeSize:i={width:172,height:36},ranksep:a=80,nodesep:o=30}=r;if(0===e.length)return{nodes:[],edges:[]};let s=new M.graphlib.Graph({multigraph:!0});s.setDefaultEdgeLabel(()=>({})),s.setGraph({rankdir:n,ranksep:a,nodesep:o});let d=new Set;for(let e of t)d.add(e.source),d.add(e.target);let l=e.filter(e=>d.has(e.id)),u=e.filter(e=>!d.has(e.id));for(let e of l){let t=D(e,i);s.setNode(e.id,{width:t.width,height:t.height})}for(let e of t)s.hasNode(e.source)&&s.hasNode(e.target)&&s.setEdge(e.source,e.target,{},e.id);M.layout(s);let{targetPosition:c,sourcePosition:h}=function(e){switch(e){case"LR":return{targetPosition:"left",sourcePosition:"right"};case"RL":return{targetPosition:"right",sourcePosition:"left"};case"BT":return{targetPosition:"bottom",sourcePosition:"top"};default:return{targetPosition:"top",sourcePosition:"bottom"}}}(n),f="LR"===n||"RL"===n,p=new Map;for(let e of l){let t=s.node(e.id),r=D(e,i);p.set(e.id,{cx:t.x,cy:t.y,w:r.width,h:r.height})}let g=0;for(let e of p.values()){g=f?e.cx:e.cy;break}for(let e of u){let t=D(e,i);p.set(e.id,{cx:f?g:0,cy:f?0:g,w:t.width,h:t.height})}let v=new Map;for(let e of t)p.has(e.source)&&p.has(e.target)&&(v.has(e.source)||v.set(e.source,[]),v.get(e.source).push(e.target));let m=new Map;for(let t=0;t<e.length;t++)m.set(e[t].id,t);for(let[,e]of v)e.sort((e,t)=>(m.get(e)??0)-(m.get(t)??0));let b=new Set;for(let e of v.values())for(let t of e)b.add(t);let x=[...[...d].filter(e=>p.has(e)&&!b.has(e)),...u.map(e=>e.id)];x.sort((e,t)=>(m.get(e)??0)-(m.get(t)??0));let y=new Map;for(let e of x)!function e(t){if(y.has(t))return y.get(t);let r=p.get(t),n=f?r.h:r.w,i=v.get(t);if(!i||0===i.length)return y.set(t,n),n;let a=0;for(let t of i)a+=e(t);let s=Math.max(n,a+=(i.length-1)*o);return y.set(t,s),s}(e);let w=0;for(let e of x){let t=y.get(e)??0;!function e(t,r){let n=p.get(t);f?n.cy=r:n.cx=r;let i=v.get(t);if(!i||0===i.length)return;let a=0;for(let e of i)a+=y.get(e)??0;let s=r-(a+=(i.length-1)*o)/2;for(let t of i){let r=y.get(t)??0;e(t,s+r/2),s+=r+o}}(e,w+t/2),w+=t+o}let E=[];for(let t of e){let e=p.get(t.id);e&&E.push({...t,targetPosition:c,sourcePosition:h,position:{x:e.cx-e.w/2,y:e.cy-e.h/2}})}return{nodes:E,edges:[...t]}}e.s(["getCanvasLayoutDefaults",()=>L,"layoutWithDagre",()=>$],939835)},643280,e=>{"use strict";var t=e.i(679606),r=e.i(152155),n=e.i(468304),i=e.i(735364),a=e.i(48306),o=e.i(81846),s=e.i(123620),d=e.i(508893);let l=(0,d.createServerReference)("4068987a9d748712ed92ef5b5d9ad942f5e977d922",d.callServer,void 0,d.findSourceMapURL,"saveAgentPrompt"),u=(0,d.createServerReference)("406b893fe8864179366c306ea1e2abe3981d09edb0",d.callServer,void 0,d.findSourceMapURL,"resetAgentPrompt");function c({entries:e,onSaveOverride:r,onResetOverride:n}){return 0===e.length?(0,t.jsx)("p",{className:"text-muted-foreground rounded-lg border border-dashed p-4 text-sm",children:"No editable prompt slots are registered for this agent yet."}):(0,t.jsx)("div",{className:"flex flex-col gap-4","data-testid":"prompt-editor",children:e.map(e=>(0,t.jsx)(h,{entry:e,...r&&{onSaveOverride:r},...n&&{onResetOverride:n}},`${e.agentType}-${e.promptId}`))})}function h({entry:e,onSaveOverride:n,onResetOverride:d}){let[c,h]=(0,r.useState)(e.effectiveBody),[f,p]=(0,r.useTransition)(),[g,v]=(0,r.useState)(null),[m,b]=(0,r.useState)(null);(0,r.useEffect)(()=>{h(e.effectiveBody)},[e.effectiveBody]);let x=c!==e.effectiveBody,y=e.hasOverride||x;return(0,t.jsxs)("article",{className:"bg-card flex flex-col gap-3 rounded-lg border p-4","data-testid":`prompt-slot-${e.promptId}`,children:[(0,t.jsxs)("header",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:e.name}),(0,t.jsx)("p",{className:"text-muted-foreground text-xs",children:e.description}),(0,t.jsxs)("p",{className:"text-muted-foreground mt-1 font-mono text-[10px]",children:[e.agentType,"/",e.promptId]})]}),y?(0,t.jsx)(o.Badge,{variant:"default",className:"shrink-0","data-testid":`badge-overridden-${e.promptId}`,children:"Overridden"}):(0,t.jsx)(o.Badge,{variant:"secondary",className:"shrink-0",children:"Bundled"})]}),(0,t.jsx)(a.Textarea,{value:c,onChange:e=>h(e.target.value),rows:Math.min(20,Math.max(6,c.split("\n").length)),className:"font-mono text-xs","data-testid":`prompt-textarea-${e.promptId}`,disabled:f,spellCheck:!1}),g?(0,t.jsx)(s.Alert,{variant:"destructive","data-testid":`prompt-error-${e.promptId}`,children:(0,t.jsx)(s.AlertDescription,{children:g})}):null,m?(0,t.jsxs)("p",{className:"text-muted-foreground text-xs","data-testid":`prompt-saved-${e.promptId}`,children:["Saved at ",m.toLocaleTimeString()]}):null,(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[e.hasOverride?(0,t.jsx)(i.Button,{type:"button",variant:"ghost",size:"sm",disabled:f,onClick:function(){v(null),p(async()=>{let t=await (d??u)({agentType:e.agentType,promptId:e.promptId});t.ok?(h(e.bundledBody),b(new Date)):v(t.error??"Failed to reset")})},"data-testid":`prompt-reset-${e.promptId}`,children:"Reset to bundled"}):null,(0,t.jsx)(i.Button,{type:"button",size:"sm",disabled:!x||f,onClick:function(){v(null),p(async()=>{let t=await (n??l)({agentType:e.agentType,promptId:e.promptId,body:c});t.ok?b(new Date):v(t.error??"Failed to save")})},"data-testid":`prompt-save-${e.promptId}`,children:f?"Saving…":e.hasOverride?"Update override":"Save override"})]})]})}var f=e.i(120942),p=e.i(292002),g=e.i(998798),v=e.i(3214),m=e.i(438227),b=e.i(698071),x=e.i(267669),y=e.i(860253),w=e.i(939835);let E=(0,d.createServerReference)("40ad2417227f10a4eca778e2126f6bd3e29594679d",d.callServer,void 0,d.findSourceMapURL,"resetAgentGraph"),k=(0,d.createServerReference)("40c92ce75be5ab248b54ffdd57154fdcce2a358b8d",d.callServer,void 0,d.findSourceMapURL,"saveAgentGraph"),j={editable:function({id:e,data:r}){let{label:n,description:i,editing:a,onLabelChange:o,onDescriptionChange:s,onDelete:d}=r;return(0,t.jsxs)("div",{className:"bg-card relative min-w-[180px] rounded-md border px-2 py-1.5 shadow-sm",children:[(0,t.jsx)(f.Handle,{type:"target",position:p.Position.Left}),a?(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("input",{value:n,onChange:t=>o(e,t.target.value),className:"border-border bg-background w-full rounded border px-1 py-0.5 text-xs font-semibold",placeholder:"label","aria-label":`Label for node ${e}`,"data-testid":`graph-node-label-${e}`}),(0,t.jsx)("input",{value:i??"",onChange:t=>s(e,t.target.value),className:"border-border bg-background w-full rounded border px-1 py-0.5 text-[10px]",placeholder:"description","aria-label":`Description for node ${e}`,"data-testid":`graph-node-description-${e}`}),(0,t.jsx)("button",{type:"button",onClick:()=>d(e),className:"text-destructive absolute -top-2 -right-2 flex size-4 items-center justify-center rounded-full border bg-white shadow-sm","aria-label":`Delete node ${e}`,"data-testid":`graph-node-delete-${e}`,children:(0,t.jsx)(x.Trash2,{className:"size-2.5"})})]}):(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 text-left",children:[(0,t.jsx)("span",{className:"text-xs font-semibold",children:n}),i?(0,t.jsx)("span",{className:"text-muted-foreground text-[10px]",children:i}):null]}),(0,t.jsx)(f.Handle,{type:"source",position:p.Position.Right})]})}};function N(e){return e.graph?(0,t.jsx)(f.ReactFlowProvider,{children:(0,t.jsx)(_,{...e,graph:e.graph})}):(0,t.jsx)("p",{className:"text-muted-foreground rounded-lg border border-dashed p-4 text-sm","data-testid":"agent-graph-empty",children:"No graph descriptor registered for this agent yet."})}function _({graph:e,bundled:n,hasOverride:a,onSaveOverride:d,onResetOverride:l,initialEditing:u}){let[c,h]=(0,r.useState)(!!u),[x,w]=(0,r.useState)(null),[N,_]=(0,r.useState)(null),[C,R]=(0,r.useTransition)(),M=(0,r.useRef)(0),S=(0,r.useMemo)(()=>O(e),[e]),[L,T,D]=(0,f.useNodesState)(S.nodes),[$,A,P]=(0,f.useEdgesState)(S.edges);(0,r.useEffect)(()=>{T(S.nodes),A(S.edges)},[S.nodes,S.edges,T,A]);let I=(0,r.useCallback)((e,t)=>{T(r=>r.map(r=>r.id===e?{...r,data:{...r.data,label:t}}:r))},[T]),z=(0,r.useCallback)((e,t)=>{T(r=>r.map(r=>r.id===e?{...r,data:{...r.data,description:t}}:r))},[T]),B=(0,r.useCallback)(e=>{T(t=>t.filter(t=>t.id!==e)),A(t=>t.filter(t=>t.source!==e&&t.target!==e))},[T,A]),F=(0,r.useMemo)(()=>L.map(e=>({...e,type:"editable",data:{...e.data,editing:c,onLabelChange:I,onDescriptionChange:z,onDelete:B}})),[L,c,I,z,B]);return(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"agent-graph-view",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e.agentType}),a?(0,t.jsx)(o.Badge,{variant:"default","data-testid":"graph-badge-overridden",children:"Overridden"}):(0,t.jsx)(o.Badge,{variant:"secondary",children:"Bundled"})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.Button,{type:"button",variant:"ghost",size:"sm",onClick:function(){M.current+=1;let e=`node-${Date.now()}-${M.current}`;T(t=>{var r;return[...t,{id:e,type:"editable",position:0===(r=t).length?{x:0,y:0}:{x:r.reduce((e,t)=>Math.max(e,t.position.x),0)+240,y:r.reduce((e,t)=>Math.min(e,t.position.y),0)},data:{label:"New step",description:"",editing:!0,onLabelChange:I,onDescriptionChange:z,onDelete:B},sourcePosition:p.Position.Right,targetPosition:p.Position.Left}]})},disabled:C,"data-testid":"graph-add-node",children:[(0,t.jsx)(v.Plus,{className:"size-3"}),"Add node"]}),a?(0,t.jsxs)(i.Button,{type:"button",variant:"ghost",size:"sm",onClick:function(){w(null),R(async()=>{let t=await (l??E)({agentType:e.agentType});if(!t.ok)return void w(t.error??"Failed to reset graph");if(_(new Date),h(!1),n){let e=O(n);T(e.nodes),A(e.edges)}})},disabled:C,"data-testid":"graph-reset",children:[(0,t.jsx)(m.RotateCcw,{className:"size-3"}),"Reset to bundled"]}):null,(0,t.jsxs)(i.Button,{type:"button",variant:"ghost",size:"sm",onClick:function(){T(S.nodes),A(S.edges),w(null),h(!1)},disabled:C,"data-testid":"graph-cancel",children:[(0,t.jsx)(y.X,{className:"size-3"}),"Cancel"]}),(0,t.jsxs)(i.Button,{type:"button",size:"sm",onClick:function(){var t,r;w(null);let n=(t=L,r=$,{nodes:t.map(e=>({id:e.id,label:e.data.label.trim()||e.id,...e.data.description?.trim()?{description:e.data.description.trim()}:{}})),edges:r.map(e=>({from:e.source,to:e.target,..."string"==typeof e.label&&e.label.trim()?{label:e.label.trim()}:{}}))}),i=function(e){if(0===e.nodes.length)return"Graph must have at least one node.";let t=new Set;for(let r of e.nodes){if(!r.label)return`Node ${r.id} must have a label.`;if(t.has(r.id))return`Duplicate node id: ${r.id}`;t.add(r.id)}for(let r of e.edges){if(!t.has(r.from))return`Edge references unknown source: ${r.from}`;if(!t.has(r.to))return`Edge references unknown target: ${r.to}`}return null}(n);i?w(i):R(async()=>{let t=await (d??k)({agentType:e.agentType,...n});t.ok?(_(new Date),h(!1)):w(t.error??"Failed to save graph")})},disabled:C,"data-testid":"graph-save",children:[(0,t.jsx)(b.Save,{className:"size-3"}),C?"Saving…":"Save graph"]})]}):(0,t.jsxs)(i.Button,{type:"button",variant:"outline",size:"sm",onClick:()=>h(!0),"data-testid":"graph-edit",children:[(0,t.jsx)(g.Pencil,{className:"size-3"}),"Edit"]})})]}),x?(0,t.jsx)(s.Alert,{variant:"destructive","data-testid":"graph-error",children:(0,t.jsx)(s.AlertDescription,{children:x})}):null,N&&!c?(0,t.jsxs)("p",{className:"text-muted-foreground text-xs","data-testid":"graph-saved",children:["Saved at ",N.toLocaleTimeString()]}):null,(0,t.jsx)("div",{className:"bg-muted/20 h-[480px] w-full overflow-hidden rounded-lg border",children:(0,t.jsxs)(f.ReactFlow,{nodes:F,edges:$,nodeTypes:j,onNodesChange:D,onEdgesChange:P,onConnect:function(e){A(t=>(0,p.addEdge)({...e,type:"smoothstep"},t))},nodesDraggable:c,nodesConnectable:c,elementsSelectable:c,deleteKeyCode:c?["Backspace","Delete"]:null,fitView:!0,proOptions:{hideAttribution:!0},children:[(0,t.jsx)(f.Background,{gap:20}),(0,t.jsx)(f.Controls,{showInteractive:!1})]})})]})}function O(e){let t=e.nodes.map(e=>({id:e.id,type:"editable",position:{x:0,y:0},data:{label:e.label,description:e.description??"",editing:!1,onLabelChange:()=>void 0,onDescriptionChange:()=>void 0,onDelete:()=>void 0},sourcePosition:p.Position.Right,targetPosition:p.Position.Left})),r=e.edges.map((e,t)=>({id:`e-${t}-${e.from}-${e.to}`,source:e.from,target:e.to,type:"smoothstep",label:e.label,animated:!1})),n=(0,w.layoutWithDagre)(t,r,{direction:"LR",nodeSize:{width:220,height:70},nodesep:30,ranksep:80});return{nodes:n.nodes,edges:n.edges}}var C=e.i(675112),R=e.i(64970);let M=0;function S(){return M+=1,`msg-${M}`}function L({agentType:e,promptId:n,inlinePromptBody:o,fetchOverride:d}){let[l,u]=(0,r.useState)(""),[c,h]=(0,r.useState)([]),[f,p]=(0,r.useState)(!1),[g,v]=(0,r.useState)(null),m=(0,r.useRef)(null),b=(0,r.useRef)(null);async function x(t){if(!t.trim()||f)return;v(null);let r=[...c,{id:S(),role:"user",content:t},{id:S(),role:"assistant",content:""}];h(r),u(""),p(!0);let i=new AbortController;m.current=i;try{let t=d??fetch,a=await t("/api/agents/playground",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentType:e,promptId:n,...o&&{promptBody:o},messages:r.slice(0,-1).map(e=>({role:e.role,content:e.content}))}),signal:i.signal});if(!a.ok||!a.body){let e=`Playground request failed (${a.status})`;v(e),p(!1);return}let s=a.body.getReader(),l=new TextDecoder,u="";for(;;){let{value:e,done:t}=await s.read();if(t)break;let r=(u+=l.decode(e,{stream:!0})).split("\n\n");for(let e of(u=r.pop()??"",r)){let t=e.trim();if(!t.startsWith("data:"))continue;let r=t.slice(5).trim();if(r)try{let e=JSON.parse(r);"delta"===e.type?h(t=>(function(e,t){if(0===e.length)return e;let r=e[e.length-1];if(r?.role!=="assistant")return e;let n=[...e];return n[n.length-1]={...r,content:r.content+t},n})(t,e.content)):"error"===e.type&&v(e.content)}catch{}}}}catch(e){e?.name!=="AbortError"&&v(e instanceof Error?e.message:String(e))}finally{p(!1),m.current=null}}return(0,r.useEffect)(()=>{b.current?.scrollTo({top:b.current.scrollHeight})},[c]),(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border p-4","data-testid":"agent-playground",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("p",{className:"text-sm font-semibold",children:"Playground"}),(0,t.jsxs)("p",{className:"text-muted-foreground text-xs",children:["Streaming against ",e," · ",n,o?" (inline override)":""]})]}),c.length>0?(0,t.jsx)(i.Button,{type:"button",variant:"ghost",size:"sm",onClick:()=>h([]),disabled:f,children:"Clear"}):null]}),(0,t.jsx)("div",{ref:b,className:"bg-muted/20 flex h-72 flex-col gap-2 overflow-y-auto rounded border p-3","data-testid":"playground-transcript",children:0===c.length?(0,t.jsx)("p",{className:"text-muted-foreground text-xs",children:"Send a message to test this prompt against the configured executor."}):c.map((e,r)=>(0,t.jsx)("div",{className:"user"===e.role?"bg-primary text-primary-foreground max-w-[85%] self-end rounded-lg px-3 py-2 text-sm":"bg-card max-w-[85%] self-start rounded-lg border px-3 py-2 text-sm whitespace-pre-wrap","data-testid":`playground-msg-${r}-${e.role}`,children:e.content||(f&&r===c.length-1?"…":"")},e.id))}),g?(0,t.jsx)(s.Alert,{variant:"destructive","data-testid":"playground-error",children:(0,t.jsx)(s.AlertDescription,{children:g})}):null,(0,t.jsxs)("form",{className:"flex items-end gap-2",onSubmit:e=>{e.preventDefault(),x(l)},children:[(0,t.jsx)(a.Textarea,{value:l,onChange:e=>u(e.target.value),rows:2,placeholder:"Try a prompt…",className:"font-mono text-xs","data-testid":"playground-input",disabled:f,onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),x(l))}}),f?(0,t.jsxs)(i.Button,{type:"button",variant:"secondary",onClick:function(){m.current?.abort(),m.current=null,p(!1)},"data-testid":"playground-stop",children:[(0,t.jsx)(R.Square,{className:"size-3"}),"Stop"]}):(0,t.jsxs)(i.Button,{type:"submit",disabled:!l.trim(),"data-testid":"playground-send",children:[(0,t.jsx)(C.Send,{className:"size-3"}),"Send"]})]})]})}function T({agentType:e,prompts:i,graph:a,bundledGraph:o,hasGraphOverride:s}){let[d,l]=(0,r.useState)(i[0]?.promptId??"evaluator.system"),u=i.find(e=>e.promptId===d);return(0,t.jsxs)(n.Tabs,{defaultValue:"prompts","data-testid":"agent-editor-tabs",children:[(0,t.jsxs)(n.TabsList,{children:[(0,t.jsx)(n.TabsTrigger,{value:"prompts",children:"Prompts"}),(0,t.jsx)(n.TabsTrigger,{value:"graph",children:"Graph"}),(0,t.jsx)(n.TabsTrigger,{value:"playground",children:"Playground"})]}),(0,t.jsx)(n.TabsContent,{value:"prompts",className:"mt-4",children:(0,t.jsx)(c,{entries:i})}),(0,t.jsx)(n.TabsContent,{value:"graph",className:"mt-4",children:(0,t.jsx)(N,{graph:a,bundled:o??null,hasOverride:s??!1})}),(0,t.jsxs)(n.TabsContent,{value:"playground",className:"mt-4 flex flex-col gap-3",children:[i.length>1?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)("label",{htmlFor:"playground-prompt-select",className:"text-muted-foreground",children:"Use prompt:"}),(0,t.jsx)("select",{id:"playground-prompt-select",value:d,onChange:e=>l(e.target.value),className:"border-border bg-background rounded border px-2 py-1 text-xs","data-testid":"playground-prompt-select",children:i.map(e=>(0,t.jsx)("option",{value:e.promptId,children:e.name},e.promptId))})]}):null,(0,t.jsx)(L,{agentType:e,promptId:d,...u?.hasOverride&&{inlinePromptBody:u.effectiveBody}})]})]})}e.s(["AgentEditorTabs",()=>T],643280)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81846,e=>{"use strict";var t=e.i(679606),r=e.i(294237),n=e.i(131777);let i=(0,r.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function a({className:e,variant:r,...a}){return(0,t.jsx)("div",{className:(0,n.cn)(i({variant:r}),e),...a})}e.s(["Badge",()=>a])},787342,e=>{"use strict";var t=e.i(152155),r=e.i(922528),n=e.i(205978),i=e.i(786874),a=e.i(679606);function o(e){let o=e+"CollectionProvider",[s,d]=(0,r.createContextScope)(o),[l,u]=s(o,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:r,children:n}=e,i=t.default.useRef(null),o=t.default.useRef(new Map).current;return(0,a.jsx)(l,{scope:r,itemMap:o,collectionRef:i,children:n})};c.displayName=o;let h=e+"CollectionSlot",f=(0,i.createSlot)(h),p=t.default.forwardRef((e,t)=>{let{scope:r,children:i}=e,o=u(h,r),s=(0,n.useComposedRefs)(t,o.collectionRef);return(0,a.jsx)(f,{ref:s,children:i})});p.displayName=h;let g=e+"CollectionItemSlot",v="data-radix-collection-item",m=(0,i.createSlot)(g),b=t.default.forwardRef((e,r)=>{let{scope:i,children:o,...s}=e,d=t.default.useRef(null),l=(0,n.useComposedRefs)(r,d),c=u(g,i);return t.default.useEffect(()=>(c.itemMap.set(d,{ref:d,...s}),()=>void c.itemMap.delete(d))),(0,a.jsx)(m,{...{[v]:""},ref:l,children:o})});return b.displayName=g,[{Provider:c,Slot:p,ItemSlot:b},function(r){let n=u(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${v}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},d]}var s=new WeakMap;function d(e,t){var r,n;let i,a,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let s=(r=e,n=t,i=r.length,(o=(a=l(n))>=0?a:i+a)<0||o>=i?-1:o);return -1===s?void 0:e[s]}function l(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],s.set(this,!0)}set(e,t){return s.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),a=this.#e.length,o=l(e),s=o>=0?o:a+o,d=s<0||s>=a?-1:s;if(d===this.size||i&&d===this.size-1||-1===d)return this.set(t,r),this;let u=this.size+ +!i;o<0&&s++;let c=[...this.#e],h=!1;for(let e=s;e<u;e++)if(s===e){let a=c[e];c[e]===t&&(a=c[e+1]),i&&this.delete(t),n=this.get(a),this.set(t,r)}else{h||c[e-1]!==t||(h=!0);let r=c[h?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=d(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=d(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return d(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",()=>o])},151080,e=>{"use strict";var t=e.i(152155),r=e.i(291967),n=e.i(787342),i=e.i(205978),a=e.i(922528),o=e.i(713123),s=e.i(287620),d=e.i(929297),l=e.i(936589),u=e.i(566033),c=e.i(679606),h="rovingFocusGroup.onEntryFocus",f={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[g,v,m]=(0,n.createCollection)(p),[b,x]=(0,a.createContextScope)(p,[m]),[y,w]=b(p),E=t.forwardRef((e,t)=>(0,c.jsx)(g.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,c.jsx)(g.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,c.jsx)(k,{...e,ref:t})})}));E.displayName=p;var k=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:a,orientation:o,loop:g=!1,dir:m,currentTabStopId:b,defaultCurrentTabStopId:x,onCurrentTabStopIdChange:w,onEntryFocus:E,preventScrollOnEntryFocus:k=!1,...j}=e,N=t.useRef(null),_=(0,i.useComposedRefs)(n,N),C=(0,u.useDirection)(m),[R,M]=(0,l.useControllableState)({prop:b,defaultProp:x??null,onChange:w,caller:p}),[S,L]=t.useState(!1),T=(0,d.useCallbackRef)(E),D=v(a),$=t.useRef(!1),[A,P]=t.useState(0);return t.useEffect(()=>{let e=N.current;if(e)return e.addEventListener(h,T),()=>e.removeEventListener(h,T)},[T]),(0,c.jsx)(y,{scope:a,orientation:o,dir:C,loop:g,currentTabStopId:R,onItemFocus:t.useCallback(e=>M(e),[M]),onItemShiftTab:t.useCallback(()=>L(!0),[]),onFocusableItemAdd:t.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>P(e=>e-1),[]),children:(0,c.jsx)(s.Primitive.div,{tabIndex:S||0===A?-1:0,"data-orientation":o,...j,ref:_,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{$.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!$.current;if(e.target===e.currentTarget&&t&&!S){let t=new CustomEvent(h,f);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=D().filter(e=>e.focusable);O([e.find(e=>e.active),e.find(e=>e.id===R),...e].filter(Boolean).map(e=>e.ref.current),k)}}$.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>L(!1))})})}),j="RovingFocusGroupItem",N=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:a=!0,active:d=!1,tabStopId:l,children:u,...h}=e,f=(0,o.useId)(),p=l||f,m=w(j,i),b=m.currentTabStopId===p,x=v(i),{onFocusableItemAdd:y,onFocusableItemRemove:E,currentTabStopId:k}=m;return t.useEffect(()=>{if(a)return y(),()=>E()},[a,y,E]),(0,c.jsx)(g.ItemSlot,{scope:i,id:p,focusable:a,active:d,children:(0,c.jsx)(s.Primitive.span,{tabIndex:b?0:-1,"data-orientation":m.orientation,...h,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{a?m.onItemFocus(p):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>m.onItemFocus(p)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void m.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return _[i]}(e,m.orientation,m.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=x().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let a=i.indexOf(e.currentTarget);i=m.loop?(r=i,n=a+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(a+1)}setTimeout(()=>O(i))}}),children:"function"==typeof u?u({isCurrentTabStop:b,hasTabStop:null!=k}):u})})});N.displayName=j;var _={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function O(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>N,"Root",()=>E,"createRovingFocusGroupScope",()=>x])},468304,e=>{"use strict";var t=e.i(679606),r=e.i(152155),n=e.i(291967),i=e.i(922528),a=e.i(151080),o=e.i(685995),s=e.i(287620),d=e.i(566033),l=e.i(936589),u=e.i(713123),c="Tabs",[h,f]=(0,i.createContextScope)(c,[a.createRovingFocusGroupScope]),p=(0,a.createRovingFocusGroupScope)(),[g,v]=h(c),m=r.forwardRef((e,r)=>{let{__scopeTabs:n,value:i,onValueChange:a,defaultValue:o,orientation:h="horizontal",dir:f,activationMode:p="automatic",...v}=e,m=(0,d.useDirection)(f),[b,x]=(0,l.useControllableState)({prop:i,onChange:a,defaultProp:o??"",caller:c});return(0,t.jsx)(g,{scope:n,baseId:(0,u.useId)(),value:b,onValueChange:x,orientation:h,dir:m,activationMode:p,children:(0,t.jsx)(s.Primitive.div,{dir:m,"data-orientation":h,...v,ref:r})})});m.displayName=c;var b="TabsList",x=r.forwardRef((e,r)=>{let{__scopeTabs:n,loop:i=!0,...o}=e,d=v(b,n),l=p(n);return(0,t.jsx)(a.Root,{asChild:!0,...l,orientation:d.orientation,dir:d.dir,loop:i,children:(0,t.jsx)(s.Primitive.div,{role:"tablist","aria-orientation":d.orientation,...o,ref:r})})});x.displayName=b;var y="TabsTrigger",w=r.forwardRef((e,r)=>{let{__scopeTabs:i,value:o,disabled:d=!1,...l}=e,u=v(y,i),c=p(i),h=j(u.baseId,o),f=N(u.baseId,o),g=o===u.value;return(0,t.jsx)(a.Item,{asChild:!0,...c,focusable:!d,active:g,children:(0,t.jsx)(s.Primitive.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":f,"data-state":g?"active":"inactive","data-disabled":d?"":void 0,disabled:d,id:h,...l,ref:r,onMouseDown:(0,n.composeEventHandlers)(e.onMouseDown,e=>{d||0!==e.button||!1!==e.ctrlKey?e.preventDefault():u.onValueChange(o)}),onKeyDown:(0,n.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&u.onValueChange(o)}),onFocus:(0,n.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==u.activationMode;g||d||!e||u.onValueChange(o)})})})});w.displayName=y;var E="TabsContent",k=r.forwardRef((e,n)=>{let{__scopeTabs:i,value:a,forceMount:d,children:l,...u}=e,c=v(E,i),h=j(c.baseId,a),f=N(c.baseId,a),p=a===c.value,g=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(o.Presence,{present:d||p,children:({present:r})=>(0,t.jsx)(s.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":h,hidden:!r,id:f,tabIndex:0,...u,ref:n,style:{...e.style,animationDuration:g.current?"0s":void 0},children:r&&l})})});function j(e,t){return`${e}-trigger-${t}`}function N(e,t){return`${e}-content-${t}`}k.displayName=E,e.s(["Content",()=>k,"List",()=>x,"Root",()=>m,"Tabs",()=>m,"TabsContent",()=>k,"TabsList",()=>x,"TabsTrigger",()=>w,"Trigger",()=>w,"createTabsScope",()=>f],743133);var _=e.i(743133),_=_,O=e.i(131777);let C=_.Root,R=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(_.List,{ref:n,className:(0,O.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...r}));R.displayName=_.List.displayName;let M=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(_.Trigger,{ref:n,className:(0,O.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...r}));M.displayName=_.Trigger.displayName;let S=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(_.Content,{ref:n,className:(0,O.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...r}));S.displayName=_.Content.displayName,e.s(["Tabs",()=>C,"TabsContent",()=>S,"TabsList",()=>R,"TabsTrigger",()=>M],468304)},123620,e=>{"use strict";var t=e.i(679606),r=e.i(152155),n=e.i(294237),i=e.i(131777);let a=(0,n.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg]:absolute [&>svg]:top-4 [&>svg]:start-4 [&>svg]:text-foreground [&>svg+div]:translate-y-[-3px] [&>svg~*]:ps-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),o=r.forwardRef(({className:e,variant:r,...n},o)=>(0,t.jsx)("div",{ref:o,role:"alert",className:(0,i.cn)(a({variant:r}),e),...n}));o.displayName="Alert",r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("h5",{ref:n,className:(0,i.cn)("mb-1 leading-none font-medium tracking-tight",e),...r})).displayName="AlertTitle";let s=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,className:(0,i.cn)("text-sm [&_p]:leading-relaxed",e),...r}));s.displayName="AlertDescription",e.s(["Alert",()=>o,"AlertDescription",()=>s])},998798,e=>{"use strict";let t=(0,e.i(903645).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",()=>t],998798)},48306,e=>{"use strict";var t=e.i(679606),r=e.i(131777);function n({className:e,...n}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}e.s(["Textarea",()=>n])},267669,e=>{"use strict";let t=(0,e.i(903645).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],267669)},438227,e=>{"use strict";let t=(0,e.i(903645).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>t],438227)},220206,(e,t,r)=>{"use strict";var n=e.r(152155),i=e.r(56032),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=i.useSyncExternalStore,s=n.useRef,d=n.useEffect,l=n.useMemo,u=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var c=s(null);if(null===c.current){var h={hasValue:!1,value:null};c.current=h}else h=c.current;var f=o(e,(c=l(function(){function e(e){if(!d){if(d=!0,o=e,e=n(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return s=t}return s=e}if(t=s,a(o,e))return t;var r=n(e);return void 0!==i&&i(t,r)?(o=e,t):(o=e,s=r)}var o,s,d=!1,l=void 0===r?null:r;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,r,n,i]))[0],c[1]);return d(function(){h.hasValue=!0,h.value=f},[f]),u(f),f}},596482,(e,t,r)=>{"use strict";t.exports=e.r(220206)},842541,e=>{"use strict";e.s(["default",0,function(e,t){return e*=1,t*=1,function(r){return e*(1-r)+t*r}}])},161610,321137,e=>{"use strict";function t(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function r(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function n(){}var i="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3,8})$/,d=RegExp(`^rgb\\(${i},${i},${i}\\)$`),l=RegExp(`^rgb\\(${o},${o},${o}\\)$`),u=RegExp(`^rgba\\(${i},${i},${i},${a}\\)$`),c=RegExp(`^rgba\\(${o},${o},${o},${a}\\)$`),h=RegExp(`^hsl\\(${a},${o},${o}\\)$`),f=RegExp(`^hsla\\(${a},${o},${o},${a}\\)$`),p={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function g(){return this.rgb().formatHex()}function v(){return this.rgb().formatRgb()}function m(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=s.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?b(t):3===r?new w(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?x(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?x(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=d.exec(e))?new w(t[1],t[2],t[3],1):(t=l.exec(e))?new w(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=u.exec(e))?x(t[1],t[2],t[3],t[4]):(t=c.exec(e))?x(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=h.exec(e))?O(t[1],t[2]/100,t[3]/100,1):(t=f.exec(e))?O(t[1],t[2]/100,t[3]/100,t[4]):p.hasOwnProperty(e)?b(p[e]):"transparent"===e?new w(NaN,NaN,NaN,0):null}function b(e){return new w(e>>16&255,e>>8&255,255&e,1)}function x(e,t,r,n){return n<=0&&(e=t=r=NaN),new w(e,t,r,n)}function y(e,t,r,i){var a;return 1==arguments.length?((a=e)instanceof n||(a=m(a)),a)?new w((a=a.rgb()).r,a.g,a.b,a.opacity):new w:new w(e,t,r,null==i?1:i)}function w(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function E(){return`#${_(this.r)}${_(this.g)}${_(this.b)}`}function k(){let e=j(this.opacity);return`${1===e?"rgb(":"rgba("}${N(this.r)}, ${N(this.g)}, ${N(this.b)}${1===e?")":`, ${e})`}`}function j(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function N(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _(e){return((e=N(e))<16?"0":"")+e.toString(16)}function O(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new R(e,t,r,n)}function C(e){if(e instanceof R)return new R(e.h,e.s,e.l,e.opacity);if(e instanceof n||(e=m(e)),!e)return new R;if(e instanceof R)return e;var t=(e=e.rgb()).r/255,r=e.g/255,i=e.b/255,a=Math.min(t,r,i),o=Math.max(t,r,i),s=NaN,d=o-a,l=(o+a)/2;return d?(s=t===o?(r-i)/d+(r<i)*6:r===o?(i-t)/d+2:(t-r)/d+4,d/=l<.5?o+a:2-o-a,s*=60):d=l>0&&l<1?0:s,new R(s,d,l,e.opacity)}function R(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function M(e){return(e=(e||0)%360)<0?e+360:e}function S(e){return Math.max(0,Math.min(1,e||0))}function L(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}t(n,m,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:g,formatHex:g,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return C(this).formatHsl()},formatRgb:v,toString:v}),t(w,y,r(n,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new w(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new w(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new w(N(this.r),N(this.g),N(this.b),j(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:E,formatHex:E,formatHex8:function(){return`#${_(this.r)}${_(this.g)}${_(this.b)}${_((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:k,toString:k})),t(R,function(e,t,r,n){return 1==arguments.length?C(e):new R(e,t,r,null==n?1:n)},r(n,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new R(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new R(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new w(L(e>=240?e-240:e+120,i,n),L(e,i,n),L(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new R(M(this.h),S(this.s),S(this.l),j(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=j(this.opacity);return`${1===e?"hsl(":"hsla("}${M(this.h)}, ${100*S(this.s)}%, ${100*S(this.l)}%${1===e?")":`, ${e})`}`}})),e.s(["default",()=>m,"rgb",()=>y],321137),e.s(["color",()=>m],161610)},77075,e=>{"use strict";var t=e.i(842541);e.s(["interpolateNumber",()=>t.default])},145665,181503,e=>{"use strict";var t=e.i(321137);function r(e,t,r,n,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*n+o*i)/6}let n=e=>()=>e;function i(e,t){var r=t-e;return r?function(t){return e+t*r}:n(isNaN(e)?t:e)}e.s(["default",0,n],181503);let a=function e(r){var a,o=1==(a=+r)?i:function(e,t){var r,i,o;return t-e?(r=e,i=t,r=Math.pow(r,o=a),i=Math.pow(i,o)-r,o=1/o,function(e){return Math.pow(r+e*i,o)}):n(isNaN(e)?t:e)};function s(e,r){var n=o((e=(0,t.rgb)(e)).r,(r=(0,t.rgb)(r)).r),a=o(e.g,r.g),s=o(e.b,r.b),d=i(e.opacity,r.opacity);return function(t){return e.r=n(t),e.g=a(t),e.b=s(t),e.opacity=d(t),e+""}}return s.gamma=e,s}(1);function o(e){return function(r){var n,i,a=r.length,o=Array(a),s=Array(a),d=Array(a);for(n=0;n<a;++n)i=(0,t.rgb)(r[n]),o[n]=i.r||0,s[n]=i.g||0,d[n]=i.b||0;return o=e(o),s=e(s),d=e(d),i.opacity=1,function(e){return i.r=o(e),i.g=s(e),i.b=d(e),i+""}}}o(function(e){var t=e.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),a=e[i],o=e[i+1],s=i>0?e[i-1]:2*a-o,d=i<t-1?e[i+2]:2*o-a;return r((n-i/t)*t,s,a,o,d)}}),o(function(e){var t=e.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*t),a=e[(i+t-1)%t],o=e[i%t],s=e[(i+1)%t],d=e[(i+2)%t];return r((n-i/t)*t,a,o,s,d)}}),e.s(["default",0,a],145665)},647483,e=>{"use strict";var t=e.i(842541),r=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,n=RegExp(r.source,"g");e.s(["default",0,function(e,i){var a,o,s,d,l,u=r.lastIndex=n.lastIndex=0,c=-1,h=[],f=[];for(e+="",i+="";(s=r.exec(e))&&(d=n.exec(i));)(l=d.index)>u&&(l=i.slice(u,l),h[c]?h[c]+=l:h[++c]=l),(s=s[0])===(d=d[0])?h[c]?h[c]+=d:h[++c]=d:(h[++c]=null,f.push({i:c,x:(0,t.default)(s,d)})),u=n.lastIndex;return u<i.length&&(l=i.slice(u),h[c]?h[c]+=l:h[++c]=l),h.length<2?f[0]?(a=f[0].x,function(e){return a(e)+""}):(o=i,function(){return o}):(i=f.length,function(e){for(var t,r=0;r<i;++r)h[(t=f[r]).i]=t.x(e);return h.join("")})}])},819505,238816,97376,e=>{"use strict";e.s(["genericArray",()=>n],819505);var t=e.i(213570);function r(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function n(e,r){var n,i=r?r.length:0,a=e?Math.min(i,e.length):0,o=Array(a),s=Array(i);for(n=0;n<a;++n)o[n]=(0,t.default)(e[n],r[n]);for(;n<i;++n)s[n]=r[n];return function(e){for(n=0;n<a;++n)s[n]=o[n](e);return s}}e.s(["default",0,function(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(r=0;r<n;++r)i[r]=e[r]*(1-a)+t[r]*a;return i}},"isNumberArray",()=>r],238816),e.s(["default",0,function(e,t){var r=new Date;return e*=1,t*=1,function(n){return r.setTime(e*(1-n)+t*n),r}}],97376)},905660,e=>{"use strict";e.s(["default",()=>r]);var t=e.i(213570);function r(e,r){var n,i={},a={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===r||"object"!=typeof r)&&(r={}),r)n in e?i[n]=(0,t.default)(e[n],r[n]):a[n]=r[n];return function(e){for(n in i)a[n]=i[n](e);return a}}},678152,213570,e=>{"use strict";e.s(["default",()=>u],213570);var t=e.i(161610),r=e.i(145665),n=e.i(819505),i=e.i(97376),a=e.i(842541),o=e.i(905660),s=e.i(647483),d=e.i(181503),l=e.i(238816);function u(e,u){var c,h=typeof u;return null==u||"boolean"===h?(0,d.default)(u):("number"===h?a.default:"string"===h?(c=(0,t.color)(u))?(u=c,r.default):s.default:u instanceof t.color?r.default:u instanceof Date?i.default:(0,l.isNumberArray)(u)?l.default:Array.isArray(u)?n.genericArray:"function"!=typeof u.valueOf&&"function"!=typeof u.toString||isNaN(u)?o.default:a.default)(e,u)}e.s(["interpolate",0,u],678152)},675112,e=>{"use strict";let t=(0,e.i(903645).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);e.s(["Send",()=>t],675112)},698071,e=>{"use strict";let t=(0,e.i(903645).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",()=>t],698071)},939835,e=>{"use strict";var t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),r=t((e,t)=>{var r=Object.defineProperty,n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),i=(e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?r(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n},a=n((e,t)=>{function r(e,t){e[t]?e[t]++:e[t]=1}function n(e,t){--e[t]||delete e[t]}function a(e,t,r,n){var i=""+t,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}return i+"\x01"+a+"\x01"+(void 0===n?"\0":n)}function o(e,t){return a(e,t.v,t.w,t.name)}t.exports=class{constructor(e){i(this,"_isDirected",!0),i(this,"_isMultigraph",!1),i(this,"_isCompound",!1),i(this,"_label"),i(this,"_defaultNodeLabelFn",()=>{}),i(this,"_defaultEdgeLabelFn",()=>{}),i(this,"_nodes",{}),i(this,"_in",{}),i(this,"_preds",{}),i(this,"_out",{}),i(this,"_sucs",{}),i(this,"_edgeObjs",{}),i(this,"_edgeLabels",{}),i(this,"_nodeCount",0),i(this,"_edgeCount",0),i(this,"_parent"),i(this,"_children"),e&&(this._isDirected=!Object.hasOwn(e,"directed")||e.directed,this._isMultigraph=!!Object.hasOwn(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.hasOwn(e,"compound")&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!=typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._in[t]).length)}sinks(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._out[t]).length)}setNodes(e,t){var r=arguments,n=this;return e.forEach(function(e){r.length>1?n.setNode(e,t):n.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?arguments.length>1&&(this._nodes[e]=t):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var r=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(r),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(void 0===t)t="\0";else{t+="";for(var r=t;void 0!==r;r=this.parent(r))if(r===e)throw Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}}children(e="\0"){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else{if("\0"===e)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let n=new Set(t);for(var r of this.successors(e))n.add(r);return Array.from(n.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([r,n]){e(r)&&t.setNode(r,n)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))});var n={};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,function e(i){var a=r.parent(i);return void 0===a||t.hasNode(a)?(n[i]=a,a):a in n?n[a]:e(a)}(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!=typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var r=this,n=arguments;return e.reduce(function(e,i){return n.length>1?r.setEdge(e,i,t):r.setEdge(e,i),i}),this}setEdge(){var e,t,n,i,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2==arguments.length&&(i=arguments[1],o=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),e=""+e,t=""+t,void 0!==n&&(n=""+n);var d=a(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,d))return o&&(this._edgeLabels[d]=i),this;if(void 0!==n&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[d]=o?i:this._defaultEdgeLabelFn(e,t,n);var l=function(e,t,r,n){var i=""+t,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return n&&(s.name=n),s}(this._isDirected,e,t,n);return e=l.v,t=l.w,Object.freeze(l),this._edgeObjs[d]=l,r(this._preds[t],e),r(this._sucs[e],t),this._in[t][d]=l,this._out[e][d]=l,this._edgeCount++,this}edge(e,t,r){var n=1==arguments.length?o(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return this._edgeLabels[n]}edgeAsObj(){let e=this.edge(...arguments);return"object"!=typeof e?{label:e}:e}hasEdge(e,t,r){var n=1==arguments.length?o(this._isDirected,arguments[0]):a(this._isDirected,e,t,r);return Object.hasOwn(this._edgeLabels,n)}removeEdge(e,t,r){var i=1==arguments.length?o(this._isDirected,arguments[0]):a(this._isDirected,e,t,r),s=this._edgeObjs[i];return s&&(e=s.v,t=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],n(this._preds[t],e),n(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}filterEdges(e,t,r){if(e){var n=Object.values(e);return r?n.filter(function(e){return e.v===t&&e.w===r||e.v===r&&e.w===t}):n}}}}),o=n((e,t)=>{t.exports="3.0.2"}),s=n((e,t)=>{t.exports={Graph:a(),version:o()}}),d=n((e,t)=>{var r=a();t.exports={write:function(e){var t,r,n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(t=e).nodes().map(function(e){var r=t.node(e),n=t.parent(e),i={v:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.parent=n),i}),edges:(r=e).edges().map(function(e){var t=r.edge(e),n={v:e.v,w:e.w};return void 0!==e.name&&(n.name=e.name),void 0!==t&&(n.value=t),n})};return void 0!==e.graph()&&(n.value=structuredClone(e.graph())),n},read:function(e){var t=new r(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}}),l=n((e,t)=>{t.exports=function(e,t,n,i){return function(e,t,r,n){var i={},a=!0,o=0,s=e.nodes(),d=function(e){var t=r(e);i[e.v].distance+t<i[e.w].distance&&(i[e.w]={distance:i[e.v].distance+t,predecessor:e.v},a=!0)},l=function(){s.forEach(function(e){n(e).forEach(function(t){var r=t.v===e?t.v:t.w,n=r===t.v?t.w:t.v;d({v:r,w:n})})})};s.forEach(function(e){i[e]={distance:e===t?0:1/0}});for(var u=s.length,c=1;c<u&&(a=!1,o++,l(),a);c++);if(o===u-1&&(a=!1,l(),a))throw Error("The graph contains a negative weight cycle");return i}(e,String(t),n||r,i||function(t){return e.outEdges(t)})};var r=()=>1}),u=n((e,t)=>{t.exports=function(e){var t,r={},n=[];return e.nodes().forEach(function(i){t=[],function n(i){Object.hasOwn(r,i)||(r[i]=!0,t.push(i),e.successors(i).forEach(n),e.predecessors(i).forEach(n))}(i),t.length&&n.push(t)}),n}}),c=n((e,t)=>{t.exports=class{constructor(){i(this,"_arr",[]),i(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key}add(e,t){var r=this._keyIndices;if(!Object.hasOwn(r,e=String(e))){var n=this._arr,i=n.length;return r[e]=i,n.push({key:e,priority:t}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)}_heapify(e){var t=this._arr,r=2*e,n=r+1,i=e;r<t.length&&(i=t[r].priority<t[i].priority?r:i,n<t.length&&(i=t[n].priority<t[i].priority?n:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t}_swap(e,t){var r=this._arr,n=this._keyIndices,i=r[e],a=r[t];r[e]=a,r[t]=i,n[a.key]=e,n[i.key]=t}}}),h=n((e,t)=>{var r=c();t.exports=function(e,t,i,a){return function(e,t,n,i){var a,o,s={},d=new r,l=function(e){var t=e.v!==a?e.v:e.w,r=s[t],i=n(e),l=o.distance+i;if(i<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+i);l<r.distance&&(r.distance=l,r.predecessor=a,d.decrease(t,l))};for(e.nodes().forEach(function(e){var r=e===t?0:1/0;s[e]={distance:r},d.add(e,r)});d.size()>0&&(o=s[a=d.removeMin()]).distance!==1/0;)i(a).forEach(l);return s}(e,String(t),i||n,a||function(t){return e.outEdges(t)})};var n=()=>1}),f=n((e,t)=>{var r=h();t.exports=function(e,t,n){return e.nodes().reduce(function(i,a){return i[a]=r(e,a,t,n),i},{})}}),p=n((e,t)=>{t.exports=function(e,t,r){if(void 0!==e[t].predecessor)throw Error("Invalid source vertex");if(void 0===e[r].predecessor&&r!==t)throw Error("Invalid destination vertex");return{weight:e[r].distance,path:function(e,t,r){for(var n=[],i=r;i!==t;)n.push(i),i=e[i].predecessor;return n.push(t),n.reverse()}(e,t,r)}}}),g=n((e,t)=>{t.exports=function(e){var t=0,r=[],n={},i=[];return e.nodes().forEach(function(a){Object.hasOwn(n,a)||function a(o){var s=n[o]={onStack:!0,lowlink:t,index:t++};if(r.push(o),e.successors(o).forEach(function(e){Object.hasOwn(n,e)?n[e].onStack&&(s.lowlink=Math.min(s.lowlink,n[e].index)):(a(e),s.lowlink=Math.min(s.lowlink,n[e].lowlink))}),s.lowlink===s.index){var d,l=[];do n[d=r.pop()].onStack=!1,l.push(d);while(o!==d)i.push(l)}}(a)}),i}}),v=n((e,t)=>{var r=g();t.exports=function(e){return r(e).filter(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}}),m=n((e,t)=>{t.exports=function(e,t,n){var i,a,o,s,d;return i=e,a=t||r,o=n||function(t){return e.outEdges(t)},s={},(d=i.nodes()).forEach(function(e){s[e]={},s[e][e]={distance:0},d.forEach(function(t){e!==t&&(s[e][t]={distance:1/0})}),o(e).forEach(function(t){var r=t.v===e?t.w:t.v,n=a(t);s[e][r]={distance:n,predecessor:e}})}),d.forEach(function(e){var t=s[e];d.forEach(function(r){var n=s[r];d.forEach(function(r){var i=n[e],a=t[r],o=n[r],s=i.distance+a.distance;s<o.distance&&(o.distance=s,o.predecessor=a.predecessor)})})}),s};var r=()=>1}),b=n((e,t)=>{function r(e){var t={},r={},i=[];if(e.sinks().forEach(function a(o){if(Object.hasOwn(r,o))throw new n;Object.hasOwn(t,o)||(r[o]=!0,t[o]=!0,e.predecessors(o).forEach(a),delete r[o],i.push(o))}),Object.keys(t).length!==e.nodeCount())throw new n;return i}var n=class extends Error{constructor(){super(...arguments)}};t.exports=r,r.CycleException=n}),x=n((e,t)=>{var r=b();t.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}}),y=n((e,t)=>{t.exports=function(e,t,r,n,i){Array.isArray(t)||(t=[t]);var a=(e.isDirected()?e.successors:e.neighbors).bind(e),o={};return t.forEach(function(t){if(!e.hasNode(t))throw Error("Graph does not have node: "+t);i=function e(t,r,n,i,a,o,s){return Object.hasOwn(i,r)||(i[r]=!0,n||(s=o(s,r)),a(r).forEach(function(r){s=e(t,r,n,i,a,o,s)}),n&&(s=o(s,r))),s}(e,t,"post"===r,o,a,n,i)}),i}}),w=n((e,t)=>{var r=y();t.exports=function(e,t,n){return r(e,t,n,function(e,t){return e.push(t),e},[])}}),E=n((e,t)=>{var r=w();t.exports=function(e,t){return r(e,t,"post")}}),k=n((e,t)=>{var r=w();t.exports=function(e,t){return r(e,t,"pre")}}),j=n((e,t)=>{var r=a(),n=c();t.exports=function(e,t){var i,a=new r,o={},s=new n;function d(e){var r=e.v===i?e.w:e.v,n=s.priority(r);if(void 0!==n){var a=t(e);a<n&&(o[r]=i,s.decrease(r,a))}}if(0===e.nodeCount())return a;e.nodes().forEach(function(e){s.add(e,1/0),a.setNode(e)}),s.decrease(e.nodes()[0],0);for(var l=!1;s.size()>0;){if(Object.hasOwn(o,i=s.removeMin()))a.setEdge(i,o[i]);else{if(l)throw Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(i).forEach(d)}return a}}),N=n((e,t)=>{var r=h(),n=l();t.exports=function(e,t,i,a){return function(e,t,i,a){if(void 0===i)return r(e,t,i,a);for(var o=!1,s=e.nodes(),d=0;d<s.length;d++){for(var l=a(s[d]),u=0;u<l.length;u++){var c=l[u],h=c.v===s[d]?c.v:c.w,f=h===c.v?c.w:c.v;0>i({v:h,w:f})&&(o=!0)}if(o)return n(e,t,i,a)}return r(e,t,i,a)}(e,t,i,a||function(t){return e.outEdges(t)})}}),_=n((e,t)=>{t.exports={bellmanFord:l(),components:u(),dijkstra:h(),dijkstraAll:f(),extractPath:p(),findCycles:v(),floydWarshall:m(),isAcyclic:x(),postorder:E(),preorder:k(),prim:j(),shortestPaths:N(),reduce:y(),tarjan:g(),topsort:b()}}),O=s();t.exports={Graph:O.Graph,json:d(),alg:_(),version:O.version}}),n=t((e,t)=>{function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function n(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,r=t._prev;for(;r!==t;)e.push(JSON.stringify(r,n)),r=r._prev;return"["+e.join(", ")+"]"}}}),i=t((e,t)=>{var i=r().Graph,a=n();t.exports=function(e,t){var r,n;let l,u,c,h,f;if(1>=e.nodeCount())return[];let p=(r=e,n=t||o,l=new i,u=0,c=0,r.nodes().forEach(e=>{l.setNode(e,{v:e,in:0,out:0})}),r.edges().forEach(e=>{let t=l.edge(e.v,e.w)||0,r=n(e);l.setEdge(e.v,e.w,t+r),c=Math.max(c,l.node(e.v).out+=r),u=Math.max(u,l.node(e.w).in+=r)}),h=(function(e){let t=[];for(let r=0;r<e;r++)t.push(r);return t})(c+u+3).map(()=>new a),f=u+1,l.nodes().forEach(e=>{d(h,f,l.node(e))}),{graph:l,buckets:h,zeroIdx:f});return(function(e,t,r){let n=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)s(e,t,r,o);for(;o=i.dequeue();)s(e,t,r,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i].dequeue()){n=n.concat(s(e,t,r,o,!0));break}}}return n})(p.graph,p.buckets,p.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))};var o=()=>1;function s(e,t,r,n,i){let a=i?[]:void 0;return e.inEdges(n.v).forEach(n=>{let o=e.edge(n),s=e.node(n.v);i&&a.push({v:n.v,w:n.w}),s.out-=o,d(t,r,s)}),e.outEdges(n.v).forEach(n=>{let i=e.edge(n),a=n.w,o=e.node(a);o.in-=i,d(t,r,o)}),e.removeNode(n.v),a}function d(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}}),a=t((e,t)=>{var n=r().Graph;function i(e,t,r,n){for(var i=n;e.hasNode(i);)i=d(n);return r.dummy=t,e.setNode(i,r),i}t.exports={addBorderNode:function(e,t,r,n){let a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=n),i(e,"border",a,t)},addDummyNode:i,applyWithChunking:a,asNonCompoundGraph:function(e){let t=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r))}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r))}),t},buildLayerMatrix:function(e){let t=l(o(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),i=n.rank;void 0!==i&&(t[i][n.order]=r)}),t},intersectRect:function(e,t){let r,n,i=e.x,a=e.y,o=t.x-i,s=t.y-a,d=e.width/2,l=e.height/2;if(!o&&!s)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*d>Math.abs(o)*l?(s<0&&(l=-l),r=l*o/s,n=l):(o<0&&(d=-d),r=d,n=d*s/o),{x:i+r,y:a+n}},mapValues:function(e,t){let r=t;return"string"==typeof t&&(r=e=>e[t]),Object.entries(e).reduce((e,[t,n])=>(e[t]=r(n,t),e),{})},maxRank:o,normalizeRanks:function(e){let t=a(Math.min,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?Number.MAX_VALUE:r}));e.nodes().forEach(r=>{let n=e.node(r);Object.hasOwn(n,"rank")&&(n.rank-=t)})},notime:function(e,t){return t()},partition:function(e,t){let r={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?r.lhs.push(e):r.rhs.push(e)}),r},pick:function(e,t){let r={};for(let n of t)void 0!==e[n]&&(r[n]=e[n]);return r},predecessorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.inEdges(t).forEach(t=>{r[t.v]=(r[t.v]||0)+e.edge(t).weight}),r});return u(e.nodes(),t)},range:l,removeEmptyRanks:function(e){let t=a(Math.min,e.nodes().map(t=>e.node(t).rank).filter(e=>void 0!==e)),r=[];e.nodes().forEach(n=>{let i=e.node(n).rank-t;r[i]||(r[i]=[]),r[i].push(n)});let n=0,i=e.graph().nodeRankFactor;Array.from(r).forEach((t,r)=>{void 0===t&&r%i!=0?--n:void 0!==t&&n&&t.forEach(t=>e.node(t).rank+=n)})},simplify:function(e){let t=new n().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t},successorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.outEdges(t).forEach(t=>{r[t.w]=(r[t.w]||0)+e.edge(t).weight}),r});return u(e.nodes(),t)},time:function(e,t){let r=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-r)+"ms")}},uniqueId:d,zipObject:u};function a(e,t){if(!(t.length>65535))return e.apply(null,t);{let r=function(e,t=65535){let r=[];for(let n=0;n<e.length;n+=t){let i=e.slice(n,n+t);r.push(i)}return r}(t);return e.apply(null,r.map(t=>e.apply(null,t)))}}function o(e){return a(Math.max,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?5e-324:r}))}var s=0;function d(e){return e+""+ ++s}function l(e,t,r=1){null==t&&(t=e,e=0);let n=e=>e<t;r<0&&(n=e=>t<e);let i=[];for(let t=e;n(t);t+=r)i.push(t);return i}function u(e,t){return e.reduce((e,r,n)=>(e[r]=t[n],e),{})}}),o=t((e,t)=>{var r=i(),n=a().uniqueId;t.exports={run:function(e){var t,i;let a,o,s;("greedy"===e.graph().acyclicer?r(e,(t=e,e=>t.edge(e).weight)):(a=[],o={},s={},(i=e).nodes().forEach(function e(t){Object.hasOwn(s,t)||(s[t]=!0,o[t]=!0,i.outEdges(t).forEach(t=>{Object.hasOwn(o,t.w)?a.push(t):e(t.w)}),delete o[t])}),a)).forEach(t=>{let r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,n("rev"))})},undo:function(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}}}),s=t((e,t)=>{var r=a();t.exports={run:function(e){e.graph().dummyChains=[],e.edges().forEach(t=>(function(e,t){let n,i,a,o=t.v,s=e.node(o).rank,d=t.w,l=e.node(d).rank,u=t.name,c=e.edge(t),h=c.labelRank;if(l!==s+1){for(e.removeEdge(t),a=0,++s;s<l;++a,++s)c.points=[],i={width:0,height:0,edgeLabel:c,edgeObj:t,rank:s},n=r.addDummyNode(e,"edge",i,"_d"),s===h&&(i.width=c.width,i.height=c.height,i.dummy="edge-label",i.labelpos=c.labelpos),e.setEdge(o,n,{weight:c.weight},u),0===a&&e.graph().dummyChains.push(n),o=n;e.setEdge(o,d,{weight:c.weight},u)}})(e,t))},undo:function(e){e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeLabel,i;for(e.setEdge(r.edgeObj,n);r.dummy;)i=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=i,r=e.node(t)})}}}),d=t((e,t)=>{var{applyWithChunking:r}=a();t.exports={longestPath:function(e){var t={};e.sources().forEach(function n(i){var a=e.node(i);if(Object.hasOwn(t,i))return a.rank;t[i]=!0;var o=r(Math.min,e.outEdges(i).map(t=>null==t?1/0:n(t.w)-e.edge(t).minlen));return o===1/0&&(o=0),a.rank=o})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}}),l=t((e,t)=>{var n=r().Graph,i=d().slack;t.exports=function(e){var t,r,a,o,s=new n({directed:!1}),d=e.nodes()[0],l=e.nodeCount();for(s.setNode(d,{});t=s,r=e,t.nodes().forEach(function e(n){r.nodeEdges(n).forEach(a=>{var o=a.v,s=n===o?a.w:o;t.hasNode(s)||i(r,a)||(t.setNode(s,{}),t.setEdge(n,s,{}),e(s))})}),t.nodeCount()<l;)a=function(e,t){return t.edges().reduce((r,n)=>{let a=1/0;return e.hasNode(n.v)!==e.hasNode(n.w)&&(a=i(t,n)),a<r[0]?[a,n]:r},[1/0,null])[1]}(s,e),o=s.hasNode(a.v)?i(e,a):-i(e,a),function(e,t,r){e.nodes().forEach(e=>t.node(e).rank+=r)}(s,e,o);return s}}),u=t((e,t)=>{var n=l(),i=d().slack,o=d().longestPath,s=r().alg.preorder,u=r().alg.postorder,c=a().simplify;function h(e){o(e=c(e));var t,r,i=n(e);for(g(i),f(i,e);t=v(i);)r=m(i,e,t),b(i,e,t,r)}function f(e,t){var r=u(e,e.nodes());(r=r.slice(0,r.length-1)).forEach(r=>{var n,i,a,o;return n=e,i=t,a=r,o=n.node(a).parent,void(n.edge(a,o).cutvalue=p(n,i,a))})}function p(e,t,r){var n=e.node(r).parent,i=!0,a=t.edge(r,n),o=0;return a||(i=!1,a=t.edge(n,r)),o=a.weight,t.nodeEdges(r).forEach(a=>{var s=a.v===r,d=s?a.w:a.v;if(d!==n){var l,u,c,h=s===i,f=t.edge(a).weight;if(o+=h?f:-f,l=e,u=r,c=d,l.hasEdge(u,c)){var p=e.edge(r,d).cutvalue;o+=h?-p:p}}}),o}function g(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,r,n,i,a){var o=n,s=t.node(i);return r[i]=!0,t.neighbors(i).forEach(a=>{Object.hasOwn(r,a)||(n=e(t,r,n,a,i))}),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}(e,{},1,t)}function v(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function m(e,t,r){var n=r.v,a=r.w;t.hasEdge(n,a)||(n=r.w,a=r.v);var o=e.node(n),s=e.node(a),d=o,l=!1;return o.lim>s.lim&&(d=s,l=!0),t.edges().filter(t=>l===x(e,e.node(t.v),d)&&l!==x(e,e.node(t.w),d)).reduce((e,r)=>i(t,r)<i(t,e)?r:e)}function b(e,t,r,n){var i,a,o,d,l=r.v,u=r.w;e.removeEdge(l,u),e.setEdge(n.v,n.w,{}),g(e),f(e,t),i=e,a=t,o=i.nodes().find(e=>!a.node(e).parent),(d=(d=s(i,o)).slice(1)).forEach(e=>{var t=i.node(e).parent,r=a.edge(e,t),n=!1;r||(r=a.edge(t,e),n=!0),a.node(e).rank=a.node(t).rank+(n?r.minlen:-r.minlen)})}function x(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}t.exports=h,h.initLowLimValues=g,h.initCutValues=f,h.calcCutValue=p,h.leaveEdge=v,h.enterEdge=m,h.exchangeEdges=b}),c=t((e,t)=>{var r=d().longestPath,n=l(),i=u();t.exports=function(e){var t,o=e.graph().ranker;if(o instanceof Function)return o(e);switch(e.graph().ranker){case"network-simplex":default:i(e);break;case"tight-tree":r(t=e),n(t);break;case"longest-path":a(e);case"none":}};var a=r}),h=t((e,t)=>{t.exports=function(e){var t;let r,n,i=(r={},n=0,(t=e).children().forEach(function e(i){let a=n;t.children(i).forEach(e),r[i]={low:a,lim:n++}}),r);e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeObj,a=function(e,t,r,n){let i=[],a=[],o=Math.min(t[r].low,t[n].low),s=Math.max(t[r].lim,t[n].lim),d,l;d=r;do i.push(d=e.parent(d));while(d&&(t[d].low>o||s>t[d].lim))for(l=d,d=n;(d=e.parent(d))!==l;)a.push(d);return{path:i.concat(a.reverse()),lca:l}}(e,i,n.v,n.w),o=a.path,s=a.lca,d=0,l=o[0],u=!0;for(;t!==n.w;){if(r=e.node(t),u){for(;(l=o[d])!==s&&e.node(l).maxRank<r.rank;)d++;l===s&&(u=!1)}if(!u){for(;d<o.length-1&&e.node(l=o[d+1]).minRank<=r.rank;)d++;l=o[d]}e.setParent(t,l),t=e.successors(t)[0]}})}}),f=t((e,t)=>{var r=a();t.exports={run:function(e){var t,n,i;let a=r.addDummyNode(e,"root",{},"_root"),o=(n={},(t=e).children().forEach(e=>(function e(r,i){var a=t.children(r);a&&a.length&&a.forEach(t=>e(t,i+1)),n[r]=i})(e,1)),n),s=Object.values(o),d=r.applyWithChunking(Math.max,s)-1,l=2*d+1;e.graph().nestingRoot=a,e.edges().forEach(t=>e.edge(t).minlen*=l);let u=(i=e).edges().reduce((e,t)=>e+i.edge(t).weight,0)+1;e.children().forEach(t=>(function e(t,n,i,a,o,s,d){let l=t.children(d);if(!l.length){d!==n&&t.setEdge(n,d,{weight:0,minlen:i});return}let u=r.addBorderNode(t,"_bt"),c=r.addBorderNode(t,"_bb"),h=t.node(d);t.setParent(u,d),h.borderTop=u,t.setParent(c,d),h.borderBottom=c,l.forEach(r=>{e(t,n,i,a,o,s,r);let l=t.node(r),h=l.borderTop?l.borderTop:r,f=l.borderBottom?l.borderBottom:r,p=l.borderTop?a:2*a,g=h!==f?1:o-s[d]+1;t.setEdge(u,h,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(f,c,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(d)||t.setEdge(n,u,{weight:0,minlen:o+s[d]})})(e,a,l,u,d,o,t)),e.graph().nodeRankFactor=l},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}}}),p=t((e,t)=>{var r=a();function n(e,t,n,i,a,o){let s=a[t][o-1],d=r.addDummyNode(e,"border",{width:0,height:0,rank:o,borderType:t},n);a[t][o]=d,e.setParent(d,i),s&&e.setEdge(s,d,{weight:1})}t.exports=function(e){e.children().forEach(function t(r){let i=e.children(r),a=e.node(r);if(i.length&&i.forEach(t),Object.hasOwn(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,i=a.maxRank+1;t<i;++t)n(e,"borderLeft","_bl",r,a,t),n(e,"borderRight","_br",r,a,t)}})}}),g=t((e,t)=>{function r(e){e.nodes().forEach(t=>n(e.node(t))),e.edges().forEach(t=>n(e.edge(t)))}function n(e){let t=e.width;e.width=e.height,e.height=t}function i(e){e.y=-e.y}function a(e){let t=e.x;e.x=e.y,e.y=t}t.exports={adjust:function(e){let t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&r(e)},undo:function(e){var t,n;let o=e.graph().rankdir.toLowerCase();("bt"===o||"rl"===o)&&((t=e).nodes().forEach(e=>i(t.node(e))),t.edges().forEach(e=>{let r=t.edge(e);r.points.forEach(i),Object.hasOwn(r,"y")&&i(r)})),("lr"===o||"rl"===o)&&((n=e).nodes().forEach(e=>a(n.node(e))),n.edges().forEach(e=>{let t=n.edge(e);t.points.forEach(a),Object.hasOwn(t,"x")&&a(t)}),r(e))}}}),v=t((e,t)=>{var r=a();t.exports=function(e){let t={},n=e.nodes().filter(t=>!e.children(t).length),i=n.map(t=>e.node(t).rank),a=r.applyWithChunking(Math.max,i),o=r.range(a+1).map(()=>[]);return n.sort((t,r)=>e.node(t).rank-e.node(r).rank).forEach(function r(n){t[n]||(t[n]=!0,o[e.node(n).rank].push(n),e.successors(n).forEach(r))}),o}}),m=t((e,t)=>{var r=a().zipObject;t.exports=function(e,t){let n=0;for(let i=1;i<t.length;++i)n+=function(e,t,n){let i=r(n,n.map((e,t)=>t)),a=t.flatMap(t=>e.outEdges(t).map(t=>({pos:i[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),o=1;for(;o<n.length;)o<<=1;let s=2*o-1;o-=1;let d=Array(s).fill(0),l=0;return a.forEach(e=>{let t=e.pos+o;d[t]+=e.weight;let r=0;for(;t>0;)t%2&&(r+=d[t+1]),t=t-1>>1,d[t]+=e.weight;l+=e.weight*r}),l}(e,t[i-1],t[i]);return n}}),b=t((e,t)=>{t.exports=function(e,t=[]){return t.map(t=>{let r=e.inEdges(t);if(!r.length)return{v:t};{let n=r.reduce((t,r)=>{let n=e.edge(r),i=e.node(r.v);return{sum:t.sum+n.weight*i.order,weight:t.weight+n.weight}},{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}})}}),x=t((e,t)=>{var r=a();t.exports=function(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];void 0!==t&&void 0!==r&&(r.indegree++,t.out.push(n[e.w]))}),function(e){let t=[];for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(function(e){return t=>{t.merged||(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}(r)),r.out.forEach(function(t){return r=>{r.in.push(t),0==--r.indegree&&e.push(r)}}(r))}return t.filter(e=>!e.merged).map(e=>r.pick(e,["vs","i","barycenter","weight"]))}(Object.values(n).filter(e=>!e.indegree))}}),y=t((e,t)=>{var r=a();function n(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}t.exports=function(e,t){var i;let a=r.partition(e,e=>Object.hasOwn(e,"barycenter")),o=a.lhs,s=a.rhs.sort((e,t)=>t.i-e.i),d=[],l=0,u=0,c=0;o.sort((i=!!t,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:i?t.i-e.i:e.i-t.i)),c=n(d,s,c),o.forEach(e=>{c+=e.vs.length,d.push(e.vs),l+=e.barycenter*e.weight,u+=e.weight,c=n(d,s,c)});let h={vs:d.flat(!0)};return u&&(h.barycenter=l/u,h.weight=u),h}}),w=t((e,t)=>{var r=b(),n=x(),i=y();t.exports=function e(t,a,o,s){var d,l;let u=t.children(a),c=t.node(a),h=c?c.borderLeft:void 0,f=c?c.borderRight:void 0,p={};h&&(u=u.filter(e=>e!==h&&e!==f));let g=r(t,u);g.forEach(r=>{if(t.children(r.v).length){var n,i;let a=e(t,r.v,o,s);p[r.v]=a,Object.hasOwn(a,"barycenter")&&(n=r,i=a,void 0!==n.barycenter?(n.barycenter=(n.barycenter*n.weight+i.barycenter*i.weight)/(n.weight+i.weight),n.weight+=i.weight):(n.barycenter=i.barycenter,n.weight=i.weight))}});let v=n(g,o);d=v,l=p,d.forEach(e=>{e.vs=e.vs.flatMap(e=>l[e]?l[e].vs:e)});let m=i(v,s);if(h&&(m.vs=[h,m.vs,f].flat(!0),t.predecessors(h).length)){let e=t.node(t.predecessors(h)[0]),r=t.node(t.predecessors(f)[0]);Object.hasOwn(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+e.order+r.order)/(m.weight+2),m.weight+=2}return m}}),E=t((e,t)=>{var n=r().Graph,i=a();t.exports=function(e,t,r,a){a||(a=e.nodes());let o=function(e){for(var t;e.hasNode(t=i.uniqueId("_root")););return t}(e),s=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(t=>e.node(t));return a.forEach(n=>{let i=e.node(n),a=e.parent(n);(i.rank===t||i.minRank<=t&&t<=i.maxRank)&&(s.setNode(n),s.setParent(n,a||o),e[r](n).forEach(t=>{let r=t.v===n?t.w:t.v,i=s.edge(r,n),a=void 0!==i?i.weight:0;s.setEdge(r,n,{weight:e.edge(t).weight+a})}),Object.hasOwn(i,"minRank")&&s.setNode(n,{borderLeft:i.borderLeft[t],borderRight:i.borderRight[t]}))}),s}}),k=t((e,t)=>{t.exports=function(e,t,r){let n={},i;r.forEach(r=>{let a=e.parent(r),o,s;for(;a;){if((o=e.parent(a))?(s=n[o],n[o]=a):(s=i,i=a),s&&s!==a)return void t.setEdge(s,a);a=o}})}}),j=t((e,t)=>{var n=v(),i=m(),o=w(),s=E(),d=k(),l=r().Graph,u=a();function c(e,t,r){let n=new Map,i=(e,t)=>{n.has(e)||n.set(e,[]),n.get(e).push(t)};for(let t of e.nodes()){let r=e.node(t);if("number"==typeof r.rank&&i(r.rank,t),"number"==typeof r.minRank&&"number"==typeof r.maxRank)for(let e=r.minRank;e<=r.maxRank;e++)e!==r.rank&&i(e,t)}return t.map(function(t){return s(e,t,r,n.get(t)||[])})}function h(e,t){Object.values(t).forEach(t=>t.forEach((t,r)=>e.node(t).order=r))}t.exports=function e(t,r={}){if("function"==typeof r.customOrder)return void r.customOrder(t,e);let a=u.maxRank(t),s=c(t,u.range(1,a+1),"inEdges"),f=c(t,u.range(a-1,-1,-1),"outEdges"),p=n(t);if(h(t,p),r.disableOptimalOrderHeuristic)return;let g=1/0,v,m=r.constraints||[];for(let e=0,r=0;r<4;++e,++r){(function(e,t,r){let n=new l;e.forEach(function(e){r.forEach(e=>n.setEdge(e.left,e.right));let i=e.graph().root,a=o(e,i,n,t);a.vs.forEach((t,r)=>e.node(t).order=r),d(e,n,a.vs)})})(e%2?s:f,e%4>=2,m),p=u.buildLayerMatrix(t);let n=i(t,p);n<g?(r=0,v=Object.assign({},p),g=n):n===g&&(v=structuredClone(p))}h(t,v)}}),N=t((e,t)=>{var n=r().Graph,i=a();function o(e,t){let r={};return t.length&&t.reduce(function(t,n){let i=0,a=0,o=t.length,s=n[n.length-1];return n.forEach((t,l)=>{let u=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}(e,t),c=u?e.node(u).order:o;(u||t===s)&&(n.slice(a,l+1).forEach(t=>{e.predecessors(t).forEach(n=>{let a=e.node(n),o=a.order;(o<i||c<o)&&!(a.dummy&&e.node(t).dummy)&&d(r,n,t)})}),a=l+1,i=c)}),n}),r}function s(e,t){let r={};function n(t,n,a,o,s){let l;i.range(n,a).forEach(n=>{l=t[n],e.node(l).dummy&&e.predecessors(l).forEach(t=>{let n=e.node(t);n.dummy&&(n.order<o||n.order>s)&&d(r,t,l)})})}return t.length&&t.reduce(function(t,r){let i=-1,a,o=0;return r.forEach((s,d)=>{if("border"===e.node(s).dummy){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,n(r,o,d,i,a),o=d,i=a)}n(r,o,r.length,a,t.length)}),r}),r}function d(e,t,r){if(t>r){let e=t;t=r,r=e}let n=e[t];n||(e[t]=n={}),n[r]=!0}function l(e,t,r){if(t>r){let e=t;t=r,r=e}return!!e[t]&&Object.hasOwn(e[t],r)}function u(e,t,r,n){let i={},a={},o={};return t.forEach(e=>{e.forEach((e,t)=>{i[e]=e,a[e]=e,o[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=n(e);if(s.length){let n=((s=s.sort((e,t)=>o[e]-o[t])).length-1)/2;for(let d=Math.floor(n),u=Math.ceil(n);d<=u;++d){let n=s[d];a[e]===e&&t<o[n]&&!l(r,e,n)&&(a[n]=e,a[e]=i[e]=i[n],t=o[n])}}})}),{root:i,align:a}}function c(e,t,r,i,a){var o,s,d,l,u,c,h;let f,p,g,v={},m=(o=e,s=t,d=r,l=a,f=new n,g=(u=(p=o.graph()).nodesep,c=p.edgesep,h=l,(e,t,r)=>{let n=e.node(t),i=e.node(r),a,o;if(a=0+n.width/2,Object.hasOwn(n,"labelpos"))switch(n.labelpos.toLowerCase()){case"l":o=-n.width/2;break;case"r":o=n.width/2}if(o&&(a+=h?o:-o),o=0,a+=(n.dummy?c:u)/2,a+=(i.dummy?c:u)/2,a+=i.width/2,Object.hasOwn(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":o=i.width/2;break;case"r":o=-i.width/2}return o&&(a+=h?o:-o),o=0,a}),s.forEach(e=>{let t;e.forEach(e=>{let r=d[e];if(f.setNode(r),t){var n=d[t],i=f.edge(n,r);f.setEdge(n,r,Math.max(g(o,e,t),i||0))}t=e})}),f),b=a?"borderLeft":"borderRight";function x(e,t){let r=m.nodes().slice(),n={},i=r.pop();for(;i;){if(n[i])e(i);else for(let e of(n[i]=!0,r.push(i),t(i)))r.push(e);i=r.pop()}}return x(function(e){v[e]=m.inEdges(e).reduce((e,t)=>Math.max(e,v[t.v]+m.edge(t)),0)},m.predecessors.bind(m)),x(function(t){let r=m.outEdges(t).reduce((e,t)=>Math.min(e,v[t.w]-m.edge(t)),1/0),n=e.node(t);r!==1/0&&n.borderType!==b&&(v[t]=Math.max(v[t],r))},m.successors.bind(m)),Object.keys(i).forEach(e=>v[e]=v[r[e]]),v}function h(e,t){return Object.values(t).reduce((t,r)=>{let n=-1/0,i=1/0;Object.entries(r).forEach(([t,r])=>{var a,o;let s=(a=e,o=t,a.node(o).width/2);n=Math.max(r+s,n),i=Math.min(r-s,i)});let a=n-i;return a<t[0]&&(t=[a,r]),t},[1/0,null])[1]}function f(e,t){let r=Object.values(t),n=i.applyWithChunking(Math.min,r),a=i.applyWithChunking(Math.max,r);["u","d"].forEach(r=>{["l","r"].forEach(o=>{let s=r+o,d=e[s];if(d===t)return;let l=Object.values(d),u=n-i.applyWithChunking(Math.min,l);"l"!==o&&(u=a-i.applyWithChunking(Math.max,l)),u&&(e[s]=i.mapValues(d,e=>e+u))})})}function p(e,t){return i.mapValues(e.ul,(r,n)=>{if(t)return e[t.toLowerCase()][n];{let t=Object.values(e).map(e=>e[n]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}t.exports={positionX:function(e){let t=i.buildLayerMatrix(e),r=Object.assign(o(e,t),s(e,t)),n={},a;["u","d"].forEach(o=>{a="u"===o?t:Object.values(t).reverse(),["l","r"].forEach(t=>{"r"===t&&(a=a.map(e=>Object.values(e).reverse()));let s=("u"===o?e.predecessors:e.successors).bind(e),d=u(e,a,r,s),l=c(e,a,d.root,d.align,"r"===t);"r"===t&&(l=i.mapValues(l,e=>-e)),n[o+t]=l})});let d=h(e,n);return f(n,d),p(n,e.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:d,hasConflict:l,verticalAlignment:u,horizontalCompaction:c,alignCoordinates:f,findSmallestWidthAlignment:h,balance:p}}),_=t((e,t)=>{var r=a(),n=N().positionX;t.exports=function(e){var t;let i,a,o,s;t=e=r.asNonCompoundGraph(e),i=r.buildLayerMatrix(t),a=t.graph().ranksep,o=t.graph().rankalign,s=0,i.forEach(e=>{let r=e.reduce((e,r)=>{let n=t.node(r).height;return e>n?e:n},0);e.forEach(e=>{let n=t.node(e);"top"===o?n.y=s+n.height/2:"bottom"===o?n.y=s+r-n.height/2:n.y=s+r/2}),s+=r+a}),Object.entries(n(e)).forEach(([t,r])=>e.node(t).x=r)}}),O=t((e,t)=>{var n=o(),i=s(),d=c(),l=a().normalizeRanks,u=h(),v=a().removeEmptyRanks,m=f(),b=p(),x=g(),y=j(),w=_(),E=a(),k=r().Graph;t.exports=function(e,t={}){let r=t.debugTiming?E.time:E.notime;return r("layout",()=>{let a=r(" buildLayoutGraph",()=>{var t;let r,n;return t=e,r=new k({multigraph:!0,compound:!0}),n=$(t.graph()),r.setGraph(Object.assign({},O,D(n,N),E.pick(n,C))),t.nodes().forEach(e=>{let n=D($(t.node(e)),R);Object.keys(M).forEach(e=>{void 0===n[e]&&(n[e]=M[e])}),r.setNode(e,n),r.setParent(e,t.parent(e))}),t.edges().forEach(e=>{let n=$(t.edge(e));r.setEdge(e,Object.assign({},L,D(n,S),E.pick(n,T)))}),r});return r(" runLayout",()=>{var e,o,s;return e=a,o=r,s=t,void(o(" makeSpaceForEdgeLabels",()=>{var t;let r;return r=(t=e).graph(),void(r.ranksep/=2,t.edges().forEach(e=>{let n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}),o(" removeSelfEdges",()=>{var t;(t=e).edges().forEach(e=>{if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),o(" acyclic",()=>n.run(e)),o(" nestingGraph.run",()=>m.run(e)),o(" rank",()=>d(E.asNonCompoundGraph(e))),o(" injectEdgeLabelProxies",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(r.width&&r.height){let r=t.node(e.v),n={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};E.addDummyNode(t,"edge-proxy",n,"_ep")}})}),o(" removeEmptyRanks",()=>v(e)),o(" nestingGraph.cleanup",()=>m.cleanup(e)),o(" normalizeRanks",()=>l(e)),o(" assignRankMinMax",()=>{var t;let r;return r=0,void((t=e).nodes().forEach(e=>{let n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,r=Math.max(r,n.maxRank))}),t.graph().maxRank=r)}),o(" removeEdgeLabelProxies",()=>{var t;(t=e).nodes().forEach(e=>{let r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}),o(" normalize.run",()=>i.run(e)),o(" parentDummyChains",()=>u(e)),o(" addBorderSegments",()=>b(e)),o(" order",()=>y(e,s)),o(" insertSelfEdges",()=>{var t;return t=e,void E.buildLayerMatrix(t).forEach(e=>{var r=0;e.forEach((e,n)=>{var i=t.node(e);i.order=n+r,(i.selfEdges||[]).forEach(e=>{E.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:n+ ++r,e:e.e,label:e.label},"_se")}),delete i.selfEdges})})}),o(" adjustCoordinateSystem",()=>x.adjust(e)),o(" position",()=>w(e)),o(" positionSelfEdges",()=>{var t;(t=e).nodes().forEach(e=>{var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,o=r.x-i,s=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],r.label.x=r.x,r.label.y=r.y}})}),o(" removeBorderNodes",()=>{var t;(t=e).nodes().forEach(e=>{if(t.children(e).length){let r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(r.borderLeft[r.borderLeft.length-1]),o=t.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),t.nodes().forEach(e=>{"border"===t.node(e).dummy&&t.removeNode(e)})}),o(" normalize.undo",()=>i.undo(e)),o(" fixupEdgeLabelCoords",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(Object.hasOwn(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),o(" undoCoordinateSystem",()=>x.undo(e)),o(" translateGraph",()=>(function(e){let t=1/0,r=0,n=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function d(e){let a=e.x,o=e.y,s=e.width,d=e.height;t=Math.min(t,a-s/2),r=Math.max(r,a+s/2),n=Math.min(n,o-d/2),i=Math.max(i,o+d/2)}e.nodes().forEach(t=>d(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);Object.hasOwn(r,"x")&&d(r)}),t-=o,n-=s,e.nodes().forEach(r=>{let i=e.node(r);i.x-=t,i.y-=n}),e.edges().forEach(r=>{let i=e.edge(r);i.points.forEach(e=>{e.x-=t,e.y-=n}),Object.hasOwn(i,"x")&&(i.x-=t),Object.hasOwn(i,"y")&&(i.y-=n)}),a.width=r-t+o,a.height=i-n+s})(e)),o(" assignNodeIntersects",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=i,o=n),r.points.unshift(E.intersectRect(n,a)),r.points.push(E.intersectRect(i,o))})}),o(" reversePoints",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);r.reversed&&r.points.reverse()})}),o(" acyclic.undo",()=>n.undo(e)))}),r(" updateInputGraph",()=>{var t,r;return t=e,r=a,void(t.nodes().forEach(e=>{let n=t.node(e),i=r.node(e);n&&(n.x=i.x,n.y=i.y,n.order=i.order,n.rank=i.rank,r.children(e).length&&(n.width=i.width,n.height=i.height))}),t.edges().forEach(e=>{let n=t.edge(e),i=r.edge(e);n.points=i.points,Object.hasOwn(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=r.graph().width,t.graph().height=r.graph().height)}),a})};var N=["nodesep","edgesep","ranksep","marginx","marginy"],O={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},C=["acyclicer","ranker","rankdir","align","rankalign"],R=["width","height","rank"],M={width:0,height:0},S=["minlen","weight","width","height","labeloffset"],L={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function D(e,t){return E.mapValues(E.pick(e,t),Number)}function $(e){var t={};return e&&Object.entries(e).forEach(([e,r])=>{"string"==typeof e&&(e=e.toLowerCase()),t[e]=r}),t}}),C=t((e,t)=>{var n=a(),i=r().Graph;t.exports={debugOrdering:function(e){let t=n.buildLayerMatrix(e),r=new i({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{r.setNode(t,{label:t}),r.setParent(t,"layer"+e.node(t).rank)}),e.edges().forEach(e=>r.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{r.setNode("layer"+t,{rank:"same"}),e.reduce((e,t)=>(r.setEdge(e,t,{style:"invis"}),t))}),r}}}),R=t((e,t)=>{t.exports="2.0.4"});let M=t((e,t)=>{t.exports={graphlib:r(),layout:O(),debug:C(),util:{time:a().time,notime:a().notime},version:R()}})(),S={direction:"LR",ranksep:200,nodesep:48};function L(e="ltr"){return{...S,direction:"rtl"===e?"RL":"LR"}}let T={featureNode:{width:388,height:140},repositoryNode:{width:416,height:140},applicationNode:{width:416,height:110}};function D(e,t){let r=e.data;return r&&"number"==typeof r.width&&"number"==typeof r.height?{width:r.width,height:r.height}:T[e.type??""]??t}function $(e,t,r={}){let{direction:n="TB",nodeSize:i={width:172,height:36},ranksep:a=80,nodesep:o=30}=r;if(0===e.length)return{nodes:[],edges:[]};let s=new M.graphlib.Graph({multigraph:!0});s.setDefaultEdgeLabel(()=>({})),s.setGraph({rankdir:n,ranksep:a,nodesep:o});let d=new Set;for(let e of t)d.add(e.source),d.add(e.target);let l=e.filter(e=>d.has(e.id)),u=e.filter(e=>!d.has(e.id));for(let e of l){let t=D(e,i);s.setNode(e.id,{width:t.width,height:t.height})}for(let e of t)s.hasNode(e.source)&&s.hasNode(e.target)&&s.setEdge(e.source,e.target,{},e.id);M.layout(s);let{targetPosition:c,sourcePosition:h}=function(e){switch(e){case"LR":return{targetPosition:"left",sourcePosition:"right"};case"RL":return{targetPosition:"right",sourcePosition:"left"};case"BT":return{targetPosition:"bottom",sourcePosition:"top"};default:return{targetPosition:"top",sourcePosition:"bottom"}}}(n),f="LR"===n||"RL"===n,p=new Map;for(let e of l){let t=s.node(e.id),r=D(e,i);p.set(e.id,{cx:t.x,cy:t.y,w:r.width,h:r.height})}let g=0;for(let e of p.values()){g=f?e.cx:e.cy;break}for(let e of u){let t=D(e,i);p.set(e.id,{cx:f?g:0,cy:f?0:g,w:t.width,h:t.height})}let v=new Map;for(let e of t)p.has(e.source)&&p.has(e.target)&&(v.has(e.source)||v.set(e.source,[]),v.get(e.source).push(e.target));let m=new Map;for(let t=0;t<e.length;t++)m.set(e[t].id,t);for(let[,e]of v)e.sort((e,t)=>(m.get(e)??0)-(m.get(t)??0));let b=new Set;for(let e of v.values())for(let t of e)b.add(t);let x=[...[...d].filter(e=>p.has(e)&&!b.has(e)),...u.map(e=>e.id)];x.sort((e,t)=>(m.get(e)??0)-(m.get(t)??0));let y=new Map;for(let e of x)!function e(t){if(y.has(t))return y.get(t);let r=p.get(t),n=f?r.h:r.w,i=v.get(t);if(!i||0===i.length)return y.set(t,n),n;let a=0;for(let t of i)a+=e(t);let s=Math.max(n,a+=(i.length-1)*o);return y.set(t,s),s}(e);let w=0;for(let e of x){let t=y.get(e)??0;!function e(t,r){let n=p.get(t);f?n.cy=r:n.cx=r;let i=v.get(t);if(!i||0===i.length)return;let a=0;for(let e of i)a+=y.get(e)??0;let s=r-(a+=(i.length-1)*o)/2;for(let t of i){let r=y.get(t)??0;e(t,s+r/2),s+=r+o}}(e,w+t/2),w+=t+o}let E=[];for(let t of e){let e=p.get(t.id);e&&E.push({...t,targetPosition:c,sourcePosition:h,position:{x:e.cx-e.w/2,y:e.cy-e.h/2}})}return{nodes:E,edges:[...t]}}e.s(["getCanvasLayoutDefaults",()=>L,"layoutWithDagre",()=>$],939835)},643280,e=>{"use strict";var t=e.i(679606),r=e.i(152155),n=e.i(468304),i=e.i(735364),a=e.i(48306),o=e.i(81846),s=e.i(123620),d=e.i(508893);let l=(0,d.createServerReference)("4058419163c682b19445b7046c44220504fb8fcdee",d.callServer,void 0,d.findSourceMapURL,"saveAgentPrompt"),u=(0,d.createServerReference)("40b8d0cf270d6704436f7ca615ab2a7bbf86ae2cf7",d.callServer,void 0,d.findSourceMapURL,"resetAgentPrompt");function c({entries:e,onSaveOverride:r,onResetOverride:n}){return 0===e.length?(0,t.jsx)("p",{className:"text-muted-foreground rounded-lg border border-dashed p-4 text-sm",children:"No editable prompt slots are registered for this agent yet."}):(0,t.jsx)("div",{className:"flex flex-col gap-4","data-testid":"prompt-editor",children:e.map(e=>(0,t.jsx)(h,{entry:e,...r&&{onSaveOverride:r},...n&&{onResetOverride:n}},`${e.agentType}-${e.promptId}`))})}function h({entry:e,onSaveOverride:n,onResetOverride:d}){let[c,h]=(0,r.useState)(e.effectiveBody),[f,p]=(0,r.useTransition)(),[g,v]=(0,r.useState)(null),[m,b]=(0,r.useState)(null);(0,r.useEffect)(()=>{h(e.effectiveBody)},[e.effectiveBody]);let x=c!==e.effectiveBody,y=e.hasOverride||x;return(0,t.jsxs)("article",{className:"bg-card flex flex-col gap-3 rounded-lg border p-4","data-testid":`prompt-slot-${e.promptId}`,children:[(0,t.jsxs)("header",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:e.name}),(0,t.jsx)("p",{className:"text-muted-foreground text-xs",children:e.description}),(0,t.jsxs)("p",{className:"text-muted-foreground mt-1 font-mono text-[10px]",children:[e.agentType,"/",e.promptId]})]}),y?(0,t.jsx)(o.Badge,{variant:"default",className:"shrink-0","data-testid":`badge-overridden-${e.promptId}`,children:"Overridden"}):(0,t.jsx)(o.Badge,{variant:"secondary",className:"shrink-0",children:"Bundled"})]}),(0,t.jsx)(a.Textarea,{value:c,onChange:e=>h(e.target.value),rows:Math.min(20,Math.max(6,c.split("\n").length)),className:"font-mono text-xs","data-testid":`prompt-textarea-${e.promptId}`,disabled:f,spellCheck:!1}),g?(0,t.jsx)(s.Alert,{variant:"destructive","data-testid":`prompt-error-${e.promptId}`,children:(0,t.jsx)(s.AlertDescription,{children:g})}):null,m?(0,t.jsxs)("p",{className:"text-muted-foreground text-xs","data-testid":`prompt-saved-${e.promptId}`,children:["Saved at ",m.toLocaleTimeString()]}):null,(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[e.hasOverride?(0,t.jsx)(i.Button,{type:"button",variant:"ghost",size:"sm",disabled:f,onClick:function(){v(null),p(async()=>{let t=await (d??u)({agentType:e.agentType,promptId:e.promptId});t.ok?(h(e.bundledBody),b(new Date)):v(t.error??"Failed to reset")})},"data-testid":`prompt-reset-${e.promptId}`,children:"Reset to bundled"}):null,(0,t.jsx)(i.Button,{type:"button",size:"sm",disabled:!x||f,onClick:function(){v(null),p(async()=>{let t=await (n??l)({agentType:e.agentType,promptId:e.promptId,body:c});t.ok?b(new Date):v(t.error??"Failed to save")})},"data-testid":`prompt-save-${e.promptId}`,children:f?"Saving…":e.hasOverride?"Update override":"Save override"})]})]})}var f=e.i(120942),p=e.i(292002),g=e.i(998798),v=e.i(3214),m=e.i(438227),b=e.i(698071),x=e.i(267669),y=e.i(860253),w=e.i(939835);let E=(0,d.createServerReference)("4063625f5f10db64950da320dd6272b580f69873a9",d.callServer,void 0,d.findSourceMapURL,"resetAgentGraph"),k=(0,d.createServerReference)("4001c755450bb815b3e68e16e7f4dbca09edd97ac7",d.callServer,void 0,d.findSourceMapURL,"saveAgentGraph"),j={editable:function({id:e,data:r}){let{label:n,description:i,editing:a,onLabelChange:o,onDescriptionChange:s,onDelete:d}=r;return(0,t.jsxs)("div",{className:"bg-card relative min-w-[180px] rounded-md border px-2 py-1.5 shadow-sm",children:[(0,t.jsx)(f.Handle,{type:"target",position:p.Position.Left}),a?(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("input",{value:n,onChange:t=>o(e,t.target.value),className:"border-border bg-background w-full rounded border px-1 py-0.5 text-xs font-semibold",placeholder:"label","aria-label":`Label for node ${e}`,"data-testid":`graph-node-label-${e}`}),(0,t.jsx)("input",{value:i??"",onChange:t=>s(e,t.target.value),className:"border-border bg-background w-full rounded border px-1 py-0.5 text-[10px]",placeholder:"description","aria-label":`Description for node ${e}`,"data-testid":`graph-node-description-${e}`}),(0,t.jsx)("button",{type:"button",onClick:()=>d(e),className:"text-destructive absolute -top-2 -right-2 flex size-4 items-center justify-center rounded-full border bg-white shadow-sm","aria-label":`Delete node ${e}`,"data-testid":`graph-node-delete-${e}`,children:(0,t.jsx)(x.Trash2,{className:"size-2.5"})})]}):(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 text-left",children:[(0,t.jsx)("span",{className:"text-xs font-semibold",children:n}),i?(0,t.jsx)("span",{className:"text-muted-foreground text-[10px]",children:i}):null]}),(0,t.jsx)(f.Handle,{type:"source",position:p.Position.Right})]})}};function N(e){return e.graph?(0,t.jsx)(f.ReactFlowProvider,{children:(0,t.jsx)(_,{...e,graph:e.graph})}):(0,t.jsx)("p",{className:"text-muted-foreground rounded-lg border border-dashed p-4 text-sm","data-testid":"agent-graph-empty",children:"No graph descriptor registered for this agent yet."})}function _({graph:e,bundled:n,hasOverride:a,onSaveOverride:d,onResetOverride:l,initialEditing:u}){let[c,h]=(0,r.useState)(!!u),[x,w]=(0,r.useState)(null),[N,_]=(0,r.useState)(null),[C,R]=(0,r.useTransition)(),M=(0,r.useRef)(0),S=(0,r.useMemo)(()=>O(e),[e]),[L,T,D]=(0,f.useNodesState)(S.nodes),[$,A,P]=(0,f.useEdgesState)(S.edges);(0,r.useEffect)(()=>{T(S.nodes),A(S.edges)},[S.nodes,S.edges,T,A]);let I=(0,r.useCallback)((e,t)=>{T(r=>r.map(r=>r.id===e?{...r,data:{...r.data,label:t}}:r))},[T]),z=(0,r.useCallback)((e,t)=>{T(r=>r.map(r=>r.id===e?{...r,data:{...r.data,description:t}}:r))},[T]),B=(0,r.useCallback)(e=>{T(t=>t.filter(t=>t.id!==e)),A(t=>t.filter(t=>t.source!==e&&t.target!==e))},[T,A]),F=(0,r.useMemo)(()=>L.map(e=>({...e,type:"editable",data:{...e.data,editing:c,onLabelChange:I,onDescriptionChange:z,onDelete:B}})),[L,c,I,z,B]);return(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"agent-graph-view",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:e.agentType}),a?(0,t.jsx)(o.Badge,{variant:"default","data-testid":"graph-badge-overridden",children:"Overridden"}):(0,t.jsx)(o.Badge,{variant:"secondary",children:"Bundled"})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.Button,{type:"button",variant:"ghost",size:"sm",onClick:function(){M.current+=1;let e=`node-${Date.now()}-${M.current}`;T(t=>{var r;return[...t,{id:e,type:"editable",position:0===(r=t).length?{x:0,y:0}:{x:r.reduce((e,t)=>Math.max(e,t.position.x),0)+240,y:r.reduce((e,t)=>Math.min(e,t.position.y),0)},data:{label:"New step",description:"",editing:!0,onLabelChange:I,onDescriptionChange:z,onDelete:B},sourcePosition:p.Position.Right,targetPosition:p.Position.Left}]})},disabled:C,"data-testid":"graph-add-node",children:[(0,t.jsx)(v.Plus,{className:"size-3"}),"Add node"]}),a?(0,t.jsxs)(i.Button,{type:"button",variant:"ghost",size:"sm",onClick:function(){w(null),R(async()=>{let t=await (l??E)({agentType:e.agentType});if(!t.ok)return void w(t.error??"Failed to reset graph");if(_(new Date),h(!1),n){let e=O(n);T(e.nodes),A(e.edges)}})},disabled:C,"data-testid":"graph-reset",children:[(0,t.jsx)(m.RotateCcw,{className:"size-3"}),"Reset to bundled"]}):null,(0,t.jsxs)(i.Button,{type:"button",variant:"ghost",size:"sm",onClick:function(){T(S.nodes),A(S.edges),w(null),h(!1)},disabled:C,"data-testid":"graph-cancel",children:[(0,t.jsx)(y.X,{className:"size-3"}),"Cancel"]}),(0,t.jsxs)(i.Button,{type:"button",size:"sm",onClick:function(){var t,r;w(null);let n=(t=L,r=$,{nodes:t.map(e=>({id:e.id,label:e.data.label.trim()||e.id,...e.data.description?.trim()?{description:e.data.description.trim()}:{}})),edges:r.map(e=>({from:e.source,to:e.target,..."string"==typeof e.label&&e.label.trim()?{label:e.label.trim()}:{}}))}),i=function(e){if(0===e.nodes.length)return"Graph must have at least one node.";let t=new Set;for(let r of e.nodes){if(!r.label)return`Node ${r.id} must have a label.`;if(t.has(r.id))return`Duplicate node id: ${r.id}`;t.add(r.id)}for(let r of e.edges){if(!t.has(r.from))return`Edge references unknown source: ${r.from}`;if(!t.has(r.to))return`Edge references unknown target: ${r.to}`}return null}(n);i?w(i):R(async()=>{let t=await (d??k)({agentType:e.agentType,...n});t.ok?(_(new Date),h(!1)):w(t.error??"Failed to save graph")})},disabled:C,"data-testid":"graph-save",children:[(0,t.jsx)(b.Save,{className:"size-3"}),C?"Saving…":"Save graph"]})]}):(0,t.jsxs)(i.Button,{type:"button",variant:"outline",size:"sm",onClick:()=>h(!0),"data-testid":"graph-edit",children:[(0,t.jsx)(g.Pencil,{className:"size-3"}),"Edit"]})})]}),x?(0,t.jsx)(s.Alert,{variant:"destructive","data-testid":"graph-error",children:(0,t.jsx)(s.AlertDescription,{children:x})}):null,N&&!c?(0,t.jsxs)("p",{className:"text-muted-foreground text-xs","data-testid":"graph-saved",children:["Saved at ",N.toLocaleTimeString()]}):null,(0,t.jsx)("div",{className:"bg-muted/20 h-[480px] w-full overflow-hidden rounded-lg border",children:(0,t.jsxs)(f.ReactFlow,{nodes:F,edges:$,nodeTypes:j,onNodesChange:D,onEdgesChange:P,onConnect:function(e){A(t=>(0,p.addEdge)({...e,type:"smoothstep"},t))},nodesDraggable:c,nodesConnectable:c,elementsSelectable:c,deleteKeyCode:c?["Backspace","Delete"]:null,fitView:!0,proOptions:{hideAttribution:!0},children:[(0,t.jsx)(f.Background,{gap:20}),(0,t.jsx)(f.Controls,{showInteractive:!1})]})})]})}function O(e){let t=e.nodes.map(e=>({id:e.id,type:"editable",position:{x:0,y:0},data:{label:e.label,description:e.description??"",editing:!1,onLabelChange:()=>void 0,onDescriptionChange:()=>void 0,onDelete:()=>void 0},sourcePosition:p.Position.Right,targetPosition:p.Position.Left})),r=e.edges.map((e,t)=>({id:`e-${t}-${e.from}-${e.to}`,source:e.from,target:e.to,type:"smoothstep",label:e.label,animated:!1})),n=(0,w.layoutWithDagre)(t,r,{direction:"LR",nodeSize:{width:220,height:70},nodesep:30,ranksep:80});return{nodes:n.nodes,edges:n.edges}}var C=e.i(675112),R=e.i(64970);let M=0;function S(){return M+=1,`msg-${M}`}function L({agentType:e,promptId:n,inlinePromptBody:o,fetchOverride:d}){let[l,u]=(0,r.useState)(""),[c,h]=(0,r.useState)([]),[f,p]=(0,r.useState)(!1),[g,v]=(0,r.useState)(null),m=(0,r.useRef)(null),b=(0,r.useRef)(null);async function x(t){if(!t.trim()||f)return;v(null);let r=[...c,{id:S(),role:"user",content:t},{id:S(),role:"assistant",content:""}];h(r),u(""),p(!0);let i=new AbortController;m.current=i;try{let t=d??fetch,a=await t("/api/agents/playground",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentType:e,promptId:n,...o&&{promptBody:o},messages:r.slice(0,-1).map(e=>({role:e.role,content:e.content}))}),signal:i.signal});if(!a.ok||!a.body){let e=`Playground request failed (${a.status})`;v(e),p(!1);return}let s=a.body.getReader(),l=new TextDecoder,u="";for(;;){let{value:e,done:t}=await s.read();if(t)break;let r=(u+=l.decode(e,{stream:!0})).split("\n\n");for(let e of(u=r.pop()??"",r)){let t=e.trim();if(!t.startsWith("data:"))continue;let r=t.slice(5).trim();if(r)try{let e=JSON.parse(r);"delta"===e.type?h(t=>(function(e,t){if(0===e.length)return e;let r=e[e.length-1];if(r?.role!=="assistant")return e;let n=[...e];return n[n.length-1]={...r,content:r.content+t},n})(t,e.content)):"error"===e.type&&v(e.content)}catch{}}}}catch(e){e?.name!=="AbortError"&&v(e instanceof Error?e.message:String(e))}finally{p(!1),m.current=null}}return(0,r.useEffect)(()=>{b.current?.scrollTo({top:b.current.scrollHeight})},[c]),(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border p-4","data-testid":"agent-playground",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("p",{className:"text-sm font-semibold",children:"Playground"}),(0,t.jsxs)("p",{className:"text-muted-foreground text-xs",children:["Streaming against ",e," · ",n,o?" (inline override)":""]})]}),c.length>0?(0,t.jsx)(i.Button,{type:"button",variant:"ghost",size:"sm",onClick:()=>h([]),disabled:f,children:"Clear"}):null]}),(0,t.jsx)("div",{ref:b,className:"bg-muted/20 flex h-72 flex-col gap-2 overflow-y-auto rounded border p-3","data-testid":"playground-transcript",children:0===c.length?(0,t.jsx)("p",{className:"text-muted-foreground text-xs",children:"Send a message to test this prompt against the configured executor."}):c.map((e,r)=>(0,t.jsx)("div",{className:"user"===e.role?"bg-primary text-primary-foreground max-w-[85%] self-end rounded-lg px-3 py-2 text-sm":"bg-card max-w-[85%] self-start rounded-lg border px-3 py-2 text-sm whitespace-pre-wrap","data-testid":`playground-msg-${r}-${e.role}`,children:e.content||(f&&r===c.length-1?"…":"")},e.id))}),g?(0,t.jsx)(s.Alert,{variant:"destructive","data-testid":"playground-error",children:(0,t.jsx)(s.AlertDescription,{children:g})}):null,(0,t.jsxs)("form",{className:"flex items-end gap-2",onSubmit:e=>{e.preventDefault(),x(l)},children:[(0,t.jsx)(a.Textarea,{value:l,onChange:e=>u(e.target.value),rows:2,placeholder:"Try a prompt…",className:"font-mono text-xs","data-testid":"playground-input",disabled:f,onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),x(l))}}),f?(0,t.jsxs)(i.Button,{type:"button",variant:"secondary",onClick:function(){m.current?.abort(),m.current=null,p(!1)},"data-testid":"playground-stop",children:[(0,t.jsx)(R.Square,{className:"size-3"}),"Stop"]}):(0,t.jsxs)(i.Button,{type:"submit",disabled:!l.trim(),"data-testid":"playground-send",children:[(0,t.jsx)(C.Send,{className:"size-3"}),"Send"]})]})]})}function T({agentType:e,prompts:i,graph:a,bundledGraph:o,hasGraphOverride:s}){let[d,l]=(0,r.useState)(i[0]?.promptId??"evaluator.system"),u=i.find(e=>e.promptId===d);return(0,t.jsxs)(n.Tabs,{defaultValue:"prompts","data-testid":"agent-editor-tabs",children:[(0,t.jsxs)(n.TabsList,{children:[(0,t.jsx)(n.TabsTrigger,{value:"prompts",children:"Prompts"}),(0,t.jsx)(n.TabsTrigger,{value:"graph",children:"Graph"}),(0,t.jsx)(n.TabsTrigger,{value:"playground",children:"Playground"})]}),(0,t.jsx)(n.TabsContent,{value:"prompts",className:"mt-4",children:(0,t.jsx)(c,{entries:i})}),(0,t.jsx)(n.TabsContent,{value:"graph",className:"mt-4",children:(0,t.jsx)(N,{graph:a,bundled:o??null,hasOverride:s??!1})}),(0,t.jsxs)(n.TabsContent,{value:"playground",className:"mt-4 flex flex-col gap-3",children:[i.length>1?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)("label",{htmlFor:"playground-prompt-select",className:"text-muted-foreground",children:"Use prompt:"}),(0,t.jsx)("select",{id:"playground-prompt-select",value:d,onChange:e=>l(e.target.value),className:"border-border bg-background rounded border px-2 py-1 text-xs","data-testid":"playground-prompt-select",children:i.map(e=>(0,t.jsx)("option",{value:e.promptId,children:e.name},e.promptId))})]}):null,(0,t.jsx)(L,{agentType:e,promptId:d,...u?.hasOverride&&{inlinePromptBody:u.effectiveBody}})]})]})}e.s(["AgentEditorTabs",()=>T],643280)}]);