@ai-development-environment/server 0.0.35 → 0.0.36

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 (161) hide show
  1. package/package.json +1 -1
  2. package/standalone/.next/BUILD_ID +1 -1
  3. package/standalone/.next/build-manifest.json +3 -3
  4. package/standalone/.next/prerender-manifest.json +3 -3
  5. package/standalone/.next/server/app/[locale]/actions/page_client-reference-manifest.js +1 -1
  6. package/standalone/.next/server/app/[locale]/agents/[id]/page_client-reference-manifest.js +1 -1
  7. package/standalone/.next/server/app/[locale]/agents/page_client-reference-manifest.js +1 -1
  8. package/standalone/.next/server/app/[locale]/analytics-events/page_client-reference-manifest.js +1 -1
  9. package/standalone/.next/server/app/[locale]/build-data/page_client-reference-manifest.js +1 -1
  10. package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page_client-reference-manifest.js +1 -1
  11. package/standalone/.next/server/app/[locale]/builds/[buildId]/page_client-reference-manifest.js +1 -1
  12. package/standalone/.next/server/app/[locale]/builds/page_client-reference-manifest.js +1 -1
  13. package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page_client-reference-manifest.js +1 -1
  14. package/standalone/.next/server/app/[locale]/codebases/page_client-reference-manifest.js +1 -1
  15. package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page_client-reference-manifest.js +1 -1
  16. package/standalone/.next/server/app/[locale]/comments/page_client-reference-manifest.js +1 -1
  17. package/standalone/.next/server/app/[locale]/console-logs/page_client-reference-manifest.js +1 -1
  18. package/standalone/.next/server/app/[locale]/devices/[id]/page_client-reference-manifest.js +1 -1
  19. package/standalone/.next/server/app/[locale]/devices/enroll/page_client-reference-manifest.js +1 -1
  20. package/standalone/.next/server/app/[locale]/devices/page_client-reference-manifest.js +1 -1
  21. package/standalone/.next/server/app/[locale]/jira/cache/page_client-reference-manifest.js +1 -1
  22. package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  23. package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  24. package/standalone/.next/server/app/[locale]/jira/tickets/page_client-reference-manifest.js +1 -1
  25. package/standalone/.next/server/app/[locale]/jobs/[jobId]/page_client-reference-manifest.js +1 -1
  26. package/standalone/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
  27. package/standalone/.next/server/app/[locale]/provisioning-profiles/[profileId]/page_client-reference-manifest.js +1 -1
  28. package/standalone/.next/server/app/[locale]/provisioning-profiles/page_client-reference-manifest.js +1 -1
  29. package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
  30. package/standalone/.next/server/app/[locale]/pull-requests/page_client-reference-manifest.js +1 -1
  31. package/standalone/.next/server/app/[locale]/push-notifications/page_client-reference-manifest.js +1 -1
  32. package/standalone/.next/server/app/[locale]/settings/page_client-reference-manifest.js +1 -1
  33. package/standalone/.next/server/app/[locale]/skills/[skillId]/page_client-reference-manifest.js +1 -1
  34. package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page_client-reference-manifest.js +1 -1
  35. package/standalone/.next/server/app/[locale]/skills/groups/page_client-reference-manifest.js +1 -1
  36. package/standalone/.next/server/app/[locale]/skills/page_client-reference-manifest.js +1 -1
  37. package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page_client-reference-manifest.js +1 -1
  38. package/standalone/.next/server/app/[locale]/tools/page_client-reference-manifest.js +1 -1
  39. package/standalone/.next/server/app/[locale]/unified-events/page_client-reference-manifest.js +1 -1
  40. package/standalone/.next/server/app/[locale]/usage/page_client-reference-manifest.js +1 -1
  41. package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
  42. package/standalone/.next/server/app/[locale]/worktrees/page_client-reference-manifest.js +1 -1
  43. package/standalone/.next/server/app/_global-error.html +1 -1
  44. package/standalone/.next/server/app/_global-error.rsc +1 -1
  45. package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  46. package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  47. package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  48. package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  49. package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  50. package/standalone/.next/server/app/_not-found.html +1 -1
  51. package/standalone/.next/server/app/_not-found.rsc +1 -1
  52. package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  53. package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  54. package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  55. package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  56. package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  57. package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  58. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0v12ijp._.js +1 -1
  59. package/standalone/.next/server/chunks/ssr/_012q7w6._.js +1 -1
  60. package/standalone/.next/server/chunks/ssr/_07qmjrj._.js +1 -1
  61. package/standalone/.next/server/chunks/ssr/_0dquba3._.js +1 -1
  62. package/standalone/.next/server/chunks/ssr/_0t2jwg3._.js +1 -1
  63. package/standalone/.next/server/chunks/ssr/_1bzibio._.js +1 -1
  64. package/standalone/.next/server/chunks/ssr/_1h1k5ja._.js +1 -1
  65. package/standalone/.next/server/chunks/ssr/_1kle1nm._.js +1 -1
  66. package/standalone/.next/server/chunks/ssr/_1m50niy._.js +1 -1
  67. package/standalone/.next/server/chunks/ssr/_1pja493._.js +1 -1
  68. package/standalone/.next/server/chunks/ssr/_1y98hs-._.js +1 -1
  69. package/standalone/.next/server/chunks/ssr/_1z02bsk._.js +1 -1
  70. package/standalone/.next/server/chunks/ssr/src_components_agents_agent-detail_tsx_0lfa4ui._.js +2 -2
  71. package/standalone/.next/server/chunks/ssr/src_components_build-data_build-data-page_tsx_1t2rrh0._.js +2 -2
  72. package/standalone/.next/server/chunks/ssr/src_components_builds_build-detail-page_tsx_0q1lvps._.js +1 -1
  73. package/standalone/.next/server/chunks/ssr/src_components_builds_coverage-report-page_tsx_1nhwba1._.js +1 -1
  74. package/standalone/.next/server/chunks/ssr/src_components_devices_device-detail-page_tsx_1mut_l4._.js +1 -1
  75. package/standalone/.next/server/chunks/ssr/src_components_devices_devices-page_tsx_1y45lv2._.js +1 -1
  76. package/standalone/.next/server/chunks/ssr/src_components_github_pull-request-detail-page_tsx_1etlamp._.js +1 -1
  77. package/standalone/.next/server/chunks/ssr/src_components_jira_cache-page_tsx_1znt1yl._.js +1 -1
  78. package/standalone/.next/server/chunks/ssr/src_components_jira_ticket-detail-page_tsx_0vmf8nk._.js +2 -2
  79. package/standalone/.next/server/chunks/ssr/src_components_jira_tickets-page_tsx_0_ocldp._.js +1 -1
  80. package/standalone/.next/server/chunks/ssr/src_components_push-notifications_push-notifications-page_tsx_1c_b-t4._.js +1 -1
  81. package/standalone/.next/server/chunks/ssr/src_components_signing-assets_provisioning-profiles-page_tsx_1zr20o7._.js +1 -1
  82. package/standalone/.next/server/chunks/ssr/src_components_skills_skill-sync-page_tsx_15sidhb._.js +1 -1
  83. package/standalone/.next/server/chunks/ssr/src_components_skills_skills-page_tsx_0o1nlbg._.js +1 -1
  84. package/standalone/.next/server/chunks/ssr/src_components_worktrees_worktree-detail-page_tsx_1oexgu_._.js +1 -1
  85. package/standalone/.next/server/middleware-build-manifest.js +3 -3
  86. package/standalone/.next/server/pages/404.html +1 -1
  87. package/standalone/.next/server/pages/500.html +1 -1
  88. package/standalone/.next/server/server-reference-manifest.js +1 -1
  89. package/standalone/.next/server/server-reference-manifest.json +1 -1
  90. package/standalone/.next/static/chunks/{0rrwapb85e3vs.js → 0a8bo5bqge171.js} +1 -1
  91. package/standalone/.next/static/chunks/0bx-vj8k3jlsz.js +35 -0
  92. package/standalone/.next/static/chunks/{1z2n-kfxw0xxf.js → 0s_vkk_t0i4mg.js} +1 -1
  93. package/standalone/.next/static/chunks/12msdp4rhv6ti.js +7 -0
  94. package/standalone/.next/static/chunks/{1rvz2z_cov6ug.js → 15rske_fphtgw.js} +2 -2
  95. package/standalone/.next/static/chunks/19l74y4_uc81t.js +33 -0
  96. package/standalone/.next/static/chunks/{0elijgx6pfo7w.js → 1a5_4cpwnx9uu.js} +1 -1
  97. package/standalone/.next/static/chunks/1a9j-qydwrg8m.js +7 -0
  98. package/standalone/.next/static/chunks/1e-vykrs41myl.js +41 -0
  99. package/standalone/.next/static/chunks/1jwc4nasae27c.js +1 -0
  100. package/standalone/.next/static/chunks/1llwo8aslhpdp.js +1 -0
  101. package/standalone/.next/static/chunks/{2-k0gnjfr6ayw.js → 1nkkb5gu3-rhf.js} +1 -1
  102. package/standalone/.next/static/chunks/1oh9kzyxfy5ih.js +1 -0
  103. package/standalone/.next/static/chunks/1q87ulu5dp43f.js +1 -0
  104. package/standalone/.next/static/chunks/{2i8eu37_ggvr8.js → 1smbfkd1cb015.js} +10 -10
  105. package/standalone/.next/static/chunks/1ynnv9u7cfr4c.js +1 -0
  106. package/standalone/.next/static/chunks/1yx2no0f8qqs5.js +7 -0
  107. package/standalone/.next/static/chunks/{3kswwcsm5y95r.js → 1zw6r-idmbfgl.js} +1 -1
  108. package/standalone/.next/static/chunks/224rpxiffot1u.js +9 -0
  109. package/standalone/.next/static/chunks/24tqnzr1nzhom.js +1 -0
  110. package/standalone/.next/static/chunks/292r4qzwbnzg7.js +45 -0
  111. package/standalone/.next/static/chunks/{3zmi_6t6n2zhl.js → 29bdsmo8ketwt.js} +2 -2
  112. package/standalone/.next/static/chunks/{08n97leuqvfec.js → 29pirjk9q8gfx.js} +1 -1
  113. package/standalone/.next/static/chunks/{0gduhhe5i5fyj.js → 2bdfoatg4qo7w.js} +1 -1
  114. package/standalone/.next/static/chunks/{1mdi8gmbt3v4y.js → 2mzx47_wqfqf6.js} +1 -1
  115. package/standalone/.next/static/chunks/2rplo_7t3zrb9.js +1 -0
  116. package/standalone/.next/static/chunks/{0txd8z6bbq8sd.js → 2rv5r0dwu0nv6.js} +1 -1
  117. package/standalone/.next/static/chunks/2u51t_6-1w566.js +1 -0
  118. package/standalone/.next/static/chunks/{3fdxq7wzqx26o.js → 2xgehciyxxmdl.js} +1 -1
  119. package/standalone/.next/static/chunks/34pq01spesbci.js +1 -0
  120. package/standalone/.next/static/chunks/34pqiakzvfxgg.js +1 -0
  121. package/standalone/.next/static/chunks/{3g004cn7om3tw.js → 35hg231a8ig1t.js} +1 -1
  122. package/standalone/.next/static/chunks/36r84wnfwt4kn.css +1 -0
  123. package/standalone/.next/static/chunks/{11x96hq8bk827.js → 37dd1jthysw7j.js} +1 -1
  124. package/standalone/.next/static/chunks/{2cohukhgw3x39.js → 384f6qhpff4pn.js} +3 -3
  125. package/standalone/.next/static/chunks/3_xim7hqyyfr0.js +1 -0
  126. package/standalone/.next/static/chunks/3eumqpi7f1fek.js +30 -0
  127. package/standalone/.next/static/chunks/{1209uyjs06prv.js → 3hq055db_1oe4.js} +1 -1
  128. package/standalone/.next/static/chunks/3ns362pjxzs4s.js +3 -0
  129. package/standalone/.next/static/chunks/3ojl4tmmy52v4.js +29 -0
  130. package/standalone/.next/static/chunks/3sxc882-vifa-.js +10 -0
  131. package/standalone/.next/static/chunks/40k5mbsz_tzvi.js +1 -0
  132. package/standalone/.next/static/chunks/43pkxbd7uiq6-.js +33 -0
  133. package/standalone/.next/static/chunks/00vmfj3b0p_9v.js +0 -1
  134. package/standalone/.next/static/chunks/05qk7dn22ctyw.js +0 -33
  135. package/standalone/.next/static/chunks/08b5rziqjcmmv.js +0 -9
  136. package/standalone/.next/static/chunks/0hcrlyp4czqm4.js +0 -33
  137. package/standalone/.next/static/chunks/0kkylz4dfb-6-.css +0 -1
  138. package/standalone/.next/static/chunks/0ouxq2tjuuo5p.js +0 -1
  139. package/standalone/.next/static/chunks/0qslkhjg4g4wo.js +0 -1
  140. package/standalone/.next/static/chunks/0sgv58x3pi1lt.js +0 -1
  141. package/standalone/.next/static/chunks/1-uwntvgs-8hy.js +0 -7
  142. package/standalone/.next/static/chunks/175wjcrz57-r8.js +0 -3
  143. package/standalone/.next/static/chunks/1aymjnttvjkz8.js +0 -35
  144. package/standalone/.next/static/chunks/1p0jamt--jvn2.js +0 -1
  145. package/standalone/.next/static/chunks/1wm2l6ainzpua.js +0 -30
  146. package/standalone/.next/static/chunks/2aaudeflwvhrw.js +0 -1
  147. package/standalone/.next/static/chunks/2jj9hlwqhy5pr.js +0 -41
  148. package/standalone/.next/static/chunks/2ldet81o6fvx9.js +0 -7
  149. package/standalone/.next/static/chunks/2nnls3_0a15ot.js +0 -1
  150. package/standalone/.next/static/chunks/32ynps2o_ve-q.js +0 -10
  151. package/standalone/.next/static/chunks/3812zpxehpne1.js +0 -1
  152. package/standalone/.next/static/chunks/398-3q0cwr6rj.js +0 -29
  153. package/standalone/.next/static/chunks/3f0s63l_3ts3k.js +0 -1
  154. package/standalone/.next/static/chunks/3ognjxt-gne6-.js +0 -1
  155. package/standalone/.next/static/chunks/3q82abj2-3h1-.js +0 -1
  156. package/standalone/.next/static/chunks/3zux6x75u6-5-.js +0 -1
  157. package/standalone/.next/static/chunks/4260c5fq33ytz.js +0 -7
  158. package/standalone/.next/static/chunks/448r-ornlfrsf.js +0 -45
  159. /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_buildManifest.js +0 -0
  160. /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_clientMiddlewareManifest.js +0 -0
  161. /package/standalone/.next/static/{7EXYkB15Ckf6ytAAy22z6 → _yJljIblhKpKw6X4lPPg3}/_ssgManifest.js +0 -0
@@ -0,0 +1,7 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],711241)},110204,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}e.i(174080);var a=Symbol.for("radix.slottable"),n=Symbol.for("react.lazy");function i(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===n&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var s=r[" use ".trim().toString()],l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{var l;let d,c=(l=`Primitive.${n}`,(d=r.forwardRef((e,t)=>{var n;let d,c,{children:u,...p}=e,g=null,f=!1,m=[];i(u)&&"function"==typeof s&&(u=s(u._payload)),r.Children.forEach(u,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===a){f=!0;let t="child"in e.props?e.props.child:e.props.children;i(t)&&"function"==typeof s&&(t=s(t._payload)),g=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),m.push(g?.props?.children)}else m.push(e)}),g?g=r.cloneElement(g,void 0,m):!f&&1===r.Children.count(u)&&r.isValidElement(u)&&(g=u);let y=g?(n=g,(c=(d=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?n.ref:(c=(d=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?n.props.ref:n.props.ref||n.ref):void 0,x=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,a=e.map(e=>{let a=o(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():o(e[t],null)}}}}(...e),e)}(t,y);if(!g){if(u||0===u){let e,t;throw Error(f?(e=l,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=l,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return u}let h=function(e,t){let r={...t};for(let o in t){let a=e[o],n=t[o];/^on[A-Z]/.test(o)?a&&n?r[o]=(...e)=>{let t=n(...e);return a(...e),t}:a&&(r[o]=a):"style"===o?r[o]={...a,...n}:"className"===o&&(r[o]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}(p,g.props??{});return g.type!==r.Fragment&&(h.ref=t?x:y),r.cloneElement(g,h)})).displayName=`${l}.Slot`,d),u=r.forwardRef((e,r)=>{let{asChild:o,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(o?c:n,{...a,ref:r})});return u.displayName=`Primitive.${n}`,{...e,[n]:u}},{}),d=r.forwardRef((e,r)=>(0,t.jsx)(l.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));d.displayName="Label",e.s(["Label",0,d,"Root",0,d],973741);var c=e.i(973741),c=c,u=e.i(975157);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)(c.Root,{"data-slot":"label",className:(0,u.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}],110204)},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),o=e.i(975157);let a=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...n}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,o.cn)(a({variant:r}),e),...n})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,o.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:o="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":o,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardAction",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...o})},"CardContent",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...o})},"CardDescription",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...o})},"CardFooter",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...o})},"CardHeader",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...o})},"CardTitle",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...o})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),o=e.i(758379),o=o;e.s(["Spinner",0,function({className:e,...a}){return(0,t.jsx)(o.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...a})}],987968)},637611,e=>{"use strict";var t,r,o=e.i(247167);function a(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function n(e){return"object"===a(e)}function i(e,t){return e.length<124?e:t}var s=((t=s||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((r=l||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function d(e){if(!n(e))throw Error(`Message is expected to be an object, but got ${a(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${a(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${a(e.payload.query)}`);if(null!=e.payload.variables&&!n(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${a(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==a(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${a(e.payload.operationName)}`);if(null!=e.payload.extensions&&!n(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${a(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function c(e,t){return d(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return n(e)&&"code"in e&&"reason"in e}async function g(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),o=await r.json();if(!r.ok||o.errors?.length||!o.data)throw Error(o.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return o.data}let f=null;function m(){return function(e,t,r){let o=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return o;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return o}catch{}return e}(o.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,g,"controlPlaneSubscriptions",0,function(){return f??=function(t){let r,o,a,n,{url:g,connectionParams:f,lazy:m=!0,onNonLazyError:y=console.error,lazyCloseTimeout:x=0,keepAlive:h=0,disablePong:b,connectionAckWaitTimeout:v=0,retryAttempts:w=5,retryWait:j=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:C=p,on:N,webSocketImpl:E,generateID:S=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:k,jsonMessageReviver:T}=t;if(E){var $;if(!("function"==typeof($=E)&&"constructor"in $&&"CLOSED"in $&&"CLOSING"in $&&"CONNECTING"in $&&"OPEN"in $))throw Error("Invalid WebSocket implementation provided");r=E}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let D=r,R=(o={},a={on:(e,t)=>(o[e]=t,()=>{delete o[e]}),emit(e){"id"in e&&o[e.id]?.(e)}},n={connecting:N?.connecting?[N.connecting]:[],opened:N?.opened?[N.opened]:[],connected:N?.connected?[N.connected]:[],ping:N?.ping?[N.ping]:[],pong:N?.pong?[N.pong]:[],message:N?.message?[a.emit,N.message]:[a.emit],closed:N?.closed?[N.closed]:[],error:N?.error?[N.error]:[]},{onMessage:a.on,on(e,t){let r=n[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...n[e]])r(...t)}});function P(e){let t=[R.on("error",r=>{t.forEach(e=>e()),e(r)}),R.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let A,I=0,O,M=!1,_=0,z=!1;async function q(){clearTimeout(O);let[e,t]=await (A??(A=new Promise((e,t)=>(async()=>{let r,o;if(M){if(await j(_),!I)return A=void 0,t({code:1e3,reason:"All Subscriptions Gone"});_++}R.emit("connecting",M);let a=new D("function"==typeof g?await g():g,"graphql-transport-ws");function n(){isFinite(h)&&h>0&&(clearTimeout(o),o=setTimeout(()=>{a.readyState===D.OPEN&&(a.send(c({type:l.Ping})),R.emit("ping",!1,void 0))},h))}P(e=>{A=void 0,clearTimeout(r),clearTimeout(o),t(e),e instanceof u&&(a.close(4499,"Terminated"),a.onerror=null,a.onclose=null)}),a.onerror=e=>R.emit("error",e),a.onclose=e=>R.emit("closed",e),a.onopen=async()=>{try{R.emit("opened",a);let e="function"==typeof f?await f():f;if(a.readyState!==D.OPEN)return;a.send(c(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},k)),isFinite(v)&&v>0&&(r=setTimeout(()=>{a.close(s.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),n()}catch(e){R.emit("error",e),a.close(s.InternalClientError,i(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;a.onmessage=({data:t})=>{try{let o=d("string"==typeof t?JSON.parse(t,T):t);if(R.emit("message",o),"ping"===o.type||"pong"===o.type){R.emit(o.type,!0,o.payload),"pong"===o.type?n():b||(a.send(c(o.payload?{type:l.Pong,payload:o.payload}:{type:l.Pong})),R.emit("pong",!1,o.payload));return}if(p)return;if(o.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${o.type}`);clearTimeout(r),p=!0,R.emit("connected",a,o.payload,M),M=!1,_=0,e([a,new Promise((e,t)=>P(t))])}catch(e){a.onmessage=null,R.emit("error",e),a.close(s.BadResponse,i(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===D.CLOSING&&await t;let r=()=>{},o=new Promise(e=>r=e);return[e,r,Promise.race([o.then(()=>{I||(isFinite(x)&&x>0?O=setTimeout(()=>{e.readyState===D.OPEN&&e.close(1e3,"Normal Closure")},x):e.close(1e3,"Normal Closure"))}),t])]}function G(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[s.InternalServerError,s.InternalClientError,s.BadRequest,s.BadResponse,s.Unauthorized,s.SubprotocolNotAcceptable,s.SubscriberAlreadyExists,s.TooManyInitialisationRequests].includes(e.code)))throw e;if(z)return!1;if(p(e)&&1e3===e.code)return I>0;if(!w||_>=w||!C(e))throw e;return M=!0}function B(e,t){let r=S(e),o=!1,a=!1,n=()=>{I--,o=!0};return(async()=>{for(I++;;)try{let[i,s,d]=await q();if(o)return s();let u=R.onMessage(r,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:a=!0,o=!0,t.error(e.payload),n();return;case l.Complete:o=!0,n();return}});i.send(c({id:r,type:l.Subscribe,payload:e},k)),n=()=>{o||i.readyState!==D.OPEN||i.send(c({id:r,type:l.Complete},k)),I--,o=!0,s()},await d.finally(u);return}catch(e){if(!G(e))return}})().then(()=>{a||t.complete()}).catch(e=>{t.error(e)}),()=>{o||n()}}return m||(async()=>{for(I++;;)try{let[,,e]=await q();await e}catch(e){try{if(!G(e))return}catch(e){return y?.(e)}}})(),{on:R.on,subscribe:B,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},o=B(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),a=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return a.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),a.return=async()=>(o(),{done:!0,value:void 0}),a},async dispose(){if(z=!0,A){let[e]=await A;e.close(1e3,"Normal Closure")}},terminate(){A&&R.emit("closed",new u)}}}({url:m,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:o,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",o),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})})},"TableBody",0,function({className:e,...o}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...o})},"TableCell",0,function({className:e,...o}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...o})},"TableFooter",0,function({className:e,...o}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...o})},"TableHead",0,function({className:e,...o}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...o})},"TableHeader",0,function({className:e,...o}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...o})},"TableRow",0,function({className:e,...o}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...o})}])},776639,e=>{"use strict";var t=e.i(843476),r=e.i(560964),o=e.i(964053),a=e.i(519455),n=e.i(975157);function i({...e}){return(0,t.jsx)(o.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function s({className:e,...r}){return(0,t.jsx)(o.Dialog.Overlay,{className:(0,n.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),"data-slot":"dialog-overlay",...r})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(o.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:l,showCloseButton:d=!0,...c}){return(0,t.jsxs)(i,{children:[(0,t.jsx)(s,{}),(0,t.jsxs)(o.Dialog.Content,{className:(0,n.cn)("fixed top-1/2 left-1/2 z-50 grid max-h-[85dvh] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto 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-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),"data-slot":"dialog-content",...c,children:[l,d&&(0,t.jsx)(o.Dialog.Close,{asChild:!0,"data-slot":"dialog-close",children:(0,t.jsxs)(a.Button,{className:"absolute top-2 right-2",size:"icon-sm",variant:"ghost",children:[(0,t.jsx)(r.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})},"DialogDescription",0,function({className:e,...r}){return(0,t.jsx)(o.Dialog.Description,{className:(0,n.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),"data-slot":"dialog-description",...r})},"DialogFooter",0,function({className:e,showCloseButton:r=!1,children:i,...s}){return(0,t.jsxs)("div",{className:(0,n.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),"data-slot":"dialog-footer",...s,children:[i,r&&(0,t.jsx)(o.Dialog.Close,{asChild:!0,children:(0,t.jsx)(a.Button,{variant:"outline",children:"Close"})})]})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,n.cn)("flex flex-col gap-2",e),"data-slot":"dialog-header",...r})},"DialogTitle",0,function({className:e,...r}){return(0,t.jsx)(o.Dialog.Title,{className:(0,n.cn)("font-heading text-base leading-none font-medium",e),"data-slot":"dialog-title",...r})},"DialogTrigger",0,function({...e}){return(0,t.jsx)(o.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}])},77071,e=>{"use strict";let t=(0,e.i(456420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},669253,e=>{"use strict";let t=(0,e.i(456420).default)("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);e.s(["FolderTree",0,t],669253)},326099,e=>{"use strict";var t=e.i(843476),r=e.i(711241),o=e.i(669253),a=e.i(77071),n=e.i(948148),i=e.i(271645),s=e.i(929592),l=e.i(519455),d=e.i(515288),c=e.i(776639),u=e.i(793479),p=e.i(110204),g=e.i(987968),f=e.i(784774),m=e.i(520133),y=e.i(637611);e.s(["SkillGroupsPage",0,function(){let e=(0,n.useTranslations)("skills"),x=(0,m.useRouter)(),[h,b]=(0,i.useState)([]),[v,w]=(0,i.useState)(!1),[j,C]=(0,i.useState)(""),[N,E]=(0,i.useState)(!0),[S,k]=(0,i.useState)(!1),[T,$]=(0,i.useState)(null),D=(0,i.useCallback)(async()=>{try{let e=await (0,y.controlPlaneRequest)(`query SkillGroups { skillsOverview { groups {
2
+ id name createdAt updatedAt
3
+ skills { id name }
4
+ repositories { id name displayOrigin }
5
+ } } }`);b(e.skillsOverview.groups),$(null)}catch(e){$(e instanceof Error?e.message:String(e))}finally{E(!1)}},[]);(0,i.useEffect)(()=>{let e=window.setTimeout(()=>void D(),0);return()=>window.clearTimeout(e)},[D]);let R=async()=>{k(!0);try{let e=await (0,y.controlPlaneRequest)(`mutation CreateSkillGroup($input: SaveSkillGroupInput!) {
6
+ saveSkillGroup(input: $input) { id name }
7
+ }`,{input:{name:j,skillIds:[],repositoryIds:[]}});w(!1),x.push(`/skills/groups/${e.saveSkillGroup.id}`)}catch(e){$(e instanceof Error?e.message:String(e))}finally{k(!1)}};return(0,t.jsxs)("div",{className:"flex h-full min-h-0 flex-col gap-4 overflow-auto p-4 sm:p-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(l.Button,{asChild:!0,size:"icon",variant:"ghost",children:(0,t.jsx)(m.Link,{"aria-label":e("backToSkills"),href:"/skills",children:(0,t.jsx)(r.ArrowLeft,{})})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold",children:e("skillGroups")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("groupsDescription")})]})]}),(0,t.jsxs)(l.Button,{onClick:()=>w(!0),children:[(0,t.jsx)(a.Plus,{})," ",e("addGroup")]})]}),T&&(0,t.jsx)(s.Alert,{variant:"destructive",children:(0,t.jsx)(s.AlertDescription,{children:T})}),N?(0,t.jsxs)("div",{className:"flex gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(g.Spinner,{})," ",e("loadingGroups")]}):(0,t.jsxs)(d.Card,{className:"gap-0 py-0",children:[(0,t.jsxs)(d.CardHeader,{children:[(0,t.jsx)(d.CardTitle,{children:e("skillGroups")}),(0,t.jsx)(d.CardDescription,{children:e("groupsTableDescription")})]}),(0,t.jsx)(d.CardContent,{className:"px-0",children:(0,t.jsxs)(f.Table,{children:[(0,t.jsx)(f.TableHeader,{children:(0,t.jsxs)(f.TableRow,{children:[(0,t.jsx)(f.TableHead,{children:e("name")}),(0,t.jsx)(f.TableHead,{children:e("skillsCount")}),(0,t.jsx)(f.TableHead,{children:e("repositoriesCount")}),(0,t.jsx)(f.TableHead,{children:e("updated")})]})}),(0,t.jsxs)(f.TableBody,{children:[h.map(e=>(0,t.jsxs)(f.TableRow,{className:"cursor-pointer focus-visible:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",onClick:()=>x.push(`/skills/groups/${e.id}`),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),x.push(`/skills/groups/${e.id}`))},role:"link",tabIndex:0,children:[(0,t.jsx)(f.TableCell,{children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-2 font-medium text-primary",children:[(0,t.jsx)(o.FolderTree,{})," ",e.name]})}),(0,t.jsx)(f.TableCell,{children:e.skills?.length??0}),(0,t.jsx)(f.TableCell,{children:e.repositories?.length??0}),(0,t.jsx)(f.TableCell,{children:e.updatedAt?new Date(e.updatedAt).toLocaleString():"—"})]},e.id)),!h.length&&(0,t.jsx)(f.TableRow,{children:(0,t.jsx)(f.TableCell,{className:"py-10 text-center text-muted-foreground",colSpan:4,children:e("noGroups")})})]})]})})]}),(0,t.jsx)(c.Dialog,{onOpenChange:w,open:v,children:(0,t.jsxs)(c.DialogContent,{children:[(0,t.jsxs)(c.DialogHeader,{children:[(0,t.jsx)(c.DialogTitle,{children:e("newGroup")}),(0,t.jsx)(c.DialogDescription,{children:e("newGroupDescription")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p.Label,{htmlFor:"new-skill-group",children:e("name")}),(0,t.jsx)(u.Input,{id:"new-skill-group",maxLength:80,onChange:e=>C(e.target.value),value:j})]}),(0,t.jsx)(c.DialogFooter,{children:(0,t.jsxs)(l.Button,{disabled:S||!j.trim(),onClick:()=>void R(),children:[S&&(0,t.jsx)(g.Spinner,{})," ",e("createGroup")]})})]})})]})}])}]);
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),n=e.i(758379),n=n;e.s(["Spinner",0,function({className:e,...a}){return(0,t.jsx)(n.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...a})}],987968)},637611,e=>{"use strict";var t,r,n=e.i(247167);function a(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function o(e){return"object"===a(e)}function i(e,t){return e.length<124?e:t}var s=((t=s||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((r=l||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function d(e){if(!o(e))throw Error(`Message is expected to be an object, but got ${a(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${a(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!o(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!o(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${a(e.payload.query)}`);if(null!=e.payload.variables&&!o(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${a(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==a(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${a(e.payload.operationName)}`);if(null!=e.payload.extensions&&!o(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${a(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!o(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function c(e,t){return d(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return o(e)&&"code"in e&&"reason"in e}async function m(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),n=await r.json();if(!r.ok||n.errors?.length||!n.data)throw Error(n.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return n.data}let f=null;function g(){return function(e,t,r){let n=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return n;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return n}catch{}return e}(n.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,m,"controlPlaneSubscriptions",0,function(){return f??=function(t){let r,n,a,o,{url:m,connectionParams:f,lazy:g=!0,onNonLazyError:h=console.error,lazyCloseTimeout:y=0,keepAlive:b=0,disablePong:x,connectionAckWaitTimeout:v=0,retryAttempts:w=5,retryWait:k=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:j=p,on:S,webSocketImpl:E,generateID:C=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:N,jsonMessageReviver:R}=t;if(E){var I;if(!("function"==typeof(I=E)&&"constructor"in I&&"CLOSED"in I&&"CLOSING"in I&&"CONNECTING"in I&&"OPEN"in I))throw Error("Invalid WebSocket implementation provided");r=E}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let $=r,M=(n={},a={on:(e,t)=>(n[e]=t,()=>{delete n[e]}),emit(e){"id"in e&&n[e.id]?.(e)}},o={connecting:S?.connecting?[S.connecting]:[],opened:S?.opened?[S.opened]:[],connected:S?.connected?[S.connected]:[],ping:S?.ping?[S.ping]:[],pong:S?.pong?[S.pong]:[],message:S?.message?[a.emit,S.message]:[a.emit],closed:S?.closed?[S.closed]:[],error:S?.error?[S.error]:[]},{onMessage:a.on,on(e,t){let r=o[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...o[e]])r(...t)}});function T(e){let t=[M.on("error",r=>{t.forEach(e=>e()),e(r)}),M.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let P,D=0,q,A=!1,B=0,_=!1;async function O(){clearTimeout(q);let[e,t]=await (P??(P=new Promise((e,t)=>(async()=>{let r,n;if(A){if(await k(B),!D)return P=void 0,t({code:1e3,reason:"All Subscriptions Gone"});B++}M.emit("connecting",A);let a=new $("function"==typeof m?await m():m,"graphql-transport-ws");function o(){isFinite(b)&&b>0&&(clearTimeout(n),n=setTimeout(()=>{a.readyState===$.OPEN&&(a.send(c({type:l.Ping})),M.emit("ping",!1,void 0))},b))}T(e=>{P=void 0,clearTimeout(r),clearTimeout(n),t(e),e instanceof u&&(a.close(4499,"Terminated"),a.onerror=null,a.onclose=null)}),a.onerror=e=>M.emit("error",e),a.onclose=e=>M.emit("closed",e),a.onopen=async()=>{try{M.emit("opened",a);let e="function"==typeof f?await f():f;if(a.readyState!==$.OPEN)return;a.send(c(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},N)),isFinite(v)&&v>0&&(r=setTimeout(()=>{a.close(s.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),o()}catch(e){M.emit("error",e),a.close(s.InternalClientError,i(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;a.onmessage=({data:t})=>{try{let n=d("string"==typeof t?JSON.parse(t,R):t);if(M.emit("message",n),"ping"===n.type||"pong"===n.type){M.emit(n.type,!0,n.payload),"pong"===n.type?o():x||(a.send(c(n.payload?{type:l.Pong,payload:n.payload}:{type:l.Pong})),M.emit("pong",!1,n.payload));return}if(p)return;if(n.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${n.type}`);clearTimeout(r),p=!0,M.emit("connected",a,n.payload,A),A=!1,B=0,e([a,new Promise((e,t)=>T(t))])}catch(e){a.onmessage=null,M.emit("error",e),a.close(s.BadResponse,i(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===$.CLOSING&&await t;let r=()=>{},n=new Promise(e=>r=e);return[e,r,Promise.race([n.then(()=>{D||(isFinite(y)&&y>0?q=setTimeout(()=>{e.readyState===$.OPEN&&e.close(1e3,"Normal Closure")},y):e.close(1e3,"Normal Closure"))}),t])]}function z(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[s.InternalServerError,s.InternalClientError,s.BadRequest,s.BadResponse,s.Unauthorized,s.SubprotocolNotAcceptable,s.SubscriberAlreadyExists,s.TooManyInitialisationRequests].includes(e.code)))throw e;if(_)return!1;if(p(e)&&1e3===e.code)return D>0;if(!w||B>=w||!j(e))throw e;return A=!0}function F(e,t){let r=C(e),n=!1,a=!1,o=()=>{D--,n=!0};return(async()=>{for(D++;;)try{let[i,s,d]=await O();if(n)return s();let u=M.onMessage(r,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:a=!0,n=!0,t.error(e.payload),o();return;case l.Complete:n=!0,o();return}});i.send(c({id:r,type:l.Subscribe,payload:e},N)),o=()=>{n||i.readyState!==$.OPEN||i.send(c({id:r,type:l.Complete},N)),D--,n=!0,s()},await d.finally(u);return}catch(e){if(!z(e))return}})().then(()=>{a||t.complete()}).catch(e=>{t.error(e)}),()=>{n||o()}}return g||(async()=>{for(D++;;)try{let[,,e]=await O();await e}catch(e){try{if(!z(e))return}catch(e){return h?.(e)}}})(),{on:M.on,subscribe:F,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},n=F(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),a=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return a.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),a.return=async()=>(n(),{done:!0,value:void 0}),a},async dispose(){if(_=!0,P){let[e]=await P;e.close(1e3,"Normal Closure")}},terminate(){P&&M.emit("closed",new u)}}}({url:g,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(975157);let a=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...o}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,n.cn)(a({variant:r}),e),...o})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,n.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:n="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":n,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardAction",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})},"CardContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...n})},"CardFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}])},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(709840),a=e.i(975157);let o=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:i=!1,...s}){let l=i?n.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,a.cn)(o({variant:r}),e),"data-slot":"badge","data-variant":r,...s})}])},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:n,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",n),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})})},"TableBody",0,function({className:e,...n}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...n})},"TableCell",0,function({className:e,...n}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...n})},"TableFooter",0,function({className:e,...n}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...n})},"TableHead",0,function({className:e,...n}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...n})},"TableHeader",0,function({className:e,...n}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...n})},"TableRow",0,function({className:e,...n}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...n})}])},573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},648119,e=>{"use strict";var t=e.i(560972);e.s(["MoreHorizontal",()=>t.default])},725981,e=>{"use strict";let t=(0,e.i(456420).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],725981)},21357,e=>{"use strict";let t=(0,e.i(456420).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",0,t],21357)},90969,771777,866026,e=>{"use strict";e.s(["buildDuration",0,function(e,t=Date.now()){let r=e.durationMs??(e.startedAt&&null!==t&&["QUEUED","PREPARING","RUNNING"].includes(e.status)?t-Date.parse(e.startedAt):null);if(null===r||!Number.isFinite(r))return"—";let n=Math.max(0,Math.floor(r/1e3)),a=Math.floor(n/3600),o=Math.floor(n%3600/60),i=n%60;return a>0?`${a}h${o>0?` ${o}m`:""}`:o>0?`${o}m${i>0?` ${i}s`:""}`:`${i}s`},"buildSnapshotName",0,function(e){let t=e.snapshot.repository,r=e.snapshot.worktree;return{repository:t?.name??"—",worktree:r?.branch??r?.folder??"—"}},"buildStatusVariant",0,function(e){return"FAILED"===e?"destructive":"SUCCEEDED"===e?"success":"secondary"},"relativeBuildAge",0,function(e,t,r=Date.now()){if(null===r)return"—";let n=Math.round((Date.parse(e)-r)/1e3),a=new Intl.RelativeTimeFormat(t,{numeric:"auto"});for(let[e,t]of[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60]])if(Math.abs(n)>=t)return a.format(Math.round(n/t),e);return a.format(n,"second")}],90969);var t=e.i(843476),r=e.i(395925),n=e.i(948148),a=e.i(271645),o=e.i(519455),i=e.i(987968),s=e.i(462777),l=e.i(637611);e.s(["RebuildButton",0,function({buildId:e,onCompleted:d,onError:c,size:u="default"}){let p=(0,n.useTranslations)("builds"),[m,f]=(0,a.useState)(!1),g=async()=>{f(!0),c(null);try{let t=await (0,l.controlPlaneRequest)(`mutation RebuildBuild($id: ID!, $requestId: ID!) {
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),n=e.i(758379),n=n;e.s(["Spinner",0,function({className:e,...a}){return(0,t.jsx)(n.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...a})}],987968)},637611,e=>{"use strict";var t,r,n=e.i(247167);function a(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function o(e){return"object"===a(e)}function i(e,t){return e.length<124?e:t}var s=((t=s||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((r=l||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function d(e){if(!o(e))throw Error(`Message is expected to be an object, but got ${a(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${a(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!o(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!o(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${a(e.payload.query)}`);if(null!=e.payload.variables&&!o(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${a(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==a(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${a(e.payload.operationName)}`);if(null!=e.payload.extensions&&!o(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${a(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!o(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function c(e,t){return d(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return o(e)&&"code"in e&&"reason"in e}async function m(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),n=await r.json();if(!r.ok||n.errors?.length||!n.data)throw Error(n.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return n.data}let f=null;function g(){return function(e,t,r){let n=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return n;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return n}catch{}return e}(n.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,m,"controlPlaneSubscriptions",0,function(){return f??=function(t){let r,n,a,o,{url:m,connectionParams:f,lazy:g=!0,onNonLazyError:h=console.error,lazyCloseTimeout:y=0,keepAlive:b=0,disablePong:x,connectionAckWaitTimeout:v=0,retryAttempts:w=5,retryWait:k=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:j=p,on:S,webSocketImpl:E,generateID:C=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:N,jsonMessageReviver:R}=t;if(E){var I;if(!("function"==typeof(I=E)&&"constructor"in I&&"CLOSED"in I&&"CLOSING"in I&&"CONNECTING"in I&&"OPEN"in I))throw Error("Invalid WebSocket implementation provided");r=E}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let $=r,M=(n={},a={on:(e,t)=>(n[e]=t,()=>{delete n[e]}),emit(e){"id"in e&&n[e.id]?.(e)}},o={connecting:S?.connecting?[S.connecting]:[],opened:S?.opened?[S.opened]:[],connected:S?.connected?[S.connected]:[],ping:S?.ping?[S.ping]:[],pong:S?.pong?[S.pong]:[],message:S?.message?[a.emit,S.message]:[a.emit],closed:S?.closed?[S.closed]:[],error:S?.error?[S.error]:[]},{onMessage:a.on,on(e,t){let r=o[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...o[e]])r(...t)}});function T(e){let t=[M.on("error",r=>{t.forEach(e=>e()),e(r)}),M.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let P,D=0,q,A=!1,B=0,_=!1;async function O(){clearTimeout(q);let[e,t]=await (P??(P=new Promise((e,t)=>(async()=>{let r,n;if(A){if(await k(B),!D)return P=void 0,t({code:1e3,reason:"All Subscriptions Gone"});B++}M.emit("connecting",A);let a=new $("function"==typeof m?await m():m,"graphql-transport-ws");function o(){isFinite(b)&&b>0&&(clearTimeout(n),n=setTimeout(()=>{a.readyState===$.OPEN&&(a.send(c({type:l.Ping})),M.emit("ping",!1,void 0))},b))}T(e=>{P=void 0,clearTimeout(r),clearTimeout(n),t(e),e instanceof u&&(a.close(4499,"Terminated"),a.onerror=null,a.onclose=null)}),a.onerror=e=>M.emit("error",e),a.onclose=e=>M.emit("closed",e),a.onopen=async()=>{try{M.emit("opened",a);let e="function"==typeof f?await f():f;if(a.readyState!==$.OPEN)return;a.send(c(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},N)),isFinite(v)&&v>0&&(r=setTimeout(()=>{a.close(s.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),o()}catch(e){M.emit("error",e),a.close(s.InternalClientError,i(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;a.onmessage=({data:t})=>{try{let n=d("string"==typeof t?JSON.parse(t,R):t);if(M.emit("message",n),"ping"===n.type||"pong"===n.type){M.emit(n.type,!0,n.payload),"pong"===n.type?o():x||(a.send(c(n.payload?{type:l.Pong,payload:n.payload}:{type:l.Pong})),M.emit("pong",!1,n.payload));return}if(p)return;if(n.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${n.type}`);clearTimeout(r),p=!0,M.emit("connected",a,n.payload,A),A=!1,B=0,e([a,new Promise((e,t)=>T(t))])}catch(e){a.onmessage=null,M.emit("error",e),a.close(s.BadResponse,i(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===$.CLOSING&&await t;let r=()=>{},n=new Promise(e=>r=e);return[e,r,Promise.race([n.then(()=>{D||(isFinite(y)&&y>0?q=setTimeout(()=>{e.readyState===$.OPEN&&e.close(1e3,"Normal Closure")},y):e.close(1e3,"Normal Closure"))}),t])]}function z(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[s.InternalServerError,s.InternalClientError,s.BadRequest,s.BadResponse,s.Unauthorized,s.SubprotocolNotAcceptable,s.SubscriberAlreadyExists,s.TooManyInitialisationRequests].includes(e.code)))throw e;if(_)return!1;if(p(e)&&1e3===e.code)return D>0;if(!w||B>=w||!j(e))throw e;return A=!0}function F(e,t){let r=C(e),n=!1,a=!1,o=()=>{D--,n=!0};return(async()=>{for(D++;;)try{let[i,s,d]=await O();if(n)return s();let u=M.onMessage(r,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:a=!0,n=!0,t.error(e.payload),o();return;case l.Complete:n=!0,o();return}});i.send(c({id:r,type:l.Subscribe,payload:e},N)),o=()=>{n||i.readyState!==$.OPEN||i.send(c({id:r,type:l.Complete},N)),D--,n=!0,s()},await d.finally(u);return}catch(e){if(!z(e))return}})().then(()=>{a||t.complete()}).catch(e=>{t.error(e)}),()=>{n||o()}}return g||(async()=>{for(D++;;)try{let[,,e]=await O();await e}catch(e){try{if(!z(e))return}catch(e){return h?.(e)}}})(),{on:M.on,subscribe:F,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},n=F(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),a=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return a.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),a.return=async()=>(n(),{done:!0,value:void 0}),a},async dispose(){if(_=!0,P){let[e]=await P;e.close(1e3,"Normal Closure")}},terminate(){P&&M.emit("closed",new u)}}}({url:g,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(975157);let a=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...o}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,n.cn)(a({variant:r}),e),...o})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,n.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:n="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":n,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardAction",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})},"CardContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...n})},"CardFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}])},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(709840),a=e.i(975157);let o=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:i=!1,...s}){let l=i?n.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,a.cn)(o({variant:r}),e),"data-slot":"badge","data-variant":r,...s})}])},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:n,...a}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",n),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})})},"TableBody",0,function({className:e,...n}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...n})},"TableCell",0,function({className:e,...n}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...n})},"TableFooter",0,function({className:e,...n}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...n})},"TableHead",0,function({className:e,...n}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...n})},"TableHeader",0,function({className:e,...n}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...n})},"TableRow",0,function({className:e,...n}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...n})}])},573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},648119,e=>{"use strict";var t=e.i(560972);e.s(["MoreHorizontal",()=>t.default])},725981,e=>{"use strict";let t=(0,e.i(456420).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],725981)},21357,e=>{"use strict";let t=(0,e.i(456420).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",0,t],21357)},90969,771777,866026,e=>{"use strict";e.s(["buildDuration",0,function(e,t=Date.now()){let r=e.durationMs??(e.startedAt&&null!==t&&["QUEUED","PREPARING","RUNNING"].includes(e.status)?t-Date.parse(e.startedAt):null);if(null===r||!Number.isFinite(r))return"—";let n=Math.max(0,Math.floor(r/1e3)),a=Math.floor(n/3600),o=Math.floor(n%3600/60),i=n%60;return a>0?`${a}h${o>0?` ${o}m`:""}`:o>0?`${o}m${i>0?` ${i}s`:""}`:`${i}s`},"buildSnapshotName",0,function(e){let t=e.snapshot.repository,r=e.snapshot.worktree;return{repository:t?.name??"—",worktree:r?.branch??r?.folder??"—"}},"buildStatusVariant",0,function(e){return"FAILED"===e?"destructive":"SUCCEEDED"===e?"success":"secondary"},"relativeBuildAge",0,function(e,t,r=Date.now()){if(null===r)return"—";let n=Math.round((Date.parse(e)-r)/1e3),a=new Intl.RelativeTimeFormat(t,{numeric:"auto"});for(let[e,t]of[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60]])if(Math.abs(n)>=t)return a.format(Math.round(n/t),e);return a.format(n,"second")}],90969);var t=e.i(843476),r=e.i(395925),n=e.i(948148),a=e.i(271645),o=e.i(519455),i=e.i(987968),s=e.i(462777),l=e.i(637611);e.s(["RebuildButton",0,function({buildId:e,onCompleted:d,onError:c,size:u="default"}){let p=(0,n.useTranslations)("builds"),[m,f]=(0,a.useState)(!1),g=async()=>{f(!0),c(null);try{let t=await (0,l.controlPlaneRequest)(`mutation RebuildBuild($id: ID!, $requestId: ID!) {
2
2
  rebuildBuild(id: $id, requestId: $requestId) { id status }
3
3
  }`,{id:e,requestId:(0,s.createClientId)()});await d?.(t.rebuildBuild)}catch(e){c(e instanceof Error?e.message:String(e))}finally{f(!1)}};return(0,t.jsxs)(o.Button,{disabled:m,onClick:e=>{e.stopPropagation(),g()},onKeyDown:e=>e.stopPropagation(),size:u,type:"button",variant:"outline",children:[m?(0,t.jsx)(i.Spinner,{}):(0,t.jsx)(r.RotateCcw,{})," ",p("rebuild")]})}],771777);var d=e.i(716327),c=e.i(21357),u=e.i(755146);e.s(["RunBuildControls",0,function({buildId:e,destinationType:r,preferredDestination:p,onCompleted:m,onError:f,size:g="default"}){let h=(0,n.useTranslations)("builds"),y=p?.generic?null:p??null,[b,x]=(0,a.useState)(y?[y]:[]),[v,w]=(0,a.useState)(y?new Set([y.id]):new Set),[k,j]=(0,a.useState)(!1),[S,E]=(0,a.useState)(!1),[C,N]=(0,a.useState)(!1),R=(0,a.useMemo)(()=>b.filter(e=>v.has(e.id)).map(e=>e.name),[b,v]),I=async()=>{E(!0),f(null);try{let t=(await (0,l.controlPlaneRequest)(`mutation BuildRunDestinations($buildId: ID!, $requestId: ID!) {
4
4
  inspectBuildRunDestinations(buildId: $buildId, requestId: $requestId)
@@ -0,0 +1,9 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82612,e=>{"use strict";var t=e.i(843476),r=e.i(225913),a=e.i(975157);let n=(0,r.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,a.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...r})},"EmptyDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,a.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...r})},"EmptyHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,a.cn)("flex max-w-sm flex-col items-center gap-2",e),...r})},"EmptyMedia",0,function({className:e,variant:r="default",...s}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":r,className:(0,a.cn)(n({variant:r,className:e})),...s})},"EmptyTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,a.cn)("font-heading text-sm font-medium tracking-tight",e),...r})}])},711241,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],711241)},630299,e=>{"use strict";let t=(0,e.i(456420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",0,t])},867927,e=>{"use strict";var t=e.i(986253);e.s(["ChevronRight",()=>t.default])},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),a=e.i(975157);let n=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...s}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,a.cn)(n({variant:r}),e),...s})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,a.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:a="default",...n}){return(0,t.jsx)("div",{"data-slot":"card","data-size":a,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})},"CardAction",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a})},"CardContent",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...a})},"CardDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...a})},"CardFooter",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...a})},"CardHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...a})},"CardTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...a})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),a=e.i(758379),a=a;e.s(["Spinner",0,function({className:e,...n}){return(0,t.jsx)(a.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...n})}],987968)},637611,e=>{"use strict";var t,r,a=e.i(247167);function n(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function s(e){return"object"===n(e)}function o(e,t){return e.length<124?e:t}var i=((t=i||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((r=l||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function c(e){if(!s(e))throw Error(`Message is expected to be an object, but got ${n(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${n(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!s(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!s(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${n(e.payload.query)}`);if(null!=e.payload.variables&&!s(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${n(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==n(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${n(e.payload.operationName)}`);if(null!=e.payload.extensions&&!s(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${n(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!s(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function d(e,t){return c(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return s(e)&&"code"in e&&"reason"in e}async function m(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),a=await r.json();if(!r.ok||a.errors?.length||!a.data)throw Error(a.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return a.data}let g=null;function x(){return function(e,t,r){let a=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return a;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return a}catch{}return e}(a.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,m,"controlPlaneSubscriptions",0,function(){return g??=function(t){let r,a,n,s,{url:m,connectionParams:g,lazy:x=!0,onNonLazyError:h=console.error,lazyCloseTimeout:y=0,keepAlive:f=0,disablePong:v,connectionAckWaitTimeout:b=0,retryAttempts:j=5,retryWait:w=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:C=p,on:N,webSocketImpl:k,generateID:T=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:S,jsonMessageReviver:E}=t;if(k){var L;if(!("function"==typeof(L=k)&&"constructor"in L&&"CLOSED"in L&&"CLOSING"in L&&"CONNECTING"in L&&"OPEN"in L))throw Error("Invalid WebSocket implementation provided");r=k}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let $=r,A=(a={},n={on:(e,t)=>(a[e]=t,()=>{delete a[e]}),emit(e){"id"in e&&a[e.id]?.(e)}},s={connecting:N?.connecting?[N.connecting]:[],opened:N?.opened?[N.opened]:[],connected:N?.connected?[N.connected]:[],ping:N?.ping?[N.ping]:[],pong:N?.pong?[N.pong]:[],message:N?.message?[n.emit,N.message]:[n.emit],closed:N?.closed?[N.closed]:[],error:N?.error?[N.error]:[]},{onMessage:n.on,on(e,t){let r=s[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...s[e]])r(...t)}});function F(e){let t=[A.on("error",r=>{t.forEach(e=>e()),e(r)}),A.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let R,P=0,z,I=!1,M=0,B=!1;async function q(){clearTimeout(z);let[e,t]=await (R??(R=new Promise((e,t)=>(async()=>{let r,a;if(I){if(await w(M),!P)return R=void 0,t({code:1e3,reason:"All Subscriptions Gone"});M++}A.emit("connecting",I);let n=new $("function"==typeof m?await m():m,"graphql-transport-ws");function s(){isFinite(f)&&f>0&&(clearTimeout(a),a=setTimeout(()=>{n.readyState===$.OPEN&&(n.send(d({type:l.Ping})),A.emit("ping",!1,void 0))},f))}F(e=>{R=void 0,clearTimeout(r),clearTimeout(a),t(e),e instanceof u&&(n.close(4499,"Terminated"),n.onerror=null,n.onclose=null)}),n.onerror=e=>A.emit("error",e),n.onclose=e=>A.emit("closed",e),n.onopen=async()=>{try{A.emit("opened",n);let e="function"==typeof g?await g():g;if(n.readyState!==$.OPEN)return;n.send(d(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},S)),isFinite(b)&&b>0&&(r=setTimeout(()=>{n.close(i.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},b)),s()}catch(e){A.emit("error",e),n.close(i.InternalClientError,o(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;n.onmessage=({data:t})=>{try{let a=c("string"==typeof t?JSON.parse(t,E):t);if(A.emit("message",a),"ping"===a.type||"pong"===a.type){A.emit(a.type,!0,a.payload),"pong"===a.type?s():v||(n.send(d(a.payload?{type:l.Pong,payload:a.payload}:{type:l.Pong})),A.emit("pong",!1,a.payload));return}if(p)return;if(a.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${a.type}`);clearTimeout(r),p=!0,A.emit("connected",n,a.payload,I),I=!1,M=0,e([n,new Promise((e,t)=>F(t))])}catch(e){n.onmessage=null,A.emit("error",e),n.close(i.BadResponse,o(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===$.CLOSING&&await t;let r=()=>{},a=new Promise(e=>r=e);return[e,r,Promise.race([a.then(()=>{P||(isFinite(y)&&y>0?z=setTimeout(()=>{e.readyState===$.OPEN&&e.close(1e3,"Normal Closure")},y):e.close(1e3,"Normal Closure"))}),t])]}function O(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[i.InternalServerError,i.InternalClientError,i.BadRequest,i.BadResponse,i.Unauthorized,i.SubprotocolNotAcceptable,i.SubscriberAlreadyExists,i.TooManyInitialisationRequests].includes(e.code)))throw e;if(B)return!1;if(p(e)&&1e3===e.code)return P>0;if(!j||M>=j||!C(e))throw e;return I=!0}function _(e,t){let r=T(e),a=!1,n=!1,s=()=>{P--,a=!0};return(async()=>{for(P++;;)try{let[o,i,c]=await q();if(a)return i();let u=A.onMessage(r,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:n=!0,a=!0,t.error(e.payload),s();return;case l.Complete:a=!0,s();return}});o.send(d({id:r,type:l.Subscribe,payload:e},S)),s=()=>{a||o.readyState!==$.OPEN||o.send(d({id:r,type:l.Complete},S)),P--,a=!0,i()},await c.finally(u);return}catch(e){if(!O(e))return}})().then(()=>{n||t.complete()}).catch(e=>{t.error(e)}),()=>{a||s()}}return x||(async()=>{for(P++;;)try{let[,,e]=await q();await e}catch(e){try{if(!O(e))return}catch(e){return h?.(e)}}})(),{on:A.on,subscribe:_,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},a=_(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),n=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return n.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),n.return=async()=>(a(),{done:!0,value:void 0}),n},async dispose(){if(B=!0,R){let[e]=await R;e.close(1e3,"Normal Closure")}},terminate(){R&&A.emit("closed",new u)}}}({url:x,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),a=e.i(709840),n=e.i(975157);let s=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:o=!1,...i}){let l=o?a.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,n.cn)(s({variant:r}),e),"data-slot":"badge","data-variant":r,...i})}])},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:a,...n}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",a),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...n})})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...a})},"TableFooter",0,function({className:e,...a}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...a})},"TableHead",0,function({className:e,...a}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...a})},"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...a})}])},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},986253,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},716327,e=>{"use strict";var t=e.i(26495);e.s(["ChevronDown",()=>t.default])},566595,e=>{"use strict";var t=e.i(630299);e.s(["Search",()=>t.default])},635416,96892,e=>{"use strict";var t=e.i(456420);let r=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,r],635416);let a=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,a],96892)},491881,e=>{"use strict";var t=e.i(843476),r=e.i(635416),a=e.i(711241),n=e.i(96892);let s=(0,e.i(456420).default)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);var o=e.i(716327),i=e.i(867927),l=e.i(566595),c=e.i(861745),d=e.i(948148),u=e.i(271645),p=e.i(929592),m=e.i(487486),g=e.i(519455),x=e.i(515288),h=e.i(82612),y=e.i(793479),f=e.i(987968),v=e.i(784774),b=e.i(520133),j=e.i(637611);function w(e){return Math.max(0,e.executableLines-e.coveredLines)}function C(e,t){let r=e.replaceAll("\\","/"),a=t?.replaceAll("\\","/").replace(/\/$/,"");return a?r===a?".":r.startsWith(`${a}/`)?r.slice(a.length+1):r:r}function N({activeSort:e,align:r="left",ariaLabel:a,label:n,onSort:s,sortKey:o}){let i=e.key===o;return(0,t.jsx)(k,{active:i,align:r,ariaLabel:a,direction:e.direction,label:n,onSort:()=>s(o)})}function k({active:e,align:a,ariaLabel:o,direction:i,label:l,onSort:c}){return(0,t.jsx)(v.TableHead,{"aria-sort":e?"asc"===i?"ascending":"descending":"none",className:"h-8 px-2",children:(0,t.jsxs)(g.Button,{"aria-label":o,className:`-mx-2 h-7 px-2 text-xs ${"right"===a?"w-[calc(100%+1rem)] justify-end":"justify-start"}`,onClick:c,size:"sm",title:o,type:"button",variant:"ghost",children:[l,e?"asc"===i?(0,t.jsx)(n.ArrowUp,{}):(0,t.jsx)(r.ArrowDown,{}):(0,t.jsx)(s,{})]})})}function T({value:e,percent:r,size:a="compact"}){if("number"!=typeof e)return(0,t.jsx)(t.Fragment,{children:"—"});let n=Math.max(0,Math.min(1,e));return(0,t.jsxs)("span",{className:`inline-flex items-center justify-end tabular-nums ${"metric"===a?"gap-2 text-2xl font-semibold":"gap-1.5"}`,children:[r(e),(0,t.jsx)("span",{"aria-hidden":"true",className:`${"metric"===a?"size-7":"size-3.5"} shrink-0 rounded-full ring-1 ring-foreground/10 ${n>=.8?"text-emerald-500":n>=.5?"text-amber-500":"text-red-500"}`,"data-coverage-indicator":!0,style:{background:`conic-gradient(currentColor ${360*n}deg, var(--muted) 0deg)`}})]})}function S({label:e,percentage:r,value:a}){return(0,t.jsx)(x.Card,{children:(0,t.jsxs)(x.CardContent,{children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"mt-1",children:"number"==typeof r?(0,t.jsx)(T,{percent:()=>a,size:"metric",value:r}):(0,t.jsx)("p",{className:"text-2xl font-semibold tabular-nums",children:a})})]})})}function E({coverageFiles:e,files:r,percent:a,worktreeFolder:n}){let s=(0,d.useTranslations)("builds"),o=(0,c.useLocale)(),[i,p]=(0,u.useState)(""),[m,g]=(0,u.useState)({key:"filename",direction:"asc"}),x=r.map(t=>{var r;let a=C(t.path,n),s=e.filter(e=>C(e.path,n)===a);return{...t,displayName:s[0]?.name??(r=a).replaceAll("\\","/").split("/").filter(Boolean).at(-1)??r,displayPath:a}}).filter(e=>`${e.displayName} ${e.displayPath} ${e.changeType??""}`.toLocaleLowerCase().includes(i.trim().toLocaleLowerCase())).toSorted((e,t)=>{let r=(e,t)=>e.localeCompare(t,o,{numeric:!0,sensitivity:"base"}),a=0;return 0!==(a="filename"===m.key?r(e.displayName,t.displayName)||r(e.displayPath,t.displayPath):"changeType"===m.key?r(e.changeType??"",t.changeType??""):"coveredLines"===m.key?e.changedCoveredLines-t.changedCoveredLines:(e.changedLineCoverage??-1)-(t.changedLineCoverage??-1))?"asc"===m.direction?a:-a:r(e.displayPath,t.displayPath)}),h=e=>{g(t=>t.key===e?{key:e,direction:"asc"===t.direction?"desc":"asc"}:{key:e,direction:"coveredLines"===e||"lineCoverage"===e?"desc":"asc"})};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"relative max-w-xl",children:[(0,t.jsx)(l.Search,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(y.Input,{"aria-label":s("searchChangedCoverageFiles"),className:"pl-9",onChange:e=>p(e.target.value),placeholder:s("searchChangedCoverageFiles"),value:i})]}),(0,t.jsx)("div",{className:"overflow-auto rounded-md border",children:(0,t.jsxs)(v.Table,{"aria-label":s("changedFilesCoverage"),className:"text-xs",children:[(0,t.jsx)(v.TableHeader,{children:(0,t.jsxs)(v.TableRow,{children:[(0,t.jsx)(L,{activeSort:m,ariaLabel:s("sortCoverageFiles",{column:s("coverageFile")}),label:s("coverageFile"),onSort:h,sortKey:"filename"}),(0,t.jsx)(L,{activeSort:m,ariaLabel:s("sortCoverageFiles",{column:s("changeType")}),label:s("changeType"),onSort:h,sortKey:"changeType"}),(0,t.jsx)(L,{activeSort:m,align:"right",ariaLabel:s("sortCoverageFiles",{column:s("coveredLines")}),label:s("coveredLines"),onSort:h,sortKey:"coveredLines"}),(0,t.jsx)(L,{activeSort:m,align:"right",ariaLabel:s("sortCoverageFiles",{column:s("coverage")}),label:s("coverage"),onSort:h,sortKey:"lineCoverage"})]})}),(0,t.jsx)(v.TableBody,{children:x.map(e=>(0,t.jsxs)(v.TableRow,{children:[(0,t.jsx)(v.TableCell,{className:"max-w-xl px-2 py-1.5",children:(0,t.jsxs)("div",{className:"flex min-w-0 items-baseline gap-2",children:[(0,t.jsx)("span",{className:"shrink-0 font-medium",children:e.displayName}),(0,t.jsx)("span",{className:"min-w-0 truncate font-mono text-muted-foreground",title:e.path,children:e.displayPath})]})}),(0,t.jsx)(v.TableCell,{className:"px-2 py-1.5",children:e.changeType??"—"}),(0,t.jsxs)(v.TableCell,{className:"px-2 py-1.5 text-right",children:[e.changedCoveredLines," / ",e.changedExecutableLines]}),(0,t.jsx)(v.TableCell,{className:"px-2 py-1.5 text-right",children:(0,t.jsx)(T,{percent:a,value:e.changedLineCoverage})})]},e.path))})]})})]})}function L({activeSort:e,align:r="left",ariaLabel:a,label:n,onSort:s,sortKey:o}){let i=e.key===o;return(0,t.jsx)(k,{active:i,align:r,ariaLabel:a,direction:e.direction,label:n,onSort:()=>s(o)})}e.s(["CoverageReportPage",0,function({buildId:e}){let r=(0,d.useTranslations)("builds"),n=(0,c.useLocale)(),[s,k]=(0,u.useState)(null),[L,$]=(0,u.useState)(e),[A,F]=(0,u.useState)(null),[R,P]=(0,u.useState)(!0),[z,I]=(0,u.useState)(null),[M,B]=(0,u.useState)(""),[q,O]=(0,u.useState)(!1),[_,D]=(0,u.useState)({key:"filename",direction:"asc"}),H=(0,u.useCallback)(async()=>{try{let t=await (0,j.controlPlaneRequest)(`query CoverageReport($id: ID!) {
2
+ build(id: $id) {
3
+ id snapshot
4
+ reports {
5
+ id kind source status summary data error createdAt updatedAt finishedAt
6
+ artifact { id kind relativePath sizeBytes checksum metadata createdAt }
7
+ }
8
+ }
9
+ }`,{id:e}),r=t.build?.reports.find(e=>"CODE_COVERAGE"===e.kind);k(r??null);let a=t.build?.snapshot.configuration,n=t.build?.snapshot.worktree;$(a?.name??e),F(n?.folder??null),I(null)}catch(e){I(e instanceof Error?e.message:String(e))}finally{P(!1)}},[e]);(0,u.useEffect)(()=>{let e=window.setTimeout(()=>void H(),0);return()=>window.clearTimeout(e)},[H]);let K=(0,u.useMemo)(()=>Array.isArray(s?.data.files)?s.data.files:[],[s]),U=(0,u.useMemo)(()=>{let e=K.filter(e=>`${e.target} ${e.name} ${C(e.path,A)}`.toLocaleLowerCase().includes(M.trim().toLocaleLowerCase())),t=(e,t)=>e.localeCompare(t,n,{numeric:!0,sensitivity:"base"});return e.toSorted((e,r)=>{let a=0;return 0!==(a="filename"===_.key?t(e.name,r.name):"target"===_.key?t(e.target,r.target):"lineCoverage"===_.key?e.lineCoverage-r.lineCoverage:w(e)-w(r))?"asc"===_.direction?a:-a:t(e.name,r.name)||t(e.target,r.target)||t(e.path,r.path)})},[n,K,M,_,A]),W=Array.isArray(s?.data.changedFiles)?s.data.changedFiles:[],G=e=>"number"==typeof e?new Intl.NumberFormat(n,{style:"percent",maximumFractionDigits:1}).format(e):"—",V=e=>{D(t=>t.key===e?{key:e,direction:"asc"===t.direction?"desc":"asc"}:{key:e,direction:"lineCoverage"===e||"uncoveredLines"===e?"desc":"asc"})};return R?(0,t.jsxs)("p",{className:"mx-auto flex max-w-6xl items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(f.Spinner,{})," ",r("loadingCoverageReport")]}):s?(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-7xl flex-col gap-5",children:[(0,t.jsx)("div",{children:(0,t.jsx)(g.Button,{asChild:!0,className:"-ml-2",size:"sm",variant:"ghost",children:(0,t.jsxs)(b.Link,{href:`/builds/${e}`,children:[(0,t.jsx)(a.ArrowLeft,{})," ",r("backToBuild")]})})}),z&&(0,t.jsx)(p.Alert,{variant:"destructive",children:(0,t.jsx)(p.AlertDescription,{children:z})}),s.error&&(0,t.jsx)(p.Alert,{variant:"destructive",children:(0,t.jsx)(p.AlertDescription,{children:s.error})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:r("coverageReport")}),(0,t.jsx)("h1",{className:"text-2xl font-semibold",children:L})]}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[(0,t.jsx)(S,{label:r("overallCoverage"),percentage:s.summary.lineCoverage,value:G(s.summary.lineCoverage)}),(0,t.jsx)(S,{label:r("coveredLines"),value:String(s.summary.coveredLines??0)}),(0,t.jsx)(S,{label:r("executableLines"),value:String(s.summary.executableLines??0)}),(0,t.jsx)(S,{label:r("changedCoverage"),percentage:s.summary.changedLineCoverage,value:G(s.summary.changedLineCoverage)})]}),W.length>0&&(0,t.jsxs)(x.Card,{children:[(0,t.jsx)(x.CardHeader,{children:(0,t.jsx)(x.CardTitle,{children:r("changedFilesCoverage")})}),(0,t.jsx)(x.CardContent,{children:(0,t.jsx)(E,{coverageFiles:K,files:W,percent:G,worktreeFolder:A})})]}),(0,t.jsxs)(x.Card,{className:"gap-0 py-0",children:[(0,t.jsx)(x.CardHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(g.Button,{"aria-expanded":q,className:"-m-2 h-auto min-w-0 flex-1 justify-start p-2 text-left aria-expanded:bg-transparent aria-expanded:hover:bg-muted dark:aria-expanded:bg-transparent dark:aria-expanded:hover:bg-muted/50",onClick:()=>O(e=>!e),type:"button",variant:"ghost",children:(0,t.jsx)("span",{className:"truncate font-medium",children:r("allCoverageFiles")})}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(m.Badge,{children:K.length}),(0,t.jsx)(g.Button,{"aria-expanded":q,"aria-label":r(q?"collapseCoverageFiles":"expandCoverageFiles"),onClick:()=>O(e=>!e),size:"icon-sm",title:r(q?"collapseCoverageFiles":"expandCoverageFiles"),type:"button",variant:"ghost",children:q?(0,t.jsx)(o.ChevronDown,{className:"size-5"}):(0,t.jsx)(i.ChevronRight,{className:"size-5"})})]})]})}),q&&(0,t.jsxs)(x.CardContent,{className:"space-y-4 py-4",children:[(0,t.jsxs)("div",{className:"relative max-w-xl",children:[(0,t.jsx)(l.Search,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(y.Input,{"aria-label":r("searchCoverageFiles"),className:"pl-9",onChange:e=>B(e.target.value),placeholder:r("searchCoverageFiles"),value:M})]}),(0,t.jsx)("div",{className:"overflow-auto rounded-md border",children:(0,t.jsxs)(v.Table,{"aria-label":r("allCoverageFiles"),className:"min-w-[60rem] text-xs",children:[(0,t.jsx)(v.TableHeader,{children:(0,t.jsxs)(v.TableRow,{children:[(0,t.jsx)(N,{activeSort:_,ariaLabel:r("sortCoverageFiles",{column:r("coverageTarget")}),label:r("coverageTarget"),onSort:V,sortKey:"target"}),(0,t.jsx)(N,{activeSort:_,ariaLabel:r("sortCoverageFiles",{column:r("coverageFile")}),label:r("coverageFile"),onSort:V,sortKey:"filename"}),(0,t.jsx)(v.TableHead,{className:"h-8 px-2 text-right",children:r("coveredLines")}),(0,t.jsx)(N,{activeSort:_,align:"right",ariaLabel:r("sortCoverageFiles",{column:r("uncoveredLines")}),label:r("uncoveredLines"),onSort:V,sortKey:"uncoveredLines"}),(0,t.jsx)(N,{activeSort:_,align:"right",ariaLabel:r("sortCoverageFiles",{column:r("coverage")}),label:r("coverage"),onSort:V,sortKey:"lineCoverage"})]})}),(0,t.jsx)(v.TableBody,{children:U.map((e,r)=>(0,t.jsxs)(v.TableRow,{children:[(0,t.jsx)(v.TableCell,{className:"px-2 py-1.5",children:(0,t.jsx)(m.Badge,{variant:"outline",children:e.target})}),(0,t.jsx)(v.TableCell,{className:"max-w-xl px-2 py-1.5",children:(0,t.jsxs)("div",{className:"flex min-w-0 items-baseline gap-2",children:[(0,t.jsx)("span",{className:"shrink-0 font-medium",children:e.name}),(0,t.jsx)("span",{className:"min-w-0 truncate font-mono text-muted-foreground",title:e.path,children:C(e.path,A)})]})}),(0,t.jsxs)(v.TableCell,{className:"px-2 py-1.5 text-right tabular-nums",children:[e.coveredLines," / ",e.executableLines]}),(0,t.jsx)(v.TableCell,{className:"px-2 py-1.5 text-right tabular-nums",children:w(e)}),(0,t.jsx)(v.TableCell,{className:"px-2 py-1.5 text-right font-medium",children:(0,t.jsx)(T,{percent:G,value:e.lineCoverage})})]},`${e.target}:${e.path}:${r}`))})]})})]})]})]}):(0,t.jsxs)(h.Empty,{className:"mx-auto max-w-6xl border py-12",children:[(0,t.jsxs)(h.EmptyHeader,{children:[(0,t.jsx)(h.EmptyTitle,{children:r("coverageReportNotFound")}),(0,t.jsx)(h.EmptyDescription,{children:r("coverageReportNotFoundDescription")})]}),(0,t.jsx)(g.Button,{asChild:!0,variant:"outline",children:(0,t.jsxs)(b.Link,{href:`/builds/${e}`,children:[(0,t.jsx)(a.ArrowLeft,{})," ",r("backToBuild")]})})]})}],491881)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),o=e.i(975157);let a=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...n}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,o.cn)(a({variant:r}),e),...n})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,o.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:o="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":o,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})},"CardAction",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...o})},"CardContent",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...o})},"CardDescription",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...o})},"CardFooter",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...o})},"CardHeader",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...o})},"CardTitle",0,function({className:e,...o}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...o})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),o=e.i(758379),o=o;e.s(["Spinner",0,function({className:e,...a}){return(0,t.jsx)(o.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...a})}],987968)},637611,e=>{"use strict";var t,r,o=e.i(247167);function a(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function n(e){return"object"===a(e)}function s(e,t){return e.length<124?e:t}var i=((t=i||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),d=((r=d||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function c(e){if(!n(e))throw Error(`Message is expected to be an object, but got ${a(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${a(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${a(e.payload.query)}`);if(null!=e.payload.variables&&!n(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${a(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==a(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${a(e.payload.operationName)}`);if(null!=e.payload.extensions&&!n(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${a(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!n(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${a(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${a(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function l(e,t){return c(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return n(e)&&"code"in e&&"reason"in e}async function g(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),o=await r.json();if(!r.ok||o.errors?.length||!o.data)throw Error(o.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return o.data}let m=null;function y(){return function(e,t,r){let o=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return o;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return o}catch{}return e}(o.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,g,"controlPlaneSubscriptions",0,function(){return m??=function(t){let r,o,a,n,{url:g,connectionParams:m,lazy:y=!0,onNonLazyError:f=console.error,lazyCloseTimeout:b=0,keepAlive:h=0,disablePong:x,connectionAckWaitTimeout:v=0,retryAttempts:w=5,retryWait:E=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:S=p,on:j,webSocketImpl:N,generateID:C=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:I,jsonMessageReviver:$}=t;if(N){var T;if(!("function"==typeof(T=N)&&"constructor"in T&&"CLOSED"in T&&"CLOSING"in T&&"CONNECTING"in T&&"OPEN"in T))throw Error("Invalid WebSocket implementation provided");r=N}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let k=r,A=(o={},a={on:(e,t)=>(o[e]=t,()=>{delete o[e]}),emit(e){"id"in e&&o[e.id]?.(e)}},n={connecting:j?.connecting?[j.connecting]:[],opened:j?.opened?[j.opened]:[],connected:j?.connected?[j.connected]:[],ping:j?.ping?[j.ping]:[],pong:j?.pong?[j.pong]:[],message:j?.message?[a.emit,j.message]:[a.emit],closed:j?.closed?[j.closed]:[],error:j?.error?[j.error]:[]},{onMessage:a.on,on(e,t){let r=n[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...n[e]])r(...t)}});function O(e){let t=[A.on("error",r=>{t.forEach(e=>e()),e(r)}),A.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let q,B=0,D,L=!1,R=0,P=!1;async function _(){clearTimeout(D);let[e,t]=await (q??(q=new Promise((e,t)=>(async()=>{let r,o;if(L){if(await E(R),!B)return q=void 0,t({code:1e3,reason:"All Subscriptions Gone"});R++}A.emit("connecting",L);let a=new k("function"==typeof g?await g():g,"graphql-transport-ws");function n(){isFinite(h)&&h>0&&(clearTimeout(o),o=setTimeout(()=>{a.readyState===k.OPEN&&(a.send(l({type:d.Ping})),A.emit("ping",!1,void 0))},h))}O(e=>{q=void 0,clearTimeout(r),clearTimeout(o),t(e),e instanceof u&&(a.close(4499,"Terminated"),a.onerror=null,a.onclose=null)}),a.onerror=e=>A.emit("error",e),a.onclose=e=>A.emit("closed",e),a.onopen=async()=>{try{A.emit("opened",a);let e="function"==typeof m?await m():m;if(a.readyState!==k.OPEN)return;a.send(l(e?{type:d.ConnectionInit,payload:e}:{type:d.ConnectionInit},I)),isFinite(v)&&v>0&&(r=setTimeout(()=>{a.close(i.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),n()}catch(e){A.emit("error",e),a.close(i.InternalClientError,s(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;a.onmessage=({data:t})=>{try{let o=c("string"==typeof t?JSON.parse(t,$):t);if(A.emit("message",o),"ping"===o.type||"pong"===o.type){A.emit(o.type,!0,o.payload),"pong"===o.type?n():x||(a.send(l(o.payload?{type:d.Pong,payload:o.payload}:{type:d.Pong})),A.emit("pong",!1,o.payload));return}if(p)return;if(o.type!==d.ConnectionAck)throw Error(`First message cannot be of type ${o.type}`);clearTimeout(r),p=!0,A.emit("connected",a,o.payload,L),L=!1,R=0,e([a,new Promise((e,t)=>O(t))])}catch(e){a.onmessage=null,A.emit("error",e),a.close(i.BadResponse,s(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===k.CLOSING&&await t;let r=()=>{},o=new Promise(e=>r=e);return[e,r,Promise.race([o.then(()=>{B||(isFinite(b)&&b>0?D=setTimeout(()=>{e.readyState===k.OPEN&&e.close(1e3,"Normal Closure")},b):e.close(1e3,"Normal Closure"))}),t])]}function J(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[i.InternalServerError,i.InternalClientError,i.BadRequest,i.BadResponse,i.Unauthorized,i.SubprotocolNotAcceptable,i.SubscriberAlreadyExists,i.TooManyInitialisationRequests].includes(e.code)))throw e;if(P)return!1;if(p(e)&&1e3===e.code)return B>0;if(!w||R>=w||!S(e))throw e;return L=!0}function z(e,t){let r=C(e),o=!1,a=!1,n=()=>{B--,o=!0};return(async()=>{for(B++;;)try{let[s,i,c]=await _();if(o)return i();let u=A.onMessage(r,e=>{switch(e.type){case d.Next:return void t.next(e.payload);case d.Error:a=!0,o=!0,t.error(e.payload),n();return;case d.Complete:o=!0,n();return}});s.send(l({id:r,type:d.Subscribe,payload:e},I)),n=()=>{o||s.readyState!==k.OPEN||s.send(l({id:r,type:d.Complete},I)),B--,o=!0,i()},await c.finally(u);return}catch(e){if(!J(e))return}})().then(()=>{a||t.complete()}).catch(e=>{t.error(e)}),()=>{o||n()}}return y||(async()=>{for(B++;;)try{let[,,e]=await _();await e}catch(e){try{if(!J(e))return}catch(e){return f?.(e)}}})(),{on:A.on,subscribe:z,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},o=z(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),a=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return a.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),a.return=async()=>(o(),{done:!0,value:void 0}),a},async dispose(){if(P=!0,q){let[e]=await q;e.close(1e3,"Normal Closure")}},terminate(){q&&A.emit("closed",new u)}}}({url:y,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),o=e.i(709840),a=e.i(975157);let n=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:s=!1,...i}){let d=s?o.Slot.Root:"span";return(0,t.jsx)(d,{className:(0,a.cn)(n({variant:r}),e),"data-slot":"badge","data-variant":r,...i})}])},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},675926,e=>{"use strict";var t=e.i(843476),r=e.i(948148),o=e.i(487486),a=e.i(975157);e.s(["StatusBadge",0,function({status:e}){let n=(0,r.useTranslations)("status"),s="ONLINE"===e||"RUNNING"===e||"SUCCEEDED"===e,i="FAILED"===e||"TIMED_OUT"===e;return(0,t.jsx)(o.Badge,{className:(0,a.cn)(s&&"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",i&&"border-destructive/30 bg-destructive/10 text-destructive"),variant:s||i?"outline":"secondary",children:n(e.toLowerCase())})}])},929272,e=>{"use strict";let t=(0,e.i(456420).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,t],929272)},997695,e=>{"use strict";var t=e.i(843476),r=e.i(929272),o=e.i(948148),a=e.i(271645),n=e.i(929592),s=e.i(519455),i=e.i(515288),d=e.i(987968),c=e.i(520133),l=e.i(637611),u=e.i(975157),p=e.i(778434),g=e.i(675926);e.s(["JobMonitor",0,function({jobId:e,compact:m=!1}){let y=(0,o.useTranslations)("jobs"),[f,b]=(0,a.useState)(null),[h,x]=(0,a.useState)([]),[v,w]=(0,a.useState)(!0),[E,S]=(0,a.useState)(null),j=(0,a.useRef)(null),N=(0,a.useRef)(!0),C=(0,a.useCallback)(async()=>{try{let t=await (0,l.controlPlaneRequest)(`query Job($id: ID!) { agentJob(id: $id) { ${p.JOB_FIELDS} } agentJobLogs(jobId: $id) { ${p.JOB_LOG_FIELDS} } }`,{id:e});b(t.agentJob),x(t.agentJobLogs),S(null)}catch(e){S(e instanceof Error?e.message:String(e))}finally{w(!1)}},[e]);(0,a.useEffect)(()=>{let t=window.setTimeout(()=>void C(),0),r=(0,l.controlPlaneSubscriptions)(),o=r.subscribe({query:`subscription JobChanged($jobId: ID!) { agentJobChanged(jobId: $jobId) { ${p.JOB_FIELDS} } }`,variables:{jobId:e}},{next:e=>e.data?.agentJobChanged&&b(e.data.agentJobChanged),error:()=>void 0,complete:()=>void 0}),a=r.subscribe({query:`subscription JobLog($jobId: ID!) { agentJobLogAdded(jobId: $jobId) { ${p.JOB_LOG_FIELDS} } }`,variables:{jobId:e}},{next:e=>{let t=e.data?.agentJobLogAdded;t&&x(e=>e.some(e=>e.sequence===t.sequence)?e:[...e,t].sort((e,t)=>e.sequence-t.sequence))},error:()=>void 0,complete:()=>void 0});return()=>{o(),a(),window.clearTimeout(t)}},[e,C]),(0,a.useEffect)(()=>{N.current&&j.current?.scrollTo({top:j.current.scrollHeight})},[h]);let I=async()=>{try{let t=await (0,l.controlPlaneRequest)(`mutation Cancel($jobId: ID!) { cancelAgentJob(jobId: $jobId) { ${p.JOB_FIELDS} } }`,{jobId:e});b(t.cancelAgentJob),S(null)}catch(e){S(e instanceof Error?e.message:String(e))}};return E?(0,t.jsx)(n.Alert,{variant:"destructive",children:(0,t.jsx)(n.AlertDescription,{children:E})}):v?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(d.Spinner,{}),y("loading")]}):f?(0,t.jsx)(i.Card,{className:(0,u.cn)(m?"[--card-spacing:--spacing(4)]":void 0),children:(0,t.jsxs)(i.CardContent,{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h2",{className:"font-medium",children:f.kind}),(0,t.jsx)(g.StatusBadge,{status:f.status})]}),(0,t.jsx)("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:f.id})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[m&&(0,t.jsx)(s.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsx)(c.Link,{href:`/jobs/${f.id}`,children:y("open")})}),("QUEUED"===f.status||"RUNNING"===f.status)&&(0,t.jsxs)(s.Button,{onClick:()=>void I(),size:"sm",variant:"destructive",children:[(0,t.jsx)(r.Square,{}),y("cancel")]})]})]}),f.error&&(0,t.jsx)(n.Alert,{className:"mt-3",variant:"destructive",children:(0,t.jsx)(n.AlertDescription,{children:f.error})}),(0,t.jsx)("div",{ref:j,className:(0,u.cn)("mt-4 overflow-auto rounded-lg border bg-zinc-950 p-3 font-mono text-xs leading-5 text-zinc-100",m?"h-80":"h-[32rem]"),onScroll:e=>{let t=e.currentTarget;N.current=t.scrollHeight-t.scrollTop-t.clientHeight<24},children:0===h.length?(0,t.jsx)("span",{className:"text-zinc-500",children:y("waiting")}):h.map(e=>(0,t.jsxs)("div",{className:(0,u.cn)("whitespace-pre-wrap break-all","STDERR"===e.stream&&"text-amber-300","SYSTEM"===e.stream&&"text-sky-300"),children:[(0,t.jsx)("span",{className:"mr-2 select-none text-zinc-600",children:String(e.sequence).padStart(4,"0")}),e.message]},e.id))})]})}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:y("notFound")})}])}]);
@@ -0,0 +1,45 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59497,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return r.useCallback(function(...e){return t=>{let r=!1,i=e.map(e=>{let i=n(e,t);return r||"function"!=typeof i||(r=!0),i});if(r)return()=>{for(let t=0;t<i.length;t++){let r=i[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}var a=e.i(30030);function o(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n||!n.defaultPrevented)return t?.(n)}}"u">typeof window&&window.document&&window.document.createElement;var l=globalThis?.document?r.useLayoutEffect:()=>{};r[" useEffectEvent ".trim().toString()],r[" useInsertionEffect ".trim().toString()];var s=r[" useInsertionEffect ".trim().toString()]||l;Symbol("RADIX:SYNC_STATE");var d=e.i(999682),c=e.i(635804),u=e.i(296626);e.i(174080);var p=Symbol.for("radix.slottable"),f=Symbol.for("react.lazy");function m(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===f&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var h=r[" use ".trim().toString()],g=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{var a;let o,l=(a=`Primitive.${n}`,(o=r.forwardRef((e,t)=>{var n;let o,l,{children:s,...d}=e,c=null,u=!1,f=[];m(s)&&"function"==typeof h&&(s=h(s._payload)),r.Children.forEach(s,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===p){u=!0;let t="child"in e.props?e.props.child:e.props.children;m(t)&&"function"==typeof h&&(t=h(t._payload)),c=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),f.push(c?.props?.children)}else f.push(e)}),c?c=r.cloneElement(c,void 0,f):!u&&1===r.Children.count(s)&&r.isValidElement(s)&&(c=s);let g=c?(n=c,(l=(o=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?n.ref:(l=(o=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?n.props.ref:n.props.ref||n.ref):void 0,x=i(t,g);if(!c){if(s||0===s){let e,t;throw Error(u?(e=a,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=a,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return s}let y=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(d,c.props??{});return c.type!==r.Fragment&&(y.ref=t?x:g),r.cloneElement(c,y)})).displayName=`${a}.Slot`,o),s=r.forwardRef((e,r)=>{let{asChild:i,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(i?l:n,{...a,ref:r})});return s.displayName=`Primitive.${n}`,{...e,[n]:s}},{}),x="Checkbox",[y,v]=(0,a.createContextScope)(x),[b,w]=y(x);function j(e){let{__scopeCheckbox:n,checked:i,children:a,defaultChecked:o,disabled:l,form:d,name:c,onCheckedChange:u,required:p,value:f="on",internal_do_not_use_render:m}=e,[h,g]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){let[a,o,l]=function({defaultProp:e,onChange:t}){let[n,i]=r.useState(e),a=r.useRef(n),o=r.useRef(t);return s(()=>{o.current=t},[t]),r.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,i,o]}({defaultProp:t,onChange:n}),d=void 0!==e,c=d?e:a;{let t=r.useRef(void 0!==e);r.useEffect(()=>{let e=t.current;if(e!==d){let t=d?"controlled":"uncontrolled";console.warn(`${i} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=d},[d,i])}return[c,r.useCallback(t=>{if(d){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else o(t)},[d,e,o,l])]}({prop:i,defaultProp:o??!1,onChange:u,caller:x}),[y,v]=r.useState(null),[w,j]=r.useState(null),S=r.useRef(!1),C=!y||!!d||!!y.closest("form"),E={checked:h,disabled:l,setChecked:g,control:y,setControl:v,name:c,form:d,value:f,hasConsumerStoppedPropagationRef:S,required:p,defaultChecked:!T(o)&&o,isFormControl:C,bubbleInput:w,setBubbleInput:j};return(0,t.jsx)(b,{scope:n,...E,children:"function"==typeof m?m(E):a})}var S="CheckboxTrigger",C=r.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:a,...l},s)=>{let{control:d,value:c,disabled:u,checked:p,required:f,setControl:m,setChecked:h,hasConsumerStoppedPropagationRef:x,isFormControl:y,bubbleInput:v}=w(S,e),b=i(s,m),j=r.useRef(p);return r.useEffect(()=>{let e=d?.form;if(e){let t=()=>h(j.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,h]),(0,t.jsx)(g.button,{type:"button",role:"checkbox","aria-checked":T(p)?"mixed":p,"aria-required":f,"data-state":I(p),"data-disabled":u?"":void 0,disabled:u,value:c,...l,ref:b,onKeyDown:o(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:o(a,e=>{h(e=>!!T(e)||!e),v&&y&&(x.current=e.isPropagationStopped(),x.current||e.stopPropagation())})})});C.displayName=S;var E=r.forwardRef((e,r)=>{let{__scopeCheckbox:n,name:i,checked:a,defaultChecked:o,required:l,disabled:s,value:d,onCheckedChange:c,form:u,...p}=e;return(0,t.jsx)(j,{__scopeCheckbox:n,checked:a,defaultChecked:o,disabled:s,required:l,onCheckedChange:c,name:i,form:u,value:d,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C,{...p,ref:r,__scopeCheckbox:n}),e&&(0,t.jsx)(R,{__scopeCheckbox:n})]})})});E.displayName=x;var k="CheckboxIndicator",N=r.forwardRef((e,r)=>{let{__scopeCheckbox:n,forceMount:i,...a}=e,o=w(k,n);return(0,t.jsx)(u.Presence,{present:i||T(o.checked)||!0===o.checked,children:(0,t.jsx)(g.span,{"data-state":I(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:r,style:{pointerEvents:"none",...e.style}})})});N.displayName=k;var D="CheckboxBubbleInput",R=r.forwardRef(({__scopeCheckbox:e,...n},a)=>{let{control:o,hasConsumerStoppedPropagationRef:l,checked:s,defaultChecked:u,required:p,disabled:f,name:m,value:h,form:x,bubbleInput:y,setBubbleInput:v}=w(D,e),b=i(a,v),j=(0,d.usePrevious)(s),S=(0,c.useSize)(o);r.useEffect(()=>{if(!y)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!l.current;if(j!==s&&e){let r=new Event("click",{bubbles:t});y.indeterminate=T(s),e.call(y,!T(s)&&s),y.dispatchEvent(r)}},[y,j,s,l]);let C=r.useRef(!T(s)&&s);return(0,t.jsx)(g.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??C.current,required:p,disabled:f,name:m,value:h,form:x,...n,tabIndex:-1,ref:b,style:{...n.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function T(e){return"indeterminate"===e}function I(e){return T(e)?"indeterminate":e?"checked":"unchecked"}R.displayName=D,e.s(["Checkbox",0,E,"CheckboxIndicator",0,N,"Indicator",0,N,"Root",0,E,"createCheckboxScope",0,v,"unstable_BubbleInput",0,R,"unstable_CheckboxBubbleInput",0,R,"unstable_CheckboxProvider",0,j,"unstable_CheckboxTrigger",0,C,"unstable_Provider",0,j,"unstable_Trigger",0,C],388474);var A=e.i(388474),A=A,$=e.i(975157),B=e.i(593698);e.s(["Checkbox",0,function({className:e,...r}){return(0,t.jsx)(A.Root,{"data-slot":"checkbox",className:(0,$.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...r,children:(0,t.jsx)(A.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,t.jsx)(B.CheckIcon,{})})})}],59497)},624687,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Textarea",0,function({className:e,...n}){return(0,t.jsx)("textarea",{className:(0,r.cn)("min-h-24 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",e),...n})}])},82612,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(975157);let i=(0,r.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,n.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...r})},"EmptyDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,n.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...r})},"EmptyHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,n.cn)("flex max-w-sm flex-col items-center gap-2",e),...r})},"EmptyMedia",0,function({className:e,variant:r="default",...a}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":r,className:(0,n.cn)(i({variant:r,className:e})),...a})},"EmptyTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,n.cn)("font-heading text-sm font-medium tracking-tight",e),...r})}])},929592,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(975157);let i=(0,r.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:r,...a}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,n.cn)(i({variant:r}),e),...a})},"AlertDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,n.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r})}])},515288,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Card",0,function({className:e,size:n="default",...i}){return(0,t.jsx)("div",{"data-slot":"card","data-size":n,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>[data-slot=card-header]]:pt-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...i})},"CardAction",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...n})},"CardContent",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...n})},"CardDescription",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...n})},"CardFooter",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...n})},"CardHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl bg-muted/40 px-(--card-spacing) py-(--card-spacing) not-last:border-b has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",e),...n})},"CardTitle",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...n})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),r=e.i(975157),n=e.i(758379),n=n;e.s(["Spinner",0,function({className:e,...i}){return(0,t.jsx)(n.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,r.cn)("size-4 animate-spin",e),...i})}],987968)},637611,e=>{"use strict";var t,r,n=e.i(247167);function i(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function a(e){return"object"===i(e)}function o(e,t){return e.length<124?e:t}var l=((t=l||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),s=((r=s||{}).ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete",r);function d(e){if(!a(e))throw Error(`Message is expected to be an object, but got ${i(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${i(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!a(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${i(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!a(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${i(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${i(e.payload.query)}`);if(null!=e.payload.variables&&!a(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${i(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==i(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${i(e.payload.operationName)}`);if(null!=e.payload.extensions&&!a(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${i(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${i(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!a(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${i(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${i(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${i(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function c(e,t){return d(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return a(e)&&"code"in e&&"reason"in e}async function f(e,t){let r=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),n=await r.json();if(!r.ok||n.errors?.length||!n.data)throw Error(n.errors?.map(e=>e.message).join("; ")||`HTTP ${r.status}`);return n.data}let m=null;function h(){return function(e,t,r){let n=`${"https:"===t?"wss":"ws"}://${r}/graphql`;if(!e)return n;try{let r=new URL(e);if("https:"===t&&"wss:"!==r.protocol)return n}catch{}return e}(n.default.env.NEXT_PUBLIC_AGENT_WS_URL,window.location.protocol,window.location.host)}e.s(["controlPlaneRequest",0,f,"controlPlaneSubscriptions",0,function(){return m??=function(t){let r,n,i,a,{url:f,connectionParams:m,lazy:h=!0,onNonLazyError:g=console.error,lazyCloseTimeout:x=0,keepAlive:y=0,disablePong:v,connectionAckWaitTimeout:b=0,retryAttempts:w=5,retryWait:j=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:S=p,on:C,webSocketImpl:E,generateID:k=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:N,jsonMessageReviver:D}=t;if(E){var R;if(!("function"==typeof(R=E)&&"constructor"in R&&"CLOSED"in R&&"CLOSING"in R&&"CONNECTING"in R&&"OPEN"in R))throw Error("Invalid WebSocket implementation provided");r=E}else r="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!r)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let T=r,I=(n={},i={on:(e,t)=>(n[e]=t,()=>{delete n[e]}),emit(e){"id"in e&&n[e.id]?.(e)}},a={connecting:C?.connecting?[C.connecting]:[],opened:C?.opened?[C.opened]:[],connected:C?.connected?[C.connected]:[],ping:C?.ping?[C.ping]:[],pong:C?.pong?[C.pong]:[],message:C?.message?[i.emit,C.message]:[i.emit],closed:C?.closed?[C.closed]:[],error:C?.error?[C.error]:[]},{onMessage:i.on,on(e,t){let r=a[e];return r.push(t),()=>{r.splice(r.indexOf(t),1)}},emit(e,...t){for(let r of[...a[e]])r(...t)}});function A(e){let t=[I.on("error",r=>{t.forEach(e=>e()),e(r)}),I.on("closed",r=>{t.forEach(e=>e()),e(r)})]}let $,B=0,P,z=!1,_=0,O=!1;async function M(){clearTimeout(P);let[e,t]=await ($??($=new Promise((e,t)=>(async()=>{let r,n;if(z){if(await j(_),!B)return $=void 0,t({code:1e3,reason:"All Subscriptions Gone"});_++}I.emit("connecting",z);let i=new T("function"==typeof f?await f():f,"graphql-transport-ws");function a(){isFinite(y)&&y>0&&(clearTimeout(n),n=setTimeout(()=>{i.readyState===T.OPEN&&(i.send(c({type:s.Ping})),I.emit("ping",!1,void 0))},y))}A(e=>{$=void 0,clearTimeout(r),clearTimeout(n),t(e),e instanceof u&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)}),i.onerror=e=>I.emit("error",e),i.onclose=e=>I.emit("closed",e),i.onopen=async()=>{try{I.emit("opened",i);let e="function"==typeof m?await m():m;if(i.readyState!==T.OPEN)return;i.send(c(e?{type:s.ConnectionInit,payload:e}:{type:s.ConnectionInit},N)),isFinite(b)&&b>0&&(r=setTimeout(()=>{i.close(l.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},b)),a()}catch(e){I.emit("error",e),i.close(l.InternalClientError,o(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;i.onmessage=({data:t})=>{try{let n=d("string"==typeof t?JSON.parse(t,D):t);if(I.emit("message",n),"ping"===n.type||"pong"===n.type){I.emit(n.type,!0,n.payload),"pong"===n.type?a():v||(i.send(c(n.payload?{type:s.Pong,payload:n.payload}:{type:s.Pong})),I.emit("pong",!1,n.payload));return}if(p)return;if(n.type!==s.ConnectionAck)throw Error(`First message cannot be of type ${n.type}`);clearTimeout(r),p=!0,I.emit("connected",i,n.payload,z),z=!1,_=0,e([i,new Promise((e,t)=>A(t))])}catch(e){i.onmessage=null,I.emit("error",e),i.close(l.BadResponse,o(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===T.CLOSING&&await t;let r=()=>{},n=new Promise(e=>r=e);return[e,r,Promise.race([n.then(()=>{B||(isFinite(x)&&x>0?P=setTimeout(()=>{e.readyState===T.OPEN&&e.close(1e3,"Normal Closure")},x):e.close(1e3,"Normal Closure"))}),t])]}function L(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[l.InternalServerError,l.InternalClientError,l.BadRequest,l.BadResponse,l.Unauthorized,l.SubprotocolNotAcceptable,l.SubscriberAlreadyExists,l.TooManyInitialisationRequests].includes(e.code)))throw e;if(O)return!1;if(p(e)&&1e3===e.code)return B>0;if(!w||_>=w||!S(e))throw e;return z=!0}function F(e,t){let r=k(e),n=!1,i=!1,a=()=>{B--,n=!0};return(async()=>{for(B++;;)try{let[o,l,d]=await M();if(n)return l();let u=I.onMessage(r,e=>{switch(e.type){case s.Next:return void t.next(e.payload);case s.Error:i=!0,n=!0,t.error(e.payload),a();return;case s.Complete:n=!0,a();return}});o.send(c({id:r,type:s.Subscribe,payload:e},N)),a=()=>{n||o.readyState!==T.OPEN||o.send(c({id:r,type:s.Complete},N)),B--,n=!0,l()},await d.finally(u);return}catch(e){if(!L(e))return}})().then(()=>{i||t.complete()}).catch(e=>{t.error(e)}),()=>{n||a()}}return h||(async()=>{for(B++;;)try{let[,,e]=await M();await e}catch(e){try{if(!L(e))return}catch(e){return g?.(e)}}})(),{on:I.on,subscribe:F,iterate(e){let t=[],r={done:!1,error:null,resolve:()=>{}},n=F(e,{next(e){t.push(e),r.resolve()},error(e){r.done=!0,r.error=e,r.resolve()},complete(){r.done=!0,r.resolve()}}),i=async function*(){for(;;){for(t.length||await new Promise(e=>r.resolve=e);t.length;)yield t.shift();if(r.error)throw r.error;if(r.done)return}}();return i.throw=async e=>(r.done||(r.done=!0,r.error=e,r.resolve()),{done:!0,value:void 0}),i.return=async()=>(n(),{done:!0,value:void 0}),i},async dispose(){if(O=!0,$){let[e]=await $;e.close(1e3,"Normal Closure")}},terminate(){$&&I.emit("closed",new u)}}}({url:h,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),r=e.i(225913),n=e.i(709840),i=e.i(975157);let a=(0,r.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",success:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300 [a]:hover:bg-emerald-500/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:r="default",asChild:o=!1,...l}){let s=o?n.Slot.Root:"span";return(0,t.jsx)(s,{className:(0,i.cn)(a({variant:r}),e),"data-slot":"badge","data-variant":r,...l})}])},784774,e=>{"use strict";var t=e.i(843476),r=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:n,...i}){return(0,t.jsx)("div",{className:(0,r.cn)("w-full overflow-x-auto",n),children:(0,t.jsx)("table",{className:(0,r.cn)("w-full caption-bottom text-sm",e),...i})})},"TableBody",0,function({className:e,...n}){return(0,t.jsx)("tbody",{className:(0,r.cn)("divide-y",e),...n})},"TableCell",0,function({className:e,...n}){return(0,t.jsx)("td",{className:(0,r.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...n})},"TableFooter",0,function({className:e,...n}){return(0,t.jsx)("tfoot",{className:(0,r.cn)("border-t bg-muted/50 font-medium",e),...n})},"TableHead",0,function({className:e,...n}){return(0,t.jsx)("th",{className:(0,r.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...n})},"TableHeader",0,function({className:e,...n}){return(0,t.jsx)("thead",{className:(0,r.cn)("border-b",e),...n})},"TableRow",0,function({className:e,...n}){return(0,t.jsx)("tr",{className:(0,r.cn)("transition-colors hover:bg-muted/40",e),...n})}])},573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(30030);function i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return r.useCallback(function(...e){return t=>{let r=!1,n=e.map(e=>{let n=i(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():i(e[t],null)}}}}(...e),e)}var o=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var l="AlertDialog",[s,d]=(0,n.createContextScope)(l,[o.createDialogScope]),c=(0,o.createDialogScope)(),u=e=>{let{__scopeAlertDialog:r,...n}=e,i=c(r);return(0,t.jsx)(o.Root,{...i,...n,modal:!0})};u.displayName=l;var p=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...i}=e,a=c(n);return(0,t.jsx)(o.Trigger,{...a,...i,ref:r})});p.displayName="AlertDialogTrigger";var f=e=>{let{__scopeAlertDialog:r,...n}=e,i=c(r);return(0,t.jsx)(o.Portal,{...i,...n})};f.displayName="AlertDialogPortal";var m=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...i}=e,a=c(n);return(0,t.jsx)(o.Overlay,{...a,...i,ref:r})});m.displayName="AlertDialogOverlay";var h="AlertDialogContent",[g,x]=s(h),y=r.forwardRef((e,n)=>{let{__scopeAlertDialog:i,children:l,...s}=e,d=c(i),u=a(n,r.useRef(null)),p=r.useRef(null);return(0,t.jsx)(g,{scope:i,cancelRef:p,children:(0,t.jsx)(o.Content,{role:"alertdialog",...d,...s,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n||!n.defaultPrevented)return t?.(n)}}(s.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:l})})});y.displayName=h;var v=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...i}=e,a=c(n);return(0,t.jsx)(o.Title,{...a,...i,ref:r})});v.displayName="AlertDialogTitle";var b=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...i}=e,a=c(n);return(0,t.jsx)(o.Description,{...a,...i,ref:r})});b.displayName="AlertDialogDescription";var w=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...i}=e,a=c(n);return(0,t.jsx)(o.Close,{...a,...i,ref:r})});w.displayName="AlertDialogAction";var j="AlertDialogCancel",S=r.forwardRef((e,r)=>{let{__scopeAlertDialog:n,...i}=e,{cancelRef:l}=x(j,n),s=c(n),d=a(r,l);return(0,t.jsx)(o.Close,{...s,...i,ref:d})});S.displayName=j,e.s(["Action",0,w,"AlertDialog",0,u,"AlertDialogAction",0,w,"AlertDialogCancel",0,S,"AlertDialogContent",0,y,"AlertDialogDescription",0,b,"AlertDialogOverlay",0,m,"AlertDialogPortal",0,f,"AlertDialogTitle",0,v,"AlertDialogTrigger",0,p,"Cancel",0,S,"Content",0,y,"Description",0,b,"Overlay",0,m,"Portal",0,f,"Root",0,u,"Title",0,v,"Trigger",0,p,"createAlertDialogScope",0,d],691162);var C=e.i(691162),C=C,E=e.i(975157),k=e.i(519455);function N({...e}){return(0,t.jsx)(C.Root,{"data-slot":"alert-dialog",...e})}function D({...e}){return(0,t.jsx)(C.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function R({...e}){return(0,t.jsx)(C.Portal,{"data-slot":"alert-dialog-portal",...e})}function T({className:e,...r}){return(0,t.jsx)(C.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,E.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...r})}function I({className:e,size:r="default",...n}){return(0,t.jsxs)(R,{children:[(0,t.jsx)(T,{}),(0,t.jsx)(C.Content,{"data-slot":"alert-dialog-content","data-size":r,className:(0,E.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...n})]})}function A({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,E.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...r})}function $({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,E.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...r})}function B({className:e,...r}){return(0,t.jsx)(C.Title,{"data-slot":"alert-dialog-title",className:(0,E.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...r})}function P({className:e,...r}){return(0,t.jsx)(C.Description,{"data-slot":"alert-dialog-description",className:(0,E.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...r})}function z({className:e,variant:r="default",size:n="default",...i}){return(0,t.jsx)(k.Button,{variant:r,size:n,asChild:!0,children:(0,t.jsx)(C.Action,{"data-slot":"alert-dialog-action",className:(0,E.cn)(e),...i})})}function _({className:e,variant:r="outline",size:n="default",...i}){return(0,t.jsx)(k.Button,{variant:r,size:n,asChild:!0,children:(0,t.jsx)(C.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,E.cn)(e),...i})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:r,description:n,onConfirm:i,onOpenChange:a,open:o,title:l,trigger:s}){return(0,t.jsxs)(N,{onOpenChange:a,open:o,children:[s&&(0,t.jsx)(D,{asChild:!0,children:s}),(0,t.jsxs)(I,{children:[(0,t.jsxs)(A,{children:[(0,t.jsx)(B,{children:l}),(0,t.jsx)(P,{children:n})]}),(0,t.jsxs)($,{children:[(0,t.jsx)(_,{children:r}),(0,t.jsx)(z,{onClick:()=>void i(),variant:"destructive",children:e})]})]})]})}],340953)},77071,e=>{"use strict";let t=(0,e.i(456420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},842727,e=>{"use strict";var t=e.i(271645);function r(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r||!r.defaultPrevented)return t?.(r)}}"u">typeof window&&window.document&&window.document.createElement;var n=e.i(75830);function i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return t.useCallback(function(...e){return t=>{let r=!1,n=e.map(e=>{let n=i(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():i(e[t],null)}}}}(...e),e)}var o=e.i(30030),l=e.i(610772);e.i(174080);var s=Symbol.for("radix.slottable"),d=Symbol.for("react.lazy");function c(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===d&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var u=t[" use ".trim().toString()],p=e.i(843476),f=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var n;let i,o=(n=`Primitive.${r}`,(i=t.forwardRef((e,r)=>{var i;let o,l,{children:d,...p}=e,f=null,m=!1,h=[];c(d)&&"function"==typeof u&&(d=u(d._payload)),t.Children.forEach(d,e=>{var r;if(r=e,t.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===s){m=!0;let r="child"in e.props?e.props.child:e.props.children;c(r)&&"function"==typeof u&&(r=u(r._payload)),f=((e,r)=>{if("child"in e.props){let r=e.props.child;return t.isValidElement(r)?t.cloneElement(r,void 0,e.props.children(r.props.children)):null}return t.isValidElement(r)?r:null})(e,r),h.push(f?.props?.children)}else h.push(e)}),f?f=t.cloneElement(f,void 0,h):!m&&1===t.Children.count(d)&&t.isValidElement(d)&&(f=d);let g=f?(i=f,(l=(o=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?i.ref:(l=(o=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?i.props.ref:i.props.ref||i.ref):void 0,x=a(r,g);if(!f){if(d||0===d){let e,t;throw Error(m?(e=n,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=n,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return d}let y=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(p,f.props??{});return f.type!==t.Fragment&&(y.ref=r?x:g),t.cloneElement(f,y)})).displayName=`${n}.Slot`,i),l=t.forwardRef((e,t)=>{let{asChild:n,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,p.jsx)(n?o:r,{...i,ref:t})});return l.displayName=`Primitive.${r}`,{...e,[r]:l}},{}),m=e.i(30207),h=globalThis?.document?t.useLayoutEffect:()=>{};t[" useEffectEvent ".trim().toString()],t[" useInsertionEffect ".trim().toString()];var g=t[" useInsertionEffect ".trim().toString()]||h;Symbol("RADIX:SYNC_STATE");var x=e.i(586318),y=!1,v=t[" useSyncExternalStore ".trim().toString()];function b(){return()=>{}}var w="function"==typeof v?function(){return v(b,()=>!0,()=>!1)}:function(){let[e,r]=t.useState(y);return t.useEffect(()=>{y||(y=!0,r(!0))},[]),e},j="rovingFocusGroup.onEntryFocus",S={bubbles:!1,cancelable:!0},C="RovingFocusGroup",[E,k,N]=(0,n.createCollection)(C),[D,R]=(0,o.createContextScope)(C,[N]),[T,I]=D(C),A=t.forwardRef((e,t)=>(0,p.jsx)(E.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(E.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)($,{...e,ref:t})})}));A.displayName=C;var $=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,orientation:o,loop:l=!1,dir:s,currentTabStopId:d,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:h,preventScrollOnEntryFocus:y=!1,...v}=e,b=t.useRef(null),w=a(n,b),E=(0,x.useDirection)(s),[N,D]=function({prop:e,defaultProp:r,onChange:n=()=>{},caller:i}){let[a,o,l]=function({defaultProp:e,onChange:r}){let[n,i]=t.useState(e),a=t.useRef(n),o=t.useRef(r);return g(()=>{o.current=r},[r]),t.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,i,o]}({defaultProp:r,onChange:n}),s=void 0!==e,d=s?e:a;{let r=t.useRef(void 0!==e);t.useEffect(()=>{let e=r.current;if(e!==s){let t=s?"controlled":"uncontrolled";console.warn(`${i} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=s},[s,i])}return[d,t.useCallback(t=>{if(s){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else o(t)},[s,e,o,l])]}({prop:d,defaultProp:c??null,onChange:u,caller:C}),[R,I]=t.useState(!1),A=(0,m.useCallbackRef)(h),$=k(i),B=t.useRef(!1),[P,z]=t.useState(0);return t.useEffect(()=>{let e=b.current;if(e)return e.addEventListener(j,A),()=>e.removeEventListener(j,A)},[A]),(0,p.jsx)(T,{scope:i,orientation:o,dir:E,loop:l,currentTabStopId:N,onItemFocus:t.useCallback(e=>D(e),[D]),onItemShiftTab:t.useCallback(()=>I(!0),[]),onFocusableItemAdd:t.useCallback(()=>z(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>z(e=>e-1),[]),children:(0,p.jsx)(f.div,{tabIndex:R||0===P?-1:0,"data-orientation":o,...v,ref:w,style:{outline:"none",...e.style},onMouseDown:r(e.onMouseDown,()=>{B.current=!0}),onFocus:r(e.onFocus,e=>{let t=!B.current;if(e.target===e.currentTarget&&t&&!R){let t=new CustomEvent(j,S);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=$().filter(e=>e.focusable);_([e.find(e=>e.active),e.find(e=>e.id===N),...e].filter(Boolean).map(e=>e.ref.current),y)}}B.current=!1}),onBlur:r(e.onBlur,()=>I(!1))})})}),B="RovingFocusGroupItem",P=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:a=!0,active:o=!1,tabStopId:s,children:d,...c}=e,u=(0,l.useId)(),m=s||u,g=I(B,i),x=g.currentTabStopId===m,y=k(i),{onFocusableItemAdd:v,onFocusableItemRemove:b,currentTabStopId:j}=g,S=w();return h(()=>{if(S&&a)return v(),()=>b()},[S,a,v,b]),t.useEffect(()=>{if(!S&&a)return v(),()=>b()},[S,a,v,b]),(0,p.jsx)(E.ItemSlot,{scope:i,id:m,focusable:a,active:o,children:(0,p.jsx)(f.span,{tabIndex:x?0:-1,"data-orientation":g.orientation,...c,ref:n,onMouseDown:r(e.onMouseDown,e=>{a?g.onItemFocus(m):e.preventDefault()}),onFocus:r(e.onFocus,()=>g.onItemFocus(m)),onKeyDown:r(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return z[i]}(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let a=i.indexOf(e.currentTarget);i=g.loop?(r=i,n=a+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(a+1)}setTimeout(()=>_(i))}}),children:"function"==typeof d?d({isCurrentTabStop:x,hasTabStop:null!=j}):d})})});P.displayName=B;var z={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",0,P,"Root",0,A,"createRovingFocusGroupScope",0,R],842727)},110204,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}e.i(174080);var i=Symbol.for("radix.slottable"),a=Symbol.for("react.lazy");function o(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===a&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var l=r[" use ".trim().toString()],s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,a)=>{var s;let d,c=(s=`Primitive.${a}`,(d=r.forwardRef((e,t)=>{var a;let d,c,{children:u,...p}=e,f=null,m=!1,h=[];o(u)&&"function"==typeof l&&(u=l(u._payload)),r.Children.forEach(u,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===i){m=!0;let t="child"in e.props?e.props.child:e.props.children;o(t)&&"function"==typeof l&&(t=l(t._payload)),f=((e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null})(e,t),h.push(f?.props?.children)}else h.push(e)}),f?f=r.cloneElement(f,void 0,h):!m&&1===r.Children.count(u)&&r.isValidElement(u)&&(f=u);let g=f?(a=f,(c=(d=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?a.ref:(c=(d=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in d&&d.isReactWarning)?a.props.ref:a.props.ref||a.ref):void 0,x=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,i=e.map(e=>{let i=n(e,t);return r||"function"!=typeof i||(r=!0),i});if(r)return()=>{for(let t=0;t<i.length;t++){let r=i[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}(t,g);if(!f){if(u||0===u){let e,t;throw Error(m?(e=s,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=s,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return u}let y=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(p,f.props??{});return f.type!==r.Fragment&&(y.ref=t?x:g),r.cloneElement(f,y)})).displayName=`${s}.Slot`,d),u=r.forwardRef((e,r)=>{let{asChild:n,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(n?c:a,{...i,ref:r})});return u.displayName=`Primitive.${a}`,{...e,[a]:u}},{}),d=r.forwardRef((e,r)=>(0,t.jsx)(s.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));d.displayName="Label",e.s(["Label",0,d,"Root",0,d],973741);var c=e.i(973741),c=c,u=e.i(975157);e.s(["Label",0,function({className:e,...r}){return(0,t.jsx)(c.Root,{"data-slot":"label",className:(0,u.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}],110204)},643957,e=>{"use strict";let t=(0,e.i(456420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},999682,e=>{"use strict";var t=e.i(271645);e.s(["usePrevious",0,function(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}])},593698,e=>{"use strict";var t=e.i(643957);e.s(["CheckIcon",()=>t.default])},75830,586318,e=>{"use strict";var t=e.i(271645),r=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return t.useCallback(function(...e){return t=>{let r=!1,i=e.map(e=>{let i=n(e,t);return r||"function"!=typeof i||(r=!0),i});if(r)return()=>{for(let t=0;t<i.length;t++){let r=i[t];"function"==typeof r?r():n(e[t],null)}}}}(...e),e)}function a(e){let r=t.forwardRef((r,n)=>{var a;let s,f,{children:m,...h}=r,g=null,x=!1,y=[];d(m)&&"function"==typeof p&&(m=p(m._payload)),t.Children.forEach(m,e=>{var r;if(r=e,t.isValidElement(r)&&"function"==typeof r.type&&"__radixId"in r.type&&r.type.__radixId===o){x=!0;let t="child"in e.props?e.props.child:e.props.children;d(t)&&"function"==typeof p&&(t=p(t._payload)),g=l(e,t),y.push(g?.props?.children)}else y.push(e)}),g?g=t.cloneElement(g,void 0,y):!x&&1===t.Children.count(m)&&t.isValidElement(m)&&(g=m);let v=g?(a=g,(f=(s=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?a.ref:(f=(s=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?a.props.ref:a.props.ref||a.ref):void 0,b=i(n,v);if(!g){if(m||0===m)throw Error(x?u(e):c(e));return m}let w=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(h,g.props??{});return g.type!==t.Fragment&&(w.ref=n?b:v),t.cloneElement(g,w)});return r.displayName=`${e}.Slot`,r}var o=Symbol.for("radix.slottable"),l=(e,r)=>{if("child"in e.props){let r=e.props.child;return t.isValidElement(r)?t.cloneElement(r,void 0,e.props.children(r.props.children)):null}return t.isValidElement(r)?r:null},s=Symbol.for("react.lazy");function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===s&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var c=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,u=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,p=t[" use ".trim().toString()],f=e.i(843476),m=new WeakMap;function h(e,t){var r,n;let i,a,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let l=(r=e,n=t,i=r.length,(o=(a=g(n))>=0?a:i+a)<0||o>=i?-1:o);return -1===l?void 0:e[l]}function g(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],m.set(this,!0)}set(e,t){return m.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),a=this.#e.length,o=g(e),l=o>=0?o:a+o,s=l<0||l>=a?-1:l;if(s===this.size||i&&s===this.size-1||-1===s)return this.set(t,r),this;let d=this.size+ +!i;o<0&&l++;let c=[...this.#e],u=!1;for(let e=l;e<d;e++)if(l===e){let a=c[e];c[e]===t&&(a=c[e+1]),i&&this.delete(t),n=this.get(a),this.set(t,r)}else{u||c[e-1]!==t||(u=!0);let r=c[u?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=h(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=h(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return h(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,function(e){let n=e+"CollectionProvider",[o,l]=(0,r.createContextScope)(n),[s,d]=o(n,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:r,children:n}=e,i=t.useRef(null),a=t.useRef(new Map).current;return(0,f.jsx)(s,{scope:r,itemMap:a,collectionRef:i,children:n})};c.displayName=n;let u=e+"CollectionSlot",p=a(u),m=t.forwardRef((e,t)=>{let{scope:r,children:n}=e,a=i(t,d(u,r).collectionRef);return(0,f.jsx)(p,{ref:a,children:n})});m.displayName=u;let h=e+"CollectionItemSlot",g="data-radix-collection-item",x=a(h),y=t.forwardRef((e,r)=>{let{scope:n,children:a,...o}=e,l=t.useRef(null),s=i(r,l),c=d(h,n);return t.useEffect(()=>(c.itemMap.set(l,{ref:l,...o}),()=>void c.itemMap.delete(l))),(0,f.jsx)(x,{...{[g]:""},ref:s,children:a})});return y.displayName=h,[{Provider:c,Slot:m,ItemSlot:y},function(r){let n=d(e+"CollectionConsumer",r);return t.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])},l]}],75830);var x=t.createContext(void 0);e.s(["useDirection",0,function(e){let r=t.useContext(x);return e||r||"ltr"}],586318)},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},776639,e=>{"use strict";var t=e.i(843476),r=e.i(560964),n=e.i(964053),i=e.i(519455),a=e.i(975157);function o({...e}){return(0,t.jsx)(n.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function l({className:e,...r}){return(0,t.jsx)(n.Dialog.Overlay,{className:(0,a.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),"data-slot":"dialog-overlay",...r})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(n.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:s,showCloseButton:d=!0,...c}){return(0,t.jsxs)(o,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(n.Dialog.Content,{className:(0,a.cn)("fixed top-1/2 left-1/2 z-50 grid max-h-[85dvh] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto 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-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),"data-slot":"dialog-content",...c,children:[s,d&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,"data-slot":"dialog-close",children:(0,t.jsxs)(i.Button,{className:"absolute top-2 right-2",size:"icon-sm",variant:"ghost",children:[(0,t.jsx)(r.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})},"DialogDescription",0,function({className:e,...r}){return(0,t.jsx)(n.Dialog.Description,{className:(0,a.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),"data-slot":"dialog-description",...r})},"DialogFooter",0,function({className:e,showCloseButton:r=!1,children:o,...l}){return(0,t.jsxs)("div",{className:(0,a.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),"data-slot":"dialog-footer",...l,children:[o,r&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,children:(0,t.jsx)(i.Button,{variant:"outline",children:"Close"})})]})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{className:(0,a.cn)("flex flex-col gap-2",e),"data-slot":"dialog-header",...r})},"DialogTitle",0,function({className:e,...r}){return(0,t.jsx)(n.Dialog.Title,{className:(0,a.cn)("font-heading text-base leading-none font-medium",e),"data-slot":"dialog-title",...r})},"DialogTrigger",0,function({...e}){return(0,t.jsx)(n.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}])},986253,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let r=document.execCommand("copy");if(t.remove(),!r)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},716327,e=>{"use strict";var t=e.i(26495);e.s(["ChevronDown",()=>t.default])},395925,e=>{"use strict";let t=(0,e.i(456420).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],395925)},21357,e=>{"use strict";let t=(0,e.i(456420).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",0,t],21357)},90969,771777,866026,e=>{"use strict";e.s(["buildDuration",0,function(e,t=Date.now()){let r=e.durationMs??(e.startedAt&&null!==t&&["QUEUED","PREPARING","RUNNING"].includes(e.status)?t-Date.parse(e.startedAt):null);if(null===r||!Number.isFinite(r))return"—";let n=Math.max(0,Math.floor(r/1e3)),i=Math.floor(n/3600),a=Math.floor(n%3600/60),o=n%60;return i>0?`${i}h${a>0?` ${a}m`:""}`:a>0?`${a}m${o>0?` ${o}s`:""}`:`${o}s`},"buildSnapshotName",0,function(e){let t=e.snapshot.repository,r=e.snapshot.worktree;return{repository:t?.name??"—",worktree:r?.branch??r?.folder??"—"}},"buildStatusVariant",0,function(e){return"FAILED"===e?"destructive":"SUCCEEDED"===e?"success":"secondary"},"relativeBuildAge",0,function(e,t,r=Date.now()){if(null===r)return"—";let n=Math.round((Date.parse(e)-r)/1e3),i=new Intl.RelativeTimeFormat(t,{numeric:"auto"});for(let[e,t]of[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60]])if(Math.abs(n)>=t)return i.format(Math.round(n/t),e);return i.format(n,"second")}],90969);var t=e.i(843476),r=e.i(395925),n=e.i(948148),i=e.i(271645),a=e.i(519455),o=e.i(987968),l=e.i(462777),s=e.i(637611);e.s(["RebuildButton",0,function({buildId:e,onCompleted:d,onError:c,size:u="default"}){let p=(0,n.useTranslations)("builds"),[f,m]=(0,i.useState)(!1),h=async()=>{m(!0),c(null);try{let t=await (0,s.controlPlaneRequest)(`mutation RebuildBuild($id: ID!, $requestId: ID!) {
2
+ rebuildBuild(id: $id, requestId: $requestId) { id status }
3
+ }`,{id:e,requestId:(0,l.createClientId)()});await d?.(t.rebuildBuild)}catch(e){c(e instanceof Error?e.message:String(e))}finally{m(!1)}};return(0,t.jsxs)(a.Button,{disabled:f,onClick:e=>{e.stopPropagation(),h()},onKeyDown:e=>e.stopPropagation(),size:u,type:"button",variant:"outline",children:[f?(0,t.jsx)(o.Spinner,{}):(0,t.jsx)(r.RotateCcw,{})," ",p("rebuild")]})}],771777);var d=e.i(716327),c=e.i(21357),u=e.i(755146);e.s(["RunBuildControls",0,function({buildId:e,destinationType:r,preferredDestination:p,onCompleted:f,onError:m,size:h="default"}){let g=(0,n.useTranslations)("builds"),x=p?.generic?null:p??null,[y,v]=(0,i.useState)(x?[x]:[]),[b,w]=(0,i.useState)(x?new Set([x.id]):new Set),[j,S]=(0,i.useState)(!1),[C,E]=(0,i.useState)(!1),[k,N]=(0,i.useState)(!1),D=(0,i.useMemo)(()=>y.filter(e=>b.has(e.id)).map(e=>e.name),[y,b]),R=async()=>{E(!0),m(null);try{let t=(await (0,s.controlPlaneRequest)(`mutation BuildRunDestinations($buildId: ID!, $requestId: ID!) {
4
+ inspectBuildRunDestinations(buildId: $buildId, requestId: $requestId)
5
+ }`,{buildId:e,requestId:(0,l.createClientId)()})).inspectBuildRunDestinations.filter(e=>e.type===r&&!e.generic);v(t),w(e=>{let r=new Set(t.map(e=>e.id));return new Set([...e].filter(e=>r.has(e)))}),S(!0)}catch(e){m(e instanceof Error?e.message:String(e))}finally{E(!1)}},T=async()=>{N(!0),m(null);try{await (0,s.controlPlaneRequest)(`mutation RunCompletedBuild($input: RunBuildInput!) {
6
+ runBuild(input: $input) { id status }
7
+ }`,{input:{buildId:e,destinations:y.filter(e=>b.has(e.id)),requestId:(0,l.createClientId)()}}),w(new Set),await f?.()}catch(e){m(e instanceof Error?e.message:String(e))}finally{N(!1)}};return(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,t.jsxs)(u.DropdownMenu,{onOpenChange:e=>{e&&!j&&R()},children:[(0,t.jsx)(u.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(a.Button,{disabled:C,size:h,type:"button",variant:"outline",children:[C?(0,t.jsx)(o.Spinner,{}):(0,t.jsx)(c.Play,{}),D.length?g("selectedDevices",{count:D.length}):g("selectRunDevices"),(0,t.jsx)(d.ChevronDown,{})]})}),(0,t.jsxs)(u.DropdownMenuContent,{align:"end",className:"w-72",children:[y.map(e=>(0,t.jsxs)(u.DropdownMenuCheckboxItem,{checked:b.has(e.id),onCheckedChange:t=>w(r=>{let n=new Set(r);return t?n.add(e.id):n.delete(e.id),n}),children:[e.name,e.osVersion?` \xb7 ${e.osVersion}`:""]},e.id)),j&&!y.length&&(0,t.jsx)("p",{className:"p-2 text-xs text-muted-foreground",children:g("noCompatibleDevices")})]})]}),(0,t.jsxs)(a.Button,{disabled:k||0===b.size,onClick:()=>void T(),size:h,type:"button",children:[k?(0,t.jsx)(o.Spinner,{}):(0,t.jsx)(c.Play,{})," ",g("run")]})]})}],866026)},747047,111530,e=>{"use strict";let t=`
8
+ id requestId jobId status action destinationType destination snapshot commandSummary artifactDirectory errorCode error outOfDate
9
+ createdAt startedAt finishedAt durationMs updatedAt
10
+ artifacts { id kind relativePath sizeBytes checksum metadata createdAt }
11
+ `;e.s(["BUILD_LIST_FIELDS",0,t],747047);var r=e.i(271645);e.s(["useBuildTimeTicker",0,function(){let[e,t]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=()=>t(Date.now()),r=window.setTimeout(e,0),n=window.setInterval(e,1e3);return()=>{window.clearTimeout(r),window.clearInterval(n)}},[]),e}],111530)},229490,e=>{"use strict";var t=e.i(843476),r=e.i(93384),n=e.i(77071);let i=(0,e.i(456420).default)("scroll-text",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);var a=e.i(573474),o=e.i(861745),l=e.i(948148),s=e.i(271645),d=e.i(340953),c=e.i(929592),u=e.i(487486),p=e.i(519455),f=e.i(515288),m=e.i(59497),h=e.i(776639),g=e.i(82612),x=e.i(793479),y=e.i(110204),v=e.i(967489),b=e.i(987968),w=e.i(784774),j=e.i(677572),S=e.i(624687),C=e.i(520133),E=e.i(637611),k=e.i(90969),N=e.i(747047),D=e.i(771777),R=e.i(866026),T=e.i(111530);let I=`
12
+ id name preBuildScript postBuildScript enabledByDefault timeoutSeconds failureBehavior createdAt updatedAt
13
+ `,A=`export default async function preBuild({
14
+ buildId,
15
+ branch,
16
+ destination,
17
+ action,
18
+ telemetry,
19
+ }) {
20
+ // Runs before the build from the worktree root.
21
+ // telemetry includes localBaseUrl, remoteBaseUrl, selectedBaseUrl,
22
+ // consoleLogsUrl, analyticsEventsUrl, and both collection-enabled flags.
23
+ }`,$=`export default async function postBuild({
24
+ buildId,
25
+ branch,
26
+ destination,
27
+ action,
28
+ buildFolder,
29
+ failed,
30
+ cancelled,
31
+ errorCode,
32
+ error,
33
+ telemetry,
34
+ }) {
35
+ // Runs after every build attempt from the worktree root.
36
+ // telemetry is the same immutable URL and collection-settings snapshot.
37
+ }`,B=["ALL","QUEUED","PREPARING","RUNNING","SUCCEEDED","FAILED","CANCELLED"];function P({open:e,script:r,onOpenChange:n,onSaved:i}){let a=(0,l.useTranslations)("builds"),[o,d]=(0,s.useState)(r?.name??""),[u,f]=(0,s.useState)(r?r.preBuildScript??"":A),[g,w]=(0,s.useState)(r?r.postBuildScript??"":$),[j,C]=(0,s.useState)(r?.enabledByDefault??!1),[k,N]=(0,s.useState)(r?.timeoutSeconds??300),[D,R]=(0,s.useState)(r?.failureBehavior??"FAIL_BUILD"),[T,I]=(0,s.useState)(!1),[B,z]=(0,s.useState)(null),_=async()=>{I(!0),z(null);try{await (0,E.controlPlaneRequest)(`mutation SaveBuildScript($input: SaveBuildScriptInput!) {
38
+ saveBuildScript(input: $input) { id }
39
+ }`,{input:{id:r?.id??null,name:o,preBuildScript:u||null,postBuildScript:g||null,enabledByDefault:j,timeoutSeconds:k,failureBehavior:D}}),await i(),n(!1)}catch(e){z(e instanceof Error?e.message:String(e))}finally{I(!1)}};return(0,t.jsx)(h.Dialog,{onOpenChange:n,open:e,children:(0,t.jsxs)(h.DialogContent,{className:"sm:max-w-2xl",children:[(0,t.jsxs)(h.DialogHeader,{children:[(0,t.jsx)(h.DialogTitle,{children:a(r?"editScript":"newScript")}),(0,t.jsx)(h.DialogDescription,{children:a("scriptDescription")})]}),B&&(0,t.jsx)(c.Alert,{variant:"destructive",children:(0,t.jsx)(c.AlertDescription,{children:B})}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.Label,{htmlFor:"build-script-name",children:a("name")}),(0,t.jsx)(x.Input,{id:"build-script-name",onChange:e=>d(e.target.value),value:o})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.Label,{htmlFor:"pre-build-script",children:a("preBuildScript")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:a("preBuildScriptHelp")}),(0,t.jsx)(S.Textarea,{className:"font-mono text-xs",id:"pre-build-script",onChange:e=>f(e.target.value),rows:8,value:u})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.Label,{htmlFor:"post-build-script",children:a("postBuildScript")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:a("postBuildScriptHelp")}),(0,t.jsx)(S.Textarea,{className:"font-mono text-xs",id:"post-build-script",onChange:e=>w(e.target.value),rows:8,value:g})]}),(0,t.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.Label,{htmlFor:"script-timeout",children:a("timeout")}),(0,t.jsx)(x.Input,{id:"script-timeout",min:1,max:3600,onChange:e=>N(Number(e.target.value)),type:"number",value:k})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(y.Label,{children:a("failureBehavior")}),(0,t.jsxs)(v.Select,{onValueChange:e=>R(e),value:D,children:[(0,t.jsx)(v.SelectTrigger,{children:(0,t.jsx)(v.SelectValue,{})}),(0,t.jsxs)(v.SelectContent,{children:[(0,t.jsx)(v.SelectItem,{value:"FAIL_BUILD",children:a("failureBehaviors.FAIL_BUILD")}),(0,t.jsx)(v.SelectItem,{value:"CONTINUE",children:a("failureBehaviors.CONTINUE")})]})]})]})]}),(0,t.jsxs)("label",{className:"flex items-center gap-2",children:[(0,t.jsx)(m.Checkbox,{checked:j,onCheckedChange:e=>C(!!e)}),a("enabledByDefault")]})]}),(0,t.jsxs)(h.DialogFooter,{children:[(0,t.jsx)(p.Button,{onClick:()=>n(!1),type:"button",variant:"outline",children:a("cancel")}),(0,t.jsxs)(p.Button,{disabled:T||!o.trim()||!u.trim()&&!g.trim(),onClick:()=>void _(),type:"button",children:[T&&(0,t.jsx)(b.Spinner,{})," ",a("save")]})]})]})})}e.s(["BuildsPage",0,function(){let e=(0,l.useTranslations)("builds"),h=(0,o.useLocale)(),x=(0,C.useRouter)(),y=(0,T.useBuildTimeTicker)(),[S,A]=(0,s.useState)([]),[$,z]=(0,s.useState)([]),[_,O]=(0,s.useState)("ALL"),[M,L]=(0,s.useState)(null),[F,q]=(0,s.useState)(!0),[U,V]=(0,s.useState)(!1),[H,W]=(0,s.useState)(null),[G,K]=(0,s.useState)(!1),[X,J]=(0,s.useState)(null),[Z,Q]=(0,s.useState)(new Set),[Y,ee]=(0,s.useState)(!1),[et,er]=(0,s.useState)(!1),en=(0,s.useCallback)(async e=>{e?V(!0):q(!0);try{let t=await (0,E.controlPlaneRequest)(`query BuildsPage($after: ID, $status: BuildStatus) {
40
+ builds(first: 50, after: $after, status: $status) {
41
+ items { ${N.BUILD_LIST_FIELDS} }
42
+ nextCursor
43
+ }
44
+ buildScripts { ${I} }
45
+ }`,{after:e??null,status:"ALL"===_?null:_});A(r=>e?[...r,...t.builds.items]:t.builds.items),L(t.builds.nextCursor),z(t.buildScripts),W(null)}catch(e){W(e instanceof Error?e.message:String(e))}finally{q(!1),V(!1)}},[_]);(0,s.useEffect)(()=>{let e=window.setTimeout(()=>void en(),0);return()=>window.clearTimeout(e)},[en]),(0,s.useEffect)(()=>(0,E.controlPlaneSubscriptions)().subscribe({query:"subscription BuildsChanged { buildsChanged { id } }"},{next:()=>void en(),error:()=>void 0,complete:()=>void 0}),[en]);let ei=async e=>{try{await (0,E.controlPlaneRequest)("mutation DeleteBuildScript($id: ID!) { deleteBuildScript(id: $id) }",{id:e}),await en()}catch(e){W(e instanceof Error?e.message:String(e))}},ea=(0,s.useMemo)(()=>{let e=[],t=new Intl.DateTimeFormat(h,{dateStyle:"full"});for(let r of S){let n=new Date(r.startedAt??r.createdAt),i=`${n.getFullYear()}-${n.getMonth()}-${n.getDate()}`,a=e.at(-1);a?.dateKey===i?a.items.push(r):e.push({key:`${i}-${r.id}`,dateKey:i,label:t.format(n),items:[r]})}return e},[S,h]),eo=async()=>{if(Z.size){er(!0),W(null);try{await (0,E.controlPlaneRequest)("mutation DeleteBuilds($ids: [ID!]!) { deleteBuilds(ids: $ids) }",{ids:[...Z]}),Q(new Set),ee(!1),await en()}catch(e){W(e instanceof Error?e.message:String(e))}finally{er(!1)}}};return(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-[1500px] flex-col gap-6",children:[(0,t.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:e("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:e("description")})]})}),H&&(0,t.jsx)(c.Alert,{variant:"destructive",children:(0,t.jsx)(c.AlertDescription,{children:H})}),(0,t.jsxs)(j.Tabs,{defaultValue:"history",children:[(0,t.jsxs)(j.TabsList,{children:[(0,t.jsxs)(j.TabsTrigger,{value:"history",children:[(0,t.jsx)(r.Hammer,{})," ",e("history")]}),(0,t.jsxs)(j.TabsTrigger,{value:"scripts",children:[(0,t.jsx)(i,{})," ",e("buildScripts")]})]}),(0,t.jsxs)(j.TabsContent,{className:"space-y-4",value:"history",children:[(0,t.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[Z.size>0&&(0,t.jsxs)(p.Button,{disabled:et,onClick:()=>ee(!0),variant:"destructive",children:[et?(0,t.jsx)(b.Spinner,{}):(0,t.jsx)(a.Trash2,{}),e("deleteSelected",{count:Z.size})]}),(0,t.jsxs)(v.Select,{onValueChange:e=>{Q(new Set),O(e)},value:_,children:[(0,t.jsx)(v.SelectTrigger,{className:"w-48","aria-label":e("filterStatus"),children:(0,t.jsx)(v.SelectValue,{})}),(0,t.jsx)(v.SelectContent,{children:B.map(r=>(0,t.jsx)(v.SelectItem,{value:r,children:"ALL"===r?e("allStatuses"):e(`statuses.${r}`)},r))})]})]}),F&&!S.length?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(b.Spinner,{})," ",e("loading")]}):S.length?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(f.Card,{className:"gap-0 py-0",children:(0,t.jsxs)(w.Table,{children:[(0,t.jsx)(w.TableHeader,{children:(0,t.jsxs)(w.TableRow,{className:"hover:bg-transparent",children:[(0,t.jsx)(w.TableHead,{className:"w-12",children:(0,t.jsx)("span",{className:"sr-only",children:e("selectBuilds")})}),(0,t.jsx)(w.TableHead,{children:e("build")}),(0,t.jsx)(w.TableHead,{children:e("status")}),(0,t.jsx)(w.TableHead,{children:e("action")}),(0,t.jsx)(w.TableHead,{children:e("destination")}),(0,t.jsx)(w.TableHead,{children:e("startedAt")}),(0,t.jsx)(w.TableHead,{className:"text-right",children:e("actionsLabel")})]})}),(0,t.jsx)(w.TableBody,{children:ea.map(r=>{let n=r.items.map(e=>e.id),i=n.filter(e=>Z.has(e)).length;return(0,t.jsxs)(s.Fragment,{children:[(0,t.jsxs)(w.TableRow,{className:"bg-muted/20 hover:bg-muted/20",children:[(0,t.jsx)(w.TableCell,{className:"py-1.5",children:(0,t.jsx)(m.Checkbox,{"aria-label":e("selectDate",{date:r.label}),checked:i===n.length||i>0&&"indeterminate",onCheckedChange:e=>Q(t=>{let r=new Set(t);for(let t of n)!0===e?r.add(t):r.delete(t);return r})})}),(0,t.jsx)(w.TableCell,{className:"py-1.5 text-xs font-normal text-muted-foreground",colSpan:6,children:r.label})]}),r.items.map(r=>{let n=(0,k.buildSnapshotName)(r),i=r.startedAt??r.createdAt,a="SUCCEEDED"===r.status&&r.artifacts.some(e=>"RUNNABLE_APP"===e.kind);return(0,t.jsxs)(w.TableRow,{"aria-label":e("viewBuild"),className:"cursor-pointer focus-visible:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",onClick:()=>x.push(`/builds/${r.id}`),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),x.push(`/builds/${r.id}`))},role:"link",tabIndex:0,children:[(0,t.jsx)(w.TableCell,{onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:(0,t.jsx)(m.Checkbox,{"aria-label":e("selectBuild",{id:r.id}),checked:Z.has(r.id),onCheckedChange:e=>Q(t=>{let n=new Set(t);return!0===e?n.add(r.id):n.delete(r.id),n})})}),(0,t.jsxs)(w.TableCell,{className:"min-w-56 whitespace-normal",children:[(0,t.jsx)(C.Link,{className:"font-medium hover:underline",href:`/builds/${r.id}`,onClick:e=>e.stopPropagation(),children:n.repository}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:n.worktree})]}),(0,t.jsx)(w.TableCell,{children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[(0,t.jsx)(u.Badge,{variant:(0,k.buildStatusVariant)(r.status),children:e(`statuses.${r.status}`)}),r.outOfDate&&(0,t.jsx)(u.Badge,{className:"border-amber-500/40 text-amber-700 dark:text-amber-300",variant:"outline",children:e("outOfDate")})]})}),(0,t.jsx)(w.TableCell,{children:(0,t.jsx)(u.Badge,{variant:"outline",children:e(`actions.${r.action}`)})}),(0,t.jsx)(w.TableCell,{children:r.destination.name}),(0,t.jsx)(w.TableCell,{className:"text-muted-foreground",children:(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("time",{dateTime:i,title:new Date(i).toLocaleString(h),children:(0,k.relativeBuildAge)(i,h,y)}),(0,t.jsx)("span",{className:"text-xs",children:e("durationValue",{duration:(0,k.buildDuration)(r,y)})})]})}),(0,t.jsx)(w.TableCell,{className:"text-right",children:(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,t.jsx)(D.RebuildButton,{buildId:r.id,onCompleted:()=>en(),onError:W,size:"sm"}),a&&(0,t.jsx)(R.RunBuildControls,{buildId:r.id,destinationType:r.destinationType,onCompleted:en,onError:W,preferredDestination:r.destination,size:"sm"})]})})]},r.id)})]},r.key)})})]})}),M&&(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsxs)(p.Button,{disabled:U,onClick:()=>void en(M),variant:"outline",children:[U&&(0,t.jsx)(b.Spinner,{})," ",e("loadMore")]})})]}):(0,t.jsx)(g.Empty,{className:"border py-12",children:(0,t.jsxs)(g.EmptyHeader,{children:[(0,t.jsx)(g.EmptyMedia,{variant:"icon",children:(0,t.jsx)(r.Hammer,{})}),(0,t.jsx)(g.EmptyTitle,{children:e("emptyTitle")}),(0,t.jsx)(g.EmptyDescription,{children:e("emptyDescription")})]})})]}),(0,t.jsxs)(j.TabsContent,{className:"space-y-4",value:"scripts",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(p.Button,{onClick:()=>{J(null),K(!0)},children:[(0,t.jsx)(n.Plus,{})," ",e("newScript")]})}),$.length?(0,t.jsx)("div",{className:"grid gap-3 lg:grid-cols-2",children:$.map(r=>(0,t.jsxs)(f.Card,{children:[(0,t.jsx)(f.CardHeader,{children:(0,t.jsxs)(f.CardTitle,{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:r.name}),r.enabledByDefault&&(0,t.jsx)(u.Badge,{children:e("defaultEnabled")})]})}),(0,t.jsxs)(f.CardContent,{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:[r.preBuildScript&&(0,t.jsx)(u.Badge,{variant:"outline",children:e("preBuild")}),r.postBuildScript&&(0,t.jsx)(u.Badge,{variant:"outline",children:e("postBuild")}),(0,t.jsx)("span",{children:e("timeoutSeconds",{count:r.timeoutSeconds})}),(0,t.jsx)("span",{children:e(`failureBehaviors.${r.failureBehavior}`)})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(p.Button,{onClick:()=>{J(r),K(!0)},size:"sm",variant:"outline",children:e("edit")}),(0,t.jsx)(p.Button,{"aria-label":e("deleteScript"),onClick:()=>void ei(r.id),size:"icon-sm",variant:"destructive",children:(0,t.jsx)(a.Trash2,{})})]})]})]},r.id))}):(0,t.jsx)(g.Empty,{className:"border py-12",children:(0,t.jsxs)(g.EmptyHeader,{children:[(0,t.jsx)(g.EmptyMedia,{variant:"icon",children:(0,t.jsx)(i,{})}),(0,t.jsx)(g.EmptyTitle,{children:e("noScripts")}),(0,t.jsx)(g.EmptyDescription,{children:e("noScriptsDescription")})]})})]})]}),G&&(0,t.jsx)(P,{onOpenChange:K,onSaved:en,open:G,script:X}),(0,t.jsx)(d.ConfirmationDialog,{actionLabel:e("deleteBuilds"),cancelLabel:e("cancel"),description:e("deleteBuildsDescription",{count:Z.size}),onConfirm:eo,onOpenChange:ee,open:Y,title:e("deleteBuildsTitle",{count:Z.size})})]})}],229490)}]);