watchbell 1.2.6 → 1.3.1

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 (524) hide show
  1. package/package.json +1 -1
  2. package/server/.next/BUILD_ID +1 -1
  3. package/server/.next/build-manifest.json +3 -3
  4. package/server/.next/prerender-manifest.json +3 -3
  5. package/server/.next/server/app/(console)/(private)/ai/agents/page/server-reference-manifest.json +13 -13
  6. package/server/.next/server/app/(console)/(private)/ai/agents/page.js +60 -64
  7. package/server/.next/server/app/(console)/(private)/ai/agents/page.js.nft.json +1 -1
  8. package/server/.next/server/app/(console)/(private)/ai/agents/page_client-reference-manifest.js +1 -1
  9. package/server/.next/server/app/(console)/(private)/ai/ask/page/server-reference-manifest.json +12 -12
  10. package/server/.next/server/app/(console)/(private)/ai/ask/page.js +60 -64
  11. package/server/.next/server/app/(console)/(private)/ai/ask/page.js.nft.json +1 -1
  12. package/server/.next/server/app/(console)/(private)/ai/ask/page_client-reference-manifest.js +1 -1
  13. package/server/.next/server/app/(console)/(private)/ai/connect/page/server-reference-manifest.json +11 -11
  14. package/server/.next/server/app/(console)/(private)/ai/connect/page.js +60 -64
  15. package/server/.next/server/app/(console)/(private)/ai/connect/page.js.nft.json +1 -1
  16. package/server/.next/server/app/(console)/(private)/ai/connect/page_client-reference-manifest.js +1 -1
  17. package/server/.next/server/app/(console)/(private)/ai/keys/page/server-reference-manifest.json +14 -14
  18. package/server/.next/server/app/(console)/(private)/ai/keys/page.js +60 -64
  19. package/server/.next/server/app/(console)/(private)/ai/keys/page.js.nft.json +1 -1
  20. package/server/.next/server/app/(console)/(private)/ai/keys/page_client-reference-manifest.js +1 -1
  21. package/server/.next/server/app/(console)/(private)/ai/logs/page/server-reference-manifest.json +12 -12
  22. package/server/.next/server/app/(console)/(private)/ai/logs/page.js +60 -64
  23. package/server/.next/server/app/(console)/(private)/ai/logs/page.js.nft.json +1 -1
  24. package/server/.next/server/app/(console)/(private)/ai/logs/page_client-reference-manifest.js +1 -1
  25. package/server/.next/server/app/(console)/(private)/ai/models/page/server-reference-manifest.json +21 -21
  26. package/server/.next/server/app/(console)/(private)/ai/models/page.js +60 -64
  27. package/server/.next/server/app/(console)/(private)/ai/models/page.js.nft.json +1 -1
  28. package/server/.next/server/app/(console)/(private)/ai/models/page_client-reference-manifest.js +1 -1
  29. package/server/.next/server/app/(console)/(private)/ai/page/server-reference-manifest.json +11 -11
  30. package/server/.next/server/app/(console)/(private)/ai/page.js +60 -64
  31. package/server/.next/server/app/(console)/(private)/ai/page.js.nft.json +1 -1
  32. package/server/.next/server/app/(console)/(private)/ai/page_client-reference-manifest.js +1 -1
  33. package/server/.next/server/app/(console)/(private)/ai/playground/page/server-reference-manifest.json +14 -14
  34. package/server/.next/server/app/(console)/(private)/ai/playground/page.js +60 -64
  35. package/server/.next/server/app/(console)/(private)/ai/playground/page.js.nft.json +1 -1
  36. package/server/.next/server/app/(console)/(private)/ai/playground/page_client-reference-manifest.js +1 -1
  37. package/server/.next/server/app/(console)/(private)/ai/providers/page/server-reference-manifest.json +17 -17
  38. package/server/.next/server/app/(console)/(private)/ai/providers/page.js +60 -64
  39. package/server/.next/server/app/(console)/(private)/ai/providers/page.js.nft.json +1 -1
  40. package/server/.next/server/app/(console)/(private)/ai/providers/page_client-reference-manifest.js +1 -1
  41. package/server/.next/server/app/(console)/(private)/ai/quota/page/server-reference-manifest.json +12 -12
  42. package/server/.next/server/app/(console)/(private)/ai/quota/page.js +60 -64
  43. package/server/.next/server/app/(console)/(private)/ai/quota/page.js.nft.json +1 -1
  44. package/server/.next/server/app/(console)/(private)/ai/quota/page_client-reference-manifest.js +1 -1
  45. package/server/.next/server/app/(console)/(private)/ai/usage/page/server-reference-manifest.json +12 -12
  46. package/server/.next/server/app/(console)/(private)/ai/usage/page.js +60 -64
  47. package/server/.next/server/app/(console)/(private)/ai/usage/page.js.nft.json +1 -1
  48. package/server/.next/server/app/(console)/(private)/ai/usage/page_client-reference-manifest.js +1 -1
  49. package/server/.next/server/app/(console)/(private)/api-docs/[[...op]]/page/server-reference-manifest.json +11 -11
  50. package/server/.next/server/app/(console)/(private)/api-docs/[[...op]]/page.js +60 -64
  51. package/server/.next/server/app/(console)/(private)/api-docs/[[...op]]/page.js.nft.json +1 -1
  52. package/server/.next/server/app/(console)/(private)/api-docs/[[...op]]/page_client-reference-manifest.js +1 -1
  53. package/server/.next/server/app/(console)/(private)/auto-actions/page/server-reference-manifest.json +12 -12
  54. package/server/.next/server/app/(console)/(private)/auto-actions/page.js +60 -64
  55. package/server/.next/server/app/(console)/(private)/auto-actions/page.js.nft.json +1 -1
  56. package/server/.next/server/app/(console)/(private)/auto-actions/page_client-reference-manifest.js +1 -1
  57. package/server/.next/server/app/(console)/alerts/page/server-reference-manifest.json +27 -27
  58. package/server/.next/server/app/(console)/alerts/page.js +60 -64
  59. package/server/.next/server/app/(console)/alerts/page.js.nft.json +1 -1
  60. package/server/.next/server/app/(console)/alerts/page_client-reference-manifest.js +1 -1
  61. package/server/.next/server/app/(console)/apps/[id]/page/server-reference-manifest.json +86 -56
  62. package/server/.next/server/app/(console)/apps/[id]/page.js +66 -68
  63. package/server/.next/server/app/(console)/apps/[id]/page.js.nft.json +1 -1
  64. package/server/.next/server/app/(console)/apps/[id]/page_client-reference-manifest.js +1 -1
  65. package/server/.next/server/app/(console)/apps/page/server-reference-manifest.json +14 -14
  66. package/server/.next/server/app/(console)/apps/page.js +63 -66
  67. package/server/.next/server/app/(console)/apps/page.js.nft.json +1 -1
  68. package/server/.next/server/app/(console)/apps/page_client-reference-manifest.js +1 -1
  69. package/server/.next/server/app/(console)/backups/page/server-reference-manifest.json +14 -14
  70. package/server/.next/server/app/(console)/backups/page.js +60 -64
  71. package/server/.next/server/app/(console)/backups/page.js.nft.json +1 -1
  72. package/server/.next/server/app/(console)/backups/page_client-reference-manifest.js +1 -1
  73. package/server/.next/server/app/(console)/catalog/page/server-reference-manifest.json +11 -11
  74. package/server/.next/server/app/(console)/catalog/page.js +60 -64
  75. package/server/.next/server/app/(console)/catalog/page.js.nft.json +1 -1
  76. package/server/.next/server/app/(console)/catalog/page_client-reference-manifest.js +1 -1
  77. package/server/.next/server/app/(console)/connections/page/server-reference-manifest.json +22 -22
  78. package/server/.next/server/app/(console)/connections/page.js +60 -64
  79. package/server/.next/server/app/(console)/connections/page.js.nft.json +1 -1
  80. package/server/.next/server/app/(console)/connections/page_client-reference-manifest.js +1 -1
  81. package/server/.next/server/app/(console)/d1/page/server-reference-manifest.json +11 -11
  82. package/server/.next/server/app/(console)/d1/page.js +60 -64
  83. package/server/.next/server/app/(console)/d1/page.js.nft.json +1 -1
  84. package/server/.next/server/app/(console)/d1/page_client-reference-manifest.js +1 -1
  85. package/server/.next/server/app/(console)/deployments/page/server-reference-manifest.json +37 -17
  86. package/server/.next/server/app/(console)/deployments/page.js +63 -66
  87. package/server/.next/server/app/(console)/deployments/page.js.nft.json +1 -1
  88. package/server/.next/server/app/(console)/deployments/page_client-reference-manifest.js +1 -1
  89. package/server/.next/server/app/(console)/dns/page/server-reference-manifest.json +18 -18
  90. package/server/.next/server/app/(console)/dns/page.js +60 -64
  91. package/server/.next/server/app/(console)/dns/page.js.nft.json +1 -1
  92. package/server/.next/server/app/(console)/dns/page_client-reference-manifest.js +1 -1
  93. package/server/.next/server/app/(console)/domains/page/server-reference-manifest.json +13 -13
  94. package/server/.next/server/app/(console)/domains/page.js +60 -64
  95. package/server/.next/server/app/(console)/domains/page.js.nft.json +1 -1
  96. package/server/.next/server/app/(console)/domains/page_client-reference-manifest.js +1 -1
  97. package/server/.next/server/app/(console)/events/page/server-reference-manifest.json +11 -11
  98. package/server/.next/server/app/(console)/events/page.js +60 -64
  99. package/server/.next/server/app/(console)/events/page.js.nft.json +1 -1
  100. package/server/.next/server/app/(console)/events/page_client-reference-manifest.js +1 -1
  101. package/server/.next/server/app/(console)/firebase/page/server-reference-manifest.json +18 -18
  102. package/server/.next/server/app/(console)/firebase/page.js +60 -64
  103. package/server/.next/server/app/(console)/firebase/page.js.nft.json +1 -1
  104. package/server/.next/server/app/(console)/firebase/page_client-reference-manifest.js +1 -1
  105. package/server/.next/server/app/(console)/logs/page/server-reference-manifest.json +12 -12
  106. package/server/.next/server/app/(console)/logs/page.js +60 -64
  107. package/server/.next/server/app/(console)/logs/page.js.nft.json +1 -1
  108. package/server/.next/server/app/(console)/logs/page_client-reference-manifest.js +1 -1
  109. package/server/.next/server/app/(console)/manage/sections/page/server-reference-manifest.json +12 -12
  110. package/server/.next/server/app/(console)/manage/sections/page.js +60 -64
  111. package/server/.next/server/app/(console)/manage/sections/page.js.nft.json +1 -1
  112. package/server/.next/server/app/(console)/manage/sections/page_client-reference-manifest.js +1 -1
  113. package/server/.next/server/app/(console)/neon/page/server-reference-manifest.json +22 -22
  114. package/server/.next/server/app/(console)/neon/page.js +60 -64
  115. package/server/.next/server/app/(console)/neon/page.js.nft.json +1 -1
  116. package/server/.next/server/app/(console)/neon/page_client-reference-manifest.js +1 -1
  117. package/server/.next/server/app/(console)/overview/page/server-reference-manifest.json +19 -19
  118. package/server/.next/server/app/(console)/overview/page.js +66 -69
  119. package/server/.next/server/app/(console)/overview/page.js.nft.json +1 -1
  120. package/server/.next/server/app/(console)/overview/page_client-reference-manifest.js +1 -1
  121. package/server/.next/server/app/(console)/repos/[id]/page/server-reference-manifest.json +12 -12
  122. package/server/.next/server/app/(console)/repos/[id]/page.js +64 -67
  123. package/server/.next/server/app/(console)/repos/[id]/page.js.nft.json +1 -1
  124. package/server/.next/server/app/(console)/repos/[id]/page_client-reference-manifest.js +1 -1
  125. package/server/.next/server/app/(console)/repos/page/server-reference-manifest.json +11 -11
  126. package/server/.next/server/app/(console)/repos/page.js +62 -65
  127. package/server/.next/server/app/(console)/repos/page.js.nft.json +1 -1
  128. package/server/.next/server/app/(console)/repos/page_client-reference-manifest.js +1 -1
  129. package/server/.next/server/app/(console)/settings/page/server-reference-manifest.json +21 -21
  130. package/server/.next/server/app/(console)/settings/page.js +60 -64
  131. package/server/.next/server/app/(console)/settings/page.js.nft.json +1 -1
  132. package/server/.next/server/app/(console)/settings/page_client-reference-manifest.js +1 -1
  133. package/server/.next/server/app/(console)/sql/page/server-reference-manifest.json +18 -18
  134. package/server/.next/server/app/(console)/sql/page.js +60 -64
  135. package/server/.next/server/app/(console)/sql/page.js.nft.json +1 -1
  136. package/server/.next/server/app/(console)/sql/page_client-reference-manifest.js +1 -1
  137. package/server/.next/server/app/(console)/status/page/server-reference-manifest.json +11 -11
  138. package/server/.next/server/app/(console)/status/page.js +60 -64
  139. package/server/.next/server/app/(console)/status/page.js.nft.json +1 -1
  140. package/server/.next/server/app/(console)/status/page_client-reference-manifest.js +1 -1
  141. package/server/.next/server/app/(console)/supabase/page/server-reference-manifest.json +30 -30
  142. package/server/.next/server/app/(console)/supabase/page.js +60 -64
  143. package/server/.next/server/app/(console)/supabase/page.js.nft.json +1 -1
  144. package/server/.next/server/app/(console)/supabase/page_client-reference-manifest.js +1 -1
  145. package/server/.next/server/app/(console)/topology/page/server-reference-manifest.json +11 -11
  146. package/server/.next/server/app/(console)/topology/page.js +60 -64
  147. package/server/.next/server/app/(console)/topology/page.js.nft.json +1 -1
  148. package/server/.next/server/app/(console)/topology/page_client-reference-manifest.js +1 -1
  149. package/server/.next/server/app/(console)/turso/page/server-reference-manifest.json +11 -11
  150. package/server/.next/server/app/(console)/turso/page.js +60 -64
  151. package/server/.next/server/app/(console)/turso/page.js.nft.json +1 -1
  152. package/server/.next/server/app/(console)/turso/page_client-reference-manifest.js +1 -1
  153. package/server/.next/server/app/(console)/upstash/page/server-reference-manifest.json +11 -11
  154. package/server/.next/server/app/(console)/upstash/page.js +60 -64
  155. package/server/.next/server/app/(console)/upstash/page.js.nft.json +1 -1
  156. package/server/.next/server/app/(console)/upstash/page_client-reference-manifest.js +1 -1
  157. package/server/.next/server/app/(console)/uptime/page/server-reference-manifest.json +25 -25
  158. package/server/.next/server/app/(console)/uptime/page.js +60 -64
  159. package/server/.next/server/app/(console)/uptime/page.js.nft.json +1 -1
  160. package/server/.next/server/app/(console)/uptime/page_client-reference-manifest.js +1 -1
  161. package/server/.next/server/app/(console)/welcome/page/server-reference-manifest.json +16 -16
  162. package/server/.next/server/app/(console)/welcome/page.js +60 -64
  163. package/server/.next/server/app/(console)/welcome/page.js.nft.json +1 -1
  164. package/server/.next/server/app/(console)/welcome/page_client-reference-manifest.js +1 -1
  165. package/server/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  166. package/server/.next/server/app/_global-error/page.js.nft.json +1 -1
  167. package/server/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  168. package/server/.next/server/app/_global-error.html +1 -1
  169. package/server/.next/server/app/_global-error.rsc +2 -2
  170. package/server/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  171. package/server/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  172. package/server/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  173. package/server/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  174. package/server/.next/server/app/_not-found/page.js.nft.json +1 -1
  175. package/server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  176. package/server/.next/server/app/_not-found.html +1 -1
  177. package/server/.next/server/app/_not-found.rsc +3 -3
  178. package/server/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  179. package/server/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  180. package/server/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  181. package/server/.next/server/app/account/password/page/server-reference-manifest.json +2 -2
  182. package/server/.next/server/app/account/password/page.js.nft.json +1 -1
  183. package/server/.next/server/app/account/password/page_client-reference-manifest.js +1 -1
  184. package/server/.next/server/app/api/collect/route/server-reference-manifest.json +8 -8
  185. package/server/.next/server/app/api/collect/route.js +46 -48
  186. package/server/.next/server/app/api/collect/route.js.nft.json +1 -1
  187. package/server/.next/server/app/api/daily/route/server-reference-manifest.json +8 -8
  188. package/server/.next/server/app/api/daily/route.js +46 -48
  189. package/server/.next/server/app/api/daily/route.js.nft.json +1 -1
  190. package/server/.next/server/app/api/telegram/webhook/route/server-reference-manifest.json +8 -8
  191. package/server/.next/server/app/api/telegram/webhook/route.js +46 -48
  192. package/server/.next/server/app/api/telegram/webhook/route.js.nft.json +1 -1
  193. package/server/.next/server/app/invite/page/server-reference-manifest.json +2 -2
  194. package/server/.next/server/app/invite/page.js.nft.json +1 -1
  195. package/server/.next/server/app/invite/page_client-reference-manifest.js +1 -1
  196. package/server/.next/server/app/mfa/page/server-reference-manifest.json +2 -2
  197. package/server/.next/server/app/mfa/page.js +25 -25
  198. package/server/.next/server/app/mfa/page.js.nft.json +1 -1
  199. package/server/.next/server/app/mfa/page_client-reference-manifest.js +1 -1
  200. package/server/.next/server/app/mfa/setup/page/server-reference-manifest.json +3 -3
  201. package/server/.next/server/app/mfa/setup/page.js +25 -25
  202. package/server/.next/server/app/mfa/setup/page.js.nft.json +1 -1
  203. package/server/.next/server/app/mfa/setup/page_client-reference-manifest.js +1 -1
  204. package/server/.next/server/app/page/server-reference-manifest.json +1 -1
  205. package/server/.next/server/app/page.js.nft.json +1 -1
  206. package/server/.next/server/app/page_client-reference-manifest.js +1 -1
  207. package/server/.next/server/app/s/[slug]/page/server-reference-manifest.json +1 -1
  208. package/server/.next/server/app/s/[slug]/page.js +7 -7
  209. package/server/.next/server/app/s/[slug]/page.js.nft.json +1 -1
  210. package/server/.next/server/app/s/[slug]/page_client-reference-manifest.js +1 -1
  211. package/server/.next/server/app/setup/page/server-reference-manifest.json +2 -2
  212. package/server/.next/server/app/setup/page.js.nft.json +1 -1
  213. package/server/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  214. package/server/.next/server/app/signin/page/server-reference-manifest.json +3 -3
  215. package/server/.next/server/app/signin/page.js +28 -29
  216. package/server/.next/server/app/signin/page.js.nft.json +1 -1
  217. package/server/.next/server/app/signin/page_client-reference-manifest.js +1 -1
  218. package/server/.next/server/chunks/{[root-of-the-server]__0655w3_d4ejfb._.js → [root-of-the-server]__0-94urkhm871c._.js} +1 -1
  219. package/server/.next/server/chunks/{[root-of-the-server]__1bg8grh9kfims._.js → [root-of-the-server]__01hgqxx2a0okv._.js} +2 -2
  220. package/server/.next/server/chunks/{[root-of-the-server]__14-pt1-s1o5ex._.js → [root-of-the-server]__0c2heh-0pjyob._.js} +1 -1
  221. package/server/.next/server/chunks/{[root-of-the-server]__12lrpnd-dhawi._.js → [root-of-the-server]__0c9y_zg74k4oe._.js} +2 -2
  222. package/server/.next/server/chunks/{[root-of-the-server]__1kwldcrcmwc0x._.js → [root-of-the-server]__0fmt9z8-xukob._.js} +1 -1
  223. package/server/.next/server/chunks/{[root-of-the-server]__0whk62ebfu1u0._.js → [root-of-the-server]__0i3h5covkd6_t._.js} +1 -1
  224. package/server/.next/server/chunks/{[root-of-the-server]__1nm0sjvuf9jrb._.js → [root-of-the-server]__0inf2zuuqjrq6._.js} +2 -2
  225. package/server/.next/server/chunks/{[root-of-the-server]__09dk9k-9q4d16._.js → [root-of-the-server]__0rpys5i04hzww._.js} +2 -2
  226. package/server/.next/server/chunks/{[root-of-the-server]__0x4_tt5v17fx3._.js → [root-of-the-server]__0xfgfo-ks4_e8._.js} +2 -2
  227. package/server/.next/server/chunks/{[root-of-the-server]__1c1nhm-kj5kqu._.js → [root-of-the-server]__0zjhlf_yodox3._.js} +1 -1
  228. package/server/.next/server/chunks/{[root-of-the-server]__0c0pkv3an1lg-._.js → [root-of-the-server]__130_vkgsongq_._.js} +2 -2
  229. package/server/.next/server/chunks/{[root-of-the-server]__1-xgpr5q148ze._.js → [root-of-the-server]__14vj8ywy5spa2._.js} +1 -1
  230. package/server/.next/server/chunks/{[root-of-the-server]__17jngidngj3rb._.js → [root-of-the-server]__161v5qfd5qk2p._.js} +2 -2
  231. package/server/.next/server/chunks/[root-of-the-server]__16u9d_hm9lefl._.js +3 -0
  232. package/server/.next/server/chunks/{[root-of-the-server]__0s8wo4espz6eu._.js → [root-of-the-server]__1_df6aphi-pfk._.js} +2 -2
  233. package/server/.next/server/chunks/{[root-of-the-server]__1r24segt1slar._.js → [root-of-the-server]__1j527a18gh10b._.js} +2 -2
  234. package/server/.next/server/chunks/[root-of-the-server]__1k-7jan2fsbys._.js +3 -0
  235. package/server/.next/server/chunks/{[root-of-the-server]__1lq25064c4ny_._.js → [root-of-the-server]__1uad-kugxmkx8._.js} +2 -2
  236. package/server/.next/server/chunks/_0-ub844lc_z_a._.js +2 -2
  237. package/server/.next/server/chunks/_004c7-39glldb._.js +4 -4
  238. package/server/.next/server/chunks/_05hhw0eql5-dv._.js +5 -3
  239. package/server/.next/server/chunks/_08fv52mqg619m._.js +11 -9
  240. package/server/.next/server/chunks/_08z7lmk32r__5._.js +2 -2
  241. package/server/.next/server/chunks/_0tz4o-qufnu3l._.js +4 -4
  242. package/server/.next/server/chunks/_1-pv4d4qhe7to._.js +2 -2
  243. package/server/.next/server/chunks/_10vh_l3hht4_3._.js +4 -4
  244. package/server/.next/server/chunks/_13dlt388gceez._.js +11 -9
  245. package/server/.next/server/chunks/_1fj4vzjpusyn8._.js +5 -0
  246. package/server/.next/server/chunks/_1l-68brbq289m._.js +5 -3
  247. package/server/.next/server/chunks/{_1476vtrt9101m._.js → _1rskctyr7yt-b._.js} +2 -2
  248. package/server/.next/server/chunks/{src_01fd1ve-xj9xo._.js → src_0j8daco-75zka._.js} +2 -2
  249. package/server/.next/server/chunks/{src_049aazgsmienv._.js → src_1lvv9wiag2d8-._.js} +2 -2
  250. package/server/.next/server/chunks/src_lib_0eqv8l-v8d5ze._.js +1 -1
  251. package/server/.next/server/chunks/src_lib_0n-8zjgq6mcc7._.js +3 -0
  252. package/server/.next/server/chunks/src_lib_1nkahiclbn55q._.js +3 -0
  253. package/server/.next/server/chunks/src_lib_1y5l54dwaet39._.js +3 -0
  254. package/server/.next/server/chunks/src_private_0uwb-eyaxy9b3._.js +5 -0
  255. package/server/.next/server/chunks/src_private_notes_notes-actions_ts_1g63g8u965fhc._.js +1 -1
  256. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_agents_page_actions_21atz5tidps07.js +1 -1
  257. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_models_page_actions_0rvlzfa8rjyz_.js +1 -1
  258. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_playground_page_actions_01ejc1xilpuh4.js +1 -1
  259. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_quota_page_actions_0iki29gyi8cwa.js +1 -1
  260. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_usage_page_actions_1c99h-kwdnep7.js +1 -1
  261. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_auto-actions_page_actions_1kw4ce6-efkr1.js +1 -1
  262. package/server/.next/server/chunks/ssr/{[externals]__0d7rvi3tmo9zf._.js → [externals]__02s9k1gg9qqkm._.js} +1 -1
  263. package/server/.next/server/chunks/ssr/[root-of-the-server]__03mal5uo1rzg4._.js +3 -0
  264. package/server/.next/server/chunks/ssr/[root-of-the-server]__05_98ql5tgeii._.js +3 -0
  265. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0xscr-8y9a4cj._.js → [root-of-the-server]__07k_84t5-d55n._.js} +2 -2
  266. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0amfa4t2-in-x._.js → [root-of-the-server]__09j1po2u91fp3._.js} +2 -2
  267. package/server/.next/server/chunks/ssr/{[root-of-the-server]__08u1c2f2i7ru4._.js → [root-of-the-server]__0e1s_5gg-u3iu._.js} +1 -1
  268. package/server/.next/server/chunks/ssr/[root-of-the-server]__0h2hxe0vl-2x0._.js +1 -1
  269. package/server/.next/server/chunks/ssr/[root-of-the-server]__0rrdzb9wowemv._.js +1 -1
  270. package/server/.next/server/chunks/ssr/[root-of-the-server]__0s2of3mcou177._.js +3 -0
  271. package/server/.next/server/chunks/ssr/{[root-of-the-server]__1uzqsxyxwffdo._.js → [root-of-the-server]__0skfdezx5rxie._.js} +2 -2
  272. package/server/.next/server/chunks/ssr/[root-of-the-server]__1_f7nip9age3d._.js +1 -1
  273. package/server/.next/server/chunks/ssr/[root-of-the-server]__1e9tlsk1gl8lw._.js +4 -0
  274. package/server/.next/server/chunks/ssr/[root-of-the-server]__1sw2q1p1t59y8._.js +1 -1
  275. package/server/.next/server/chunks/ssr/{[root-of-the-server]__1o6cysvbfkltz._.js → [root-of-the-server]__1tj-iwvrxfd1a._.js} +1 -1
  276. package/server/.next/server/chunks/ssr/[root-of-the-server]__1v3b498_j-68t._.js +4 -0
  277. package/server/.next/server/chunks/ssr/_02eudwc8ieb2r._.js +2 -2
  278. package/server/.next/server/chunks/ssr/_08xqk3eibu5aw._.js +1 -1
  279. package/server/.next/server/chunks/ssr/_0_oc9q0vqkynd._.js +1 -1
  280. package/server/.next/server/chunks/ssr/{_07f-svx_l12lw._.js → _0_yyszoyzyccn._.js} +2 -2
  281. package/server/.next/server/chunks/ssr/_0a22b7zsckifp._.js +1 -1
  282. package/server/.next/server/chunks/ssr/_0ao-urx9ftj1s._.js +3 -0
  283. package/server/.next/server/chunks/ssr/_0azq3ml4gbn1d._.js +1 -1
  284. package/server/.next/server/chunks/ssr/_0bd4cxnpnnq2u._.js +1 -1
  285. package/server/.next/server/chunks/ssr/_0cbbks0ms7i_u._.js +2 -2
  286. package/server/.next/server/chunks/ssr/_0cw4kz3d6kmb1._.js +1 -1
  287. package/server/.next/server/chunks/ssr/_0d2d527wcx-lf._.js +2 -2
  288. package/server/.next/server/chunks/ssr/_0d702k82llasi._.js +1 -1
  289. package/server/.next/server/chunks/ssr/_0dvz4dndt6lkf._.js +3 -0
  290. package/server/.next/server/chunks/ssr/_0gl-ewvbhb677._.js +2 -2
  291. package/server/.next/server/chunks/ssr/{_0-wc6f6p0c8lv._.js → _0gmw45sb1llld._.js} +2 -2
  292. package/server/.next/server/chunks/ssr/_0i04zoixa2iup._.js +2 -2
  293. package/server/.next/server/chunks/ssr/_0idbg-ok0so2h._.js +2 -2
  294. package/server/.next/server/chunks/ssr/_0iy27gi4y9-fe._.js +4 -0
  295. package/server/.next/server/chunks/ssr/_0kdn56_ow-x_s._.js +1 -1
  296. package/server/.next/server/chunks/ssr/_0oovfx_t_-u0k._.js +1 -1
  297. package/server/.next/server/chunks/ssr/_0oub-njkja8gu._.js +2 -2
  298. package/server/.next/server/chunks/ssr/_0pqkexxo7rts_._.js +2 -2
  299. package/server/.next/server/chunks/ssr/_0qhvl_fw4qetx._.js +1 -1
  300. package/server/.next/server/chunks/ssr/{_1476vtrt9101m._.js → _0rw2pberdmaa5._.js} +2 -2
  301. package/server/.next/server/chunks/ssr/_0tnd528j0i1i4._.js +2 -2
  302. package/server/.next/server/chunks/ssr/{_0jqrjb30bblvy._.js → _0tu64jsmbyx4_._.js} +2 -2
  303. package/server/.next/server/chunks/ssr/_0uwkwcgucqgcf._.js +2 -2
  304. package/server/.next/server/chunks/ssr/_0v6v5w16qxwke._.js +1 -1
  305. package/server/.next/server/chunks/ssr/{_1edj756n1im8t._.js → _0w3mz8059j-pk._.js} +2 -2
  306. package/server/.next/server/chunks/ssr/_0wo-lpqf7hr1y._.js +2 -2
  307. package/server/.next/server/chunks/ssr/_0xmud7u5hdnqu._.js +4 -0
  308. package/server/.next/server/chunks/ssr/{_1bc69myq83woe._.js → _0y5ov4kk2q81r._.js} +2 -2
  309. package/server/.next/server/chunks/ssr/_1-4401bfn50mf._.js +4 -0
  310. package/server/.next/server/chunks/ssr/_1-6d1tm3r_qwg._.js +1 -1
  311. package/server/.next/server/chunks/ssr/_10bven6gb1vj0._.js +1 -1
  312. package/server/.next/server/chunks/ssr/{_07-dfx0qix52k._.js → _10oqiz6hmf92q._.js} +2 -2
  313. package/server/.next/server/chunks/ssr/_118h21qua_4o3._.js +1 -1
  314. package/server/.next/server/chunks/ssr/_12makqwatfke-._.js +2 -2
  315. package/server/.next/server/chunks/ssr/_12wjuabpo0ofk._.js +3 -0
  316. package/server/.next/server/chunks/ssr/_19-3vzkc6rk97._.js +1 -1
  317. package/server/.next/server/chunks/ssr/_1_-o2s48aj4i7._.js +1 -1
  318. package/server/.next/server/chunks/ssr/_1c7jkkvkvzj_u._.js +2 -2
  319. package/server/.next/server/chunks/ssr/_1cl55h_h3q-b_._.js +1 -1
  320. package/server/.next/server/chunks/ssr/_1dlo17ba9g-f9._.js +2 -2
  321. package/server/.next/server/chunks/ssr/_1dp5bgqob29-f._.js +3 -0
  322. package/server/.next/server/chunks/ssr/_1fc8k_0p8l00c._.js +2 -2
  323. package/server/.next/server/chunks/ssr/_1fj4vzjpusyn8._.js +5 -0
  324. package/server/.next/server/chunks/ssr/_1fuywfexex2s8._.js +2 -2
  325. package/server/.next/server/chunks/ssr/_1g2zbl_-4z_hg._.js +1 -1
  326. package/server/.next/server/chunks/ssr/_1he21-bt45k8z._.js +2 -2
  327. package/server/.next/server/chunks/ssr/_1j9cka-44jd65._.js +1 -1
  328. package/server/.next/server/chunks/ssr/_1jh_o2i8hj2g5._.js +1 -1
  329. package/server/.next/server/chunks/ssr/{_1r7o1vx4875hu._.js → _1ktvwngz0lzjr._.js} +2 -2
  330. package/server/.next/server/chunks/ssr/_1ln6o3a9quwxo._.js +2 -2
  331. package/server/.next/server/chunks/ssr/_1m4km_w39x5e9._.js +1 -1
  332. package/server/.next/server/chunks/ssr/_1pp1o361lgpwu._.js +2 -2
  333. package/server/.next/server/chunks/ssr/_1rskctyr7yt-b._.js +3 -0
  334. package/server/.next/server/chunks/ssr/{_1j61tfpfj2t9d._.js → _1vjm7-shohnh7._.js} +2 -2
  335. package/server/.next/server/chunks/ssr/_1yh3k88t_kh4h._.js +2 -2
  336. package/server/.next/server/chunks/ssr/_1z6dy1k48mskn._.js +1 -1
  337. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_(private)_ai_keys_page_actions_181-3r4e_0yb5.js +1 -1
  338. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_(private)_ai_logs_page_actions_1ryb93n6khky3.js +1 -1
  339. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_alerts_page_actions_06_3gmyq3jtvi.js +1 -1
  340. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_apps_[id]_page_actions_1--1mjfnoprr2.js +3 -0
  341. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_apps_page_actions_0ksau5eicvycc.js +1 -1
  342. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_connections_page_actions_1fgolmmpxrouc.js +1 -1
  343. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_dns_page_actions_17d_lvhl-u_4w.js +1 -1
  344. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_domains_page_actions_1yv3fj_fh-n-5.js +1 -1
  345. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_firebase_page_actions_00wuues_v_j3r.js +1 -1
  346. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_logs_page_actions_0oqh51t2rx6q0.js +1 -1
  347. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_manage_sections_page_actions_1sb2ldu57uj32.js +1 -1
  348. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_settings_page_actions_12wgjpd0lbh12.js +1 -1
  349. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_supabase_page_actions_1f3a_tpkwjo8z.js +1 -1
  350. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_uptime_page_actions_1ylbdz0-ykfh6.js +1 -1
  351. package/server/.next/server/chunks/ssr/_next-internal_server_app_account_password_page_actions_1v4e71_oifbx9.js +1 -1
  352. package/server/.next/server/chunks/ssr/_next-internal_server_app_signin_page_actions_11wzk446p6_zi.js +1 -1
  353. package/server/.next/server/chunks/ssr/src_0330uf9pdfco9._.js +1 -1
  354. package/server/.next/server/chunks/ssr/{src_1bg_io_v7gt71._.js → src_04o0-kzfmcnim._.js} +2 -2
  355. package/server/.next/server/chunks/ssr/src_06tjy8wljego8._.js +1 -1
  356. package/server/.next/server/chunks/ssr/src_084tdkx3c_yqi._.js +1 -1
  357. package/server/.next/server/chunks/ssr/src_0abts6wp5ucc0._.js +1 -1
  358. package/server/.next/server/chunks/ssr/src_0jxjbvkvg0bjg._.js +3 -0
  359. package/server/.next/server/chunks/ssr/src_0ovx2ogvlz2eh._.js +3 -0
  360. package/server/.next/server/chunks/ssr/src_0ph020gy78gi9._.js +1 -1
  361. package/server/.next/server/chunks/ssr/src_0uitfl3c1mdqb._.js +3 -1
  362. package/server/.next/server/chunks/ssr/src_0yxy3bklfxtzz._.js +3 -0
  363. package/server/.next/server/chunks/ssr/src_1-k3gvxaqli74._.js +3 -0
  364. package/server/.next/server/chunks/ssr/src_10zavgy86u3us._.js +1 -1
  365. package/server/.next/server/chunks/ssr/src_1ckoccd8qvnje._.js +1 -1
  366. package/server/.next/server/chunks/ssr/src_1maoe8g5gnv0u._.js +8 -0
  367. package/server/.next/server/chunks/ssr/src_1q-jgpnd3lbcu._.js +1 -1
  368. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_agents_1fyhh1ldgm23z._.js +1 -1
  369. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_ask_ask-form_tsx_18ttm9nna_9y6._.js +1 -1
  370. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_logs_export-button_tsx_1k-crb88n1za_._.js +1 -1
  371. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_models_0ayzqn062pnv5._.js +1 -1
  372. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_playground_playground-view_tsx_18ua5zn_a0mar._.js +1 -1
  373. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_providers_1ru-30x6-uwu4._.js +1 -1
  374. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_quota_limits-form_tsx_1vouaaf560z_x._.js +1 -1
  375. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_usage_limits-form_tsx_0sfk3ver58rqw._.js +1 -1
  376. package/server/.next/server/chunks/ssr/{src_app_(console)_0e832kna-734m._.js → src_app_(console)_0-vcbt2icvguc._.js} +2 -2
  377. package/server/.next/server/chunks/ssr/src_app_(console)_05h6-wpd078oj._.js +3 -0
  378. package/server/.next/server/chunks/ssr/src_app_(console)_alerts_0j5xlt68kwg8x._.js +2 -2
  379. package/server/.next/server/chunks/ssr/src_app_(console)_apps_[id]_10xvt--29v-ed._.js +3 -0
  380. package/server/.next/server/chunks/ssr/src_app_(console)_backups_actions_ts_1vpytsdh0wc1f._.js +1 -1
  381. package/server/.next/server/chunks/ssr/src_app_(console)_backups_drive-buttons_tsx_00cku5r_z3jkg._.js +1 -1
  382. package/server/.next/server/chunks/ssr/src_app_(console)_connections_1fahc65-97qla._.js +1 -1
  383. package/server/.next/server/chunks/ssr/src_app_(console)_connections_1fmp_anbkapur._.js +1 -1
  384. package/server/.next/server/chunks/ssr/src_app_(console)_connections_actions_ts_103blv4gzq76z._.js +1 -1
  385. package/server/.next/server/chunks/ssr/src_app_(console)_create_actions_ts_05-86qr6kfjey._.js +1 -1
  386. package/server/.next/server/chunks/ssr/src_app_(console)_deployments_06a83hsex1kba._.js +1 -1
  387. package/server/.next/server/chunks/ssr/src_app_(console)_dns_actions_ts_1jzn58xzwbukz._.js +1 -1
  388. package/server/.next/server/chunks/ssr/src_app_(console)_dns_record-actions_tsx_0cqmz51zcuebv._.js +1 -1
  389. package/server/.next/server/chunks/ssr/src_app_(console)_firebase_row-menu_tsx_0hssoq3pqjl-n._.js +1 -1
  390. package/server/.next/server/chunks/ssr/src_app_(console)_logs_log-viewer_tsx_0v3e4cflfk14w._.js +1 -1
  391. package/server/.next/server/chunks/ssr/src_app_(console)_manage_sections_section-switch_tsx_1mfs-o_357i22._.js +1 -1
  392. package/server/.next/server/chunks/ssr/src_app_(console)_monitor-actions_ts_10w3h7myk2ppi._.js +1 -1
  393. package/server/.next/server/chunks/ssr/src_app_(console)_palette-action_ts_0zyw9a9imev6p._.js +1 -1
  394. package/server/.next/server/chunks/ssr/src_app_(console)_repos_[id]_page_tsx_1nkxthc4ethrj._.js +2 -2
  395. package/server/.next/server/chunks/ssr/src_app_(console)_repos_repo-list_tsx_1n1gcm4qfrfdt._.js +1 -1
  396. package/server/.next/server/chunks/ssr/src_app_(console)_sql_1icfsti04djqe._.js +2 -2
  397. package/server/.next/server/chunks/ssr/src_app_(console)_sql_actions_ts_1oqco02hw-3vp._.js +1 -1
  398. package/server/.next/server/chunks/ssr/src_app_(console)_supabase_0ib3m2ch9gu-4._.js +1 -1
  399. package/server/.next/server/chunks/ssr/src_app_(console)_supabase_pool-actions_ts_0nzd4vwy_9zzx._.js +1 -1
  400. package/server/.next/server/chunks/ssr/src_app_(console)_uptime_1mnnkfi-2zv-k._.js +1 -1
  401. package/server/.next/server/chunks/ssr/src_app_(console)_vercel-actions_ts_0wpk1yo9v632d._.js +1 -1
  402. package/server/.next/server/chunks/ssr/src_app_mfa_setup_setup-flow_tsx_1fpwygr2vdgnh._.js +1 -1
  403. package/server/.next/server/chunks/ssr/src_app_setup_setup-form_tsx_0izoagdur96e1._.js +1 -1
  404. package/server/.next/server/chunks/ssr/src_app_signin_0obhr-33tppu8._.js +3 -0
  405. package/server/.next/server/chunks/ssr/src_components_create_create-dialog_tsx_1s_9clly_m1ru._.js +1 -1
  406. package/server/.next/server/chunks/ssr/src_components_list-filter_tsx_1zp29997g97yd._.js +1 -1
  407. package/server/.next/server/chunks/ssr/{_0ls7sornjrg95._.js → src_lib_0-nc33gvdtkg5._.js} +2 -2
  408. package/server/.next/server/chunks/ssr/src_lib_0eqv8l-v8d5ze._.js +1 -1
  409. package/server/.next/server/chunks/ssr/src_lib_0n-8zjgq6mcc7._.js +3 -0
  410. package/server/.next/server/chunks/ssr/src_lib_10d18lqjfj8je._.js +3 -0
  411. package/server/.next/server/chunks/ssr/src_lib_1eioo4oodq-8h._.js +1 -1
  412. package/server/.next/server/chunks/ssr/src_lib_1y5l54dwaet39._.js +3 -0
  413. package/server/.next/server/chunks/ssr/{src_lib_demo_09ht4doed9eqi._.js → src_lib_demo_0sbw5n9n4mpzx._.js} +2 -2
  414. package/server/.next/server/chunks/ssr/src_lib_providers_github-browse_ts_1apskpn4fe9qr._.js +3 -0
  415. package/server/.next/server/chunks/ssr/src_private_0iy_wyg2p1jkn._.js +1 -1
  416. package/server/.next/server/chunks/ssr/src_private_1b8918m4jsjpi._.js +5 -0
  417. package/server/.next/server/chunks/ssr/src_private_actions_decide-form_tsx_1hngtxpyle3v8._.js +1 -1
  418. package/server/.next/server/chunks/ssr/src_private_ai_providers_actions_ts_0wxa36ai6s5nn._.js +1 -1
  419. package/server/.next/server/chunks/ssr/src_private_notes_notes-actions_ts_1g63g8u965fhc._.js +1 -1
  420. package/server/.next/server/functions-config-manifest.json +3 -0
  421. package/server/.next/server/middleware-build-manifest.js +3 -3
  422. package/server/.next/server/pages/404.html +1 -1
  423. package/server/.next/server/pages/500.html +1 -1
  424. package/server/.next/server/preview-props.json +3 -3
  425. package/server/.next/server/server-reference-manifest.js +1 -1
  426. package/server/.next/server/server-reference-manifest.json +208 -170
  427. package/server/.next/static/chunks/{3o45i7xbzm0w-.js → 05uco41_mcq9o.js} +1 -1
  428. package/server/.next/static/chunks/08fdgz3f6aeh3.js +1 -0
  429. package/server/.next/static/chunks/{36e9fpbpqndu5.js → 0a77yea00jt0y.js} +1 -1
  430. package/server/.next/static/chunks/0bqipdtnu2hws.js +1 -0
  431. package/server/.next/static/chunks/{041ko45qawas9.js → 0o53bcdd6gtyu.js} +1 -1
  432. package/server/.next/static/chunks/{2j9fpx77gfesr.js → 0p5xwnif2xe2v.js} +1 -1
  433. package/server/.next/static/chunks/{422gxqrwveuyc.js → 0p_qyask2har9.js} +1 -1
  434. package/server/.next/static/chunks/{2kurh5s5u8_4-.js → 0s44z2_pzghcu.js} +1 -1
  435. package/server/.next/static/chunks/{3ymogjp57edbj.js → 0tw_we2nleycj.js} +1 -1
  436. package/server/.next/static/chunks/{3r3-9oir5c1ul.js → 0uom2d_-nh45g.js} +1 -1
  437. package/server/.next/static/chunks/{3cjokqd7600_0.js → 0vqfc5ez__g1s.js} +1 -1
  438. package/server/.next/static/chunks/{0o6_y6xu__s6q.js → 0znki_inst5fe.js} +1 -1
  439. package/server/.next/static/chunks/{0x6eipkda93fh.js → 11r3cljnu3lrb.js} +1 -1
  440. package/server/.next/static/chunks/{3kqiccrh_bnpl.js → 12rf9fj_wat4k.js} +2 -2
  441. package/server/.next/static/chunks/{243ijh4fs2zsq.js → 12ryyhs-tt27p.js} +1 -1
  442. package/server/.next/static/chunks/{1ghfc_9g9io17.js → 12z4gcgh75y3h.js} +1 -1
  443. package/server/.next/static/chunks/{299jy1-g0cm8n.js → 13t0_-lm77ctu.js} +1 -1
  444. package/server/.next/static/chunks/{1eeqy_pc_llv4.js → 143_uak5v6uky.js} +1 -1
  445. package/server/.next/static/chunks/{2ziborutqth-2.js → 16f-5rrbswao-.js} +1 -1
  446. package/server/.next/static/chunks/{3hpyrqm98toxv.js → 1andb44i5y-5c.js} +1 -1
  447. package/server/.next/static/chunks/{0-fov5gyz32mj.js → 1d5jx8nbj9hio.js} +1 -1
  448. package/server/.next/static/chunks/{0m40tf7-fh2ht.js → 1hzn5sr2wq7_6.js} +1 -1
  449. package/server/.next/static/chunks/{1qug5gmo2rbaf.js → 1jfri9y7a54t3.js} +1 -1
  450. package/server/.next/static/chunks/1lq20aqwgdq8w.js +1 -0
  451. package/server/.next/static/chunks/{35ua22np4u9jr.js → 1ot9e084ramy3.js} +1 -1
  452. package/server/.next/static/chunks/{2jdlcu25qy00d.js → 1q0dfli6xlok0.js} +1 -1
  453. package/server/.next/static/chunks/{3oe302ug_esoe.js → 1sexa68j4kb7d.js} +1 -1
  454. package/server/.next/static/chunks/{4545xu4sehvxc.js → 1xaww6l378y_h.js} +1 -1
  455. package/server/.next/static/chunks/{20ujg0hz_need.js → 1xhyfwwelhzu1.js} +1 -1
  456. package/server/.next/static/chunks/{2hscqr4n7hu7n.js → 1zid1do5vuxcq.js} +1 -1
  457. package/server/.next/static/chunks/{11_iva96ceble.js → 20u3tmdb-6drr.js} +1 -1
  458. package/server/.next/static/chunks/{0zj507c7ui4jt.js → 20xid8njz36og.js} +1 -1
  459. package/server/.next/static/chunks/{1e0iyxugtm7b0.js → 223rdnw2yty48.js} +2 -2
  460. package/server/.next/static/chunks/{0x1xj431cbkfa.js → 27epf-aa_5m_r.js} +1 -1
  461. package/server/.next/static/chunks/{1urtw14pwufsv.js → 2f07frmj7udob.js} +1 -1
  462. package/server/.next/static/chunks/2gnckmw5e2mfd.js +1 -0
  463. package/server/.next/static/chunks/{1gw40u38oaj6z.js → 2i629nz4h3fqg.js} +1 -1
  464. package/server/.next/static/chunks/{2t30gqjhercob.js → 2jyi95ohxfybd.js} +1 -1
  465. package/server/.next/static/chunks/{3-xb6vd_khwfo.js → 2pjruch-2xss_.js} +1 -1
  466. package/server/.next/static/chunks/{1jc9qa7xb63lp.js → 2plrf95jah9ew.js} +1 -1
  467. package/server/.next/static/chunks/{442t8i7d46g9y.js → 2wmkryogm5g3y.js} +2 -2
  468. package/server/.next/static/chunks/2y5zgpld68mbe.js +7 -0
  469. package/server/.next/static/chunks/{1vyf467_8v-cw.js → 2zudgr23_bvy5.js} +1 -1
  470. package/server/.next/static/chunks/{2seth6dz7lydu.js → 32sed3oqb5mgw.js} +1 -1
  471. package/server/.next/static/chunks/{1zhnm25vt6hu8.js → 3a55yojb_7drl.js} +1 -1
  472. package/server/.next/static/chunks/{3zx1pe40m_ddz.js → 3b0xtqo5kfyuj.js} +1 -1
  473. package/server/.next/static/chunks/{3wl06e5yyzlwh.js → 3c79k7qsyelf1.js} +1 -1
  474. package/server/.next/static/chunks/{0-ett1b-o34r0.js → 3e8jbph5vbqrh.js} +1 -1
  475. package/server/.next/static/chunks/{1muk1ubaswhlj.js → 3ki7epe69d8mi.js} +1 -1
  476. package/server/.next/static/chunks/{1g3u_ngexgvss.js → 3tigi9c4vke8u.js} +1 -1
  477. package/server/.next/static/chunks/{1z8byc-won_tq.js → 3tqlcut9yz40q.js} +1 -1
  478. package/server/.next/static/chunks/{3xbsyym_tfj0u.js → 3y4vkm_orksj_.js} +1 -1
  479. package/server/.next/static/chunks/3zhb71t6q4f9k.js +1 -0
  480. package/server/.next/server/chunks/[root-of-the-server]__0z3hf530bwcq_._.js +0 -3
  481. package/server/.next/server/chunks/[root-of-the-server]__1p3fqi03x5du8._.js +0 -3
  482. package/server/.next/server/chunks/_0hsj1tx2ynla-._.js +0 -3
  483. package/server/.next/server/chunks/_1b1t9p1xljuql._.js +0 -5
  484. package/server/.next/server/chunks/src_lib_collector_http-check_ts_0bh0rtjky3u1-._.js +0 -3
  485. package/server/.next/server/chunks/src_lib_data_apps-db_ts_02ovqtci8e7o6._.js +0 -3
  486. package/server/.next/server/chunks/src_lib_data_deployments-db_ts_1shbv_55rwa2-._.js +0 -3
  487. package/server/.next/server/chunks/src_lib_domain-move_ts_04stiet1-xpe2._.js +0 -3
  488. package/server/.next/server/chunks/src_private_1_nggk_wre7qf._.js +0 -5
  489. package/server/.next/server/chunks/ssr/[root-of-the-server]__05gue5stvejba._.js +0 -4
  490. package/server/.next/server/chunks/ssr/[root-of-the-server]__18gcvkhrt73zc._.js +0 -3
  491. package/server/.next/server/chunks/ssr/[root-of-the-server]__1e0l6kek0ufui._.js +0 -3
  492. package/server/.next/server/chunks/ssr/[root-of-the-server]__1o63-3k1wez40._.js +0 -3
  493. package/server/.next/server/chunks/ssr/[root-of-the-server]__1tgcpistmcbrd._.js +0 -4
  494. package/server/.next/server/chunks/ssr/_034fv8o7kws2k._.js +0 -3
  495. package/server/.next/server/chunks/ssr/_042ow6smd_1gj._.js +0 -3
  496. package/server/.next/server/chunks/ssr/_0hsj1tx2ynla-._.js +0 -3
  497. package/server/.next/server/chunks/ssr/_0zixhhc1lheoi._.js +0 -4
  498. package/server/.next/server/chunks/ssr/_1b1t9p1xljuql._.js +0 -5
  499. package/server/.next/server/chunks/ssr/_218164gkxgum_._.js +0 -4
  500. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_apps_[id]_page_actions_0y5m8cul6d7kk.js +0 -3
  501. package/server/.next/server/chunks/ssr/src_0_5_wl0sww-x7._.js +0 -8
  502. package/server/.next/server/chunks/ssr/src_1koc8y1nfdlw3._.js +0 -3
  503. package/server/.next/server/chunks/ssr/src_app_(console)_0kwns5iudhgwj._.js +0 -3
  504. package/server/.next/server/chunks/ssr/src_app_(console)_apps_[id]_1sfvku9ui1le-._.js +0 -3
  505. package/server/.next/server/chunks/ssr/src_app_signin_1fj68y-bbe-xr._.js +0 -3
  506. package/server/.next/server/chunks/ssr/src_components_08d78uqnnmrrh._.js +0 -3
  507. package/server/.next/server/chunks/ssr/src_lib_1gauld53vvpev._.js +0 -3
  508. package/server/.next/server/chunks/ssr/src_lib_1l8ej-zoyyegd._.js +0 -3
  509. package/server/.next/server/chunks/ssr/src_lib_collector_http-check_ts_0bh0rtjky3u1-._.js +0 -3
  510. package/server/.next/server/chunks/ssr/src_lib_data_apps-db_ts_02ovqtci8e7o6._.js +0 -3
  511. package/server/.next/server/chunks/ssr/src_lib_data_deployments-db_ts_1shbv_55rwa2-._.js +0 -3
  512. package/server/.next/server/chunks/ssr/src_lib_data_vercel-action_ts_1hvera3nwo5fp._.js +0 -3
  513. package/server/.next/server/chunks/ssr/src_lib_domain-move_ts_04stiet1-xpe2._.js +0 -3
  514. package/server/.next/server/chunks/ssr/src_lib_view_14iq8onyfo7nd._.js +0 -3
  515. package/server/.next/server/chunks/ssr/src_lib_view_deploy-actions_ts_1l3rr2k-04gi4._.js +0 -3
  516. package/server/.next/server/chunks/ssr/src_private_04omlb_sgy-_r._.js +0 -5
  517. package/server/.next/static/chunks/0ia5361d7hoce.js +0 -7
  518. package/server/.next/static/chunks/15_3o9t6d7ujo.js +0 -1
  519. package/server/.next/static/chunks/1c0s-ejiwfy2u.js +0 -1
  520. package/server/.next/static/chunks/2j4kmkog1zkpo.js +0 -1
  521. package/server/.next/static/chunks/2y05vm9r_wxds.js +0 -1
  522. /package/server/.next/static/{u0RcJ9L5FEEUdENisty65 → VmJyuS9PCFUrRHa6THIcV}/_buildManifest.js +0 -0
  523. /package/server/.next/static/{u0RcJ9L5FEEUdENisty65 → VmJyuS9PCFUrRHa6THIcV}/_clientMiddlewareManifest.js +0 -0
  524. /package/server/.next/static/{u0RcJ9L5FEEUdENisty65 → VmJyuS9PCFUrRHa6THIcV}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,399582,e=>{let t=(0,e.i(33550).f)("outline","copy","Copy",[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]);e.s(["f",0,t],399582)},531219,e=>{let t=(0,e.i(33550).f)("outline","filter-off","FilterOff",[["path",{d:"M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]);e.s(["f",0,t],531219)},617708,e=>{let t=(0,e.i(33550).f)("outline","plus","Plus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);e.s(["f",0,t],617708)},225913,e=>{var t=e.i(207670);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=t.f;e.s(["f",0,(e,t)=>s=>{var i;if((null==t?void 0:t.variants)==null)return n(e,null==s?void 0:s.class,null==s?void 0:s.className);let{variants:r,defaultVariants:l}=t,o=Object.keys(r).map(e=>{let t=null==s?void 0:s[e],n=null==l?void 0:l[e];if(null===t)return null;let i=a(t)||a(n);return r[e][i]}),d=s&&Object.entries(s).reduce((e,t)=>{let[a,n]=t;return void 0===n||(e[a]=n),e},{});return n(e,o,null==t||null==(i=t.compoundVariants)?void 0:i.reduce((e,t)=>{let{class:a,className:n,...s}=t;return Object.entries(s).every(e=>{let[t,a]=e;return Array.isArray(a)?a.includes({...l,...d}[t]):({...l,...d})[t]===a})?[...e,a,n]:e},[]),null==s?void 0:s.class,null==s?void 0:s.className)}])},477691,e=>{var t=e.i(843476),a=e.i(785642),n=e.i(399582),s=e.i(23990),i=e.i(617708),r=e.i(944971),l=e.i(522016),o=e.i(271645),d=e.i(846696),c=e.i(428325),u=e.i(500443),p=e.i(776639),x=e.i(95187);let h=(0,x.createServerReference)("40234f191efc0a60d6cfe72eec5647c53c1f062991",x.callServer,void 0,x.findSourceMapURL,"createKeyAction");function m({scopes:e}){return(0,t.jsx)(t.Fragment,{children:e.map(e=>(0,t.jsx)("span",{className:"mr-1 inline-block whitespace-nowrap rounded-[4px] border border-line bg-surface-2 px-[5px] font-mono text-xs text-ink-soft",children:e},e))})}var f=e.i(898121);function g({icon:e,title:a,sub:n}){return(0,t.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,t.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:e}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.F,{className:"text-base",children:a}),(0,t.jsx)(p.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:n})]})]})}function v({onCreated:e,onCancel:a}){let[n,i]=(0,o.useState)(""),[l,u]=(0,o.useState)(f.J),[p,x]=(0,o.useState)(f.j),[b,j]=(0,o.useState)(String(f.D)),[y,k]=(0,o.useState)({}),[N,C]=(0,o.useState)(""),[w,S]=(0,o.useTransition)();return(0,t.jsxs)("form",{onSubmit:function(t){t.preventDefault(),S(async()=>{k({}),C("");try{let t=await h({name:n.trim(),scopes:f.B.filter(e=>l.includes(e)),expiry:p,ratePerMin:b.trim()});t.ok&&t.data?(d.c.success(t.message??"Key created."),e(t.data)):t.ok||(t.fieldErrors?k(t.fieldErrors):C(t.error))}catch{C("Watchbell didn't answer. Check that it's still running, then try again.")}})},noValidate:!0,children:[(0,t.jsx)(g,{icon:(0,t.jsx)(s.f,{size:19}),title:"Create API key",sub:"For one app or agent. Shown once."}),(0,t.jsxs)("div",{className:"px-[18px] pt-1.5",children:[(0,t.jsx)(c.O,{id:"key-name",label:"Name",help:"Lowercase letters, digits and dashes. Agents and Logs show it.",error:y.name,children:(0,t.jsx)("input",{id:"key-name",value:n,onChange:e=>i(e.target.value),placeholder:r.C.namePlaceholder,autoComplete:"off",autoCapitalize:"none",spellCheck:!1,className:c.S})}),(0,t.jsxs)("fieldset",{className:"mb-3.5",children:[(0,t.jsx)("legend",{className:"mb-[5px] text-[13px] font-medium",children:"Scopes"}),(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:f.B.map(e=>(0,t.jsxs)("label",{className:"flex cursor-pointer items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l.includes(e),onChange:()=>u(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),className:"mt-[3px] accent-brand"}),(0,t.jsxs)("span",{children:[(0,t.jsx)(m,{scopes:[e]})," ",(0,t.jsx)("span",{className:"text-[13px] text-ink-soft",children:f.h[e].short})]})]},e))}),y.scopes&&(0,t.jsx)("span",{className:"text-[12.5px] text-err",role:"alert",children:y.scopes})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3 max-[560px]:grid-cols-1",children:[(0,t.jsx)(c.O,{id:"key-expiry",label:"Expires",error:y.expiry,children:(0,t.jsx)("select",{id:"key-expiry",value:p,onChange:e=>x(e.target.value),className:c.S,children:f.W.map(e=>(0,t.jsx)("option",{value:e,children:f.o[e]},e))})}),(0,t.jsx)(c.O,{id:"key-rate",label:"Rate limit",help:"Requests per minute, 1–600. Applies before the provider's own limits.",error:y.ratePerMin,children:(0,t.jsx)("input",{id:"key-rate",inputMode:"numeric",value:b,onChange:e=>j(e.target.value),className:`${c.S} font-mono`})})]}),N&&(0,t.jsx)("p",{className:"mb-3 text-[13px] text-err",role:"alert",children:N})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(c.K,{onClick:a,disabled:w,children:"Cancel"}),(0,t.jsx)(c.K,{type:"submit",variant:"primary",disabled:w,children:w?"Creating…":"Create key"})]})]})}function b({created:e,onDone:s}){async function i(){try{await navigator.clipboard.writeText(e.key),d.c.success("Copied.")}catch{d.c.error("Couldn't copy. Select the key and copy it by hand.")}}return(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{icon:(0,t.jsx)(a.f,{size:19}),title:`Key ${e.name} created`,sub:"Copy it now."}),(0,t.jsxs)("div",{className:"px-[18px] pb-3 pt-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"min-w-0 flex-1 overflow-x-auto whitespace-nowrap rounded-md border border-line bg-sunken px-2 py-1.5 font-mono text-[12.5px]","data-testid":"new-key",children:e.key}),(0,t.jsxs)(c.K,{size:"sm",onClick:i,children:[(0,t.jsx)(n.f,{size:15,"aria-hidden":!0}),"Copy"]})]}),(0,t.jsx)("p",{className:"mt-2.5 rounded-md border border-warn-icon bg-warn-soft px-2.5 py-2 text-[13px] text-warn",children:"Watchbell keeps only a SHA-256 hash of this key, so it can't show it again. Lost it? Revoke it and create a new one."}),(0,t.jsxs)("p",{className:"mb-0 mt-3 text-[13px] text-ink-soft",children:["Next: put it in the app's environment as ",(0,t.jsx)("span",{className:"font-mono",children:"WATCHBELL_API_KEY"}),", then follow ",(0,t.jsx)(l.default,{href:"/ai",className:"text-brand",children:"Quick start"})," or ",(0,t.jsx)(l.default,{href:"/ai/connect",className:"text-brand",children:"Connect an agent"}),"."]})]}),(0,t.jsx)("div",{className:"flex justify-end gap-2 border-t border-line px-[18px] py-3",children:(0,t.jsx)(c.K,{variant:"primary",onClick:s,children:"Done"})})]})}e.s(["CreateKeyDialog",0,function(){let[e,a]=(0,o.useState)(!1),[n,s]=(0,o.useState)(null);function r(e){a(e),e||s(null)}return(0,u.useHoldRefresh)(e),(0,t.jsxs)(p.N,{open:e,onOpenChange:r,children:[(0,t.jsxs)(p.a,{render:(0,t.jsx)(c.K,{variant:"primary"}),children:[(0,t.jsx)(i.f,{size:16,"aria-hidden":!0}),"Create key"]}),(0,t.jsx)(p.d,{className:"gap-0 p-0 sm:max-w-[640px]",showCloseButton:!1,children:n?(0,t.jsx)(b,{created:n,onDone:()=>r(!1)}):(0,t.jsx)(v,{onCreated:s,onCancel:()=>r(!1)})})]})}],477691)},211541,e=>{var t=e.i(843476),a=e.i(271645),n=e.i(846696),s=e.i(46200),i=e.i(428325),r=e.i(500443),l=e.i(177106),o=e.i(776639),d=e.i(95187);let c=(0,d.createServerReference)("60537244f8b3edaa064f08981cd6d4466256f9716f",d.callServer,void 0,d.findSourceMapURL,"changeKeyAction"),u=(0,d.createServerReference)("403dcec2a681653664141f715fc05bd1b81fa68912",d.callServer,void 0,d.findSourceMapURL,"revokeKeyAction");var p=e.i(898121);let x={rename:{title:e=>`Rename ${e}`,sub:"Agents and Logs show the name. Lowercase letters, digits and dashes.",cta:"Save name"},rate:{title:()=>"Change rate limit",sub:"Requests per minute, 1–600. Applies before the provider's own limits, within a minute.",cta:"Save limit"},expiry:{title:()=>"Change expiry",sub:"Counted from today. The key stops working at that date.",cta:"Save expiry"},routing:{title:()=>"Change routing",sub:"Pin this key to one provider and, if you like, one model. Without a pin it uses the default provider.",cta:"Save routing"}};function h({mode:e,k:s,providers:r,onDone:l}){let[d,u]=(0,a.useState)(s.name),[m,f]=(0,a.useState)(String(s.ratePerMin)),[g,v]=(0,a.useState)(s.expiresAt?"90d":"never"),[b,j]=(0,a.useState)(s.providerId??""),[y,k]=(0,a.useState)(s.model??""),[N,C]=(0,a.useState)({}),[w,S]=(0,a.useState)(""),[z,M]=(0,a.useTransition)(),R=x[e];return(0,t.jsxs)("form",{onSubmit:function(t){t.preventDefault(),M(async()=>{C({}),S("");try{let t=await c(s.id,"rename"===e?{kind:"rename",name:d.trim()}:"rate"===e?{kind:"rate",ratePerMin:m.trim()}:"expiry"===e?{kind:"expiry",expiry:g}:{kind:"routing",providerId:b||null,model:b?y.trim():null});t.ok?(n.c.success(t.message??"Key updated."),l()):t.fieldErrors?C(t.fieldErrors):S(t.error)}catch{S("Watchbell didn't answer. Check that it's still running, then try again.")}})},noValidate:!0,children:[(0,t.jsxs)("div",{className:"px-[18px] pb-2 pt-4",children:[(0,t.jsx)(o.F,{className:"text-base",children:R.title(s.name)}),(0,t.jsx)(o.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:R.sub})]}),(0,t.jsxs)("div",{className:"px-[18px] pt-1.5",children:["rename"===e&&(0,t.jsx)(i.O,{id:"edit-name",label:"Name",error:N.name,children:(0,t.jsx)("input",{id:"edit-name",value:d,onChange:e=>u(e.target.value),autoComplete:"off",autoCapitalize:"none",spellCheck:!1,className:i.S})}),"rate"===e&&(0,t.jsx)(i.O,{id:"edit-rate",label:"Rate limit",help:"Requests per minute.",error:N.ratePerMin,children:(0,t.jsx)("input",{id:"edit-rate",inputMode:"numeric",value:m,onChange:e=>f(e.target.value),className:`${i.S} font-mono`})}),"expiry"===e&&(0,t.jsx)(i.O,{id:"edit-expiry",label:"Expires",error:N.expiry,children:(0,t.jsx)("select",{id:"edit-expiry",value:g,onChange:e=>v(e.target.value),className:i.S,children:p.W.map(e=>(0,t.jsx)("option",{value:e,children:p.o[e]},e))})}),"routing"===e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.O,{id:"edit-provider",label:"Provider",help:r.length?void 0:"No provider is connected yet. Until one is, this key has nothing to pin to.",error:N.providerId,children:(0,t.jsxs)("select",{id:"edit-provider",value:b,onChange:e=>j(e.target.value),className:i.S,children:[(0,t.jsx)("option",{value:"",children:"No pin (default provider)"}),r.map(e=>(0,t.jsxs)("option",{value:e.id,children:[e.name,e.enabled?"":" (off)"]},e.id))]})}),(0,t.jsx)(i.O,{id:"edit-model",label:"Model",help:"Optional. A Gemini model id, for example gemini-3.8-flash. Empty uses the provider's default.",error:N.model,children:(0,t.jsx)("input",{id:"edit-model",value:y,onChange:e=>k(e.target.value),disabled:!b,placeholder:"gemini-3.8-flash",autoComplete:"off",autoCapitalize:"none",spellCheck:!1,className:`${i.S} font-mono`})})]}),w&&(0,t.jsx)("p",{className:"mb-3 text-[13px] text-err",role:"alert",children:w})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(i.K,{onClick:l,disabled:z,children:"Cancel"}),(0,t.jsx)(i.K,{type:"submit",variant:"primary",disabled:z,children:z?"Saving…":R.cta})]})]})}e.s(["KeyActions",0,function({k:e,providers:n}){let[d,c]=(0,a.useState)(null);return(0,r.useHoldRefresh)(null!==d),(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,t.jsx)(s.f,{trigger:(0,t.jsx)(i.K,{size:"sm",children:"Revoke"}),title:`Revoke ${e.name}?`,body:`Calls with ${e.prefix}… answer 401 within a minute. Agents using it show "Key revoked". This can't be undone; create a new key instead.`,cta:"Revoke key",danger:!0,onConfirm:async()=>{let t=await u(e.id);return{ok:t.ok,message:(t.ok?t.message:t.error)??""}}}),(0,t.jsx)(l.RowMenu,{label:`Actions for ${e.name}`,items:[{label:"Rename",onSelect:()=>c("rename")},{label:"Change rate limit",onSelect:()=>c("rate")},{label:"Change expiry",onSelect:()=>c("expiry")},{label:"Change routing",onSelect:()=>c("routing")}]}),(0,t.jsx)(o.N,{open:null!==d,onOpenChange:e=>{e||c(null)},children:(0,t.jsx)(o.d,{className:"gap-0 p-0 sm:max-w-[520px]",showCloseButton:!1,children:d&&(0,t.jsx)(h,{mode:d,k:e,providers:n,onDone:()=>c(null)})})})]})}],211541)},46200,e=>{var t=e.i(843476),a=e.i(146874),n=e.i(239692),s=e.i(271645),i=e.i(846696),r=e.i(428325),l=e.i(500443),o=e.i(776639);e.s(["f",0,function({trigger:e,open:d,onOpenChange:c,title:u,body:p,cta:x,danger:h=!1,onConfirm:m}){let[f,g]=(0,s.useState)(!1),v=d??f,[b,j]=(0,s.useTransition)();function y(e){void 0===d&&g(e),c?.(e)}return(0,l.useHoldRefresh)(v),(0,t.jsxs)(o.N,{open:v,onOpenChange:e=>{b||y(e)},children:[void 0!==e&&((0,s.isValidElement)(e)?(0,t.jsx)(o.a,{render:e}):(0,t.jsx)(o.a,{children:e})),(0,t.jsxs)(o.d,{className:"gap-0 p-0 sm:max-w-[640px]",showCloseButton:!1,children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,t.jsx)("span",{className:`grid size-9 shrink-0 place-items-center rounded-lg bg-sunken ${h?"text-err":"text-ink-soft"}`,children:h?(0,t.jsx)(a.f,{size:19}):(0,t.jsx)(n.f,{size:19})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.F,{className:"text-base",children:u}),(0,t.jsx)(o.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:p})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(r.K,{onClick:()=>y(!1),disabled:b,children:"Keep as is"}),(0,t.jsx)(r.K,{variant:h?"danger":"primary",onClick:function(){j(async()=>{try{let e=await m();e.ok?(i.c.success(e.message),y(!1)):i.c.error(e.message)}catch{i.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},disabled:b,children:b?"Working…":x})]})]})]})}])},374931,e=>{var t=e.i(843476),a=e.i(531219),n=e.i(357772),s=e.i(271645),i=e.i(54131),r=e.i(428325),l=e.i(541299),o=e.i(691106),d=e.i(975157),c=e.i(322534),u=e.i(495784);e.s(["ListFilter",0,function({placeholder:e,states:p,groups:x,head:h,rows:m,chips:f}){var g,v;let b,[j,y]=(0,s.useState)(""),[k,N]=(0,s.useState)(""),[C,w]=(0,s.useState)(""),[S,z]=(0,s.useState)(""),[M,R]=(0,s.useState)(1),A=(0,i.useMask)(),K=(g=m.map(e=>({...e,text:`${e.text} ${A("text",e.text)}`})),b=(v={text:j,state:k,group:S,tag:C}).text.trim().toLowerCase(),g.filter(e=>(!v.state||e.state===v.state)&&(!v.group||e.group===v.group)&&(!v.tag||(e.tags??[]).includes(v.tag))&&(!b||e.text.toLowerCase().includes(b)))),P=(0,u.$)(K,M),$=P.rows;P.page!==M&&R(P.page);let O=p?.find(([e])=>e===k)?.[1];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 px-[18px] pb-3 pt-3.5 max-[720px]:px-3.5",children:[(0,t.jsx)("input",{className:(0,d.f)(r.S,"w-[240px] max-[720px]:w-full"),placeholder:e,"aria-label":e,value:j,onChange:e=>{y(e.target.value),R(1)}}),p&&(0,t.jsxs)("select",{className:(0,d.f)(r.S,"w-auto"),"aria-label":"State",value:k,onChange:e=>{N(e.target.value),R(1)},children:[(0,t.jsx)("option",{value:"",children:"All states"}),p.map(([e,a])=>(0,t.jsx)("option",{value:e,children:a},e))]}),x&&x.length>1&&(0,t.jsxs)("select",{className:(0,d.f)(r.S,"w-auto"),"aria-label":"Account",value:S,onChange:e=>{z(e.target.value),R(1)},children:[(0,t.jsx)("option",{value:"",children:"All accounts"}),x.map(e=>(0,t.jsx)("option",{value:e,children:A("account",e)},e))]}),f?.map(([e,a])=>(0,t.jsx)("button",{type:"button","aria-pressed":C===e,onClick:()=>{w(C===e?"":e),R(1)},className:(0,d.f)("rounded-[5px] border px-2 py-0.5 text-[12.5px]",C===e?"border-brand bg-brand-soft text-brand":"border-line text-ink-soft hover:bg-hover"),children:a},e)),O&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-[5px] bg-brand-soft py-px pl-2 pr-1 text-[12.5px] text-brand",children:["State: ",O,(0,t.jsx)("button",{type:"button","aria-label":"Remove filter",className:"px-0.5",onClick:()=>{N(""),R(1)},children:(0,t.jsx)(n.f,{size:13})})]}),S&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-[5px] bg-brand-soft py-px pl-2 pr-1 text-[12.5px] text-brand",children:["Account: ",(0,t.jsx)(i.Masked,{kind:"account",real:S}),(0,t.jsx)("button",{type:"button","aria-label":"Remove account filter",className:"px-0.5",onClick:()=>{z(""),R(1)},children:(0,t.jsx)(n.f,{size:13})})]}),(0,t.jsx)("span",{role:"status",className:"ml-auto text-[12.5px] text-ink-soft",children:(0,c.f)(K.length)})]}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:o.o,children:[(0,t.jsx)(o.U,{head:h}),(0,t.jsx)("tbody",{children:$.map(e=>(0,t.jsx)(s.Fragment,{children:e.row},e.key))})]})}),0===K.length&&m.length>0&&(0,t.jsxs)(r.k,{icon:a.f,title:"No results",children:["Nothing matches these filters."," ",(0,t.jsx)("button",{type:"button",className:"text-brand hover:underline",onClick:()=>{y(""),N(""),z(""),w(""),R(1)},children:"Clear filters"})]}),(0,t.jsx)(l.f,{page:P.page,pages:P.pages,text:(0,u.z)(P),onPage:R})]})}],374931)},541299,495784,e=>{var t=e.i(843476),a=e.i(271645),n=e.i(428325),s=e.i(975157);function i(e,t,a=25){let n=e.length,s=Math.max(1,Math.ceil(n/a)),r=Math.min(Math.max(Number.isFinite(t)?Math.floor(t):1,1),s),l=(r-1)*a,o=e.slice(l,l+a);return{rows:o,page:r,pages:s,from:0===n?0:l+1,to:l+o.length,total:n}}e.s(["f",0,function({page:e,pages:i,text:r,onPage:l,bleed:o=!1}){let d=(0,a.useRef)(null),c=(0,a.useRef)(null);if((0,a.useEffect)(()=>{null!==c.current&&(d.current?.querySelectorAll("button")[c.current]?.focus(),c.current=null)},[e]),i<=1)return null;let u=(e,t)=>{(e<=1||e>=i)&&(c.current=t),l(e)};return(0,t.jsxs)("div",{className:(0,s.f)("flex items-center gap-2 border-t border-line px-[18px] py-2.5 text-[12.5px] text-ink-soft",o?"-mx-[18px] -mb-4 mt-2":"max-[720px]:px-3.5"),children:[(0,t.jsx)("span",{role:"status",children:r}),(0,t.jsxs)("span",{ref:d,className:"ml-auto flex gap-1.5",children:[(0,t.jsx)(n.K,{size:"sm",className:"disabled:hover:bg-surface","aria-label":"Previous page",disabled:e<=1,onClick:()=>u(e-1,1),children:"‹ Previous"}),(0,t.jsx)(n.K,{size:"sm",className:"disabled:hover:bg-surface","aria-label":"Next page",disabled:e>=i,onClick:()=>u(e+1,0),children:"Next ›"})]})]})}],541299),e.s(["k",0,function(e,t,a,n){return n<=1?null:t>0&&null!==a?a:e[0]?.id??null},"$",0,i,"f",0,function(e,t,a,n=25){let s=null===a?0:Math.max(0,e.findIndex(e=>e.id===a)),r=i(e.slice(s),t,n);return 0===s||r.page>1?{...r,shift:s}:{...i(e,1,n),shift:0}},"z",0,function(e,t=0,a=e.total){return`${e.from+t}–${e.to+t} of ${a}`}],495784)},177106,e=>{var t=e.i(843476),a=e.i(33550);let n=(0,a.f)("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),s=(0,a.f)("outline","dots-vertical","DotsVertical",[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]);var i=e.i(271645),r=e.i(428325),l=e.i(500443),o=e.i(755146);e.s(["RowMenu",0,function({items:e,button:a=!1,label:d="Actions"}){let[c,u]=(0,i.useState)(!1);return(0,l.useHoldRefresh)(c),(0,t.jsxs)(o.G,{open:c,onOpenChange:u,children:[a?(0,t.jsxs)(o.X,{className:(0,r.R)(),children:[d," ",(0,t.jsx)(n,{size:16,"aria-hidden":!0})]}):(0,t.jsx)(o.X,{"aria-label":d,className:"rounded-[5px] px-1.5 py-1 text-ink-faint hover:bg-sunken hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40",children:(0,t.jsx)(s,{size:17})}),(0,t.jsx)(o.L,{align:"end",className:"min-w-[200px] rounded-[8px] border border-line-strong bg-surface p-1 shadow-[0_8px_24px_rgba(0,0,0,.14)] ring-0",children:e.map((e,a)=>"---"===e?(0,t.jsx)(o.U,{},`sep-${a}`):(0,t.jsxs)(o.r,{disabled:void 0!==e.disabled,variant:e.danger?"destructive":"default",className:"rounded-[5px] px-2.5 py-[7px]",onClick:()=>{e.href?window.open(e.href,"_blank","noopener,noreferrer"):e.onSelect?.()},children:[e.label,void 0!==e.disabled&&(0,t.jsx)("span",{className:"ml-auto pl-3 text-[11px] text-ink-faint",children:e.disabled})]},e.label))})]})}],177106)},776639,998218,152744,e=>{var t=e.i(843476),a=e.i(526323),n=e.i(828376);e.s(["f",0,n],998218);var n=n,s=e.i(209977),i=e.i(921637),r=e.i(141708),l=e.i(593480),o=e.i(309169),d=n;e.s(["f",0,d],152744);var d=n,c=e.i(975157),u=e.i(271645),p=e.i(540886),x=e.i(552245);let h=u.forwardRef(function(e,t){let{render:a,className:n,disabled:s=!1,focusableWhenDisabled:i=!1,nativeButton:r=!0,style:l,...o}=e,{getButtonProps:d,buttonRef:c}=(0,p.f)({disabled:s,focusableWhenDisabled:i,native:r});return(0,x.a)("button",e,{state:{disabled:s},ref:[t,c],props:[o,d]})}),m=(0,e.i(225913).f)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function f({className:e,variant:a="default",size:n="default",...s}){return(0,t.jsx)(h,{"data-slot":"button",className:(0,c.f)(m({variant:a,size:n,className:e})),...s})}var g=e.i(456420);let v={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};v.node;let b=(0,g.f)(v);function j({...e}){return(0,t.jsx)(s.f.Portal,{"data-slot":"dialog-portal",...e})}function y({className:e,...a}){return(0,t.jsx)(r.f.Backdrop,{"data-slot":"dialog-overlay",className:(0,c.f)("fixed inset-0 isolate z-50 bg-black/40 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}e.s(["N",0,function({...e}){return(0,t.jsx)(a.f.Root,{"data-slot":"dialog",...e})},"d",0,function({className:e,children:a,showCloseButton:n=!0,...s}){return(0,t.jsxs)(j,{children:[(0,t.jsx)(y,{}),(0,t.jsxs)(l.f.Popup,{"data-slot":"dialog-content",className:(0,c.f)("fixed top-1/2 left-1/2 z-50 grid w-full grid-cols-[minmax(0,1fr)] max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...s,children:[a,n&&(0,t.jsxs)(i.f.Close,{"data-slot":"dialog-close",render:(0,t.jsx)(f,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,t.jsx)(b,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"C",0,function({className:e,...a}){return(0,t.jsx)(d.Description,{"data-slot":"dialog-description",className:(0,c.f)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})},"F",0,function({className:e,...a}){return(0,t.jsx)(o.f.Title,{"data-slot":"dialog-title",className:(0,c.f)("font-heading text-base leading-none font-medium",e),...a})},"a",0,function({...e}){return(0,t.jsx)(n.Trigger,{"data-slot":"dialog-trigger",...e})}],776639)},322534,e=>{e.i(684496),e.s(["f",0,e=>`${e} item${1===e?"":"s"}`])},898121,e=>{let t={"ai:invoke":{short:"models",long:"Chat completions and the model list through your provider connections."},"read:status":{short:"console data, MCP",long:"Read-only console data: GET /api/v1/status and the MCP server. Database names are aliases; no URLs, emails or secrets."},"write:notes":{short:"post AI notes",long:e.i(944971).C.writeNotesLong}};e.s(["j",0,"90d","D",0,20,"J",0,["ai:invoke"],"W",0,["7d","30d","90d","1y","never"],"o",0,{"7d":"In 7 days","30d":"In 30 days","90d":"In 90 days","1y":"In 1 year",never:"Never"},"B",0,["ai:invoke","read:status","write:notes"],"h",0,t])}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,399582,e=>{let t=(0,e.i(33550).f)("outline","copy","Copy",[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]);e.s(["f",0,t],399582)},531219,e=>{let t=(0,e.i(33550).f)("outline","filter-off","FilterOff",[["path",{d:"M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]);e.s(["f",0,t],531219)},617708,e=>{let t=(0,e.i(33550).f)("outline","plus","Plus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);e.s(["f",0,t],617708)},225913,e=>{var t=e.i(207670);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=t.f;e.s(["f",0,(e,t)=>s=>{var i;if((null==t?void 0:t.variants)==null)return n(e,null==s?void 0:s.class,null==s?void 0:s.className);let{variants:r,defaultVariants:l}=t,o=Object.keys(r).map(e=>{let t=null==s?void 0:s[e],n=null==l?void 0:l[e];if(null===t)return null;let i=a(t)||a(n);return r[e][i]}),d=s&&Object.entries(s).reduce((e,t)=>{let[a,n]=t;return void 0===n||(e[a]=n),e},{});return n(e,o,null==t||null==(i=t.compoundVariants)?void 0:i.reduce((e,t)=>{let{class:a,className:n,...s}=t;return Object.entries(s).every(e=>{let[t,a]=e;return Array.isArray(a)?a.includes({...l,...d}[t]):({...l,...d})[t]===a})?[...e,a,n]:e},[]),null==s?void 0:s.class,null==s?void 0:s.className)}])},477691,e=>{var t=e.i(843476),a=e.i(785642),n=e.i(399582),s=e.i(23990),i=e.i(617708),r=e.i(944971),l=e.i(522016),o=e.i(271645),d=e.i(846696),c=e.i(428325),u=e.i(500443),p=e.i(776639),x=e.i(95187);let h=(0,x.createServerReference)("40813fefbed7153c27b1cdb68a35245ff8aaca9fa7",x.callServer,void 0,x.findSourceMapURL,"createKeyAction");function m({scopes:e}){return(0,t.jsx)(t.Fragment,{children:e.map(e=>(0,t.jsx)("span",{className:"mr-1 inline-block whitespace-nowrap rounded-[4px] border border-line bg-surface-2 px-[5px] font-mono text-xs text-ink-soft",children:e},e))})}var f=e.i(898121);function g({icon:e,title:a,sub:n}){return(0,t.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,t.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:e}),(0,t.jsxs)("div",{children:[(0,t.jsx)(p.F,{className:"text-base",children:a}),(0,t.jsx)(p.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:n})]})]})}function v({onCreated:e,onCancel:a}){let[n,i]=(0,o.useState)(""),[l,u]=(0,o.useState)(f.J),[p,x]=(0,o.useState)(f.j),[b,j]=(0,o.useState)(String(f.D)),[y,k]=(0,o.useState)({}),[N,C]=(0,o.useState)(""),[w,S]=(0,o.useTransition)();return(0,t.jsxs)("form",{onSubmit:function(t){t.preventDefault(),S(async()=>{k({}),C("");try{let t=await h({name:n.trim(),scopes:f.B.filter(e=>l.includes(e)),expiry:p,ratePerMin:b.trim()});t.ok&&t.data?(d.c.success(t.message??"Key created."),e(t.data)):t.ok||(t.fieldErrors?k(t.fieldErrors):C(t.error))}catch{C("Watchbell didn't answer. Check that it's still running, then try again.")}})},noValidate:!0,children:[(0,t.jsx)(g,{icon:(0,t.jsx)(s.f,{size:19}),title:"Create API key",sub:"For one app or agent. Shown once."}),(0,t.jsxs)("div",{className:"px-[18px] pt-1.5",children:[(0,t.jsx)(c.O,{id:"key-name",label:"Name",help:"Lowercase letters, digits and dashes. Agents and Logs show it.",error:y.name,children:(0,t.jsx)("input",{id:"key-name",value:n,onChange:e=>i(e.target.value),placeholder:r.C.namePlaceholder,autoComplete:"off",autoCapitalize:"none",spellCheck:!1,className:c.S})}),(0,t.jsxs)("fieldset",{className:"mb-3.5",children:[(0,t.jsx)("legend",{className:"mb-[5px] text-[13px] font-medium",children:"Scopes"}),(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:f.B.map(e=>(0,t.jsxs)("label",{className:"flex cursor-pointer items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:l.includes(e),onChange:()=>u(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),className:"mt-[3px] accent-brand"}),(0,t.jsxs)("span",{children:[(0,t.jsx)(m,{scopes:[e]})," ",(0,t.jsx)("span",{className:"text-[13px] text-ink-soft",children:f.h[e].short})]})]},e))}),y.scopes&&(0,t.jsx)("span",{className:"text-[12.5px] text-err",role:"alert",children:y.scopes})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3 max-[560px]:grid-cols-1",children:[(0,t.jsx)(c.O,{id:"key-expiry",label:"Expires",error:y.expiry,children:(0,t.jsx)("select",{id:"key-expiry",value:p,onChange:e=>x(e.target.value),className:c.S,children:f.W.map(e=>(0,t.jsx)("option",{value:e,children:f.o[e]},e))})}),(0,t.jsx)(c.O,{id:"key-rate",label:"Rate limit",help:"Requests per minute, 1–600. Applies before the provider's own limits.",error:y.ratePerMin,children:(0,t.jsx)("input",{id:"key-rate",inputMode:"numeric",value:b,onChange:e=>j(e.target.value),className:`${c.S} font-mono`})})]}),N&&(0,t.jsx)("p",{className:"mb-3 text-[13px] text-err",role:"alert",children:N})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(c.K,{onClick:a,disabled:w,children:"Cancel"}),(0,t.jsx)(c.K,{type:"submit",variant:"primary",disabled:w,children:w?"Creating…":"Create key"})]})]})}function b({created:e,onDone:s}){async function i(){try{await navigator.clipboard.writeText(e.key),d.c.success("Copied.")}catch{d.c.error("Couldn't copy. Select the key and copy it by hand.")}}return(0,t.jsxs)("div",{children:[(0,t.jsx)(g,{icon:(0,t.jsx)(a.f,{size:19}),title:`Key ${e.name} created`,sub:"Copy it now."}),(0,t.jsxs)("div",{className:"px-[18px] pb-3 pt-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("code",{className:"min-w-0 flex-1 overflow-x-auto whitespace-nowrap rounded-md border border-line bg-sunken px-2 py-1.5 font-mono text-[12.5px]","data-testid":"new-key",children:e.key}),(0,t.jsxs)(c.K,{size:"sm",onClick:i,children:[(0,t.jsx)(n.f,{size:15,"aria-hidden":!0}),"Copy"]})]}),(0,t.jsx)("p",{className:"mt-2.5 rounded-md border border-warn-icon bg-warn-soft px-2.5 py-2 text-[13px] text-warn",children:"Watchbell keeps only a SHA-256 hash of this key, so it can't show it again. Lost it? Revoke it and create a new one."}),(0,t.jsxs)("p",{className:"mb-0 mt-3 text-[13px] text-ink-soft",children:["Next: put it in the app's environment as ",(0,t.jsx)("span",{className:"font-mono",children:"WATCHBELL_API_KEY"}),", then follow ",(0,t.jsx)(l.default,{href:"/ai",className:"text-brand",children:"Quick start"})," or ",(0,t.jsx)(l.default,{href:"/ai/connect",className:"text-brand",children:"Connect an agent"}),"."]})]}),(0,t.jsx)("div",{className:"flex justify-end gap-2 border-t border-line px-[18px] py-3",children:(0,t.jsx)(c.K,{variant:"primary",onClick:s,children:"Done"})})]})}e.s(["CreateKeyDialog",0,function(){let[e,a]=(0,o.useState)(!1),[n,s]=(0,o.useState)(null);function r(e){a(e),e||s(null)}return(0,u.useHoldRefresh)(e),(0,t.jsxs)(p.N,{open:e,onOpenChange:r,children:[(0,t.jsxs)(p.a,{render:(0,t.jsx)(c.K,{variant:"primary"}),children:[(0,t.jsx)(i.f,{size:16,"aria-hidden":!0}),"Create key"]}),(0,t.jsx)(p.d,{className:"gap-0 p-0 sm:max-w-[640px]",showCloseButton:!1,children:n?(0,t.jsx)(b,{created:n,onDone:()=>r(!1)}):(0,t.jsx)(v,{onCreated:s,onCancel:()=>r(!1)})})]})}],477691)},211541,e=>{var t=e.i(843476),a=e.i(271645),n=e.i(846696),s=e.i(46200),i=e.i(428325),r=e.i(500443),l=e.i(177106),o=e.i(776639),d=e.i(95187);let c=(0,d.createServerReference)("6020764e8dd0d8d04bce38a1f37a9b14976b685967",d.callServer,void 0,d.findSourceMapURL,"changeKeyAction"),u=(0,d.createServerReference)("4070876d34e488ac092731e30606eb0febd1a49cdb",d.callServer,void 0,d.findSourceMapURL,"revokeKeyAction");var p=e.i(898121);let x={rename:{title:e=>`Rename ${e}`,sub:"Agents and Logs show the name. Lowercase letters, digits and dashes.",cta:"Save name"},rate:{title:()=>"Change rate limit",sub:"Requests per minute, 1–600. Applies before the provider's own limits, within a minute.",cta:"Save limit"},expiry:{title:()=>"Change expiry",sub:"Counted from today. The key stops working at that date.",cta:"Save expiry"},routing:{title:()=>"Change routing",sub:"Pin this key to one provider and, if you like, one model. Without a pin it uses the default provider.",cta:"Save routing"}};function h({mode:e,k:s,providers:r,onDone:l}){let[d,u]=(0,a.useState)(s.name),[m,f]=(0,a.useState)(String(s.ratePerMin)),[g,v]=(0,a.useState)(s.expiresAt?"90d":"never"),[b,j]=(0,a.useState)(s.providerId??""),[y,k]=(0,a.useState)(s.model??""),[N,C]=(0,a.useState)({}),[w,S]=(0,a.useState)(""),[z,M]=(0,a.useTransition)(),R=x[e];return(0,t.jsxs)("form",{onSubmit:function(t){t.preventDefault(),M(async()=>{C({}),S("");try{let t=await c(s.id,"rename"===e?{kind:"rename",name:d.trim()}:"rate"===e?{kind:"rate",ratePerMin:m.trim()}:"expiry"===e?{kind:"expiry",expiry:g}:{kind:"routing",providerId:b||null,model:b?y.trim():null});t.ok?(n.c.success(t.message??"Key updated."),l()):t.fieldErrors?C(t.fieldErrors):S(t.error)}catch{S("Watchbell didn't answer. Check that it's still running, then try again.")}})},noValidate:!0,children:[(0,t.jsxs)("div",{className:"px-[18px] pb-2 pt-4",children:[(0,t.jsx)(o.F,{className:"text-base",children:R.title(s.name)}),(0,t.jsx)(o.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:R.sub})]}),(0,t.jsxs)("div",{className:"px-[18px] pt-1.5",children:["rename"===e&&(0,t.jsx)(i.O,{id:"edit-name",label:"Name",error:N.name,children:(0,t.jsx)("input",{id:"edit-name",value:d,onChange:e=>u(e.target.value),autoComplete:"off",autoCapitalize:"none",spellCheck:!1,className:i.S})}),"rate"===e&&(0,t.jsx)(i.O,{id:"edit-rate",label:"Rate limit",help:"Requests per minute.",error:N.ratePerMin,children:(0,t.jsx)("input",{id:"edit-rate",inputMode:"numeric",value:m,onChange:e=>f(e.target.value),className:`${i.S} font-mono`})}),"expiry"===e&&(0,t.jsx)(i.O,{id:"edit-expiry",label:"Expires",error:N.expiry,children:(0,t.jsx)("select",{id:"edit-expiry",value:g,onChange:e=>v(e.target.value),className:i.S,children:p.W.map(e=>(0,t.jsx)("option",{value:e,children:p.o[e]},e))})}),"routing"===e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.O,{id:"edit-provider",label:"Provider",help:r.length?void 0:"No provider is connected yet. Until one is, this key has nothing to pin to.",error:N.providerId,children:(0,t.jsxs)("select",{id:"edit-provider",value:b,onChange:e=>j(e.target.value),className:i.S,children:[(0,t.jsx)("option",{value:"",children:"No pin (default provider)"}),r.map(e=>(0,t.jsxs)("option",{value:e.id,children:[e.name,e.enabled?"":" (off)"]},e.id))]})}),(0,t.jsx)(i.O,{id:"edit-model",label:"Model",help:"Optional. A Gemini model id, for example gemini-3.8-flash. Empty uses the provider's default.",error:N.model,children:(0,t.jsx)("input",{id:"edit-model",value:y,onChange:e=>k(e.target.value),disabled:!b,placeholder:"gemini-3.8-flash",autoComplete:"off",autoCapitalize:"none",spellCheck:!1,className:`${i.S} font-mono`})})]}),w&&(0,t.jsx)("p",{className:"mb-3 text-[13px] text-err",role:"alert",children:w})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(i.K,{onClick:l,disabled:z,children:"Cancel"}),(0,t.jsx)(i.K,{type:"submit",variant:"primary",disabled:z,children:z?"Saving…":R.cta})]})]})}e.s(["KeyActions",0,function({k:e,providers:n}){let[d,c]=(0,a.useState)(null);return(0,r.useHoldRefresh)(null!==d),(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,t.jsx)(s.f,{trigger:(0,t.jsx)(i.K,{size:"sm",children:"Revoke"}),title:`Revoke ${e.name}?`,body:`Calls with ${e.prefix}… answer 401 within a minute. Agents using it show "Key revoked". This can't be undone; create a new key instead.`,cta:"Revoke key",danger:!0,onConfirm:async()=>{let t=await u(e.id);return{ok:t.ok,message:(t.ok?t.message:t.error)??""}}}),(0,t.jsx)(l.RowMenu,{label:`Actions for ${e.name}`,items:[{label:"Rename",onSelect:()=>c("rename")},{label:"Change rate limit",onSelect:()=>c("rate")},{label:"Change expiry",onSelect:()=>c("expiry")},{label:"Change routing",onSelect:()=>c("routing")}]}),(0,t.jsx)(o.N,{open:null!==d,onOpenChange:e=>{e||c(null)},children:(0,t.jsx)(o.d,{className:"gap-0 p-0 sm:max-w-[520px]",showCloseButton:!1,children:d&&(0,t.jsx)(h,{mode:d,k:e,providers:n,onDone:()=>c(null)})})})]})}],211541)},46200,e=>{var t=e.i(843476),a=e.i(146874),n=e.i(239692),s=e.i(271645),i=e.i(846696),r=e.i(428325),l=e.i(500443),o=e.i(776639);e.s(["f",0,function({trigger:e,open:d,onOpenChange:c,title:u,body:p,cta:x,danger:h=!1,onConfirm:m}){let[f,g]=(0,s.useState)(!1),v=d??f,[b,j]=(0,s.useTransition)();function y(e){void 0===d&&g(e),c?.(e)}return(0,l.useHoldRefresh)(v),(0,t.jsxs)(o.N,{open:v,onOpenChange:e=>{b||y(e)},children:[void 0!==e&&((0,s.isValidElement)(e)?(0,t.jsx)(o.a,{render:e}):(0,t.jsx)(o.a,{children:e})),(0,t.jsxs)(o.d,{className:"gap-0 p-0 sm:max-w-[640px]",showCloseButton:!1,children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,t.jsx)("span",{className:`grid size-9 shrink-0 place-items-center rounded-lg bg-sunken ${h?"text-err":"text-ink-soft"}`,children:h?(0,t.jsx)(a.f,{size:19}):(0,t.jsx)(n.f,{size:19})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(o.F,{className:"text-base",children:u}),(0,t.jsx)(o.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:p})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(r.K,{onClick:()=>y(!1),disabled:b,children:"Keep as is"}),(0,t.jsx)(r.K,{variant:h?"danger":"primary",onClick:function(){j(async()=>{try{let e=await m();e.ok?(i.c.success(e.message),y(!1)):i.c.error(e.message)}catch{i.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},disabled:b,children:b?"Working…":x})]})]})]})}])},374931,e=>{var t=e.i(843476),a=e.i(531219),n=e.i(357772),s=e.i(271645),i=e.i(54131),r=e.i(428325),l=e.i(541299),o=e.i(691106),d=e.i(975157),c=e.i(322534),u=e.i(495784);e.s(["ListFilter",0,function({placeholder:e,states:p,groups:x,head:h,rows:m,chips:f}){var g,v;let b,[j,y]=(0,s.useState)(""),[k,N]=(0,s.useState)(""),[C,w]=(0,s.useState)(""),[S,z]=(0,s.useState)(""),[M,R]=(0,s.useState)(1),A=(0,i.useMask)(),K=(g=m.map(e=>({...e,text:`${e.text} ${A("text",e.text)}`})),b=(v={text:j,state:k,group:S,tag:C}).text.trim().toLowerCase(),g.filter(e=>(!v.state||e.state===v.state)&&(!v.group||e.group===v.group)&&(!v.tag||(e.tags??[]).includes(v.tag))&&(!b||e.text.toLowerCase().includes(b)))),$=(0,u.$)(K,M),O=$.rows;$.page!==M&&R($.page);let P=p?.find(([e])=>e===k)?.[1];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 px-[18px] pb-3 pt-3.5 max-[720px]:px-3.5",children:[(0,t.jsx)("input",{className:(0,d.f)(r.S,"w-[240px] max-[720px]:w-full"),placeholder:e,"aria-label":e,value:j,onChange:e=>{y(e.target.value),R(1)}}),p&&(0,t.jsxs)("select",{className:(0,d.f)(r.S,"w-auto"),"aria-label":"State",value:k,onChange:e=>{N(e.target.value),R(1)},children:[(0,t.jsx)("option",{value:"",children:"All states"}),p.map(([e,a])=>(0,t.jsx)("option",{value:e,children:a},e))]}),x&&x.length>1&&(0,t.jsxs)("select",{className:(0,d.f)(r.S,"w-auto"),"aria-label":"Account",value:S,onChange:e=>{z(e.target.value),R(1)},children:[(0,t.jsx)("option",{value:"",children:"All accounts"}),x.map(e=>(0,t.jsx)("option",{value:e,children:A("account",e)},e))]}),f?.map(([e,a])=>(0,t.jsx)("button",{type:"button","aria-pressed":C===e,onClick:()=>{w(C===e?"":e),R(1)},className:(0,d.f)("rounded-[5px] border px-2 py-0.5 text-[12.5px]",C===e?"border-brand bg-brand-soft text-brand":"border-line text-ink-soft hover:bg-hover"),children:a},e)),P&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-[5px] bg-brand-soft py-px pl-2 pr-1 text-[12.5px] text-brand",children:["State: ",P,(0,t.jsx)("button",{type:"button","aria-label":"Remove filter",className:"px-0.5",onClick:()=>{N(""),R(1)},children:(0,t.jsx)(n.f,{size:13})})]}),S&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-[5px] bg-brand-soft py-px pl-2 pr-1 text-[12.5px] text-brand",children:["Account: ",(0,t.jsx)(i.Masked,{kind:"account",real:S}),(0,t.jsx)("button",{type:"button","aria-label":"Remove account filter",className:"px-0.5",onClick:()=>{z(""),R(1)},children:(0,t.jsx)(n.f,{size:13})})]}),(0,t.jsx)("span",{role:"status",className:"ml-auto text-[12.5px] text-ink-soft",children:(0,c.O)(K.length)})]}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:o.o,children:[(0,t.jsx)(o.U,{head:h}),(0,t.jsx)("tbody",{children:O.map(e=>(0,t.jsx)(s.Fragment,{children:e.row},e.key))})]})}),0===K.length&&m.length>0&&(0,t.jsxs)(r.k,{icon:a.f,title:"No results",children:["Nothing matches these filters."," ",(0,t.jsx)("button",{type:"button",className:"text-brand hover:underline",onClick:()=>{y(""),N(""),z(""),w(""),R(1)},children:"Clear filters"})]}),(0,t.jsx)(l.f,{page:$.page,pages:$.pages,text:(0,u.z)($),onPage:R})]})}],374931)},541299,495784,e=>{var t=e.i(843476),a=e.i(271645),n=e.i(428325),s=e.i(975157);function i(e,t,a=25){let n=e.length,s=Math.max(1,Math.ceil(n/a)),r=Math.min(Math.max(Number.isFinite(t)?Math.floor(t):1,1),s),l=(r-1)*a,o=e.slice(l,l+a);return{rows:o,page:r,pages:s,from:0===n?0:l+1,to:l+o.length,total:n}}e.s(["f",0,function({page:e,pages:i,text:r,onPage:l,bleed:o=!1}){let d=(0,a.useRef)(null),c=(0,a.useRef)(null);if((0,a.useEffect)(()=>{null!==c.current&&(d.current?.querySelectorAll("button")[c.current]?.focus(),c.current=null)},[e]),i<=1)return null;let u=(e,t)=>{(e<=1||e>=i)&&(c.current=t),l(e)};return(0,t.jsxs)("div",{className:(0,s.f)("flex items-center gap-2 border-t border-line px-[18px] py-2.5 text-[12.5px] text-ink-soft",o?"-mx-[18px] -mb-4 mt-2":"max-[720px]:px-3.5"),children:[(0,t.jsx)("span",{role:"status",children:r}),(0,t.jsxs)("span",{ref:d,className:"ml-auto flex gap-1.5",children:[(0,t.jsx)(n.K,{size:"sm",className:"disabled:hover:bg-surface","aria-label":"Previous page",disabled:e<=1,onClick:()=>u(e-1,1),children:"‹ Previous"}),(0,t.jsx)(n.K,{size:"sm",className:"disabled:hover:bg-surface","aria-label":"Next page",disabled:e>=i,onClick:()=>u(e+1,0),children:"Next ›"})]})]})}],541299),e.s(["k",0,function(e,t,a,n){return n<=1?null:t>0&&null!==a?a:e[0]?.id??null},"$",0,i,"f",0,function(e,t,a,n=25){let s=null===a?0:Math.max(0,e.findIndex(e=>e.id===a)),r=i(e.slice(s),t,n);return 0===s||r.page>1?{...r,shift:s}:{...i(e,1,n),shift:0}},"z",0,function(e,t=0,a=e.total){return`${e.from+t}–${e.to+t} of ${a}`}],495784)},177106,e=>{var t=e.i(843476),a=e.i(33550);let n=(0,a.f)("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),s=(0,a.f)("outline","dots-vertical","DotsVertical",[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]);var i=e.i(271645),r=e.i(428325),l=e.i(500443),o=e.i(755146);e.s(["RowMenu",0,function({items:e,button:a=!1,label:d="Actions"}){let[c,u]=(0,i.useState)(!1);return(0,l.useHoldRefresh)(c),(0,t.jsxs)(o.G,{open:c,onOpenChange:u,children:[a?(0,t.jsxs)(o.X,{className:(0,r.R)(),children:[d," ",(0,t.jsx)(n,{size:16,"aria-hidden":!0})]}):(0,t.jsx)(o.X,{"aria-label":d,className:"rounded-[5px] px-1.5 py-1 text-ink-faint hover:bg-sunken hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40",children:(0,t.jsx)(s,{size:17})}),(0,t.jsx)(o.L,{align:"end",className:"min-w-[200px] rounded-[8px] border border-line-strong bg-surface p-1 shadow-[0_8px_24px_rgba(0,0,0,.14)] ring-0",children:e.map((e,a)=>"---"===e?(0,t.jsx)(o.U,{},`sep-${a}`):(0,t.jsxs)(o.r,{disabled:void 0!==e.disabled,variant:e.danger?"destructive":"default",className:"rounded-[5px] px-2.5 py-[7px]",onClick:()=>{e.href?window.open(e.href,"_blank","noopener,noreferrer"):e.onSelect?.()},children:[e.label,void 0!==e.disabled&&(0,t.jsx)("span",{className:"ml-auto pl-3 text-[11px] text-ink-faint",children:e.disabled})]},e.label))})]})}],177106)},776639,998218,152744,e=>{var t=e.i(843476),a=e.i(526323),n=e.i(828376);e.s(["f",0,n],998218);var n=n,s=e.i(209977),i=e.i(921637),r=e.i(141708),l=e.i(593480),o=e.i(309169),d=n;e.s(["f",0,d],152744);var d=n,c=e.i(975157),u=e.i(271645),p=e.i(540886),x=e.i(552245);let h=u.forwardRef(function(e,t){let{render:a,className:n,disabled:s=!1,focusableWhenDisabled:i=!1,nativeButton:r=!0,style:l,...o}=e,{getButtonProps:d,buttonRef:c}=(0,p.f)({disabled:s,focusableWhenDisabled:i,native:r});return(0,x.a)("button",e,{state:{disabled:s},ref:[t,c],props:[o,d]})}),m=(0,e.i(225913).f)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function f({className:e,variant:a="default",size:n="default",...s}){return(0,t.jsx)(h,{"data-slot":"button",className:(0,c.f)(m({variant:a,size:n,className:e})),...s})}var g=e.i(456420);let v={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};v.node;let b=(0,g.f)(v);function j({...e}){return(0,t.jsx)(s.f.Portal,{"data-slot":"dialog-portal",...e})}function y({className:e,...a}){return(0,t.jsx)(r.f.Backdrop,{"data-slot":"dialog-overlay",className:(0,c.f)("fixed inset-0 isolate z-50 bg-black/40 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}e.s(["N",0,function({...e}){return(0,t.jsx)(a.f.Root,{"data-slot":"dialog",...e})},"d",0,function({className:e,children:a,showCloseButton:n=!0,...s}){return(0,t.jsxs)(j,{children:[(0,t.jsx)(y,{}),(0,t.jsxs)(l.f.Popup,{"data-slot":"dialog-content",className:(0,c.f)("fixed top-1/2 left-1/2 z-50 grid w-full grid-cols-[minmax(0,1fr)] max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...s,children:[a,n&&(0,t.jsxs)(i.f.Close,{"data-slot":"dialog-close",render:(0,t.jsx)(f,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,t.jsx)(b,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"C",0,function({className:e,...a}){return(0,t.jsx)(d.Description,{"data-slot":"dialog-description",className:(0,c.f)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})},"F",0,function({className:e,...a}){return(0,t.jsx)(o.f.Title,{"data-slot":"dialog-title",className:(0,c.f)("font-heading text-base leading-none font-medium",e),...a})},"a",0,function({...e}){return(0,t.jsx)(n.Trigger,{"data-slot":"dialog-trigger",...e})}],776639)},322534,e=>{e.i(684496),e.s(["O",0,e=>`${e} item${1===e?"":"s"}`,"J",0,function(e,t){let a=Math.max(0,t.getTime()-e.getTime());return a<6e4?"now":a<36e5?`${Math.floor(a/6e4)} min ago`:a<864e5?`${Math.floor(a/36e5)} h ago`:`${Math.floor(a/864e5)} d ago`}])},898121,e=>{let t={"ai:invoke":{short:"models",long:"Chat completions and the model list through your provider connections."},"read:status":{short:"console data, MCP",long:"Read-only console data: GET /api/v1/status and the MCP server. Database names are aliases; no URLs, emails or secrets."},"write:notes":{short:"post AI notes",long:e.i(944971).C.writeNotesLong}};e.s(["j",0,"90d","D",0,20,"J",0,["ai:invoke"],"W",0,["7d","30d","90d","1y","never"],"o",0,{"7d":"In 7 days","30d":"In 30 days","90d":"In 90 days","1y":"In 1 year",never:"Never"},"B",0,["ai:invoke","read:status","write:notes"],"h",0,t])}])})();
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,239647,e=>{var t=e.i(843476),a=e.i(271645),s=e.i(846696),n=e.i(177106),r=e.i(95187);let i=(0,r.createServerReference)("60d9a220c32155054581c8296934b67615b60b0f90",r.callServer,void 0,r.findSourceMapURL,"silence");e.s(["AlertMenu",0,function({id:e,label:r,silenced:l,resourceHref:o}){let[,c]=(0,a.useTransition)(),d=(0,a.useRef)(!1),h=t=>{d.current||(d.current=!0,c(async()=>{try{let a=await i(e,t);a.ok?s.c.success(a.message??""):s.c.error(a.error)}catch{s.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}finally{d.current=!1}}))},u=o?[{label:"View resource",href:o}]:[];return(0,t.jsx)(n.RowMenu,{label:`Actions for ${r}`,items:l?[{label:"Unsilence",onSelect:()=>h("off")},...u]:[{label:"Silence 1 hour",onSelect:()=>h("1h")},{label:"Silence until resolved",onSelect:()=>h("resolved")},...u]})}],239647)},108608,e=>{var t=e.i(843476),a=e.i(33550);let s=(0,a.f)("outline","brand-discord","BrandDiscord",[["path",{d:"M8 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-0"}],["path",{d:"M14 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M15.5 17c0 1 1.5 3 2 3c1.5 0 2.833 -1.667 3.5 -3c.667 -1.667 .5 -5.833 -1.5 -11.5c-1.457 -1.015 -3 -1.34 -4.5 -1.5l-.972 1.923a11.913 11.913 0 0 0 -4.053 0l-.975 -1.923c-1.5 .16 -3.043 .485 -4.5 1.5c-2 5.667 -2.167 9.833 -1.5 11.5c.667 1.333 2 3 3.5 3c.5 0 2 -2 2 -3",key:"svg-2"}],["path",{d:"M7 16.5c3.5 1 6.5 1 10 0",key:"svg-3"}]]),n=(0,a.f)("outline","brand-telegram","BrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),r=(0,a.f)("outline","mail","Mail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]),i=(0,a.f)("outline","webhook","Webhook",[["path",{d:"M4.876 13.61a4 4 0 1 0 6.124 3.39h6",key:"svg-0"}],["path",{d:"M15.066 20.502a4 4 0 1 0 1.934 -7.502c-.706 0 -1.424 .179 -2 .5l-3 -5.5",key:"svg-1"}],["path",{d:"M16 8a4 4 0 1 0 -8 0c0 1.506 .77 2.818 2 3.5l-3 5.5",key:"svg-2"}]]);var l=e.i(944971),o=e.i(271645),c=e.i(846696),d=e.i(428325),h=e.i(500443),u=e.i(776639),p=e.i(357772);function m({id:e,onChange:a}){let[s,n]=(0,o.useState)([]),[r,i]=(0,o.useState)(""),l=(e,t)=>{n(e),i(t),a([...e,t.trim()].filter(Boolean).join(", "))},c=e=>{var t;let a;return l((t=[...s,e].join(","),a=new Set,t.split(/[\s,;]+/).filter(e=>e&&!a.has(e.toLowerCase())&&a.add(e.toLowerCase()))),"")};return(0,t.jsxs)("div",{className:"flex min-h-[34px] flex-wrap items-center gap-1.5 rounded-md border border-line-strong bg-surface px-1.5 py-1 focus-within:border-brand focus-within:ring-2 focus-within:ring-brand/40",children:[s.map((e,a)=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border border-line bg-sunken py-0.5 pl-2.5 pr-1 text-[12.5px]",children:[e,(0,t.jsx)("button",{type:"button",className:"grid size-4 place-items-center rounded-full text-ink-soft hover:text-ink","aria-label":`Remove ${e}`,onClick:()=>l(s.filter((e,t)=>t!==a),r),children:(0,t.jsx)(p.f,{size:12,"aria-hidden":!0})})]},e)),(0,t.jsx)("input",{id:e,className:"min-w-[160px] flex-1 bg-transparent px-1 py-0.5 text-ink outline-none",type:"text",inputMode:"email",autoComplete:"off",placeholder:s.length?s.length<10?"Add another":"":"you@example.com",value:r,onChange:e=>/[\s,;]/.test(e.target.value)?c(e.target.value):l(s,e.target.value),onKeyDown:e=>{"Enter"===e.key&&r.trim()?(e.preventDefault(),c(r)):"Backspace"===e.key&&!r&&s.length&&l(s.slice(0,-1),s.at(-1))},onBlur:()=>{r.trim()&&c(r)}})]})}var x=e.i(95187);let g=(0,x.createServerReference)("40c1157b243861670e52a3e8873ad02eec9b12cd00",x.callServer,void 0,x.findSourceMapURL,"saveDigest"),f=(0,x.createServerReference)("40fb1caeae4f5744138c6fd95d30cf246eb118e3e5",x.callServer,void 0,x.findSourceMapURL,"saveDiscord"),b=(0,x.createServerReference)("40604e1bb51e36cbc33a5b51b169094266410a6997",x.callServer,void 0,x.findSourceMapURL,"saveSmtp"),v=(0,x.createServerReference)("608aa37d95f3267f5c1e7547a192ea91adce089b8a",x.callServer,void 0,x.findSourceMapURL,"saveTelegram"),y=(0,x.createServerReference)("601c3ea56737bea939bff09c491f72d4a2ed632ce4",x.callServer,void 0,x.findSourceMapURL,"saveWebhook"),k=(0,x.createServerReference)("405c3917988aad1c96669824da45164d3503b23d98",x.callServer,void 0,x.findSourceMapURL,"sendTest"),S=(0,x.createServerReference)("600be08ec07a01e86cf933d2cc9970f80cf0330221",x.callServer,void 0,x.findSourceMapURL,"setChannelEnabled"),w=(0,x.createServerReference)("0022ff870b278f3ddc9d4b52017413dcd0348f8f30",x.callServer,void 0,x.findSourceMapURL,"telegramChats"),j={telegram:{icon:n,title:"Connect Telegram",name:"Telegram",about:`The bot token is ${l.n.setting} (TELEGRAM_BOT_TOKEN). Here you only choose the chat.`},discord:{icon:s,title:"Connect Discord",name:"Discord",about:"Discord → Channel settings → Integrations → Webhooks → New webhook → Copy URL."},webhook:{icon:i,title:"Connect a webhook",name:"Webhook",about:"Watchbell POSTs JSON to this address for every alert message. It must be https on a public host (port 443); Watchbell doesn't post into private networks or follow redirects."},smtp:{icon:r,title:"Email through your mail server",name:"Email (SMTP)",about:"Port 587 or 2525 with STARTTLS, or 465 with TLS; the password only ever goes over TLS. The server must be on the public internet. Office 365: smtp.office365.com, 587, and an app password if your account has MFA."},email_digest:{icon:r,title:"Daily email digest",name:"Daily email digest",about:`Sent through Resend from the address in DIGEST_FROM. The API key is ${l.n.setting} (RESEND_API_KEY).`}},C={telegram:"Telegram",discord:"Discord",webhook:"Webhook",smtp:"Email (SMTP)",email_digest:"Daily email digest"};e.s(["ChannelControls",0,function({kind:e,connected:a,enabled:s,envMissing:n}){let[r,i]=(0,o.useState)(!1),[l,p]=(0,o.useState)([]),[x,N]=(0,o.useState)(""),[R,T]=(0,o.useState)(""),[M,L]=(0,o.useState)(""),[D,E]=(0,o.useState)(""),[$,A]=(0,o.useState)({host:"",port:"587",user:"",pass:"",from:"",to:""}),[O,U]=(0,o.useState)({}),[W,P]=(0,o.useTransition)(),[F,z]=(0,o.useTransition)(),[K,I]=(0,o.useTransition)();(0,h.useHoldRefresh)(r);let _=j[e],H=_.icon;function B(e){e&&(p([]),N(""),T(""),L(""),E(""),A({host:"",port:"587",user:"",pass:"",from:"",to:""}),U({})),i(e)}function V(e,t){I(async()=>{try{let a=await e();a.ok?c.c.success(t,{description:a.message}):c.c.error(a.error)}catch{c.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})}return(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-2",children:[(0,t.jsxs)(u.N,{open:r,onOpenChange:e=>{W||B(e)},children:[(0,t.jsx)(u.a,{render:(0,t.jsx)(d.K,{size:"sm",disabled:null!==n,children:a?"Change":"Connect"})}),(0,t.jsxs)(u.d,{className:"max-h-[92vh] gap-0 overflow-y-auto p-0 sm:max-w-[560px]",showCloseButton:!1,children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,t.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:(0,t.jsx)(H,{size:19})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(u.F,{className:"text-base",children:_.title}),(0,t.jsx)(u.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:_.about})]})]}),(0,t.jsxs)("form",{onSubmit:t=>{let a;t.preventDefault(),a={},"telegram"!==e||x||(a.chat="Press Find chats, then pick one."),"discord"!==e||R.trim()||(a.url="Paste the whole webhook URL from Discord."),"webhook"!==e||R.trim()||(a.url="Paste the whole address, starting with https://."),"smtp"!==e||$.host.trim()||(a.host="Enter the server name, for example smtp.office365.com."),"smtp"!==e||$.to.trim()||(a.to="Enter the address that gets the alerts."),"email_digest"!==e||M.trim()||(a.to="Enter a valid email address."),U(a),Object.keys(a).length||P(async()=>{try{let t=l.find(e=>e.id===x)?.label??"",a="telegram"===e?await v(x,t):"discord"===e?await f(R):"webhook"===e?await y(R,D):"smtp"===e?await b({...$,port:Number($.port)}):await g(M);if(!a.ok){U(a.fieldErrors??{}),a.fieldErrors||c.c.error(a.error);return}c.c.success("Channel saved",{description:a.message}),i(!1)}catch{c.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},children:[(0,t.jsxs)("div",{className:"px-[18px] pt-2",children:["telegram"===e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.O,{id:"ch-chat",label:"Chat",help:"Send /start to your bot in Telegram first.",error:O.chat,children:(0,t.jsxs)("select",{id:"ch-chat",className:d.S,value:x,onChange:e=>N(e.target.value),children:[0===l.length&&(0,t.jsx)("option",{value:"",children:"Press Find chats after you message the bot"}),l.map(e=>(0,t.jsx)("option",{value:e.id,children:e.label},e.id))]})}),(0,t.jsx)("p",{className:"mb-3",children:(0,t.jsx)(d.K,{size:"sm",onClick:function(){z(async()=>{try{let e=await w();if(!e.ok)return void c.c.error(e.error);let t=e.data?.chats??[];p(t),N(t[0]?.id??""),U({}),t.length?c.c.success(`Found ${t.length} chat${1===t.length?"":"s"}: ${t.map(e=>e.label).join(", ")}.`):c.c.info("No chats yet",{description:e.message??"Send /start to your bot in Telegram, then try again."})}catch{c.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},disabled:F,children:F?"Looking…":"Find chats"})})]}),"discord"===e&&(0,t.jsx)(d.O,{id:"ch-hook",label:"Webhook URL",help:"Encrypted before it's saved and never shown again.",error:O.url,children:(0,t.jsx)("input",{id:"ch-hook",className:d.S,type:"password",autoComplete:"off",placeholder:"https://discord.com/api/webhooks/…",value:R,onChange:e=>T(e.target.value)})}),"webhook"===e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.O,{id:"ch-wh",label:"Address",help:"Encrypted before it's saved and never shown again; the console shows only its host.",error:O.url,children:(0,t.jsx)("input",{id:"ch-wh",className:d.S,type:"url",autoComplete:"off",placeholder:"https://n8n.example.com/webhook/…",value:R,onChange:e=>T(e.target.value)})}),(0,t.jsx)(d.O,{id:"ch-wh-secret",label:"Secret (optional)",help:"16 to 200 characters. Each body is signed with it: header X-Watchbell-Signature = sha256 HMAC of the timestamp, a dot and the body.",error:O.secret,children:(0,t.jsx)("input",{id:"ch-wh-secret",className:d.S,type:"password",autoComplete:"off",value:D,onChange:e=>E(e.target.value)})})]}),"smtp"===e&&(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-x-3 max-[520px]:grid-cols-1",children:[(0,t.jsx)(d.O,{id:"ch-sm-host",label:"Server",error:O.host,children:(0,t.jsx)("input",{id:"ch-sm-host",className:d.S,autoComplete:"off",placeholder:"smtp.office365.com",value:$.host,onChange:e=>A({...$,host:e.target.value})})}),(0,t.jsx)(d.O,{id:"ch-sm-port",label:"Port",error:O.port,children:(0,t.jsxs)("select",{id:"ch-sm-port",className:d.S,value:$.port,onChange:e=>A({...$,port:e.target.value}),children:[(0,t.jsx)("option",{value:"587",children:"587 · STARTTLS"}),(0,t.jsx)("option",{value:"465",children:"465 · TLS"}),(0,t.jsx)("option",{value:"2525",children:"2525 · STARTTLS"})]})}),(0,t.jsx)(d.O,{id:"ch-sm-user",label:"User name",error:O.user,children:(0,t.jsx)("input",{id:"ch-sm-user",className:d.S,autoComplete:"off",value:$.user,onChange:e=>A({...$,user:e.target.value})})}),(0,t.jsx)(d.O,{id:"ch-sm-pass",label:"Password",help:a?"Leave empty to keep the saved one.":"Encrypted before it's saved and never shown again.",error:O.pass,children:(0,t.jsx)("input",{id:"ch-sm-pass",className:d.S,type:"password",autoComplete:"off",value:$.pass,onChange:e=>A({...$,pass:e.target.value})})}),(0,t.jsx)(d.O,{id:"ch-sm-from",label:"From",error:O.from,children:(0,t.jsx)("input",{id:"ch-sm-from",className:d.S,type:"email",autoComplete:"off",placeholder:"alerts@example.com",value:$.from,onChange:e=>A({...$,from:e.target.value})})}),(0,t.jsxs)("div",{className:"col-span-2 max-[520px]:col-span-1",children:[(0,t.jsx)(d.O,{id:"ch-sm-to",label:"Send to",help:"Up to 10 addresses; each one gets the same email. Press Enter or a comma after each.",error:O.to,children:(0,t.jsx)(m,{id:"ch-sm-to",onChange:e=>A(t=>({...t,to:e}))})}),"onboarding@resend.dev"===$.from.trim().toLowerCase()&&$.to.includes(",")&&(0,t.jsx)("p",{className:"-mt-2 mb-3.5 rounded-md border border-warn/40 bg-warn-soft px-2.5 py-2 text-[12.5px]",children:"Resend's test sender (onboarding@resend.dev) only delivers to your own Resend account address. Verify a domain in Resend and send from it to reach other people."})]})]}),"email_digest"===e&&(0,t.jsx)(d.O,{id:"ch-to",label:"Send to",error:O.to,children:(0,t.jsx)("input",{id:"ch-to",className:d.S,type:"email",autoComplete:"off",placeholder:"name@example.com",value:M,onChange:e=>L(e.target.value)})})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(d.K,{onClick:()=>B(!1),disabled:W,children:"Cancel"}),(0,t.jsx)(d.K,{type:"submit",variant:"primary",disabled:W,children:W?"Saving…":"Save"})]})]})]})]}),a&&s&&null===n&&(0,t.jsx)(d.K,{size:"sm",disabled:K,onClick:()=>V(()=>k(e),`${C[e]} test`),children:K?"Sending…":"Send test"}),a&&(0,t.jsx)(d.K,{size:"sm",variant:"ghost",disabled:K,onClick:()=>V(()=>S(e,!s),C[e]),children:s?"Turn off":"Turn on"})]})}],108608)},274224,e=>{var t=e.i(843476),a=e.i(271645),s=e.i(846696),n=e.i(428325),r=e.i(95187);let i=(0,r.createServerReference)("60aed09dceff418dd27432a3300ac27254168e5cf9",r.callServer,void 0,r.findSourceMapURL,"setNotifyLanguage");e.s(["LanguageSelect",0,function({channel:e,label:r,saved:l}){let[o,c]=(0,a.useState)(l),[d,h]=(0,a.useTransition)();return(0,t.jsxs)("select",{"aria-label":`${r} language`,className:`${n.S} w-auto min-w-[160px]`,value:o,disabled:d,onChange:t=>{var a;c(a="id"===t.target.value?"id":"en"),h(async()=>{try{let t=await i(e,a);t.ok?s.c.success(`${r} language saved`,{description:t.message}):(c(o),s.c.error(t.error))}catch{c(o),s.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},children:[(0,t.jsx)("option",{value:"en",children:"English"}),(0,t.jsx)("option",{value:"id",children:"Bahasa Indonesia"})]})}],274224)},689721,e=>{var t=e.i(843476),a=e.i(668029),s=e.i(271645),n=e.i(846696),r=e.i(428325),i=e.i(500443),l=e.i(776639);let o=e=>(e??0).toLocaleString("en-US"),c={MonitorDown:{key:"MonitorDown",severity:"critical",threshold:3,bounds:[1,10],source:"own",needs:null,sampled:!0,condition:e=>`${o(e)} failed checks in a row`},CollectorStale:{key:"CollectorStale",severity:"critical",threshold:5,bounds:[3,60],source:"own",needs:null,sampled:!1,condition:e=>`No collector run for ${o(e)} min`},HighLatency:{key:"HighLatency",severity:"warning",threshold:1500,bounds:[100,3e4],source:"own",needs:null,sampled:!0,condition:e=>`Slowest 5% of checks over ${o(e)} ms for 10 min`},DeploymentFailed:{key:"DeploymentFailed",severity:"warning",threshold:null,bounds:null,source:"api",needs:null,sampled:!1,condition:()=>"A production deploy fails"},DatabasePaused:{key:"DatabasePaused",severity:"warning",threshold:null,bounds:null,source:"api",needs:"databases",sampled:!1,condition:()=>"Supabase pauses the project"},CertExpiringSoon:{key:"CertExpiringSoon",severity:"warning",threshold:14,bounds:[1,90],source:"own",needs:"domains",sampled:!1,condition:e=>`TLS certificate expires in < ${o(e)} days`},DomainExpiringSoon:{key:"DomainExpiringSoon",severity:"warning",threshold:30,bounds:[1,180],source:"api",needs:"domains",sampled:!1,condition:e=>`Domain expires in < ${o(e)} days`},StorageAlmostFull:{key:"StorageAlmostFull",severity:"warning",threshold:80,bounds:[10,100],source:"api",needs:"databases",sampled:!1,condition:e=>`Database size > ${o(e)}% of free limit`},NeonComputeHigh:{key:"NeonComputeHigh",severity:"warning",threshold:80,bounds:[1,100],source:"api",needs:"databases",sampled:!1,condition:e=>`> ${o(e)} of 100 CU-hours this month`},FirestoreQuotaHigh:{key:"FirestoreQuotaHigh",severity:"warning",threshold:80,bounds:[10,100],source:"test",needs:"databases",sampled:!1,condition:e=>`Daily reads > ${o(e)}% of 50k`},AutoPauseRisk:{key:"AutoPauseRisk",severity:"info",threshold:4,bounds:[1,6],source:"api",needs:"databases",sampled:!1,condition:e=>`Supabase project without API traffic for ${o(e)}+ days`},DnsProxiedToVercel:{key:"DnsProxiedToVercel",severity:"info",threshold:null,bounds:null,source:"api",needs:"dns",sampled:!1,condition:()=>"Cloudflare record proxied in front of Vercel"},ComputeHigh:{key:"ComputeHigh",severity:"warning",threshold:80,bounds:[50,95],source:"api",needs:"databases",sampled:!1,condition:e=>`Supabase CPU > ${o(e)}% for 15 min, RAM > ${o(Math.min(99,(e??80)+10))}%, disk > ${o(e)}% or connections > ${o(e)}% of max`},DbQuotaHigh:{key:"DbQuotaHigh",severity:"warning",threshold:80,bounds:[10,100],source:"api",needs:"databases",sampled:!1,condition:e=>`Turso, Upstash or D1 usage > ${o(e)}% of a free-plan quota`},CredentialExpiring:{key:"CredentialExpiring",severity:"warning",threshold:14,bounds:[1,60],source:"api",needs:null,sampled:!1,condition:e=>`Account credential expires in < ${o(e)} days`},VulnerableDependency:{key:"VulnerableDependency",severity:"warning",threshold:null,bounds:null,source:"api",needs:null,sampled:!1,condition:()=>"A dependency has a critical or high advisory, or a moderate one on a direct dependency (OSV.dev)"},FrameworkVulnerable:{key:"FrameworkVulnerable",severity:"warning",threshold:null,bounds:null,source:"own",needs:null,sampled:!1,condition:()=>"The app's Next.js version has a known advisory (OSV.dev)"},MonitorDomainMoved:{key:"MonitorDomainMoved",severity:"warning",threshold:null,bounds:null,source:"own",needs:null,sampled:!1,condition:()=>"The monitor's domain is no longer one of the app's domains"}};Object.keys(c),e.i(684496);let d=[["critical","Critical"],["warning","Warning"],["info","Info"]];var h=e.i(95187);let u=(0,h.createServerReference)("60a37cc5c918425390253092f3a69e0d33920243af",h.callServer,void 0,h.findSourceMapURL,"editRule"),p=(0,h.createServerReference)("607ac1ac1af7c05efe632c23dd2a0587078491db71",h.callServer,void 0,h.findSourceMapURL,"testRule"),m=["status","severity","rule","target","detail","cause","step","since","threshold"],x=["id","en"],g={status:"FIRING, REPEAT or RESOLVED (MUNCUL, ULANG, PULIH in Indonesian)",severity:"critical, warning or info",rule:"the rule's key, like MonitorDown",target:"what the alert is about: an app, a database, a domain",detail:"Watchbell's sentence about what it saw",cause:"the alert that caused this one, or a provider incident",step:"Watchbell's next step for rules that have one",since:"when the alert started: the time and the time zone",threshold:"the rule's number from Threshold"},f={en:"{status} · {severity} · {rule} · {target}\n{detail}\n{cause}\nNext step: {step}\nsince {since}",id:"{status} · {severity} · {rule} · {target}\n{detail}\n{cause}\nYang perlu kamu lakukan: {step}\nsejak {since}"},b={en:"Test message: Watchbell's sentence about what it saw goes here.",id:"Pesan tes: di sini nanti kalimat Watchbell soal apa yang dilihatnya."},v=/\{([a-zA-Z_]+)\}/g,y=e=>e.replace(/\r\n?/g,"\n").replace(/[ \t]+$/gm,"").trim();function k(e,t){let a="string"==typeof e?y(e):"";return a&&a!==f[t]?a:null}let S={id:"Bahasa Indonesia",en:"English"},w={en:"FIRING",id:"MUNCUL"},j={en:{critical:"critical",warning:"warning",info:"info"},id:{critical:"kritis",warning:"peringatan",info:"info"}},C={en:"1 firing",id:"1 aktif"},N={en:"Open alerts",id:"Buka Alerts"},R=e=>({id:e.id??f.id,en:e.en??f.en});function T({ruleKey:e,severity:a,threshold:n,sample:i,texts:l,onChange:o,errors:c}){let[d,h]=(0,s.useState)("id"),u=(0,s.useRef)(null),p=l[d],R=null!==k(p,d),M={status:w[d],severity:j[d][a]??a,rule:e,target:"my-app",detail:b[d],cause:"",step:i.step[d]??"",since:i.since,threshold:n},[L="",...D]=y(p).split("\n").flatMap(e=>{let t=[...e.matchAll(v)].map(e=>e[1]).filter(e=>Object.hasOwn(M,e));return t.length&&t.every(e=>!M[e].trim())?[]:[e.replace(v,(e,t)=>Object.hasOwn(M,t)?M[t]:e)]}).join("\n").replace(/\n{3,}/g,"\n\n").trim().split("\n");return(0,t.jsxs)("fieldset",{className:"mb-3.5 flex flex-col gap-[5px] border-t border-line pt-3.5",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,t.jsx)("legend",{className:"text-[13px] font-medium",children:"Message"}),(0,t.jsx)("span",{className:`rounded-full border px-2 py-px text-[11.5px] ${R?"border-brand/40 text-brand":"border-line text-ink-soft"}`,children:R?"Changed":"Watchbell's wording"})]}),(0,t.jsx)("span",{className:"text-[12.5px] text-ink-soft",children:"Word the notification yourself. Left as it is, the rule keeps Watchbell's wording, including later fixes to it."}),(0,t.jsx)("div",{role:"tablist",className:"mt-1 flex gap-1 border-b border-line",children:x.map(e=>(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":e===d,onClick:()=>h(e),className:`-mb-px border-b-2 px-2.5 py-1.5 text-[13px] ${e===d?"border-brand font-medium text-ink":"border-transparent text-ink-soft hover:text-ink"}`,children:[S[e],null!==k(l[e],e)?" · changed":""]},e))}),(0,t.jsx)("textarea",{ref:u,id:`rule-msg-${d}`,"aria-label":`Message in ${S[d]}`,className:`${r.S} min-h-[124px] resize-y font-mono text-[12.5px] leading-relaxed`,maxLength:1200,value:p,onChange:e=>o({...l,[d]:e.target.value})}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:m.map(e=>(0,t.jsx)("button",{type:"button",title:g[e],onClick:()=>{let t,a,s,n;return t=u.current,a=t?.selectionStart??p.length,s=t?.selectionEnd??a,n=`{${e}}`,void(o({...l,[d]:p.slice(0,a)+n+p.slice(s)}),requestAnimationFrame(()=>{t?.focus(),t?.setSelectionRange(a+n.length,a+n.length)}))},className:"rounded border border-line-strong bg-sunken px-1.5 py-px font-mono text-[12px] text-ink hover:border-brand",children:`{${e}}`},e))}),c[`template_${d}`]&&(0,t.jsx)("span",{className:"text-[12.5px] text-err",role:"alert",children:c[`template_${d}`]}),x.filter(e=>e!==d&&c[`template_${e}`]).map(e=>(0,t.jsxs)("span",{className:"text-[12.5px] text-err",role:"alert",children:[S[e],": ",c[`template_${e}`]]},e)),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-[12.5px] text-ink-soft",children:"A line whose fields are all empty is left out."}),(0,t.jsx)("button",{type:"button",className:"text-[12.5px] text-link underline disabled:opacity-50 disabled:no-underline",disabled:!R,onClick:()=>o({...l,[d]:f[d]}),children:"Back to Watchbell's wording"})]}),(0,t.jsxs)("div",{className:"mt-1 rounded-md border border-line bg-sunken px-3 py-2.5 text-[13px] leading-relaxed",children:[(0,t.jsx)("div",{className:"mb-1 text-[11.5px] uppercase tracking-wide text-ink-faint",children:"Preview, with sample values"}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words",children:[(0,t.jsx)("b",{children:"Watchbell"}),": ",C[d]," · ",i.since,"\n\n",(0,t.jsx)("b",{children:L}),D.length?`
2
- ${D.join("\n")}`:"","\n",(0,t.jsx)("span",{className:"text-link",children:N[d]})]})]})]})}let M=[["telegram","Telegram"],["discord","Discord"],["webhook","Webhook"],["smtp","Email (SMTP)"],["email_digest","Daily email digest"]],L=e=>({severity:e.severity,threshold:null===e.threshold?"":e.threshold.toLocaleString("en-US"),channels:[...e.channels],enabled:e.enabled});e.s(["RuleActions",0,function({rule:e,condition:o,templates:h,sample:m}){let[x,g]=(0,s.useState)(!1),[f,b]=(0,s.useState)(()=>L(e)),[v,y]=(0,s.useState)(()=>R(h)),[k,S]=(0,s.useState)({}),[w,j]=(0,s.useTransition)(),[C,N]=(0,s.useTransition)();(0,i.useHoldRefresh)(x);let D=c[e.key].bounds;function E(t){t&&(b(L(e)),y(R(h)),S({})),g(t)}function $(t,a){j(async()=>{try{let s=await u(e.key,t);if(!s.ok){S(s.fieldErrors??{}),n.c.error(s.error);return}a(s.message??""),g(!1)}catch{n.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})}return(0,t.jsxs)("span",{className:"inline-flex gap-1.5",children:[(0,t.jsxs)(l.N,{open:x,onOpenChange:e=>{w||E(e)},children:[(0,t.jsx)(l.a,{render:(0,t.jsx)(r.K,{size:"sm",children:"Edit"})}),(0,t.jsxs)(l.d,{className:"max-h-[92vh] gap-0 overflow-y-auto p-0 sm:max-w-[620px]",showCloseButton:!1,children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,t.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:(0,t.jsx)(a.f,{size:19})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(l.F,{className:"text-base",children:["Edit ",e.key]}),(0,t.jsx)(l.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:o})]})]}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),$({...f,templates:v},e=>n.c.success("Rule saved",{description:e}))},children:[(0,t.jsxs)("div",{className:"px-[18px] pt-2",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,t.jsx)(r.O,{id:"rule-sev",label:"Severity",error:k.severity,children:(0,t.jsx)("select",{id:"rule-sev",className:r.S,value:f.severity,onChange:e=>b({...f,severity:e.target.value}),children:d.map(([e,a])=>(0,t.jsx)("option",{value:e,children:a},e))})}),D&&(0,t.jsx)(r.O,{id:"rule-num",label:"Threshold",help:`Replaces ${e.threshold?.toLocaleString("en-US")??"the number"} in the condition.`,error:k.threshold,children:(0,t.jsx)("input",{id:"rule-num",className:r.S,inputMode:"numeric",autoComplete:"off",value:f.threshold,onChange:e=>b({...f,threshold:e.target.value})})})]}),(0,t.jsxs)("fieldset",{className:"mb-3.5 flex flex-col gap-[5px]",children:[(0,t.jsx)("legend",{className:"mb-[5px] text-[13px] font-medium",children:"Send to"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5",children:M.map(([e,a])=>(0,t.jsxs)("label",{className:"flex items-center gap-1.5 text-[13px]",children:[(0,t.jsx)("input",{type:"checkbox",className:"size-4 accent-brand",checked:f.channels.includes(e),onChange:t=>{let a;return a=t.target.checked,b({...f,channels:a?[...f.channels,e]:f.channels.filter(t=>t!==e)})}}),a]},e))}),(0,t.jsx)("span",{className:"text-[12.5px] text-ink-soft",children:"Opens and resolves are sent once; a still-firing alert repeats every 6 hours unless silenced."}),k.channels&&(0,t.jsx)("span",{className:"text-[12.5px] text-err",role:"alert",children:k.channels})]}),(0,t.jsxs)("label",{className:"mb-3.5 flex items-center gap-1.5 text-[13px]",children:[(0,t.jsx)("input",{type:"checkbox",className:"size-4 accent-brand",checked:f.enabled,onChange:e=>b({...f,enabled:e.target.checked})}),"Rule is on"]}),(0,t.jsx)(T,{ruleKey:e.key,severity:f.severity,threshold:f.threshold,sample:m,texts:v,onChange:y,errors:k})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(r.K,{className:"mr-auto",disabled:w||C||!f.channels.some(e=>"email_digest"!==e),onClick:function(){N(async()=>{try{let t=await p(e.key,{...f,templates:v});S(t.ok?{}:t.fieldErrors??{}),t.ok?n.c.success("Test sent",{description:t.message}):n.c.error(t.error)}catch{n.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},title:"Sends this message, as a made-up alert, to the ticked channels (not the daily digest)",children:C?"Sending…":"Send test"}),(0,t.jsx)(r.K,{onClick:()=>E(!1),disabled:w,children:"Cancel"}),(0,t.jsx)(r.K,{type:"submit",variant:"primary",disabled:w,children:w?"Saving…":"Save rule"})]})]})]})]}),(0,t.jsx)(r.K,{size:"sm",disabled:w,onClick:()=>$({...L(e),enabled:!e.enabled},t=>e.enabled?n.c.success(`${e.key} disabled. It won't fire until you enable it again.`):n.c.success(`${e.key} enabled.`,{description:t})),children:e.enabled?"Disable":"Enable"})]})}],689721)},582429,e=>{var t=e.i(843476),a=e.i(271645),s=e.i(846696),n=e.i(428325),r=e.i(684496),i=e.i(95187);let l=(0,i.createServerReference)("004bdfb686d55c3f8770e801102a7057cbcbde7930",i.callServer,void 0,i.findSourceMapURL,"approvalsStatus"),o=(0,i.createServerReference)("00cfc1ed99e7198fc72488e06dd048940cb7f59cf4",i.callServer,void 0,i.findSourceMapURL,"disableApprovals"),c=(0,i.createServerReference)("00701ef377a4d5abc8ef7a61d85c3eb004ee181a92",i.callServer,void 0,i.findSourceMapURL,"enableApprovals"),d=(0,i.createServerReference)("00e5696c7cbd4f41c2f4509d5b9b2985d5d4c71c4b",i.callServer,void 0,i.findSourceMapURL,"telegramLinkCode");e.s(["TelegramApprovals",0,function(){let[e,i]=(0,a.useState)(null),[h,u]=(0,a.useState)(null),[p,m]=(0,a.useState)(null),[x,g]=(0,a.useTransition)();function f(e,t){g(async()=>{try{let a=await e();if(!a.ok)return void s.c.error(a.error??"Watchbell didn't answer. Check that it's still running, then try again.");a.data&&i(a.data),t?.(),a.message&&s.c.success("Approval buttons",{description:a.message})}catch{s.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})}(0,a.useEffect)(()=>{let e=!0;return l().then(t=>{e&&(t.ok&&t.data?i(t.data):u(t.ok?null:t.error))}).catch(()=>e&&u("Couldn't read the status.")),()=>{e=!1}},[]);let b=e?e.on?e.linked?"On · linked to your Telegram account":"On · not linked yet":"Off":h??"Checking…",v=p?(0,r.U)(new Date(p.expiresAt)):"";return(0,t.jsxs)("div",{className:"mt-1 basis-full rounded-md border border-line px-3 py-2 text-[13px]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:"Approval buttons"}),(0,t.jsx)("span",{className:"text-ink-soft",children:b}),(0,t.jsxs)("span",{className:"ml-auto inline-flex flex-wrap gap-2",children:[e&&!e.on&&(0,t.jsx)(n.K,{size:"sm",disabled:x,onClick:()=>f(c),children:x?"Working…":"Turn on"}),e?.on&&(0,t.jsx)(n.K,{size:"sm",disabled:x,onClick:function(){g(async()=>{try{let e=await d();e.ok&&e.data?m(e.data):s.c.error(e.ok?"Watchbell didn't answer. Check that it's still running, then try again.":e.error)}catch{s.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},children:e.linked?"Link again":"Show link code"}),e?.on&&(0,t.jsx)(n.K,{size:"sm",variant:"ghost",disabled:x,onClick:()=>f(o,()=>m(null)),children:"Turn off"})]})]}),(0,t.jsx)("p",{className:"mt-1 text-[12.5px] text-ink-soft",children:"Proposal notices get ✅ Approve / ❌ Reject buttons that only your linked Telegram account can use; risky actions ask twice. While this is on, Telegram sends updates to the console instead of holding them, so Find chats lists the chats the bot has seen since then."}),e?.problem&&(0,t.jsx)("p",{className:"mt-1 text-[12.5px] text-err",children:e.problem}),p&&(0,t.jsxs)("p",{className:"mt-1 text-[12.5px]",children:["Send ",(0,t.jsxs)("code",{className:"rounded bg-sunken px-1 font-mono",children:["/link ",p.code]})," in the connected chat before ",v,". The code works once."]})]})}],582429)}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,239647,e=>{var t=e.i(843476),a=e.i(271645),s=e.i(846696),n=e.i(177106),r=e.i(95187);let i=(0,r.createServerReference)("60931579f0181ade8a2a48378c389042a5e76d8962",r.callServer,void 0,r.findSourceMapURL,"silence");e.s(["AlertMenu",0,function({id:e,label:r,silenced:l,resourceHref:o}){let[,d]=(0,a.useTransition)(),c=(0,a.useRef)(!1),h=t=>{c.current||(c.current=!0,d(async()=>{try{let a=await i(e,t);a.ok?s.c.success(a.message??""):s.c.error(a.error)}catch{s.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}finally{c.current=!1}}))},u=o?[{label:"View resource",href:o}]:[];return(0,t.jsx)(n.RowMenu,{label:`Actions for ${r}`,items:l?[{label:"Unsilence",onSelect:()=>h("off")},...u]:[{label:"Silence 1 hour",onSelect:()=>h("1h")},{label:"Silence until resolved",onSelect:()=>h("resolved")},...u]})}],239647)},108608,e=>{var t=e.i(843476),a=e.i(33550);let s=(0,a.f)("outline","brand-discord","BrandDiscord",[["path",{d:"M8 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-0"}],["path",{d:"M14 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M15.5 17c0 1 1.5 3 2 3c1.5 0 2.833 -1.667 3.5 -3c.667 -1.667 .5 -5.833 -1.5 -11.5c-1.457 -1.015 -3 -1.34 -4.5 -1.5l-.972 1.923a11.913 11.913 0 0 0 -4.053 0l-.975 -1.923c-1.5 .16 -3.043 .485 -4.5 1.5c-2 5.667 -2.167 9.833 -1.5 11.5c.667 1.333 2 3 3.5 3c.5 0 2 -2 2 -3",key:"svg-2"}],["path",{d:"M7 16.5c3.5 1 6.5 1 10 0",key:"svg-3"}]]),n=(0,a.f)("outline","brand-telegram","BrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),r=(0,a.f)("outline","mail","Mail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]),i=(0,a.f)("outline","webhook","Webhook",[["path",{d:"M4.876 13.61a4 4 0 1 0 6.124 3.39h6",key:"svg-0"}],["path",{d:"M15.066 20.502a4 4 0 1 0 1.934 -7.502c-.706 0 -1.424 .179 -2 .5l-3 -5.5",key:"svg-1"}],["path",{d:"M16 8a4 4 0 1 0 -8 0c0 1.506 .77 2.818 2 3.5l-3 5.5",key:"svg-2"}]]);var l=e.i(944971),o=e.i(271645),d=e.i(846696),c=e.i(428325),h=e.i(500443),u=e.i(776639),p=e.i(357772);function m({id:e,onChange:a}){let[s,n]=(0,o.useState)([]),[r,i]=(0,o.useState)(""),l=(e,t)=>{n(e),i(t),a([...e,t.trim()].filter(Boolean).join(", "))},d=e=>{var t;let a;return l((t=[...s,e].join(","),a=new Set,t.split(/[\s,;]+/).filter(e=>e&&!a.has(e.toLowerCase())&&a.add(e.toLowerCase()))),"")};return(0,t.jsxs)("div",{className:"flex min-h-[34px] flex-wrap items-center gap-1.5 rounded-md border border-line-strong bg-surface px-1.5 py-1 focus-within:border-brand focus-within:ring-2 focus-within:ring-brand/40",children:[s.map((e,a)=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border border-line bg-sunken py-0.5 pl-2.5 pr-1 text-[12.5px]",children:[e,(0,t.jsx)("button",{type:"button",className:"grid size-4 place-items-center rounded-full text-ink-soft hover:text-ink","aria-label":`Remove ${e}`,onClick:()=>l(s.filter((e,t)=>t!==a),r),children:(0,t.jsx)(p.f,{size:12,"aria-hidden":!0})})]},e)),(0,t.jsx)("input",{id:e,className:"min-w-[160px] flex-1 bg-transparent px-1 py-0.5 text-ink outline-none",type:"text",inputMode:"email",autoComplete:"off",placeholder:s.length?s.length<10?"Add another":"":"you@example.com",value:r,onChange:e=>/[\s,;]/.test(e.target.value)?d(e.target.value):l(s,e.target.value),onKeyDown:e=>{"Enter"===e.key&&r.trim()?(e.preventDefault(),d(r)):"Backspace"===e.key&&!r&&s.length&&l(s.slice(0,-1),s.at(-1))},onBlur:()=>{r.trim()&&d(r)}})]})}var x=e.i(95187);let b=(0,x.createServerReference)("40442fd0543bd4b955f3a7a56439893da49a967dc5",x.callServer,void 0,x.findSourceMapURL,"saveDigest"),g=(0,x.createServerReference)("409ca14580d307f48a76d20a7bf94b4024486b124a",x.callServer,void 0,x.findSourceMapURL,"saveDiscord"),f=(0,x.createServerReference)("400fa2fcc3f56a233c55b684e2a184347abc94b824",x.callServer,void 0,x.findSourceMapURL,"saveSmtp"),v=(0,x.createServerReference)("606ee62907516d6b655c066450a5c4eba89a3c1485",x.callServer,void 0,x.findSourceMapURL,"saveTelegram"),y=(0,x.createServerReference)("60974c58debe8c7a7f87c10de1b8c56a37193b1e63",x.callServer,void 0,x.findSourceMapURL,"saveWebhook"),k=(0,x.createServerReference)("40ad943c8d12aac288c093da3cf15cab83bb49c728",x.callServer,void 0,x.findSourceMapURL,"sendTest"),S=(0,x.createServerReference)("60b678b82b5312a87addad0967b6826ebacc4ec183",x.callServer,void 0,x.findSourceMapURL,"setChannelEnabled"),w=(0,x.createServerReference)("009d685105c1817ff29cbd502e328b1d58c2bccb7d",x.callServer,void 0,x.findSourceMapURL,"telegramChats"),j={telegram:{icon:n,title:"Connect Telegram",name:"Telegram",about:`The bot token is ${l.n.setting} (TELEGRAM_BOT_TOKEN). Here you only choose the chat.`},discord:{icon:s,title:"Connect Discord",name:"Discord",about:"Discord → Channel settings → Integrations → Webhooks → New webhook → Copy URL."},webhook:{icon:i,title:"Connect a webhook",name:"Webhook",about:"Watchbell POSTs JSON to this address for every alert message. It must be https on a public host (port 443); Watchbell doesn't post into private networks or follow redirects."},smtp:{icon:r,title:"Email through your mail server",name:"Email (SMTP)",about:"Port 587 or 2525 with STARTTLS, or 465 with TLS; the password only ever goes over TLS. The server must be on the public internet. Office 365: smtp.office365.com, 587, and an app password if your account has MFA."},email_digest:{icon:r,title:"Daily email digest",name:"Daily email digest",about:`Sent through Resend from the address in DIGEST_FROM. The API key is ${l.n.setting} (RESEND_API_KEY).`}},C={telegram:"Telegram",discord:"Discord",webhook:"Webhook",smtp:"Email (SMTP)",email_digest:"Daily email digest"};e.s(["ChannelControls",0,function({kind:e,connected:a,enabled:s,envMissing:n}){let[r,i]=(0,o.useState)(!1),[l,p]=(0,o.useState)([]),[x,N]=(0,o.useState)(""),[R,T]=(0,o.useState)(""),[M,L]=(0,o.useState)(""),[D,E]=(0,o.useState)(""),[$,A]=(0,o.useState)({host:"",port:"587",user:"",pass:"",from:"",to:""}),[O,U]=(0,o.useState)({}),[W,P]=(0,o.useTransition)(),[F,z]=(0,o.useTransition)(),[K,I]=(0,o.useTransition)();(0,h.useHoldRefresh)(r);let _=j[e],H=_.icon;function B(e){e&&(p([]),N(""),T(""),L(""),E(""),A({host:"",port:"587",user:"",pass:"",from:"",to:""}),U({})),i(e)}function V(e,t){I(async()=>{try{let a=await e();a.ok?d.c.success(t,{description:a.message}):d.c.error(a.error)}catch{d.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})}return(0,t.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-2",children:[(0,t.jsxs)(u.N,{open:r,onOpenChange:e=>{W||B(e)},children:[(0,t.jsx)(u.a,{render:(0,t.jsx)(c.K,{size:"sm",disabled:null!==n,children:a?"Change":"Connect"})}),(0,t.jsxs)(u.d,{className:"max-h-[92vh] gap-0 overflow-y-auto p-0 sm:max-w-[560px]",showCloseButton:!1,children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,t.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:(0,t.jsx)(H,{size:19})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(u.F,{className:"text-base",children:_.title}),(0,t.jsx)(u.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:_.about})]})]}),(0,t.jsxs)("form",{onSubmit:t=>{let a;t.preventDefault(),a={},"telegram"!==e||x||(a.chat="Press Find chats, then pick one."),"discord"!==e||R.trim()||(a.url="Paste the whole webhook URL from Discord."),"webhook"!==e||R.trim()||(a.url="Paste the whole address, starting with https://."),"smtp"!==e||$.host.trim()||(a.host="Enter the server name, for example smtp.office365.com."),"smtp"!==e||$.to.trim()||(a.to="Enter the address that gets the alerts."),"email_digest"!==e||M.trim()||(a.to="Enter a valid email address."),U(a),Object.keys(a).length||P(async()=>{try{let t=l.find(e=>e.id===x)?.label??"",a="telegram"===e?await v(x,t):"discord"===e?await g(R):"webhook"===e?await y(R,D):"smtp"===e?await f({...$,port:Number($.port)}):await b(M);if(!a.ok){U(a.fieldErrors??{}),a.fieldErrors||d.c.error(a.error);return}d.c.success("Channel saved",{description:a.message}),i(!1)}catch{d.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},children:[(0,t.jsxs)("div",{className:"px-[18px] pt-2",children:["telegram"===e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.O,{id:"ch-chat",label:"Chat",help:"Send /start to your bot in Telegram first.",error:O.chat,children:(0,t.jsxs)("select",{id:"ch-chat",className:c.S,value:x,onChange:e=>N(e.target.value),children:[0===l.length&&(0,t.jsx)("option",{value:"",children:"Press Find chats after you message the bot"}),l.map(e=>(0,t.jsx)("option",{value:e.id,children:e.label},e.id))]})}),(0,t.jsx)("p",{className:"mb-3",children:(0,t.jsx)(c.K,{size:"sm",onClick:function(){z(async()=>{try{let e=await w();if(!e.ok)return void d.c.error(e.error);let t=e.data?.chats??[];p(t),N(t[0]?.id??""),U({}),t.length?d.c.success(`Found ${t.length} chat${1===t.length?"":"s"}: ${t.map(e=>e.label).join(", ")}.`):d.c.info("No chats yet",{description:e.message??"Send /start to your bot in Telegram, then try again."})}catch{d.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},disabled:F,children:F?"Looking…":"Find chats"})})]}),"discord"===e&&(0,t.jsx)(c.O,{id:"ch-hook",label:"Webhook URL",help:"Encrypted before it's saved and never shown again.",error:O.url,children:(0,t.jsx)("input",{id:"ch-hook",className:c.S,type:"password",autoComplete:"off",placeholder:"https://discord.com/api/webhooks/…",value:R,onChange:e=>T(e.target.value)})}),"webhook"===e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.O,{id:"ch-wh",label:"Address",help:"Encrypted before it's saved and never shown again; the console shows only its host.",error:O.url,children:(0,t.jsx)("input",{id:"ch-wh",className:c.S,type:"url",autoComplete:"off",placeholder:"https://n8n.example.com/webhook/…",value:R,onChange:e=>T(e.target.value)})}),(0,t.jsx)(c.O,{id:"ch-wh-secret",label:"Secret (optional)",help:"16 to 200 characters. Each body is signed with it: header X-Watchbell-Signature = sha256 HMAC of the timestamp, a dot and the body.",error:O.secret,children:(0,t.jsx)("input",{id:"ch-wh-secret",className:c.S,type:"password",autoComplete:"off",value:D,onChange:e=>E(e.target.value)})})]}),"smtp"===e&&(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-x-3 max-[520px]:grid-cols-1",children:[(0,t.jsx)(c.O,{id:"ch-sm-host",label:"Server",error:O.host,children:(0,t.jsx)("input",{id:"ch-sm-host",className:c.S,autoComplete:"off",placeholder:"smtp.office365.com",value:$.host,onChange:e=>A({...$,host:e.target.value})})}),(0,t.jsx)(c.O,{id:"ch-sm-port",label:"Port",error:O.port,children:(0,t.jsxs)("select",{id:"ch-sm-port",className:c.S,value:$.port,onChange:e=>A({...$,port:e.target.value}),children:[(0,t.jsx)("option",{value:"587",children:"587 · STARTTLS"}),(0,t.jsx)("option",{value:"465",children:"465 · TLS"}),(0,t.jsx)("option",{value:"2525",children:"2525 · STARTTLS"})]})}),(0,t.jsx)(c.O,{id:"ch-sm-user",label:"User name",error:O.user,children:(0,t.jsx)("input",{id:"ch-sm-user",className:c.S,autoComplete:"off",value:$.user,onChange:e=>A({...$,user:e.target.value})})}),(0,t.jsx)(c.O,{id:"ch-sm-pass",label:"Password",help:a?"Leave empty to keep the saved one.":"Encrypted before it's saved and never shown again.",error:O.pass,children:(0,t.jsx)("input",{id:"ch-sm-pass",className:c.S,type:"password",autoComplete:"off",value:$.pass,onChange:e=>A({...$,pass:e.target.value})})}),(0,t.jsx)(c.O,{id:"ch-sm-from",label:"From",error:O.from,children:(0,t.jsx)("input",{id:"ch-sm-from",className:c.S,type:"email",autoComplete:"off",placeholder:"alerts@example.com",value:$.from,onChange:e=>A({...$,from:e.target.value})})}),(0,t.jsxs)("div",{className:"col-span-2 max-[520px]:col-span-1",children:[(0,t.jsx)(c.O,{id:"ch-sm-to",label:"Send to",help:"Up to 10 addresses; each one gets the same email. Press Enter or a comma after each.",error:O.to,children:(0,t.jsx)(m,{id:"ch-sm-to",onChange:e=>A(t=>({...t,to:e}))})}),"onboarding@resend.dev"===$.from.trim().toLowerCase()&&$.to.includes(",")&&(0,t.jsx)("p",{className:"-mt-2 mb-3.5 rounded-md border border-warn/40 bg-warn-soft px-2.5 py-2 text-[12.5px]",children:"Resend's test sender (onboarding@resend.dev) only delivers to your own Resend account address. Verify a domain in Resend and send from it to reach other people."})]})]}),"email_digest"===e&&(0,t.jsx)(c.O,{id:"ch-to",label:"Send to",error:O.to,children:(0,t.jsx)("input",{id:"ch-to",className:c.S,type:"email",autoComplete:"off",placeholder:"name@example.com",value:M,onChange:e=>L(e.target.value)})})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(c.K,{onClick:()=>B(!1),disabled:W,children:"Cancel"}),(0,t.jsx)(c.K,{type:"submit",variant:"primary",disabled:W,children:W?"Saving…":"Save"})]})]})]})]}),a&&s&&null===n&&(0,t.jsx)(c.K,{size:"sm",disabled:K,onClick:()=>V(()=>k(e),`${C[e]} test`),children:K?"Sending…":"Send test"}),a&&(0,t.jsx)(c.K,{size:"sm",variant:"ghost",disabled:K,onClick:()=>V(()=>S(e,!s),C[e]),children:s?"Turn off":"Turn on"})]})}],108608)},274224,e=>{var t=e.i(843476),a=e.i(271645),s=e.i(846696),n=e.i(428325),r=e.i(95187);let i=(0,r.createServerReference)("6044edaa3a09d8cab94a009e813deb004a0ff62ee1",r.callServer,void 0,r.findSourceMapURL,"setNotifyLanguage");e.s(["LanguageSelect",0,function({channel:e,label:r,saved:l}){let[o,d]=(0,a.useState)(l),[c,h]=(0,a.useTransition)();return(0,t.jsxs)("select",{"aria-label":`${r} language`,className:`${n.S} w-auto min-w-[160px]`,value:o,disabled:c,onChange:t=>{var a;d(a="id"===t.target.value?"id":"en"),h(async()=>{try{let t=await i(e,a);t.ok?s.c.success(`${r} language saved`,{description:t.message}):(d(o),s.c.error(t.error))}catch{d(o),s.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},children:[(0,t.jsx)("option",{value:"en",children:"English"}),(0,t.jsx)("option",{value:"id",children:"Bahasa Indonesia"})]})}],274224)},689721,e=>{var t=e.i(843476),a=e.i(668029),s=e.i(271645),n=e.i(846696),r=e.i(428325),i=e.i(500443),l=e.i(776639);let o=e=>(e??0).toLocaleString("en-US"),d={MonitorDown:{key:"MonitorDown",severity:"critical",threshold:3,bounds:[1,10],source:"own",needs:null,sampled:!0,condition:e=>`${o(e)} failed checks in a row`},CollectorStale:{key:"CollectorStale",severity:"critical",threshold:5,bounds:[3,60],source:"own",needs:null,sampled:!1,condition:e=>`No collector run for ${o(e)} min`},HighLatency:{key:"HighLatency",severity:"warning",threshold:1500,bounds:[100,3e4],source:"own",needs:null,sampled:!0,condition:e=>`Slowest 5% of checks over ${o(e)} ms for 10 min`},DeploymentFailed:{key:"DeploymentFailed",severity:"warning",threshold:null,bounds:null,source:"api",needs:null,sampled:!1,condition:()=>"A production deploy fails"},DatabasePaused:{key:"DatabasePaused",severity:"warning",threshold:null,bounds:null,source:"api",needs:"databases",sampled:!1,condition:()=>"Supabase pauses the project"},CertExpiringSoon:{key:"CertExpiringSoon",severity:"warning",threshold:14,bounds:[1,90],source:"own",needs:"domains",sampled:!1,condition:e=>`TLS certificate expires in < ${o(e)} days`},DomainExpiringSoon:{key:"DomainExpiringSoon",severity:"warning",threshold:30,bounds:[1,180],source:"api",needs:"domains",sampled:!1,condition:e=>`Domain expires in < ${o(e)} days`},StorageAlmostFull:{key:"StorageAlmostFull",severity:"warning",threshold:80,bounds:[10,100],source:"api",needs:"databases",sampled:!1,condition:e=>`Database size > ${o(e)}% of free limit`},NeonComputeHigh:{key:"NeonComputeHigh",severity:"warning",threshold:80,bounds:[1,100],source:"api",needs:"databases",sampled:!1,condition:e=>`> ${o(e)} of 100 CU-hours this month`},FirestoreQuotaHigh:{key:"FirestoreQuotaHigh",severity:"warning",threshold:80,bounds:[10,100],source:"test",needs:"databases",sampled:!1,condition:e=>`Daily reads > ${o(e)}% of 50k`},AutoPauseRisk:{key:"AutoPauseRisk",severity:"info",threshold:4,bounds:[1,6],source:"api",needs:"databases",sampled:!1,condition:e=>`Supabase project without API traffic for ${o(e)}+ days`},DnsProxiedToVercel:{key:"DnsProxiedToVercel",severity:"info",threshold:null,bounds:null,source:"api",needs:"dns",sampled:!1,condition:()=>"Cloudflare record proxied in front of Vercel"},ComputeHigh:{key:"ComputeHigh",severity:"warning",threshold:80,bounds:[50,95],source:"api",needs:"databases",sampled:!1,condition:e=>`Supabase CPU > ${o(e)}% for 15 min, RAM > ${o(Math.min(99,(e??80)+10))}%, disk > ${o(e)}% or connections > ${o(e)}% of max`},DbQuotaHigh:{key:"DbQuotaHigh",severity:"warning",threshold:80,bounds:[10,100],source:"api",needs:"databases",sampled:!1,condition:e=>`Turso, Upstash or D1 usage > ${o(e)}% of a free-plan quota`},CredentialExpiring:{key:"CredentialExpiring",severity:"warning",threshold:14,bounds:[1,60],source:"api",needs:null,sampled:!1,condition:e=>`Account credential expires in < ${o(e)} days`},VulnerableDependency:{key:"VulnerableDependency",severity:"warning",threshold:null,bounds:null,source:"api",needs:null,sampled:!1,condition:()=>"A dependency has a critical or high advisory, or a moderate one on a direct dependency (OSV.dev)"},FrameworkVulnerable:{key:"FrameworkVulnerable",severity:"warning",threshold:null,bounds:null,source:"own",needs:null,sampled:!1,condition:()=>"The app's Next.js version has a known advisory (OSV.dev)"},MonitorDomainMoved:{key:"MonitorDomainMoved",severity:"warning",threshold:null,bounds:null,source:"own",needs:null,sampled:!1,condition:()=>"The monitor's domain is no longer one of the app's domains"}};Object.keys(d),e.i(684496);let c=[["critical","Critical"],["warning","Warning"],["info","Info"]];var h=e.i(95187);let u=(0,h.createServerReference)("6031dd5431ba0fc8f5afe56ba2aa2330d9defbbf41",h.callServer,void 0,h.findSourceMapURL,"editRule"),p=(0,h.createServerReference)("601d2c1a6f5a422fff8099e3915b8529e477d36407",h.callServer,void 0,h.findSourceMapURL,"testRule"),m=["status","severity","rule","target","detail","cause","step","since","threshold"],x=["id","en"],b={status:"FIRING, REPEAT or RESOLVED (MUNCUL, ULANG, PULIH in Indonesian)",severity:"critical, warning or info",rule:"the rule's key, like MonitorDown",target:"what the alert is about: an app, a database, a domain",detail:"Watchbell's sentence about what it saw",cause:"the alert that caused this one, or a provider incident",step:"Watchbell's next step for rules that have one",since:"when the alert started: the time and the time zone",threshold:"the rule's number from Threshold"},g={en:"{status} · {severity} · {rule} · {target}\n{detail}\n{cause}\nNext step: {step}\nsince {since}",id:"{status} · {severity} · {rule} · {target}\n{detail}\n{cause}\nYang perlu kamu lakukan: {step}\nsejak {since}"},f={en:"Test message: Watchbell's sentence about what it saw goes here.",id:"Pesan tes: di sini nanti kalimat Watchbell soal apa yang dilihatnya."},v=/\{([a-zA-Z_]+)\}/g,y=e=>e.replace(/\r\n?/g,"\n").replace(/[ \t]+$/gm,"").trim();function k(e,t){let a="string"==typeof e?y(e):"";return a&&a!==g[t]?a:null}let S={id:"Bahasa Indonesia",en:"English"},w={en:"FIRING",id:"MUNCUL"},j={en:{critical:"critical",warning:"warning",info:"info"},id:{critical:"kritis",warning:"peringatan",info:"info"}},C={en:"1 firing",id:"1 aktif"},N={en:"Open alerts",id:"Buka Alerts"},R=e=>({id:e.id??g.id,en:e.en??g.en});function T({ruleKey:e,severity:a,threshold:n,sample:i,texts:l,onChange:o,errors:d}){let[c,h]=(0,s.useState)("id"),u=(0,s.useRef)(null),p=l[c],R=null!==k(p,c),M={status:w[c],severity:j[c][a]??a,rule:e,target:"my-app",detail:f[c],cause:"",step:i.step[c]??"",since:i.since,threshold:n},[L="",...D]=y(p).split("\n").flatMap(e=>{let t=[...e.matchAll(v)].map(e=>e[1]).filter(e=>Object.hasOwn(M,e));return t.length&&t.every(e=>!M[e].trim())?[]:[e.replace(v,(e,t)=>Object.hasOwn(M,t)?M[t]:e)]}).join("\n").replace(/\n{3,}/g,"\n\n").trim().split("\n");return(0,t.jsxs)("fieldset",{className:"mb-3.5 flex flex-col gap-[5px] border-t border-line pt-3.5",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,t.jsx)("legend",{className:"text-[13px] font-medium",children:"Message"}),(0,t.jsx)("span",{className:`rounded-full border px-2 py-px text-[11.5px] ${R?"border-brand/40 text-brand":"border-line text-ink-soft"}`,children:R?"Changed":"Watchbell's wording"})]}),(0,t.jsx)("span",{className:"text-[12.5px] text-ink-soft",children:"Word the notification yourself. Left as it is, the rule keeps Watchbell's wording, including later fixes to it."}),(0,t.jsx)("div",{role:"tablist",className:"mt-1 flex gap-1 border-b border-line",children:x.map(e=>(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":e===c,onClick:()=>h(e),className:`-mb-px border-b-2 px-2.5 py-1.5 text-[13px] ${e===c?"border-brand font-medium text-ink":"border-transparent text-ink-soft hover:text-ink"}`,children:[S[e],null!==k(l[e],e)?" · changed":""]},e))}),(0,t.jsx)("textarea",{ref:u,id:`rule-msg-${c}`,"aria-label":`Message in ${S[c]}`,className:`${r.S} min-h-[124px] resize-y font-mono text-[12.5px] leading-relaxed`,maxLength:1200,value:p,onChange:e=>o({...l,[c]:e.target.value})}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:m.map(e=>(0,t.jsx)("button",{type:"button",title:b[e],onClick:()=>{let t,a,s,n;return t=u.current,a=t?.selectionStart??p.length,s=t?.selectionEnd??a,n=`{${e}}`,void(o({...l,[c]:p.slice(0,a)+n+p.slice(s)}),requestAnimationFrame(()=>{t?.focus(),t?.setSelectionRange(a+n.length,a+n.length)}))},className:"rounded border border-line-strong bg-sunken px-1.5 py-px font-mono text-[12px] text-ink hover:border-brand",children:`{${e}}`},e))}),d[`template_${c}`]&&(0,t.jsx)("span",{className:"text-[12.5px] text-err",role:"alert",children:d[`template_${c}`]}),x.filter(e=>e!==c&&d[`template_${e}`]).map(e=>(0,t.jsxs)("span",{className:"text-[12.5px] text-err",role:"alert",children:[S[e],": ",d[`template_${e}`]]},e)),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-[12.5px] text-ink-soft",children:"A line whose fields are all empty is left out."}),(0,t.jsx)("button",{type:"button",className:"text-[12.5px] text-link underline disabled:opacity-50 disabled:no-underline",disabled:!R,onClick:()=>o({...l,[c]:g[c]}),children:"Back to Watchbell's wording"})]}),(0,t.jsxs)("div",{className:"mt-1 rounded-md border border-line bg-sunken px-3 py-2.5 text-[13px] leading-relaxed",children:[(0,t.jsx)("div",{className:"mb-1 text-[11.5px] uppercase tracking-wide text-ink-faint",children:"Preview, with sample values"}),(0,t.jsxs)("div",{className:"whitespace-pre-wrap break-words",children:[(0,t.jsx)("b",{children:"Watchbell"}),": ",C[c]," · ",i.since,"\n\n",(0,t.jsx)("b",{children:L}),D.length?`
2
+ ${D.join("\n")}`:"","\n",(0,t.jsx)("span",{className:"text-link",children:N[c]})]})]})]})}let M=[["telegram","Telegram"],["discord","Discord"],["webhook","Webhook"],["smtp","Email (SMTP)"],["email_digest","Daily email digest"]],L=e=>({severity:e.severity,threshold:null===e.threshold?"":e.threshold.toLocaleString("en-US"),channels:[...e.channels],enabled:e.enabled});e.s(["RuleActions",0,function({rule:e,condition:o,templates:h,sample:m}){let[x,b]=(0,s.useState)(!1),[g,f]=(0,s.useState)(()=>L(e)),[v,y]=(0,s.useState)(()=>R(h)),[k,S]=(0,s.useState)({}),[w,j]=(0,s.useTransition)(),[C,N]=(0,s.useTransition)();(0,i.useHoldRefresh)(x);let D=d[e.key].bounds;function E(t){t&&(f(L(e)),y(R(h)),S({})),b(t)}function $(t,a){j(async()=>{try{let s=await u(e.key,t);if(!s.ok){S(s.fieldErrors??{}),n.c.error(s.error);return}a(s.message??""),b(!1)}catch{n.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})}return(0,t.jsxs)("span",{className:"inline-flex gap-1.5",children:[(0,t.jsxs)(l.N,{open:x,onOpenChange:e=>{w||E(e)},children:[(0,t.jsx)(l.a,{render:(0,t.jsx)(r.K,{size:"sm",children:"Edit"})}),(0,t.jsxs)(l.d,{className:"max-h-[92vh] gap-0 overflow-y-auto p-0 sm:max-w-[620px]",showCloseButton:!1,children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,t.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:(0,t.jsx)(a.f,{size:19})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(l.F,{className:"text-base",children:["Edit ",e.key]}),(0,t.jsx)(l.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:o})]})]}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),$({...g,templates:v},e=>n.c.success("Rule saved",{description:e}))},children:[(0,t.jsxs)("div",{className:"px-[18px] pt-2",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,t.jsx)(r.O,{id:"rule-sev",label:"Severity",error:k.severity,children:(0,t.jsx)("select",{id:"rule-sev",className:r.S,value:g.severity,onChange:e=>f({...g,severity:e.target.value}),children:c.map(([e,a])=>(0,t.jsx)("option",{value:e,children:a},e))})}),D&&(0,t.jsx)(r.O,{id:"rule-num",label:"Threshold",help:`Replaces ${e.threshold?.toLocaleString("en-US")??"the number"} in the condition.`,error:k.threshold,children:(0,t.jsx)("input",{id:"rule-num",className:r.S,inputMode:"numeric",autoComplete:"off",value:g.threshold,onChange:e=>f({...g,threshold:e.target.value})})})]}),(0,t.jsxs)("fieldset",{className:"mb-3.5 flex flex-col gap-[5px]",children:[(0,t.jsx)("legend",{className:"mb-[5px] text-[13px] font-medium",children:"Send to"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1.5",children:M.map(([e,a])=>(0,t.jsxs)("label",{className:"flex items-center gap-1.5 text-[13px]",children:[(0,t.jsx)("input",{type:"checkbox",className:"size-4 accent-brand",checked:g.channels.includes(e),onChange:t=>{let a;return a=t.target.checked,f({...g,channels:a?[...g.channels,e]:g.channels.filter(t=>t!==e)})}}),a]},e))}),(0,t.jsx)("span",{className:"text-[12.5px] text-ink-soft",children:"Opens and resolves are sent once; a still-firing alert repeats every 6 hours unless silenced."}),k.channels&&(0,t.jsx)("span",{className:"text-[12.5px] text-err",role:"alert",children:k.channels})]}),(0,t.jsxs)("label",{className:"mb-3.5 flex items-center gap-1.5 text-[13px]",children:[(0,t.jsx)("input",{type:"checkbox",className:"size-4 accent-brand",checked:g.enabled,onChange:e=>f({...g,enabled:e.target.checked})}),"Rule is on"]}),(0,t.jsx)(T,{ruleKey:e.key,severity:g.severity,threshold:g.threshold,sample:m,texts:v,onChange:y,errors:k})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(r.K,{className:"mr-auto",disabled:w||C||!g.channels.some(e=>"email_digest"!==e),onClick:function(){N(async()=>{try{let t=await p(e.key,{...g,templates:v});S(t.ok?{}:t.fieldErrors??{}),t.ok?n.c.success("Test sent",{description:t.message}):n.c.error(t.error)}catch{n.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},title:"Sends this message, as a made-up alert, to the ticked channels (not the daily digest)",children:C?"Sending…":"Send test"}),(0,t.jsx)(r.K,{onClick:()=>E(!1),disabled:w,children:"Cancel"}),(0,t.jsx)(r.K,{type:"submit",variant:"primary",disabled:w,children:w?"Saving…":"Save rule"})]})]})]})]}),(0,t.jsx)(r.K,{size:"sm",disabled:w,onClick:()=>$({...L(e),enabled:!e.enabled},t=>e.enabled?n.c.success(`${e.key} disabled. It won't fire until you enable it again.`):n.c.success(`${e.key} enabled.`,{description:t})),children:e.enabled?"Disable":"Enable"})]})}],689721)},582429,e=>{var t=e.i(843476),a=e.i(271645),s=e.i(846696),n=e.i(428325),r=e.i(684496),i=e.i(95187);let l=(0,i.createServerReference)("00c31e2c604002ab15b7a2c770afd7c106ed0eab0c",i.callServer,void 0,i.findSourceMapURL,"approvalsStatus"),o=(0,i.createServerReference)("009333d0678ca1240a5e43326983d0de56a7bb5dbd",i.callServer,void 0,i.findSourceMapURL,"disableApprovals"),d=(0,i.createServerReference)("00b4943573ed0f447bdc2150e3f45a360ed6b3070b",i.callServer,void 0,i.findSourceMapURL,"enableApprovals"),c=(0,i.createServerReference)("00a5e0ff3e92f3bc8e0317743d42739eeb451d363e",i.callServer,void 0,i.findSourceMapURL,"telegramLinkCode");e.s(["TelegramApprovals",0,function(){let[e,i]=(0,a.useState)(null),[h,u]=(0,a.useState)(null),[p,m]=(0,a.useState)(null),[x,b]=(0,a.useTransition)();function g(e,t){b(async()=>{try{let a=await e();if(!a.ok)return void s.c.error(a.error??"Watchbell didn't answer. Check that it's still running, then try again.");a.data&&i(a.data),t?.(),a.message&&s.c.success("Approval buttons",{description:a.message})}catch{s.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})}(0,a.useEffect)(()=>{let e=!0;return l().then(t=>{e&&(t.ok&&t.data?i(t.data):u(t.ok?null:t.error))}).catch(()=>e&&u("Couldn't read the status.")),()=>{e=!1}},[]);let f=e?e.on?e.linked?"On · linked to your Telegram account":"On · not linked yet":"Off":h??"Checking…",v=p?(0,r.U)(new Date(p.expiresAt)):"";return(0,t.jsxs)("div",{className:"mt-1 basis-full rounded-md border border-line px-3 py-2 text-[13px]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:"Approval buttons"}),(0,t.jsx)("span",{className:"text-ink-soft",children:f}),(0,t.jsxs)("span",{className:"ml-auto inline-flex flex-wrap gap-2",children:[e&&!e.on&&(0,t.jsx)(n.K,{size:"sm",disabled:x,onClick:()=>g(d),children:x?"Working…":"Turn on"}),e?.on&&(0,t.jsx)(n.K,{size:"sm",disabled:x,onClick:function(){b(async()=>{try{let e=await c();e.ok&&e.data?m(e.data):s.c.error(e.ok?"Watchbell didn't answer. Check that it's still running, then try again.":e.error)}catch{s.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},children:e.linked?"Link again":"Show link code"}),e?.on&&(0,t.jsx)(n.K,{size:"sm",variant:"ghost",disabled:x,onClick:()=>g(o,()=>m(null)),children:"Turn off"})]})]}),(0,t.jsx)("p",{className:"mt-1 text-[12.5px] text-ink-soft",children:"Proposal notices get ✅ Approve / ❌ Reject buttons that only your linked Telegram account can use; risky actions ask twice. While this is on, Telegram sends updates to the console instead of holding them, so Find chats lists the chats the bot has seen since then."}),e?.problem&&(0,t.jsx)("p",{className:"mt-1 text-[12.5px] text-err",children:e.problem}),p&&(0,t.jsxs)("p",{className:"mt-1 text-[12.5px]",children:["Send ",(0,t.jsxs)("code",{className:"rounded bg-sunken px-1 font-mono",children:["/link ",p.code]})," in the connected chat before ",v,". The code works once."]})]})}],582429)}])})();
@@ -1 +1 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,399582,e=>{let t=(0,e.i(33550).f)("outline","copy","Copy",[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]);e.s(["f",0,t],399582)},617708,e=>{let t=(0,e.i(33550).f)("outline","plus","Plus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);e.s(["f",0,t],617708)},225913,e=>{var t=e.i(207670);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,r=t.f;e.s(["f",0,(e,t)=>a=>{var s;if((null==t?void 0:t.variants)==null)return r(e,null==a?void 0:a.class,null==a?void 0:a.className);let{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(e=>{let t=null==a?void 0:a[e],r=null==o?void 0:o[e];if(null===t)return null;let s=n(t)||n(r);return i[e][s]}),c=a&&Object.entries(a).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return r(e,l,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...o,...c}[t]):({...o,...c})[t]===n})?[...e,n,r]:e},[]),null==a?void 0:a.class,null==a?void 0:a.className)}])},46200,e=>{var t=e.i(843476),n=e.i(146874),r=e.i(239692),a=e.i(271645),s=e.i(846696),i=e.i(428325),o=e.i(500443),l=e.i(776639);e.s(["f",0,function({trigger:e,open:c,onOpenChange:d,title:u,body:p,cta:h,danger:f=!1,onConfirm:m}){let[x,g]=(0,a.useState)(!1),b=c??x,[v,j]=(0,a.useTransition)();function y(e){void 0===c&&g(e),d?.(e)}return(0,o.useHoldRefresh)(b),(0,t.jsxs)(l.N,{open:b,onOpenChange:e=>{v||y(e)},children:[void 0!==e&&((0,a.isValidElement)(e)?(0,t.jsx)(l.a,{render:e}):(0,t.jsx)(l.a,{children:e})),(0,t.jsxs)(l.d,{className:"gap-0 p-0 sm:max-w-[640px]",showCloseButton:!1,children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,t.jsx)("span",{className:`grid size-9 shrink-0 place-items-center rounded-lg bg-sunken ${f?"text-err":"text-ink-soft"}`,children:f?(0,t.jsx)(n.f,{size:19}):(0,t.jsx)(r.f,{size:19})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(l.F,{className:"text-base",children:u}),(0,t.jsx)(l.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:p})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(i.K,{onClick:()=>y(!1),disabled:v,children:"Keep as is"}),(0,t.jsx)(i.K,{variant:f?"danger":"primary",onClick:function(){j(async()=>{try{let e=await m();e.ok?(s.c.success(e.message),y(!1)):s.c.error(e.message)}catch{s.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},disabled:v,children:v?"Working…":h})]})]})]})}])},688656,e=>{var t=e.i(843476),n=e.i(617708),r=e.i(944971),a=e.i(271645),s=e.i(846696),i=e.i(95187);let o=(0,i.createServerReference)("60a1541f8a46089c254c08d32883d14dc57d6da3dc",i.callServer,void 0,i.findSourceMapURL,"createOptionsAction"),l=(0,i.createServerReference)("008eaf2d7edce4ecebe17eca886783cf2cce12b3e1",i.callServer,void 0,i.findSourceMapURL,"disconnectGoogleCreate"),c=(0,i.createServerReference)("70fbd6edbde31eeeaac7798ef060ae321be7ee89ae",i.callServer,void 0,i.findSourceMapURL,"requestCreateAction"),d=(0,i.createServerReference)("00e14c071684abfe236a0b7091e2e09f954533cbda",i.callServer,void 0,i.findSourceMapURL,"startGoogleCreateConnect");var u=e.i(54131),p=e.i(46200),h=e.i(428325),f=e.i(500443),m=e.i(776639);let x=["This asks Google for the cloud-platform permission: it is broad (it can manage every Google Cloud project you own), so the console uses it only to create a project and add Firebase to it after your approval, and never to change or delete anything.","Google shows an \"unverified app\" warning because Watchbell's OAuth client isn't verified for this scope. It is your own client for your own use: choose Advanced → Go to Watchbell.","While the OAuth consent screen is in Testing mode, Google ends this grant after 7 days; connect again when a create says so. Remove it any time in your Google Account → Security → Third-party access."];r.n.notSet("GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET",!0);var g=e.i(552978);e.i(322534);var b=e.i(450547);let v=(e,t=300)=>"string"==typeof e&&e.length<=t?e:"",j=(e,t)=>({ok:!1,field:e,error:t}),y=/^(?:\*|[a-z0-9_](?:[a-z0-9_-]{0,61}[a-z0-9_])?)$/,k=/^[a-z0-9][a-z0-9-]{0,62}$/,N=/^br-[a-z0-9-]{3,60}$/,C=[["ap-southeast-1","Southeast Asia (Singapore)"],["ap-northeast-1","Northeast Asia (Tokyo)"],["ap-northeast-2","Northeast Asia (Seoul)"],["ap-southeast-2","Oceania (Sydney)"],["ap-south-1","South Asia (Mumbai)"],["ap-east-1","East Asia (Hong Kong)"],["us-east-1","East US (North Virginia)"],["us-east-2","East US (Ohio)"],["us-west-1","West US (North California)"],["us-west-2","West US (Oregon)"],["ca-central-1","Canada (Central)"],["sa-east-1","South America (São Paulo)"],["eu-west-1","West EU (Ireland)"],["eu-west-2","West EU (London)"],["eu-west-3","West EU (Paris)"],["eu-north-1","North EU (Stockholm)"],["eu-central-1","Central EU (Frankfurt)"],["eu-central-2","Central EU (Zurich)"]],w=C.map(([e])=>e),S=/^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$/,A=/^[\w-]{1,64}$/,$=/^[a-z][a-z0-9-]{4,28}[a-z0-9]$/,_=/^[A-Za-z0-9 '"!-]{4,30}$/;var z=e.i(212253);let E={dns_record:"The name must be new in this zone. Proxied is off unless you turn it on.",neon_branch:"The branch is created without a compute, so it uses no CU-hours until you wake it. Waking it later uses CU-hours (100 a month per project on the free plan).",supabase_project:"Only an organization on the free plan is allowed. The database password is generated when the Owner approves and shown once.",firebase_project:"A Google Cloud project without a billing account (the free Spark plan), then Firebase is added to it."};function T({type:e,target:n,targetName:r,onDone:i}){let l=(0,u.useMask)(),[d,p]=(0,a.useState)(null),[f,x]=(0,a.useState)(null),[C,z]=(0,a.useState)(n),[L,G]=(0,a.useState)({type:"CNAME",ttl:b.k,proxied:!1,region:"ap-southeast-1"}),[I,P]=(0,a.useState)(null),[U,F]=(0,a.useTransition)(),D=(e,t)=>G(n=>({...n,[e]:t}));(0,a.useEffect)(()=>{let t=!0;return o(e,C).then(e=>{if(t)if(e.ok&&e.data){if(p(e.data),"neon_branch"===e.data.type){let t=(e.data.branches.find(e=>e.isDefault)??e.data.branches[0])?.id??"";G(e=>({...e,parentId:e.parentId??t}))}if("supabase_project"===e.data.type){e.data.accountId&&e.data.accountId!==C&&z(e.data.accountId);let t=e.data.orgs.find(e=>e.allowed);t&&G(e=>({...e,orgSlug:t.slug}))}}else x(e.ok?"Something went wrong.":e.error)}).catch(()=>t&&x("Couldn't load the choices. Try again.")),()=>{t=!1}},[e,C]);let K=e=>I?.field===e?I.text:void 0,W=d?.type==="firebase_project"&&(!d.envReady||!d.connected);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"px-[18px] pb-2 pt-4",children:[(0,t.jsx)(m.F,{className:"text-base",children:l("text",`New ${g.S[e]}${"dns_record"===e||"neon_branch"===e?` in ${r}`:""}`)}),(0,t.jsxs)(m.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:[E[e]," This only asks: the Owner approves it with the authenticator code, then the console checks the free tier again and makes one create call at ",g.E[e],"."]})]}),(0,t.jsxs)("div",{className:"px-[18px] pt-1.5",children:[f&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(h.M,{tone:"danger",title:"Couldn't read the live choices",children:f})}),!d&&!f&&(0,t.jsx)("p",{className:"mb-3 text-[13px] text-ink-soft",children:"Reading the live choices…"}),"dns_record"===e&&(0,t.jsx)(O,{v:L,set:D,fe:K,zone:r}),"neon_branch"===e&&d?.type==="neon_branch"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"mb-3 text-[13px] text-ink-soft",children:[d.branches.length," of ",d.limit," branches used in this project."]}),(0,t.jsx)(h.O,{id:"cr-parent",label:"Copy from branch",error:K("parentId"),children:(0,t.jsx)("select",{id:"cr-parent",className:h.S,value:String(L.parentId??""),onChange:e=>D("parentId",e.target.value),children:d.branches.map(e=>(0,t.jsxs)("option",{value:e.id,children:[l("text",e.name),e.isDefault?" (default)":""]},e.id))})}),(0,t.jsx)(h.O,{id:"cr-name",label:"New branch name",error:K("name"),help:"Lower-case letters, digits and hyphens, like preview-42.",children:(0,t.jsx)("input",{id:"cr-name",className:h.S,value:String(L.name??""),maxLength:63,spellCheck:!1,autoComplete:"off",onChange:e=>D("name",e.target.value)})})]}),"supabase_project"===e&&d?.type==="supabase_project"&&(0,t.jsx)(M,{opts:d,v:L,set:D,fe:K,account:C,setAccount:z}),"firebase_project"===e&&d?.type==="firebase_project"&&(0,t.jsx)(R,{opts:d,v:L,set:D,fe:K}),I?.field==="form"&&(0,t.jsx)("p",{className:"mb-3 text-[12.5px] text-err",role:"alert",children:I.text})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(h.K,{onClick:i,disabled:U,children:"Cancel"}),(0,t.jsx)(h.K,{variant:"primary",onClick:function(){let t;(t="dns_record"===e?function(e,t){let n=e??{},r=v(n.type,10);if(!b.j.includes(r))return j("type","Only A, AAAA, CNAME and TXT records can be added here.");let a=function(e,t){let n=t.trim().toLowerCase().replace(/\.$/,""),r=e.trim().toLowerCase().replace(/\.$/,"");if(!r||!n||("@"===r?r=n:r===n||r.endsWith(`.${n}`)||(r=`${r}.${n}`),r.length>253))return null;let a=r===n?"":r.slice(0,-(n.length+1));return a&&!a.split(".").every((e,t)=>y.test(e)&&("*"!==e||0===t))?null:r}(v(n.name,260),t);if(!a)return j("name",`The name must be a host in ${t}, like shop or shop.${t}.`);let s="number"==typeof n.ttl?n.ttl:b.k,i=(0,b.V)({type:r,name:a},{content:v(n.content,4096),ttl:s,proxied:!0===n.proxied});return i.ok?{ok:!0,inputs:{zoneName:t.toLowerCase(),type:r,name:a,content:i.values.content,ttl:i.values.ttl,proxied:i.values.proxied}}:j(i.field,i.error)}(L,r):"neon_branch"===e?function(e,t){let n=e??{},r=v(n.name,80).trim();if(!k.test(r))return j("name","Use 1 to 63 lower-case letters, digits and hyphens, starting with a letter or digit.");let a=v(n.parentId,80);return N.test(a)?{ok:!0,inputs:{projectName:t,parentId:a,name:r}}:j("parentId","Pick the branch to copy from.")}(L,r):"supabase_project"===e?function(e){let t=e??{},n=v(t.orgSlug,80);if(!A.test(n))return j("orgSlug","Pick an organization.");let r=v(t.name,80).trim();if(!S.test(r))return j("name","Use 1 to 63 letters, digits, spaces, dots, hyphens or underscores.");let a=v(t.region,30);return w.includes(a)?{ok:!0,inputs:{orgSlug:n,name:r,region:a}}:j("region","Pick a region from the list.")}(L):function(e){let t=e??{},n=v(t.projectId,40).trim();if(!$.test(n)||/google|ssl|undefined|null/.test(n))return j("projectId",'6 to 30 lower-case letters, digits and hyphens, starting with a letter (Google refuses ids with "google").');let r=v(t.displayName,40).trim()||n.slice(0,30);return _.test(r)?{ok:!0,inputs:{projectId:n,displayName:r}}:j("displayName","4 to 30 letters, digits, spaces, hyphens, quotes or exclamation marks.")}(L)).ok?P(null):P({field:t.field,text:t.error}),t.ok&&F(async()=>{try{let t=await c(e,"supabase_project"===e?C:n,L);if(t.ok)s.c.success(l("text",t.message??"Asked.")),i();else{let e=t.fieldErrors?Object.keys(t.fieldErrors)[0]:"form";P({field:e,text:l("text",t.error)})}}catch{P({field:"form",text:"Watchbell didn't answer. Check that it's still running, then try again."})}})},disabled:U||!d||W,children:U?"Checking…":"Check and ask for approval"})]})]})}function O({v:e,set:n,fe:r,zone:a}){let s="TXT"!==e.type;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"grid grid-cols-[120px_minmax(0,1fr)] gap-3 max-[560px]:grid-cols-1",children:[(0,t.jsx)(h.O,{id:"cr-type",label:"Type",error:r("type"),children:(0,t.jsx)("select",{id:"cr-type",className:h.S,value:String(e.type),onChange:e=>n("type",e.target.value),children:["A","AAAA","CNAME","TXT"].map(e=>(0,t.jsx)("option",{children:e},e))})}),(0,t.jsx)(h.O,{id:"cr-name",label:"Name",error:r("name"),help:`A host in ${a}: shop becomes shop.${a}.`,children:(0,t.jsx)("input",{id:"cr-name",className:h.S,value:String(e.name??""),maxLength:253,spellCheck:!1,autoComplete:"off",onChange:e=>n("name",e.target.value)})})]}),(0,t.jsx)(h.O,{id:"cr-content",label:"Content",error:r("content"),help:"CNAME"===e.type?"For Vercel, copy the value shown on the project's Domains page.":void 0,children:(0,t.jsx)("input",{id:"cr-content",className:h.S,value:String(e.content??""),maxLength:2048,spellCheck:!1,autoComplete:"off",onChange:e=>n("content",e.target.value)})}),(0,t.jsx)(h.O,{id:"cr-ttl",label:"TTL",error:r("ttl"),children:(0,t.jsx)("select",{id:"cr-ttl",className:h.S,value:e.proxied?b.k:Number(e.ttl),disabled:!0===e.proxied,onChange:e=>n("ttl",Number(e.target.value)),children:b.i.map(e=>(0,t.jsx)("option",{value:e,children:(0,z.f)(e)},e))})}),s&&(0,t.jsxs)("label",{className:"mb-3.5 flex items-center gap-2 text-[13px]",children:[(0,t.jsx)("input",{type:"checkbox",className:"accent-brand",checked:!0===e.proxied,onChange:e=>n("proxied",e.target.checked)}),"Proxied through Cloudflare (off by default; Vercel recommends DNS only)"]})]})}function M({opts:e,v:n,set:r,fe:a,account:s,setAccount:i}){let o=(0,u.useMask)(),l=e.active>=e.limit;return(0,t.jsxs)(t.Fragment,{children:[e.accounts.length>1&&(0,t.jsx)(h.O,{id:"cr-acc",label:"Supabase account",children:(0,t.jsx)("select",{id:"cr-acc",className:h.S,value:s,onChange:e=>i(e.target.value),children:e.accounts.map(e=>(0,t.jsx)("option",{value:e.id,children:o("account",e.label)},e.id))})}),0===e.accounts.length&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(h.M,{tone:"info",title:"No Supabase account connected",children:"Connect one in Connections first."})}),e.error&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(h.M,{tone:"danger",title:"Can't create with this token",children:e.error})}),(0,t.jsxs)("p",{className:"mb-3 text-[13px] text-ink-soft",children:[e.active," of ",e.limit," active free projects in use.",l?" Pause one first; paused projects don't count.":""]}),(0,t.jsx)(h.O,{id:"cr-org",label:"Organization",error:a("orgSlug"),help:"Paid or unknown plans are refused: a project there is billed from the first hour.",children:(0,t.jsx)("select",{id:"cr-org",className:h.S,value:String(n.orgSlug??""),onChange:e=>r("orgSlug",e.target.value),children:e.orgs.map(e=>(0,t.jsxs)("option",{value:e.slug,disabled:!e.allowed,children:[o("text",e.name)," · ",e.plan??"plan unknown",e.allowed?"":" (not allowed)"]},e.slug))})}),(0,t.jsx)(h.O,{id:"cr-name",label:"Project name",error:a("name"),children:(0,t.jsx)("input",{id:"cr-name",className:h.S,value:String(n.name??""),maxLength:63,autoComplete:"off",onChange:e=>r("name",e.target.value)})}),(0,t.jsx)(h.O,{id:"cr-region",label:"Region",error:a("region"),children:(0,t.jsx)("select",{id:"cr-region",className:h.S,value:String(n.region),onChange:e=>r("region",e.target.value),children:C.map(([e,n])=>(0,t.jsxs)("option",{value:e,children:[n," · ",e]},e))})}),(0,t.jsx)("p",{className:"mb-3 text-[12.5px] text-ink-soft",children:e.scopeNote})]})}function R({opts:e,v:n,set:a,fe:s}){return e.envReady?e.connected?(0,t.jsxs)(t.Fragment,{children:[e.error&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(h.M,{tone:"danger",title:"Google",children:e.error})}),null!==e.projects&&(0,t.jsxs)("p",{className:"mb-3 text-[13px] text-ink-soft",children:[e.projects," active Google Cloud project",1===e.projects?"":"s",". Google's project quota without a billing account is about ",e.quotaHint," and isn't readable by API; deleted projects count for 30 days."]}),(0,t.jsx)(h.O,{id:"cr-pid",label:"Project id",error:s("projectId"),help:"6 to 30 lower-case letters, digits and hyphens. Permanent and global: pick one nobody has.",children:(0,t.jsx)("input",{id:"cr-pid",className:h.S,value:String(n.projectId??""),maxLength:30,spellCheck:!1,autoComplete:"off",onChange:e=>a("projectId",e.target.value)})}),(0,t.jsx)(h.O,{id:"cr-pname",label:"Display name",error:s("displayName"),children:(0,t.jsx)("input",{id:"cr-pname",className:h.S,value:String(n.displayName??""),maxLength:30,autoComplete:"off",onChange:e=>a("displayName",e.target.value)})})]}):(0,t.jsxs)("div",{className:"mb-3 flex flex-col gap-2",children:[(0,t.jsx)(h.M,{tone:"info",title:"Connect Google (create projects) first",children:"The Firebase service accounts are viewer-only, so creating needs your own Google grant."}),(0,t.jsx)(L,{})]}):(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(h.M,{tone:"info",title:"Google OAuth isn't set up",children:r.n.notSet("GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET",!0)})})}function L({reconnect:e=!1}){return(0,t.jsx)(p.f,{trigger:(0,t.jsx)(h.K,{size:"sm",variant:"primary",children:e?"Reconnect Google (create projects)":"Connect Google (create projects)"}),title:"Connect Google (create projects)",body:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"mb-2",children:"Google will ask you to approve one permission, separate from the Drive backup one:"}),(0,t.jsx)("p",{className:"mb-2 rounded-md border border-line bg-sunken px-3 py-2 text-ink-soft",children:"See, edit, configure, and delete your Google Cloud data (cloud-platform)."}),(0,t.jsx)("ul",{className:"list-disc space-y-1 pl-5 text-ink-soft",children:x.map(e=>(0,t.jsx)("li",{children:e},e))}),(0,t.jsxs)("p",{className:"mt-2 text-ink-soft",children:["Before the first connect, add this redirect URI to the OAuth client in the Google Cloud console: ",(0,t.jsx)("span",{className:"font-mono text-[12px]",children:"/auth/google/create/callback"})," on this site."]})]}),cta:"Continue to Google",onConfirm:async()=>{let e=await d();return e.ok&&e.data?(window.location.assign(e.data.url),{ok:!0,message:"Opening Google…"}):{ok:!1,message:e.ok?"Watchbell didn't answer. Check that it's still running, then try again.":e.error}}})}e.s(["CreateButton",0,function({type:e,target:r,targetName:s,label:i}){let[o,l]=(0,a.useState)(!1);return(0,f.useHoldRefresh)(o),(0,t.jsxs)(m.N,{open:o,onOpenChange:l,children:[(0,t.jsxs)(m.a,{render:(0,t.jsx)(h.K,{size:"sm"}),children:[(0,t.jsx)(n.f,{size:15,"aria-hidden":!0,className:"-ml-0.5 mr-1 inline"}),i]}),(0,t.jsx)(m.d,{className:"gap-0 p-0 sm:max-w-[560px]",showCloseButton:!1,children:o&&(0,t.jsx)(T,{type:e,target:r,targetName:s,onDone:()=>l(!1)})})]})},"DisconnectGoogleCreateButton",0,function(){return(0,t.jsx)(p.f,{trigger:(0,t.jsx)(h.K,{children:"Disconnect Google (create)"}),title:"Disconnect Google (create projects)?",body:"The console forgets the grant. Remove Watchbell's access in your Google Account → Security → Third-party access as well. Projects already created stay.",cta:"Disconnect",onConfirm:async()=>{let e=await l();return e.ok?{ok:!0,message:e.message??"Disconnected."}:{ok:!1,message:e.error}}})}],688656)},259871,e=>{var t=e.i(843476),n=e.i(399582),r=e.i(271645),a=e.i(846696),s=e.i(95187);let i=(0,s.createServerReference)("608e2b660f1c14e9633e3b2da612ad5ced362138e9",s.callServer,void 0,s.findSourceMapURL,"approveCreateAction"),o=(0,s.createServerReference)("40105d850a6b0aef651eb7b095bfb9d3b9abf9c3e3",s.callServer,void 0,s.findSourceMapURL,"rejectCreateAction");var l=e.i(54131),c=e.i(46200),d=e.i(428325),u=e.i(500443),p=e.i(776639),h=e.i(552978);let f=new Set(["requested","approved","running"]),m=e=>f.has(e.status);var x=e.i(684496),g=e.i(975157);let b={requested:"Waiting for approval",approved:"Approved",running:"Creating…",done:"Created",failed:"Failed",rejected:"Rejected",expired:"Expired"};function v({items:e,owner:n,focus:r,quiet:a}){let s=(0,l.useMask)();return(0,t.jsx)("ul",{className:"divide-y divide-line",children:e.map(e=>{var i;let o;return(0,t.jsxs)("li",{id:`create-${e.id}`,className:(0,g.f)("flex flex-wrap items-center gap-x-3 gap-y-1.5 px-[18px] py-2.5",a&&"py-2 text-[13px]",r===e.id&&"bg-brand-soft"),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("b",{className:(0,g.f)("font-medium",a&&"text-ink-soft"),children:h.S[e.type]}),(0,t.jsx)(d.E,{children:h.E[e.type]}),(0,t.jsx)("span",{className:(0,g.f)("text-[12.5px]","failed"===e.status?"text-err":"text-ink-soft"),children:b[e.status]})]}),(0,t.jsx)("p",{className:"font-mono text-[12.5px] text-ink-soft [overflow-wrap:anywhere]",children:s("text",e.summary)}),"requested"===e.status&&(0,t.jsxs)("p",{className:"text-[12px] text-ink-faint",children:[e.mine?"You asked":"Another member asked"," · expires ",(i=new Date(e.expiresAt),o=(0,x.e)(i),`${o.day} ${o.month} ${o.year}, ${(0,x.U)(i)}`)]}),e.error&&"requested"!==e.status&&(0,t.jsx)("p",{className:"text-[12.5px] text-err",children:s("text",e.error)}),e.result?.id&&"done"===e.status&&(0,t.jsxs)("p",{className:"text-[12px] text-ink-faint",children:["Created: ",(0,t.jsx)("span",{className:"font-mono",children:s("text",e.result.id)}),"firebase-pending"===e.result.note?" · Firebase still needs adding in the Firebase console":""]})]}),n&&"requested"===e.status&&(0,t.jsxs)("div",{className:"flex gap-1.5",children:[(0,t.jsx)(j,{item:e}),(0,t.jsx)(y,{item:e})]})]},e.id)})})}function j({item:e}){return(0,t.jsx)(c.f,{trigger:(0,t.jsx)(d.K,{size:"sm",children:"Reject"}),title:`Reject this ${h.S[e.type]}?`,body:"Nothing is created. The person who asked can ask again.",cta:"Reject",onConfirm:async()=>{let t=await o(e.id);return t.ok?{ok:!0,message:t.message??"Rejected."}:{ok:!1,message:t.error}}})}function y({item:e}){let[n,a]=(0,r.useState)(!1);return(0,u.useHoldRefresh)(n),(0,t.jsxs)(p.N,{open:n,onOpenChange:a,children:[(0,t.jsx)(p.a,{render:(0,t.jsx)(d.K,{size:"sm",variant:"primary"}),children:"Approve…"}),(0,t.jsx)(p.d,{className:"gap-0 p-0 sm:max-w-[560px]",showCloseButton:!1,children:n&&(0,t.jsx)(k,{item:e,onDone:()=>a(!1)})})]})}function k({item:e,onDone:n}){let s=(0,l.useMask)(),[o,c]=(0,r.useState)(""),[u,f]=(0,r.useState)(null),[m,x]=(0,r.useState)(null),[g,b]=(0,r.useState)(null),[v,j]=(0,r.useTransition)();return m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"px-[18px] pb-2 pt-4",children:[(0,t.jsx)(p.F,{className:"text-base",children:"Copy the database password now"}),(0,t.jsxs)(p.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:[g," It is shown only here, only once."]})]}),(0,t.jsxs)("div",{className:"px-[18px] pt-1.5",children:[(0,t.jsx)(N,{value:m}),(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(d.M,{tone:"warning",title:"The console doesn't keep it",children:"Save it in your password manager. If it's lost, reset it in Supabase → Project settings → Database."})})]}),(0,t.jsx)("div",{className:"flex justify-end gap-2 border-t border-line px-[18px] py-3",children:(0,t.jsx)(d.K,{variant:"primary",onClick:()=>{x(null),n()},children:"I've saved it"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"px-[18px] pb-2 pt-4",children:[(0,t.jsx)(p.F,{className:"text-base",children:s("text",`Create ${h.S[e.type]} ${e.confirmName}?`)}),(0,t.jsxs)(p.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:["The console checks the free tier at ",h.E[e.type]," again now, then makes one create call. ",(0,h.d)(e.type)]})]}),(0,t.jsxs)("div",{className:"px-[18px] pt-2",children:[(0,t.jsx)("p",{className:"mb-3 rounded-md border border-line bg-sunken px-3 py-2 font-mono text-[12.5px] [overflow-wrap:anywhere]",children:s("text",e.summary)}),(0,t.jsx)(d.O,{id:`ap-${e.id}`,label:(0,t.jsxs)(t.Fragment,{children:["Type ",(0,t.jsx)("span",{className:"font-mono",children:s("text",e.confirmName)})," to approve"]}),error:u??void 0,children:(0,t.jsx)("input",{id:`ap-${e.id}`,className:d.S,value:o,autoComplete:"off",spellCheck:!1,onChange:e=>c(e.target.value)})})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(d.K,{onClick:n,disabled:v,children:"Cancel"}),(0,t.jsx)(d.K,{variant:"primary",onClick:function(){j(async()=>{try{let t=await i(e.id,o);if(!t.ok)return f(s("text",t.error));f(null),t.data?.secret?(x(t.data.secret),b(s("text",t.message??"Created."))):(a.c.success(s("text",t.message??"Created.")),n())}catch{f("Something went wrong. Check the provider's dashboard before trying again.")}})},disabled:v||o.trim()!==e.confirmName,children:v?"Checking and creating…":"Approve and create"})]})]})}function N({value:e}){let[s,i]=(0,r.useState)(!1),{shot:o}=(0,l.usePrivacy)(),[c,u]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2 rounded-md border border-line-strong bg-sunken px-3 py-2",children:[o&&!c?(0,t.jsx)("button",{type:"button",className:"min-w-0 flex-1 text-left text-[13px] text-ink-soft",onClick:()=>u(!0),children:"Hidden in screenshot mode. Click to show it."}):(0,t.jsx)("code",{className:"min-w-0 flex-1 select-all font-mono text-[13px] [overflow-wrap:anywhere]",children:e}),(0,t.jsxs)(d.K,{size:"sm",onClick:()=>{navigator.clipboard.writeText(e).then(()=>i(!0),()=>a.c.error("Copy didn't work; select the text and copy it."))},children:[(0,t.jsx)(n.f,{size:14,"aria-hidden":!0,className:"mr-1 inline"}),s?"Copied":"Copy"]})]})}e.s(["CreateRequestList",0,function({items:e,owner:n,focus:r,title:a="Waiting for approval"}){let{pending:s,finished:i}={pending:e.filter(m),finished:e.filter(e=>!m(e))};if(!s.length&&!i.length)return null;let o=s.filter(e=>"requested"===e.status).length;return(0,t.jsxs)(t.Fragment,{children:[s.length>0&&(0,t.jsx)(d.N,{title:a,meta:o?`${o} waiting`:void 0,flush:!0,children:(0,t.jsx)(v,{items:s,owner:n,focus:r})}),i.length>0&&(0,t.jsx)(d.N,{title:"Recent requests",flush:!0,children:(0,t.jsx)(v,{items:i,owner:!1,focus:r,quiet:!0})})]})}],259871)},541299,495784,e=>{var t=e.i(843476),n=e.i(271645),r=e.i(428325),a=e.i(975157);function s(e,t,n=25){let r=e.length,a=Math.max(1,Math.ceil(r/n)),i=Math.min(Math.max(Number.isFinite(t)?Math.floor(t):1,1),a),o=(i-1)*n,l=e.slice(o,o+n);return{rows:l,page:i,pages:a,from:0===r?0:o+1,to:o+l.length,total:r}}e.s(["f",0,function({page:e,pages:s,text:i,onPage:o,bleed:l=!1}){let c=(0,n.useRef)(null),d=(0,n.useRef)(null);if((0,n.useEffect)(()=>{null!==d.current&&(c.current?.querySelectorAll("button")[d.current]?.focus(),d.current=null)},[e]),s<=1)return null;let u=(e,t)=>{(e<=1||e>=s)&&(d.current=t),o(e)};return(0,t.jsxs)("div",{className:(0,a.f)("flex items-center gap-2 border-t border-line px-[18px] py-2.5 text-[12.5px] text-ink-soft",l?"-mx-[18px] -mb-4 mt-2":"max-[720px]:px-3.5"),children:[(0,t.jsx)("span",{role:"status",children:i}),(0,t.jsxs)("span",{ref:c,className:"ml-auto flex gap-1.5",children:[(0,t.jsx)(r.K,{size:"sm",className:"disabled:hover:bg-surface","aria-label":"Previous page",disabled:e<=1,onClick:()=>u(e-1,1),children:"‹ Previous"}),(0,t.jsx)(r.K,{size:"sm",className:"disabled:hover:bg-surface","aria-label":"Next page",disabled:e>=s,onClick:()=>u(e+1,0),children:"Next ›"})]})]})}],541299),e.s(["k",0,function(e,t,n,r){return r<=1?null:t>0&&null!==n?n:e[0]?.id??null},"$",0,s,"f",0,function(e,t,n,r=25){let a=null===n?0:Math.max(0,e.findIndex(e=>e.id===n)),i=s(e.slice(a),t,r);return 0===a||i.page>1?{...i,shift:a}:{...s(e,1,r),shift:0}},"z",0,function(e,t=0,n=e.total){return`${e.from+t}–${e.to+t} of ${n}`}],495784)},776639,998218,152744,e=>{var t=e.i(843476),n=e.i(526323),r=e.i(828376);e.s(["f",0,r],998218);var r=r,a=e.i(209977),s=e.i(921637),i=e.i(141708),o=e.i(593480),l=e.i(309169),c=r;e.s(["f",0,c],152744);var c=r,d=e.i(975157),u=e.i(271645),p=e.i(540886),h=e.i(552245);let f=u.forwardRef(function(e,t){let{render:n,className:r,disabled:a=!1,focusableWhenDisabled:s=!1,nativeButton:i=!0,style:o,...l}=e,{getButtonProps:c,buttonRef:d}=(0,p.f)({disabled:a,focusableWhenDisabled:s,native:i});return(0,h.a)("button",e,{state:{disabled:a},ref:[t,d],props:[l,c]})}),m=(0,e.i(225913).f)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function x({className:e,variant:n="default",size:r="default",...a}){return(0,t.jsx)(f,{"data-slot":"button",className:(0,d.f)(m({variant:n,size:r,className:e})),...a})}var g=e.i(456420);let b={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};b.node;let v=(0,g.f)(b);function j({...e}){return(0,t.jsx)(a.f.Portal,{"data-slot":"dialog-portal",...e})}function y({className:e,...n}){return(0,t.jsx)(i.f.Backdrop,{"data-slot":"dialog-overlay",className:(0,d.f)("fixed inset-0 isolate z-50 bg-black/40 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...n})}e.s(["N",0,function({...e}){return(0,t.jsx)(n.f.Root,{"data-slot":"dialog",...e})},"d",0,function({className:e,children:n,showCloseButton:r=!0,...a}){return(0,t.jsxs)(j,{children:[(0,t.jsx)(y,{}),(0,t.jsxs)(o.f.Popup,{"data-slot":"dialog-content",className:(0,d.f)("fixed top-1/2 left-1/2 z-50 grid w-full grid-cols-[minmax(0,1fr)] max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a,children:[n,r&&(0,t.jsxs)(s.f.Close,{"data-slot":"dialog-close",render:(0,t.jsx)(x,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,t.jsx)(v,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"C",0,function({className:e,...n}){return(0,t.jsx)(c.Description,{"data-slot":"dialog-description",className:(0,d.f)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...n})},"F",0,function({className:e,...n}){return(0,t.jsx)(l.f.Title,{"data-slot":"dialog-title",className:(0,d.f)("font-heading text-base leading-none font-medium",e),...n})},"a",0,function({...e}){return(0,t.jsx)(r.Trigger,{"data-slot":"dialog-trigger",...e})}],776639)},552978,e=>{let t={dns_record:"Cloudflare",neon_branch:"Neon",supabase_project:"Supabase",firebase_project:"Firebase"};e.s(["E",0,t,"S",0,{dns_record:"DNS record",neon_branch:"Neon branch",supabase_project:"Supabase project",firebase_project:"Firebase project"},"d",0,e=>`The console can't remove this later; remove it in ${t[e]}'s dashboard.`])},70528,876195,e=>{let t=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\[\d{1,6}\])*$/,n=new Set(["__proto__","prototype","constructor"]),r=[300,3600,86400,604800],a=[300,3600,21600];e.s(["q",0,a,"Q",0,r,"v",0,function(e){return e%604800==0?604800===e?"1 week":`${e/604800} weeks`:e%86400==0?86400===e?"1 day":`${e/86400} days`:e%3600==0?`${e/3600} h`:`${Math.max(1,Math.round(e/60))} min`}],876195);let s=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;function i(e){let t=s.exec(e);if(!t)return null;let n=t.slice(1).map(Number);return n.every(e=>e<=255)?n:null}function o([e,t,n]){return 0===e||10===e||127===e||e>=224||100===e&&t>=64&&t<=127||169===e&&254===t||172===e&&t>=16&&t<=31||192===e&&0===t&&0===n||192===e&&168===t||198===e&&(18===t||19===t)}function l(e){return"https:"!==e.protocol||e.username||e.password?"scheme":""!==e.port&&"443"!==e.port?"blocked":!function(e){let t=e.trim().toLowerCase();if(t.startsWith("[")&&t.endsWith("]")){let e=function(e){let t=e.split("%")[0].toLowerCase();if(!t.includes(":"))return null;if(-1!==t.lastIndexOf(".")){let e=t.lastIndexOf(":"),n=i(t.slice(e+1));if(!n)return null;t=`${t.slice(0,e+1)}${(n[0]<<8|n[1]).toString(16)}:${(n[2]<<8|n[3]).toString(16)}`}let n=t.split("::");if(n.length>2)return null;let r=e=>""===e?[]:e.split(":"),a=r(n[0]),s=2===n.length?r(n[1]):[],o=8-a.length-s.length;if(1===n.length?0!==o:o<1)return null;let l=[...a,...Array(2===n.length?o:0).fill("0"),...s];return 8===l.length&&l.every(e=>/^[0-9a-f]{1,4}$/.test(e))?l.map(e=>parseInt(e,16)):null}(t.slice(1,-1));return!e||function(e){if(e.slice(0,6).every(e=>0===e)||e.slice(0,5).every(e=>0===e)&&65535===e[5]||e.slice(0,4).every(e=>0===e)&&65535===e[4]&&0===e[5]||100===e[0]&&65435===e[1]&&e.slice(2,6).every(e=>0===e)||100===e[0]&&65435===e[1]&&1===e[2])return!0;if(8194===e[0]){let t,n;return o([(t=e[1])>>8,255&t,(n=e[2])>>8,255&n])}return(65024&e[0])==64512||(65472&e[0])==65152||(65472&e[0])==65216||(65280&e[0])==65280}(e)}if(t.endsWith(".")&&(t=t.slice(0,-1)),!t)return!0;let n=i(t);if(n)return o(n);let r=t.slice(t.lastIndexOf(".")+1);return!(!/^(\d+|0x[0-9a-f]*)$/.test(r)&&t.includes("."))||"localhost"===t||/\.(localhost|local|internal)$/.test(t)||t.endsWith(".home.arpa")}(e.hostname)?null:"blocked"}e.i(684496);let c=[3,5,10],d=/[\u0000-\u001f\u007f-\u009f]/,u=/[­؜᠎​-‏‪-‮⁠-⁤⁦-⁩]/;e.s(["L",0,c,"G",0,function(e){return null!==e.lastStatus&&e.lastError&&!/^HTTP \d{3}( · DEPLOYMENT_NOT_FOUND)?$/.test(e.lastError)?e.lastError:null},"a",0,function(e){let t={},n=String(e?.name??""),s=n.trim().replace(/\s+/g," ");!/[\p{L}\p{N}]/u.test(s)||d.test(s)||u.test(n)?t.name="Name the job, like backup job.":s.length>60&&(t.name="Keep the name to 60 characters.");let i=Number(e?.periodS);r.includes(i)||(t.periodS="Pick how often the job runs.");let o=Number(e?.graceS);return(a.includes(o)||(t.graceS="Pick a grace time."),Object.keys(t).length)?{ok:!1,fieldErrors:t}:{ok:!0,value:{name:s,periodS:i,graceS:o}}},"X",0,function(e){let r={},a=String(e?.url??"").trim(),s=null;try{s=new URL(a)}catch{s=null}s&&s.hostname&&!(a.length>2048)&&"scheme"!==l(s)?"blocked"===l(s)&&(r.url="Use a public https address."):r.url="Enter a full https:// address.";let i=String(e?.expectedStatus??"").trim();/^[1-5]\d\d$/.test(i)||(r.expectedStatus="Enter an HTTP status between 100 and 599.");let o=Number(e?.timeoutS);c.includes(o)||(r.timeoutS="Pick a timeout.");let d=String(e?.bodyContains??"").trim(),u=String(e?.jsonPath??"").trim(),p=String(e?.jsonEquals??"").trim();return(d.length>200&&(r.bodyContains="Keep the keyword under 200 characters."),!u&&p&&(r.jsonPath="Add a JSON path for the value."),u&&(u.length>100||!function(e){if(!t.test(e))return null;let r=[];for(let t of e.matchAll(/([A-Za-z_$][\w$]*)|\[(\d+)\]/g))r.push(void 0!==t[1]?t[1]:Number(t[2]));return r.some(e=>"string"==typeof e&&n.has(e))?null:r}(u)?r.jsonPath="Use dots and [0] only, like checks.db or items[0].state.":p?p.length>200&&(r.jsonEquals="Keep the value under 200 characters."):r.jsonEquals="Enter the value it must equal.",d&&!r.bodyContains&&(r.bodyContains="Use either a keyword or a JSON field.")),Object.keys(r).length||!s)?{ok:!1,fieldErrors:r}:(s.hash="",{ok:!0,value:{url:s.toString(),expectedStatus:Number(i),timeoutMs:1e3*o,bodyContains:d||null,jsonPath:u||null,jsonEquals:u?p:null}})}],70528)},450547,212253,e=>{e.i(684496),e.i(322534),e.i(452842);let t=e=>1===e?"Auto":e%3600==0?`${e/3600} h`:e%60==0?`${e/60} min`:`${e} s`;e.s(["f",0,t],212253);let n=["A","AAAA","CNAME","TXT"],r=["A","AAAA","CNAME"],a=e=>n.includes(e),s=e=>r.includes(e),i=/^(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}$/,o=RegExp("^(?=.{1,253}$)(?:[a-z0-9_](?:[a-z0-9_-]{0,61}[a-z0-9_])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"),l=/^[\x20-\x7e]+$/,c=e=>e.trim().toLowerCase().replace(/\.$/,"");function d(e,t){let n=t.trim();return"CNAME"===e?c(n):"AAAA"===e?n.toLowerCase():n}function u(e,t){if(!a(e.type))return{ok:!1,field:"content",error:"Only A, AAAA, CNAME and TXT records can be edited here."};let n=d(e.type,String(t.content??""));if("A"===e.type&&!i.test(n))return{ok:!1,field:"content",error:"An A record needs an IPv4 address, like 76.76.21.21."};if("AAAA"===e.type&&!function(e){if(!e.includes(":")||!/^[0-9a-f:.]+$/i.test(e))return!1;try{return new URL(`http://[${e}]/`).hostname.length>2}catch{return!1}}(n))return{ok:!1,field:"content",error:"An AAAA record needs an IPv6 address, like 2606:4700::1111."};if("CNAME"===e.type){if(!o.test(n))return{ok:!1,field:"content",error:"A CNAME needs a hostname, like something.vercel-dns-017.com."};if(n===c(e.name))return{ok:!1,field:"content",error:"A CNAME can't point to itself."}}if("TXT"===e.type&&(!n||n.length>2048||!l.test(n)))return{ok:!1,field:"content",error:`TXT content is 1 to ${2048..toLocaleString("en")} printable characters on one line.`};let r=!0===t.proxied;if(r&&!s(e.type))return{ok:!1,field:"proxied",error:"Only A, AAAA and CNAME records can be proxied."};let u=t.ttl;return!Number.isInteger(u)||1!==u&&(u<60||u>86400)?{ok:!1,field:"ttl",error:`TTL is Auto or 60 to ${86400..toLocaleString("en")} seconds.`}:{ok:!0,values:{content:n,ttl:r?1:u,proxied:r}}}let p=e=>e?"Proxied":"DNS only";e.s(["k",0,1,"j",0,n,"i",0,[1,60,120,300,600,900,1800,3600,7200,18e3,43200,86400],"O",0,a,"z",0,s,"t",0,function(e,n){let r=u(e,n);if(!r.ok)return{ok:!1,error:r.error};let a=[];return d(e.type,e.content)!==r.values.content&&a.push({field:"content",before:e.content,after:r.values.content}),e.ttl!==r.values.ttl&&a.push({field:"ttl",before:t(e.ttl),after:t(r.values.ttl)}),e.proxied!==r.values.proxied&&a.push({field:"proxied",before:p(e.proxied),after:p(r.values.proxied)}),a.length?{ok:!0,values:r.values,changes:a}:{ok:!1,error:"Nothing to change."}},"V",0,u],450547)},322534,e=>{e.i(684496),e.s(["f",0,e=>`${e} item${1===e?"":"s"}`])},452842,e=>{e.i(203709),e.i(70528),e.i(684496),e.i(322534),e.s(["p",0,[["deployment","Deployment"],["monitor","Monitor"],["database","Database"],["system","System"],["action","Action"]],"X",0,{ok:"healthy",warn:"degraded",err:"down",idle:"idle",build:"building",paused:"paused",info:"info",fail:"failed",off:"off",unknown:"unknown",maint:"maintenance"},"J",0,(...e)=>`Actions for ${e.filter(Boolean).join(" ")}`],452842)}])})();
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,399582,e=>{let t=(0,e.i(33550).f)("outline","copy","Copy",[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]);e.s(["f",0,t],399582)},617708,e=>{let t=(0,e.i(33550).f)("outline","plus","Plus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);e.s(["f",0,t],617708)},225913,e=>{var t=e.i(207670);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,r=t.f;e.s(["f",0,(e,t)=>a=>{var s;if((null==t?void 0:t.variants)==null)return r(e,null==a?void 0:a.class,null==a?void 0:a.className);let{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(e=>{let t=null==a?void 0:a[e],r=null==o?void 0:o[e];if(null===t)return null;let s=n(t)||n(r);return i[e][s]}),c=a&&Object.entries(a).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return r(e,l,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...o,...c}[t]):({...o,...c})[t]===n})?[...e,n,r]:e},[]),null==a?void 0:a.class,null==a?void 0:a.className)}])},46200,e=>{var t=e.i(843476),n=e.i(146874),r=e.i(239692),a=e.i(271645),s=e.i(846696),i=e.i(428325),o=e.i(500443),l=e.i(776639);e.s(["f",0,function({trigger:e,open:c,onOpenChange:d,title:u,body:p,cta:h,danger:f=!1,onConfirm:m}){let[x,g]=(0,a.useState)(!1),b=c??x,[v,j]=(0,a.useTransition)();function y(e){void 0===c&&g(e),d?.(e)}return(0,o.useHoldRefresh)(b),(0,t.jsxs)(l.N,{open:b,onOpenChange:e=>{v||y(e)},children:[void 0!==e&&((0,a.isValidElement)(e)?(0,t.jsx)(l.a,{render:e}):(0,t.jsx)(l.a,{children:e})),(0,t.jsxs)(l.d,{className:"gap-0 p-0 sm:max-w-[640px]",showCloseButton:!1,children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,t.jsx)("span",{className:`grid size-9 shrink-0 place-items-center rounded-lg bg-sunken ${f?"text-err":"text-ink-soft"}`,children:f?(0,t.jsx)(n.f,{size:19}):(0,t.jsx)(r.f,{size:19})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(l.F,{className:"text-base",children:u}),(0,t.jsx)(l.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:p})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(i.K,{onClick:()=>y(!1),disabled:v,children:"Keep as is"}),(0,t.jsx)(i.K,{variant:f?"danger":"primary",onClick:function(){j(async()=>{try{let e=await m();e.ok?(s.c.success(e.message),y(!1)):s.c.error(e.message)}catch{s.c.error("Watchbell didn't answer. Check that it's still running, then try again.")}})},disabled:v,children:v?"Working…":h})]})]})]})}])},688656,e=>{var t=e.i(843476),n=e.i(617708),r=e.i(944971),a=e.i(271645),s=e.i(846696),i=e.i(95187);let o=(0,i.createServerReference)("60848111202254c447228629ea50004ec5411cf878",i.callServer,void 0,i.findSourceMapURL,"createOptionsAction"),l=(0,i.createServerReference)("003d8df4d48e06d5f42d5dacd472c56a2d1d0e3460",i.callServer,void 0,i.findSourceMapURL,"disconnectGoogleCreate"),c=(0,i.createServerReference)("70ef0074a7e11baeff3541d7168d42df5d341114b2",i.callServer,void 0,i.findSourceMapURL,"requestCreateAction"),d=(0,i.createServerReference)("00260d6b187b0542e0ea0a50a5272a880bad9360eb",i.callServer,void 0,i.findSourceMapURL,"startGoogleCreateConnect");var u=e.i(54131),p=e.i(46200),h=e.i(428325),f=e.i(500443),m=e.i(776639);let x=["This asks Google for the cloud-platform permission: it is broad (it can manage every Google Cloud project you own), so the console uses it only to create a project and add Firebase to it after your approval, and never to change or delete anything.","Google shows an \"unverified app\" warning because Watchbell's OAuth client isn't verified for this scope. It is your own client for your own use: choose Advanced → Go to Watchbell.","While the OAuth consent screen is in Testing mode, Google ends this grant after 7 days; connect again when a create says so. Remove it any time in your Google Account → Security → Third-party access."];r.n.notSet("GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET",!0);var g=e.i(552978);e.i(322534);var b=e.i(450547);let v=(e,t=300)=>"string"==typeof e&&e.length<=t?e:"",j=(e,t)=>({ok:!1,field:e,error:t}),y=/^(?:\*|[a-z0-9_](?:[a-z0-9_-]{0,61}[a-z0-9_])?)$/,k=/^[a-z0-9][a-z0-9-]{0,62}$/,N=/^br-[a-z0-9-]{3,60}$/,C=[["ap-southeast-1","Southeast Asia (Singapore)"],["ap-northeast-1","Northeast Asia (Tokyo)"],["ap-northeast-2","Northeast Asia (Seoul)"],["ap-southeast-2","Oceania (Sydney)"],["ap-south-1","South Asia (Mumbai)"],["ap-east-1","East Asia (Hong Kong)"],["us-east-1","East US (North Virginia)"],["us-east-2","East US (Ohio)"],["us-west-1","West US (North California)"],["us-west-2","West US (Oregon)"],["ca-central-1","Canada (Central)"],["sa-east-1","South America (São Paulo)"],["eu-west-1","West EU (Ireland)"],["eu-west-2","West EU (London)"],["eu-west-3","West EU (Paris)"],["eu-north-1","North EU (Stockholm)"],["eu-central-1","Central EU (Frankfurt)"],["eu-central-2","Central EU (Zurich)"]],w=C.map(([e])=>e),S=/^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$/,A=/^[\w-]{1,64}$/,$=/^[a-z][a-z0-9-]{4,28}[a-z0-9]$/,T=/^[A-Za-z0-9 '"!-]{4,30}$/;var _=e.i(212253);let z={dns_record:"The name must be new in this zone. Proxied is off unless you turn it on.",neon_branch:"The branch is created without a compute, so it uses no CU-hours until you wake it. Waking it later uses CU-hours (100 a month per project on the free plan).",supabase_project:"Only an organization on the free plan is allowed. The database password is generated when the Owner approves and shown once.",firebase_project:"A Google Cloud project without a billing account (the free Spark plan), then Firebase is added to it."};function E({type:e,target:n,targetName:r,onDone:i}){let l=(0,u.useMask)(),[d,p]=(0,a.useState)(null),[f,x]=(0,a.useState)(null),[C,_]=(0,a.useState)(n),[L,G]=(0,a.useState)({type:"CNAME",ttl:b.k,proxied:!1,region:"ap-southeast-1"}),[I,P]=(0,a.useState)(null),[U,F]=(0,a.useTransition)(),D=(e,t)=>G(n=>({...n,[e]:t}));(0,a.useEffect)(()=>{let t=!0;return o(e,C).then(e=>{if(t)if(e.ok&&e.data){if(p(e.data),"neon_branch"===e.data.type){let t=(e.data.branches.find(e=>e.isDefault)??e.data.branches[0])?.id??"";G(e=>({...e,parentId:e.parentId??t}))}if("supabase_project"===e.data.type){e.data.accountId&&e.data.accountId!==C&&_(e.data.accountId);let t=e.data.orgs.find(e=>e.allowed);t&&G(e=>({...e,orgSlug:t.slug}))}}else x(e.ok?"Something went wrong.":e.error)}).catch(()=>t&&x("Couldn't load the choices. Try again.")),()=>{t=!1}},[e,C]);let K=e=>I?.field===e?I.text:void 0,W=d?.type==="firebase_project"&&(!d.envReady||!d.connected);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"px-[18px] pb-2 pt-4",children:[(0,t.jsx)(m.F,{className:"text-base",children:l("text",`New ${g.S[e]}${"dns_record"===e||"neon_branch"===e?` in ${r}`:""}`)}),(0,t.jsxs)(m.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:[z[e]," This only asks: the Owner approves it with the authenticator code, then the console checks the free tier again and makes one create call at ",g.E[e],"."]})]}),(0,t.jsxs)("div",{className:"px-[18px] pt-1.5",children:[f&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(h.M,{tone:"danger",title:"Couldn't read the live choices",children:f})}),!d&&!f&&(0,t.jsx)("p",{className:"mb-3 text-[13px] text-ink-soft",children:"Reading the live choices…"}),"dns_record"===e&&(0,t.jsx)(O,{v:L,set:D,fe:K,zone:r}),"neon_branch"===e&&d?.type==="neon_branch"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"mb-3 text-[13px] text-ink-soft",children:[d.branches.length," of ",d.limit," branches used in this project."]}),(0,t.jsx)(h.O,{id:"cr-parent",label:"Copy from branch",error:K("parentId"),children:(0,t.jsx)("select",{id:"cr-parent",className:h.S,value:String(L.parentId??""),onChange:e=>D("parentId",e.target.value),children:d.branches.map(e=>(0,t.jsxs)("option",{value:e.id,children:[l("text",e.name),e.isDefault?" (default)":""]},e.id))})}),(0,t.jsx)(h.O,{id:"cr-name",label:"New branch name",error:K("name"),help:"Lower-case letters, digits and hyphens, like preview-42.",children:(0,t.jsx)("input",{id:"cr-name",className:h.S,value:String(L.name??""),maxLength:63,spellCheck:!1,autoComplete:"off",onChange:e=>D("name",e.target.value)})})]}),"supabase_project"===e&&d?.type==="supabase_project"&&(0,t.jsx)(M,{opts:d,v:L,set:D,fe:K,account:C,setAccount:_}),"firebase_project"===e&&d?.type==="firebase_project"&&(0,t.jsx)(R,{opts:d,v:L,set:D,fe:K}),I?.field==="form"&&(0,t.jsx)("p",{className:"mb-3 text-[12.5px] text-err",role:"alert",children:I.text})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(h.K,{onClick:i,disabled:U,children:"Cancel"}),(0,t.jsx)(h.K,{variant:"primary",onClick:function(){let t;(t="dns_record"===e?function(e,t){let n=e??{},r=v(n.type,10);if(!b.j.includes(r))return j("type","Only A, AAAA, CNAME and TXT records can be added here.");let a=function(e,t){let n=t.trim().toLowerCase().replace(/\.$/,""),r=e.trim().toLowerCase().replace(/\.$/,"");if(!r||!n||("@"===r?r=n:r===n||r.endsWith(`.${n}`)||(r=`${r}.${n}`),r.length>253))return null;let a=r===n?"":r.slice(0,-(n.length+1));return a&&!a.split(".").every((e,t)=>y.test(e)&&("*"!==e||0===t))?null:r}(v(n.name,260),t);if(!a)return j("name",`The name must be a host in ${t}, like shop or shop.${t}.`);let s="number"==typeof n.ttl?n.ttl:b.k,i=(0,b.V)({type:r,name:a},{content:v(n.content,4096),ttl:s,proxied:!0===n.proxied});return i.ok?{ok:!0,inputs:{zoneName:t.toLowerCase(),type:r,name:a,content:i.values.content,ttl:i.values.ttl,proxied:i.values.proxied}}:j(i.field,i.error)}(L,r):"neon_branch"===e?function(e,t){let n=e??{},r=v(n.name,80).trim();if(!k.test(r))return j("name","Use 1 to 63 lower-case letters, digits and hyphens, starting with a letter or digit.");let a=v(n.parentId,80);return N.test(a)?{ok:!0,inputs:{projectName:t,parentId:a,name:r}}:j("parentId","Pick the branch to copy from.")}(L,r):"supabase_project"===e?function(e){let t=e??{},n=v(t.orgSlug,80);if(!A.test(n))return j("orgSlug","Pick an organization.");let r=v(t.name,80).trim();if(!S.test(r))return j("name","Use 1 to 63 letters, digits, spaces, dots, hyphens or underscores.");let a=v(t.region,30);return w.includes(a)?{ok:!0,inputs:{orgSlug:n,name:r,region:a}}:j("region","Pick a region from the list.")}(L):function(e){let t=e??{},n=v(t.projectId,40).trim();if(!$.test(n)||/google|ssl|undefined|null/.test(n))return j("projectId",'6 to 30 lower-case letters, digits and hyphens, starting with a letter (Google refuses ids with "google").');let r=v(t.displayName,40).trim()||n.slice(0,30);return T.test(r)?{ok:!0,inputs:{projectId:n,displayName:r}}:j("displayName","4 to 30 letters, digits, spaces, hyphens, quotes or exclamation marks.")}(L)).ok?P(null):P({field:t.field,text:t.error}),t.ok&&F(async()=>{try{let t=await c(e,"supabase_project"===e?C:n,L);if(t.ok)s.c.success(l("text",t.message??"Asked.")),i();else{let e=t.fieldErrors?Object.keys(t.fieldErrors)[0]:"form";P({field:e,text:l("text",t.error)})}}catch{P({field:"form",text:"Watchbell didn't answer. Check that it's still running, then try again."})}})},disabled:U||!d||W,children:U?"Checking…":"Check and ask for approval"})]})]})}function O({v:e,set:n,fe:r,zone:a}){let s="TXT"!==e.type;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"grid grid-cols-[120px_minmax(0,1fr)] gap-3 max-[560px]:grid-cols-1",children:[(0,t.jsx)(h.O,{id:"cr-type",label:"Type",error:r("type"),children:(0,t.jsx)("select",{id:"cr-type",className:h.S,value:String(e.type),onChange:e=>n("type",e.target.value),children:["A","AAAA","CNAME","TXT"].map(e=>(0,t.jsx)("option",{children:e},e))})}),(0,t.jsx)(h.O,{id:"cr-name",label:"Name",error:r("name"),help:`A host in ${a}: shop becomes shop.${a}.`,children:(0,t.jsx)("input",{id:"cr-name",className:h.S,value:String(e.name??""),maxLength:253,spellCheck:!1,autoComplete:"off",onChange:e=>n("name",e.target.value)})})]}),(0,t.jsx)(h.O,{id:"cr-content",label:"Content",error:r("content"),help:"CNAME"===e.type?"For Vercel, copy the value shown on the project's Domains page.":void 0,children:(0,t.jsx)("input",{id:"cr-content",className:h.S,value:String(e.content??""),maxLength:2048,spellCheck:!1,autoComplete:"off",onChange:e=>n("content",e.target.value)})}),(0,t.jsx)(h.O,{id:"cr-ttl",label:"TTL",error:r("ttl"),children:(0,t.jsx)("select",{id:"cr-ttl",className:h.S,value:e.proxied?b.k:Number(e.ttl),disabled:!0===e.proxied,onChange:e=>n("ttl",Number(e.target.value)),children:b.i.map(e=>(0,t.jsx)("option",{value:e,children:(0,_.f)(e)},e))})}),s&&(0,t.jsxs)("label",{className:"mb-3.5 flex items-center gap-2 text-[13px]",children:[(0,t.jsx)("input",{type:"checkbox",className:"accent-brand",checked:!0===e.proxied,onChange:e=>n("proxied",e.target.checked)}),"Proxied through Cloudflare (off by default; Vercel recommends DNS only)"]})]})}function M({opts:e,v:n,set:r,fe:a,account:s,setAccount:i}){let o=(0,u.useMask)(),l=e.active>=e.limit;return(0,t.jsxs)(t.Fragment,{children:[e.accounts.length>1&&(0,t.jsx)(h.O,{id:"cr-acc",label:"Supabase account",children:(0,t.jsx)("select",{id:"cr-acc",className:h.S,value:s,onChange:e=>i(e.target.value),children:e.accounts.map(e=>(0,t.jsx)("option",{value:e.id,children:o("account",e.label)},e.id))})}),0===e.accounts.length&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(h.M,{tone:"info",title:"No Supabase account connected",children:"Connect one in Connections first."})}),e.error&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(h.M,{tone:"danger",title:"Can't create with this token",children:e.error})}),(0,t.jsxs)("p",{className:"mb-3 text-[13px] text-ink-soft",children:[e.active," of ",e.limit," active free projects in use.",l?" Pause one first; paused projects don't count.":""]}),(0,t.jsx)(h.O,{id:"cr-org",label:"Organization",error:a("orgSlug"),help:"Paid or unknown plans are refused: a project there is billed from the first hour.",children:(0,t.jsx)("select",{id:"cr-org",className:h.S,value:String(n.orgSlug??""),onChange:e=>r("orgSlug",e.target.value),children:e.orgs.map(e=>(0,t.jsxs)("option",{value:e.slug,disabled:!e.allowed,children:[o("text",e.name)," · ",e.plan??"plan unknown",e.allowed?"":" (not allowed)"]},e.slug))})}),(0,t.jsx)(h.O,{id:"cr-name",label:"Project name",error:a("name"),children:(0,t.jsx)("input",{id:"cr-name",className:h.S,value:String(n.name??""),maxLength:63,autoComplete:"off",onChange:e=>r("name",e.target.value)})}),(0,t.jsx)(h.O,{id:"cr-region",label:"Region",error:a("region"),children:(0,t.jsx)("select",{id:"cr-region",className:h.S,value:String(n.region),onChange:e=>r("region",e.target.value),children:C.map(([e,n])=>(0,t.jsxs)("option",{value:e,children:[n," · ",e]},e))})}),(0,t.jsx)("p",{className:"mb-3 text-[12.5px] text-ink-soft",children:e.scopeNote})]})}function R({opts:e,v:n,set:a,fe:s}){return e.envReady?e.connected?(0,t.jsxs)(t.Fragment,{children:[e.error&&(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(h.M,{tone:"danger",title:"Google",children:e.error})}),null!==e.projects&&(0,t.jsxs)("p",{className:"mb-3 text-[13px] text-ink-soft",children:[e.projects," active Google Cloud project",1===e.projects?"":"s",". Google's project quota without a billing account is about ",e.quotaHint," and isn't readable by API; deleted projects count for 30 days."]}),(0,t.jsx)(h.O,{id:"cr-pid",label:"Project id",error:s("projectId"),help:"6 to 30 lower-case letters, digits and hyphens. Permanent and global: pick one nobody has.",children:(0,t.jsx)("input",{id:"cr-pid",className:h.S,value:String(n.projectId??""),maxLength:30,spellCheck:!1,autoComplete:"off",onChange:e=>a("projectId",e.target.value)})}),(0,t.jsx)(h.O,{id:"cr-pname",label:"Display name",error:s("displayName"),children:(0,t.jsx)("input",{id:"cr-pname",className:h.S,value:String(n.displayName??""),maxLength:30,autoComplete:"off",onChange:e=>a("displayName",e.target.value)})})]}):(0,t.jsxs)("div",{className:"mb-3 flex flex-col gap-2",children:[(0,t.jsx)(h.M,{tone:"info",title:"Connect Google (create projects) first",children:"The Firebase service accounts are viewer-only, so creating needs your own Google grant."}),(0,t.jsx)(L,{})]}):(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(h.M,{tone:"info",title:"Google OAuth isn't set up",children:r.n.notSet("GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET",!0)})})}function L({reconnect:e=!1}){return(0,t.jsx)(p.f,{trigger:(0,t.jsx)(h.K,{size:"sm",variant:"primary",children:e?"Reconnect Google (create projects)":"Connect Google (create projects)"}),title:"Connect Google (create projects)",body:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"mb-2",children:"Google will ask you to approve one permission, separate from the Drive backup one:"}),(0,t.jsx)("p",{className:"mb-2 rounded-md border border-line bg-sunken px-3 py-2 text-ink-soft",children:"See, edit, configure, and delete your Google Cloud data (cloud-platform)."}),(0,t.jsx)("ul",{className:"list-disc space-y-1 pl-5 text-ink-soft",children:x.map(e=>(0,t.jsx)("li",{children:e},e))}),(0,t.jsxs)("p",{className:"mt-2 text-ink-soft",children:["Before the first connect, add this redirect URI to the OAuth client in the Google Cloud console: ",(0,t.jsx)("span",{className:"font-mono text-[12px]",children:"/auth/google/create/callback"})," on this site."]})]}),cta:"Continue to Google",onConfirm:async()=>{let e=await d();return e.ok&&e.data?(window.location.assign(e.data.url),{ok:!0,message:"Opening Google…"}):{ok:!1,message:e.ok?"Watchbell didn't answer. Check that it's still running, then try again.":e.error}}})}e.s(["CreateButton",0,function({type:e,target:r,targetName:s,label:i}){let[o,l]=(0,a.useState)(!1);return(0,f.useHoldRefresh)(o),(0,t.jsxs)(m.N,{open:o,onOpenChange:l,children:[(0,t.jsxs)(m.a,{render:(0,t.jsx)(h.K,{size:"sm"}),children:[(0,t.jsx)(n.f,{size:15,"aria-hidden":!0,className:"-ml-0.5 mr-1 inline"}),i]}),(0,t.jsx)(m.d,{className:"gap-0 p-0 sm:max-w-[560px]",showCloseButton:!1,children:o&&(0,t.jsx)(E,{type:e,target:r,targetName:s,onDone:()=>l(!1)})})]})},"DisconnectGoogleCreateButton",0,function(){return(0,t.jsx)(p.f,{trigger:(0,t.jsx)(h.K,{children:"Disconnect Google (create)"}),title:"Disconnect Google (create projects)?",body:"The console forgets the grant. Remove Watchbell's access in your Google Account → Security → Third-party access as well. Projects already created stay.",cta:"Disconnect",onConfirm:async()=>{let e=await l();return e.ok?{ok:!0,message:e.message??"Disconnected."}:{ok:!1,message:e.error}}})}],688656)},259871,e=>{var t=e.i(843476),n=e.i(399582),r=e.i(271645),a=e.i(846696),s=e.i(95187);let i=(0,s.createServerReference)("6095cd83c744ee2f6a79e864b58a7372ed678e3bfa",s.callServer,void 0,s.findSourceMapURL,"approveCreateAction"),o=(0,s.createServerReference)("40107597f511a0b8e3b7c576c3d90cbe805433642a",s.callServer,void 0,s.findSourceMapURL,"rejectCreateAction");var l=e.i(54131),c=e.i(46200),d=e.i(428325),u=e.i(500443),p=e.i(776639),h=e.i(552978);let f=new Set(["requested","approved","running"]),m=e=>f.has(e.status);var x=e.i(684496),g=e.i(975157);let b={requested:"Waiting for approval",approved:"Approved",running:"Creating…",done:"Created",failed:"Failed",rejected:"Rejected",expired:"Expired"};function v({items:e,owner:n,focus:r,quiet:a}){let s=(0,l.useMask)();return(0,t.jsx)("ul",{className:"divide-y divide-line",children:e.map(e=>{var i;let o;return(0,t.jsxs)("li",{id:`create-${e.id}`,className:(0,g.f)("flex flex-wrap items-center gap-x-3 gap-y-1.5 px-[18px] py-2.5",a&&"py-2 text-[13px]",r===e.id&&"bg-brand-soft"),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("b",{className:(0,g.f)("font-medium",a&&"text-ink-soft"),children:h.S[e.type]}),(0,t.jsx)(d.E,{children:h.E[e.type]}),(0,t.jsx)("span",{className:(0,g.f)("text-[12.5px]","failed"===e.status?"text-err":"text-ink-soft"),children:b[e.status]})]}),(0,t.jsx)("p",{className:"font-mono text-[12.5px] text-ink-soft [overflow-wrap:anywhere]",children:s("text",e.summary)}),"requested"===e.status&&(0,t.jsxs)("p",{className:"text-[12px] text-ink-faint",children:[e.mine?"You asked":"Another member asked"," · expires ",(i=new Date(e.expiresAt),o=(0,x.e)(i),`${o.day} ${o.month} ${o.year}, ${(0,x.U)(i)}`)]}),e.error&&"requested"!==e.status&&(0,t.jsx)("p",{className:"text-[12.5px] text-err",children:s("text",e.error)}),e.result?.id&&"done"===e.status&&(0,t.jsxs)("p",{className:"text-[12px] text-ink-faint",children:["Created: ",(0,t.jsx)("span",{className:"font-mono",children:s("text",e.result.id)}),"firebase-pending"===e.result.note?" · Firebase still needs adding in the Firebase console":""]})]}),n&&"requested"===e.status&&(0,t.jsxs)("div",{className:"flex gap-1.5",children:[(0,t.jsx)(j,{item:e}),(0,t.jsx)(y,{item:e})]})]},e.id)})})}function j({item:e}){return(0,t.jsx)(c.f,{trigger:(0,t.jsx)(d.K,{size:"sm",children:"Reject"}),title:`Reject this ${h.S[e.type]}?`,body:"Nothing is created. The person who asked can ask again.",cta:"Reject",onConfirm:async()=>{let t=await o(e.id);return t.ok?{ok:!0,message:t.message??"Rejected."}:{ok:!1,message:t.error}}})}function y({item:e}){let[n,a]=(0,r.useState)(!1);return(0,u.useHoldRefresh)(n),(0,t.jsxs)(p.N,{open:n,onOpenChange:a,children:[(0,t.jsx)(p.a,{render:(0,t.jsx)(d.K,{size:"sm",variant:"primary"}),children:"Approve…"}),(0,t.jsx)(p.d,{className:"gap-0 p-0 sm:max-w-[560px]",showCloseButton:!1,children:n&&(0,t.jsx)(k,{item:e,onDone:()=>a(!1)})})]})}function k({item:e,onDone:n}){let s=(0,l.useMask)(),[o,c]=(0,r.useState)(""),[u,f]=(0,r.useState)(null),[m,x]=(0,r.useState)(null),[g,b]=(0,r.useState)(null),[v,j]=(0,r.useTransition)();return m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"px-[18px] pb-2 pt-4",children:[(0,t.jsx)(p.F,{className:"text-base",children:"Copy the database password now"}),(0,t.jsxs)(p.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:[g," It is shown only here, only once."]})]}),(0,t.jsxs)("div",{className:"px-[18px] pt-1.5",children:[(0,t.jsx)(N,{value:m}),(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)(d.M,{tone:"warning",title:"The console doesn't keep it",children:"Save it in your password manager. If it's lost, reset it in Supabase → Project settings → Database."})})]}),(0,t.jsx)("div",{className:"flex justify-end gap-2 border-t border-line px-[18px] py-3",children:(0,t.jsx)(d.K,{variant:"primary",onClick:()=>{x(null),n()},children:"I've saved it"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"px-[18px] pb-2 pt-4",children:[(0,t.jsx)(p.F,{className:"text-base",children:s("text",`Create ${h.S[e.type]} ${e.confirmName}?`)}),(0,t.jsxs)(p.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:["The console checks the free tier at ",h.E[e.type]," again now, then makes one create call. ",(0,h.d)(e.type)]})]}),(0,t.jsxs)("div",{className:"px-[18px] pt-2",children:[(0,t.jsx)("p",{className:"mb-3 rounded-md border border-line bg-sunken px-3 py-2 font-mono text-[12.5px] [overflow-wrap:anywhere]",children:s("text",e.summary)}),(0,t.jsx)(d.O,{id:`ap-${e.id}`,label:(0,t.jsxs)(t.Fragment,{children:["Type ",(0,t.jsx)("span",{className:"font-mono",children:s("text",e.confirmName)})," to approve"]}),error:u??void 0,children:(0,t.jsx)("input",{id:`ap-${e.id}`,className:d.S,value:o,autoComplete:"off",spellCheck:!1,onChange:e=>c(e.target.value)})})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,t.jsx)(d.K,{onClick:n,disabled:v,children:"Cancel"}),(0,t.jsx)(d.K,{variant:"primary",onClick:function(){j(async()=>{try{let t=await i(e.id,o);if(!t.ok)return f(s("text",t.error));f(null),t.data?.secret?(x(t.data.secret),b(s("text",t.message??"Created."))):(a.c.success(s("text",t.message??"Created.")),n())}catch{f("Something went wrong. Check the provider's dashboard before trying again.")}})},disabled:v||o.trim()!==e.confirmName,children:v?"Checking and creating…":"Approve and create"})]})]})}function N({value:e}){let[s,i]=(0,r.useState)(!1),{shot:o}=(0,l.usePrivacy)(),[c,u]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2 rounded-md border border-line-strong bg-sunken px-3 py-2",children:[o&&!c?(0,t.jsx)("button",{type:"button",className:"min-w-0 flex-1 text-left text-[13px] text-ink-soft",onClick:()=>u(!0),children:"Hidden in screenshot mode. Click to show it."}):(0,t.jsx)("code",{className:"min-w-0 flex-1 select-all font-mono text-[13px] [overflow-wrap:anywhere]",children:e}),(0,t.jsxs)(d.K,{size:"sm",onClick:()=>{navigator.clipboard.writeText(e).then(()=>i(!0),()=>a.c.error("Copy didn't work; select the text and copy it."))},children:[(0,t.jsx)(n.f,{size:14,"aria-hidden":!0,className:"mr-1 inline"}),s?"Copied":"Copy"]})]})}e.s(["CreateRequestList",0,function({items:e,owner:n,focus:r,title:a="Waiting for approval"}){let{pending:s,finished:i}={pending:e.filter(m),finished:e.filter(e=>!m(e))};if(!s.length&&!i.length)return null;let o=s.filter(e=>"requested"===e.status).length;return(0,t.jsxs)(t.Fragment,{children:[s.length>0&&(0,t.jsx)(d.N,{title:a,meta:o?`${o} waiting`:void 0,flush:!0,children:(0,t.jsx)(v,{items:s,owner:n,focus:r})}),i.length>0&&(0,t.jsx)(d.N,{title:"Recent requests",flush:!0,children:(0,t.jsx)(v,{items:i,owner:!1,focus:r,quiet:!0})})]})}],259871)},541299,495784,e=>{var t=e.i(843476),n=e.i(271645),r=e.i(428325),a=e.i(975157);function s(e,t,n=25){let r=e.length,a=Math.max(1,Math.ceil(r/n)),i=Math.min(Math.max(Number.isFinite(t)?Math.floor(t):1,1),a),o=(i-1)*n,l=e.slice(o,o+n);return{rows:l,page:i,pages:a,from:0===r?0:o+1,to:o+l.length,total:r}}e.s(["f",0,function({page:e,pages:s,text:i,onPage:o,bleed:l=!1}){let c=(0,n.useRef)(null),d=(0,n.useRef)(null);if((0,n.useEffect)(()=>{null!==d.current&&(c.current?.querySelectorAll("button")[d.current]?.focus(),d.current=null)},[e]),s<=1)return null;let u=(e,t)=>{(e<=1||e>=s)&&(d.current=t),o(e)};return(0,t.jsxs)("div",{className:(0,a.f)("flex items-center gap-2 border-t border-line px-[18px] py-2.5 text-[12.5px] text-ink-soft",l?"-mx-[18px] -mb-4 mt-2":"max-[720px]:px-3.5"),children:[(0,t.jsx)("span",{role:"status",children:i}),(0,t.jsxs)("span",{ref:c,className:"ml-auto flex gap-1.5",children:[(0,t.jsx)(r.K,{size:"sm",className:"disabled:hover:bg-surface","aria-label":"Previous page",disabled:e<=1,onClick:()=>u(e-1,1),children:"‹ Previous"}),(0,t.jsx)(r.K,{size:"sm",className:"disabled:hover:bg-surface","aria-label":"Next page",disabled:e>=s,onClick:()=>u(e+1,0),children:"Next ›"})]})]})}],541299),e.s(["k",0,function(e,t,n,r){return r<=1?null:t>0&&null!==n?n:e[0]?.id??null},"$",0,s,"f",0,function(e,t,n,r=25){let a=null===n?0:Math.max(0,e.findIndex(e=>e.id===n)),i=s(e.slice(a),t,r);return 0===a||i.page>1?{...i,shift:a}:{...s(e,1,r),shift:0}},"z",0,function(e,t=0,n=e.total){return`${e.from+t}–${e.to+t} of ${n}`}],495784)},776639,998218,152744,e=>{var t=e.i(843476),n=e.i(526323),r=e.i(828376);e.s(["f",0,r],998218);var r=r,a=e.i(209977),s=e.i(921637),i=e.i(141708),o=e.i(593480),l=e.i(309169),c=r;e.s(["f",0,c],152744);var c=r,d=e.i(975157),u=e.i(271645),p=e.i(540886),h=e.i(552245);let f=u.forwardRef(function(e,t){let{render:n,className:r,disabled:a=!1,focusableWhenDisabled:s=!1,nativeButton:i=!0,style:o,...l}=e,{getButtonProps:c,buttonRef:d}=(0,p.f)({disabled:a,focusableWhenDisabled:s,native:i});return(0,h.a)("button",e,{state:{disabled:a},ref:[t,d],props:[l,c]})}),m=(0,e.i(225913).f)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function x({className:e,variant:n="default",size:r="default",...a}){return(0,t.jsx)(f,{"data-slot":"button",className:(0,d.f)(m({variant:n,size:r,className:e})),...a})}var g=e.i(456420);let b={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};b.node;let v=(0,g.f)(b);function j({...e}){return(0,t.jsx)(a.f.Portal,{"data-slot":"dialog-portal",...e})}function y({className:e,...n}){return(0,t.jsx)(i.f.Backdrop,{"data-slot":"dialog-overlay",className:(0,d.f)("fixed inset-0 isolate z-50 bg-black/40 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...n})}e.s(["N",0,function({...e}){return(0,t.jsx)(n.f.Root,{"data-slot":"dialog",...e})},"d",0,function({className:e,children:n,showCloseButton:r=!0,...a}){return(0,t.jsxs)(j,{children:[(0,t.jsx)(y,{}),(0,t.jsxs)(o.f.Popup,{"data-slot":"dialog-content",className:(0,d.f)("fixed top-1/2 left-1/2 z-50 grid w-full grid-cols-[minmax(0,1fr)] max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a,children:[n,r&&(0,t.jsxs)(s.f.Close,{"data-slot":"dialog-close",render:(0,t.jsx)(x,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,t.jsx)(v,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"C",0,function({className:e,...n}){return(0,t.jsx)(c.Description,{"data-slot":"dialog-description",className:(0,d.f)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...n})},"F",0,function({className:e,...n}){return(0,t.jsx)(l.f.Title,{"data-slot":"dialog-title",className:(0,d.f)("font-heading text-base leading-none font-medium",e),...n})},"a",0,function({...e}){return(0,t.jsx)(r.Trigger,{"data-slot":"dialog-trigger",...e})}],776639)},552978,e=>{let t={dns_record:"Cloudflare",neon_branch:"Neon",supabase_project:"Supabase",firebase_project:"Firebase"};e.s(["E",0,t,"S",0,{dns_record:"DNS record",neon_branch:"Neon branch",supabase_project:"Supabase project",firebase_project:"Firebase project"},"d",0,e=>`The console can't remove this later; remove it in ${t[e]}'s dashboard.`])},70528,876195,e=>{let t=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\[\d{1,6}\])*$/,n=new Set(["__proto__","prototype","constructor"]),r=[300,3600,86400,604800],a=[300,3600,21600];e.s(["q",0,a,"Q",0,r,"v",0,function(e){return e%604800==0?604800===e?"1 week":`${e/604800} weeks`:e%86400==0?86400===e?"1 day":`${e/86400} days`:e%3600==0?`${e/3600} h`:`${Math.max(1,Math.round(e/60))} min`}],876195);let s=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;function i(e){let t=s.exec(e);if(!t)return null;let n=t.slice(1).map(Number);return n.every(e=>e<=255)?n:null}function o([e,t,n]){return 0===e||10===e||127===e||e>=224||100===e&&t>=64&&t<=127||169===e&&254===t||172===e&&t>=16&&t<=31||192===e&&0===t&&0===n||192===e&&168===t||198===e&&(18===t||19===t)}function l(e){return"https:"!==e.protocol||e.username||e.password?"scheme":""!==e.port&&"443"!==e.port?"blocked":!function(e){let t=e.trim().toLowerCase();if(t.startsWith("[")&&t.endsWith("]")){let e=function(e){let t=e.split("%")[0].toLowerCase();if(!t.includes(":"))return null;if(-1!==t.lastIndexOf(".")){let e=t.lastIndexOf(":"),n=i(t.slice(e+1));if(!n)return null;t=`${t.slice(0,e+1)}${(n[0]<<8|n[1]).toString(16)}:${(n[2]<<8|n[3]).toString(16)}`}let n=t.split("::");if(n.length>2)return null;let r=e=>""===e?[]:e.split(":"),a=r(n[0]),s=2===n.length?r(n[1]):[],o=8-a.length-s.length;if(1===n.length?0!==o:o<1)return null;let l=[...a,...Array(2===n.length?o:0).fill("0"),...s];return 8===l.length&&l.every(e=>/^[0-9a-f]{1,4}$/.test(e))?l.map(e=>parseInt(e,16)):null}(t.slice(1,-1));return!e||function(e){if(e.slice(0,6).every(e=>0===e)||e.slice(0,5).every(e=>0===e)&&65535===e[5]||e.slice(0,4).every(e=>0===e)&&65535===e[4]&&0===e[5]||100===e[0]&&65435===e[1]&&e.slice(2,6).every(e=>0===e)||100===e[0]&&65435===e[1]&&1===e[2])return!0;if(8194===e[0]){let t,n;return o([(t=e[1])>>8,255&t,(n=e[2])>>8,255&n])}return(65024&e[0])==64512||(65472&e[0])==65152||(65472&e[0])==65216||(65280&e[0])==65280}(e)}if(t.endsWith(".")&&(t=t.slice(0,-1)),!t)return!0;let n=i(t);if(n)return o(n);let r=t.slice(t.lastIndexOf(".")+1);return!(!/^(\d+|0x[0-9a-f]*)$/.test(r)&&t.includes("."))||"localhost"===t||/\.(localhost|local|internal)$/.test(t)||t.endsWith(".home.arpa")}(e.hostname)?null:"blocked"}e.i(684496);let c=[3,5,10],d=/[\u0000-\u001f\u007f-\u009f]/,u=/[­؜᠎​-‏‪-‮⁠-⁤⁦-⁩]/;e.s(["L",0,c,"G",0,function(e){return null!==e.lastStatus&&e.lastError&&!/^HTTP \d{3}( · DEPLOYMENT_NOT_FOUND)?$/.test(e.lastError)?e.lastError:null},"a",0,function(e){let t={},n=String(e?.name??""),s=n.trim().replace(/\s+/g," ");!/[\p{L}\p{N}]/u.test(s)||d.test(s)||u.test(n)?t.name="Name the job, like backup job.":s.length>60&&(t.name="Keep the name to 60 characters.");let i=Number(e?.periodS);r.includes(i)||(t.periodS="Pick how often the job runs.");let o=Number(e?.graceS);return(a.includes(o)||(t.graceS="Pick a grace time."),Object.keys(t).length)?{ok:!1,fieldErrors:t}:{ok:!0,value:{name:s,periodS:i,graceS:o}}},"X",0,function(e){let r={},a=String(e?.url??"").trim(),s=null;try{s=new URL(a)}catch{s=null}s&&s.hostname&&!(a.length>2048)&&"scheme"!==l(s)?"blocked"===l(s)&&(r.url="Use a public https address."):r.url="Enter a full https:// address.";let i=String(e?.expectedStatus??"").trim();/^[1-5]\d\d$/.test(i)||(r.expectedStatus="Enter an HTTP status between 100 and 599.");let o=Number(e?.timeoutS);c.includes(o)||(r.timeoutS="Pick a timeout.");let d=String(e?.bodyContains??"").trim(),u=String(e?.jsonPath??"").trim(),p=String(e?.jsonEquals??"").trim();return(d.length>200&&(r.bodyContains="Keep the keyword under 200 characters."),!u&&p&&(r.jsonPath="Add a JSON path for the value."),u&&(u.length>100||!function(e){if(!t.test(e))return null;let r=[];for(let t of e.matchAll(/([A-Za-z_$][\w$]*)|\[(\d+)\]/g))r.push(void 0!==t[1]?t[1]:Number(t[2]));return r.some(e=>"string"==typeof e&&n.has(e))?null:r}(u)?r.jsonPath="Use dots and [0] only, like checks.db or items[0].state.":p?p.length>200&&(r.jsonEquals="Keep the value under 200 characters."):r.jsonEquals="Enter the value it must equal.",d&&!r.bodyContains&&(r.bodyContains="Use either a keyword or a JSON field.")),Object.keys(r).length||!s)?{ok:!1,fieldErrors:r}:(s.hash="",{ok:!0,value:{url:s.toString(),expectedStatus:Number(i),timeoutMs:1e3*o,bodyContains:d||null,jsonPath:u||null,jsonEquals:u?p:null}})}],70528)},450547,212253,e=>{e.i(684496),e.i(322534),e.i(452842);let t=e=>1===e?"Auto":e%3600==0?`${e/3600} h`:e%60==0?`${e/60} min`:`${e} s`;e.s(["f",0,t],212253);let n=["A","AAAA","CNAME","TXT"],r=["A","AAAA","CNAME"],a=e=>n.includes(e),s=e=>r.includes(e),i=/^(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}$/,o=RegExp("^(?=.{1,253}$)(?:[a-z0-9_](?:[a-z0-9_-]{0,61}[a-z0-9_])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"),l=/^[\x20-\x7e]+$/,c=e=>e.trim().toLowerCase().replace(/\.$/,"");function d(e,t){let n=t.trim();return"CNAME"===e?c(n):"AAAA"===e?n.toLowerCase():n}function u(e,t){if(!a(e.type))return{ok:!1,field:"content",error:"Only A, AAAA, CNAME and TXT records can be edited here."};let n=d(e.type,String(t.content??""));if("A"===e.type&&!i.test(n))return{ok:!1,field:"content",error:"An A record needs an IPv4 address, like 76.76.21.21."};if("AAAA"===e.type&&!function(e){if(!e.includes(":")||!/^[0-9a-f:.]+$/i.test(e))return!1;try{return new URL(`http://[${e}]/`).hostname.length>2}catch{return!1}}(n))return{ok:!1,field:"content",error:"An AAAA record needs an IPv6 address, like 2606:4700::1111."};if("CNAME"===e.type){if(!o.test(n))return{ok:!1,field:"content",error:"A CNAME needs a hostname, like something.vercel-dns-017.com."};if(n===c(e.name))return{ok:!1,field:"content",error:"A CNAME can't point to itself."}}if("TXT"===e.type&&(!n||n.length>2048||!l.test(n)))return{ok:!1,field:"content",error:`TXT content is 1 to ${2048..toLocaleString("en")} printable characters on one line.`};let r=!0===t.proxied;if(r&&!s(e.type))return{ok:!1,field:"proxied",error:"Only A, AAAA and CNAME records can be proxied."};let u=t.ttl;return!Number.isInteger(u)||1!==u&&(u<60||u>86400)?{ok:!1,field:"ttl",error:`TTL is Auto or 60 to ${86400..toLocaleString("en")} seconds.`}:{ok:!0,values:{content:n,ttl:r?1:u,proxied:r}}}let p=e=>e?"Proxied":"DNS only";e.s(["k",0,1,"j",0,n,"i",0,[1,60,120,300,600,900,1800,3600,7200,18e3,43200,86400],"O",0,a,"z",0,s,"t",0,function(e,n){let r=u(e,n);if(!r.ok)return{ok:!1,error:r.error};let a=[];return d(e.type,e.content)!==r.values.content&&a.push({field:"content",before:e.content,after:r.values.content}),e.ttl!==r.values.ttl&&a.push({field:"ttl",before:t(e.ttl),after:t(r.values.ttl)}),e.proxied!==r.values.proxied&&a.push({field:"proxied",before:p(e.proxied),after:p(r.values.proxied)}),a.length?{ok:!0,values:r.values,changes:a}:{ok:!1,error:"Nothing to change."}},"V",0,u],450547)},322534,e=>{e.i(684496),e.s(["O",0,e=>`${e} item${1===e?"":"s"}`,"J",0,function(e,t){let n=Math.max(0,t.getTime()-e.getTime());return n<6e4?"now":n<36e5?`${Math.floor(n/6e4)} min ago`:n<864e5?`${Math.floor(n/36e5)} h ago`:`${Math.floor(n/864e5)} d ago`}])},452842,e=>{e.i(203709),e.i(70528),e.i(684496),e.i(322534),e.s(["p",0,[["deployment","Deployment"],["monitor","Monitor"],["database","Database"],["system","System"],["action","Action"]],"X",0,{ok:"healthy",warn:"degraded",err:"down",idle:"idle",build:"building",paused:"paused",info:"info",fail:"failed",off:"off",unknown:"unknown",maint:"maintenance"},"J",0,(...e)=>`Actions for ${e.filter(Boolean).join(" ")}`],452842)}])})();