@ai-development-environment/server 0.0.99 → 0.0.101

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 (126) 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]/(dashboard)/actions/page.js.nft.json +1 -1
  6. package/standalone/.next/server/app/[locale]/(dashboard)/actions/page_client-reference-manifest.js +1 -1
  7. package/standalone/.next/server/app/[locale]/(dashboard)/apps/[appId]/page.js.nft.json +1 -1
  8. package/standalone/.next/server/app/[locale]/(dashboard)/apps/[appId]/page_client-reference-manifest.js +1 -1
  9. package/standalone/.next/server/app/[locale]/(dashboard)/builds/[buildId]/output/route.js.nft.json +1 -1
  10. package/standalone/.next/server/app/[locale]/(dashboard)/changes/page.js.nft.json +1 -1
  11. package/standalone/.next/server/app/[locale]/(dashboard)/changes/page_client-reference-manifest.js +1 -1
  12. package/standalone/.next/server/app/[locale]/(dashboard)/commands/runs/[runId]/output/route.js.nft.json +1 -1
  13. package/standalone/.next/server/app/[locale]/(dashboard)/comments/page.js.nft.json +1 -1
  14. package/standalone/.next/server/app/[locale]/(dashboard)/comments/page_client-reference-manifest.js +1 -1
  15. package/standalone/.next/server/app/[locale]/(dashboard)/github-cache/page.js.nft.json +1 -1
  16. package/standalone/.next/server/app/[locale]/(dashboard)/github-cache/page_client-reference-manifest.js +1 -1
  17. package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/[issueKey]/page.js.nft.json +1 -1
  18. package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  19. package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/page.js.nft.json +1 -1
  20. package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/page_client-reference-manifest.js +1 -1
  21. package/standalone/.next/server/app/[locale]/(dashboard)/plans/[runId]/page.js.nft.json +1 -1
  22. package/standalone/.next/server/app/[locale]/(dashboard)/plans/[runId]/page_client-reference-manifest.js +1 -1
  23. package/standalone/.next/server/app/[locale]/(dashboard)/plans/page.js.nft.json +1 -1
  24. package/standalone/.next/server/app/[locale]/(dashboard)/plans/page_client-reference-manifest.js +1 -1
  25. package/standalone/.next/server/app/[locale]/(dashboard)/pull-requests/[owner]/[repository]/[number]/page.js.nft.json +1 -1
  26. package/standalone/.next/server/app/[locale]/(dashboard)/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
  27. package/standalone/.next/server/app/[locale]/(dashboard)/pull-requests/page.js.nft.json +1 -1
  28. package/standalone/.next/server/app/[locale]/(dashboard)/pull-requests/page_client-reference-manifest.js +1 -1
  29. package/standalone/.next/server/app/[locale]/(dashboard)/sessions/[runId]/page.js.nft.json +1 -1
  30. package/standalone/.next/server/app/[locale]/(dashboard)/sessions/[runId]/page_client-reference-manifest.js +1 -1
  31. package/standalone/.next/server/app/[locale]/(dashboard)/sessions/page.js.nft.json +1 -1
  32. package/standalone/.next/server/app/[locale]/(dashboard)/sessions/page_client-reference-manifest.js +1 -1
  33. package/standalone/.next/server/app/[locale]/(dashboard)/usage/page.js.nft.json +1 -1
  34. package/standalone/.next/server/app/[locale]/(dashboard)/usage/page_client-reference-manifest.js +1 -1
  35. package/standalone/.next/server/app/[locale]/(dashboard)/workflows/[workflowId]/edit/page.js.nft.json +1 -1
  36. package/standalone/.next/server/app/[locale]/(dashboard)/workflows/[workflowId]/edit/page_client-reference-manifest.js +1 -1
  37. package/standalone/.next/server/app/[locale]/(dashboard)/workflows/new/page.js.nft.json +1 -1
  38. package/standalone/.next/server/app/[locale]/(dashboard)/workflows/new/page_client-reference-manifest.js +1 -1
  39. package/standalone/.next/server/app/[locale]/(dashboard)/worktrees/[worktreeId]/page.js.nft.json +1 -1
  40. package/standalone/.next/server/app/[locale]/(dashboard)/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
  41. package/standalone/.next/server/app/[locale]/(dashboard)/worktrees/page.js.nft.json +1 -1
  42. package/standalone/.next/server/app/[locale]/(dashboard)/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/_tree.segment.rsc +1 -1
  48. package/standalone/.next/server/app/_not-found.html +1 -1
  49. package/standalone/.next/server/app/_not-found.rsc +1 -1
  50. package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  51. package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  52. package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  53. package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/complete/route.js.nft.json +1 -1
  54. package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/download/route.js.nft.json +1 -1
  55. package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/route.js.nft.json +1 -1
  56. package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/upload/route.js.nft.json +1 -1
  57. package/standalone/.next/server/app/api/agent/run-attachments/[attachmentId]/route.js.nft.json +1 -1
  58. package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js.nft.json +1 -1
  59. package/standalone/.next/server/app/api/codebases/by-path/route.js.nft.json +1 -1
  60. package/standalone/.next/server/app/api/codebases/route.js.nft.json +1 -1
  61. package/standalone/.next/server/app/api/graphql/route.js.nft.json +1 -1
  62. package/standalone/.next/server/app/api/ios/apns-devices/route.js.nft.json +1 -1
  63. package/standalone/.next/server/app/api/ios/devices/export.tsv/route.js.nft.json +1 -1
  64. package/standalone/.next/server/app/api/ios/enrollment/start/route.js.nft.json +1 -1
  65. package/standalone/.next/server/app/api/ios/notification-devices/route.js.nft.json +1 -1
  66. package/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  67. package/standalone/.next/server/app/api/public/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route.js.nft.json +1 -1
  68. package/standalone/.next/server/app/api/public/builds/[buildId]/artifacts/[artifactId]/route.js.nft.json +1 -1
  69. package/standalone/.next/server/app/api/public/github/webhook/route.js.nft.json +1 -1
  70. package/standalone/.next/server/app/api/public/gitlab/webhook/route.js.nft.json +1 -1
  71. package/standalone/.next/server/app/api/public/ios/enrollment-profile/route.js.nft.json +1 -1
  72. package/standalone/.next/server/app/api/public/ios/profile-response/route.js.nft.json +1 -1
  73. package/standalone/.next/server/app/api/public/jira/webhook/route.js.nft.json +1 -1
  74. package/standalone/.next/server/app/api/public/sse/[token]/route.js.nft.json +1 -1
  75. package/standalone/.next/server/app/api/sse/history/export/route.js.nft.json +1 -1
  76. package/standalone/.next/server/app/api/telemetry/analytics-events/route.js.nft.json +1 -1
  77. package/standalone/.next/server/app/api/telemetry/console-logs/route.js.nft.json +1 -1
  78. package/standalone/.next/server/app/api/telemetry/export/route.js.nft.json +1 -1
  79. package/standalone/.next/server/app/api/tools/call/route.js.nft.json +1 -1
  80. package/standalone/.next/server/app/api/tools/catalog/route.js.nft.json +1 -1
  81. package/standalone/.next/server/app/api/worktrees/[worktreeId]/diff-image/route.js.nft.json +1 -1
  82. package/standalone/.next/server/chunks/[root-of-the-server]__03aos_4._.js +1 -1
  83. package/standalone/.next/server/chunks/_0e8lp3p._.js +1 -1
  84. package/standalone/.next/server/chunks/_0fwwxlu._.js +1 -1
  85. package/standalone/.next/server/chunks/_0h78qjg._.js +1 -1
  86. package/standalone/.next/server/chunks/_0ndnc91._.js +1 -1
  87. package/standalone/.next/server/chunks/_0wpfe7q._.js +1 -1
  88. package/standalone/.next/server/chunks/_1-vdyhc._.js +1 -1
  89. package/standalone/.next/server/chunks/_1gt6607._.js +1 -1
  90. package/standalone/.next/server/chunks/_1jwsn5v._.js +1 -1
  91. package/standalone/.next/server/chunks/_1qjb83a._.js +1 -1
  92. package/standalone/.next/server/chunks/_1zwfwcs._.js +1 -1
  93. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__03lyeon._.js +1 -1
  94. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y7gd01._.js +1 -1
  95. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__10jrizr._.js +1 -1
  96. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__1rcvzx1._.js +1 -1
  97. package/standalone/.next/server/chunks/ssr/_0gsta10._.js +1 -1
  98. package/standalone/.next/server/chunks/ssr/_0k25g0q._.js +1 -1
  99. package/standalone/.next/server/chunks/ssr/_0mbr53g._.js +1 -1
  100. package/standalone/.next/server/chunks/ssr/_0p8nq_k._.js +1 -1
  101. package/standalone/.next/server/chunks/ssr/_1gn4tn4._.js +1 -1
  102. package/standalone/.next/server/chunks/ssr/src_components_workflows_workflow-editor_tsx_1eo69h2._.js +1 -1
  103. package/standalone/.next/server/middleware-build-manifest.js +3 -3
  104. package/standalone/.next/server/pages/404.html +1 -1
  105. package/standalone/.next/server/pages/500.html +1 -1
  106. package/standalone/.next/server/server-reference-manifest.js +1 -1
  107. package/standalone/.next/server/server-reference-manifest.json +1 -1
  108. package/standalone/.next/static/chunks/{436x7m1mvj6hx.js → 0a2njf53y1b_a.js} +5 -5
  109. package/standalone/.next/static/chunks/{3rg_-g4l65tdm.js → 0ih1_jixkezy9.js} +1 -1
  110. package/standalone/.next/static/chunks/{1y_k2l4tani4i.js → 1-95dtd9sp1ri.js} +1 -1
  111. package/standalone/.next/static/chunks/117mbxzvbdo5r.js +38 -0
  112. package/standalone/.next/static/chunks/{1fvp3ex0gde7v.js → 1e_b3ymyt3673.js} +1 -1
  113. package/standalone/.next/static/chunks/{13dmoqt_x5qg3.js → 1hlskd2wydmjh.js} +1 -1
  114. package/standalone/.next/static/chunks/{28xljttzejclr.js → 1s-wwfg3sdyjh.js} +4 -4
  115. package/standalone/.next/static/chunks/2hviq_ydapgns.js +3 -0
  116. package/standalone/.next/static/chunks/33pqqy7c3sgg7.js +38 -0
  117. package/standalone/.next/static/chunks/{3fps7kmx8mnhr.js → 3oslbazmmg72z.js} +5 -5
  118. package/standalone/.next/static/chunks/{19o8lqhow_wle.js → 3psu0owhqo5ri.js} +6 -6
  119. package/standalone/.next/static/chunks/{3_08sih2rcs9k.js → 3swi28-0k8olm.js} +1 -1
  120. package/standalone/.next/static/chunks/{2lod_i2dzh949.js → 42ywmggw6zx17.js} +2 -2
  121. package/standalone/.next/static/chunks/0lriz5ed2mmt1.js +0 -3
  122. package/standalone/.next/static/chunks/3-pqgzhb67rrw.js +0 -38
  123. package/standalone/.next/static/chunks/3plqps194w7h1.js +0 -38
  124. /package/standalone/.next/static/{Pro8D0Hv2IhphMUT1Ihzv → y9Hi8CBWpu_MxfgH-bM8Z}/_buildManifest.js +0 -0
  125. /package/standalone/.next/static/{Pro8D0Hv2IhphMUT1Ihzv → y9Hi8CBWpu_MxfgH-bM8Z}/_clientMiddlewareManifest.js +0 -0
  126. /package/standalone/.next/static/{Pro8D0Hv2IhphMUT1Ihzv → y9Hi8CBWpu_MxfgH-bM8Z}/_ssgManifest.js +0 -0
@@ -45,7 +45,7 @@ module.exports=[876596,a=>{"use strict";var b=a.i(187924),c=a.i(46352),d=a.i(585
45
45
  githubActionsWorkflowRuns(source: WORKFLOW_AUTOMATION, codebaseRepositoryId: $codebaseRepositoryId, first: 25) {
46
46
  items { id displayTitle headBranch }
47
47
  }
48
- }`,variables:{codebaseRepositoryId:b},map:a=>a.githubActionsWorkflowRuns?.items.map(a=>({value:a.id,label:a.displayTitle||a.id,description:a.headBranch??void 0}))??[]};default:return null}}(a,b),[a,b]),d=c?JSON.stringify({query:c.query,variables:c.variables}):null,[e,f]=(0,t.useState)({key:"",options:[],error:!1});return((0,t.useEffect)(()=>{if(!c||!d)return;let a=!1;return(0,P.controlPlaneRequest)(c.query,c.variables).then(b=>{a||f({key:d,options:c.map(b),error:!1})}).catch(()=>{a||f({key:d,options:[],error:!0})}),()=>{a=!0}},[c,d]),c&&d)?e.key!==d?{options:[],loading:!0,fallback:!1}:{options:e.options,loading:!1,fallback:e.error||0===e.options.length}:{options:[],loading:!1,fallback:!0}}var aE=a.i(849688);let aF=(0,h.default)("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);var aG=a.i(210787);function aH(a){return!!a&&"object"==typeof a&&!Array.isArray(a)&&"SESSION"===a.source}function aI(a){return a&&"object"==typeof a&&!Array.isArray(a)&&"LITERAL"===a.source?a.value:a}function aJ(){let a=(0,s.useTranslations)("workflows");return(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a("interpolationHelp",{token:"{{path}}",example:"{{worktree.baseBranch}}"})})}function aK({mode:a,onValueChange:c}){let d=(0,s.useTranslations)("workflows");return(0,b.jsxs)(aG.ToggleGroup,{"aria-label":d("valueModeToggle"),onValueChange:a=>{("literal"===a||"session"===a)&&c(a)},size:"sm",spacing:0,type:"single",value:a,variant:"outline",children:[(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(aG.ToggleGroupItem,{"aria-label":d("valueModeLiteral"),className:"size-7 px-0 aria-checked:bg-accent aria-checked:text-accent-foreground",value:"literal",children:(0,b.jsx)(aF,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:d("valueModeLiteral")})]}),(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(aG.ToggleGroupItem,{"aria-label":d("valueModeSession"),className:"size-7 px-0 aria-checked:bg-accent aria-checked:text-accent-foreground",value:"session",children:(0,b.jsx)(aE.Braces,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:d("valueModeSession")})]})]})}function aL({label:a,help:c,allowCustomSessionPath:d=!0,defaultSessionPath:e,sessionEnabled:f,interpolationEnabled:g=!1,value:h,onChange:i,sessionPaths:j,children:k}){let l=(0,s.useTranslations)("workflows"),m=(0,t.useId)(),n=aH(h)?"session":"literal",o=j.map(({path:a,description:b})=>({value:a,label:a,description:b}));return(0,b.jsxs)(B.Field,{children:[(0,b.jsxs)("div",{className:"flex items-end justify-between gap-2",children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",htmlFor:m,children:a}),f&&(0,b.jsx)(aK,{mode:n,onValueChange:a=>i("session"===a?{source:"SESSION",path:j.find(({path:a})=>a===e)?.path??j[0]?.path??""}:"")})]}),"session"===n?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(T.SearchableSelect,{allowCustomValue:d,ariaLabel:l("sessionBindingLabel"),emptyMessage:l("noOptions"),onValueChange:a=>i({source:"SESSION",path:a}),options:o,placeholder:l("sessionPathPlaceholder"),searchPlaceholder:l("searchPlaceholder"),value:aH(h)?h.path:""}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:l("sessionBindingHelp")})]}):(0,b.jsxs)(b.Fragment,{children:[k(aI(h),i,m),c&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:c}),g&&(0,b.jsx)(aJ,{})]})]})}function aM(a){return"string"==typeof a?a:""}function aN(a,b){if(!b)return null;let c=a[b];return"string"==typeof c&&c.length>0?c:null}function aO(a){return!!a.valueModes?.includes("session")}function aP(a){return!!a.valueModes?.includes("interpolation")}function aQ({field:a,value:c,onChange:d}){let e=(0,s.useTranslations)("workflows"),f=(0,t.useId)(),g=a.options?.kind==="static"?a.options.options:[];return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",htmlFor:f,children:a.label}),(0,b.jsxs)(F.Select,{onValueChange:a=>d(a),value:aM(aI(c)),children:[(0,b.jsx)(F.SelectTrigger,{className:"w-full",id:f,children:(0,b.jsx)(F.SelectValue,{placeholder:e("selectPlaceholder")})}),(0,b.jsx)(F.SelectContent,{children:g.map(a=>(0,b.jsx)(F.SelectItem,{value:a.value,children:a.label??a.value},a.value))})]}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help})]})}function aR({field:a,value:c,onChange:d,sessionPaths:e}){return(0,b.jsx)(aL,{help:a.help,interpolationEnabled:aP(a),label:a.label,onChange:d,sessionEnabled:aO(a),sessionPaths:e,value:c,children:(c,d,e)=>a.multiline?(0,b.jsx)(L.Textarea,{className:"min-h-20 text-sm",id:e,onChange:a=>d(a.target.value),placeholder:a.placeholder,value:aM(c)}):(0,b.jsx)(C.Input,{id:e,onChange:a=>d(a.target.value),placeholder:a.placeholder,value:aM(c)})})}function aS({field:a,value:c,onChange:d,sessionPaths:e}){return(0,b.jsx)(aL,{help:a.help,label:a.label,onChange:d,sessionEnabled:aO(a),sessionPaths:e,value:c,children:(c,d,e)=>(0,b.jsx)(C.Input,{id:e,max:a.maximum,min:a.minimum,onChange:a=>d(""===a.target.value?void 0:Number(a.target.value)),placeholder:a.placeholder,step:a.integer?1:void 0,type:"number",value:"number"==typeof c&&Number.isFinite(c)?String(c):""})})}function aT({field:a,value:c,onChange:d}){let e=(0,t.useId)();return(0,b.jsxs)(B.Field,{orientation:"horizontal",children:[(0,b.jsx)(y.Checkbox,{checked:!0===aI(c),id:e,onCheckedChange:a=>d(!0===a)}),(0,b.jsxs)(B.FieldContent,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",htmlFor:e,children:a.label}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help})]})]})}function aU({field:a,value:c,onChange:d}){let e=Array.isArray(c)?c.map(String):[];return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:a.label}),(0,b.jsx)(V.McpPresetPicker,{kind:a.presetKind,onChange:d,selectedIds:e,showAvailability:null==a.presetKind}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help})]})}function aV({field:a,config:c,value:d,onChange:e,sessionPaths:f}){let g=(0,s.useTranslations)("workflows"),h=a.options?.kind==="resource"?a.options:null,i=aN(c,h?.scopeFrom),{options:j,loading:k}=aD(h?.resource??"codebase",i),l=h?.sessionPath,m=l?f.filter(({path:a})=>{let[b,c]=l.split(".");return a===l||a.startsWith(`${b}.`)&&a.endsWith(`.${c}`)}):f;return(0,b.jsx)(aL,{allowCustomSessionPath:!l,defaultSessionPath:l,help:a.help,interpolationEnabled:aP(a),label:a.label,onChange:e,sessionEnabled:aO(a),sessionPaths:m,value:d,children:(c,d)=>(0,b.jsx)(T.SearchableSelect,{allowCustomValue:!0,ariaLabel:a.label,disabled:k,emptyMessage:g("noOptions"),onValueChange:d,options:j,placeholder:a.placeholder??g("selectPlaceholder"),searchPlaceholder:g("searchPlaceholder"),value:aM(c)})})}function aW({field:a,config:c,value:d,onChange:e}){let f=(0,s.useTranslations)("workflows"),g=a.options?.kind==="resource"?a.options:null,h=aN(c,g?.scopeFrom),{options:i,loading:j}=aD(g?.resource??"codebase",h),k=Array.isArray(d)?d.map(String):[],l=i.filter(a=>!k.includes(a.value));return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:a.label}),(0,b.jsx)(E.ItemGroup,{className:"gap-1.5",children:k.map(a=>(0,b.jsxs)(E.Item,{size:"xs",variant:"muted",children:[(0,b.jsx)(E.ItemContent,{className:"min-w-0",children:(0,b.jsx)(E.ItemTitle,{className:"block truncate text-xs",children:i.find(b=>b.value===a)?.label??a})}),(0,b.jsx)(E.ItemActions,{children:(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Button,{"aria-label":f("removeRow"),className:"size-7",onClick:()=>{e(k.filter(b=>b!==a))},size:"icon",type:"button",variant:"ghost",children:(0,b.jsx)(q.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:f("removeRow")})]})})]},a))}),(0,b.jsx)(T.SearchableSelect,{allowCustomValue:!0,ariaLabel:a.label,disabled:j,emptyMessage:f("noOptions"),onValueChange:a=>{a&&!k.includes(a)&&e([...k,a])},options:l,placeholder:a.placeholder??f("addRow"),searchPlaceholder:f("searchPlaceholder"),value:""}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help}),aP(a)&&(0,b.jsx)(aJ,{})]})}function aX({field:a,value:c,onChange:d}){let e=(0,s.useTranslations)("workflows"),f=Array.isArray(c)?c.map(String):[];return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:a.label}),(0,b.jsx)(B.FieldGroup,{className:"gap-1.5",children:f.map((c,g)=>(0,b.jsxs)(D.InputGroup,{children:[(0,b.jsx)(D.InputGroupInput,{onChange:a=>{let b;return b=a.target.value,d(f.map((a,c)=>c===g?b:a))},placeholder:a.placeholder,value:c}),(0,b.jsx)(D.InputGroupAddon,{align:"inline-end",children:(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(D.InputGroupButton,{"aria-label":e("removeRow"),onClick:()=>d(f.filter((a,b)=>b!==g)),size:"icon-xs",children:(0,b.jsx)(q.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:e("removeRow")})]})})]},g))}),(0,b.jsxs)(w.Button,{onClick:()=>d([...f,""]),size:"sm",type:"button",variant:"outline",children:[(0,b.jsx)(l.Plus,{className:"size-3.5"})," ",e("addRow")]}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help}),aP(a)&&(0,b.jsx)(aJ,{})]})}function aY({field:a,value:c,onChange:d}){let e=(0,s.useTranslations)("workflows"),f=c&&"object"==typeof c&&!Array.isArray(c)?Object.entries(c).map(([a,b])=>[a,b]):[],g=a=>{let b={};for(let[c,d]of a)c&&(b[c]=d);d(b)};return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:a.label}),(0,b.jsx)(B.FieldGroup,{className:"gap-1.5",children:f.map(([a,c],d)=>(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(C.Input,{className:"w-2/5",onChange:a=>g(f.map((b,c)=>c===d?[a.target.value,b[1]]:b)),placeholder:e("recordKeyPlaceholder"),value:a}),(0,b.jsx)(C.Input,{className:"min-w-0 flex-1",onChange:a=>g(f.map((b,c)=>c===d?[b[0],a.target.value]:b)),placeholder:e("recordValuePlaceholder"),value:aM(c)}),(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Button,{"aria-label":e("removeRow"),className:"size-7 shrink-0",onClick:()=>g(f.filter((a,b)=>b!==d)),size:"icon",type:"button",variant:"ghost",children:(0,b.jsx)(q.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:e("removeRow")})]})]},d))}),(0,b.jsxs)(w.Button,{onClick:()=>g([...f,["",""]]),size:"sm",type:"button",variant:"outline",children:[(0,b.jsx)(l.Plus,{className:"size-3.5"})," ",e("addRow")]}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help}),aP(a)&&(0,b.jsx)(aJ,{})]})}function aZ({field:a,value:c,onChange:d}){let e=(0,t.useId)(),[f,g]=(0,t.useState)(()=>void 0===c?"":JSON.stringify(c,null,2)),[h,i]=(0,t.useState)(null),j=(0,t.useRef)(f);return(0,t.useEffect)(()=>{let a=void 0===c?"":JSON.stringify(c,null,2);a!==j.current&&(g(a),j.current=a,i(null))},[c]),(0,b.jsxs)(B.Field,{"data-invalid":!!h,children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",htmlFor:e,children:a.label}),(0,b.jsx)(L.Textarea,{"aria-invalid":!!h,className:"min-h-24 font-mono text-xs",id:e,onChange:a=>(a=>{if(g(a),""===a.trim()){j.current="",i(null),d(void 0);return}try{let b=JSON.parse(a);j.current=JSON.stringify(b,null,2),i(null),d(b)}catch(a){i(a instanceof Error?a.message:String(a))}})(a.target.value),placeholder:a.placeholder,value:f}),h?(0,b.jsx)(B.FieldError,{className:"text-[10px]",children:h}):(0,b.jsxs)(b.Fragment,{children:[a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help}),aP(a)&&(0,b.jsx)(aJ,{})]})]})}function a$(a){let{field:c,value:d,onChange:e,sessionPaths:f}=a,g=(0,s.useTranslations)("workflows"),h=function(a){if(null==a)return ax;if("object"!=typeof a||Array.isArray(a))return null;if("ALL"===a.op||"ANY"===a.op){let b=a.conditions;if(!Array.isArray(b))return null;let c=[];for(let a of b){let b=ay(a);if(!b)return null;c.push(b)}return{mode:a.op,rows:c}}let b=ay(a);return b?{mode:"ALL",rows:[b]}:null}(d),i=f.map(({path:a,description:b})=>({value:a,label:a,description:b}));if(!h)return(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(aZ,{...a}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:g("conditionAdvanced")})]});let j=a=>e(function(a){if(0!==a.rows.length)return 1===a.rows.length?az(a.rows[0]):{op:a.mode,conditions:a.rows.map(az)}}(a)),k=(a,b)=>j({...h,rows:h.rows.map((c,d)=>d===a?{...c,...b}:c)});return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:c.label}),h.rows.length>1&&(0,b.jsxs)(F.Select,{onValueChange:a=>j({...h,mode:"ANY"===a?"ANY":"ALL"}),value:h.mode,children:[(0,b.jsx)(F.SelectTrigger,{"aria-label":g("conditionMatchMode"),className:"w-full",children:(0,b.jsx)(F.SelectValue,{})}),(0,b.jsxs)(F.SelectContent,{children:[(0,b.jsx)(F.SelectItem,{value:"ALL",children:g("conditionMatchAll")}),(0,b.jsx)(F.SelectItem,{value:"ANY",children:g("conditionMatchAny")})]})]}),(0,b.jsx)(B.FieldGroup,{className:"gap-1.5",children:h.rows.map((a,c)=>{var d;return(0,b.jsxs)("div",{className:"space-y-1.5 rounded-lg border p-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsx)(T.SearchableSelect,{allowCustomValue:!0,ariaLabel:g("conditionField"),emptyMessage:g("noOptions"),onValueChange:a=>k(c,{path:a}),options:i,placeholder:g("sessionPathPlaceholder"),searchPlaceholder:g("searchPlaceholder"),value:a.path})}),(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Button,{"aria-label":g("removeRow"),className:"size-7 shrink-0",onClick:()=>j({...h,rows:h.rows.filter((a,b)=>b!==c)}),size:"icon",type:"button",variant:"ghost",children:(0,b.jsx)(q.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:g("removeRow")})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)(F.Select,{onValueChange:a=>k(c,{operator:a}),value:a.operator,children:[(0,b.jsx)(F.SelectTrigger,{"aria-label":g("conditionOperator"),className:"w-40 shrink-0",children:(0,b.jsx)(F.SelectValue,{})}),(0,b.jsx)(F.SelectContent,{children:av.map(a=>(0,b.jsx)(F.SelectItem,{value:a.value,children:g(`conditionOperators.${a.value}`)},a.value))})]}),aw(a.operator)&&(0,b.jsxs)(b.Fragment,{children:[aH(a.value)?(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsx)(T.SearchableSelect,{allowCustomValue:!0,ariaLabel:g("sessionBindingLabel"),emptyMessage:g("noOptions"),onValueChange:a=>k(c,{value:{source:"SESSION",path:a}}),options:i,placeholder:g("sessionPathPlaceholder"),searchPlaceholder:g("searchPlaceholder"),value:a.value.path})}):(0,b.jsx)(C.Input,{"aria-label":g("conditionValue"),className:"min-w-0 flex-1",onChange:a=>k(c,{value:aA(a.target.value)}),placeholder:g("conditionValuePlaceholder"),value:void 0===(d=a.value)?"":"string"==typeof d?aA(d)===d?d:JSON.stringify(d):JSON.stringify(d)??""}),(0,b.jsx)(aK,{mode:aH(a.value)?"session":"literal",onValueChange:a=>k(c,{value:"session"===a?{source:"SESSION",path:""}:""})})]})]})]},c)})}),(0,b.jsxs)(w.Button,{onClick:()=>j({...h,rows:[...h.rows,{path:"",operator:"EQ",value:""}]}),size:"sm",type:"button",variant:"outline",children:[(0,b.jsx)(l.Plus,{className:"size-3.5"})," ",g("addCondition")]}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:h.rows.length?g("conditionHelp"):g("conditionEmpty")}),aP(c)&&(0,b.jsx)(aJ,{})]})}function a_(a){let{field:c,value:d,onChange:e}=a,f=(0,s.useTranslations)("workflows"),g=function(a){if(null==a)return[];if(!Array.isArray(a))return null;let b=[];for(let c of a){if(!c||"object"!=typeof c||Array.isArray(c)||Object.keys(c).filter(a=>"label"!==a&&"description"!==a).length>0||"string"!=typeof c.label||void 0!==c.description&&"string"!=typeof c.description)return null;b.push({label:c.label,description:c.description??""})}return b}(d);if(!g)return(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(aZ,{...a}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:f("choiceOptionsAdvanced")})]});let h=a=>e(function(a){if(0!==a.length)return a.map(({label:a,description:b})=>b?{label:a,description:b}:{label:a})}(a)),i=(a,b)=>h(g.map((c,d)=>d===a?{...c,...b}:c));return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:c.label}),(0,b.jsx)(B.FieldGroup,{className:"gap-1.5",children:g.map((a,c)=>(0,b.jsxs)("div",{className:"space-y-1.5 rounded-lg border p-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(C.Input,{"aria-label":f("choiceOptionLabel"),className:"min-w-0 flex-1",onChange:a=>i(c,{label:a.target.value}),placeholder:f("choiceOptionLabel"),value:a.label}),(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Button,{"aria-label":f("removeRow"),className:"size-7 shrink-0",onClick:()=>h(g.filter((a,b)=>b!==c)),size:"icon",type:"button",variant:"ghost",children:(0,b.jsx)(q.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:f("removeRow")})]})]}),(0,b.jsx)(C.Input,{"aria-label":f("choiceOptionDescription"),className:"text-xs",onChange:a=>i(c,{description:a.target.value}),placeholder:f("choiceOptionDescription"),value:a.description})]},c))}),(0,b.jsxs)(w.Button,{onClick:()=>h([...g,{label:"",description:""}]),size:"sm",type:"button",variant:"outline",children:[(0,b.jsx)(l.Plus,{className:"size-3.5"})," ",f("addChoiceOption")]}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:g.length?f("choiceOptionsHelp"):f("choiceOptionsEmpty")}),aP(c)&&(0,b.jsx)(aJ,{})]})}function a0(a){let{field:c,value:d,onChange:e}=a,f=(0,s.useTranslations)("workflows"),g=function(a){if(null==a)return[];if(!Array.isArray(a))return null;let b=[];for(let c of a){if(!c||"object"!=typeof c||Array.isArray(c)||Object.keys(c).filter(a=>"key"!==a&&"label"!==a&&"description"!==a).length>0||"string"!=typeof c.key||void 0!==c.label&&"string"!=typeof c.label||void 0!==c.description&&"string"!=typeof c.description)return null;b.push({key:c.key,label:c.label??"",description:c.description??""})}return b}(d);if(!g)return(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(aZ,{...a}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:f("triggerChoicesAdvanced")})]});let h=a=>e(function(a){if(0!==a.length)return a.map(({key:a,label:b,description:c})=>c?{key:a,label:b,description:c}:{key:a,label:b})}(a)),i=(a,b)=>h(g.map((c,d)=>d===a?{...c,...b}:c));return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:c.label}),(0,b.jsx)(B.FieldGroup,{className:"gap-1.5",children:g.map((a,c)=>(0,b.jsxs)("div",{className:"space-y-1.5 rounded-lg border p-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(C.Input,{"aria-label":f("triggerChoiceLabel"),className:"min-w-0 flex-1",onChange:a=>{var b;let d;return b=a.target.value,d=g[c],void i(c,{label:b,...!d.key||d.key===au(d.label)?{key:au(b)}:{}})},placeholder:f("triggerChoiceLabel"),value:a.label}),(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Button,{"aria-label":f("removeRow"),className:"size-7 shrink-0",onClick:()=>h(g.filter((a,b)=>b!==c)),size:"icon",type:"button",variant:"ghost",children:(0,b.jsx)(q.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:f("removeRow")})]})]}),(0,b.jsx)(C.Input,{"aria-label":f("triggerChoiceKey"),className:"font-mono text-xs",onChange:a=>i(c,{key:a.target.value}),placeholder:f("triggerChoiceKey"),value:a.key}),g.some((a,b)=>b!==c&&a.key===g[c].key)&&(0,b.jsx)(B.FieldError,{className:"text-[10px]",children:f("triggerChoiceKeyDuplicate")}),(0,b.jsx)(C.Input,{"aria-label":f("triggerChoiceDescription"),className:"text-xs",onChange:a=>i(c,{description:a.target.value}),placeholder:f("triggerChoiceDescription"),value:a.description})]},c))}),(0,b.jsxs)(w.Button,{onClick:()=>h([...g,{key:"",label:"",description:""}]),size:"sm",type:"button",variant:"outline",children:[(0,b.jsx)(l.Plus,{className:"size-3.5"})," ",f("addTriggerChoice")]}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:g.length?f("triggerChoicesHelp"):f("triggerChoicesEmpty")})]})}let a1={provider:"provider",model:"model",effort:"effort"};function a2({field:a,config:c,onChange:d,sessionPaths:e}){let f=(0,s.useTranslations)("workflows"),g=a.modelKeys??a1,h=(0,t.useRef)(c);(0,t.useEffect)(()=>{h.current=c},[c]);let i=a=>{let b={...h.current};for(let[c,d]of Object.entries(a))void 0===d?delete b[c]:b[c]=d;h.current=b,d(b)},j=c[g.provider],k=c[g.model],l=c[g.effort],m=aH(j)||aH(k)||aH(l),n=function(a){let[b,c]=(0,t.useState)([]);return(0,t.useEffect)(()=>{let b=!1;return(0,P.controlPlaneRequest)(W,{worktreeId:a||null}).then(a=>{b||c(a.runProviderCatalog)}).catch(()=>{b||c([])}),()=>{b=!0}},[a]),b}(aN(c,g.scopeFrom)),o=[{key:g.provider,label:f("modelProvider"),value:j},{key:g.model,label:f("modelModel"),value:k},{key:g.effort,label:f("modelEffort"),value:l}],p=e.map(({path:a,description:b})=>({value:a,label:a,description:b}));return(0,b.jsxs)(B.Field,{children:[(0,b.jsxs)("div",{className:"flex items-end justify-between gap-2",children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:a.label}),(0,b.jsx)(aK,{mode:m?"session":"literal",onValueChange:a=>"session"===a?i({[g.provider]:{source:"SESSION",path:""},[g.model]:{source:"SESSION",path:""},[g.effort]:{source:"SESSION",path:""}}):i({[g.provider]:void 0,[g.model]:void 0,[g.effort]:void 0})})]}),m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.FieldGroup,{className:"gap-1.5",children:o.map(({key:a,label:c,value:d})=>(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-[10px] text-muted-foreground",children:c}),(0,b.jsx)(T.SearchableSelect,{allowCustomValue:!0,ariaLabel:c,emptyMessage:f("noOptions"),onValueChange:b=>i({[a]:{source:"SESSION",path:b}}),options:p,placeholder:f("sessionPathPlaceholder"),searchPlaceholder:f("searchPlaceholder"),value:aH(d)?d.path:""})]},a))}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:f("sessionBindingHelp")})]}):(0,b.jsx)(U.ModelEffortPicker,{catalog:n,effort:aM(aI(l)),fullWidth:!0,model:aM(aI(k)),onEffortChange:a=>i({[g.effort]:a}),onModelChange:a=>i({[g.model]:a}),onProviderChange:a=>i({[g.provider]:a}),provider:aM(aI(j))}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help})]})}function a3(a){switch(a.field.control){case"enum":return(0,b.jsx)(aQ,{...a});case"text":return(0,b.jsx)(aR,{...a});case"number":return(0,b.jsx)(aS,{...a});case"boolean":return(0,b.jsx)(aT,{...a});case"resource":return(0,b.jsx)(aV,{...a});case"resourceMulti":return(0,b.jsx)(aW,{...a});case"stringList":return(0,b.jsx)(aX,{...a});case"record":return(0,b.jsx)(aY,{...a});case"condition":return(0,b.jsx)(a$,{...a});case"choiceOptions":return(0,b.jsx)(a_,{...a});case"triggerChoices":return(0,b.jsx)(a0,{...a});case"mcpPresetMulti":return(0,b.jsx)(aU,{...a});case"json":return(0,b.jsx)(aZ,{...a});default:return null}}function a4({config:a,onChange:c,defaultOpen:d,extraKeyCount:e}){let f=(0,s.useTranslations)("workflows"),[g,h]=(0,t.useState)(d),[i,j]=(0,t.useState)(()=>JSON.stringify(a,null,2)),[k,l]=(0,t.useState)(null),m=(0,t.useRef)(i);return(0,t.useEffect)(()=>{let b=JSON.stringify(a,null,2);b!==m.current&&(j(b),m.current=b,l(null))},[a]),(0,b.jsxs)(ar,{onOpenChange:h,open:g,children:[(0,b.jsx)(as,{asChild:!0,children:(0,b.jsxs)(w.Button,{className:"w-full justify-between px-0 text-xs font-medium text-muted-foreground",type:"button",variant:"ghost",children:[(0,b.jsxs)("span",{children:[f("advancedJson"),e?` \xb7 ${f("extraKeys",{count:e})}`:""]}),(0,b.jsx)(S.ChevronDown,{className:`size-4 transition-transform ${g?"rotate-180":""}`})]})}),(0,b.jsxs)(at,{className:"space-y-1.5 pt-1.5",children:[(0,b.jsx)(L.Textarea,{"aria-label":f("advancedJson"),"aria-invalid":!!k,className:"min-h-40 font-mono text-xs",onChange:a=>(a=>{j(a);try{let b=JSON.parse(a);if(!b||"object"!=typeof b||Array.isArray(b))throw Error(f("configMustBeObject"));m.current=JSON.stringify(b,null,2),l(null),c(b)}catch(a){l(a instanceof Error?a.message:String(a))}})(a.target.value),value:i}),k?(0,b.jsx)(B.FieldError,{className:"text-[10px]",children:k}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:f("advancedJsonHelp")}),(0,b.jsx)(aJ,{})]})]})]})}function a5({kind:a,scope:c,config:d,onChange:e,sessionPaths:f}){let g=(0,s.useTranslations)("workflows"),h=(0,aB.getConfigDescriptor)(a,c);if(!h)return null;let i=new Set(h.fields.flatMap(a=>"model"===a.control&&a.modelKeys?[a.modelKeys.provider,a.modelKeys.model,a.modelKeys.effort]:[a.key])),j=Object.keys(d).filter(a=>!i.has(a));return(0,b.jsxs)(B.FieldGroup,{className:"gap-3",children:[(0,b.jsx)(B.FieldTitle,{className:"text-xs text-muted-foreground",children:g("configuration")}),h.fields.map(a=>a.visibleWhen&&d[a.visibleWhen.key]!==a.visibleWhen.equals?null:"model"===a.control?(0,b.jsx)(a2,{config:d,field:a,onChange:e,sessionPaths:f},a.key):(0,b.jsx)(a3,{config:d,field:a,onChange:b=>((a,b)=>{if(void 0===b){let b={...d};delete b[a],e(b);return}e({...d,[a]:b})})(a.key,b),sessionPaths:f,value:d[a.key]},a.key)),(0,b.jsx)(a4,{config:d,defaultOpen:!1,extraKeyCount:j.length,onChange:e})]})}var a6=a.i(961922),a7=a.i(467049),a8=a.i(957348),a9=a.i(205699),ba=a.i(641341),bb=a.i(421721);let bc=`
48
+ }`,variables:{codebaseRepositoryId:b},map:a=>a.githubActionsWorkflowRuns?.items.map(a=>({value:a.id,label:a.displayTitle||a.id,description:a.headBranch??void 0}))??[]};default:return null}}(a,b),[a,b]),d=c?JSON.stringify({query:c.query,variables:c.variables}):null,[e,f]=(0,t.useState)({key:"",options:[],error:!1});return((0,t.useEffect)(()=>{if(!c||!d)return;let a=!1;return(0,P.controlPlaneRequest)(c.query,c.variables).then(b=>{a||f({key:d,options:c.map(b),error:!1})}).catch(()=>{a||f({key:d,options:[],error:!0})}),()=>{a=!0}},[c,d]),c&&d)?e.key!==d?{options:[],loading:!0,fallback:!1}:{options:e.options,loading:!1,fallback:e.error||0===e.options.length}:{options:[],loading:!1,fallback:!0}}var aE=a.i(849688);let aF=(0,h.default)("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);var aG=a.i(210787);function aH(a){return!!a&&"object"==typeof a&&!Array.isArray(a)&&"SESSION"===a.source}function aI(a){return a&&"object"==typeof a&&!Array.isArray(a)&&"LITERAL"===a.source?a.value:a}function aJ(){let a=(0,s.useTranslations)("workflows");return(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a("interpolationHelp",{token:"{{path}}",example:"{{worktree.baseBranch}}"})})}function aK({mode:a,onValueChange:c}){let d=(0,s.useTranslations)("workflows");return(0,b.jsxs)(aG.ToggleGroup,{"aria-label":d("valueModeToggle"),onValueChange:a=>{("literal"===a||"session"===a)&&c(a)},size:"sm",spacing:0,type:"single",value:a,variant:"outline",children:[(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(aG.ToggleGroupItem,{"aria-label":d("valueModeLiteral"),className:"size-7 px-0 aria-checked:bg-accent aria-checked:text-accent-foreground",value:"literal",children:(0,b.jsx)(aF,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:d("valueModeLiteral")})]}),(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(aG.ToggleGroupItem,{"aria-label":d("valueModeSession"),className:"size-7 px-0 aria-checked:bg-accent aria-checked:text-accent-foreground",value:"session",children:(0,b.jsx)(aE.Braces,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:d("valueModeSession")})]})]})}function aL({label:a,help:c,allowCustomSessionPath:d=!0,clearLabel:e,defaultSessionPath:f,sessionEnabled:g,interpolationEnabled:h=!1,value:i,onChange:j,sessionPaths:k,children:l}){let m=(0,s.useTranslations)("workflows"),n=(0,t.useId)(),o=aH(i)?"session":"literal",p=k.map(({path:a,description:b})=>({value:a,label:a,description:b}));return(0,b.jsxs)(B.Field,{children:[(0,b.jsxs)("div",{className:"flex items-end justify-between gap-2",children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",htmlFor:n,children:a}),g&&(0,b.jsx)(aK,{mode:o,onValueChange:a=>j("session"===a?{source:"SESSION",path:k.find(({path:a})=>a===f)?.path??k[0]?.path??""}:"")})]}),"session"===o?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(T.SearchableSelect,{allowCustomValue:d,ariaLabel:m("sessionBindingLabel"),clearLabel:e,emptyMessage:m("noOptions"),onValueChange:a=>j(a?{source:"SESSION",path:a}:void 0),options:p,placeholder:m("sessionPathPlaceholder"),searchPlaceholder:m("searchPlaceholder"),value:aH(i)?i.path:""}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:m("sessionBindingHelp")})]}):(0,b.jsxs)(b.Fragment,{children:[l(aI(i),j,n),c&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:c}),h&&(0,b.jsx)(aJ,{})]})]})}function aM(a){return"string"==typeof a?a:""}function aN(a,b){if(!b)return null;let c=a[b];return"string"==typeof c&&c.length>0?c:null}function aO(a){return!!a.valueModes?.includes("session")}function aP(a){return!!a.valueModes?.includes("interpolation")}function aQ({field:a,value:c,onChange:d}){let e=(0,s.useTranslations)("workflows"),f=(0,t.useId)(),g=a.options?.kind==="static"?a.options.options:[];return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",htmlFor:f,children:a.label}),(0,b.jsxs)(F.Select,{onValueChange:a=>d(a),value:aM(aI(c)),children:[(0,b.jsx)(F.SelectTrigger,{className:"w-full",id:f,children:(0,b.jsx)(F.SelectValue,{placeholder:e("selectPlaceholder")})}),(0,b.jsx)(F.SelectContent,{children:g.map(a=>(0,b.jsx)(F.SelectItem,{value:a.value,children:a.label??a.value},a.value))})]}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help})]})}function aR({field:a,value:c,onChange:d,sessionPaths:e}){return(0,b.jsx)(aL,{help:a.help,interpolationEnabled:aP(a),label:a.label,onChange:d,sessionEnabled:aO(a),sessionPaths:e,value:c,children:(c,d,e)=>a.multiline?(0,b.jsx)(L.Textarea,{className:"min-h-20 text-sm",id:e,onChange:a=>d(a.target.value),placeholder:a.placeholder,value:aM(c)}):(0,b.jsx)(C.Input,{id:e,onChange:a=>d(a.target.value),placeholder:a.placeholder,value:aM(c)})})}function aS({field:a,value:c,onChange:d,sessionPaths:e}){return(0,b.jsx)(aL,{help:a.help,label:a.label,onChange:d,sessionEnabled:aO(a),sessionPaths:e,value:c,children:(c,d,e)=>(0,b.jsx)(C.Input,{id:e,max:a.maximum,min:a.minimum,onChange:a=>d(""===a.target.value?void 0:Number(a.target.value)),placeholder:a.placeholder,step:a.integer?1:void 0,type:"number",value:"number"==typeof c&&Number.isFinite(c)?String(c):""})})}function aT({field:a,value:c,onChange:d}){let e=(0,t.useId)();return(0,b.jsxs)(B.Field,{orientation:"horizontal",children:[(0,b.jsx)(y.Checkbox,{checked:!0===aI(c),id:e,onCheckedChange:a=>d(!0===a)}),(0,b.jsxs)(B.FieldContent,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",htmlFor:e,children:a.label}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help})]})]})}function aU({field:a,value:c,onChange:d}){let e=Array.isArray(c)?c.map(String):[];return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:a.label}),(0,b.jsx)(V.McpPresetPicker,{kind:a.presetKind,onChange:d,selectedIds:e,showAvailability:null==a.presetKind}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help})]})}function aV({field:a,config:c,value:d,onChange:e,sessionPaths:f}){let g=(0,s.useTranslations)("workflows"),h=a.options?.kind==="resource"?a.options:null,i=aN(c,h?.scopeFrom),{options:j,loading:k}=aD(h?.resource??"codebase",i),l=h?.sessionPath,m=a.required?void 0:g("notSet"),n=l?f.filter(({path:a})=>{let[b,c]=l.split(".");return a===l||a.startsWith(`${b}.`)&&a.endsWith(`.${c}`)}):f;return(0,b.jsx)(aL,{allowCustomSessionPath:!l,clearLabel:m,defaultSessionPath:l,help:a.help,interpolationEnabled:aP(a),label:a.label,onChange:e,sessionEnabled:aO(a),sessionPaths:n,value:d,children:(c,d)=>(0,b.jsx)(T.SearchableSelect,{allowCustomValue:!0,ariaLabel:a.label,clearLabel:m,disabled:k,emptyMessage:g("noOptions"),onValueChange:a=>d(a||void 0),options:j,placeholder:a.placeholder??g("selectPlaceholder"),searchPlaceholder:g("searchPlaceholder"),value:aM(c)})})}function aW({field:a,config:c,value:d,onChange:e}){let f=(0,s.useTranslations)("workflows"),g=a.options?.kind==="resource"?a.options:null,h=aN(c,g?.scopeFrom),{options:i,loading:j}=aD(g?.resource??"codebase",h),k=Array.isArray(d)?d.map(String):[],l=i.filter(a=>!k.includes(a.value));return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:a.label}),(0,b.jsx)(E.ItemGroup,{className:"gap-1.5",children:k.map(a=>(0,b.jsxs)(E.Item,{size:"xs",variant:"muted",children:[(0,b.jsx)(E.ItemContent,{className:"min-w-0",children:(0,b.jsx)(E.ItemTitle,{className:"block truncate text-xs",children:i.find(b=>b.value===a)?.label??a})}),(0,b.jsx)(E.ItemActions,{children:(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Button,{"aria-label":f("removeRow"),className:"size-7",onClick:()=>{e(k.filter(b=>b!==a))},size:"icon",type:"button",variant:"ghost",children:(0,b.jsx)(q.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:f("removeRow")})]})})]},a))}),(0,b.jsx)(T.SearchableSelect,{allowCustomValue:!0,ariaLabel:a.label,disabled:j,emptyMessage:f("noOptions"),onValueChange:a=>{a&&!k.includes(a)&&e([...k,a])},options:l,placeholder:a.placeholder??f("addRow"),searchPlaceholder:f("searchPlaceholder"),value:""}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help}),aP(a)&&(0,b.jsx)(aJ,{})]})}function aX({field:a,value:c,onChange:d}){let e=(0,s.useTranslations)("workflows"),f=Array.isArray(c)?c.map(String):[];return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:a.label}),(0,b.jsx)(B.FieldGroup,{className:"gap-1.5",children:f.map((c,g)=>(0,b.jsxs)(D.InputGroup,{children:[(0,b.jsx)(D.InputGroupInput,{onChange:a=>{let b;return b=a.target.value,d(f.map((a,c)=>c===g?b:a))},placeholder:a.placeholder,value:c}),(0,b.jsx)(D.InputGroupAddon,{align:"inline-end",children:(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(D.InputGroupButton,{"aria-label":e("removeRow"),onClick:()=>d(f.filter((a,b)=>b!==g)),size:"icon-xs",children:(0,b.jsx)(q.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:e("removeRow")})]})})]},g))}),(0,b.jsxs)(w.Button,{onClick:()=>d([...f,""]),size:"sm",type:"button",variant:"outline",children:[(0,b.jsx)(l.Plus,{className:"size-3.5"})," ",e("addRow")]}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help}),aP(a)&&(0,b.jsx)(aJ,{})]})}function aY({field:a,value:c,onChange:d}){let e=(0,s.useTranslations)("workflows"),f=c&&"object"==typeof c&&!Array.isArray(c)?Object.entries(c).map(([a,b])=>[a,b]):[],g=a=>{let b={};for(let[c,d]of a)c&&(b[c]=d);d(b)};return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:a.label}),(0,b.jsx)(B.FieldGroup,{className:"gap-1.5",children:f.map(([a,c],d)=>(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(C.Input,{className:"w-2/5",onChange:a=>g(f.map((b,c)=>c===d?[a.target.value,b[1]]:b)),placeholder:e("recordKeyPlaceholder"),value:a}),(0,b.jsx)(C.Input,{className:"min-w-0 flex-1",onChange:a=>g(f.map((b,c)=>c===d?[b[0],a.target.value]:b)),placeholder:e("recordValuePlaceholder"),value:aM(c)}),(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Button,{"aria-label":e("removeRow"),className:"size-7 shrink-0",onClick:()=>g(f.filter((a,b)=>b!==d)),size:"icon",type:"button",variant:"ghost",children:(0,b.jsx)(q.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:e("removeRow")})]})]},d))}),(0,b.jsxs)(w.Button,{onClick:()=>g([...f,["",""]]),size:"sm",type:"button",variant:"outline",children:[(0,b.jsx)(l.Plus,{className:"size-3.5"})," ",e("addRow")]}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help}),aP(a)&&(0,b.jsx)(aJ,{})]})}function aZ({field:a,value:c,onChange:d}){let e=(0,t.useId)(),[f,g]=(0,t.useState)(()=>void 0===c?"":JSON.stringify(c,null,2)),[h,i]=(0,t.useState)(null),j=(0,t.useRef)(f);return(0,t.useEffect)(()=>{let a=void 0===c?"":JSON.stringify(c,null,2);a!==j.current&&(g(a),j.current=a,i(null))},[c]),(0,b.jsxs)(B.Field,{"data-invalid":!!h,children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",htmlFor:e,children:a.label}),(0,b.jsx)(L.Textarea,{"aria-invalid":!!h,className:"min-h-24 font-mono text-xs",id:e,onChange:a=>(a=>{if(g(a),""===a.trim()){j.current="",i(null),d(void 0);return}try{let b=JSON.parse(a);j.current=JSON.stringify(b,null,2),i(null),d(b)}catch(a){i(a instanceof Error?a.message:String(a))}})(a.target.value),placeholder:a.placeholder,value:f}),h?(0,b.jsx)(B.FieldError,{className:"text-[10px]",children:h}):(0,b.jsxs)(b.Fragment,{children:[a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help}),aP(a)&&(0,b.jsx)(aJ,{})]})]})}function a$(a){let{field:c,value:d,onChange:e,sessionPaths:f}=a,g=(0,s.useTranslations)("workflows"),h=function(a){if(null==a)return ax;if("object"!=typeof a||Array.isArray(a))return null;if("ALL"===a.op||"ANY"===a.op){let b=a.conditions;if(!Array.isArray(b))return null;let c=[];for(let a of b){let b=ay(a);if(!b)return null;c.push(b)}return{mode:a.op,rows:c}}let b=ay(a);return b?{mode:"ALL",rows:[b]}:null}(d),i=f.map(({path:a,description:b})=>({value:a,label:a,description:b}));if(!h)return(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(aZ,{...a}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:g("conditionAdvanced")})]});let j=a=>e(function(a){if(0!==a.rows.length)return 1===a.rows.length?az(a.rows[0]):{op:a.mode,conditions:a.rows.map(az)}}(a)),k=(a,b)=>j({...h,rows:h.rows.map((c,d)=>d===a?{...c,...b}:c)});return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:c.label}),h.rows.length>1&&(0,b.jsxs)(F.Select,{onValueChange:a=>j({...h,mode:"ANY"===a?"ANY":"ALL"}),value:h.mode,children:[(0,b.jsx)(F.SelectTrigger,{"aria-label":g("conditionMatchMode"),className:"w-full",children:(0,b.jsx)(F.SelectValue,{})}),(0,b.jsxs)(F.SelectContent,{children:[(0,b.jsx)(F.SelectItem,{value:"ALL",children:g("conditionMatchAll")}),(0,b.jsx)(F.SelectItem,{value:"ANY",children:g("conditionMatchAny")})]})]}),(0,b.jsx)(B.FieldGroup,{className:"gap-1.5",children:h.rows.map((a,c)=>{var d;return(0,b.jsxs)("div",{className:"space-y-1.5 rounded-lg border p-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsx)(T.SearchableSelect,{allowCustomValue:!0,ariaLabel:g("conditionField"),emptyMessage:g("noOptions"),onValueChange:a=>k(c,{path:a}),options:i,placeholder:g("sessionPathPlaceholder"),searchPlaceholder:g("searchPlaceholder"),value:a.path})}),(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Button,{"aria-label":g("removeRow"),className:"size-7 shrink-0",onClick:()=>j({...h,rows:h.rows.filter((a,b)=>b!==c)}),size:"icon",type:"button",variant:"ghost",children:(0,b.jsx)(q.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:g("removeRow")})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)(F.Select,{onValueChange:a=>k(c,{operator:a}),value:a.operator,children:[(0,b.jsx)(F.SelectTrigger,{"aria-label":g("conditionOperator"),className:"w-40 shrink-0",children:(0,b.jsx)(F.SelectValue,{})}),(0,b.jsx)(F.SelectContent,{children:av.map(a=>(0,b.jsx)(F.SelectItem,{value:a.value,children:g(`conditionOperators.${a.value}`)},a.value))})]}),aw(a.operator)&&(0,b.jsxs)(b.Fragment,{children:[aH(a.value)?(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsx)(T.SearchableSelect,{allowCustomValue:!0,ariaLabel:g("sessionBindingLabel"),emptyMessage:g("noOptions"),onValueChange:a=>k(c,{value:{source:"SESSION",path:a}}),options:i,placeholder:g("sessionPathPlaceholder"),searchPlaceholder:g("searchPlaceholder"),value:a.value.path})}):(0,b.jsx)(C.Input,{"aria-label":g("conditionValue"),className:"min-w-0 flex-1",onChange:a=>k(c,{value:aA(a.target.value)}),placeholder:g("conditionValuePlaceholder"),value:void 0===(d=a.value)?"":"string"==typeof d?aA(d)===d?d:JSON.stringify(d):JSON.stringify(d)??""}),(0,b.jsx)(aK,{mode:aH(a.value)?"session":"literal",onValueChange:a=>k(c,{value:"session"===a?{source:"SESSION",path:""}:""})})]})]})]},c)})}),(0,b.jsxs)(w.Button,{onClick:()=>j({...h,rows:[...h.rows,{path:"",operator:"EQ",value:""}]}),size:"sm",type:"button",variant:"outline",children:[(0,b.jsx)(l.Plus,{className:"size-3.5"})," ",g("addCondition")]}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:h.rows.length?g("conditionHelp"):g("conditionEmpty")}),aP(c)&&(0,b.jsx)(aJ,{})]})}function a_(a){let{field:c,value:d,onChange:e}=a,f=(0,s.useTranslations)("workflows"),g=function(a){if(null==a)return[];if(!Array.isArray(a))return null;let b=[];for(let c of a){if(!c||"object"!=typeof c||Array.isArray(c)||Object.keys(c).filter(a=>"label"!==a&&"description"!==a).length>0||"string"!=typeof c.label||void 0!==c.description&&"string"!=typeof c.description)return null;b.push({label:c.label,description:c.description??""})}return b}(d);if(!g)return(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(aZ,{...a}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:f("choiceOptionsAdvanced")})]});let h=a=>e(function(a){if(0!==a.length)return a.map(({label:a,description:b})=>b?{label:a,description:b}:{label:a})}(a)),i=(a,b)=>h(g.map((c,d)=>d===a?{...c,...b}:c));return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:c.label}),(0,b.jsx)(B.FieldGroup,{className:"gap-1.5",children:g.map((a,c)=>(0,b.jsxs)("div",{className:"space-y-1.5 rounded-lg border p-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(C.Input,{"aria-label":f("choiceOptionLabel"),className:"min-w-0 flex-1",onChange:a=>i(c,{label:a.target.value}),placeholder:f("choiceOptionLabel"),value:a.label}),(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Button,{"aria-label":f("removeRow"),className:"size-7 shrink-0",onClick:()=>h(g.filter((a,b)=>b!==c)),size:"icon",type:"button",variant:"ghost",children:(0,b.jsx)(q.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:f("removeRow")})]})]}),(0,b.jsx)(C.Input,{"aria-label":f("choiceOptionDescription"),className:"text-xs",onChange:a=>i(c,{description:a.target.value}),placeholder:f("choiceOptionDescription"),value:a.description})]},c))}),(0,b.jsxs)(w.Button,{onClick:()=>h([...g,{label:"",description:""}]),size:"sm",type:"button",variant:"outline",children:[(0,b.jsx)(l.Plus,{className:"size-3.5"})," ",f("addChoiceOption")]}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:g.length?f("choiceOptionsHelp"):f("choiceOptionsEmpty")}),aP(c)&&(0,b.jsx)(aJ,{})]})}function a0(a){let{field:c,value:d,onChange:e}=a,f=(0,s.useTranslations)("workflows"),g=function(a){if(null==a)return[];if(!Array.isArray(a))return null;let b=[];for(let c of a){if(!c||"object"!=typeof c||Array.isArray(c)||Object.keys(c).filter(a=>"key"!==a&&"label"!==a&&"description"!==a).length>0||"string"!=typeof c.key||void 0!==c.label&&"string"!=typeof c.label||void 0!==c.description&&"string"!=typeof c.description)return null;b.push({key:c.key,label:c.label??"",description:c.description??""})}return b}(d);if(!g)return(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(aZ,{...a}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:f("triggerChoicesAdvanced")})]});let h=a=>e(function(a){if(0!==a.length)return a.map(({key:a,label:b,description:c})=>c?{key:a,label:b,description:c}:{key:a,label:b})}(a)),i=(a,b)=>h(g.map((c,d)=>d===a?{...c,...b}:c));return(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:c.label}),(0,b.jsx)(B.FieldGroup,{className:"gap-1.5",children:g.map((a,c)=>(0,b.jsxs)("div",{className:"space-y-1.5 rounded-lg border p-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(C.Input,{"aria-label":f("triggerChoiceLabel"),className:"min-w-0 flex-1",onChange:a=>{var b;let d;return b=a.target.value,d=g[c],void i(c,{label:b,...!d.key||d.key===au(d.label)?{key:au(b)}:{}})},placeholder:f("triggerChoiceLabel"),value:a.label}),(0,b.jsxs)(M.Tooltip,{children:[(0,b.jsx)(M.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Button,{"aria-label":f("removeRow"),className:"size-7 shrink-0",onClick:()=>h(g.filter((a,b)=>b!==c)),size:"icon",type:"button",variant:"ghost",children:(0,b.jsx)(q.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(M.TooltipContent,{children:f("removeRow")})]})]}),(0,b.jsx)(C.Input,{"aria-label":f("triggerChoiceKey"),className:"font-mono text-xs",onChange:a=>i(c,{key:a.target.value}),placeholder:f("triggerChoiceKey"),value:a.key}),g.some((a,b)=>b!==c&&a.key===g[c].key)&&(0,b.jsx)(B.FieldError,{className:"text-[10px]",children:f("triggerChoiceKeyDuplicate")}),(0,b.jsx)(C.Input,{"aria-label":f("triggerChoiceDescription"),className:"text-xs",onChange:a=>i(c,{description:a.target.value}),placeholder:f("triggerChoiceDescription"),value:a.description})]},c))}),(0,b.jsxs)(w.Button,{onClick:()=>h([...g,{key:"",label:"",description:""}]),size:"sm",type:"button",variant:"outline",children:[(0,b.jsx)(l.Plus,{className:"size-3.5"})," ",f("addTriggerChoice")]}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:g.length?f("triggerChoicesHelp"):f("triggerChoicesEmpty")})]})}let a1={provider:"provider",model:"model",effort:"effort"};function a2({field:a,config:c,onChange:d,sessionPaths:e}){let f=(0,s.useTranslations)("workflows"),g=a.modelKeys??a1,h=(0,t.useRef)(c);(0,t.useEffect)(()=>{h.current=c},[c]);let i=a=>{let b={...h.current};for(let[c,d]of Object.entries(a))void 0===d?delete b[c]:b[c]=d;h.current=b,d(b)},j=c[g.provider],k=c[g.model],l=c[g.effort],m=aH(j)||aH(k)||aH(l),n=function(a){let[b,c]=(0,t.useState)([]);return(0,t.useEffect)(()=>{let b=!1;return(0,P.controlPlaneRequest)(W,{worktreeId:a||null}).then(a=>{b||c(a.runProviderCatalog)}).catch(()=>{b||c([])}),()=>{b=!0}},[a]),b}(aN(c,g.scopeFrom)),o=[{key:g.provider,label:f("modelProvider"),value:j},{key:g.model,label:f("modelModel"),value:k},{key:g.effort,label:f("modelEffort"),value:l}],p=e.map(({path:a,description:b})=>({value:a,label:a,description:b}));return(0,b.jsxs)(B.Field,{children:[(0,b.jsxs)("div",{className:"flex items-end justify-between gap-2",children:[(0,b.jsx)(B.FieldLabel,{className:"text-xs",children:a.label}),(0,b.jsx)(aK,{mode:m?"session":"literal",onValueChange:a=>"session"===a?i({[g.provider]:{source:"SESSION",path:""},[g.model]:{source:"SESSION",path:""},[g.effort]:{source:"SESSION",path:""}}):i({[g.provider]:void 0,[g.model]:void 0,[g.effort]:void 0})})]}),m?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.FieldGroup,{className:"gap-1.5",children:o.map(({key:a,label:c,value:d})=>(0,b.jsxs)(B.Field,{children:[(0,b.jsx)(B.FieldLabel,{className:"text-[10px] text-muted-foreground",children:c}),(0,b.jsx)(T.SearchableSelect,{allowCustomValue:!0,ariaLabel:c,emptyMessage:f("noOptions"),onValueChange:b=>i({[a]:{source:"SESSION",path:b}}),options:p,placeholder:f("sessionPathPlaceholder"),searchPlaceholder:f("searchPlaceholder"),value:aH(d)?d.path:""})]},a))}),(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:f("sessionBindingHelp")})]}):(0,b.jsx)(U.ModelEffortPicker,{catalog:n,effort:aM(aI(l)),fullWidth:!0,model:aM(aI(k)),onEffortChange:a=>i({[g.effort]:a}),onModelChange:a=>i({[g.model]:a}),onProviderChange:a=>i({[g.provider]:a}),provider:aM(aI(j))}),a.help&&(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:a.help})]})}function a3(a){switch(a.field.control){case"enum":return(0,b.jsx)(aQ,{...a});case"text":return(0,b.jsx)(aR,{...a});case"number":return(0,b.jsx)(aS,{...a});case"boolean":return(0,b.jsx)(aT,{...a});case"resource":return(0,b.jsx)(aV,{...a});case"resourceMulti":return(0,b.jsx)(aW,{...a});case"stringList":return(0,b.jsx)(aX,{...a});case"record":return(0,b.jsx)(aY,{...a});case"condition":return(0,b.jsx)(a$,{...a});case"choiceOptions":return(0,b.jsx)(a_,{...a});case"triggerChoices":return(0,b.jsx)(a0,{...a});case"mcpPresetMulti":return(0,b.jsx)(aU,{...a});case"json":return(0,b.jsx)(aZ,{...a});default:return null}}function a4({config:a,onChange:c,defaultOpen:d,extraKeyCount:e}){let f=(0,s.useTranslations)("workflows"),[g,h]=(0,t.useState)(d),[i,j]=(0,t.useState)(()=>JSON.stringify(a,null,2)),[k,l]=(0,t.useState)(null),m=(0,t.useRef)(i);return(0,t.useEffect)(()=>{let b=JSON.stringify(a,null,2);b!==m.current&&(j(b),m.current=b,l(null))},[a]),(0,b.jsxs)(ar,{onOpenChange:h,open:g,children:[(0,b.jsx)(as,{asChild:!0,children:(0,b.jsxs)(w.Button,{className:"w-full justify-between px-0 text-xs font-medium text-muted-foreground",type:"button",variant:"ghost",children:[(0,b.jsxs)("span",{children:[f("advancedJson"),e?` \xb7 ${f("extraKeys",{count:e})}`:""]}),(0,b.jsx)(S.ChevronDown,{className:`size-4 transition-transform ${g?"rotate-180":""}`})]})}),(0,b.jsxs)(at,{className:"space-y-1.5 pt-1.5",children:[(0,b.jsx)(L.Textarea,{"aria-label":f("advancedJson"),"aria-invalid":!!k,className:"min-h-40 font-mono text-xs",onChange:a=>(a=>{j(a);try{let b=JSON.parse(a);if(!b||"object"!=typeof b||Array.isArray(b))throw Error(f("configMustBeObject"));m.current=JSON.stringify(b,null,2),l(null),c(b)}catch(a){l(a instanceof Error?a.message:String(a))}})(a.target.value),value:i}),k?(0,b.jsx)(B.FieldError,{className:"text-[10px]",children:k}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.FieldDescription,{className:"text-[10px]",children:f("advancedJsonHelp")}),(0,b.jsx)(aJ,{})]})]})]})}function a5({kind:a,scope:c,config:d,onChange:e,sessionPaths:f}){let g=(0,s.useTranslations)("workflows"),h=(0,aB.getConfigDescriptor)(a,c);if(!h)return null;let i=new Set(h.fields.flatMap(a=>"model"===a.control&&a.modelKeys?[a.modelKeys.provider,a.modelKeys.model,a.modelKeys.effort]:[a.key])),j=Object.keys(d).filter(a=>!i.has(a));return(0,b.jsxs)(B.FieldGroup,{className:"gap-3",children:[(0,b.jsx)(B.FieldTitle,{className:"text-xs text-muted-foreground",children:g("configuration")}),h.fields.map(a=>a.visibleWhen&&d[a.visibleWhen.key]!==a.visibleWhen.equals?null:"model"===a.control?(0,b.jsx)(a2,{config:d,field:a,onChange:e,sessionPaths:f},a.key):(0,b.jsx)(a3,{config:d,field:a,onChange:b=>((a,b)=>{if(void 0===b){let b={...d};delete b[a],e(b);return}e({...d,[a]:b})})(a.key,b),sessionPaths:f,value:d[a.key]},a.key)),(0,b.jsx)(a4,{config:d,defaultOpen:!1,extraKeyCount:j.length,onChange:e})]})}var a6=a.i(961922),a7=a.i(467049),a8=a.i(957348),a9=a.i(205699),ba=a.i(641341),bb=a.i(421721);let bc=`
49
49
  query WorkflowEditorCatalog($id: ID!) {
50
50
  workflowCatalog {
51
51
  schemaVersion globalConcurrency
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
7
7
  "static/chunks/0cz1d0mv5g_q7.js"
8
8
  ],
9
9
  "lowPriorityFiles": [
10
- "static/Pro8D0Hv2IhphMUT1Ihzv/_buildManifest.js",
11
- "static/Pro8D0Hv2IhphMUT1Ihzv/_ssgManifest.js",
12
- "static/Pro8D0Hv2IhphMUT1Ihzv/_clientMiddlewareManifest.js"
10
+ "static/y9Hi8CBWpu_MxfgH-bM8Z/_buildManifest.js",
11
+ "static/y9Hi8CBWpu_MxfgH-bM8Z/_ssgManifest.js",
12
+ "static/y9Hi8CBWpu_MxfgH-bM8Z/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/43xly966rnk_a.js",
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/43xly966rnk_a.js"/><script src="/_next/static/chunks/3eleyu3ytciul.js" async=""></script><script src="/_next/static/chunks/2zf625u-tcwdn.js" async=""></script><script src="/_next/static/chunks/turbopack-3jj87afk69hur.js" async=""></script><script src="/_next/static/chunks/2u1tz9uu_w506.js" async="" crossorigin=""></script><meta name="robots" content="noindex"/><link rel="icon" href="/icon.svg?icon.2eq-kzgm9x62k.svg" sizes="any" type="image/svg+xml"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/43xly966rnk_a.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[339756,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"default\"]\n3:I[837457,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"default\"]\n4:I[897367,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[897367,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"ViewportBoundary\"]\na:I[897367,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"MetadataBoundary\"]\nc:I[168027,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"default\",1]\n7:X\n0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/2u1tz9uu_w506.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"Pro8D0Hv2IhphMUT1Ihzv\"}\n7:C\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nd:I[154500,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/icon.svg?icon.2eq-kzgm9x62k.svg\",\"sizes\":\"any\",\"type\":\"image/svg+xml\"}],[\"$\",\"$Ld\",\"1\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/43xly966rnk_a.js"/><script src="/_next/static/chunks/3eleyu3ytciul.js" async=""></script><script src="/_next/static/chunks/2zf625u-tcwdn.js" async=""></script><script src="/_next/static/chunks/turbopack-3jj87afk69hur.js" async=""></script><script src="/_next/static/chunks/2u1tz9uu_w506.js" async="" crossorigin=""></script><meta name="robots" content="noindex"/><link rel="icon" href="/icon.svg?icon.2eq-kzgm9x62k.svg" sizes="any" type="image/svg+xml"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/43xly966rnk_a.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[339756,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"default\"]\n3:I[837457,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"default\"]\n4:I[897367,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[897367,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"ViewportBoundary\"]\na:I[897367,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"MetadataBoundary\"]\nc:I[168027,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"default\",1]\n7:X\n0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/2u1tz9uu_w506.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"y9Hi8CBWpu_MxfgH-bM8Z\"}\n7:C\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nd:I[154500,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/icon.svg?icon.2eq-kzgm9x62k.svg\",\"sizes\":\"any\",\"type\":\"image/svg+xml\"}],[\"$\",\"$Ld\",\"1\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/43xly966rnk_a.js"/><script src="/_next/static/chunks/3eleyu3ytciul.js" async=""></script><script src="/_next/static/chunks/2zf625u-tcwdn.js" async=""></script><script src="/_next/static/chunks/turbopack-3jj87afk69hur.js" async=""></script><script src="/_next/static/chunks/2u1tz9uu_w506.js" async="" crossorigin=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/43xly966rnk_a.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[339756,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"default\"]\n3:I[837457,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"default\"]\n4:I[897367,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[897367,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"ViewportBoundary\"]\na:I[897367,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"MetadataBoundary\"]\nc:I[168027,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"default\",1]\n7:X\n0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4624]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"Pro8D0Hv2IhphMUT1Ihzv\"}\n7:C\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n6:null\nb:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/43xly966rnk_a.js"/><script src="/_next/static/chunks/3eleyu3ytciul.js" async=""></script><script src="/_next/static/chunks/2zf625u-tcwdn.js" async=""></script><script src="/_next/static/chunks/turbopack-3jj87afk69hur.js" async=""></script><script src="/_next/static/chunks/2u1tz9uu_w506.js" async="" crossorigin=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/43xly966rnk_a.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[339756,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"default\"]\n3:I[837457,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"default\"]\n4:I[897367,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[897367,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"ViewportBoundary\"]\na:I[897367,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"MetadataBoundary\"]\nc:I[168027,[\"/_next/static/chunks/2u1tz9uu_w506.js\"],\"default\",1]\n7:X\n0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4624]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"y9Hi8CBWpu_MxfgH-bM8Z\"}\n7:C\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n6:null\nb:[]\n"])</script></body></html>
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"KZ1wFE0R5aKWYRdaVRztmseos97PH7YiAaOm8VJG9JY=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"yTbp9uElUoHvWNGy9aayhwqGv8sO2k1h61OoalQQZbc=\"\n}"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "node": {},
3
3
  "edge": {},
4
- "encryptionKey": "KZ1wFE0R5aKWYRdaVRztmseos97PH7YiAaOm8VJG9JY="
4
+ "encryptionKey": "yTbp9uElUoHvWNGy9aayhwqGv8sO2k1h61OoalQQZbc="
5
5
  }
@@ -1,22 +1,22 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,159888,e=>{"use strict";let t=(0,e.i(456420).default)("braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);e.s(["Braces",0,t],159888)},563707,e=>{"use strict";let t=(0,e.i(456420).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],563707)},508734,e=>{"use strict";let t=(0,e.i(456420).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],508734)},772382,e=>{"use strict";let t=(0,e.i(456420).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],772382)},851817,e=>{"use strict";let t=(0,e.i(456420).default)("grid-2x2",[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 12h18",key:"1i2n21"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);e.s(["Grid2X2",0,t],851817)},882505,e=>{"use strict";let t=(0,e.i(456420).default)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]);e.s(["List",0,t],882505)},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},983913,e=>{"use strict";var t=e.i(843476),a=e.i(563707),r=e.i(271645),s=e.i(519455),l=e.i(317056),i=e.i(906197),n=e.i(337822),o=e.i(975157);e.s(["SearchableSelect",0,function({value:e,onValueChange:d,options:c,placeholder:u,searchPlaceholder:p,emptyMessage:m,ariaLabel:h,disabled:g,className:x,showSelectedDetails:f=!1,allowCustomValue:v=!1}){let[b,j]=(0,r.useState)(!1),[y,w]=(0,r.useState)(""),C=(0,r.useCallback)(e=>{e&&e.addEventListener("wheel",e=>e.stopPropagation())},[]),R=c.find(t=>t.value===e),k=R?.label??(e||u),N=y.trim(),T=v&&N.length>0&&!c.some(e=>e.value.toLowerCase()===N.toLowerCase()||e.label.toLowerCase()===N.toLowerCase());return(0,t.jsxs)(n.Popover,{onOpenChange:e=>{j(e),e||w("")},open:b,children:[(0,t.jsx)(n.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)(s.Button,{"aria-expanded":b,"aria-label":h,className:(0,o.cn)("min-w-0 w-full justify-between font-normal",f&&R&&"h-auto min-h-8 py-2",x),disabled:g,role:"combobox",type:"button",variant:"outline",children:[f&&R?(0,t.jsxs)("span",{className:"min-w-0 text-left",children:[(0,t.jsx)("span",{className:"block truncate",children:R.label}),R.description&&(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:R.description}),R.secondaryDescription&&(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:R.secondaryDescription})]}):(0,t.jsx)("span",{className:"min-w-0 truncate",children:k}),(0,t.jsx)(a.ChevronsUpDown,{className:"shrink-0 opacity-50"})]})}),(0,t.jsx)(n.PopoverContent,{ref:C,align:"start",className:"z-70 max-h-[min(24rem,var(--radix-popover-content-available-height))] w-(--radix-popover-trigger-width) overflow-hidden p-0",children:(0,t.jsxs)(l.Command,{className:"min-h-0",label:p,children:[(0,t.jsx)(l.CommandInput,{"aria-label":p,autoFocus:!0,onValueChange:w,placeholder:p,value:y}),(0,t.jsxs)(l.CommandList,{className:"min-h-0 flex-1 max-h-64 overscroll-contain [scrollbar-width:thin] [&::-webkit-scrollbar]:block [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-border",children:[(0,t.jsx)(l.CommandEmpty,{children:m}),(0,t.jsxs)(l.CommandGroup,{children:[T&&(0,t.jsx)(l.CommandItem,{"aria-label":N,onSelect:()=>{d(N),w(""),j(!1)},value:N,children:(0,t.jsx)(i.Item,{className:"min-w-0 flex-1 border-0 p-0",size:"xs",children:(0,t.jsx)(i.ItemContent,{className:"min-w-0",children:(0,t.jsx)(i.ItemTitle,{className:"block truncate",children:N})})})}),c.map(a=>(0,t.jsx)(l.CommandItem,{"aria-label":[a.label,a.description,a.secondaryDescription].filter(Boolean).join(", "),"aria-selected":a.value===e,className:"items-start py-2","data-checked":a.value===e,disabled:a.disabled,keywords:[a.label,a.description??"",a.secondaryDescription??"",a.keywords??""],onSelect:()=>{d(a.value),w(""),j(!1)},value:a.value,children:(0,t.jsx)(i.Item,{className:"min-w-0 flex-1 border-0 p-0",size:"xs",children:(0,t.jsxs)(i.ItemContent,{className:"min-w-0",children:[(0,t.jsx)(i.ItemTitle,{className:"block truncate",children:a.label}),a.description&&(0,t.jsx)(i.ItemDescription,{className:"block truncate",children:a.description}),a.secondaryDescription&&(0,t.jsx)(i.ItemDescription,{className:"block truncate",children:a.secondaryDescription})]})})},a.value))]})]})]})})]})}])},360107,e=>{"use strict";var t=e.i(843476),a=e.i(482022),r=e.i(851817),s=e.i(882505),l=e.i(927735),i=e.i(741120),n=e.i(948148),o=e.i(271645),d=e.i(948812),c=e.i(16781),u=e.i(929592),p=e.i(519455),m=e.i(515288),h=e.i(257428),g=e.i(816484),x=e.i(82612),f=e.i(110204),v=e.i(983913),b=e.i(987968),j=e.i(784774),y=e.i(808562),w=e.i(520133),C=e.i(637611),R=e.i(975157),k=e.i(171502);let N="github-comments-layout",T="__all_pull_requests__",I=`
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,159888,e=>{"use strict";let t=(0,e.i(456420).default)("braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);e.s(["Braces",0,t],159888)},563707,e=>{"use strict";let t=(0,e.i(456420).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],563707)},508734,e=>{"use strict";let t=(0,e.i(456420).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],508734)},772382,e=>{"use strict";let t=(0,e.i(456420).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],772382)},851817,e=>{"use strict";let t=(0,e.i(456420).default)("grid-2x2",[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 12h18",key:"1i2n21"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);e.s(["Grid2X2",0,t],851817)},882505,e=>{"use strict";let t=(0,e.i(456420).default)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]);e.s(["List",0,t],882505)},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},983913,e=>{"use strict";var t=e.i(843476),a=e.i(563707),r=e.i(271645),l=e.i(519455),s=e.i(317056),i=e.i(906197),n=e.i(337822),o=e.i(975157);e.s(["SearchableSelect",0,function({value:e,onValueChange:d,options:c,placeholder:u,searchPlaceholder:m,emptyMessage:p,ariaLabel:h,disabled:g,className:x,showSelectedDetails:f=!1,allowCustomValue:v=!1,clearLabel:b}){let[j,y]=(0,r.useState)(!1),[w,C]=(0,r.useState)(""),R=(0,r.useCallback)(e=>{e&&e.addEventListener("wheel",e=>e.stopPropagation())},[]),k=c.find(t=>t.value===e),N=k?.label??(e||u),T=w.trim(),I=v&&T.length>0&&!c.some(e=>e.value.toLowerCase()===T.toLowerCase()||e.label.toLowerCase()===T.toLowerCase());return(0,t.jsxs)(n.Popover,{onOpenChange:e=>{y(e),e||C("")},open:j,children:[(0,t.jsx)(n.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)(l.Button,{"aria-expanded":j,"aria-label":h,className:(0,o.cn)("min-w-0 w-full justify-between font-normal",f&&k&&"h-auto min-h-8 py-2",x),disabled:g,role:"combobox",type:"button",variant:"outline",children:[f&&k?(0,t.jsxs)("span",{className:"min-w-0 text-left",children:[(0,t.jsx)("span",{className:"block truncate",children:k.label}),k.description&&(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:k.description}),k.secondaryDescription&&(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:k.secondaryDescription})]}):(0,t.jsx)("span",{className:"min-w-0 truncate",children:N}),(0,t.jsx)(a.ChevronsUpDown,{className:"shrink-0 opacity-50"})]})}),(0,t.jsx)(n.PopoverContent,{ref:R,align:"start",className:"z-70 max-h-[min(24rem,var(--radix-popover-content-available-height))] w-(--radix-popover-trigger-width) overflow-hidden p-0",children:(0,t.jsxs)(s.Command,{className:"min-h-0",label:m,children:[(0,t.jsx)(s.CommandInput,{"aria-label":m,autoFocus:!0,onValueChange:C,placeholder:m,value:w}),(0,t.jsxs)(s.CommandList,{className:"min-h-0 flex-1 max-h-64 overscroll-contain [scrollbar-width:thin] [&::-webkit-scrollbar]:block [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-border",children:[(0,t.jsx)(s.CommandEmpty,{children:p}),(0,t.jsxs)(s.CommandGroup,{children:[b&&e&&(0,t.jsx)(s.CommandItem,{"aria-label":b,onSelect:()=>{d(""),C(""),y(!1)},value:"__clear_selection__",children:b}),I&&(0,t.jsx)(s.CommandItem,{"aria-label":T,onSelect:()=>{d(T),C(""),y(!1)},value:T,children:(0,t.jsx)(i.Item,{className:"min-w-0 flex-1 border-0 p-0",size:"xs",children:(0,t.jsx)(i.ItemContent,{className:"min-w-0",children:(0,t.jsx)(i.ItemTitle,{className:"block truncate",children:T})})})}),c.map(a=>(0,t.jsx)(s.CommandItem,{"aria-label":[a.label,a.description,a.secondaryDescription].filter(Boolean).join(", "),"aria-selected":a.value===e,className:"items-start py-2","data-checked":a.value===e,disabled:a.disabled,keywords:[a.label,a.description??"",a.secondaryDescription??"",a.keywords??""],onSelect:()=>{d(a.value),C(""),y(!1)},value:a.value,children:(0,t.jsx)(i.Item,{className:"min-w-0 flex-1 border-0 p-0",size:"xs",children:(0,t.jsxs)(i.ItemContent,{className:"min-w-0",children:[(0,t.jsx)(i.ItemTitle,{className:"block truncate",children:a.label}),a.description&&(0,t.jsx)(i.ItemDescription,{className:"block truncate",children:a.description}),a.secondaryDescription&&(0,t.jsx)(i.ItemDescription,{className:"block truncate",children:a.secondaryDescription})]})})},a.value))]})]})]})})]})}])},360107,e=>{"use strict";var t=e.i(843476),a=e.i(482022),r=e.i(851817),l=e.i(882505),s=e.i(927735),i=e.i(741120),n=e.i(948148),o=e.i(271645),d=e.i(948812),c=e.i(16781),u=e.i(929592),m=e.i(519455),p=e.i(515288),h=e.i(257428),g=e.i(816484),x=e.i(82612),f=e.i(110204),v=e.i(983913),b=e.i(987968),j=e.i(784774),y=e.i(808562),w=e.i(520133),C=e.i(637611),R=e.i(975157),k=e.i(171502);let N="github-comments-layout",T="__all_pull_requests__",I=`
2
2
  id isResolved isOutdated subjectType path line startLine originalLine originalStartLine
3
3
  viewerCanReply viewerCanResolve viewerCanUnresolve
4
4
  resolvedBy { login avatarUrl url }
5
5
  pullRequest { id number title url repositoryNameWithOwner worktreeId worktreeHighlightColor }
6
6
  rootComment { id body bodyText bodyHtml url author { login avatarUrl url } createdAt updatedAt }
7
7
  replies { id body bodyText bodyHtml url author { login avatarUrl url } createdAt updatedAt }
8
- `;function E(e,t=!0){let a=new URLSearchParams(window.location.search);e?a.set("pullRequest",e):a.delete("pullRequest");let r=a.toString(),s=`${window.location.pathname}${r?`?${r}`:""}`;t?window.history.pushState(null,"",s):window.history.replaceState(null,"",s)}function S({className:e}){let a=(0,n.useTranslations)("githubComments");return(0,t.jsx)(x.Empty,{className:e??"border py-12",children:(0,t.jsxs)(x.EmptyHeader,{children:[(0,t.jsx)(x.EmptyMedia,{variant:"icon",children:(0,t.jsx)(l.MessageSquareText,{})}),(0,t.jsx)(x.EmptyTitle,{children:a("empty")}),(0,t.jsx)(x.EmptyDescription,{children:a("emptyDescription")})]})})}function D({checked:e,id:a,label:r,onCheckedChange:s}){return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.Checkbox,{checked:e,id:a,onCheckedChange:e=>s(!!e)}),(0,t.jsx)(f.Label,{htmlFor:a,children:r})]})}function L({threads:e}){let r=(0,n.useTranslations)("githubComments");return(0,t.jsxs)(m.Card,{className:"gap-0 py-0",children:[(0,t.jsxs)(m.CardHeader,{children:[(0,t.jsx)(m.CardTitle,{children:r("reviewThreads")}),(0,t.jsx)(m.CardDescription,{children:r("reviewThreadsDescription",{count:e.length})})]}),0===e.length?(0,t.jsx)(S,{className:"border-0 py-12"}):(0,t.jsxs)(j.Table,{children:[(0,t.jsx)(j.TableHeader,{children:(0,t.jsxs)(j.TableRow,{className:"hover:bg-transparent",children:[(0,t.jsx)(j.TableHead,{children:r("author")}),(0,t.jsx)(j.TableHead,{children:r("pullRequest")}),(0,t.jsx)(j.TableHead,{children:r("comment")}),(0,t.jsx)(j.TableHead,{children:r("date")}),(0,t.jsx)(j.TableHead,{children:r("replies")}),(0,t.jsx)(j.TableHead,{className:"text-right",children:r("github")})]})}),(0,t.jsx)(j.TableBody,{children:e.map(e=>{let s=e.pullRequest.worktreeHighlightColor;return(0,t.jsxs)(j.TableRow,{className:(0,R.cn)(s&&k.worktreeHighlightBackgroundClasses[s]),children:[(0,t.jsx)(j.TableCell,{className:(0,R.cn)("min-w-40",s&&k.worktreeHighlightInsetAccentClasses[s]),children:(0,t.jsx)(c.ReviewAuthor,{actor:e.rootComment.author,compact:!0})}),(0,t.jsx)(j.TableCell,{className:"min-w-64 whitespace-normal",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)(w.Link,{className:"font-semibold text-primary hover:underline",href:(0,d.pullRequestDetailHref)(e.pullRequest),children:[e.pullRequest.repositoryNameWithOwner," #",e.pullRequest.number]}),(0,t.jsx)(w.Link,{className:"text-sm hover:underline",href:(0,d.pullRequestDetailHref)(e.pullRequest),children:e.pullRequest.title})]})}),(0,t.jsx)(j.TableCell,{className:"min-w-80 whitespace-pre-wrap",children:e.rootComment.bodyText}),(0,t.jsx)(j.TableCell,{className:"whitespace-nowrap text-muted-foreground",children:(0,t.jsx)(g.DateTime,{kind:"relative",value:e.rootComment.createdAt})}),(0,t.jsx)(j.TableCell,{children:e.replies.length}),(0,t.jsx)(j.TableCell,{className:"text-right",children:(0,t.jsx)(p.Button,{asChild:!0,size:"icon-sm",variant:"ghost",children:(0,t.jsx)("a",{"aria-label":r("openInGitHub"),href:e.rootComment.url,rel:"noreferrer",target:"_blank",children:(0,t.jsx)(a.ExternalLink,{})})})})]},e.id)})})]})]})}e.s(["CommentsPage",0,function({initialPullRequest:e=null}){let a=(0,n.useTranslations)("githubComments"),[h,g]=(0,o.useState)(null),[f,j]=(0,o.useState)(null),[R,k]=(0,o.useState)(!0),[A,q]=(0,o.useState)(!1),[z,H]=(0,o.useState)(null),[P,G]=(0,o.useState)(e??""),[M,_]=(0,o.useState)(!0),[$,O]=(0,o.useState)(!0),[B,U]=(0,o.useState)(!0),[F,V]=(0,o.useState)("cards"),W=(0,o.useCallback)(async()=>{try{let e=await (0,C.controlPlaneRequest)("query GitHubCommentsConfiguration { githubSettings { tokenConfigured updatedAt } }");g(e.githubSettings),H(null)}catch(e){H(e instanceof Error?e.message:String(e))}finally{k(!1)}},[]),K=(0,o.useCallback)(async()=>{q(!0);try{let e=await (0,C.controlPlaneRequest)(`query GitHubReviewThreads {
8
+ `;function S(e,t=!0){let a=new URLSearchParams(window.location.search);e?a.set("pullRequest",e):a.delete("pullRequest");let r=a.toString(),l=`${window.location.pathname}${r?`?${r}`:""}`;t?window.history.pushState(null,"",l):window.history.replaceState(null,"",l)}function E({className:e}){let a=(0,n.useTranslations)("githubComments");return(0,t.jsx)(x.Empty,{className:e??"border py-12",children:(0,t.jsxs)(x.EmptyHeader,{children:[(0,t.jsx)(x.EmptyMedia,{variant:"icon",children:(0,t.jsx)(s.MessageSquareText,{})}),(0,t.jsx)(x.EmptyTitle,{children:a("empty")}),(0,t.jsx)(x.EmptyDescription,{children:a("emptyDescription")})]})})}function D({checked:e,id:a,label:r,onCheckedChange:l}){return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.Checkbox,{checked:e,id:a,onCheckedChange:e=>l(!!e)}),(0,t.jsx)(f.Label,{htmlFor:a,children:r})]})}function L({threads:e}){let r=(0,n.useTranslations)("githubComments");return(0,t.jsxs)(p.Card,{className:"gap-0 py-0",children:[(0,t.jsxs)(p.CardHeader,{children:[(0,t.jsx)(p.CardTitle,{children:r("reviewThreads")}),(0,t.jsx)(p.CardDescription,{children:r("reviewThreadsDescription",{count:e.length})})]}),0===e.length?(0,t.jsx)(E,{className:"border-0 py-12"}):(0,t.jsxs)(j.Table,{children:[(0,t.jsx)(j.TableHeader,{children:(0,t.jsxs)(j.TableRow,{className:"hover:bg-transparent",children:[(0,t.jsx)(j.TableHead,{children:r("author")}),(0,t.jsx)(j.TableHead,{children:r("pullRequest")}),(0,t.jsx)(j.TableHead,{children:r("comment")}),(0,t.jsx)(j.TableHead,{children:r("date")}),(0,t.jsx)(j.TableHead,{children:r("replies")}),(0,t.jsx)(j.TableHead,{className:"text-right",children:r("github")})]})}),(0,t.jsx)(j.TableBody,{children:e.map(e=>{let l=e.pullRequest.worktreeHighlightColor;return(0,t.jsxs)(j.TableRow,{className:(0,R.cn)(l&&k.worktreeHighlightBackgroundClasses[l]),children:[(0,t.jsx)(j.TableCell,{className:(0,R.cn)("min-w-40",l&&k.worktreeHighlightInsetAccentClasses[l]),children:(0,t.jsx)(c.ReviewAuthor,{actor:e.rootComment.author,compact:!0})}),(0,t.jsx)(j.TableCell,{className:"min-w-64 whitespace-normal",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)(w.Link,{className:"font-semibold text-primary hover:underline",href:(0,d.pullRequestDetailHref)(e.pullRequest),children:[e.pullRequest.repositoryNameWithOwner," #",e.pullRequest.number]}),(0,t.jsx)(w.Link,{className:"text-sm hover:underline",href:(0,d.pullRequestDetailHref)(e.pullRequest),children:e.pullRequest.title})]})}),(0,t.jsx)(j.TableCell,{className:"min-w-80 whitespace-pre-wrap",children:e.rootComment.bodyText}),(0,t.jsx)(j.TableCell,{className:"whitespace-nowrap text-muted-foreground",children:(0,t.jsx)(g.DateTime,{kind:"relative",value:e.rootComment.createdAt})}),(0,t.jsx)(j.TableCell,{children:e.replies.length}),(0,t.jsx)(j.TableCell,{className:"text-right",children:(0,t.jsx)(m.Button,{asChild:!0,size:"icon-sm",variant:"ghost",children:(0,t.jsx)("a",{"aria-label":r("openInGitHub"),href:e.rootComment.url,rel:"noreferrer",target:"_blank",children:(0,t.jsx)(a.ExternalLink,{})})})})]},e.id)})})]})]})}e.s(["CommentsPage",0,function({initialPullRequest:e=null}){let a=(0,n.useTranslations)("githubComments"),[h,g]=(0,o.useState)(null),[f,j]=(0,o.useState)(null),[R,k]=(0,o.useState)(!0),[A,q]=(0,o.useState)(!1),[z,H]=(0,o.useState)(null),[P,G]=(0,o.useState)(e??""),[_,M]=(0,o.useState)(!0),[$,O]=(0,o.useState)(!0),[B,U]=(0,o.useState)(!0),[F,V]=(0,o.useState)("cards"),W=(0,o.useCallback)(async()=>{try{let e=await (0,C.controlPlaneRequest)("query GitHubCommentsConfiguration { githubSettings { tokenConfigured updatedAt } }");g(e.githubSettings),H(null)}catch(e){H(e instanceof Error?e.message:String(e))}finally{k(!1)}},[]),K=(0,o.useCallback)(async()=>{q(!0);try{let e=await (0,C.controlPlaneRequest)(`query GitHubReviewThreads {
9
9
  githubReviewThreads {
10
10
  viewerLogin
11
11
  truncated
12
12
  pullRequests { id number title url repositoryNameWithOwner }
13
13
  threads { ${I} }
14
14
  }
15
- }`);j(e.githubReviewThreads),H(null)}catch(e){H(e instanceof Error?e.message:String(e))}finally{q(!1)}},[]);(0,o.useEffect)(()=>{let e=window.setTimeout(()=>void W(),0);return()=>window.clearTimeout(e)},[W]),(0,o.useEffect)(()=>{let e=window.localStorage.getItem(N);if("cards"!==e&&"table"!==e)return;let t=window.setTimeout(()=>V(e),0);return()=>window.clearTimeout(t)},[]),(0,o.useEffect)(()=>{if(!h?.tokenConfigured||f||A||z)return;let e=window.setTimeout(()=>void K(),0);return()=>window.clearTimeout(e)},[z,K,A,f,h?.tokenConfigured]),(0,o.useEffect)(()=>{let e=()=>G(new URLSearchParams(window.location.search).get("pullRequest")??"");return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),(0,o.useEffect)(()=>{!f||!P||f.pullRequests.some(e=>(0,d.pullRequestKey)(e)===P)||E(null,!1)},[f,P]);let X=P&&f?.pullRequests.some(e=>(0,d.pullRequestKey)(e)===P)?P:"",J=(0,o.useMemo)(()=>[{value:T,label:a("allPullRequests")},...f?.pullRequests.map(e=>({value:(0,d.pullRequestKey)(e),label:`#${e.number} ${e.title}`,description:e.repositoryNameWithOwner,keywords:`${e.repositoryNameWithOwner} ${e.number} ${e.title}`}))??[]],[f?.pullRequests,a]),Q=(0,o.useMemo)(()=>{if(!f||!M&&!$)return[];let e=f.viewerLogin.toLowerCase();return f.threads.filter(t=>(!X||(0,d.pullRequestKey)(t.pullRequest)===X)&&(t.rootComment.author?.login.toLowerCase()===e?!!M:!!$)&&(!B||!t.isResolved))},[M,$,f,B,X]),Y=(e,t)=>{j(a=>a?{...a,threads:a.threads.map(a=>a.id===e?{...a,replies:[...a.replies,t]}:a)}:a)},Z=e=>{j(t=>t?{...t,threads:t.threads.map(t=>t.id===e.id?{...t,...e}:t)}:t)};return(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-[1800px] flex-col gap-5",children:[(0,t.jsxs)("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:a("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:a("description")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(p.Button,{disabled:!h?.tokenConfigured||A,onClick:()=>void K(),variant:"outline",children:[(0,t.jsx)(i.RefreshCw,{className:A?"animate-spin":void 0}),a("refresh")]}),(0,t.jsxs)(y.ToggleGroup,{"aria-label":a("layout"),onValueChange:e=>{("cards"===e||"table"===e)&&(V(e),window.localStorage.setItem(N,e))},size:"sm",spacing:0,type:"single",value:F,variant:"outline",children:[(0,t.jsx)(y.ToggleGroupItem,{"aria-label":a("cards"),value:"cards",children:(0,t.jsx)(r.Grid2X2,{})}),(0,t.jsx)(y.ToggleGroupItem,{"aria-label":a("table"),value:"table",children:(0,t.jsx)(s.List,{})})]})]})]}),z&&(0,t.jsx)(u.Alert,{variant:"destructive",children:(0,t.jsx)(u.AlertDescription,{children:z})}),R?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(b.Spinner,{})," ",a("loadingConfiguration")]}):h?.tokenConfigured?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Card,{className:"py-0",children:(0,t.jsxs)(m.CardContent,{className:"flex flex-wrap items-center gap-5 py-4",children:[(0,t.jsx)("div",{className:"min-w-64 flex-1",children:(0,t.jsx)(v.SearchableSelect,{ariaLabel:a("allPullRequests"),emptyMessage:a("noPullRequestMatches"),onValueChange:e=>{let t=e===T?"":e;G(t),E(t||null)},options:J,placeholder:a("allPullRequests"),searchPlaceholder:a("searchPullRequests"),value:X||T})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-5",children:[(0,t.jsx)(D,{checked:M,id:"comments-current-user",label:a("currentUser"),onCheckedChange:_}),(0,t.jsx)(D,{checked:$,id:"comments-other-users",label:a("otherUsers"),onCheckedChange:O}),(0,t.jsx)(D,{checked:B,id:"comments-unresolved",label:a("unresolved"),onCheckedChange:U})]})]})}),f?.truncated&&(0,t.jsx)(u.Alert,{children:(0,t.jsx)(u.AlertDescription,{children:a("truncated")})}),A&&!f?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-10 text-sm text-muted-foreground",children:[(0,t.jsx)(b.Spinner,{})," ",a("loading")]}):"cards"===F?0===Q.length?(0,t.jsx)(S,{}):(0,t.jsx)("div",{className:"space-y-5",children:Q.map(e=>(0,t.jsx)(c.ReviewThreadCard,{onReplyAdded:Y,onStateChanged:Z,thread:e},e.id))}):(0,t.jsx)(L,{threads:Q})]}):(0,t.jsxs)(x.Empty,{className:"border py-12",children:[(0,t.jsxs)(x.EmptyHeader,{children:[(0,t.jsx)(x.EmptyMedia,{variant:"icon",children:(0,t.jsx)(l.MessageSquareText,{})}),(0,t.jsx)(x.EmptyTitle,{children:a("credentialsRequired")}),(0,t.jsx)(x.EmptyDescription,{children:a("credentialsDescription")})]}),(0,t.jsx)(p.Button,{asChild:!0,className:"mt-4",children:(0,t.jsx)(w.Link,{href:"/settings",children:a("openSettings")})})]})]})}])},948812,e=>{"use strict";function t(e){return`${e.repositoryNameWithOwner}#${e.number}`}e.s(["pullRequestCommentsHref",0,function(e){return`/comments?pullRequest=${encodeURIComponent(t(e))}`},"pullRequestDetailHref",0,function(e){let[t="",a=""]=e.repositoryNameWithOwner.split("/");return`/pull-requests/${encodeURIComponent(t)}/${encodeURIComponent(a)}/${e.number}`},"pullRequestKey",0,t])},16781,142833,e=>{"use strict";var t=e.i(843476),a=e.i(482022),r=e.i(730274),s=e.i(948148),l=e.i(271645),i=e.i(159888),n=e.i(689664),o=e.i(508734),d=e.i(772382),c=e.i(519455),u=e.i(462777),p=e.i(975157);function m({bodyHtml:e,className:a}){return(0,t.jsx)("div",{className:(0,p.cn)("prose prose-sm max-w-none break-words dark:prose-invert prose-a:text-primary prose-pre:overflow-x-auto [&_details>summary]:cursor-pointer",a),dangerouslySetInnerHTML:{__html:e}})}function h({body:e,bodyHtml:a,emptyLabel:r,header:g,headerActions:x,headerClassName:f}){let v=(0,s.useTranslations)("githubComments"),[b,j]=(0,l.useState)("RENDERED"),[y,w]=(0,l.useState)("IDLE");(0,l.useEffect)(()=>{if("COPIED"!==y)return;let e=window.setTimeout(()=>w("IDLE"),2e3);return()=>window.clearTimeout(e)},[y]);let C=async()=>{try{await (0,u.copyText)(e),w("COPIED")}catch{w("FAILED")}};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:(0,p.cn)("flex flex-wrap items-center justify-between gap-2",f),children:[(0,t.jsx)("div",{className:"min-w-0",children:g}),(e||x)&&(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[x,e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(c.Button,{onClick:()=>j(e=>"RENDERED"===e?"MARKDOWN":"RENDERED"),size:"xs",type:"button",variant:"outline",children:["RENDERED"===b?(0,t.jsx)(i.Braces,{}):(0,t.jsx)(d.Eye,{}),v("RENDERED"===b?"viewRaw":"viewRendered")]}),(0,t.jsxs)(c.Button,{"aria-label":v("copy"),onClick:()=>void C(),size:"xs",type:"button",variant:"outline",children:["COPIED"===y?(0,t.jsx)(n.Check,{}):(0,t.jsx)(o.Copy,{}),v("COPIED"===y?"copied":"copy")]})]})]})]}),"FAILED"===y&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:v("copyFailed")}),e?"MARKDOWN"===b?(0,t.jsx)("pre",{className:"rounded-lg bg-muted p-3 text-xs whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:e}):(0,t.jsx)(m,{bodyHtml:a}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:r})]})}e.s(["GitHubMarkdownBlock",0,h],142833);var g=e.i(948812),x=e.i(929592),f=e.i(799676),v=e.i(487486),b=e.i(515288),j=e.i(816484),y=e.i(987968),w=e.i(624687),C=e.i(520133),R=e.i(637611),k=e.i(171502);function N({actor:e,compact:a=!1}){let r=(0,s.useTranslations)("githubComments");return e?(0,t.jsxs)("a",{className:"inline-flex min-w-0 items-center gap-2 hover:underline",href:e.url,rel:"noreferrer",target:"_blank",children:[(0,t.jsxs)(f.Avatar,{className:a?"size-5":"size-7",children:[(0,t.jsx)(f.AvatarImage,{alt:"",src:e.avatarUrl}),(0,t.jsx)(f.AvatarFallback,{children:e.login.slice(0,1).toUpperCase()})]}),(0,t.jsxs)("span",{className:"truncate",children:["@",e.login]})]}):(0,t.jsx)("span",{children:r("unknownAuthor")})}function T(e,t){if("FILE"===e.subjectType)return`${e.path} \xb7 ${t}`;let a=e.line??e.originalLine,r=e.startLine??e.originalStartLine;return null===a?e.path:`${e.path} \xb7 L${r&&r!==a?`${r}–`:""}${a}`}function I({label:e,url:r}){return(0,t.jsx)(c.Button,{asChild:!0,size:"icon-xs",title:e,variant:"outline",children:(0,t.jsx)("a",{"aria-label":e,href:r,rel:"noreferrer",target:"_blank",children:(0,t.jsx)(a.ExternalLink,{})})})}e.s(["ReviewAuthor",0,N,"ReviewThreadCard",0,function({onReplyAdded:e,onStateChanged:a,thread:i}){let n=(0,s.useTranslations)("githubComments"),[o,d]=(0,l.useState)(""),[u,m]=(0,l.useState)(!1),[f,E]=(0,l.useState)(!1),[S,D]=(0,l.useState)(null),L=async t=>{if(t.preventDefault(),o.trim()&&i.viewerCanReply){m(!0);try{let t=await (0,R.controlPlaneRequest)(`mutation ReplyToGitHubReviewThread($threadId: ID!, $body: String!) {
15
+ }`);j(e.githubReviewThreads),H(null)}catch(e){H(e instanceof Error?e.message:String(e))}finally{q(!1)}},[]);(0,o.useEffect)(()=>{let e=window.setTimeout(()=>void W(),0);return()=>window.clearTimeout(e)},[W]),(0,o.useEffect)(()=>{let e=window.localStorage.getItem(N);if("cards"!==e&&"table"!==e)return;let t=window.setTimeout(()=>V(e),0);return()=>window.clearTimeout(t)},[]),(0,o.useEffect)(()=>{if(!h?.tokenConfigured||f||A||z)return;let e=window.setTimeout(()=>void K(),0);return()=>window.clearTimeout(e)},[z,K,A,f,h?.tokenConfigured]),(0,o.useEffect)(()=>{let e=()=>G(new URLSearchParams(window.location.search).get("pullRequest")??"");return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),(0,o.useEffect)(()=>{!f||!P||f.pullRequests.some(e=>(0,d.pullRequestKey)(e)===P)||S(null,!1)},[f,P]);let X=P&&f?.pullRequests.some(e=>(0,d.pullRequestKey)(e)===P)?P:"",J=(0,o.useMemo)(()=>[{value:T,label:a("allPullRequests")},...f?.pullRequests.map(e=>({value:(0,d.pullRequestKey)(e),label:`#${e.number} ${e.title}`,description:e.repositoryNameWithOwner,keywords:`${e.repositoryNameWithOwner} ${e.number} ${e.title}`}))??[]],[f?.pullRequests,a]),Q=(0,o.useMemo)(()=>{if(!f||!_&&!$)return[];let e=f.viewerLogin.toLowerCase();return f.threads.filter(t=>(!X||(0,d.pullRequestKey)(t.pullRequest)===X)&&(t.rootComment.author?.login.toLowerCase()===e?!!_:!!$)&&(!B||!t.isResolved))},[_,$,f,B,X]),Y=(e,t)=>{j(a=>a?{...a,threads:a.threads.map(a=>a.id===e?{...a,replies:[...a.replies,t]}:a)}:a)},Z=e=>{j(t=>t?{...t,threads:t.threads.map(t=>t.id===e.id?{...t,...e}:t)}:t)};return(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-[1800px] flex-col gap-5",children:[(0,t.jsxs)("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:a("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:a("description")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(m.Button,{disabled:!h?.tokenConfigured||A,onClick:()=>void K(),variant:"outline",children:[(0,t.jsx)(i.RefreshCw,{className:A?"animate-spin":void 0}),a("refresh")]}),(0,t.jsxs)(y.ToggleGroup,{"aria-label":a("layout"),onValueChange:e=>{("cards"===e||"table"===e)&&(V(e),window.localStorage.setItem(N,e))},size:"sm",spacing:0,type:"single",value:F,variant:"outline",children:[(0,t.jsx)(y.ToggleGroupItem,{"aria-label":a("cards"),value:"cards",children:(0,t.jsx)(r.Grid2X2,{})}),(0,t.jsx)(y.ToggleGroupItem,{"aria-label":a("table"),value:"table",children:(0,t.jsx)(l.List,{})})]})]})]}),z&&(0,t.jsx)(u.Alert,{variant:"destructive",children:(0,t.jsx)(u.AlertDescription,{children:z})}),R?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(b.Spinner,{})," ",a("loadingConfiguration")]}):h?.tokenConfigured?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.Card,{className:"py-0",children:(0,t.jsxs)(p.CardContent,{className:"flex flex-wrap items-center gap-5 py-4",children:[(0,t.jsx)("div",{className:"min-w-64 flex-1",children:(0,t.jsx)(v.SearchableSelect,{ariaLabel:a("allPullRequests"),emptyMessage:a("noPullRequestMatches"),onValueChange:e=>{let t=e===T?"":e;G(t),S(t||null)},options:J,placeholder:a("allPullRequests"),searchPlaceholder:a("searchPullRequests"),value:X||T})}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-5",children:[(0,t.jsx)(D,{checked:_,id:"comments-current-user",label:a("currentUser"),onCheckedChange:M}),(0,t.jsx)(D,{checked:$,id:"comments-other-users",label:a("otherUsers"),onCheckedChange:O}),(0,t.jsx)(D,{checked:B,id:"comments-unresolved",label:a("unresolved"),onCheckedChange:U})]})]})}),f?.truncated&&(0,t.jsx)(u.Alert,{children:(0,t.jsx)(u.AlertDescription,{children:a("truncated")})}),A&&!f?(0,t.jsxs)("div",{className:"flex items-center gap-2 py-10 text-sm text-muted-foreground",children:[(0,t.jsx)(b.Spinner,{})," ",a("loading")]}):"cards"===F?0===Q.length?(0,t.jsx)(E,{}):(0,t.jsx)("div",{className:"space-y-5",children:Q.map(e=>(0,t.jsx)(c.ReviewThreadCard,{onReplyAdded:Y,onStateChanged:Z,thread:e},e.id))}):(0,t.jsx)(L,{threads:Q})]}):(0,t.jsxs)(x.Empty,{className:"border py-12",children:[(0,t.jsxs)(x.EmptyHeader,{children:[(0,t.jsx)(x.EmptyMedia,{variant:"icon",children:(0,t.jsx)(s.MessageSquareText,{})}),(0,t.jsx)(x.EmptyTitle,{children:a("credentialsRequired")}),(0,t.jsx)(x.EmptyDescription,{children:a("credentialsDescription")})]}),(0,t.jsx)(m.Button,{asChild:!0,className:"mt-4",children:(0,t.jsx)(w.Link,{href:"/settings",children:a("openSettings")})})]})]})}])},948812,e=>{"use strict";function t(e){return`${e.repositoryNameWithOwner}#${e.number}`}e.s(["pullRequestCommentsHref",0,function(e){return`/comments?pullRequest=${encodeURIComponent(t(e))}`},"pullRequestDetailHref",0,function(e){let[t="",a=""]=e.repositoryNameWithOwner.split("/");return`/pull-requests/${encodeURIComponent(t)}/${encodeURIComponent(a)}/${e.number}`},"pullRequestKey",0,t])},16781,142833,e=>{"use strict";var t=e.i(843476),a=e.i(482022),r=e.i(730274),l=e.i(948148),s=e.i(271645),i=e.i(159888),n=e.i(689664),o=e.i(508734),d=e.i(772382),c=e.i(519455),u=e.i(462777),m=e.i(975157);function p({bodyHtml:e,className:a}){return(0,t.jsx)("div",{className:(0,m.cn)("prose prose-sm max-w-none break-words dark:prose-invert prose-a:text-primary prose-pre:overflow-x-auto [&_details>summary]:cursor-pointer",a),dangerouslySetInnerHTML:{__html:e}})}function h({body:e,bodyHtml:a,emptyLabel:r,header:g,headerActions:x,headerClassName:f}){let v=(0,l.useTranslations)("githubComments"),[b,j]=(0,s.useState)("RENDERED"),[y,w]=(0,s.useState)("IDLE");(0,s.useEffect)(()=>{if("COPIED"!==y)return;let e=window.setTimeout(()=>w("IDLE"),2e3);return()=>window.clearTimeout(e)},[y]);let C=async()=>{try{await (0,u.copyText)(e),w("COPIED")}catch{w("FAILED")}};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:(0,m.cn)("flex flex-wrap items-center justify-between gap-2",f),children:[(0,t.jsx)("div",{className:"min-w-0",children:g}),(e||x)&&(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[x,e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(c.Button,{onClick:()=>j(e=>"RENDERED"===e?"MARKDOWN":"RENDERED"),size:"xs",type:"button",variant:"outline",children:["RENDERED"===b?(0,t.jsx)(i.Braces,{}):(0,t.jsx)(d.Eye,{}),v("RENDERED"===b?"viewRaw":"viewRendered")]}),(0,t.jsxs)(c.Button,{"aria-label":v("copy"),onClick:()=>void C(),size:"xs",type:"button",variant:"outline",children:["COPIED"===y?(0,t.jsx)(n.Check,{}):(0,t.jsx)(o.Copy,{}),v("COPIED"===y?"copied":"copy")]})]})]})]}),"FAILED"===y&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:v("copyFailed")}),e?"MARKDOWN"===b?(0,t.jsx)("pre",{className:"rounded-lg bg-muted p-3 text-xs whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:e}):(0,t.jsx)(p,{bodyHtml:a}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:r})]})}e.s(["GitHubMarkdownBlock",0,h],142833);var g=e.i(948812),x=e.i(929592),f=e.i(799676),v=e.i(487486),b=e.i(515288),j=e.i(816484),y=e.i(987968),w=e.i(624687),C=e.i(520133),R=e.i(637611),k=e.i(171502);function N({actor:e,compact:a=!1}){let r=(0,l.useTranslations)("githubComments");return e?(0,t.jsxs)("a",{className:"inline-flex min-w-0 items-center gap-2 hover:underline",href:e.url,rel:"noreferrer",target:"_blank",children:[(0,t.jsxs)(f.Avatar,{className:a?"size-5":"size-7",children:[(0,t.jsx)(f.AvatarImage,{alt:"",src:e.avatarUrl}),(0,t.jsx)(f.AvatarFallback,{children:e.login.slice(0,1).toUpperCase()})]}),(0,t.jsxs)("span",{className:"truncate",children:["@",e.login]})]}):(0,t.jsx)("span",{children:r("unknownAuthor")})}function T(e,t){if("FILE"===e.subjectType)return`${e.path} \xb7 ${t}`;let a=e.line??e.originalLine,r=e.startLine??e.originalStartLine;return null===a?e.path:`${e.path} \xb7 L${r&&r!==a?`${r}–`:""}${a}`}function I({label:e,url:r}){return(0,t.jsx)(c.Button,{asChild:!0,size:"icon-xs",title:e,variant:"outline",children:(0,t.jsx)("a",{"aria-label":e,href:r,rel:"noreferrer",target:"_blank",children:(0,t.jsx)(a.ExternalLink,{})})})}e.s(["ReviewAuthor",0,N,"ReviewThreadCard",0,function({onReplyAdded:e,onStateChanged:a,thread:i}){let n=(0,l.useTranslations)("githubComments"),[o,d]=(0,s.useState)(""),[u,p]=(0,s.useState)(!1),[f,S]=(0,s.useState)(!1),[E,D]=(0,s.useState)(null),L=async t=>{if(t.preventDefault(),o.trim()&&i.viewerCanReply){p(!0);try{let t=await (0,R.controlPlaneRequest)(`mutation ReplyToGitHubReviewThread($threadId: ID!, $body: String!) {
16
16
  replyToGitHubReviewThread(threadId: $threadId, body: $body) {
17
17
  id body bodyText bodyHtml url author { login avatarUrl url } createdAt updatedAt
18
18
  }
19
- }`,{threadId:i.id,body:o});e(i.id,t.replyToGitHubReviewThread),d(""),D(null)}catch(e){D(e instanceof Error?e.message:String(e))}finally{m(!1)}}},A=async()=>{let e=!i.isResolved;if((!e||i.viewerCanResolve)&&(e||i.viewerCanUnresolve)){E(!0);try{let t=await (0,R.controlPlaneRequest)(`mutation SetGitHubReviewThreadResolved(
19
+ }`,{threadId:i.id,body:o});e(i.id,t.replyToGitHubReviewThread),d(""),D(null)}catch(e){D(e instanceof Error?e.message:String(e))}finally{p(!1)}}},A=async()=>{let e=!i.isResolved;if((!e||i.viewerCanResolve)&&(e||i.viewerCanUnresolve)){S(!0);try{let t=await (0,R.controlPlaneRequest)(`mutation SetGitHubReviewThreadResolved(
20
20
  $threadId: ID!
21
21
  $resolved: Boolean!
22
22
  ) {
@@ -24,4 +24,4 @@
24
24
  threadId: $threadId
25
25
  resolved: $resolved
26
26
  ) { id isResolved viewerCanResolve viewerCanUnresolve resolvedBy { login avatarUrl url } }
27
- }`,{threadId:i.id,resolved:e});a(t.setGitHubReviewThreadResolved),D(null)}catch(e){D(e instanceof Error?e.message:String(e))}finally{E(!1)}}},q=i.isResolved?i.viewerCanUnresolve:i.viewerCanResolve,z=i.pullRequest.worktreeHighlightColor;return(0,t.jsx)(b.Card,{className:(0,p.cn)(z&&"border-l-4",z&&k.worktreeHighlightBackgroundClasses[z],z&&k.worktreeHighlightAccentClasses[z]),children:(0,t.jsxs)(b.CardContent,{className:"space-y-5",children:[(0,t.jsx)(h,{body:i.rootComment.body,bodyHtml:i.rootComment.bodyHtml,emptyLabel:"—",header:(0,t.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,t.jsx)(N,{actor:i.rootComment.author}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"·"}),(0,t.jsx)(j.DateTime,{className:"text-muted-foreground",kind:"relative",value:i.rootComment.createdAt})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,t.jsx)(v.Badge,{className:"max-w-full",title:T(i,n("fileComment")),variant:"outline",children:T(i,n("fileComment"))}),i.isOutdated&&(0,t.jsx)(v.Badge,{variant:"secondary",children:n("outdated")}),(0,t.jsx)(v.Badge,{variant:i.isResolved?"secondary":"outline",children:i.isResolved?n("resolved"):n("unresolved")}),(0,t.jsxs)(C.Link,{className:"font-medium text-primary hover:underline",href:(0,g.pullRequestDetailHref)(i.pullRequest),children:[i.pullRequest.repositoryNameWithOwner," #",i.pullRequest.number]})]})]}),headerActions:(0,t.jsx)(I,{label:n("openInGitHub"),url:i.rootComment.url}),headerClassName:"border-b pb-4"}),i.replies.length>0&&(0,t.jsx)("div",{className:"space-y-3",children:i.replies.map(e=>(0,t.jsx)(b.Card,{size:"sm",children:(0,t.jsx)(b.CardContent,{children:(0,t.jsx)(h,{body:e.body,bodyHtml:e.bodyHtml,emptyLabel:"—",header:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,t.jsx)(N,{actor:e.author,compact:!0}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"·"}),(0,t.jsx)(j.DateTime,{className:"text-muted-foreground",kind:"relative",value:e.createdAt})]}),headerActions:(0,t.jsx)(I,{label:n("openReplyInGitHub"),url:e.url}),headerClassName:"border-b pb-3"})})},e.id))}),S&&(0,t.jsx)(x.Alert,{variant:"destructive",children:(0,t.jsx)(x.AlertDescription,{children:S})}),(0,t.jsxs)("form",{className:"space-y-3",onSubmit:L,children:[(0,t.jsx)(w.Textarea,{"aria-label":n("reply"),disabled:!i.viewerCanReply||u,onChange:e=>d(e.target.value),placeholder:i.viewerCanReply?n("replyPlaceholder"):n("replyUnavailable"),value:o}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,t.jsxs)(c.Button,{disabled:!q||f,onClick:()=>void A(),type:"button",variant:"outline",children:[f&&(0,t.jsx)(y.Spinner,{}),i.isResolved?n("reopen"):n("resolve")]}),(0,t.jsxs)(c.Button,{disabled:!i.viewerCanReply||u||!o.trim(),type:"submit",children:[u?(0,t.jsx)(y.Spinner,{}):(0,t.jsx)(r.Send,{}),u?n("replying"):n("sendReply")]})]})]})]})})}],16781)},799676,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(705844),s=e.i(30030),l=e.i(30207),i=e.i(934620),n=e.i(248425),o=Object.defineProperty,d=(e,t)=>o(e,"name",{value:t,configurable:!0}),c="Avatar",[u,p]=(0,s.createContextScope)(c),m=[0,()=>void 0],[h,g]=u(c),x=a.forwardRef(d(function(e,r){let{__scopeAvatar:s,...l}=e,[i,o]=a.useState("idle"),[d,c]=y();return(0,t.jsx)(h,{scope:s,imageLoadingStatus:i,setImageLoadingStatus:o,imageCount:d,setImageCount:c,children:(0,t.jsx)(n.Primitive.span,{...l,ref:r})})},"Avatar")),f=a.forwardRef(d(function(e,r){let{__scopeAvatar:s,src:o,onLoadingStatusChange:d,...c}=e,u=g("AvatarImage",s);w(u.setImageCount);let p=b(o,{referrerPolicy:c.referrerPolicy,crossOrigin:c.crossOrigin,loadingStatus:u.imageLoadingStatus,setLoadingStatus:u.setImageLoadingStatus}),m=(0,l.useCallbackRef)(e=>{d?.(e)}),h=a.useRef(p);return(0,i.useLayoutEffect)(()=>{let e=h.current;h.current=p,p!==e&&m(p)},[p,m]),"loaded"===p?(0,t.jsx)(n.Primitive.img,{...c,ref:r,src:o}):null},"AvatarImage")),v=a.forwardRef(d(function(e,r){let{__scopeAvatar:s,delayMs:l,...i}=e,o=g("AvatarFallback",s),[d,c]=a.useState(void 0===l);return a.useEffect(()=>{if(void 0!==l){let e=window.setTimeout(()=>c(!0),l);return()=>window.clearTimeout(e)}},[l]),d&&"loaded"!==o.imageLoadingStatus?(0,t.jsx)(n.Primitive.span,{...i,ref:r}):null},"AvatarFallback"));function b(e,{loadingStatus:t,setLoadingStatus:a,referrerPolicy:r,crossOrigin:s}){return(0,i.useLayoutEffect)(()=>{if(!e)return void a("error");let t=new window.Image,l=d(e=>{a(j(e.currentTarget))},"handleLoad"),i=d(()=>a("error"),"handleError");return t.addEventListener("load",l),t.addEventListener("error",i),r&&(t.referrerPolicy=r),t.crossOrigin=s??null,t.src=e,a(j(t)),()=>{t.removeEventListener("load",l),t.removeEventListener("error",i),a("idle")}},[e,s,r,a]),t}function j(e){return e.complete?e.naturalWidth>0?"loaded":"error":"loading"}function y(){let e=m;if(r.IS_DEVELOPMENT){let[t]=e=a.useState(0),r=a.useRef(!1);a.useEffect(()=>{t>1&&!r.current&&(r.current=!0,console.warn("Avatar: Only one `Avatar.Image` component should be rendered per `Avatar.Root`, but multiple were detected. This will lead to unexpected behavior."))},[t])}return e}function w(e){r.IS_DEVELOPMENT&&a.useEffect(()=>(e(e=>e+1),()=>{e(e=>e-1)}),[e])}d(b,"useImageLoadingStatus"),d(j,"getImageLoadingStatus"),d(y,"useImageCount"),d(w,"useUpdateImageCount"),e.s(["Avatar",0,x,"AvatarFallback",0,v,"AvatarImage",0,f,"Fallback",0,v,"Image",0,f,"Root",0,x,"createAvatarScope",0,p],97456);var C=e.i(97456),C=C,R=e.i(975157);e.s(["Avatar",0,function({className:e,size:a="default",...r}){return(0,t.jsx)(C.Root,{className:(0,R.cn)("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),"data-size":a,"data-slot":"avatar",...r})},"AvatarFallback",0,function({className:e,...a}){return(0,t.jsx)(C.Fallback,{className:(0,R.cn)("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),"data-slot":"avatar-fallback",...a})},"AvatarImage",0,function({className:e,...a}){return(0,t.jsx)(C.Image,{className:(0,R.cn)("aspect-square size-full rounded-full object-cover",e),"data-slot":"avatar-image",...a})}],799676)},82612,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(975157);let s=(0,a.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,...a}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,r.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),...a})},"EmptyDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,r.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})},"EmptyHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,r.cn)("flex max-w-sm flex-col items-center gap-2",e),...a})},"EmptyMedia",0,function({className:e,variant:a="default",...l}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":a,className:(0,r.cn)(s({variant:a,className:e})),...l})},"EmptyTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,r.cn)("font-heading text-sm font-medium tracking-tight",e),...a})}])},784774,e=>{"use strict";var t=e.i(843476),a=e.i(975157);e.s(["Table",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,a.cn)("w-full caption-bottom text-sm",e),...r})})},"TableBody",0,function({className:e,...r}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,a.cn)("[&_tr:last-child]:border-0",e),...r})},"TableCell",0,function({className:e,...r}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,a.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...r})},"TableFooter",0,function({className:e,...r}){return(0,t.jsx)("tfoot",{"data-slot":"table-footer",className:(0,a.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...r})},"TableHead",0,function({className:e,...r}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,a.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",e),...r})},"TableHeader",0,function({className:e,...r}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,a.cn)("[&_tr]:border-b",e),...r})},"TableRow",0,function({className:e,...r}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,a.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...r})}])},808562,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(30030),s=e.i(248425),l=e.i(842727),i=e.i(981140),n=e.i(369340),o=Object.defineProperty,d=a.forwardRef(o(function(e,a){let{pressed:r,defaultPressed:l,onPressedChange:o,...d}=e,[c,u]=(0,n.useControllableState)({prop:r,onChange:o,defaultProp:l??!1,caller:"Toggle"});return(0,t.jsx)(s.Primitive.button,{type:"button","aria-pressed":c,"data-state":c?"on":"off","data-disabled":e.disabled?"":void 0,...d,ref:a,onClick:(0,i.composeEventHandlers)(e.onClick,()=>{e.disabled||u(!c)})})},"name",{value:"Toggle",configurable:!0})),c=e.i(586318),u=Object.defineProperty,p=(e,t)=>u(e,"name",{value:t,configurable:!0}),m="ToggleGroup",[h,g]=(0,r.createContextScope)(m,[l.createRovingFocusGroupScope]),x=(0,l.createRovingFocusGroupScope)(),f=a.forwardRef(p(function(e,a){let{type:r,...s}=e;if("single"===r)return(0,t.jsx)(j,{role:"radiogroup",...s,ref:a});if("multiple"===r)return(0,t.jsx)(y,{role:"toolbar",...s,ref:a});throw Error(`Missing prop \`type\` expected on \`${m}\``)},"ToggleGroup")),[v,b]=h(m),j=a.forwardRef(p(function(e,r){let{value:s,defaultValue:l,onValueChange:i=p(()=>{},"onValueChange"),...o}=e,[d,c]=(0,n.useControllableState)({prop:s,defaultProp:l??"",onChange:i,caller:m});return(0,t.jsx)(v,{scope:e.__scopeToggleGroup,type:"single",value:a.useMemo(()=>d?[d]:[],[d]),onItemActivate:c,onItemDeactivate:a.useCallback(()=>c(""),[c]),children:(0,t.jsx)(R,{...o,ref:r})})},"ToggleGroupImplSingle")),y=a.forwardRef(p(function(e,r){let{value:s,defaultValue:l,onValueChange:i=p(()=>{},"onValueChange"),...o}=e,[d,c]=(0,n.useControllableState)({prop:s,defaultProp:l??[],onChange:i,caller:m}),u=a.useCallback(e=>c((t=[])=>[...t,e]),[c]),h=a.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,t.jsx)(v,{scope:e.__scopeToggleGroup,type:"multiple",value:d,onItemActivate:u,onItemDeactivate:h,children:(0,t.jsx)(R,{...o,ref:r})})},"ToggleGroupImplMultiple")),[w,C]=h(m),R=a.forwardRef(p(function(e,a){let{__scopeToggleGroup:r,disabled:i=!1,rovingFocus:n=!0,orientation:o,dir:d,loop:u=!0,...p}=e,m=x(r),h=(0,c.useDirection)(d),g={dir:h,...p};return(0,t.jsx)(w,{scope:r,rovingFocus:n,disabled:i,children:n?(0,t.jsx)(l.Root,{asChild:!0,...m,orientation:o,dir:h,loop:u,children:(0,t.jsx)(s.Primitive.div,{...g,ref:a})}):(0,t.jsx)(s.Primitive.div,{...g,ref:a})})},"ToggleGroupImpl")),k="ToggleGroupItem",N=a.forwardRef(p(function(e,r){let s=b(k,e.__scopeToggleGroup),i=C(k,e.__scopeToggleGroup),n=x(e.__scopeToggleGroup),o=s.value.includes(e.value),d=i.disabled||e.disabled,c={...e,pressed:o,disabled:d},u=a.useRef(null);return i.rovingFocus?(0,t.jsx)(l.Item,{asChild:!0,...n,focusable:!d,active:o,ref:u,children:(0,t.jsx)(T,{...c,ref:r})}):(0,t.jsx)(T,{...c,ref:r})},"ToggleGroupItem")),T=a.forwardRef(p(function(e,a){let{__scopeToggleGroup:r,value:s,...l}=e,i=b(k,r),n={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},o="single"===i.type?n:void 0;return(0,t.jsx)(d,{...o,...l,ref:a,onPressedChange:e=>{e?i.onItemActivate(s):i.onItemDeactivate(s)}})},"ToggleGroupItemImpl"));e.s(["Item",0,N,"Root",0,f,"ToggleGroup",0,f,"ToggleGroupItem",0,N,"createToggleGroupScope",0,g],459881);var I=e.i(459881),I=I,E=e.i(975157),S=e.i(225913),D=Object.defineProperty,L=a.forwardRef(D(function(e,a){let{pressed:r,defaultPressed:l,onPressedChange:o,...d}=e,[c,u]=(0,n.useControllableState)({prop:r,onChange:o,defaultProp:l??!1,caller:"Toggle"});return(0,t.jsx)(s.Primitive.button,{type:"button","aria-pressed":c,"data-state":c?"on":"off","data-disabled":e.disabled?"":void 0,...d,ref:a,onClick:(0,i.composeEventHandlers)(e.onClick,()=>{e.disabled||u(!c)})})},"name",{value:"Toggle",configurable:!0}));e.s(["Root",0,L,"Toggle",0,L],864225),e.i(864225);let A=(0,S.cva)("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",sm:"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}}),q=a.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});e.s(["ToggleGroup",0,function({className:e,variant:a,size:r,spacing:s=2,orientation:l="horizontal",children:i,...n}){return(0,t.jsx)(I.Root,{"data-slot":"toggle-group","data-variant":a,"data-size":r,"data-spacing":s,"data-orientation":l,style:{"--gap":s},className:(0,E.cn)("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch",e),...n,children:(0,t.jsx)(q.Provider,{value:{variant:a,size:r,spacing:s,orientation:l},children:i})})},"ToggleGroupItem",0,function({className:e,children:r,variant:s="default",size:l="default",...i}){let n=a.useContext(q);return(0,t.jsx)(I.Item,{"data-slot":"toggle-group-item","data-variant":n.variant||s,"data-size":n.size||l,"data-spacing":n.spacing,className:(0,E.cn)("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",A({variant:n.variant||s,size:n.size||l}),e),...i,children:r})}],808562)}]);
27
+ }`,{threadId:i.id,resolved:e});a(t.setGitHubReviewThreadResolved),D(null)}catch(e){D(e instanceof Error?e.message:String(e))}finally{S(!1)}}},q=i.isResolved?i.viewerCanUnresolve:i.viewerCanResolve,z=i.pullRequest.worktreeHighlightColor;return(0,t.jsx)(b.Card,{className:(0,m.cn)(z&&"border-l-4",z&&k.worktreeHighlightBackgroundClasses[z],z&&k.worktreeHighlightAccentClasses[z]),children:(0,t.jsxs)(b.CardContent,{className:"space-y-5",children:[(0,t.jsx)(h,{body:i.rootComment.body,bodyHtml:i.rootComment.bodyHtml,emptyLabel:"—",header:(0,t.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,t.jsx)(N,{actor:i.rootComment.author}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"·"}),(0,t.jsx)(j.DateTime,{className:"text-muted-foreground",kind:"relative",value:i.rootComment.createdAt})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,t.jsx)(v.Badge,{className:"max-w-full",title:T(i,n("fileComment")),variant:"outline",children:T(i,n("fileComment"))}),i.isOutdated&&(0,t.jsx)(v.Badge,{variant:"secondary",children:n("outdated")}),(0,t.jsx)(v.Badge,{variant:i.isResolved?"secondary":"outline",children:i.isResolved?n("resolved"):n("unresolved")}),(0,t.jsxs)(C.Link,{className:"font-medium text-primary hover:underline",href:(0,g.pullRequestDetailHref)(i.pullRequest),children:[i.pullRequest.repositoryNameWithOwner," #",i.pullRequest.number]})]})]}),headerActions:(0,t.jsx)(I,{label:n("openInGitHub"),url:i.rootComment.url}),headerClassName:"border-b pb-4"}),i.replies.length>0&&(0,t.jsx)("div",{className:"space-y-3",children:i.replies.map(e=>(0,t.jsx)(b.Card,{size:"sm",children:(0,t.jsx)(b.CardContent,{children:(0,t.jsx)(h,{body:e.body,bodyHtml:e.bodyHtml,emptyLabel:"—",header:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,t.jsx)(N,{actor:e.author,compact:!0}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"·"}),(0,t.jsx)(j.DateTime,{className:"text-muted-foreground",kind:"relative",value:e.createdAt})]}),headerActions:(0,t.jsx)(I,{label:n("openReplyInGitHub"),url:e.url}),headerClassName:"border-b pb-3"})})},e.id))}),E&&(0,t.jsx)(x.Alert,{variant:"destructive",children:(0,t.jsx)(x.AlertDescription,{children:E})}),(0,t.jsxs)("form",{className:"space-y-3",onSubmit:L,children:[(0,t.jsx)(w.Textarea,{"aria-label":n("reply"),disabled:!i.viewerCanReply||u,onChange:e=>d(e.target.value),placeholder:i.viewerCanReply?n("replyPlaceholder"):n("replyUnavailable"),value:o}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,t.jsxs)(c.Button,{disabled:!q||f,onClick:()=>void A(),type:"button",variant:"outline",children:[f&&(0,t.jsx)(y.Spinner,{}),i.isResolved?n("reopen"):n("resolve")]}),(0,t.jsxs)(c.Button,{disabled:!i.viewerCanReply||u||!o.trim(),type:"submit",children:[u?(0,t.jsx)(y.Spinner,{}):(0,t.jsx)(r.Send,{}),u?n("replying"):n("sendReply")]})]})]})]})})}],16781)},799676,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(705844),l=e.i(30030),s=e.i(30207),i=e.i(934620),n=e.i(248425),o=Object.defineProperty,d=(e,t)=>o(e,"name",{value:t,configurable:!0}),c="Avatar",[u,m]=(0,l.createContextScope)(c),p=[0,()=>void 0],[h,g]=u(c),x=a.forwardRef(d(function(e,r){let{__scopeAvatar:l,...s}=e,[i,o]=a.useState("idle"),[d,c]=y();return(0,t.jsx)(h,{scope:l,imageLoadingStatus:i,setImageLoadingStatus:o,imageCount:d,setImageCount:c,children:(0,t.jsx)(n.Primitive.span,{...s,ref:r})})},"Avatar")),f=a.forwardRef(d(function(e,r){let{__scopeAvatar:l,src:o,onLoadingStatusChange:d,...c}=e,u=g("AvatarImage",l);w(u.setImageCount);let m=b(o,{referrerPolicy:c.referrerPolicy,crossOrigin:c.crossOrigin,loadingStatus:u.imageLoadingStatus,setLoadingStatus:u.setImageLoadingStatus}),p=(0,s.useCallbackRef)(e=>{d?.(e)}),h=a.useRef(m);return(0,i.useLayoutEffect)(()=>{let e=h.current;h.current=m,m!==e&&p(m)},[m,p]),"loaded"===m?(0,t.jsx)(n.Primitive.img,{...c,ref:r,src:o}):null},"AvatarImage")),v=a.forwardRef(d(function(e,r){let{__scopeAvatar:l,delayMs:s,...i}=e,o=g("AvatarFallback",l),[d,c]=a.useState(void 0===s);return a.useEffect(()=>{if(void 0!==s){let e=window.setTimeout(()=>c(!0),s);return()=>window.clearTimeout(e)}},[s]),d&&"loaded"!==o.imageLoadingStatus?(0,t.jsx)(n.Primitive.span,{...i,ref:r}):null},"AvatarFallback"));function b(e,{loadingStatus:t,setLoadingStatus:a,referrerPolicy:r,crossOrigin:l}){return(0,i.useLayoutEffect)(()=>{if(!e)return void a("error");let t=new window.Image,s=d(e=>{a(j(e.currentTarget))},"handleLoad"),i=d(()=>a("error"),"handleError");return t.addEventListener("load",s),t.addEventListener("error",i),r&&(t.referrerPolicy=r),t.crossOrigin=l??null,t.src=e,a(j(t)),()=>{t.removeEventListener("load",s),t.removeEventListener("error",i),a("idle")}},[e,l,r,a]),t}function j(e){return e.complete?e.naturalWidth>0?"loaded":"error":"loading"}function y(){let e=p;if(r.IS_DEVELOPMENT){let[t]=e=a.useState(0),r=a.useRef(!1);a.useEffect(()=>{t>1&&!r.current&&(r.current=!0,console.warn("Avatar: Only one `Avatar.Image` component should be rendered per `Avatar.Root`, but multiple were detected. This will lead to unexpected behavior."))},[t])}return e}function w(e){r.IS_DEVELOPMENT&&a.useEffect(()=>(e(e=>e+1),()=>{e(e=>e-1)}),[e])}d(b,"useImageLoadingStatus"),d(j,"getImageLoadingStatus"),d(y,"useImageCount"),d(w,"useUpdateImageCount"),e.s(["Avatar",0,x,"AvatarFallback",0,v,"AvatarImage",0,f,"Fallback",0,v,"Image",0,f,"Root",0,x,"createAvatarScope",0,m],97456);var C=e.i(97456),C=C,R=e.i(975157);e.s(["Avatar",0,function({className:e,size:a="default",...r}){return(0,t.jsx)(C.Root,{className:(0,R.cn)("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),"data-size":a,"data-slot":"avatar",...r})},"AvatarFallback",0,function({className:e,...a}){return(0,t.jsx)(C.Fallback,{className:(0,R.cn)("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),"data-slot":"avatar-fallback",...a})},"AvatarImage",0,function({className:e,...a}){return(0,t.jsx)(C.Image,{className:(0,R.cn)("aspect-square size-full rounded-full object-cover",e),"data-slot":"avatar-image",...a})}],799676)},82612,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(975157);let l=(0,a.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,...a}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,r.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),...a})},"EmptyDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,r.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})},"EmptyHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,r.cn)("flex max-w-sm flex-col items-center gap-2",e),...a})},"EmptyMedia",0,function({className:e,variant:a="default",...s}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":a,className:(0,r.cn)(l({variant:a,className:e})),...s})},"EmptyTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,r.cn)("font-heading text-sm font-medium tracking-tight",e),...a})}])},784774,e=>{"use strict";var t=e.i(843476),a=e.i(975157);e.s(["Table",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,a.cn)("w-full caption-bottom text-sm",e),...r})})},"TableBody",0,function({className:e,...r}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,a.cn)("[&_tr:last-child]:border-0",e),...r})},"TableCell",0,function({className:e,...r}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,a.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...r})},"TableFooter",0,function({className:e,...r}){return(0,t.jsx)("tfoot",{"data-slot":"table-footer",className:(0,a.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...r})},"TableHead",0,function({className:e,...r}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,a.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",e),...r})},"TableHeader",0,function({className:e,...r}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,a.cn)("[&_tr]:border-b",e),...r})},"TableRow",0,function({className:e,...r}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,a.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...r})}])},808562,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(30030),l=e.i(248425),s=e.i(842727),i=e.i(981140),n=e.i(369340),o=Object.defineProperty,d=a.forwardRef(o(function(e,a){let{pressed:r,defaultPressed:s,onPressedChange:o,...d}=e,[c,u]=(0,n.useControllableState)({prop:r,onChange:o,defaultProp:s??!1,caller:"Toggle"});return(0,t.jsx)(l.Primitive.button,{type:"button","aria-pressed":c,"data-state":c?"on":"off","data-disabled":e.disabled?"":void 0,...d,ref:a,onClick:(0,i.composeEventHandlers)(e.onClick,()=>{e.disabled||u(!c)})})},"name",{value:"Toggle",configurable:!0})),c=e.i(586318),u=Object.defineProperty,m=(e,t)=>u(e,"name",{value:t,configurable:!0}),p="ToggleGroup",[h,g]=(0,r.createContextScope)(p,[s.createRovingFocusGroupScope]),x=(0,s.createRovingFocusGroupScope)(),f=a.forwardRef(m(function(e,a){let{type:r,...l}=e;if("single"===r)return(0,t.jsx)(j,{role:"radiogroup",...l,ref:a});if("multiple"===r)return(0,t.jsx)(y,{role:"toolbar",...l,ref:a});throw Error(`Missing prop \`type\` expected on \`${p}\``)},"ToggleGroup")),[v,b]=h(p),j=a.forwardRef(m(function(e,r){let{value:l,defaultValue:s,onValueChange:i=m(()=>{},"onValueChange"),...o}=e,[d,c]=(0,n.useControllableState)({prop:l,defaultProp:s??"",onChange:i,caller:p});return(0,t.jsx)(v,{scope:e.__scopeToggleGroup,type:"single",value:a.useMemo(()=>d?[d]:[],[d]),onItemActivate:c,onItemDeactivate:a.useCallback(()=>c(""),[c]),children:(0,t.jsx)(R,{...o,ref:r})})},"ToggleGroupImplSingle")),y=a.forwardRef(m(function(e,r){let{value:l,defaultValue:s,onValueChange:i=m(()=>{},"onValueChange"),...o}=e,[d,c]=(0,n.useControllableState)({prop:l,defaultProp:s??[],onChange:i,caller:p}),u=a.useCallback(e=>c((t=[])=>[...t,e]),[c]),h=a.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,t.jsx)(v,{scope:e.__scopeToggleGroup,type:"multiple",value:d,onItemActivate:u,onItemDeactivate:h,children:(0,t.jsx)(R,{...o,ref:r})})},"ToggleGroupImplMultiple")),[w,C]=h(p),R=a.forwardRef(m(function(e,a){let{__scopeToggleGroup:r,disabled:i=!1,rovingFocus:n=!0,orientation:o,dir:d,loop:u=!0,...m}=e,p=x(r),h=(0,c.useDirection)(d),g={dir:h,...m};return(0,t.jsx)(w,{scope:r,rovingFocus:n,disabled:i,children:n?(0,t.jsx)(s.Root,{asChild:!0,...p,orientation:o,dir:h,loop:u,children:(0,t.jsx)(l.Primitive.div,{...g,ref:a})}):(0,t.jsx)(l.Primitive.div,{...g,ref:a})})},"ToggleGroupImpl")),k="ToggleGroupItem",N=a.forwardRef(m(function(e,r){let l=b(k,e.__scopeToggleGroup),i=C(k,e.__scopeToggleGroup),n=x(e.__scopeToggleGroup),o=l.value.includes(e.value),d=i.disabled||e.disabled,c={...e,pressed:o,disabled:d},u=a.useRef(null);return i.rovingFocus?(0,t.jsx)(s.Item,{asChild:!0,...n,focusable:!d,active:o,ref:u,children:(0,t.jsx)(T,{...c,ref:r})}):(0,t.jsx)(T,{...c,ref:r})},"ToggleGroupItem")),T=a.forwardRef(m(function(e,a){let{__scopeToggleGroup:r,value:l,...s}=e,i=b(k,r),n={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},o="single"===i.type?n:void 0;return(0,t.jsx)(d,{...o,...s,ref:a,onPressedChange:e=>{e?i.onItemActivate(l):i.onItemDeactivate(l)}})},"ToggleGroupItemImpl"));e.s(["Item",0,N,"Root",0,f,"ToggleGroup",0,f,"ToggleGroupItem",0,N,"createToggleGroupScope",0,g],459881);var I=e.i(459881),I=I,S=e.i(975157),E=e.i(225913),D=Object.defineProperty,L=a.forwardRef(D(function(e,a){let{pressed:r,defaultPressed:s,onPressedChange:o,...d}=e,[c,u]=(0,n.useControllableState)({prop:r,onChange:o,defaultProp:s??!1,caller:"Toggle"});return(0,t.jsx)(l.Primitive.button,{type:"button","aria-pressed":c,"data-state":c?"on":"off","data-disabled":e.disabled?"":void 0,...d,ref:a,onClick:(0,i.composeEventHandlers)(e.onClick,()=>{e.disabled||u(!c)})})},"name",{value:"Toggle",configurable:!0}));e.s(["Root",0,L,"Toggle",0,L],864225),e.i(864225);let A=(0,E.cva)("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",sm:"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}}),q=a.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});e.s(["ToggleGroup",0,function({className:e,variant:a,size:r,spacing:l=2,orientation:s="horizontal",children:i,...n}){return(0,t.jsx)(I.Root,{"data-slot":"toggle-group","data-variant":a,"data-size":r,"data-spacing":l,"data-orientation":s,style:{"--gap":l},className:(0,S.cn)("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch",e),...n,children:(0,t.jsx)(q.Provider,{value:{variant:a,size:r,spacing:l,orientation:s},children:i})})},"ToggleGroupItem",0,function({className:e,children:r,variant:l="default",size:s="default",...i}){let n=a.useContext(q);return(0,t.jsx)(I.Item,{"data-slot":"toggle-group-item","data-variant":n.variant||l,"data-size":n.size||s,"data-spacing":n.spacing,className:(0,S.cn)("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",A({variant:n.variant||l,size:n.size||s}),e),...i,children:r})}],808562)}]);