viba-cli 0.38.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/fallback-build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/server/app/_global-error.html +2 -2
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  13. package/.next/server/app/_not-found.html +2 -2
  14. package/.next/server/app/_not-found.rsc +3 -3
  15. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  16. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  17. package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  18. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  21. package/.next/server/app/api/custom-scripts/route.js +2 -2
  22. package/.next/server/app/api/custom-scripts/route.js.nft.json +1 -1
  23. package/.next/server/app/api/git/action/route.js +3 -3
  24. package/.next/server/app/api/git/action/route.js.nft.json +1 -1
  25. package/.next/server/app/api/git/branches/route.js +3 -3
  26. package/.next/server/app/api/git/branches/route.js.nft.json +1 -1
  27. package/.next/server/app/api/git/diff/route.js +2 -2
  28. package/.next/server/app/api/git/diff/route.js.nft.json +1 -1
  29. package/.next/server/app/api/git/log/route.js +2 -2
  30. package/.next/server/app/api/git/log/route.js.nft.json +1 -1
  31. package/.next/server/app/api/git/status/route.js +3 -3
  32. package/.next/server/app/api/git/status/route.js.nft.json +1 -1
  33. package/.next/server/app/api/repos/clone/route.js +2 -2
  34. package/.next/server/app/api/repos/clone/route.js.nft.json +1 -1
  35. package/.next/server/app/api/repos/route.js +2 -2
  36. package/.next/server/app/api/repos/route.js.nft.json +1 -1
  37. package/.next/server/app/api/settings/route.js.nft.json +1 -1
  38. package/.next/server/app/credentials/page/server-reference-manifest.json +7 -7
  39. package/.next/server/app/credentials/page.js.nft.json +1 -1
  40. package/.next/server/app/credentials/page_client-reference-manifest.js +1 -1
  41. package/.next/server/app/credentials.html +2 -2
  42. package/.next/server/app/credentials.rsc +5 -5
  43. package/.next/server/app/credentials.segments/_full.segment.rsc +5 -5
  44. package/.next/server/app/credentials.segments/_head.segment.rsc +1 -1
  45. package/.next/server/app/credentials.segments/_index.segment.rsc +3 -3
  46. package/.next/server/app/credentials.segments/_tree.segment.rsc +2 -2
  47. package/.next/server/app/credentials.segments/credentials/__PAGE__.segment.rsc +2 -2
  48. package/.next/server/app/credentials.segments/credentials.segment.rsc +1 -1
  49. package/.next/server/app/git/changes/page.js.nft.json +1 -1
  50. package/.next/server/app/git/changes/page_client-reference-manifest.js +1 -1
  51. package/.next/server/app/git/changes.html +2 -2
  52. package/.next/server/app/git/changes.rsc +8 -8
  53. package/.next/server/app/git/changes.segments/_full.segment.rsc +8 -8
  54. package/.next/server/app/git/changes.segments/_head.segment.rsc +1 -1
  55. package/.next/server/app/git/changes.segments/_index.segment.rsc +3 -3
  56. package/.next/server/app/git/changes.segments/_tree.segment.rsc +2 -2
  57. package/.next/server/app/git/changes.segments/git/changes/__PAGE__.segment.rsc +2 -2
  58. package/.next/server/app/git/changes.segments/git/changes.segment.rsc +1 -1
  59. package/.next/server/app/git/changes.segments/git.segment.rsc +3 -3
  60. package/.next/server/app/git/custom-scripts/page.js.nft.json +1 -1
  61. package/.next/server/app/git/custom-scripts/page_client-reference-manifest.js +1 -1
  62. package/.next/server/app/git/custom-scripts.html +2 -2
  63. package/.next/server/app/git/custom-scripts.rsc +7 -7
  64. package/.next/server/app/git/custom-scripts.segments/_full.segment.rsc +7 -7
  65. package/.next/server/app/git/custom-scripts.segments/_head.segment.rsc +1 -1
  66. package/.next/server/app/git/custom-scripts.segments/_index.segment.rsc +3 -3
  67. package/.next/server/app/git/custom-scripts.segments/_tree.segment.rsc +2 -2
  68. package/.next/server/app/git/custom-scripts.segments/git/custom-scripts/__PAGE__.segment.rsc +2 -2
  69. package/.next/server/app/git/custom-scripts.segments/git/custom-scripts.segment.rsc +1 -1
  70. package/.next/server/app/git/custom-scripts.segments/git.segment.rsc +3 -3
  71. package/.next/server/app/git/history/page.js.nft.json +1 -1
  72. package/.next/server/app/git/history/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/git/history.html +2 -2
  74. package/.next/server/app/git/history.rsc +8 -8
  75. package/.next/server/app/git/history.segments/_full.segment.rsc +8 -8
  76. package/.next/server/app/git/history.segments/_head.segment.rsc +1 -1
  77. package/.next/server/app/git/history.segments/_index.segment.rsc +3 -3
  78. package/.next/server/app/git/history.segments/_tree.segment.rsc +2 -2
  79. package/.next/server/app/git/history.segments/git/history/__PAGE__.segment.rsc +2 -2
  80. package/.next/server/app/git/history.segments/git/history.segment.rsc +1 -1
  81. package/.next/server/app/git/history.segments/git.segment.rsc +3 -3
  82. package/.next/server/app/git/page.js.nft.json +1 -1
  83. package/.next/server/app/git/page_client-reference-manifest.js +1 -1
  84. package/.next/server/app/git/stashes/page.js.nft.json +1 -1
  85. package/.next/server/app/git/stashes/page_client-reference-manifest.js +1 -1
  86. package/.next/server/app/git/stashes.html +2 -2
  87. package/.next/server/app/git/stashes.rsc +7 -7
  88. package/.next/server/app/git/stashes.segments/_full.segment.rsc +7 -7
  89. package/.next/server/app/git/stashes.segments/_head.segment.rsc +1 -1
  90. package/.next/server/app/git/stashes.segments/_index.segment.rsc +3 -3
  91. package/.next/server/app/git/stashes.segments/_tree.segment.rsc +2 -2
  92. package/.next/server/app/git/stashes.segments/git/stashes/__PAGE__.segment.rsc +2 -2
  93. package/.next/server/app/git/stashes.segments/git/stashes.segment.rsc +1 -1
  94. package/.next/server/app/git/stashes.segments/git.segment.rsc +3 -3
  95. package/.next/server/app/git.html +2 -2
  96. package/.next/server/app/git.rsc +8 -8
  97. package/.next/server/app/git.segments/_full.segment.rsc +8 -8
  98. package/.next/server/app/git.segments/_head.segment.rsc +1 -1
  99. package/.next/server/app/git.segments/_index.segment.rsc +3 -3
  100. package/.next/server/app/git.segments/_tree.segment.rsc +2 -2
  101. package/.next/server/app/git.segments/git/__PAGE__.segment.rsc +2 -2
  102. package/.next/server/app/git.segments/git.segment.rsc +3 -3
  103. package/.next/server/app/index.html +2 -2
  104. package/.next/server/app/index.rsc +5 -5
  105. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  106. package/.next/server/app/index.segments/_full.segment.rsc +5 -5
  107. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  108. package/.next/server/app/index.segments/_index.segment.rsc +3 -3
  109. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  110. package/.next/server/app/new/page/server-reference-manifest.json +29 -29
  111. package/.next/server/app/new/page.js +2 -2
  112. package/.next/server/app/new/page.js.nft.json +1 -1
  113. package/.next/server/app/new/page_client-reference-manifest.js +1 -1
  114. package/.next/server/app/page/server-reference-manifest.json +29 -29
  115. package/.next/server/app/page.js +1 -1
  116. package/.next/server/app/page.js.nft.json +1 -1
  117. package/.next/server/app/page_client-reference-manifest.js +1 -1
  118. package/.next/server/app/session/[sessionId]/page/server-reference-manifest.json +19 -19
  119. package/.next/server/app/session/[sessionId]/page.js +1 -1
  120. package/.next/server/app/session/[sessionId]/page.js.nft.json +1 -1
  121. package/.next/server/app/session/[sessionId]/page_client-reference-manifest.js +1 -1
  122. package/.next/server/chunks/[root-of-the-server]__01a6baa7._.js +1 -1
  123. package/.next/server/chunks/[root-of-the-server]__01a6baa7._.js.map +1 -1
  124. package/.next/server/chunks/[root-of-the-server]__2ea0148f._.js +7 -0
  125. package/.next/server/chunks/[root-of-the-server]__2ea0148f._.js.map +1 -0
  126. package/.next/server/chunks/[root-of-the-server]__51f9ab28._.js +3 -0
  127. package/.next/server/chunks/{[root-of-the-server]__7f2f8f49._.js.map → [root-of-the-server]__51f9ab28._.js.map} +1 -1
  128. package/.next/server/chunks/[root-of-the-server]__52f9b7e2._.js +3 -0
  129. package/.next/server/chunks/{[root-of-the-server]__afea2116._.js.map → [root-of-the-server]__52f9b7e2._.js.map} +1 -1
  130. package/.next/server/chunks/[root-of-the-server]__5b08b37e._.js +3 -0
  131. package/.next/server/chunks/{[root-of-the-server]__7324fe0b._.js.map → [root-of-the-server]__5b08b37e._.js.map} +1 -1
  132. package/.next/server/chunks/[root-of-the-server]__8b29248a._.js +3 -0
  133. package/.next/server/chunks/{[root-of-the-server]__82d53572._.js.map → [root-of-the-server]__8b29248a._.js.map} +1 -1
  134. package/.next/server/chunks/[root-of-the-server]__f52f1c06._.js +3 -0
  135. package/.next/server/chunks/{[root-of-the-server]__5349b858._.js.map → [root-of-the-server]__f52f1c06._.js.map} +1 -1
  136. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0002606b.js +1 -1
  137. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0002606b.js.map +1 -1
  138. package/.next/server/chunks/ssr/[root-of-the-server]__05e6fb4c._.js +1 -1
  139. package/.next/server/chunks/ssr/{[root-of-the-server]__79a7a15d._.js → [root-of-the-server]__0ed2deb1._.js} +2 -2
  140. package/.next/server/chunks/ssr/{[root-of-the-server]__79a7a15d._.js.map → [root-of-the-server]__0ed2deb1._.js.map} +1 -1
  141. package/.next/server/chunks/ssr/{[root-of-the-server]__2798aa4d._.js → [root-of-the-server]__1ed5a76d._.js} +3 -3
  142. package/.next/server/chunks/ssr/{[root-of-the-server]__2798aa4d._.js.map → [root-of-the-server]__1ed5a76d._.js.map} +1 -1
  143. package/.next/server/chunks/ssr/[root-of-the-server]__46af1502._.js +1 -1
  144. package/.next/server/chunks/ssr/[root-of-the-server]__46af1502._.js.map +1 -1
  145. package/.next/server/chunks/ssr/{[root-of-the-server]__05b3451a._.js → [root-of-the-server]__a65a3900._.js} +2 -2
  146. package/.next/server/chunks/ssr/{[root-of-the-server]__05b3451a._.js.map → [root-of-the-server]__a65a3900._.js.map} +1 -1
  147. package/.next/server/chunks/ssr/[root-of-the-server]__d52659cf._.js +3 -0
  148. package/.next/server/chunks/ssr/[root-of-the-server]__d52659cf._.js.map +1 -0
  149. package/.next/server/chunks/ssr/{_523ff032._.js → _2eaa7035._.js} +2 -2
  150. package/.next/server/chunks/ssr/{_523ff032._.js.map → _2eaa7035._.js.map} +1 -1
  151. package/.next/server/chunks/ssr/{_be721a9c._.js → _4343fa01._.js} +2 -2
  152. package/.next/server/chunks/ssr/{_be721a9c._.js.map → _4343fa01._.js.map} +1 -1
  153. package/.next/server/chunks/ssr/_476e86d1._.js +1 -1
  154. package/.next/server/chunks/ssr/_4d07d45e._.js +1 -1
  155. package/.next/server/chunks/ssr/_4d07d45e._.js.map +1 -1
  156. package/.next/server/chunks/ssr/_57f63a65._.js +1 -1
  157. package/.next/server/chunks/ssr/_57f63a65._.js.map +1 -1
  158. package/.next/server/chunks/ssr/_707e5fab._.js +1 -1
  159. package/.next/server/chunks/ssr/_9493de08._.js +1 -1
  160. package/.next/server/chunks/ssr/{_787bdec7._.js → _a07f93fb._.js} +2 -2
  161. package/.next/server/chunks/ssr/{_787bdec7._.js.map → _a07f93fb._.js.map} +1 -1
  162. package/.next/server/chunks/ssr/{_2a7fa4b0._.js → _ebf4c61c._.js} +2 -2
  163. package/.next/server/chunks/ssr/{_2a7fa4b0._.js.map → _ebf4c61c._.js.map} +1 -1
  164. package/.next/server/chunks/ssr/_ff20dbae._.js +3 -0
  165. package/.next/server/chunks/ssr/{_e17414c3._.js.map → _ff20dbae._.js.map} +1 -1
  166. package/.next/server/chunks/ssr/src_app_credentials_page_tsx_63d8d34a._.js +1 -1
  167. package/.next/server/chunks/ssr/src_app_credentials_page_tsx_63d8d34a._.js.map +1 -1
  168. package/.next/server/chunks/ssr/src_app_git_changes_page_tsx_f6dc28dc._.js +2 -2
  169. package/.next/server/chunks/ssr/src_app_git_changes_page_tsx_f6dc28dc._.js.map +1 -1
  170. package/.next/server/chunks/ssr/src_app_providers_tsx_2ae5be81._.js +1 -1
  171. package/.next/server/chunks/ssr/src_app_providers_tsx_2ae5be81._.js.map +1 -1
  172. package/.next/server/chunks/ssr/src_app_session_[sessionId]_SessionPageClient_tsx_dab490d7._.js +1 -1
  173. package/.next/server/chunks/ssr/src_app_session_[sessionId]_SessionPageClient_tsx_dab490d7._.js.map +1 -1
  174. package/.next/server/chunks/ssr/src_components_GitRepoSelector_tsx_05c81afa._.js +3 -3
  175. package/.next/server/chunks/ssr/src_components_GitRepoSelector_tsx_05c81afa._.js.map +1 -1
  176. package/.next/server/chunks/ssr/src_components_git_029e6e6f._.js +3 -0
  177. package/.next/server/chunks/ssr/src_components_git_029e6e6f._.js.map +1 -0
  178. package/.next/server/chunks/ssr/src_components_git_history-view_tsx_fd62126a._.js +4 -4
  179. package/.next/server/chunks/ssr/src_components_git_history-view_tsx_fd62126a._.js.map +1 -1
  180. package/.next/server/chunks/ssr/src_db5b513b._.js +3 -0
  181. package/.next/server/chunks/ssr/src_db5b513b._.js.map +1 -0
  182. package/.next/server/pages/404.html +2 -2
  183. package/.next/server/pages/500.html +2 -2
  184. package/.next/server/server-reference-manifest.js +1 -1
  185. package/.next/server/server-reference-manifest.json +48 -48
  186. package/.next/static/chunks/{ff0443d5f56a7060.js → 1ca050861ead915f.js} +1 -1
  187. package/.next/static/chunks/1f428267926cd032.js +3 -0
  188. package/.next/static/chunks/4aab1f3ea2ed1aef.js +1 -0
  189. package/.next/static/chunks/4de7bc5a00a1aed9.js +3 -0
  190. package/.next/static/chunks/5e0dada5236f9065.js +8 -0
  191. package/.next/static/chunks/{58e245f27f38e5ff.js → 73c13373731456db.js} +1 -1
  192. package/.next/static/chunks/73f859ef915277c7.js +3 -0
  193. package/.next/static/chunks/74f887e69c1fcefa.js +9 -0
  194. package/.next/static/chunks/977137e155012c13.js +1 -0
  195. package/.next/static/chunks/b18cc1247b979318.js +1 -0
  196. package/.next/static/chunks/d85a06040ea88b62.js +1 -0
  197. package/.next/static/chunks/{bcc203fd591a3e1b.js → db4cb4eb290e3be9.js} +1 -1
  198. package/.next/static/chunks/e5bcfa7f94c34b77.js +1 -0
  199. package/.next/static/chunks/eec24a7b35c2d7bd.css +1 -0
  200. package/.next/static/chunks/{46c9f58659e11b7d.js → fa9e48c3aa7e4365.js} +1 -1
  201. package/README.md +3 -0
  202. package/bin/viba.mjs +120 -4
  203. package/package.json +1 -1
  204. package/.next/server/chunks/[root-of-the-server]__2dcb1454._.js +0 -3
  205. package/.next/server/chunks/[root-of-the-server]__2dcb1454._.js.map +0 -1
  206. package/.next/server/chunks/[root-of-the-server]__5349b858._.js +0 -3
  207. package/.next/server/chunks/[root-of-the-server]__7324fe0b._.js +0 -3
  208. package/.next/server/chunks/[root-of-the-server]__7f2f8f49._.js +0 -3
  209. package/.next/server/chunks/[root-of-the-server]__82d53572._.js +0 -3
  210. package/.next/server/chunks/[root-of-the-server]__afea2116._.js +0 -3
  211. package/.next/server/chunks/[root-of-the-server]__b17e6c62._.js +0 -7
  212. package/.next/server/chunks/[root-of-the-server]__b17e6c62._.js.map +0 -1
  213. package/.next/server/chunks/ssr/[root-of-the-server]__30652385._.js +0 -3
  214. package/.next/server/chunks/ssr/[root-of-the-server]__30652385._.js.map +0 -1
  215. package/.next/server/chunks/ssr/_e17414c3._.js +0 -3
  216. package/.next/server/chunks/ssr/src_hooks_use-workspace-title_ts_9edd343b._.js +0 -3
  217. package/.next/server/chunks/ssr/src_hooks_use-workspace-title_ts_9edd343b._.js.map +0 -1
  218. package/.next/static/chunks/0eca2eff234acf1b.js +0 -1
  219. package/.next/static/chunks/47ad182e478611c4.css +0 -1
  220. package/.next/static/chunks/4b818f2593bc4300.js +0 -1
  221. package/.next/static/chunks/4d93976ea0e8b685.js +0 -9
  222. package/.next/static/chunks/78859d33c5671d29.js +0 -8
  223. package/.next/static/chunks/94fb2462104985a8.js +0 -3
  224. package/.next/static/chunks/9f82d45ee88d5dc1.js +0 -3
  225. package/.next/static/chunks/a29874cab09f6b0f.js +0 -3
  226. package/.next/static/chunks/e152c322e888ccea.js +0 -1
  227. package/.next/static/chunks/fff7986d66d302cf.js +0 -1
  228. /package/.next/static/{mx8z_YoNSm8FluLvondrw → SPowgKQ4GVFmr1hEouu16}/_buildManifest.js +0 -0
  229. /package/.next/static/{mx8z_YoNSm8FluLvondrw → SPowgKQ4GVFmr1hEouu16}/_clientMiddlewareManifest.json +0 -0
  230. /package/.next/static/{mx8z_YoNSm8FluLvondrw → SPowgKQ4GVFmr1hEouu16}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/app/actions/repository.ts","../../../../src/lib/repo-resolver.ts","../../../../src/app/actions/draft.ts","../../../../.next-internal/server/app/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["'use server';\n\nimport fs from 'fs/promises';\nimport os from 'os';\nimport path from 'path';\nimport simpleGit from 'simple-git';\nimport { resolveRepositoryPathByName } from '@/lib/repo-resolver';\nimport { getAllCredentials, getCredentialById, getCredentialToken } from '@/lib/credentials';\nimport type { Credential } from '@/lib/credentials';\nimport { detectGitRemoteProvider, parseGitRemoteHost } from '@/lib/terminal-session';\n\ntype ResolveRepositoryResult = {\n success: boolean;\n repoPath: string | null;\n error?: string;\n};\n\ntype CloneRemoteRepositoryResult = {\n success: boolean;\n repoPath: string | null;\n error?: string;\n};\n\nexport async function resolveRepositoryByName(repoName: string): Promise<ResolveRepositoryResult> {\n try {\n const resolvedPath = await resolveRepositoryPathByName(repoName);\n return {\n success: true,\n repoPath: resolvedPath,\n };\n } catch (error) {\n console.error('Failed to resolve repository by name:', error);\n return {\n success: false,\n repoPath: null,\n error: 'Failed to search repositories. Please try again.',\n };\n }\n}\n\nfunction getGitLabCredentialHost(credential: Credential): string | null {\n if (credential.type !== 'gitlab') return null;\n\n try {\n return new URL(credential.serverUrl).hostname.toLowerCase();\n } catch {\n return null;\n }\n}\n\nfunction pickCandidateCredential(\n credentials: Credential[],\n provider: 'github' | 'gitlab',\n remoteHost: string | null,\n): Credential | null {\n if (provider === 'github') {\n return credentials.find((credential) => credential.type === 'github') || null;\n }\n\n if (remoteHost) {\n const hostMatch = credentials.find((credential) => (\n credential.type === 'gitlab'\n && getGitLabCredentialHost(credential) === remoteHost\n ));\n if (hostMatch) return hostMatch;\n }\n\n return credentials.find((credential) => credential.type === 'gitlab') || null;\n}\n\nfunction getRepoNameFromRemoteUrl(remoteUrl: string): string | null {\n const trimmed = remoteUrl.trim();\n if (!trimmed) return null;\n\n let rawPath = '';\n\n try {\n const parsed = new URL(trimmed);\n rawPath = parsed.pathname;\n } catch {\n const scpLikeMatch = trimmed.match(/^([^@]+@)?([^:]+):(.+)$/);\n if (scpLikeMatch) {\n rawPath = scpLikeMatch[3];\n } else {\n rawPath = trimmed;\n }\n }\n\n const normalized = rawPath.replace(/\\\\/g, '/').replace(/\\/+$/, '');\n if (!normalized) return null;\n\n let baseName = path.posix.basename(normalized);\n if (!baseName || baseName === '.' || baseName === '..') return null;\n\n if (baseName.toLowerCase().endsWith('.git')) {\n baseName = baseName.slice(0, -4);\n }\n\n const sanitized = baseName\n .replace(/[^a-zA-Z0-9._-]/g, '-')\n .replace(/^-+/, '')\n .replace(/-+$/, '');\n\n return sanitized || null;\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction sanitizeErrorMessage(message: string, secretValues: string[]): string {\n let sanitized = message;\n\n for (const value of secretValues) {\n if (!value) continue;\n sanitized = sanitized.replace(new RegExp(escapeRegExp(value), 'g'), '***');\n }\n\n return sanitized.replace(/:\\/\\/[^/\\s@]+@/g, '://***@');\n}\n\nfunction buildAuthenticatedCloneUrl(remoteUrl: string, credential: Credential, token: string): string {\n let parsed: URL;\n try {\n parsed = new URL(remoteUrl);\n } catch {\n return remoteUrl;\n }\n\n if (parsed.protocol !== 'https:' && parsed.protocol !== 'http:') {\n return remoteUrl;\n }\n\n if (credential.type === 'github') {\n parsed.username = 'x-access-token';\n parsed.password = token;\n return parsed.toString();\n }\n\n parsed.username = 'oauth2';\n parsed.password = token;\n return parsed.toString();\n}\n\ntype CloneCredentialResolution =\n | { success: true; credential: Credential | null; token: string | null }\n | { success: false; error: string };\n\nasync function resolveCloneCredential(\n remoteUrl: string,\n credentialId: string | null,\n): Promise<CloneCredentialResolution> {\n const allCredentials = await getAllCredentials();\n const provider = detectGitRemoteProvider(remoteUrl, {\n gitlabHosts: allCredentials.flatMap((credential) => {\n if (credential.type !== 'gitlab') return [];\n const host = getGitLabCredentialHost(credential);\n return host ? [host] : [];\n }),\n });\n const remoteHost = parseGitRemoteHost(remoteUrl);\n\n if (credentialId) {\n const selectedCredential = await getCredentialById(credentialId);\n if (!selectedCredential) {\n return { success: false, error: 'Selected credential was not found. Please choose another credential.' };\n }\n\n if (provider === 'github' && selectedCredential.type !== 'github') {\n return { success: false, error: 'Selected credential does not match this GitHub repository.' };\n }\n if (provider === 'gitlab' && selectedCredential.type !== 'gitlab') {\n return { success: false, error: 'Selected credential does not match this GitLab repository.' };\n }\n\n if (selectedCredential.type === 'gitlab' && remoteHost) {\n const credentialHost = getGitLabCredentialHost(selectedCredential);\n if (credentialHost && credentialHost !== remoteHost) {\n return {\n success: false,\n error: `Selected GitLab credential targets ${credentialHost}, but this repository uses ${remoteHost}.`,\n };\n }\n }\n\n const token = await getCredentialToken(selectedCredential.id);\n if (!token) {\n return { success: false, error: 'Could not load token for selected credential.' };\n }\n\n return { success: true, credential: selectedCredential, token };\n }\n\n if (!provider) {\n return { success: true, credential: null, token: null };\n }\n\n const candidate = pickCandidateCredential(allCredentials, provider, remoteHost);\n if (!candidate) {\n return { success: true, credential: null, token: null };\n }\n\n const token = await getCredentialToken(candidate.id);\n if (!token) {\n return { success: true, credential: null, token: null };\n }\n\n return { success: true, credential: candidate, token };\n}\n\nexport async function cloneRemoteRepository(\n remoteUrl: string,\n credentialId: string | null,\n): Promise<CloneRemoteRepositoryResult> {\n const trimmedRemoteUrl = remoteUrl.trim();\n if (!trimmedRemoteUrl) {\n return { success: false, repoPath: null, error: 'Please enter a remote repository URL.' };\n }\n\n const repoName = getRepoNameFromRemoteUrl(trimmedRemoteUrl);\n if (!repoName) {\n return { success: false, repoPath: null, error: 'Could not determine repository name from URL.' };\n }\n\n const cloneRoot = path.join(os.homedir(), '.viba', 'repos');\n await fs.mkdir(cloneRoot, { recursive: true });\n\n const targetPath = path.join(cloneRoot, repoName);\n try {\n await fs.access(targetPath);\n return {\n success: false,\n repoPath: null,\n error: `Repository already exists at ${targetPath}.`,\n };\n } catch {\n // Path does not exist yet.\n }\n\n const credentialResolution = await resolveCloneCredential(trimmedRemoteUrl, credentialId);\n if (!credentialResolution.success) {\n return { success: false, repoPath: null, error: credentialResolution.error };\n }\n\n const cloneUrl = (credentialResolution.credential && credentialResolution.token)\n ? buildAuthenticatedCloneUrl(trimmedRemoteUrl, credentialResolution.credential, credentialResolution.token)\n : trimmedRemoteUrl;\n\n const git = simpleGit();\n\n try {\n await git.clone(cloneUrl, targetPath);\n\n if (cloneUrl !== trimmedRemoteUrl) {\n const clonedRepoGit = simpleGit(targetPath);\n await clonedRepoGit.remote(['set-url', 'origin', trimmedRemoteUrl]);\n }\n\n return {\n success: true,\n repoPath: targetPath,\n };\n } catch (error) {\n const rawMessage = error instanceof Error ? error.message : String(error);\n const safeMessage = sanitizeErrorMessage(rawMessage, [\n cloneUrl,\n credentialResolution.token ?? '',\n ]);\n\n try {\n await fs.rm(targetPath, { recursive: true, force: true });\n } catch {\n // Ignore cleanup errors.\n }\n\n return {\n success: false,\n repoPath: null,\n error: safeMessage || 'Failed to clone repository.',\n };\n }\n}\n","import fs from 'fs/promises';\nimport type { Dirent } from 'fs';\nimport path from 'path';\nimport { getConfig } from '@/app/actions/config';\n\nconst MAX_SCAN_DEPTH = 5;\nconst MAX_SCANNED_DIRECTORIES = 5000;\nconst RESOLUTION_CACHE_TTL_MS = 5 * 60 * 1000;\nconst SKIPPED_DIR_NAMES = new Set([\n '.git',\n 'node_modules',\n '.next',\n '.viba',\n 'dist',\n 'build',\n 'coverage',\n]);\n\ntype RepoResolutionCacheEntry = {\n repoPath: string;\n resolvedAt: number;\n};\n\ndeclare global {\n var repoResolutionCache: Map<string, RepoResolutionCacheEntry> | undefined;\n}\n\nfunction getResolutionCache(): Map<string, RepoResolutionCacheEntry> {\n if (!global.repoResolutionCache) {\n global.repoResolutionCache = new Map<string, RepoResolutionCacheEntry>();\n }\n return global.repoResolutionCache;\n}\n\nfunction cacheResolution(repoName: string, repoPath: string): void {\n getResolutionCache().set(repoName.toLowerCase(), {\n repoPath,\n resolvedAt: Date.now(),\n });\n}\n\nasync function getValidCachedResolution(repoName: string): Promise<string | null> {\n const entry = getResolutionCache().get(repoName.toLowerCase());\n if (!entry) return null;\n if (Date.now() - entry.resolvedAt > RESOLUTION_CACHE_TTL_MS) {\n getResolutionCache().delete(repoName.toLowerCase());\n return null;\n }\n\n if (await isGitRepository(entry.repoPath)) {\n return entry.repoPath;\n }\n\n getResolutionCache().delete(repoName.toLowerCase());\n return null;\n}\n\nasync function isGitRepository(dirPath: string): Promise<boolean> {\n try {\n await fs.access(path.join(dirPath, '.git'));\n return true;\n } catch {\n return false;\n }\n}\n\nfunction hasMatchingName(repoPath: string, repoName: string): boolean {\n return path.basename(repoPath).toLowerCase() === repoName.toLowerCase();\n}\n\nfunction shouldSkipDirectory(entryName: string, targetName: string): boolean {\n const lowerName = entryName.toLowerCase();\n if (lowerName === targetName) return false;\n if (SKIPPED_DIR_NAMES.has(lowerName)) return true;\n if (entryName.startsWith('.')) return true;\n return false;\n}\n\nasync function findByNameWithinRoot(rootPath: string, repoName: string): Promise<string | null> {\n const directCandidate = path.join(rootPath, repoName);\n if (await isGitRepository(directCandidate)) {\n return directCandidate;\n }\n\n const queue: Array<{ dirPath: string; depth: number }> = [{ dirPath: rootPath, depth: 0 }];\n let scannedCount = 0;\n const targetName = repoName.toLowerCase();\n\n for (let index = 0; index < queue.length; index += 1) {\n const current = queue[index];\n scannedCount += 1;\n if (scannedCount > MAX_SCANNED_DIRECTORIES) {\n break;\n }\n\n let entries: Dirent[];\n try {\n entries = await fs.readdir(current.dirPath, { withFileTypes: true });\n } catch {\n continue;\n }\n\n for (const entry of entries) {\n if (!entry.isDirectory()) continue;\n if (shouldSkipDirectory(entry.name, targetName)) continue;\n\n const nextDirPath = path.join(current.dirPath, entry.name);\n\n if (entry.name.toLowerCase() === targetName && await isGitRepository(nextDirPath)) {\n return nextDirPath;\n }\n\n if (current.depth + 1 <= MAX_SCAN_DEPTH) {\n queue.push({ dirPath: nextDirPath, depth: current.depth + 1 });\n }\n }\n }\n\n return null;\n}\n\nexport async function resolveRepositoryPathByName(repoName: string): Promise<string | null> {\n const trimmedName = repoName.trim();\n if (!trimmedName) return null;\n\n const cachedResolution = await getValidCachedResolution(trimmedName);\n if (cachedResolution) {\n return cachedResolution;\n }\n\n const config = await getConfig();\n\n const recentMatches = config.recentRepos.filter((repoPath) => hasMatchingName(repoPath, trimmedName));\n for (const repoPath of recentMatches) {\n if (await isGitRepository(repoPath)) {\n cacheResolution(trimmedName, repoPath);\n return repoPath;\n }\n }\n\n const searchRoots: string[] = [];\n const visitedRoots = new Set<string>();\n for (const repoPath of config.recentRepos) {\n const parentPath = path.dirname(repoPath);\n if (!visitedRoots.has(parentPath)) {\n visitedRoots.add(parentPath);\n searchRoots.push(parentPath);\n }\n }\n if (config.defaultRoot && !visitedRoots.has(config.defaultRoot)) {\n visitedRoots.add(config.defaultRoot);\n searchRoots.push(config.defaultRoot);\n }\n\n for (const rootPath of searchRoots) {\n const resolvedPath = await findByNameWithinRoot(rootPath, trimmedName);\n if (resolvedPath) {\n cacheResolution(trimmedName, resolvedPath);\n return resolvedPath;\n }\n }\n\n return null;\n}\n","'use server';\n\nimport fs from 'fs/promises';\nimport path from 'path';\nimport os from 'os';\n\nexport type DraftMetadata = {\n id: string;\n repoPath: string;\n branchName: string;\n message: string;\n attachmentPaths: string[];\n agentProvider: string;\n model: string;\n timestamp: string;\n title: string;\n startupScript: string;\n devServerScript: string;\n sessionMode: 'fast' | 'plan';\n};\n\nasync function getDraftsDir(): Promise<string> {\n const homedir = os.homedir();\n const draftsDir = path.join(homedir, '.viba', 'drafts');\n try {\n await fs.mkdir(draftsDir, { recursive: true });\n } catch {\n // Ignore if exists\n }\n return draftsDir;\n}\n\nexport async function saveDraft(draft: DraftMetadata): Promise<{ success: boolean; error?: string }> {\n try {\n const draftsDir = await getDraftsDir();\n const safeId = path.basename(draft.id);\n const filePath = path.join(draftsDir, `${safeId}.json`);\n await fs.writeFile(filePath, JSON.stringify(draft, null, 2), 'utf-8');\n return { success: true };\n } catch (e) {\n console.error('Failed to save draft:', e);\n return { success: false, error: 'Failed to save draft' };\n }\n}\n\nexport async function listDrafts(repoPath?: string): Promise<DraftMetadata[]> {\n try {\n const draftsDir = await getDraftsDir();\n const entries = await fs.readdir(draftsDir);\n\n const draftPromises = entries\n .filter((entry) => entry.endsWith('.json'))\n .map(async (entry) => {\n try {\n const filePath = path.join(draftsDir, entry);\n const content = await fs.readFile(filePath, 'utf-8');\n return JSON.parse(content) as DraftMetadata;\n } catch (e) {\n console.error(`Failed to parse draft file ${entry}:`, e);\n return null;\n }\n });\n\n const drafts = (await Promise.all(draftPromises)).filter((d): d is DraftMetadata => d !== null);\n\n if (repoPath) {\n return drafts.filter((d) => d.repoPath === repoPath).sort((a, b) => b.timestamp.localeCompare(a.timestamp));\n }\n\n return drafts.sort((a, b) => b.timestamp.localeCompare(a.timestamp));\n } catch (e: any) {\n if (e.code === 'ENOENT') {\n return [];\n }\n console.error('Failed to list drafts:', e);\n return [];\n }\n}\n\nexport async function deleteDraft(id: string): Promise<{ success: boolean; error?: string }> {\n try {\n const draftsDir = await getDraftsDir();\n const safeId = path.basename(id);\n const filePath = path.join(draftsDir, `${safeId}.json`);\n await fs.rm(filePath, { force: true });\n return { success: true };\n } catch (e) {\n console.error('Failed to delete draft:', e);\n return { success: false, error: 'Failed to delete draft' };\n }\n}\n","export {checkDirectoryAccessible as '402c59a757ee26cd5b6333d926910162bae2289139'} from 'ACTIONS_MODULE0'\nexport {listDirectories as '40a5e24f6e280925fbc5dfc520b7c380871d373dd4'} from 'ACTIONS_MODULE0'\nexport {getHomeDirectory as '007d90dd1f07569d7a2aae4c796aed2c03e4694188'} from 'ACTIONS_MODULE0'\nexport {checkIsGitRepo as '40e7dfe25f9f0da1741852cf9137e6da99ab049e82'} from 'ACTIONS_MODULE0'\nexport {getBranches as '4069ff2ff3d5aee19975244970239f292a8c0ef8de'} from 'ACTIONS_MODULE0'\nexport {checkoutBranch as '6066891bcab85bb2f4db9c126afdcc8f7d7bf9e671'} from 'ACTIONS_MODULE0'\nexport {startTtydProcess as '7fe46f64af5aab56d1a28bffcaa2fe27dceb1be94d'} from 'ACTIONS_MODULE0'\nexport {getStartupScript as '7ff3960b4c70fefca8c3019702193765dcf853fb0e'} from 'ACTIONS_MODULE0'\nexport {getDefaultDevServerScript as '7f95b01caed7f9e17d19b04dd1aebe9ffdc28d994e'} from 'ACTIONS_MODULE0'\nexport {listRepoFiles as '7f562b2d529316393195741e7bcfd0b62d6eaa1725'} from 'ACTIONS_MODULE0'\nexport {checkAgentCliInstalled as '40228ca9cf9057df131ed69114d7b55dcd698cad5f'} from 'ACTIONS_MODULE0'\nexport {installAgentCli as '40678e1105030fe091fb7efdb7818b5a553469f3b2'} from 'ACTIONS_MODULE0'\nexport {cloneRemoteRepository as '60fbf2fb04f332edcee6563c44f2fef7b415243471'} from 'ACTIONS_MODULE1'\nexport {resolveRepositoryByName as '406e55689bd4d60b7bef008dfcc9415ff917b2413f'} from 'ACTIONS_MODULE1'\nexport {createSession as '700e352ecc485fe721e4fb0bed02a8d4164d9e24cb'} from 'ACTIONS_MODULE2'\nexport {deleteSession as '40d1a1b9e44f81a0f1d8db707ada31607fa8d48e16'} from 'ACTIONS_MODULE2'\nexport {getSessionPrefillContext as '40ee6b9acab660ba2044c1691d4c83a24cd970c769'} from 'ACTIONS_MODULE2'\nexport {listSessions as '40951eae6d84986ca79cba89568e8a837c2918ec45'} from 'ACTIONS_MODULE2'\nexport {saveSessionLaunchContext as '60281d6697ea4b6f123840e8983a85369c3d08ec6c'} from 'ACTIONS_MODULE2'\nexport {deleteDraft as '40bdd2f8c1c344918cb4a14b7f95e9f9ace09bcd59'} from 'ACTIONS_MODULE3'\nexport {listDrafts as '40d40f52a81fb0ea27467e8134fa601de8a89b4d05'} from 'ACTIONS_MODULE3'\nexport {saveDraft as '405e87466910bb2d5eff3ce247e90fa9cb23615c76'} from 'ACTIONS_MODULE3'\nexport {getConfig as '00bac238160f6cbb4f2ca4739ca6a585935b48f718'} from 'ACTIONS_MODULE4'\nexport {updateConfig as '402efc1bee344cf0f115f1f55563f38d8d9b6f299d'} from 'ACTIONS_MODULE4'\nexport {updateRepoSettings as '60e7cd74eaea66a45846e06028f77dbf85d91b19e1'} from 'ACTIONS_MODULE4'\nexport {listAgentApiCredentials as '006b7a10f839b3ad9a8e3cb7090a78f9691c43c62f'} from 'ACTIONS_MODULE5'\nexport {listCredentials as '008c06297149d94056cb210d81ed9e5e14c82c759a'} from 'ACTIONS_MODULE5'\nexport {listPathEntries as '406deb432559c7ce9c05f3125d7916008c54ad22b7'} from 'ACTIONS_MODULE0'\nexport {saveAttachments as '7f27639e2b4f526e35765066b84359d7e4c45c216e'} from 'ACTIONS_MODULE0'\n"],"names":[],"mappings":"klBAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MCFA,EAAA,EAAA,CAAA,CAAA,OAKA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MAAO,EAAG,CAEV,OADA,QAAQ,KAAK,CAAC,0BAA2B,GAClC,CAAE,SAAS,EAAO,MAAO,wBAAyB,CAC3D,CACF,iCFnEsB,EA2LA,IA3LA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MA2LA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,iHElLA,EAaA,EAkCA,IA/CA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MAaA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MAkCA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,oGC/EtB,IAAA,EAAA,EAAA,CAAA,CAAA,OAYA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OAKA,EAAA,EAAA,CAAA,CAAA,OAGA,EAAA,EAAA,CAAA,CAAA,OAGA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"sources":["../../../../src/app/actions/repository.ts","../../../../src/lib/repo-resolver.ts","../../../../src/app/actions/draft.ts","../../../../.next-internal/server/app/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["'use server';\n\nimport fs from 'fs/promises';\nimport os from 'os';\nimport path from 'path';\nimport simpleGit from 'simple-git';\nimport { resolveRepositoryPathByName } from '@/lib/repo-resolver';\nimport { getAllCredentials, getCredentialById, getCredentialToken } from '@/lib/credentials';\nimport type { Credential } from '@/lib/credentials';\nimport { detectGitRemoteProvider, parseGitRemoteHost } from '@/lib/terminal-session';\n\ntype ResolveRepositoryResult = {\n success: boolean;\n repoPath: string | null;\n error?: string;\n};\n\ntype CloneRemoteRepositoryResult = {\n success: boolean;\n repoPath: string | null;\n error?: string;\n};\n\nexport async function resolveRepositoryByName(repoName: string): Promise<ResolveRepositoryResult> {\n try {\n const resolvedPath = await resolveRepositoryPathByName(repoName);\n return {\n success: true,\n repoPath: resolvedPath,\n };\n } catch (error) {\n console.error('Failed to resolve repository by name:', error);\n return {\n success: false,\n repoPath: null,\n error: 'Failed to search repositories. Please try again.',\n };\n }\n}\n\nfunction getGitLabCredentialHost(credential: Credential): string | null {\n if (credential.type !== 'gitlab') return null;\n\n try {\n return new URL(credential.serverUrl).hostname.toLowerCase();\n } catch {\n return null;\n }\n}\n\nfunction pickCandidateCredential(\n credentials: Credential[],\n provider: 'github' | 'gitlab',\n remoteHost: string | null,\n): Credential | null {\n if (provider === 'github') {\n return credentials.find((credential) => credential.type === 'github') || null;\n }\n\n if (remoteHost) {\n const hostMatch = credentials.find((credential) => (\n credential.type === 'gitlab'\n && getGitLabCredentialHost(credential) === remoteHost\n ));\n if (hostMatch) return hostMatch;\n }\n\n return credentials.find((credential) => credential.type === 'gitlab') || null;\n}\n\nfunction getRepoNameFromRemoteUrl(remoteUrl: string): string | null {\n const trimmed = remoteUrl.trim();\n if (!trimmed) return null;\n\n let rawPath = '';\n\n try {\n const parsed = new URL(trimmed);\n rawPath = parsed.pathname;\n } catch {\n const scpLikeMatch = trimmed.match(/^([^@]+@)?([^:]+):(.+)$/);\n if (scpLikeMatch) {\n rawPath = scpLikeMatch[3];\n } else {\n rawPath = trimmed;\n }\n }\n\n const normalized = rawPath.replace(/\\\\/g, '/').replace(/\\/+$/, '');\n if (!normalized) return null;\n\n let baseName = path.posix.basename(normalized);\n if (!baseName || baseName === '.' || baseName === '..') return null;\n\n if (baseName.toLowerCase().endsWith('.git')) {\n baseName = baseName.slice(0, -4);\n }\n\n const sanitized = baseName\n .replace(/[^a-zA-Z0-9._-]/g, '-')\n .replace(/^-+/, '')\n .replace(/-+$/, '');\n\n return sanitized || null;\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction sanitizeErrorMessage(message: string, secretValues: string[]): string {\n let sanitized = message;\n\n for (const value of secretValues) {\n if (!value) continue;\n sanitized = sanitized.replace(new RegExp(escapeRegExp(value), 'g'), '***');\n }\n\n return sanitized.replace(/:\\/\\/[^/\\s@]+@/g, '://***@');\n}\n\nfunction buildAuthenticatedCloneUrl(remoteUrl: string, credential: Credential, token: string): string {\n let parsed: URL;\n try {\n parsed = new URL(remoteUrl);\n } catch {\n return remoteUrl;\n }\n\n if (parsed.protocol !== 'https:' && parsed.protocol !== 'http:') {\n return remoteUrl;\n }\n\n if (credential.type === 'github') {\n parsed.username = 'x-access-token';\n parsed.password = token;\n return parsed.toString();\n }\n\n parsed.username = 'oauth2';\n parsed.password = token;\n return parsed.toString();\n}\n\ntype CloneCredentialResolution =\n | { success: true; credential: Credential | null; token: string | null }\n | { success: false; error: string };\n\nasync function resolveCloneCredential(\n remoteUrl: string,\n credentialId: string | null,\n): Promise<CloneCredentialResolution> {\n const allCredentials = await getAllCredentials();\n const provider = detectGitRemoteProvider(remoteUrl, {\n gitlabHosts: allCredentials.flatMap((credential) => {\n if (credential.type !== 'gitlab') return [];\n const host = getGitLabCredentialHost(credential);\n return host ? [host] : [];\n }),\n });\n const remoteHost = parseGitRemoteHost(remoteUrl);\n\n if (credentialId) {\n const selectedCredential = await getCredentialById(credentialId);\n if (!selectedCredential) {\n return { success: false, error: 'Selected credential was not found. Please choose another credential.' };\n }\n\n if (provider === 'github' && selectedCredential.type !== 'github') {\n return { success: false, error: 'Selected credential does not match this GitHub repository.' };\n }\n if (provider === 'gitlab' && selectedCredential.type !== 'gitlab') {\n return { success: false, error: 'Selected credential does not match this GitLab repository.' };\n }\n\n if (selectedCredential.type === 'gitlab' && remoteHost) {\n const credentialHost = getGitLabCredentialHost(selectedCredential);\n if (credentialHost && credentialHost !== remoteHost) {\n return {\n success: false,\n error: `Selected GitLab credential targets ${credentialHost}, but this repository uses ${remoteHost}.`,\n };\n }\n }\n\n const token = await getCredentialToken(selectedCredential.id);\n if (!token) {\n return { success: false, error: 'Could not load token for selected credential.' };\n }\n\n return { success: true, credential: selectedCredential, token };\n }\n\n if (!provider) {\n return { success: true, credential: null, token: null };\n }\n\n const candidate = pickCandidateCredential(allCredentials, provider, remoteHost);\n if (!candidate) {\n return { success: true, credential: null, token: null };\n }\n\n const token = await getCredentialToken(candidate.id);\n if (!token) {\n return { success: true, credential: null, token: null };\n }\n\n return { success: true, credential: candidate, token };\n}\n\nexport async function cloneRemoteRepository(\n remoteUrl: string,\n credentialId: string | null,\n): Promise<CloneRemoteRepositoryResult> {\n const trimmedRemoteUrl = remoteUrl.trim();\n if (!trimmedRemoteUrl) {\n return { success: false, repoPath: null, error: 'Please enter a remote repository URL.' };\n }\n\n const repoName = getRepoNameFromRemoteUrl(trimmedRemoteUrl);\n if (!repoName) {\n return { success: false, repoPath: null, error: 'Could not determine repository name from URL.' };\n }\n\n const cloneRoot = path.join(os.homedir(), '.viba', 'repos');\n await fs.mkdir(cloneRoot, { recursive: true });\n\n const targetPath = path.join(cloneRoot, repoName);\n try {\n await fs.access(targetPath);\n return {\n success: false,\n repoPath: null,\n error: `Repository already exists at ${targetPath}.`,\n };\n } catch {\n // Path does not exist yet.\n }\n\n const credentialResolution = await resolveCloneCredential(trimmedRemoteUrl, credentialId);\n if (!credentialResolution.success) {\n return { success: false, repoPath: null, error: credentialResolution.error };\n }\n\n const cloneUrl = (credentialResolution.credential && credentialResolution.token)\n ? buildAuthenticatedCloneUrl(trimmedRemoteUrl, credentialResolution.credential, credentialResolution.token)\n : trimmedRemoteUrl;\n\n const git = simpleGit();\n\n try {\n await git.clone(cloneUrl, targetPath);\n\n if (cloneUrl !== trimmedRemoteUrl) {\n const clonedRepoGit = simpleGit(targetPath);\n await clonedRepoGit.remote(['set-url', 'origin', trimmedRemoteUrl]);\n }\n\n return {\n success: true,\n repoPath: targetPath,\n };\n } catch (error) {\n const rawMessage = error instanceof Error ? error.message : String(error);\n const safeMessage = sanitizeErrorMessage(rawMessage, [\n cloneUrl,\n credentialResolution.token ?? '',\n ]);\n\n try {\n await fs.rm(targetPath, { recursive: true, force: true });\n } catch {\n // Ignore cleanup errors.\n }\n\n return {\n success: false,\n repoPath: null,\n error: safeMessage || 'Failed to clone repository.',\n };\n }\n}\n","import fs from 'fs/promises';\nimport type { Dirent } from 'fs';\nimport path from 'path';\nimport { getConfig } from '@/app/actions/config';\n\nconst MAX_SCAN_DEPTH = 5;\nconst MAX_SCANNED_DIRECTORIES = 5000;\nconst RESOLUTION_CACHE_TTL_MS = 5 * 60 * 1000;\nconst SKIPPED_DIR_NAMES = new Set([\n '.git',\n 'node_modules',\n '.next',\n '.viba',\n 'dist',\n 'build',\n 'coverage',\n]);\n\ntype RepoResolutionCacheEntry = {\n repoPath: string;\n resolvedAt: number;\n};\n\ndeclare global {\n var repoResolutionCache: Map<string, RepoResolutionCacheEntry> | undefined;\n}\n\nfunction getResolutionCache(): Map<string, RepoResolutionCacheEntry> {\n if (!global.repoResolutionCache) {\n global.repoResolutionCache = new Map<string, RepoResolutionCacheEntry>();\n }\n return global.repoResolutionCache;\n}\n\nfunction cacheResolution(repoName: string, repoPath: string): void {\n getResolutionCache().set(repoName.toLowerCase(), {\n repoPath,\n resolvedAt: Date.now(),\n });\n}\n\nasync function getValidCachedResolution(repoName: string): Promise<string | null> {\n const entry = getResolutionCache().get(repoName.toLowerCase());\n if (!entry) return null;\n if (Date.now() - entry.resolvedAt > RESOLUTION_CACHE_TTL_MS) {\n getResolutionCache().delete(repoName.toLowerCase());\n return null;\n }\n\n if (await isGitRepository(entry.repoPath)) {\n return entry.repoPath;\n }\n\n getResolutionCache().delete(repoName.toLowerCase());\n return null;\n}\n\nasync function isGitRepository(dirPath: string): Promise<boolean> {\n try {\n await fs.access(path.join(dirPath, '.git'));\n return true;\n } catch {\n return false;\n }\n}\n\nfunction hasMatchingName(repoPath: string, repoName: string): boolean {\n return path.basename(repoPath).toLowerCase() === repoName.toLowerCase();\n}\n\nfunction shouldSkipDirectory(entryName: string, targetName: string): boolean {\n const lowerName = entryName.toLowerCase();\n if (lowerName === targetName) return false;\n if (SKIPPED_DIR_NAMES.has(lowerName)) return true;\n if (entryName.startsWith('.')) return true;\n return false;\n}\n\nasync function findByNameWithinRoot(rootPath: string, repoName: string): Promise<string | null> {\n const directCandidate = path.join(rootPath, repoName);\n if (await isGitRepository(directCandidate)) {\n return directCandidate;\n }\n\n const queue: Array<{ dirPath: string; depth: number }> = [{ dirPath: rootPath, depth: 0 }];\n let scannedCount = 0;\n const targetName = repoName.toLowerCase();\n\n for (let index = 0; index < queue.length; index += 1) {\n const current = queue[index];\n scannedCount += 1;\n if (scannedCount > MAX_SCANNED_DIRECTORIES) {\n break;\n }\n\n let entries: Dirent[];\n try {\n entries = await fs.readdir(current.dirPath, { withFileTypes: true });\n } catch {\n continue;\n }\n\n for (const entry of entries) {\n if (!entry.isDirectory()) continue;\n if (shouldSkipDirectory(entry.name, targetName)) continue;\n\n const nextDirPath = path.join(current.dirPath, entry.name);\n\n if (entry.name.toLowerCase() === targetName && await isGitRepository(nextDirPath)) {\n return nextDirPath;\n }\n\n if (current.depth + 1 <= MAX_SCAN_DEPTH) {\n queue.push({ dirPath: nextDirPath, depth: current.depth + 1 });\n }\n }\n }\n\n return null;\n}\n\nexport async function resolveRepositoryPathByName(repoName: string): Promise<string | null> {\n const trimmedName = repoName.trim();\n if (!trimmedName) return null;\n\n const cachedResolution = await getValidCachedResolution(trimmedName);\n if (cachedResolution) {\n return cachedResolution;\n }\n\n const config = await getConfig();\n\n const recentMatches = config.recentRepos.filter((repoPath) => hasMatchingName(repoPath, trimmedName));\n for (const repoPath of recentMatches) {\n if (await isGitRepository(repoPath)) {\n cacheResolution(trimmedName, repoPath);\n return repoPath;\n }\n }\n\n const searchRoots: string[] = [];\n const visitedRoots = new Set<string>();\n for (const repoPath of config.recentRepos) {\n const parentPath = path.dirname(repoPath);\n if (!visitedRoots.has(parentPath)) {\n visitedRoots.add(parentPath);\n searchRoots.push(parentPath);\n }\n }\n if (config.defaultRoot && !visitedRoots.has(config.defaultRoot)) {\n visitedRoots.add(config.defaultRoot);\n searchRoots.push(config.defaultRoot);\n }\n\n for (const rootPath of searchRoots) {\n const resolvedPath = await findByNameWithinRoot(rootPath, trimmedName);\n if (resolvedPath) {\n cacheResolution(trimmedName, resolvedPath);\n return resolvedPath;\n }\n }\n\n return null;\n}\n","'use server';\n\nimport fs from 'fs/promises';\nimport path from 'path';\nimport os from 'os';\n\nexport type DraftMetadata = {\n id: string;\n repoPath: string;\n branchName: string;\n message: string;\n attachmentPaths: string[];\n agentProvider: string;\n model: string;\n timestamp: string;\n title: string;\n startupScript: string;\n devServerScript: string;\n sessionMode: 'fast' | 'plan';\n};\n\nasync function getDraftsDir(): Promise<string> {\n const homedir = os.homedir();\n const draftsDir = path.join(homedir, '.viba', 'drafts');\n try {\n await fs.mkdir(draftsDir, { recursive: true });\n } catch {\n // Ignore if exists\n }\n return draftsDir;\n}\n\nexport async function saveDraft(draft: DraftMetadata): Promise<{ success: boolean; error?: string }> {\n try {\n const draftsDir = await getDraftsDir();\n const safeId = path.basename(draft.id);\n const filePath = path.join(draftsDir, `${safeId}.json`);\n await fs.writeFile(filePath, JSON.stringify(draft, null, 2), 'utf-8');\n return { success: true };\n } catch (e) {\n console.error('Failed to save draft:', e);\n return { success: false, error: 'Failed to save draft' };\n }\n}\n\nexport async function listDrafts(repoPath?: string): Promise<DraftMetadata[]> {\n try {\n const draftsDir = await getDraftsDir();\n const entries = await fs.readdir(draftsDir);\n\n const draftPromises = entries\n .filter((entry) => entry.endsWith('.json'))\n .map(async (entry) => {\n try {\n const filePath = path.join(draftsDir, entry);\n const content = await fs.readFile(filePath, 'utf-8');\n return JSON.parse(content) as DraftMetadata;\n } catch (e) {\n console.error(`Failed to parse draft file ${entry}:`, e);\n return null;\n }\n });\n\n const drafts = (await Promise.all(draftPromises)).filter((d): d is DraftMetadata => d !== null);\n\n if (repoPath) {\n return drafts.filter((d) => d.repoPath === repoPath).sort((a, b) => b.timestamp.localeCompare(a.timestamp));\n }\n\n return drafts.sort((a, b) => b.timestamp.localeCompare(a.timestamp));\n } catch (e: any) {\n if (e.code === 'ENOENT') {\n return [];\n }\n console.error('Failed to list drafts:', e);\n return [];\n }\n}\n\nexport async function deleteDraft(id: string): Promise<{ success: boolean; error?: string }> {\n try {\n const draftsDir = await getDraftsDir();\n const safeId = path.basename(id);\n const filePath = path.join(draftsDir, `${safeId}.json`);\n await fs.rm(filePath, { force: true });\n return { success: true };\n } catch (e) {\n console.error('Failed to delete draft:', e);\n return { success: false, error: 'Failed to delete draft' };\n }\n}\n","export {checkDirectoryAccessible as '4000b972582455e64c1ab00abe5f79db0789385cae'} from 'ACTIONS_MODULE0'\nexport {listDirectories as '40bcb98d167ff02ebab0a4e5bd4ddf2ecdf1f61b80'} from 'ACTIONS_MODULE0'\nexport {getHomeDirectory as '00c42c62027b5d02c596fe16ee30d5783683fcde57'} from 'ACTIONS_MODULE0'\nexport {checkIsGitRepo as '407ceb272444008516d5f4d59070827b023d1bfccb'} from 'ACTIONS_MODULE0'\nexport {getBranches as '40840d7347bea9b4c4ee1b05b18ef8bb70a8d61c94'} from 'ACTIONS_MODULE0'\nexport {checkoutBranch as '60014bab1edd0396e44ce41ee05410733e78a9e289'} from 'ACTIONS_MODULE0'\nexport {startTtydProcess as '7f6a24d6dbde9f9a254586e16aca851717e4e475f0'} from 'ACTIONS_MODULE0'\nexport {getStartupScript as '7f297b257751e7e19f85ea91b0cef70d46d19533d5'} from 'ACTIONS_MODULE0'\nexport {getDefaultDevServerScript as '7f1b374fdd8af2a813d5c697cc2795318c69ef2f21'} from 'ACTIONS_MODULE0'\nexport {listRepoFiles as '7f4d4efe031b5e6237c2104da524b911956ea41afe'} from 'ACTIONS_MODULE0'\nexport {checkAgentCliInstalled as '40759173325b9646ec5624f13388be061ee645114b'} from 'ACTIONS_MODULE0'\nexport {installAgentCli as '402cc9f24e2f01d3cf38b84bce06380a2c8324bf72'} from 'ACTIONS_MODULE0'\nexport {cloneRemoteRepository as '60370cbf08c36feb62e821a4399d1a0c168e16068f'} from 'ACTIONS_MODULE1'\nexport {resolveRepositoryByName as '4056c2d421a6496afc541c171fc8c5f07896f63d9d'} from 'ACTIONS_MODULE1'\nexport {createSession as '70b02a987fc1397aca7320ded1dcc15e452f2897ea'} from 'ACTIONS_MODULE2'\nexport {deleteSession as '40359a46ff3adb05f98426e1a48aedde438fecf99b'} from 'ACTIONS_MODULE2'\nexport {getSessionPrefillContext as '40da6c6fcb5ba59241703ecbdccba707c6ed39c527'} from 'ACTIONS_MODULE2'\nexport {listSessions as '40634628ed9cb943f76f6b561a346b4ae6ba9335e3'} from 'ACTIONS_MODULE2'\nexport {saveSessionLaunchContext as '6039f2db2aff8d97e5fdf12e537278157cb2e4abf9'} from 'ACTIONS_MODULE2'\nexport {deleteDraft as '40becbae10bf62199024bd208e66b7a8154f9348d8'} from 'ACTIONS_MODULE3'\nexport {listDrafts as '405d04a3fc97df7ce43071e3a04c76b03549d8239d'} from 'ACTIONS_MODULE3'\nexport {saveDraft as '40679547d387756c417d2d2f35102b698e0a67d687'} from 'ACTIONS_MODULE3'\nexport {getConfig as '001b894791a4b6460f5e7976aa47184bc45cccd1ca'} from 'ACTIONS_MODULE4'\nexport {updateConfig as '404b0c3413351a0ceb0c2edd4cfcd6095605249ea1'} from 'ACTIONS_MODULE4'\nexport {updateRepoSettings as '60e267f5fdf59cea403233b78e9c9539fb282154c6'} from 'ACTIONS_MODULE4'\nexport {listAgentApiCredentials as '007854b56845eeafde2c9685b51a376a63b707aad1'} from 'ACTIONS_MODULE5'\nexport {listCredentials as '0037e57dce0e01173d262d9f2abbeeda52df8d7e4f'} from 'ACTIONS_MODULE5'\nexport {listPathEntries as '402089b844ceae2b51bfc1d67e27ed1deb33b9f2ed'} from 'ACTIONS_MODULE0'\nexport {saveAttachments as '7fe6396fcd9d2af4d2846c10ca24c789d2bf63c57d'} from 'ACTIONS_MODULE0'\n"],"names":[],"mappings":"klBAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MCFA,EAAA,EAAA,CAAA,CAAA,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AAE,MAAO,EAAG,CAEV,OADA,QAAQ,KAAK,CAAC,0BAA2B,GAClC,CAAE,SAAS,EAAO,MAAO,wBAAyB,CAC3D,CACF,iCFnEsB,EA2LA,IA3LA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MA2LA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,iHElLA,EAaA,EAkCA,IA/CA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MAaA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,MAkCA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,oGC/EtB,IAAA,EAAA,EAAA,CAAA,CAAA,OAYA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OAKA,EAAA,EAAA,CAAA,CAAA,OAGA,EAAA,EAAA,CAAA,CAAA,OAGA,EAAA,EAAA,CAAA,CAAA"}
@@ -0,0 +1,3 @@
1
+ module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},95044,a=>{a.n(a.i(52425))},26087,a=>{a.n(a.i(21646))},50645,a=>{a.n(a.i(27572))},43619,a=>{a.n(a.i(79962))},13718,a=>{a.n(a.i(85523))},18198,a=>{a.n(a.i(45518))},62212,a=>{a.n(a.i(66114))},85684,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/components/GitRepoSelector.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/GitRepoSelector.tsx <module evaluation>","default")},63406,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/components/GitRepoSelector.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/GitRepoSelector.tsx","default")},31557,a=>{"use strict";a.i(85684);var b=a.i(63406);a.n(b)},90005,a=>{"use strict";var b=a.i(7997),c=a.i(31557),d=a.i(12714),e=a.i(50227);let f=[{id:"design",label:"Design",fileName:"design.md"},{id:"performance",label:"Performance",fileName:"performance.md"},{id:"security",label:"Security",fileName:"security.md"}];async function g(){let a=e.default.join(process.cwd(),"docs/prompts/jules"),b=await Promise.all(f.map(async({id:b,label:c,fileName:f})=>{try{let g=(await (0,d.readFile)(e.default.join(a,f),"utf8")).trim();if(!g)return null;return{id:b,label:c,content:g}}catch(a){return console.error(`Failed to load predefined prompt: ${f}`,a),null}})),c=[];for(let a of b)a&&c.push(a);return c}async function h({searchParams:a}){let d=await a,e=await g(),f=d.repo,h=d.from,i=d.prefillFromSession,j=Array.isArray(f)?f[0]:f,k=Array.isArray(h)?h[0]:h,l=Array.isArray(i)?i[0]:i;return(0,b.jsx)("main",{className:"flex min-h-screen flex-col items-center bg-[#f6f6f8] p-4 md:p-8 dark:bg-[#0d1117]",children:(0,b.jsx)(c.default,{mode:"new",repoPath:j??null,fromRepoName:k??null,prefillFromSession:l??null,predefinedPrompts:e})})}a.s(["default",()=>h])}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__d52659cf._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/GitRepoSelector.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/new/page.tsx"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/src/components/GitRepoSelector.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/components/GitRepoSelector.tsx\",\n \"default\",\n);\n","import GitRepoSelector from '@/components/GitRepoSelector';\nimport { readFile } from 'node:fs/promises';\nimport path from 'node:path';\n\ntype PredefinedPrompt = {\n id: string;\n label: string;\n content: string;\n};\n\nconst PREDEFINED_PROMPT_CONFIG = [\n { id: 'design', label: 'Design', fileName: 'design.md' },\n { id: 'performance', label: 'Performance', fileName: 'performance.md' },\n { id: 'security', label: 'Security', fileName: 'security.md' },\n] as const;\n\nasync function loadJulesPredefinedPrompts(): Promise<PredefinedPrompt[]> {\n const promptDirectory = path.join(process.cwd(), 'docs/prompts/jules');\n\n const prompts = await Promise.all(\n PREDEFINED_PROMPT_CONFIG.map(async ({ id, label, fileName }) => {\n try {\n const content = (await readFile(path.join(promptDirectory, fileName), 'utf8')).trim();\n if (!content) return null;\n return { id, label, content };\n } catch (error) {\n console.error(`Failed to load predefined prompt: ${fileName}`, error);\n return null;\n }\n }),\n );\n\n const availablePrompts: PredefinedPrompt[] = [];\n for (const prompt of prompts) {\n if (prompt) {\n availablePrompts.push(prompt);\n }\n }\n\n return availablePrompts;\n}\n\ntype NewSessionPageProps = {\n searchParams: Promise<{\n repo?: string | string[];\n from?: string | string[];\n prefillFromSession?: string | string[];\n }>;\n};\n\nexport default async function NewSessionPage({ searchParams }: NewSessionPageProps) {\n const params = await searchParams;\n const predefinedPrompts = await loadJulesPredefinedPrompts();\n const repoParam = params.repo;\n const fromParam = params.from;\n const prefillParam = params.prefillFromSession;\n const repoPathFromParam = Array.isArray(repoParam) ? repoParam[0] : repoParam;\n const fromName = Array.isArray(fromParam) ? fromParam[0] : fromParam;\n const prefillFromSession = Array.isArray(prefillParam) ? prefillParam[0] : prefillParam;\n const repoPath = repoPathFromParam;\n\n return (\n <main className=\"flex min-h-screen flex-col items-center bg-[#f6f6f8] p-4 md:p-8 dark:bg-[#0d1117]\">\n <GitRepoSelector\n mode=\"new\"\n repoPath={repoPath ?? null}\n fromRepoName={fromName ?? null}\n prefillFromSession={prefillFromSession ?? null}\n predefinedPrompts={predefinedPrompts}\n />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AI,CACvB,EAAY,EAAO,IAAI,CACvB,EAAe,EAAO,kBAAkB,CACxC,EAAoB,MAAM,OAAO,CAAC,GAAa,CAAS,CAAC,EAAE,CAAG,EAC9D,EAAW,MAAM,OAAO,CAAC,GAAa,CAAS,CAAC,EAAE,CAAG,EACrD,EAAqB,MAAM,OAAO,CAAC,GAAgB,CAAY,CAAC,EAAE,CAAG,EAG3E,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,6FACd,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAe,CAAA,CACd,KAAK,MACL,SANW,AAMD,GAAY,KACtB,aAAc,GAAY,KAC1B,mBAAoB,GAAsB,KAC1C,kBAAmB,KAI3B","ignoreList":[0]}
@@ -1,3 +1,3 @@
1
- module.exports=[38783,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactServerDOMTurbopackClient},35112,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactDOM},88347,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d,e={ACTION_HMR_REFRESH:function(){return k},ACTION_NAVIGATE:function(){return h},ACTION_REFRESH:function(){return g},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return l},ACTION_SERVER_PATCH:function(){return j},PrefetchKind:function(){return m}};for(var f in e)Object.defineProperty(c,f,{enumerable:!0,get:e[f]});let g="refresh",h="navigate",i="restore",j="server-patch",k="hmr-refresh",l="server-action";var m=((d={}).AUTO="auto",d.FULL="full",d);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},67009,(a,b,c)=>{"use strict";function d(a){return null!==a&&"object"==typeof a&&"then"in a&&"function"==typeof a.then}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isThenable",{enumerable:!0,get:function(){return d}})},90841,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={dispatchAppRouterAction:function(){return i},useActionQueue:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(46058)._(a.r(72131)),g=a.r(67009),h=null;function i(a){if(null===h)throw Object.defineProperty(Error("Internal Next.js error: Router action dispatched before initialization."),"__NEXT_ERROR_CODE",{value:"E668",enumerable:!1,configurable:!0});h(a)}function j(a){let[b,c]=f.default.useState(a.state);h=b=>a.dispatch(b,c);let d=(0,f.useMemo)(()=>b,[b]);return(0,g.isThenable)(d)?(0,f.use)(d):d}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},20611,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"callServer",{enumerable:!0,get:function(){return g}});let d=a.r(72131),e=a.r(88347),f=a.r(90841);async function g(a,b){return new Promise((c,g)=>{(0,d.startTransition)(()=>{(0,f.dispatchAppRouterAction)({type:e.ACTION_SERVER_ACTION,actionId:a,actionArgs:b,resolve:c,reject:g})})})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},1722,(a,b,c)=>{"use strict";let d;Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"findSourceMapURL",{enumerable:!0,get:function(){return d}});("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},92434,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"warnOnce",{enumerable:!0,get:function(){return d}});let d=a=>{}},68063,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={getDeploymentId:function(){return f},getDeploymentIdQueryOrEmptyString:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(){return!1}function g(){return""}},8591,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"useMergedRef",{enumerable:!0,get:function(){return e}});let d=a.r(72131);function e(a,b){let c=(0,d.useRef)(null),e=(0,d.useRef)(null);return(0,d.useCallback)(d=>{if(null===d){let a=c.current;a&&(c.current=null,a());let b=e.current;b&&(e.current=null,b())}else a&&(c.current=f(a,d)),b&&(e.current=f(b,d))},[a,b])}function f(a,b){if("function"!=typeof a)return a.current=b,()=>{a.current=null};{let c=a(b);return"function"==typeof c?c:()=>a(null)}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},97501,16093,a=>{"use strict";var b=a.i(5050);let c=(0,b.createServerReference)("006b7a10f839b3ad9a8e3cb7090a78f9691c43c62f",b.callServer,void 0,b.findSourceMapURL,"listAgentApiCredentials");a.s(["listAgentApiCredentials",()=>c],97501);let d=(0,b.createServerReference)("008c06297149d94056cb210d81ed9e5e14c82c759a",b.callServer,void 0,b.findSourceMapURL,"listCredentials");a.s(["listCredentials",()=>d],16093)},37047,a=>{"use strict";let b=(0,a.i(70106).default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);a.s(["KeyRound",()=>b],37047)}];
1
+ module.exports=[38783,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactServerDOMTurbopackClient},35112,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactDOM},88347,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d,e={ACTION_HMR_REFRESH:function(){return k},ACTION_NAVIGATE:function(){return h},ACTION_REFRESH:function(){return g},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return l},ACTION_SERVER_PATCH:function(){return j},PrefetchKind:function(){return m}};for(var f in e)Object.defineProperty(c,f,{enumerable:!0,get:e[f]});let g="refresh",h="navigate",i="restore",j="server-patch",k="hmr-refresh",l="server-action";var m=((d={}).AUTO="auto",d.FULL="full",d);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},67009,(a,b,c)=>{"use strict";function d(a){return null!==a&&"object"==typeof a&&"then"in a&&"function"==typeof a.then}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isThenable",{enumerable:!0,get:function(){return d}})},90841,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={dispatchAppRouterAction:function(){return i},useActionQueue:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(46058)._(a.r(72131)),g=a.r(67009),h=null;function i(a){if(null===h)throw Object.defineProperty(Error("Internal Next.js error: Router action dispatched before initialization."),"__NEXT_ERROR_CODE",{value:"E668",enumerable:!1,configurable:!0});h(a)}function j(a){let[b,c]=f.default.useState(a.state);h=b=>a.dispatch(b,c);let d=(0,f.useMemo)(()=>b,[b]);return(0,g.isThenable)(d)?(0,f.use)(d):d}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},20611,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"callServer",{enumerable:!0,get:function(){return g}});let d=a.r(72131),e=a.r(88347),f=a.r(90841);async function g(a,b){return new Promise((c,g)=>{(0,d.startTransition)(()=>{(0,f.dispatchAppRouterAction)({type:e.ACTION_SERVER_ACTION,actionId:a,actionArgs:b,resolve:c,reject:g})})})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},1722,(a,b,c)=>{"use strict";let d;Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"findSourceMapURL",{enumerable:!0,get:function(){return d}});("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},92434,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"warnOnce",{enumerable:!0,get:function(){return d}});let d=a=>{}},68063,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={getDeploymentId:function(){return f},getDeploymentIdQueryOrEmptyString:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(){return!1}function g(){return""}},8591,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"useMergedRef",{enumerable:!0,get:function(){return e}});let d=a.r(72131);function e(a,b){let c=(0,d.useRef)(null),e=(0,d.useRef)(null);return(0,d.useCallback)(d=>{if(null===d){let a=c.current;a&&(c.current=null,a());let b=e.current;b&&(e.current=null,b())}else a&&(c.current=f(a,d)),b&&(e.current=f(b,d))},[a,b])}function f(a,b){if("function"!=typeof a)return a.current=b,()=>{a.current=null};{let c=a(b);return"function"==typeof c?c:()=>a(null)}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},955,7469,a=>{"use strict";var b=a.i(5050);let c=(0,b.createServerReference)("007854b56845eeafde2c9685b51a376a63b707aad1",b.callServer,void 0,b.findSourceMapURL,"listAgentApiCredentials");a.s(["listAgentApiCredentials",()=>c],955);let d=(0,b.createServerReference)("0037e57dce0e01173d262d9f2abbeeda52df8d7e4f",b.callServer,void 0,b.findSourceMapURL,"listCredentials");a.s(["listCredentials",()=>d],7469)},37047,a=>{"use strict";let b=(0,a.i(70106).default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);a.s(["KeyRound",()=>b],37047)}];
2
2
 
3
- //# sourceMappingURL=_523ff032._.js.map
3
+ //# sourceMappingURL=_2eaa7035._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-dom.ts","../../../../node_modules/next/src/client/components/router-reducer/router-reducer-types.ts","../../../../node_modules/next/src/shared/lib/is-thenable.ts","../../../../node_modules/next/src/client/components/use-action-queue.ts","../../../../node_modules/next/src/client/app-call-server.ts","../../../../node_modules/next/src/client/app-find-source-map-url.ts","../../../../node_modules/next/src/shared/lib/utils/warn-once.ts","../../../../node_modules/next/src/shared/lib/deployment-id.ts","../../../../node_modules/next/src/client/use-merged-ref.ts","../../../../src/app/actions/data%3Ae1ff37%20%3Ctext/javascript%3E","../../../../src/app/actions/data%3Ac31e21%20%3Ctext/javascript%3E","../../../../node_modules/lucide-react/src/icons/key-round.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactServerDOMTurbopackClient\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactDOM\n","import type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n} from '../../../shared/lib/app-router-types'\nimport type { NavigationSeed } from '../segment-cache/navigation'\nimport type { FetchServerResponseResult } from './fetch-server-response'\n\nexport const ACTION_REFRESH = 'refresh'\nexport const ACTION_NAVIGATE = 'navigate'\nexport const ACTION_RESTORE = 'restore'\nexport const ACTION_SERVER_PATCH = 'server-patch'\nexport const ACTION_HMR_REFRESH = 'hmr-refresh'\nexport const ACTION_SERVER_ACTION = 'server-action'\n\nexport type RouterChangeByServerResponse = ({\n navigatedAt,\n previousTree,\n serverResponse,\n}: {\n navigatedAt: number\n previousTree: FlightRouterState\n serverResponse: FetchServerResponseResult\n}) => void\n\nexport interface Mutable {\n mpaNavigation?: boolean\n patchedTree?: FlightRouterState\n renderedSearch?: string\n canonicalUrl?: string\n scrollableSegments?: FlightSegmentPath[]\n pendingPush?: boolean\n cache?: CacheNode\n hashFragment?: string\n shouldScroll?: boolean\n preserveCustomHistoryState?: boolean\n onlyHashChange?: boolean\n collectedDebugInfo?: Array<unknown>\n}\n\nexport interface ServerActionMutable extends Mutable {\n inFlightServerAction?: Promise<any> | null\n}\n\n/**\n * Refresh triggers a refresh of the full page data.\n * - fetches the Flight data and fills rsc at the root of the cache.\n * - The router state is updated at the root.\n */\nexport interface RefreshAction {\n type: typeof ACTION_REFRESH\n}\n\nexport interface HmrRefreshAction {\n type: typeof ACTION_HMR_REFRESH\n}\n\nexport type ServerActionDispatcher = (\n args: Omit<\n ServerActionAction,\n 'type' | 'mutable' | 'navigate' | 'changeByServerResponse' | 'cache'\n >\n) => void\n\nexport interface ServerActionAction {\n type: typeof ACTION_SERVER_ACTION\n actionId: string\n actionArgs: any[]\n resolve: (value: any) => void\n reject: (reason?: any) => void\n didRevalidate?: boolean\n}\n\n/**\n * Navigate triggers a navigation to the provided url. It supports two types: `push` and `replace`.\n *\n * `navigateType`:\n * - `push` - pushes a new history entry in the browser history\n * - `replace` - replaces the current history entry in the browser history\n *\n * Navigate has multiple cache heuristics:\n * - page was prefetched\n * - Apply router state tree from prefetch\n * - Apply Flight data from prefetch to the cache\n * - If Flight data is a string, it's a redirect and the state is updated to trigger a redirect\n * - Check if hard navigation is needed\n * - Hard navigation happens when a dynamic parameter below the common layout changed\n * - When hard navigation is needed the cache is invalidated below the flightSegmentPath\n * - The missing cache nodes of the page will be fetched in layout-router and trigger the SERVER_PATCH action\n * - If hard navigation is not needed\n * - The cache is reused\n * - If any cache nodes are missing they'll be fetched in layout-router and trigger the SERVER_PATCH action\n * - page was not prefetched\n * - The navigate was called from `next/router` (`router.push()` / `router.replace()`) / `next/link` without prefetched data available (e.g. the prefetch didn't come back from the server before clicking the link)\n * - Flight data is fetched in the reducer (suspends the reducer)\n * - Router state tree is created based on Flight data\n * - Cache is filled based on the Flight data\n *\n * Above steps explain 3 cases:\n * - `soft` - Reuses the existing cache and fetches missing nodes in layout-router.\n * - `hard` - Creates a new cache where cache nodes are removed below the common layout and fetches missing nodes in layout-router.\n * - `optimistic` (explicit no prefetch) - Creates a new cache and kicks off the data fetch in the reducer. The data fetch is awaited in the layout-router.\n */\nexport interface NavigateAction {\n type: typeof ACTION_NAVIGATE\n url: URL\n isExternalUrl: boolean\n locationSearch: Location['search']\n navigateType: 'push' | 'replace'\n shouldScroll: boolean\n}\n\n/**\n * Restore applies the provided router state.\n * - Used for `popstate` (back/forward navigation) where a known router state has to be applied.\n * - Also used when syncing the router state with `pushState`/`replaceState` calls.\n * - Router state is applied as-is from the history state, if available.\n * - If the history state does not contain the router state, the existing router state is used.\n * - If any cache node is missing it will be fetched in layout-router during rendering and the server-patch case.\n * - If existing cache nodes match these are used.\n */\nexport interface RestoreAction {\n type: typeof ACTION_RESTORE\n url: URL\n historyState: AppHistoryState | undefined\n}\n\nexport type AppHistoryState = {\n tree: FlightRouterState\n renderedSearch: string\n}\n\n/**\n * Server-patch applies the provided Flight data to the cache and router tree.\n */\nexport interface ServerPatchAction {\n type: typeof ACTION_SERVER_PATCH\n previousTree: FlightRouterState\n url: URL\n nextUrl: string | null\n seed: NavigationSeed | null\n mpa: boolean\n}\n\n/**\n * PrefetchKind defines the type of prefetching that should be done.\n * - `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully.\n * - `full` - prefetch the page data fully.\n */\n\nexport enum PrefetchKind {\n AUTO = 'auto',\n FULL = 'full',\n}\n\n/**\n * Prefetch adds the provided FlightData to the prefetch cache\n * - Creates the router state tree based on the patch in FlightData\n * - Adds the FlightData to the prefetch cache\n * - In ACTION_NAVIGATE the prefetch cache is checked and the router state tree and FlightData are applied.\n */\n\nexport interface PushRef {\n /**\n * If the app-router should push a new history entry in app-router's useEffect()\n */\n pendingPush: boolean\n /**\n * Multi-page navigation through location.href.\n */\n mpaNavigation: boolean\n /**\n * Skip applying the router state to the browser history state.\n */\n preserveCustomHistoryState: boolean\n}\n\nexport type FocusAndScrollRef = {\n /**\n * If focus and scroll should be set in the layout-router's useEffect()\n */\n apply: boolean\n /**\n * The hash fragment that should be scrolled to.\n */\n hashFragment: string | null\n /**\n * The paths of the segments that should be focused.\n */\n segmentPaths: FlightSegmentPath[]\n /**\n * If only the URLs hash fragment changed\n */\n onlyHashChange: boolean\n}\n\n/**\n * Handles keeping the state of app-router.\n */\nexport type AppRouterState = {\n /**\n * The router state, this is written into the history state in app-router using replaceState/pushState.\n * - Has to be serializable as it is written into the history state.\n * - Holds which segments and parallel routes are shown on the screen.\n */\n tree: FlightRouterState\n /**\n * The cache holds React nodes for every segment that is shown on screen as well as previously shown segments.\n * It also holds in-progress data requests.\n */\n cache: CacheNode\n /**\n * Decides if the update should create a new history entry and if the navigation has to trigger a browser navigation.\n */\n pushRef: PushRef\n /**\n * Decides if the update should apply scroll and focus management.\n */\n focusAndScrollRef: FocusAndScrollRef\n /**\n * The canonical url that is pushed/replaced.\n * - This is the url you see in the browser.\n */\n canonicalUrl: string\n renderedSearch: string\n /**\n * The underlying \"url\" representing the UI state, which is used for intercepting routes.\n */\n nextUrl: string | null\n\n /**\n * The previous next-url that was used previous to a dynamic navigation.\n */\n previousNextUrl: string | null\n\n debugInfo: Array<unknown> | null\n}\n\nexport type ReadonlyReducerState = Readonly<AppRouterState>\nexport type ReducerState =\n | (Promise<AppRouterState> & { _debugInfo?: Array<unknown> })\n | AppRouterState\nexport type ReducerActions = Readonly<\n | RefreshAction\n | NavigateAction\n | RestoreAction\n | ServerPatchAction\n | HmrRefreshAction\n | ServerActionAction\n>\n","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n promise: Promise<T> | T\n): promise is Promise<T> {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n","import type { Dispatch } from 'react'\nimport React, { use, useMemo } from 'react'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport type { AppRouterActionQueue } from './app-router-instance'\nimport type {\n AppRouterState,\n ReducerActions,\n ReducerState,\n} from './router-reducer/router-reducer-types'\n\n// The app router state lives outside of React, so we can import the dispatch\n// method directly wherever we need it, rather than passing it around via props\n// or context.\nlet dispatch: Dispatch<ReducerActions> | null = null\n\nexport function dispatchAppRouterAction(action: ReducerActions) {\n if (dispatch === null) {\n throw new Error(\n 'Internal Next.js error: Router action dispatched before initialization.'\n )\n }\n dispatch(action)\n}\n\nconst __DEV__ = process.env.NODE_ENV !== 'production'\nconst promisesWithDebugInfo: WeakMap<\n Promise<AppRouterState>,\n Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n> = __DEV__ ? new WeakMap() : (null as any)\n\nexport function useActionQueue(\n actionQueue: AppRouterActionQueue\n): AppRouterState {\n const [state, setState] = React.useState<ReducerState>(actionQueue.state)\n\n // Because of a known issue that requires to decode Flight streams inside the\n // render phase, we have to be a bit clever and assign the dispatch method to\n // a module-level variable upon initialization. The useState hook in this\n // module only exists to synchronize state that lives outside of React.\n // Ideally, what we'd do instead is pass the state as a prop to root.render;\n // this is conceptually how we're modeling the app router state, despite the\n // weird implementation details.\n if (process.env.NODE_ENV !== 'production') {\n const { useAppDevRenderingIndicator } =\n require('../../next-devtools/userspace/use-app-dev-rendering-indicator') as typeof import('../../next-devtools/userspace/use-app-dev-rendering-indicator')\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const appDevRenderingIndicator = useAppDevRenderingIndicator()\n\n dispatch = (action: ReducerActions) => {\n appDevRenderingIndicator(() => {\n actionQueue.dispatch(action, setState)\n })\n }\n } else {\n dispatch = (action: ReducerActions) =>\n actionQueue.dispatch(action, setState)\n }\n\n // When navigating to a non-prefetched route, then App Router state will be\n // blocked until the server responds. We need to transfer the `_debugInfo`\n // from the underlying Flight response onto the top-level promise that is\n // passed to React (via `use`) so that the latency is accurately represented\n // in the React DevTools.\n const stateWithDebugInfo = useMemo(() => {\n if (!__DEV__) {\n return state\n }\n\n if (isThenable(state)) {\n // useMemo can't be used to cache a Promise since the memoized value is thrown\n // away when we suspend. So we use a WeakMap to cache the Promise with debug info.\n let promiseWithDebugInfo = promisesWithDebugInfo.get(state)\n if (promiseWithDebugInfo === undefined) {\n const debugInfo: Array<unknown> = []\n promiseWithDebugInfo = Promise.resolve(state).then((asyncState) => {\n if (asyncState.debugInfo !== null) {\n debugInfo.push(...asyncState.debugInfo)\n }\n return asyncState\n }) as Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n promiseWithDebugInfo._debugInfo = debugInfo\n\n promisesWithDebugInfo.set(state, promiseWithDebugInfo)\n }\n\n return promiseWithDebugInfo\n }\n return state\n }, [state])\n\n return isThenable(stateWithDebugInfo)\n ? use(stateWithDebugInfo)\n : stateWithDebugInfo\n}\n","import { startTransition } from 'react'\nimport { ACTION_SERVER_ACTION } from './components/router-reducer/router-reducer-types'\nimport { dispatchAppRouterAction } from './components/use-action-queue'\n\nexport async function callServer(actionId: string, actionArgs: any[]) {\n return new Promise((resolve, reject) => {\n startTransition(() => {\n dispatchAppRouterAction({\n type: ACTION_SERVER_ACTION,\n actionId,\n actionArgs,\n resolve,\n reject,\n })\n })\n })\n}\n","const basePath = process.env.__NEXT_ROUTER_BASEPATH || ''\nconst pathname = `${basePath}/__nextjs_source-map`\n\nexport const findSourceMapURL =\n process.env.NODE_ENV === 'development'\n ? function findSourceMapURL(filename: string): string | null {\n if (filename === '') {\n return null\n }\n\n if (\n filename.startsWith(document.location.origin) &&\n filename.includes('/_next/static')\n ) {\n // This is a request for a client chunk. This can only happen when\n // using Turbopack. In this case, since we control how those source\n // maps are generated, we can safely assume that the sourceMappingURL\n // is relative to the filename, with an added `.map` extension. The\n // browser can just request this file, and it gets served through the\n // normal dev server, without the need to route this through\n // the `/__nextjs_source-map` dev middleware.\n return `${filename}.map`\n }\n\n const url = new URL(pathname, document.location.origin)\n url.searchParams.set('filename', filename)\n\n return url.href\n }\n : undefined\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n","// This could also be a variable instead of a function, but some unit tests want to change the ID at\n// runtime. Even though that would never happen in a real deployment.\nexport function getDeploymentId(): string | undefined {\n return process.env.NEXT_DEPLOYMENT_ID\n}\n\nexport function getDeploymentIdQueryOrEmptyString(): string {\n let deploymentId = getDeploymentId()\n if (deploymentId) {\n return `?dpl=${deploymentId}`\n }\n return ''\n}\n","import { useCallback, useRef, type Ref } from 'react'\n\n// This is a compatibility hook to support React 18 and 19 refs.\n// In 19, a cleanup function from refs may be returned.\n// In 18, returning a cleanup function creates a warning.\n// Since we take userspace refs, we don't know ahead of time if a cleanup function will be returned.\n// This implements cleanup functions with the old behavior in 18.\n// We know refs are always called alternating with `null` and then `T`.\n// So a call with `null` means we need to call the previous cleanup functions.\nexport function useMergedRef<TElement>(\n refA: Ref<TElement>,\n refB: Ref<TElement>\n): Ref<TElement> {\n const cleanupA = useRef<(() => void) | null>(null)\n const cleanupB = useRef<(() => void) | null>(null)\n\n // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.\n // (this happens often if the user doesn't pass a ref to Link/Form/Image)\n // But this can cause us to leak a cleanup-ref into user code (previously via `<Link legacyBehavior>`),\n // and the user might pass that ref into ref-merging library that doesn't support cleanup refs\n // (because it hasn't been updated for React 19)\n // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.\n // So in practice, it's safer to be defensive and always wrap the ref, even on React 19.\n return useCallback(\n (current: TElement | null): void => {\n if (current === null) {\n const cleanupFnA = cleanupA.current\n if (cleanupFnA) {\n cleanupA.current = null\n cleanupFnA()\n }\n const cleanupFnB = cleanupB.current\n if (cleanupFnB) {\n cleanupB.current = null\n cleanupFnB()\n }\n } else {\n if (refA) {\n cleanupA.current = applyRef(refA, current)\n }\n if (refB) {\n cleanupB.current = applyRef(refB, current)\n }\n }\n },\n [refA, refB]\n )\n}\n\nfunction applyRef<TElement>(\n refA: NonNullable<Ref<TElement>>,\n current: TElement\n) {\n if (typeof refA === 'function') {\n const cleanup = refA(current)\n if (typeof cleanup === 'function') {\n return cleanup\n } else {\n return () => refA(null)\n }\n } else {\n refA.current = current\n return () => {\n refA.current = null\n }\n }\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"006b7a10f839b3ad9a8e3cb7090a78f9691c43c62f\":\"listAgentApiCredentials\"},\"src/app/actions/credentials.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_3=/*#__PURE__*/createServerReference(\"006b7a10f839b3ad9a8e3cb7090a78f9691c43c62f\",callServer,void 0,findSourceMapURL,\"listAgentApiCredentials\");export{$$RSC_SERVER_ACTION_3 as listAgentApiCredentials};","/* __next_internal_action_entry_do_not_use__ [{\"008c06297149d94056cb210d81ed9e5e14c82c759a\":\"listCredentials\"},\"src/app/actions/credentials.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"008c06297149d94056cb210d81ed9e5e14c82c759a\",callServer,void 0,findSourceMapURL,\"listCredentials\");export{$$RSC_SERVER_ACTION_0 as listCredentials};","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z',\n key: '1s6t7t',\n },\n ],\n ['circle', { cx: '16.5', cy: '7.5', r: '.5', fill: 'currentColor', key: 'w0ekpg' }],\n];\n\n/**\n * @component @name KeyRound\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMi41ODYgMTcuNDE0QTIgMiAwIDAgMCAyIDE4LjgyOFYyMWExIDEgMCAwIDAgMSAxaDNhMSAxIDAgMCAwIDEtMXYtMWExIDEgMCAwIDEgMS0xaDFhMSAxIDAgMCAwIDEtMXYtMWExIDEgMCAwIDEgMS0xaC4xNzJhMiAyIDAgMCAwIDEuNDE0LS41ODZsLjgxNC0uODE0YTYuNSA2LjUgMCAxIDAtNC00eiIgLz4KICA8Y2lyY2xlIGN4PSIxNi41IiBjeT0iNy41IiByPSIuNSIgZmlsbD0iY3VycmVudENvbG9yIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/key-round\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst KeyRound = createLucideIcon('key-round', __iconNode);\n\nexport default KeyRound;\n"],"names":["module","exports","require","vendored","ReactServerDOMTurbopackClient","ReactDOM","ACTION_HMR_REFRESH","ACTION_NAVIGATE","ACTION_REFRESH","ACTION_RESTORE","ACTION_SERVER_ACTION","ACTION_SERVER_PATCH","PrefetchKind","isThenable","promise","then","dispatchAppRouterAction","useActionQueue","dispatch","action","Error","__DEV__","process","env","NODE_ENV","promisesWithDebugInfo","WeakMap","actionQueue","state","setState","React","useState","useAppDevRenderingIndicator","appDevRenderingIndicator","stateWithDebugInfo","useMemo","promiseWithDebugInfo","get","undefined","debugInfo","Promise","resolve","asyncState","push","_debugInfo","set","use","callServer","actionId","actionArgs","reject","startTransition","type","findSourceMapURL","basePath","__NEXT_ROUTER_BASEPATH","pathname","filename","startsWith","document","location","origin","includes","url","URL","searchParams","href","warnOnce","_","warnings","Set","msg","has","console","warn","add","getDeploymentId","getDeploymentIdQueryOrEmptyString","NEXT_DEPLOYMENT_ID","deploymentId","useMergedRef","refA","refB","cleanupA","useRef","cleanupB","useCallback","current","cleanupFnA","cleanupFnB","applyRef","cleanup"],"mappings":"6CAAAA,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEC,6BAA6B,+BCFtDJ,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,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AA,AAAM,cAAA,CAAA,AAAgB,CAAA,CAAA,CAAA,CAAA,AAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,CACpF","ignoreList":[0,1,2,3,4,5,6,7,8,9,12]}
1
+ {"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-dom.ts","../../../../node_modules/next/src/client/components/router-reducer/router-reducer-types.ts","../../../../node_modules/next/src/shared/lib/is-thenable.ts","../../../../node_modules/next/src/client/components/use-action-queue.ts","../../../../node_modules/next/src/client/app-call-server.ts","../../../../node_modules/next/src/client/app-find-source-map-url.ts","../../../../node_modules/next/src/shared/lib/utils/warn-once.ts","../../../../node_modules/next/src/shared/lib/deployment-id.ts","../../../../node_modules/next/src/client/use-merged-ref.ts","../../../../src/app/actions/data%3Ab88ff1%20%3Ctext/javascript%3E","../../../../src/app/actions/data%3A7c1bc9%20%3Ctext/javascript%3E","../../../../node_modules/lucide-react/src/icons/key-round.ts"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactServerDOMTurbopackClient\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactDOM\n","import type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n} from '../../../shared/lib/app-router-types'\nimport type { NavigationSeed } from '../segment-cache/navigation'\nimport type { FetchServerResponseResult } from './fetch-server-response'\n\nexport const ACTION_REFRESH = 'refresh'\nexport const ACTION_NAVIGATE = 'navigate'\nexport const ACTION_RESTORE = 'restore'\nexport const ACTION_SERVER_PATCH = 'server-patch'\nexport const ACTION_HMR_REFRESH = 'hmr-refresh'\nexport const ACTION_SERVER_ACTION = 'server-action'\n\nexport type RouterChangeByServerResponse = ({\n navigatedAt,\n previousTree,\n serverResponse,\n}: {\n navigatedAt: number\n previousTree: FlightRouterState\n serverResponse: FetchServerResponseResult\n}) => void\n\nexport interface Mutable {\n mpaNavigation?: boolean\n patchedTree?: FlightRouterState\n renderedSearch?: string\n canonicalUrl?: string\n scrollableSegments?: FlightSegmentPath[]\n pendingPush?: boolean\n cache?: CacheNode\n hashFragment?: string\n shouldScroll?: boolean\n preserveCustomHistoryState?: boolean\n onlyHashChange?: boolean\n collectedDebugInfo?: Array<unknown>\n}\n\nexport interface ServerActionMutable extends Mutable {\n inFlightServerAction?: Promise<any> | null\n}\n\n/**\n * Refresh triggers a refresh of the full page data.\n * - fetches the Flight data and fills rsc at the root of the cache.\n * - The router state is updated at the root.\n */\nexport interface RefreshAction {\n type: typeof ACTION_REFRESH\n}\n\nexport interface HmrRefreshAction {\n type: typeof ACTION_HMR_REFRESH\n}\n\nexport type ServerActionDispatcher = (\n args: Omit<\n ServerActionAction,\n 'type' | 'mutable' | 'navigate' | 'changeByServerResponse' | 'cache'\n >\n) => void\n\nexport interface ServerActionAction {\n type: typeof ACTION_SERVER_ACTION\n actionId: string\n actionArgs: any[]\n resolve: (value: any) => void\n reject: (reason?: any) => void\n didRevalidate?: boolean\n}\n\n/**\n * Navigate triggers a navigation to the provided url. It supports two types: `push` and `replace`.\n *\n * `navigateType`:\n * - `push` - pushes a new history entry in the browser history\n * - `replace` - replaces the current history entry in the browser history\n *\n * Navigate has multiple cache heuristics:\n * - page was prefetched\n * - Apply router state tree from prefetch\n * - Apply Flight data from prefetch to the cache\n * - If Flight data is a string, it's a redirect and the state is updated to trigger a redirect\n * - Check if hard navigation is needed\n * - Hard navigation happens when a dynamic parameter below the common layout changed\n * - When hard navigation is needed the cache is invalidated below the flightSegmentPath\n * - The missing cache nodes of the page will be fetched in layout-router and trigger the SERVER_PATCH action\n * - If hard navigation is not needed\n * - The cache is reused\n * - If any cache nodes are missing they'll be fetched in layout-router and trigger the SERVER_PATCH action\n * - page was not prefetched\n * - The navigate was called from `next/router` (`router.push()` / `router.replace()`) / `next/link` without prefetched data available (e.g. the prefetch didn't come back from the server before clicking the link)\n * - Flight data is fetched in the reducer (suspends the reducer)\n * - Router state tree is created based on Flight data\n * - Cache is filled based on the Flight data\n *\n * Above steps explain 3 cases:\n * - `soft` - Reuses the existing cache and fetches missing nodes in layout-router.\n * - `hard` - Creates a new cache where cache nodes are removed below the common layout and fetches missing nodes in layout-router.\n * - `optimistic` (explicit no prefetch) - Creates a new cache and kicks off the data fetch in the reducer. The data fetch is awaited in the layout-router.\n */\nexport interface NavigateAction {\n type: typeof ACTION_NAVIGATE\n url: URL\n isExternalUrl: boolean\n locationSearch: Location['search']\n navigateType: 'push' | 'replace'\n shouldScroll: boolean\n}\n\n/**\n * Restore applies the provided router state.\n * - Used for `popstate` (back/forward navigation) where a known router state has to be applied.\n * - Also used when syncing the router state with `pushState`/`replaceState` calls.\n * - Router state is applied as-is from the history state, if available.\n * - If the history state does not contain the router state, the existing router state is used.\n * - If any cache node is missing it will be fetched in layout-router during rendering and the server-patch case.\n * - If existing cache nodes match these are used.\n */\nexport interface RestoreAction {\n type: typeof ACTION_RESTORE\n url: URL\n historyState: AppHistoryState | undefined\n}\n\nexport type AppHistoryState = {\n tree: FlightRouterState\n renderedSearch: string\n}\n\n/**\n * Server-patch applies the provided Flight data to the cache and router tree.\n */\nexport interface ServerPatchAction {\n type: typeof ACTION_SERVER_PATCH\n previousTree: FlightRouterState\n url: URL\n nextUrl: string | null\n seed: NavigationSeed | null\n mpa: boolean\n}\n\n/**\n * PrefetchKind defines the type of prefetching that should be done.\n * - `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully.\n * - `full` - prefetch the page data fully.\n */\n\nexport enum PrefetchKind {\n AUTO = 'auto',\n FULL = 'full',\n}\n\n/**\n * Prefetch adds the provided FlightData to the prefetch cache\n * - Creates the router state tree based on the patch in FlightData\n * - Adds the FlightData to the prefetch cache\n * - In ACTION_NAVIGATE the prefetch cache is checked and the router state tree and FlightData are applied.\n */\n\nexport interface PushRef {\n /**\n * If the app-router should push a new history entry in app-router's useEffect()\n */\n pendingPush: boolean\n /**\n * Multi-page navigation through location.href.\n */\n mpaNavigation: boolean\n /**\n * Skip applying the router state to the browser history state.\n */\n preserveCustomHistoryState: boolean\n}\n\nexport type FocusAndScrollRef = {\n /**\n * If focus and scroll should be set in the layout-router's useEffect()\n */\n apply: boolean\n /**\n * The hash fragment that should be scrolled to.\n */\n hashFragment: string | null\n /**\n * The paths of the segments that should be focused.\n */\n segmentPaths: FlightSegmentPath[]\n /**\n * If only the URLs hash fragment changed\n */\n onlyHashChange: boolean\n}\n\n/**\n * Handles keeping the state of app-router.\n */\nexport type AppRouterState = {\n /**\n * The router state, this is written into the history state in app-router using replaceState/pushState.\n * - Has to be serializable as it is written into the history state.\n * - Holds which segments and parallel routes are shown on the screen.\n */\n tree: FlightRouterState\n /**\n * The cache holds React nodes for every segment that is shown on screen as well as previously shown segments.\n * It also holds in-progress data requests.\n */\n cache: CacheNode\n /**\n * Decides if the update should create a new history entry and if the navigation has to trigger a browser navigation.\n */\n pushRef: PushRef\n /**\n * Decides if the update should apply scroll and focus management.\n */\n focusAndScrollRef: FocusAndScrollRef\n /**\n * The canonical url that is pushed/replaced.\n * - This is the url you see in the browser.\n */\n canonicalUrl: string\n renderedSearch: string\n /**\n * The underlying \"url\" representing the UI state, which is used for intercepting routes.\n */\n nextUrl: string | null\n\n /**\n * The previous next-url that was used previous to a dynamic navigation.\n */\n previousNextUrl: string | null\n\n debugInfo: Array<unknown> | null\n}\n\nexport type ReadonlyReducerState = Readonly<AppRouterState>\nexport type ReducerState =\n | (Promise<AppRouterState> & { _debugInfo?: Array<unknown> })\n | AppRouterState\nexport type ReducerActions = Readonly<\n | RefreshAction\n | NavigateAction\n | RestoreAction\n | ServerPatchAction\n | HmrRefreshAction\n | ServerActionAction\n>\n","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n promise: Promise<T> | T\n): promise is Promise<T> {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n","import type { Dispatch } from 'react'\nimport React, { use, useMemo } from 'react'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport type { AppRouterActionQueue } from './app-router-instance'\nimport type {\n AppRouterState,\n ReducerActions,\n ReducerState,\n} from './router-reducer/router-reducer-types'\n\n// The app router state lives outside of React, so we can import the dispatch\n// method directly wherever we need it, rather than passing it around via props\n// or context.\nlet dispatch: Dispatch<ReducerActions> | null = null\n\nexport function dispatchAppRouterAction(action: ReducerActions) {\n if (dispatch === null) {\n throw new Error(\n 'Internal Next.js error: Router action dispatched before initialization.'\n )\n }\n dispatch(action)\n}\n\nconst __DEV__ = process.env.NODE_ENV !== 'production'\nconst promisesWithDebugInfo: WeakMap<\n Promise<AppRouterState>,\n Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n> = __DEV__ ? new WeakMap() : (null as any)\n\nexport function useActionQueue(\n actionQueue: AppRouterActionQueue\n): AppRouterState {\n const [state, setState] = React.useState<ReducerState>(actionQueue.state)\n\n // Because of a known issue that requires to decode Flight streams inside the\n // render phase, we have to be a bit clever and assign the dispatch method to\n // a module-level variable upon initialization. The useState hook in this\n // module only exists to synchronize state that lives outside of React.\n // Ideally, what we'd do instead is pass the state as a prop to root.render;\n // this is conceptually how we're modeling the app router state, despite the\n // weird implementation details.\n if (process.env.NODE_ENV !== 'production') {\n const { useAppDevRenderingIndicator } =\n require('../../next-devtools/userspace/use-app-dev-rendering-indicator') as typeof import('../../next-devtools/userspace/use-app-dev-rendering-indicator')\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const appDevRenderingIndicator = useAppDevRenderingIndicator()\n\n dispatch = (action: ReducerActions) => {\n appDevRenderingIndicator(() => {\n actionQueue.dispatch(action, setState)\n })\n }\n } else {\n dispatch = (action: ReducerActions) =>\n actionQueue.dispatch(action, setState)\n }\n\n // When navigating to a non-prefetched route, then App Router state will be\n // blocked until the server responds. We need to transfer the `_debugInfo`\n // from the underlying Flight response onto the top-level promise that is\n // passed to React (via `use`) so that the latency is accurately represented\n // in the React DevTools.\n const stateWithDebugInfo = useMemo(() => {\n if (!__DEV__) {\n return state\n }\n\n if (isThenable(state)) {\n // useMemo can't be used to cache a Promise since the memoized value is thrown\n // away when we suspend. So we use a WeakMap to cache the Promise with debug info.\n let promiseWithDebugInfo = promisesWithDebugInfo.get(state)\n if (promiseWithDebugInfo === undefined) {\n const debugInfo: Array<unknown> = []\n promiseWithDebugInfo = Promise.resolve(state).then((asyncState) => {\n if (asyncState.debugInfo !== null) {\n debugInfo.push(...asyncState.debugInfo)\n }\n return asyncState\n }) as Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n promiseWithDebugInfo._debugInfo = debugInfo\n\n promisesWithDebugInfo.set(state, promiseWithDebugInfo)\n }\n\n return promiseWithDebugInfo\n }\n return state\n }, [state])\n\n return isThenable(stateWithDebugInfo)\n ? use(stateWithDebugInfo)\n : stateWithDebugInfo\n}\n","import { startTransition } from 'react'\nimport { ACTION_SERVER_ACTION } from './components/router-reducer/router-reducer-types'\nimport { dispatchAppRouterAction } from './components/use-action-queue'\n\nexport async function callServer(actionId: string, actionArgs: any[]) {\n return new Promise((resolve, reject) => {\n startTransition(() => {\n dispatchAppRouterAction({\n type: ACTION_SERVER_ACTION,\n actionId,\n actionArgs,\n resolve,\n reject,\n })\n })\n })\n}\n","const basePath = process.env.__NEXT_ROUTER_BASEPATH || ''\nconst pathname = `${basePath}/__nextjs_source-map`\n\nexport const findSourceMapURL =\n process.env.NODE_ENV === 'development'\n ? function findSourceMapURL(filename: string): string | null {\n if (filename === '') {\n return null\n }\n\n if (\n filename.startsWith(document.location.origin) &&\n filename.includes('/_next/static')\n ) {\n // This is a request for a client chunk. This can only happen when\n // using Turbopack. In this case, since we control how those source\n // maps are generated, we can safely assume that the sourceMappingURL\n // is relative to the filename, with an added `.map` extension. The\n // browser can just request this file, and it gets served through the\n // normal dev server, without the need to route this through\n // the `/__nextjs_source-map` dev middleware.\n return `${filename}.map`\n }\n\n const url = new URL(pathname, document.location.origin)\n url.searchParams.set('filename', filename)\n\n return url.href\n }\n : undefined\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n","// This could also be a variable instead of a function, but some unit tests want to change the ID at\n// runtime. Even though that would never happen in a real deployment.\nexport function getDeploymentId(): string | undefined {\n return process.env.NEXT_DEPLOYMENT_ID\n}\n\nexport function getDeploymentIdQueryOrEmptyString(): string {\n let deploymentId = getDeploymentId()\n if (deploymentId) {\n return `?dpl=${deploymentId}`\n }\n return ''\n}\n","import { useCallback, useRef, type Ref } from 'react'\n\n// This is a compatibility hook to support React 18 and 19 refs.\n// In 19, a cleanup function from refs may be returned.\n// In 18, returning a cleanup function creates a warning.\n// Since we take userspace refs, we don't know ahead of time if a cleanup function will be returned.\n// This implements cleanup functions with the old behavior in 18.\n// We know refs are always called alternating with `null` and then `T`.\n// So a call with `null` means we need to call the previous cleanup functions.\nexport function useMergedRef<TElement>(\n refA: Ref<TElement>,\n refB: Ref<TElement>\n): Ref<TElement> {\n const cleanupA = useRef<(() => void) | null>(null)\n const cleanupB = useRef<(() => void) | null>(null)\n\n // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.\n // (this happens often if the user doesn't pass a ref to Link/Form/Image)\n // But this can cause us to leak a cleanup-ref into user code (previously via `<Link legacyBehavior>`),\n // and the user might pass that ref into ref-merging library that doesn't support cleanup refs\n // (because it hasn't been updated for React 19)\n // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.\n // So in practice, it's safer to be defensive and always wrap the ref, even on React 19.\n return useCallback(\n (current: TElement | null): void => {\n if (current === null) {\n const cleanupFnA = cleanupA.current\n if (cleanupFnA) {\n cleanupA.current = null\n cleanupFnA()\n }\n const cleanupFnB = cleanupB.current\n if (cleanupFnB) {\n cleanupB.current = null\n cleanupFnB()\n }\n } else {\n if (refA) {\n cleanupA.current = applyRef(refA, current)\n }\n if (refB) {\n cleanupB.current = applyRef(refB, current)\n }\n }\n },\n [refA, refB]\n )\n}\n\nfunction applyRef<TElement>(\n refA: NonNullable<Ref<TElement>>,\n current: TElement\n) {\n if (typeof refA === 'function') {\n const cleanup = refA(current)\n if (typeof cleanup === 'function') {\n return cleanup\n } else {\n return () => refA(null)\n }\n } else {\n refA.current = current\n return () => {\n refA.current = null\n }\n }\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"007854b56845eeafde2c9685b51a376a63b707aad1\":\"listAgentApiCredentials\"},\"src/app/actions/credentials.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_3=/*#__PURE__*/createServerReference(\"007854b56845eeafde2c9685b51a376a63b707aad1\",callServer,void 0,findSourceMapURL,\"listAgentApiCredentials\");export{$$RSC_SERVER_ACTION_3 as listAgentApiCredentials};","/* __next_internal_action_entry_do_not_use__ [{\"0037e57dce0e01173d262d9f2abbeeda52df8d7e4f\":\"listCredentials\"},\"src/app/actions/credentials.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"0037e57dce0e01173d262d9f2abbeeda52df8d7e4f\",callServer,void 0,findSourceMapURL,\"listCredentials\");export{$$RSC_SERVER_ACTION_0 as listCredentials};","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z',\n key: '1s6t7t',\n },\n ],\n ['circle', { cx: '16.5', cy: '7.5', r: '.5', fill: 'currentColor', key: 'w0ekpg' }],\n];\n\n/**\n * @component @name KeyRound\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMi41ODYgMTcuNDE0QTIgMiAwIDAgMCAyIDE4LjgyOFYyMWExIDEgMCAwIDAgMSAxaDNhMSAxIDAgMCAwIDEtMXYtMWExIDEgMCAwIDEgMS0xaDFhMSAxIDAgMCAwIDEtMXYtMWExIDEgMCAwIDEgMS0xaC4xNzJhMiAyIDAgMCAwIDEuNDE0LS41ODZsLjgxNC0uODE0YTYuNSA2LjUgMCAxIDAtNC00eiIgLz4KICA8Y2lyY2xlIGN4PSIxNi41IiBjeT0iNy41IiByPSIuNSIgZmlsbD0iY3VycmVudENvbG9yIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/key-round\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst KeyRound = createLucideIcon('key-round', __iconNode);\n\nexport default KeyRound;\n"],"names":["module","exports","require","vendored","ReactServerDOMTurbopackClient","ReactDOM","ACTION_HMR_REFRESH","ACTION_NAVIGATE","ACTION_REFRESH","ACTION_RESTORE","ACTION_SERVER_ACTION","ACTION_SERVER_PATCH","PrefetchKind","isThenable","promise","then","dispatchAppRouterAction","useActionQueue","dispatch","action","Error","__DEV__","process","env","NODE_ENV","promisesWithDebugInfo","WeakMap","actionQueue","state","setState","React","useState","useAppDevRenderingIndicator","appDevRenderingIndicator","stateWithDebugInfo","useMemo","promiseWithDebugInfo","get","undefined","debugInfo","Promise","resolve","asyncState","push","_debugInfo","set","use","callServer","actionId","actionArgs","reject","startTransition","type","findSourceMapURL","basePath","__NEXT_ROUTER_BASEPATH","pathname","filename","startsWith","document","location","origin","includes","url","URL","searchParams","href","warnOnce","_","warnings","Set","msg","has","console","warn","add","getDeploymentId","getDeploymentIdQueryOrEmptyString","NEXT_DEPLOYMENT_ID","deploymentId","useMergedRef","refA","refB","cleanupA","useRef","cleanupB","useCallback","current","cleanupFnA","cleanupFnB","applyRef","cleanup"],"mappings":"6CAAAA,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEC,6BAA6B,+BCFtDJ,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEE,QAAQ,oFCoJrBO,KA1ICN,OA0IDM,WA1ImB,CAAA,kBAAlBN,GAHAC,eAAe,CAAA,kBAAfA,GADAC,cAAc,CAAA,kBAAdA,GAEAC,cAAc,CAAA,kBAAdA,GAGAC,oBAAoB,CAAA,kBAApBA,GAFAC,mBAAmB,CAAA,kBAAnBA,GA2IDC,YAAY,CAAA,kBAAZA,uEA9IL,IAAMJ,EAAiB,UACjBD,EAAkB,WAClBE,EAAiB,UACjBE,EAAsB,eACtBL,EAAqB,cACrBI,EAAuB,gBAyI7B,IAAKE,eAAAA,WAAAA,GAAAA,OAAAA,wPChJL,SAASC,EACdC,CAAuB,EAEvB,OACc,OAAZA,GACA,AAAmB,iBAAZA,GACP,SAAUA,GACc,YAAxB,OAA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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACH,GAAA,CAAA,AAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAET,CACA,CAAC,QAAA,CAAA,AAAU,CAAA,AAAE,EAAA,CAAA,AAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,AAAR,CAAQ,CAAA,CAAA,AAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,AAAG,CAAA,CAAA,CAAA,CAAA,CAAA,AAAM,CAAA,CAAA,CAAA,CAAA,CAAA,AAAM,cAAA,CAAA,AAAgB,CAAA,CAAA,CAAA,CAAA,AAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,CACpF","ignoreList":[0,1,2,3,4,5,6,7,8,9,12]}
@@ -1,3 +1,3 @@
1
- module.exports=[38783,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactServerDOMTurbopackClient},35112,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactDOM},92434,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"warnOnce",{enumerable:!0,get:function(){return d}});let d=a=>{}},68063,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={getDeploymentId:function(){return f},getDeploymentIdQueryOrEmptyString:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(){return!1}function g(){return""}},8591,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"useMergedRef",{enumerable:!0,get:function(){return e}});let d=a.r(72131);function e(a,b){let c=(0,d.useRef)(null),e=(0,d.useRef)(null);return(0,d.useCallback)(d=>{if(null===d){let a=c.current;a&&(c.current=null,a());let b=e.current;b&&(e.current=null,b())}else a&&(c.current=f(a,d)),b&&(e.current=f(b,d))},[a,b])}function f(a,b){if("function"!=typeof a)return a.current=b,()=>{a.current=null};{let c=a(b);return"function"==typeof c?c:()=>a(null)}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},88347,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d,e={ACTION_HMR_REFRESH:function(){return k},ACTION_NAVIGATE:function(){return h},ACTION_REFRESH:function(){return g},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return l},ACTION_SERVER_PATCH:function(){return j},PrefetchKind:function(){return m}};for(var f in e)Object.defineProperty(c,f,{enumerable:!0,get:e[f]});let g="refresh",h="navigate",i="restore",j="server-patch",k="hmr-refresh",l="server-action";var m=((d={}).AUTO="auto",d.FULL="full",d);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},67009,(a,b,c)=>{"use strict";function d(a){return null!==a&&"object"==typeof a&&"then"in a&&"function"==typeof a.then}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isThenable",{enumerable:!0,get:function(){return d}})},90841,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={dispatchAppRouterAction:function(){return i},useActionQueue:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(46058)._(a.r(72131)),g=a.r(67009),h=null;function i(a){if(null===h)throw Object.defineProperty(Error("Internal Next.js error: Router action dispatched before initialization."),"__NEXT_ERROR_CODE",{value:"E668",enumerable:!1,configurable:!0});h(a)}function j(a){let[b,c]=f.default.useState(a.state);h=b=>a.dispatch(b,c);let d=(0,f.useMemo)(()=>b,[b]);return(0,g.isThenable)(d)?(0,f.use)(d):d}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},20611,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"callServer",{enumerable:!0,get:function(){return g}});let d=a.r(72131),e=a.r(88347),f=a.r(90841);async function g(a,b){return new Promise((c,g)=>{(0,d.startTransition)(()=>{(0,f.dispatchAppRouterAction)({type:e.ACTION_SERVER_ACTION,actionId:a,actionArgs:b,resolve:c,reject:g})})})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},1722,(a,b,c)=>{"use strict";let d;Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"findSourceMapURL",{enumerable:!0,get:function(){return d}});("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},37047,a=>{"use strict";let b=(0,a.i(70106).default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);a.s(["KeyRound",()=>b],37047)},97501,16093,a=>{"use strict";var b=a.i(5050);let c=(0,b.createServerReference)("006b7a10f839b3ad9a8e3cb7090a78f9691c43c62f",b.callServer,void 0,b.findSourceMapURL,"listAgentApiCredentials");a.s(["listAgentApiCredentials",()=>c],97501);let d=(0,b.createServerReference)("008c06297149d94056cb210d81ed9e5e14c82c759a",b.callServer,void 0,b.findSourceMapURL,"listCredentials");a.s(["listCredentials",()=>d],16093)},40777,a=>{"use strict";var b=a.i(87924),c=a.i(71987),d=a.i(96514);function e(){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("a",{href:"https://github.com/m0o0scar/viba",target:"_blank",rel:"noopener noreferrer","aria-label":"Open Viba GitHub repository",className:"fixed top-0 right-0 z-50 h-20 w-20 cursor-pointer border-l border-b border-gray-400 bg-gray-300/95 shadow-sm backdrop-blur-sm transition-colors hover:bg-gray-500/95 dark:border-slate-700 dark:bg-slate-900/95 dark:hover:bg-slate-800/95",style:{clipPath:"polygon(100% 0, 0 0, 100% 100%)"},children:(0,b.jsx)("span",{className:"absolute left-[67%] top-[33%] -translate-x-1/2 -translate-y-1/2",children:(0,b.jsx)(c.default,{src:"/github.png",alt:"GitHub",width:22,height:22,priority:!0,className:"rotate-45"})})}),(0,b.jsx)("main",{className:"flex min-h-screen flex-col items-center justify-start p-4 transition-colors md:p-6",children:(0,b.jsx)(d.default,{mode:"home"})})]})}a.s(["default",()=>e])}];
1
+ module.exports=[38783,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactServerDOMTurbopackClient},35112,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactDOM},92434,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"warnOnce",{enumerable:!0,get:function(){return d}});let d=a=>{}},68063,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={getDeploymentId:function(){return f},getDeploymentIdQueryOrEmptyString:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(){return!1}function g(){return""}},8591,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"useMergedRef",{enumerable:!0,get:function(){return e}});let d=a.r(72131);function e(a,b){let c=(0,d.useRef)(null),e=(0,d.useRef)(null);return(0,d.useCallback)(d=>{if(null===d){let a=c.current;a&&(c.current=null,a());let b=e.current;b&&(e.current=null,b())}else a&&(c.current=f(a,d)),b&&(e.current=f(b,d))},[a,b])}function f(a,b){if("function"!=typeof a)return a.current=b,()=>{a.current=null};{let c=a(b);return"function"==typeof c?c:()=>a(null)}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},88347,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d,e={ACTION_HMR_REFRESH:function(){return k},ACTION_NAVIGATE:function(){return h},ACTION_REFRESH:function(){return g},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return l},ACTION_SERVER_PATCH:function(){return j},PrefetchKind:function(){return m}};for(var f in e)Object.defineProperty(c,f,{enumerable:!0,get:e[f]});let g="refresh",h="navigate",i="restore",j="server-patch",k="hmr-refresh",l="server-action";var m=((d={}).AUTO="auto",d.FULL="full",d);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},67009,(a,b,c)=>{"use strict";function d(a){return null!==a&&"object"==typeof a&&"then"in a&&"function"==typeof a.then}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isThenable",{enumerable:!0,get:function(){return d}})},90841,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={dispatchAppRouterAction:function(){return i},useActionQueue:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(46058)._(a.r(72131)),g=a.r(67009),h=null;function i(a){if(null===h)throw Object.defineProperty(Error("Internal Next.js error: Router action dispatched before initialization."),"__NEXT_ERROR_CODE",{value:"E668",enumerable:!1,configurable:!0});h(a)}function j(a){let[b,c]=f.default.useState(a.state);h=b=>a.dispatch(b,c);let d=(0,f.useMemo)(()=>b,[b]);return(0,g.isThenable)(d)?(0,f.use)(d):d}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},20611,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"callServer",{enumerable:!0,get:function(){return g}});let d=a.r(72131),e=a.r(88347),f=a.r(90841);async function g(a,b){return new Promise((c,g)=>{(0,d.startTransition)(()=>{(0,f.dispatchAppRouterAction)({type:e.ACTION_SERVER_ACTION,actionId:a,actionArgs:b,resolve:c,reject:g})})})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},1722,(a,b,c)=>{"use strict";let d;Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"findSourceMapURL",{enumerable:!0,get:function(){return d}});("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},37047,a=>{"use strict";let b=(0,a.i(70106).default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);a.s(["KeyRound",()=>b],37047)},955,7469,a=>{"use strict";var b=a.i(5050);let c=(0,b.createServerReference)("007854b56845eeafde2c9685b51a376a63b707aad1",b.callServer,void 0,b.findSourceMapURL,"listAgentApiCredentials");a.s(["listAgentApiCredentials",()=>c],955);let d=(0,b.createServerReference)("0037e57dce0e01173d262d9f2abbeeda52df8d7e4f",b.callServer,void 0,b.findSourceMapURL,"listCredentials");a.s(["listCredentials",()=>d],7469)},40777,a=>{"use strict";var b=a.i(87924),c=a.i(71987),d=a.i(96514);function e(){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("a",{href:"https://github.com/m0o0scar/viba",target:"_blank",rel:"noopener noreferrer","aria-label":"Open Viba GitHub repository",className:"fixed top-0 right-0 z-50 h-20 w-20 cursor-pointer border-l border-b border-gray-400 bg-gray-300/95 shadow-sm backdrop-blur-sm transition-colors hover:bg-gray-500/95 dark:border-slate-700 dark:bg-slate-900/95 dark:hover:bg-slate-800/95",style:{clipPath:"polygon(100% 0, 0 0, 100% 100%)"},children:(0,b.jsx)("span",{className:"absolute left-[67%] top-[33%] -translate-x-1/2 -translate-y-1/2",children:(0,b.jsx)(c.default,{src:"/github.png",alt:"GitHub",width:22,height:22,priority:!0,className:"rotate-45"})})}),(0,b.jsx)("main",{className:"flex min-h-screen flex-col items-center justify-start p-4 transition-colors md:p-6",children:(0,b.jsx)(d.default,{mode:"home"})})]})}a.s(["default",()=>e])}];
2
2
 
3
- //# sourceMappingURL=_be721a9c._.js.map
3
+ //# sourceMappingURL=_4343fa01._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-dom.ts","../../../../node_modules/next/src/shared/lib/utils/warn-once.ts","../../../../node_modules/next/src/shared/lib/deployment-id.ts","../../../../node_modules/next/src/client/use-merged-ref.ts","../../../../node_modules/next/src/client/components/router-reducer/router-reducer-types.ts","../../../../node_modules/next/src/shared/lib/is-thenable.ts","../../../../node_modules/next/src/client/components/use-action-queue.ts","../../../../node_modules/next/src/client/app-call-server.ts","../../../../node_modules/next/src/client/app-find-source-map-url.ts","../../../../node_modules/lucide-react/src/icons/key-round.ts","../../../../src/app/actions/data%3Ae1ff37%20%3Ctext/javascript%3E","../../../../src/app/actions/data%3Ac31e21%20%3Ctext/javascript%3E","../../../../src/app/page.tsx"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactServerDOMTurbopackClient\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactDOM\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n","// This could also be a variable instead of a function, but some unit tests want to change the ID at\n// runtime. Even though that would never happen in a real deployment.\nexport function getDeploymentId(): string | undefined {\n return process.env.NEXT_DEPLOYMENT_ID\n}\n\nexport function getDeploymentIdQueryOrEmptyString(): string {\n let deploymentId = getDeploymentId()\n if (deploymentId) {\n return `?dpl=${deploymentId}`\n }\n return ''\n}\n","import { useCallback, useRef, type Ref } from 'react'\n\n// This is a compatibility hook to support React 18 and 19 refs.\n// In 19, a cleanup function from refs may be returned.\n// In 18, returning a cleanup function creates a warning.\n// Since we take userspace refs, we don't know ahead of time if a cleanup function will be returned.\n// This implements cleanup functions with the old behavior in 18.\n// We know refs are always called alternating with `null` and then `T`.\n// So a call with `null` means we need to call the previous cleanup functions.\nexport function useMergedRef<TElement>(\n refA: Ref<TElement>,\n refB: Ref<TElement>\n): Ref<TElement> {\n const cleanupA = useRef<(() => void) | null>(null)\n const cleanupB = useRef<(() => void) | null>(null)\n\n // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.\n // (this happens often if the user doesn't pass a ref to Link/Form/Image)\n // But this can cause us to leak a cleanup-ref into user code (previously via `<Link legacyBehavior>`),\n // and the user might pass that ref into ref-merging library that doesn't support cleanup refs\n // (because it hasn't been updated for React 19)\n // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.\n // So in practice, it's safer to be defensive and always wrap the ref, even on React 19.\n return useCallback(\n (current: TElement | null): void => {\n if (current === null) {\n const cleanupFnA = cleanupA.current\n if (cleanupFnA) {\n cleanupA.current = null\n cleanupFnA()\n }\n const cleanupFnB = cleanupB.current\n if (cleanupFnB) {\n cleanupB.current = null\n cleanupFnB()\n }\n } else {\n if (refA) {\n cleanupA.current = applyRef(refA, current)\n }\n if (refB) {\n cleanupB.current = applyRef(refB, current)\n }\n }\n },\n [refA, refB]\n )\n}\n\nfunction applyRef<TElement>(\n refA: NonNullable<Ref<TElement>>,\n current: TElement\n) {\n if (typeof refA === 'function') {\n const cleanup = refA(current)\n if (typeof cleanup === 'function') {\n return cleanup\n } else {\n return () => refA(null)\n }\n } else {\n refA.current = current\n return () => {\n refA.current = null\n }\n }\n}\n","import type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n} from '../../../shared/lib/app-router-types'\nimport type { NavigationSeed } from '../segment-cache/navigation'\nimport type { FetchServerResponseResult } from './fetch-server-response'\n\nexport const ACTION_REFRESH = 'refresh'\nexport const ACTION_NAVIGATE = 'navigate'\nexport const ACTION_RESTORE = 'restore'\nexport const ACTION_SERVER_PATCH = 'server-patch'\nexport const ACTION_HMR_REFRESH = 'hmr-refresh'\nexport const ACTION_SERVER_ACTION = 'server-action'\n\nexport type RouterChangeByServerResponse = ({\n navigatedAt,\n previousTree,\n serverResponse,\n}: {\n navigatedAt: number\n previousTree: FlightRouterState\n serverResponse: FetchServerResponseResult\n}) => void\n\nexport interface Mutable {\n mpaNavigation?: boolean\n patchedTree?: FlightRouterState\n renderedSearch?: string\n canonicalUrl?: string\n scrollableSegments?: FlightSegmentPath[]\n pendingPush?: boolean\n cache?: CacheNode\n hashFragment?: string\n shouldScroll?: boolean\n preserveCustomHistoryState?: boolean\n onlyHashChange?: boolean\n collectedDebugInfo?: Array<unknown>\n}\n\nexport interface ServerActionMutable extends Mutable {\n inFlightServerAction?: Promise<any> | null\n}\n\n/**\n * Refresh triggers a refresh of the full page data.\n * - fetches the Flight data and fills rsc at the root of the cache.\n * - The router state is updated at the root.\n */\nexport interface RefreshAction {\n type: typeof ACTION_REFRESH\n}\n\nexport interface HmrRefreshAction {\n type: typeof ACTION_HMR_REFRESH\n}\n\nexport type ServerActionDispatcher = (\n args: Omit<\n ServerActionAction,\n 'type' | 'mutable' | 'navigate' | 'changeByServerResponse' | 'cache'\n >\n) => void\n\nexport interface ServerActionAction {\n type: typeof ACTION_SERVER_ACTION\n actionId: string\n actionArgs: any[]\n resolve: (value: any) => void\n reject: (reason?: any) => void\n didRevalidate?: boolean\n}\n\n/**\n * Navigate triggers a navigation to the provided url. It supports two types: `push` and `replace`.\n *\n * `navigateType`:\n * - `push` - pushes a new history entry in the browser history\n * - `replace` - replaces the current history entry in the browser history\n *\n * Navigate has multiple cache heuristics:\n * - page was prefetched\n * - Apply router state tree from prefetch\n * - Apply Flight data from prefetch to the cache\n * - If Flight data is a string, it's a redirect and the state is updated to trigger a redirect\n * - Check if hard navigation is needed\n * - Hard navigation happens when a dynamic parameter below the common layout changed\n * - When hard navigation is needed the cache is invalidated below the flightSegmentPath\n * - The missing cache nodes of the page will be fetched in layout-router and trigger the SERVER_PATCH action\n * - If hard navigation is not needed\n * - The cache is reused\n * - If any cache nodes are missing they'll be fetched in layout-router and trigger the SERVER_PATCH action\n * - page was not prefetched\n * - The navigate was called from `next/router` (`router.push()` / `router.replace()`) / `next/link` without prefetched data available (e.g. the prefetch didn't come back from the server before clicking the link)\n * - Flight data is fetched in the reducer (suspends the reducer)\n * - Router state tree is created based on Flight data\n * - Cache is filled based on the Flight data\n *\n * Above steps explain 3 cases:\n * - `soft` - Reuses the existing cache and fetches missing nodes in layout-router.\n * - `hard` - Creates a new cache where cache nodes are removed below the common layout and fetches missing nodes in layout-router.\n * - `optimistic` (explicit no prefetch) - Creates a new cache and kicks off the data fetch in the reducer. The data fetch is awaited in the layout-router.\n */\nexport interface NavigateAction {\n type: typeof ACTION_NAVIGATE\n url: URL\n isExternalUrl: boolean\n locationSearch: Location['search']\n navigateType: 'push' | 'replace'\n shouldScroll: boolean\n}\n\n/**\n * Restore applies the provided router state.\n * - Used for `popstate` (back/forward navigation) where a known router state has to be applied.\n * - Also used when syncing the router state with `pushState`/`replaceState` calls.\n * - Router state is applied as-is from the history state, if available.\n * - If the history state does not contain the router state, the existing router state is used.\n * - If any cache node is missing it will be fetched in layout-router during rendering and the server-patch case.\n * - If existing cache nodes match these are used.\n */\nexport interface RestoreAction {\n type: typeof ACTION_RESTORE\n url: URL\n historyState: AppHistoryState | undefined\n}\n\nexport type AppHistoryState = {\n tree: FlightRouterState\n renderedSearch: string\n}\n\n/**\n * Server-patch applies the provided Flight data to the cache and router tree.\n */\nexport interface ServerPatchAction {\n type: typeof ACTION_SERVER_PATCH\n previousTree: FlightRouterState\n url: URL\n nextUrl: string | null\n seed: NavigationSeed | null\n mpa: boolean\n}\n\n/**\n * PrefetchKind defines the type of prefetching that should be done.\n * - `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully.\n * - `full` - prefetch the page data fully.\n */\n\nexport enum PrefetchKind {\n AUTO = 'auto',\n FULL = 'full',\n}\n\n/**\n * Prefetch adds the provided FlightData to the prefetch cache\n * - Creates the router state tree based on the patch in FlightData\n * - Adds the FlightData to the prefetch cache\n * - In ACTION_NAVIGATE the prefetch cache is checked and the router state tree and FlightData are applied.\n */\n\nexport interface PushRef {\n /**\n * If the app-router should push a new history entry in app-router's useEffect()\n */\n pendingPush: boolean\n /**\n * Multi-page navigation through location.href.\n */\n mpaNavigation: boolean\n /**\n * Skip applying the router state to the browser history state.\n */\n preserveCustomHistoryState: boolean\n}\n\nexport type FocusAndScrollRef = {\n /**\n * If focus and scroll should be set in the layout-router's useEffect()\n */\n apply: boolean\n /**\n * The hash fragment that should be scrolled to.\n */\n hashFragment: string | null\n /**\n * The paths of the segments that should be focused.\n */\n segmentPaths: FlightSegmentPath[]\n /**\n * If only the URLs hash fragment changed\n */\n onlyHashChange: boolean\n}\n\n/**\n * Handles keeping the state of app-router.\n */\nexport type AppRouterState = {\n /**\n * The router state, this is written into the history state in app-router using replaceState/pushState.\n * - Has to be serializable as it is written into the history state.\n * - Holds which segments and parallel routes are shown on the screen.\n */\n tree: FlightRouterState\n /**\n * The cache holds React nodes for every segment that is shown on screen as well as previously shown segments.\n * It also holds in-progress data requests.\n */\n cache: CacheNode\n /**\n * Decides if the update should create a new history entry and if the navigation has to trigger a browser navigation.\n */\n pushRef: PushRef\n /**\n * Decides if the update should apply scroll and focus management.\n */\n focusAndScrollRef: FocusAndScrollRef\n /**\n * The canonical url that is pushed/replaced.\n * - This is the url you see in the browser.\n */\n canonicalUrl: string\n renderedSearch: string\n /**\n * The underlying \"url\" representing the UI state, which is used for intercepting routes.\n */\n nextUrl: string | null\n\n /**\n * The previous next-url that was used previous to a dynamic navigation.\n */\n previousNextUrl: string | null\n\n debugInfo: Array<unknown> | null\n}\n\nexport type ReadonlyReducerState = Readonly<AppRouterState>\nexport type ReducerState =\n | (Promise<AppRouterState> & { _debugInfo?: Array<unknown> })\n | AppRouterState\nexport type ReducerActions = Readonly<\n | RefreshAction\n | NavigateAction\n | RestoreAction\n | ServerPatchAction\n | HmrRefreshAction\n | ServerActionAction\n>\n","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n promise: Promise<T> | T\n): promise is Promise<T> {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n","import type { Dispatch } from 'react'\nimport React, { use, useMemo } from 'react'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport type { AppRouterActionQueue } from './app-router-instance'\nimport type {\n AppRouterState,\n ReducerActions,\n ReducerState,\n} from './router-reducer/router-reducer-types'\n\n// The app router state lives outside of React, so we can import the dispatch\n// method directly wherever we need it, rather than passing it around via props\n// or context.\nlet dispatch: Dispatch<ReducerActions> | null = null\n\nexport function dispatchAppRouterAction(action: ReducerActions) {\n if (dispatch === null) {\n throw new Error(\n 'Internal Next.js error: Router action dispatched before initialization.'\n )\n }\n dispatch(action)\n}\n\nconst __DEV__ = process.env.NODE_ENV !== 'production'\nconst promisesWithDebugInfo: WeakMap<\n Promise<AppRouterState>,\n Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n> = __DEV__ ? new WeakMap() : (null as any)\n\nexport function useActionQueue(\n actionQueue: AppRouterActionQueue\n): AppRouterState {\n const [state, setState] = React.useState<ReducerState>(actionQueue.state)\n\n // Because of a known issue that requires to decode Flight streams inside the\n // render phase, we have to be a bit clever and assign the dispatch method to\n // a module-level variable upon initialization. The useState hook in this\n // module only exists to synchronize state that lives outside of React.\n // Ideally, what we'd do instead is pass the state as a prop to root.render;\n // this is conceptually how we're modeling the app router state, despite the\n // weird implementation details.\n if (process.env.NODE_ENV !== 'production') {\n const { useAppDevRenderingIndicator } =\n require('../../next-devtools/userspace/use-app-dev-rendering-indicator') as typeof import('../../next-devtools/userspace/use-app-dev-rendering-indicator')\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const appDevRenderingIndicator = useAppDevRenderingIndicator()\n\n dispatch = (action: ReducerActions) => {\n appDevRenderingIndicator(() => {\n actionQueue.dispatch(action, setState)\n })\n }\n } else {\n dispatch = (action: ReducerActions) =>\n actionQueue.dispatch(action, setState)\n }\n\n // When navigating to a non-prefetched route, then App Router state will be\n // blocked until the server responds. We need to transfer the `_debugInfo`\n // from the underlying Flight response onto the top-level promise that is\n // passed to React (via `use`) so that the latency is accurately represented\n // in the React DevTools.\n const stateWithDebugInfo = useMemo(() => {\n if (!__DEV__) {\n return state\n }\n\n if (isThenable(state)) {\n // useMemo can't be used to cache a Promise since the memoized value is thrown\n // away when we suspend. So we use a WeakMap to cache the Promise with debug info.\n let promiseWithDebugInfo = promisesWithDebugInfo.get(state)\n if (promiseWithDebugInfo === undefined) {\n const debugInfo: Array<unknown> = []\n promiseWithDebugInfo = Promise.resolve(state).then((asyncState) => {\n if (asyncState.debugInfo !== null) {\n debugInfo.push(...asyncState.debugInfo)\n }\n return asyncState\n }) as Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n promiseWithDebugInfo._debugInfo = debugInfo\n\n promisesWithDebugInfo.set(state, promiseWithDebugInfo)\n }\n\n return promiseWithDebugInfo\n }\n return state\n }, [state])\n\n return isThenable(stateWithDebugInfo)\n ? use(stateWithDebugInfo)\n : stateWithDebugInfo\n}\n","import { startTransition } from 'react'\nimport { ACTION_SERVER_ACTION } from './components/router-reducer/router-reducer-types'\nimport { dispatchAppRouterAction } from './components/use-action-queue'\n\nexport async function callServer(actionId: string, actionArgs: any[]) {\n return new Promise((resolve, reject) => {\n startTransition(() => {\n dispatchAppRouterAction({\n type: ACTION_SERVER_ACTION,\n actionId,\n actionArgs,\n resolve,\n reject,\n })\n })\n })\n}\n","const basePath = process.env.__NEXT_ROUTER_BASEPATH || ''\nconst pathname = `${basePath}/__nextjs_source-map`\n\nexport const findSourceMapURL =\n process.env.NODE_ENV === 'development'\n ? function findSourceMapURL(filename: string): string | null {\n if (filename === '') {\n return null\n }\n\n if (\n filename.startsWith(document.location.origin) &&\n filename.includes('/_next/static')\n ) {\n // This is a request for a client chunk. This can only happen when\n // using Turbopack. In this case, since we control how those source\n // maps are generated, we can safely assume that the sourceMappingURL\n // is relative to the filename, with an added `.map` extension. The\n // browser can just request this file, and it gets served through the\n // normal dev server, without the need to route this through\n // the `/__nextjs_source-map` dev middleware.\n return `${filename}.map`\n }\n\n const url = new URL(pathname, document.location.origin)\n url.searchParams.set('filename', filename)\n\n return url.href\n }\n : undefined\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z',\n key: '1s6t7t',\n },\n ],\n ['circle', { cx: '16.5', cy: '7.5', r: '.5', fill: 'currentColor', key: 'w0ekpg' }],\n];\n\n/**\n * @component @name KeyRound\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMi41ODYgMTcuNDE0QTIgMiAwIDAgMCAyIDE4LjgyOFYyMWExIDEgMCAwIDAgMSAxaDNhMSAxIDAgMCAwIDEtMXYtMWExIDEgMCAwIDEgMS0xaDFhMSAxIDAgMCAwIDEtMXYtMWExIDEgMCAwIDEgMS0xaC4xNzJhMiAyIDAgMCAwIDEuNDE0LS41ODZsLjgxNC0uODE0YTYuNSA2LjUgMCAxIDAtNC00eiIgLz4KICA8Y2lyY2xlIGN4PSIxNi41IiBjeT0iNy41IiByPSIuNSIgZmlsbD0iY3VycmVudENvbG9yIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/key-round\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst KeyRound = createLucideIcon('key-round', __iconNode);\n\nexport default KeyRound;\n","/* __next_internal_action_entry_do_not_use__ [{\"006b7a10f839b3ad9a8e3cb7090a78f9691c43c62f\":\"listAgentApiCredentials\"},\"src/app/actions/credentials.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_3=/*#__PURE__*/createServerReference(\"006b7a10f839b3ad9a8e3cb7090a78f9691c43c62f\",callServer,void 0,findSourceMapURL,\"listAgentApiCredentials\");export{$$RSC_SERVER_ACTION_3 as listAgentApiCredentials};","/* __next_internal_action_entry_do_not_use__ [{\"008c06297149d94056cb210d81ed9e5e14c82c759a\":\"listCredentials\"},\"src/app/actions/credentials.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"008c06297149d94056cb210d81ed9e5e14c82c759a\",callServer,void 0,findSourceMapURL,\"listCredentials\");export{$$RSC_SERVER_ACTION_0 as listCredentials};","'use client';\n\nimport Image from \"next/image\";\nimport GitRepoSelector from \"@/components/GitRepoSelector\";\n\nexport default function Home() {\n return (\n <>\n <a\n href=\"https://github.com/m0o0scar/viba\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label=\"Open Viba GitHub repository\"\n className=\"fixed top-0 right-0 z-50 h-20 w-20 cursor-pointer border-l border-b border-gray-400 bg-gray-300/95 shadow-sm backdrop-blur-sm transition-colors hover:bg-gray-500/95 dark:border-slate-700 dark:bg-slate-900/95 dark:hover:bg-slate-800/95\"\n style={{ clipPath: \"polygon(100% 0, 0 0, 100% 100%)\" }}\n >\n <span className=\"absolute left-[67%] top-[33%] -translate-x-1/2 -translate-y-1/2\">\n <Image src=\"/github.png\" alt=\"GitHub\" width={22} height={22} priority className=\"rotate-45\" />\n </span>\n </a>\n <main className=\"flex min-h-screen flex-col items-center justify-start p-4 transition-colors md:p-6\">\n <GitRepoSelector mode=\"home\" />\n </main>\n </>\n );\n}\n"],"names":["module","exports","require","vendored","ReactServerDOMTurbopackClient","ReactDOM","warnOnce","_","process","env","NODE_ENV","warnings","Set","msg","has","console","warn","add","getDeploymentId","getDeploymentIdQueryOrEmptyString","NEXT_DEPLOYMENT_ID","deploymentId","useMergedRef","refA","refB","cleanupA","useRef","cleanupB","useCallback","current","cleanupFnA","cleanupFnB","applyRef","cleanup","ACTION_HMR_REFRESH","ACTION_NAVIGATE","ACTION_REFRESH","ACTION_RESTORE","ACTION_SERVER_ACTION","ACTION_SERVER_PATCH","PrefetchKind","isThenable","promise","then","dispatchAppRouterAction","useActionQueue","dispatch","action","Error","__DEV__","promisesWithDebugInfo","WeakMap","actionQueue","state","setState","React","useState","useAppDevRenderingIndicator","appDevRenderingIndicator","stateWithDebugInfo","useMemo","promiseWithDebugInfo","get","undefined","debugInfo","Promise","resolve","asyncState","push","_debugInfo","set","use","callServer","actionId","actionArgs","reject","startTransition","type","findSourceMapURL","basePath","__NEXT_ROUTER_BASEPATH","pathname","filename","startsWith","document","location","origin","includes","url","URL","searchParams","href"],"mappings":"6CAAAA,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEC,6BAA6B,+BCFtDJ,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEE,QAAQ,wGCSxBC,WAAAA,qCAAAA,KAXT,IAAIA,EAAW,AAACC,IAAe,wFCEfW,eAAe,CAAA,kBAAfA,GAIAC,iCAAiC,CAAA,kBAAjCA,uEAJT,SAASD,IACd,MAAqC,CAA9BV,AAA8B,CAC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AAA,EAAA,EAAA,QAAA,CAAA,WACE,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CACC,KAAK,mCACL,OAAO,SACP,IAAI,sBACJ,aAAW,8BACX,UAAU,6OACV,MAAO,CAAE,SAAU,iCAAkC,WAErD,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,2EACd,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAK,CAAA,CAAC,IAAI,cAAc,IAAI,SAAS,MAAO,GAAI,OAAQ,GAAI,QAAQ,CAAA,CAAA,EAAC,UAAU,kBAGpF,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,8FACd,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAe,CAAA,CAAC,KAAK,aAI9B","ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
1
+ {"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-dom.ts","../../../../node_modules/next/src/shared/lib/utils/warn-once.ts","../../../../node_modules/next/src/shared/lib/deployment-id.ts","../../../../node_modules/next/src/client/use-merged-ref.ts","../../../../node_modules/next/src/client/components/router-reducer/router-reducer-types.ts","../../../../node_modules/next/src/shared/lib/is-thenable.ts","../../../../node_modules/next/src/client/components/use-action-queue.ts","../../../../node_modules/next/src/client/app-call-server.ts","../../../../node_modules/next/src/client/app-find-source-map-url.ts","../../../../node_modules/lucide-react/src/icons/key-round.ts","../../../../src/app/actions/data%3Ab88ff1%20%3Ctext/javascript%3E","../../../../src/app/actions/data%3A7c1bc9%20%3Ctext/javascript%3E","../../../../src/app/page.tsx"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactServerDOMTurbopackClient\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactDOM\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n","// This could also be a variable instead of a function, but some unit tests want to change the ID at\n// runtime. Even though that would never happen in a real deployment.\nexport function getDeploymentId(): string | undefined {\n return process.env.NEXT_DEPLOYMENT_ID\n}\n\nexport function getDeploymentIdQueryOrEmptyString(): string {\n let deploymentId = getDeploymentId()\n if (deploymentId) {\n return `?dpl=${deploymentId}`\n }\n return ''\n}\n","import { useCallback, useRef, type Ref } from 'react'\n\n// This is a compatibility hook to support React 18 and 19 refs.\n// In 19, a cleanup function from refs may be returned.\n// In 18, returning a cleanup function creates a warning.\n// Since we take userspace refs, we don't know ahead of time if a cleanup function will be returned.\n// This implements cleanup functions with the old behavior in 18.\n// We know refs are always called alternating with `null` and then `T`.\n// So a call with `null` means we need to call the previous cleanup functions.\nexport function useMergedRef<TElement>(\n refA: Ref<TElement>,\n refB: Ref<TElement>\n): Ref<TElement> {\n const cleanupA = useRef<(() => void) | null>(null)\n const cleanupB = useRef<(() => void) | null>(null)\n\n // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null.\n // (this happens often if the user doesn't pass a ref to Link/Form/Image)\n // But this can cause us to leak a cleanup-ref into user code (previously via `<Link legacyBehavior>`),\n // and the user might pass that ref into ref-merging library that doesn't support cleanup refs\n // (because it hasn't been updated for React 19)\n // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`.\n // So in practice, it's safer to be defensive and always wrap the ref, even on React 19.\n return useCallback(\n (current: TElement | null): void => {\n if (current === null) {\n const cleanupFnA = cleanupA.current\n if (cleanupFnA) {\n cleanupA.current = null\n cleanupFnA()\n }\n const cleanupFnB = cleanupB.current\n if (cleanupFnB) {\n cleanupB.current = null\n cleanupFnB()\n }\n } else {\n if (refA) {\n cleanupA.current = applyRef(refA, current)\n }\n if (refB) {\n cleanupB.current = applyRef(refB, current)\n }\n }\n },\n [refA, refB]\n )\n}\n\nfunction applyRef<TElement>(\n refA: NonNullable<Ref<TElement>>,\n current: TElement\n) {\n if (typeof refA === 'function') {\n const cleanup = refA(current)\n if (typeof cleanup === 'function') {\n return cleanup\n } else {\n return () => refA(null)\n }\n } else {\n refA.current = current\n return () => {\n refA.current = null\n }\n }\n}\n","import type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n} from '../../../shared/lib/app-router-types'\nimport type { NavigationSeed } from '../segment-cache/navigation'\nimport type { FetchServerResponseResult } from './fetch-server-response'\n\nexport const ACTION_REFRESH = 'refresh'\nexport const ACTION_NAVIGATE = 'navigate'\nexport const ACTION_RESTORE = 'restore'\nexport const ACTION_SERVER_PATCH = 'server-patch'\nexport const ACTION_HMR_REFRESH = 'hmr-refresh'\nexport const ACTION_SERVER_ACTION = 'server-action'\n\nexport type RouterChangeByServerResponse = ({\n navigatedAt,\n previousTree,\n serverResponse,\n}: {\n navigatedAt: number\n previousTree: FlightRouterState\n serverResponse: FetchServerResponseResult\n}) => void\n\nexport interface Mutable {\n mpaNavigation?: boolean\n patchedTree?: FlightRouterState\n renderedSearch?: string\n canonicalUrl?: string\n scrollableSegments?: FlightSegmentPath[]\n pendingPush?: boolean\n cache?: CacheNode\n hashFragment?: string\n shouldScroll?: boolean\n preserveCustomHistoryState?: boolean\n onlyHashChange?: boolean\n collectedDebugInfo?: Array<unknown>\n}\n\nexport interface ServerActionMutable extends Mutable {\n inFlightServerAction?: Promise<any> | null\n}\n\n/**\n * Refresh triggers a refresh of the full page data.\n * - fetches the Flight data and fills rsc at the root of the cache.\n * - The router state is updated at the root.\n */\nexport interface RefreshAction {\n type: typeof ACTION_REFRESH\n}\n\nexport interface HmrRefreshAction {\n type: typeof ACTION_HMR_REFRESH\n}\n\nexport type ServerActionDispatcher = (\n args: Omit<\n ServerActionAction,\n 'type' | 'mutable' | 'navigate' | 'changeByServerResponse' | 'cache'\n >\n) => void\n\nexport interface ServerActionAction {\n type: typeof ACTION_SERVER_ACTION\n actionId: string\n actionArgs: any[]\n resolve: (value: any) => void\n reject: (reason?: any) => void\n didRevalidate?: boolean\n}\n\n/**\n * Navigate triggers a navigation to the provided url. It supports two types: `push` and `replace`.\n *\n * `navigateType`:\n * - `push` - pushes a new history entry in the browser history\n * - `replace` - replaces the current history entry in the browser history\n *\n * Navigate has multiple cache heuristics:\n * - page was prefetched\n * - Apply router state tree from prefetch\n * - Apply Flight data from prefetch to the cache\n * - If Flight data is a string, it's a redirect and the state is updated to trigger a redirect\n * - Check if hard navigation is needed\n * - Hard navigation happens when a dynamic parameter below the common layout changed\n * - When hard navigation is needed the cache is invalidated below the flightSegmentPath\n * - The missing cache nodes of the page will be fetched in layout-router and trigger the SERVER_PATCH action\n * - If hard navigation is not needed\n * - The cache is reused\n * - If any cache nodes are missing they'll be fetched in layout-router and trigger the SERVER_PATCH action\n * - page was not prefetched\n * - The navigate was called from `next/router` (`router.push()` / `router.replace()`) / `next/link` without prefetched data available (e.g. the prefetch didn't come back from the server before clicking the link)\n * - Flight data is fetched in the reducer (suspends the reducer)\n * - Router state tree is created based on Flight data\n * - Cache is filled based on the Flight data\n *\n * Above steps explain 3 cases:\n * - `soft` - Reuses the existing cache and fetches missing nodes in layout-router.\n * - `hard` - Creates a new cache where cache nodes are removed below the common layout and fetches missing nodes in layout-router.\n * - `optimistic` (explicit no prefetch) - Creates a new cache and kicks off the data fetch in the reducer. The data fetch is awaited in the layout-router.\n */\nexport interface NavigateAction {\n type: typeof ACTION_NAVIGATE\n url: URL\n isExternalUrl: boolean\n locationSearch: Location['search']\n navigateType: 'push' | 'replace'\n shouldScroll: boolean\n}\n\n/**\n * Restore applies the provided router state.\n * - Used for `popstate` (back/forward navigation) where a known router state has to be applied.\n * - Also used when syncing the router state with `pushState`/`replaceState` calls.\n * - Router state is applied as-is from the history state, if available.\n * - If the history state does not contain the router state, the existing router state is used.\n * - If any cache node is missing it will be fetched in layout-router during rendering and the server-patch case.\n * - If existing cache nodes match these are used.\n */\nexport interface RestoreAction {\n type: typeof ACTION_RESTORE\n url: URL\n historyState: AppHistoryState | undefined\n}\n\nexport type AppHistoryState = {\n tree: FlightRouterState\n renderedSearch: string\n}\n\n/**\n * Server-patch applies the provided Flight data to the cache and router tree.\n */\nexport interface ServerPatchAction {\n type: typeof ACTION_SERVER_PATCH\n previousTree: FlightRouterState\n url: URL\n nextUrl: string | null\n seed: NavigationSeed | null\n mpa: boolean\n}\n\n/**\n * PrefetchKind defines the type of prefetching that should be done.\n * - `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully.\n * - `full` - prefetch the page data fully.\n */\n\nexport enum PrefetchKind {\n AUTO = 'auto',\n FULL = 'full',\n}\n\n/**\n * Prefetch adds the provided FlightData to the prefetch cache\n * - Creates the router state tree based on the patch in FlightData\n * - Adds the FlightData to the prefetch cache\n * - In ACTION_NAVIGATE the prefetch cache is checked and the router state tree and FlightData are applied.\n */\n\nexport interface PushRef {\n /**\n * If the app-router should push a new history entry in app-router's useEffect()\n */\n pendingPush: boolean\n /**\n * Multi-page navigation through location.href.\n */\n mpaNavigation: boolean\n /**\n * Skip applying the router state to the browser history state.\n */\n preserveCustomHistoryState: boolean\n}\n\nexport type FocusAndScrollRef = {\n /**\n * If focus and scroll should be set in the layout-router's useEffect()\n */\n apply: boolean\n /**\n * The hash fragment that should be scrolled to.\n */\n hashFragment: string | null\n /**\n * The paths of the segments that should be focused.\n */\n segmentPaths: FlightSegmentPath[]\n /**\n * If only the URLs hash fragment changed\n */\n onlyHashChange: boolean\n}\n\n/**\n * Handles keeping the state of app-router.\n */\nexport type AppRouterState = {\n /**\n * The router state, this is written into the history state in app-router using replaceState/pushState.\n * - Has to be serializable as it is written into the history state.\n * - Holds which segments and parallel routes are shown on the screen.\n */\n tree: FlightRouterState\n /**\n * The cache holds React nodes for every segment that is shown on screen as well as previously shown segments.\n * It also holds in-progress data requests.\n */\n cache: CacheNode\n /**\n * Decides if the update should create a new history entry and if the navigation has to trigger a browser navigation.\n */\n pushRef: PushRef\n /**\n * Decides if the update should apply scroll and focus management.\n */\n focusAndScrollRef: FocusAndScrollRef\n /**\n * The canonical url that is pushed/replaced.\n * - This is the url you see in the browser.\n */\n canonicalUrl: string\n renderedSearch: string\n /**\n * The underlying \"url\" representing the UI state, which is used for intercepting routes.\n */\n nextUrl: string | null\n\n /**\n * The previous next-url that was used previous to a dynamic navigation.\n */\n previousNextUrl: string | null\n\n debugInfo: Array<unknown> | null\n}\n\nexport type ReadonlyReducerState = Readonly<AppRouterState>\nexport type ReducerState =\n | (Promise<AppRouterState> & { _debugInfo?: Array<unknown> })\n | AppRouterState\nexport type ReducerActions = Readonly<\n | RefreshAction\n | NavigateAction\n | RestoreAction\n | ServerPatchAction\n | HmrRefreshAction\n | ServerActionAction\n>\n","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n promise: Promise<T> | T\n): promise is Promise<T> {\n return (\n promise !== null &&\n typeof promise === 'object' &&\n 'then' in promise &&\n typeof promise.then === 'function'\n )\n}\n","import type { Dispatch } from 'react'\nimport React, { use, useMemo } from 'react'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport type { AppRouterActionQueue } from './app-router-instance'\nimport type {\n AppRouterState,\n ReducerActions,\n ReducerState,\n} from './router-reducer/router-reducer-types'\n\n// The app router state lives outside of React, so we can import the dispatch\n// method directly wherever we need it, rather than passing it around via props\n// or context.\nlet dispatch: Dispatch<ReducerActions> | null = null\n\nexport function dispatchAppRouterAction(action: ReducerActions) {\n if (dispatch === null) {\n throw new Error(\n 'Internal Next.js error: Router action dispatched before initialization.'\n )\n }\n dispatch(action)\n}\n\nconst __DEV__ = process.env.NODE_ENV !== 'production'\nconst promisesWithDebugInfo: WeakMap<\n Promise<AppRouterState>,\n Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n> = __DEV__ ? new WeakMap() : (null as any)\n\nexport function useActionQueue(\n actionQueue: AppRouterActionQueue\n): AppRouterState {\n const [state, setState] = React.useState<ReducerState>(actionQueue.state)\n\n // Because of a known issue that requires to decode Flight streams inside the\n // render phase, we have to be a bit clever and assign the dispatch method to\n // a module-level variable upon initialization. The useState hook in this\n // module only exists to synchronize state that lives outside of React.\n // Ideally, what we'd do instead is pass the state as a prop to root.render;\n // this is conceptually how we're modeling the app router state, despite the\n // weird implementation details.\n if (process.env.NODE_ENV !== 'production') {\n const { useAppDevRenderingIndicator } =\n require('../../next-devtools/userspace/use-app-dev-rendering-indicator') as typeof import('../../next-devtools/userspace/use-app-dev-rendering-indicator')\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const appDevRenderingIndicator = useAppDevRenderingIndicator()\n\n dispatch = (action: ReducerActions) => {\n appDevRenderingIndicator(() => {\n actionQueue.dispatch(action, setState)\n })\n }\n } else {\n dispatch = (action: ReducerActions) =>\n actionQueue.dispatch(action, setState)\n }\n\n // When navigating to a non-prefetched route, then App Router state will be\n // blocked until the server responds. We need to transfer the `_debugInfo`\n // from the underlying Flight response onto the top-level promise that is\n // passed to React (via `use`) so that the latency is accurately represented\n // in the React DevTools.\n const stateWithDebugInfo = useMemo(() => {\n if (!__DEV__) {\n return state\n }\n\n if (isThenable(state)) {\n // useMemo can't be used to cache a Promise since the memoized value is thrown\n // away when we suspend. So we use a WeakMap to cache the Promise with debug info.\n let promiseWithDebugInfo = promisesWithDebugInfo.get(state)\n if (promiseWithDebugInfo === undefined) {\n const debugInfo: Array<unknown> = []\n promiseWithDebugInfo = Promise.resolve(state).then((asyncState) => {\n if (asyncState.debugInfo !== null) {\n debugInfo.push(...asyncState.debugInfo)\n }\n return asyncState\n }) as Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n promiseWithDebugInfo._debugInfo = debugInfo\n\n promisesWithDebugInfo.set(state, promiseWithDebugInfo)\n }\n\n return promiseWithDebugInfo\n }\n return state\n }, [state])\n\n return isThenable(stateWithDebugInfo)\n ? use(stateWithDebugInfo)\n : stateWithDebugInfo\n}\n","import { startTransition } from 'react'\nimport { ACTION_SERVER_ACTION } from './components/router-reducer/router-reducer-types'\nimport { dispatchAppRouterAction } from './components/use-action-queue'\n\nexport async function callServer(actionId: string, actionArgs: any[]) {\n return new Promise((resolve, reject) => {\n startTransition(() => {\n dispatchAppRouterAction({\n type: ACTION_SERVER_ACTION,\n actionId,\n actionArgs,\n resolve,\n reject,\n })\n })\n })\n}\n","const basePath = process.env.__NEXT_ROUTER_BASEPATH || ''\nconst pathname = `${basePath}/__nextjs_source-map`\n\nexport const findSourceMapURL =\n process.env.NODE_ENV === 'development'\n ? function findSourceMapURL(filename: string): string | null {\n if (filename === '') {\n return null\n }\n\n if (\n filename.startsWith(document.location.origin) &&\n filename.includes('/_next/static')\n ) {\n // This is a request for a client chunk. This can only happen when\n // using Turbopack. In this case, since we control how those source\n // maps are generated, we can safely assume that the sourceMappingURL\n // is relative to the filename, with an added `.map` extension. The\n // browser can just request this file, and it gets served through the\n // normal dev server, without the need to route this through\n // the `/__nextjs_source-map` dev middleware.\n return `${filename}.map`\n }\n\n const url = new URL(pathname, document.location.origin)\n url.searchParams.set('filename', filename)\n\n return url.href\n }\n : undefined\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z',\n key: '1s6t7t',\n },\n ],\n ['circle', { cx: '16.5', cy: '7.5', r: '.5', fill: 'currentColor', key: 'w0ekpg' }],\n];\n\n/**\n * @component @name KeyRound\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMi41ODYgMTcuNDE0QTIgMiAwIDAgMCAyIDE4LjgyOFYyMWExIDEgMCAwIDAgMSAxaDNhMSAxIDAgMCAwIDEtMXYtMWExIDEgMCAwIDEgMS0xaDFhMSAxIDAgMCAwIDEtMXYtMWExIDEgMCAwIDEgMS0xaC4xNzJhMiAyIDAgMCAwIDEuNDE0LS41ODZsLjgxNC0uODE0YTYuNSA2LjUgMCAxIDAtNC00eiIgLz4KICA8Y2lyY2xlIGN4PSIxNi41IiBjeT0iNy41IiByPSIuNSIgZmlsbD0iY3VycmVudENvbG9yIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/key-round\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst KeyRound = createLucideIcon('key-round', __iconNode);\n\nexport default KeyRound;\n","/* __next_internal_action_entry_do_not_use__ [{\"007854b56845eeafde2c9685b51a376a63b707aad1\":\"listAgentApiCredentials\"},\"src/app/actions/credentials.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_3=/*#__PURE__*/createServerReference(\"007854b56845eeafde2c9685b51a376a63b707aad1\",callServer,void 0,findSourceMapURL,\"listAgentApiCredentials\");export{$$RSC_SERVER_ACTION_3 as listAgentApiCredentials};","/* __next_internal_action_entry_do_not_use__ [{\"0037e57dce0e01173d262d9f2abbeeda52df8d7e4f\":\"listCredentials\"},\"src/app/actions/credentials.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"0037e57dce0e01173d262d9f2abbeeda52df8d7e4f\",callServer,void 0,findSourceMapURL,\"listCredentials\");export{$$RSC_SERVER_ACTION_0 as listCredentials};","'use client';\n\nimport Image from \"next/image\";\nimport GitRepoSelector from \"@/components/GitRepoSelector\";\n\nexport default function Home() {\n return (\n <>\n <a\n href=\"https://github.com/m0o0scar/viba\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label=\"Open Viba GitHub repository\"\n className=\"fixed top-0 right-0 z-50 h-20 w-20 cursor-pointer border-l border-b border-gray-400 bg-gray-300/95 shadow-sm backdrop-blur-sm transition-colors hover:bg-gray-500/95 dark:border-slate-700 dark:bg-slate-900/95 dark:hover:bg-slate-800/95\"\n style={{ clipPath: \"polygon(100% 0, 0 0, 100% 100%)\" }}\n >\n <span className=\"absolute left-[67%] top-[33%] -translate-x-1/2 -translate-y-1/2\">\n <Image src=\"/github.png\" alt=\"GitHub\" width={22} height={22} priority className=\"rotate-45\" />\n </span>\n </a>\n <main className=\"flex min-h-screen flex-col items-center justify-start p-4 transition-colors md:p-6\">\n <GitRepoSelector mode=\"home\" />\n </main>\n </>\n );\n}\n"],"names":["module","exports","require","vendored","ReactServerDOMTurbopackClient","ReactDOM","warnOnce","_","process","env","NODE_ENV","warnings","Set","msg","has","console","warn","add","getDeploymentId","getDeploymentIdQueryOrEmptyString","NEXT_DEPLOYMENT_ID","deploymentId","useMergedRef","refA","refB","cleanupA","useRef","cleanupB","useCallback","current","cleanupFnA","cleanupFnB","applyRef","cleanup","ACTION_HMR_REFRESH","ACTION_NAVIGATE","ACTION_REFRESH","ACTION_RESTORE","ACTION_SERVER_ACTION","ACTION_SERVER_PATCH","PrefetchKind","isThenable","promise","then","dispatchAppRouterAction","useActionQueue","dispatch","action","Error","__DEV__","promisesWithDebugInfo","WeakMap","actionQueue","state","setState","React","useState","useAppDevRenderingIndicator","appDevRenderingIndicator","stateWithDebugInfo","useMemo","promiseWithDebugInfo","get","undefined","debugInfo","Promise","resolve","asyncState","push","_debugInfo","set","use","callServer","actionId","actionArgs","reject","startTransition","type","findSourceMapURL","basePath","__NEXT_ROUTER_BASEPATH","pathname","filename","startsWith","document","location","origin","includes","url","URL","searchParams","href"],"mappings":"6CAAAA,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEC,6BAA6B,+BCFtDJ,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEE,QAAQ,wGCSxBC,WAAAA,qCAAAA,KAXT,IAAIA,EAAW,AAACC,IAAe,wFCEfW,eAAe,CAAA,kBAAfA,GAIAC,iCAAiC,CAAA,kBAAjCA,uEAJT,SAASD,IACd,MAAqC,CAA9BV,AAA8B,CACvC,CAEO,MAHUC,GAGDU,AAHI,CAACC,GAQnB,MAAO,EACT,OATuC,iGCMvBE,eAAAA,qCAAAA,aAT8B,CAAA,CAAA,IAAA,GASvC,SAASA,EACdC,CAAmB,CACnBC,CAAmB,EAEnB,IAAMC,EAAWC,CAAAA,EAAAA,EAAAA,MAAAA,AAAM,EAAsB,MACvCC,EAAWD,CAAAA,EAAAA,EAAAA,MAAAA,AAAM,EAAsB,MAS7C,MAAOE,CAAAA,EAAAA,EAAAA,WAAW,AAAXA,EACL,AAACC,IACC,GAAgB,OAAZA,EAAkB,CACpB,IAAMC,EAAaL,EAASI,OAAO,CAC/BC,IACFL,EAASI,MADK,CACE,CAAG,KACnBC,KAEF,IAAMC,EAAaJ,EAASE,OAAO,CAC/BE,IACFJ,EAASE,MADK,CACE,CAAG,KACnBE,IAEJ,MACMR,CADC,GAEHE,EADQ,AACCI,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