@ghfs/cli 0.2.1 → 0.2.3
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.
- package/README.md +27 -0
- package/dist/cli.mjs +468 -45
- package/dist/{factory-UMSInaa_.mjs → factory-p7K86ig1.mjs} +145 -2
- package/dist/index.d.mts +66 -0
- package/dist/index.mjs +1 -1
- package/dist/ui/200.html +1 -1
- package/dist/ui/404.html +1 -1
- package/dist/ui/_nuxt/B0TbUr4-.js +1 -0
- package/dist/ui/_nuxt/B22m6lGO.js +1 -0
- package/dist/ui/_nuxt/B285sO4n.js +1 -0
- package/dist/ui/_nuxt/BKeWYFwB.js +1 -0
- package/dist/ui/_nuxt/C3qHPz2x.js +11 -0
- package/dist/ui/_nuxt/{C8o6ovMK.js → COKSWHV2.js} +1 -1
- package/dist/ui/_nuxt/CZG_sboh.js +1 -0
- package/dist/ui/_nuxt/CxFuatvT.js +64 -0
- package/dist/ui/_nuxt/D6OOFWTr.js +1 -0
- package/dist/ui/_nuxt/{BqmRGtwl.js → D8shZTBd.js} +1 -1
- package/dist/ui/_nuxt/{1bK2R2pL.js → DNX9zRCQ.js} +1 -1
- package/dist/ui/_nuxt/DXu5T2B5.js +15 -0
- package/dist/ui/_nuxt/{BKH9P1wN.js → EicHfoe9.js} +1 -1
- package/dist/ui/_nuxt/MnK0Tdwj.js +8 -0
- package/dist/ui/_nuxt/Project.ua0Af7kd.css +1 -0
- package/dist/ui/_nuxt/TcANp6PW.js +1 -0
- package/dist/ui/_nuxt/{DK734mxh.js → _TxKSTp6.js} +1 -1
- package/dist/ui/_nuxt/brA7auAl.js +1 -0
- package/dist/ui/_nuxt/builds/latest.json +1 -1
- package/dist/ui/_nuxt/builds/meta/d40c8be2-bdb7-4195-9ef3-a2f26238eb3f.json +1 -0
- package/dist/ui/_nuxt/cards.BNaTRoqd.css +1 -0
- package/dist/ui/_nuxt/entry.oX7K7W6S.css +1 -0
- package/dist/ui/_nuxt/error-404.CYxKGMun.css +1 -0
- package/dist/ui/_nuxt/error-500.DhFBNa35.css +1 -0
- package/dist/ui/_nuxt/f8zICjba.js +1 -0
- package/dist/ui/_nuxt/{index.C3E0NnSu.css → index.CQ-q3McJ.css} +1 -1
- package/dist/ui/cards/index.html +1 -1
- package/dist/ui/hub/index.html +1 -1
- package/dist/ui/hub/recent/index.html +1 -1
- package/dist/ui/index.html +1 -1
- package/dist/ui/recent/index.html +1 -1
- package/dist/ui/todo/index.html +1 -1
- package/package.json +6 -6
- package/dist/ui/_nuxt/BNh5okZH.js +0 -4
- package/dist/ui/_nuxt/BNzF7F9w.js +0 -1
- package/dist/ui/_nuxt/BWLewmBT.js +0 -15
- package/dist/ui/_nuxt/BbwaKnwL.js +0 -1
- package/dist/ui/_nuxt/CBU7sHLx.js +0 -1
- package/dist/ui/_nuxt/CQja-oog.js +0 -1
- package/dist/ui/_nuxt/D4R7-XZQ.js +0 -1
- package/dist/ui/_nuxt/D4yIuA0F.js +0 -64
- package/dist/ui/_nuxt/DHH7xZXJ.js +0 -11
- package/dist/ui/_nuxt/DVC3GhaL.js +0 -1
- package/dist/ui/_nuxt/DWBdeKmR.js +0 -1
- package/dist/ui/_nuxt/Da-Y9lY6.js +0 -1
- package/dist/ui/_nuxt/DeX2bcSG.js +0 -1
- package/dist/ui/_nuxt/Project.BMA756E4.css +0 -1
- package/dist/ui/_nuxt/builds/meta/f935488c-a544-4bf6-9a65-b421d02508c1.json +0 -1
- package/dist/ui/_nuxt/cards.DYf8w2uL.css +0 -1
- package/dist/ui/_nuxt/entry.COcGUqGv.css +0 -1
- package/dist/ui/_nuxt/error-404.CiGdHkfa.css +0 -1
- package/dist/ui/_nuxt/error-500.DrZuPeVU.css +0 -1
package/dist/ui/cards/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.oX7K7W6S.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/C3qHPz2x.js"><script type="module" src="/_nuxt/C3qHPz2x.js" crossorigin></script><link rel="icon" href="./favicon.svg" type="image/svg+xml"><script id="unhead:payload" type="application/json">{"title":"ghfs"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"d40c8be2-bdb7-4195-9ef3-a2f26238eb3f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1779931941299,false]</script></body></html>
|
package/dist/ui/hub/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.oX7K7W6S.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/C3qHPz2x.js"><script type="module" src="/_nuxt/C3qHPz2x.js" crossorigin></script><link rel="icon" href="./favicon.svg" type="image/svg+xml"><script id="unhead:payload" type="application/json">{"title":"ghfs"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"d40c8be2-bdb7-4195-9ef3-a2f26238eb3f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1779931941305,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.oX7K7W6S.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/C3qHPz2x.js"><script type="module" src="/_nuxt/C3qHPz2x.js" crossorigin></script><link rel="icon" href="./favicon.svg" type="image/svg+xml"><script id="unhead:payload" type="application/json">{"title":"ghfs"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"d40c8be2-bdb7-4195-9ef3-a2f26238eb3f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1779931941306,false]</script></body></html>
|
package/dist/ui/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.oX7K7W6S.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/C3qHPz2x.js"><script type="module" src="/_nuxt/C3qHPz2x.js" crossorigin></script><link rel="icon" href="./favicon.svg" type="image/svg+xml"><script id="unhead:payload" type="application/json">{"title":"ghfs"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"d40c8be2-bdb7-4195-9ef3-a2f26238eb3f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1779931941306,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.oX7K7W6S.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/C3qHPz2x.js"><script type="module" src="/_nuxt/C3qHPz2x.js" crossorigin></script><link rel="icon" href="./favicon.svg" type="image/svg+xml"><script id="unhead:payload" type="application/json">{"title":"ghfs"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"d40c8be2-bdb7-4195-9ef3-a2f26238eb3f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1779931941305,false]</script></body></html>
|
package/dist/ui/todo/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>ghfs</title><link rel="stylesheet" href="/_nuxt/entry.oX7K7W6S.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/C3qHPz2x.js"><script type="module" src="/_nuxt/C3qHPz2x.js" crossorigin></script><link rel="icon" href="./favicon.svg" type="image/svg+xml"><script id="unhead:payload" type="application/json">{"title":"ghfs"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"d40c8be2-bdb7-4195-9ef3-a2f26238eb3f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1779931941305,false]</script></body></html>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ghfs/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.3",
|
|
5
5
|
"description": "GitHub issues/PRs as filesystem, for offline view and operations in batch. Designed for human and agents.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -23,9 +23,6 @@
|
|
|
23
23
|
"./package.json": "./package.json"
|
|
24
24
|
},
|
|
25
25
|
"types": "./dist/index.d.mts",
|
|
26
|
-
"bin": {
|
|
27
|
-
"cli": "./dist/cli.mjs"
|
|
28
|
-
},
|
|
29
26
|
"files": [
|
|
30
27
|
"dist",
|
|
31
28
|
"skills/ghfs"
|
|
@@ -44,8 +41,8 @@
|
|
|
44
41
|
"ohash": "^2.0.11",
|
|
45
42
|
"open": "^11.0.0",
|
|
46
43
|
"pathe": "^2.0.3",
|
|
47
|
-
"portless": "^0.13.
|
|
48
|
-
"valibot": "^1.4.
|
|
44
|
+
"portless": "^0.13.1",
|
|
45
|
+
"valibot": "^1.4.1",
|
|
49
46
|
"yaml": "^2.9.0"
|
|
50
47
|
},
|
|
51
48
|
"devDependencies": {
|
|
@@ -70,6 +67,9 @@
|
|
|
70
67
|
"lint-staged": {
|
|
71
68
|
"*": "eslint --fix"
|
|
72
69
|
},
|
|
70
|
+
"bin": {
|
|
71
|
+
"ghfs": "./dist/cli.mjs"
|
|
72
|
+
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"build": "pnpm --filter @ghfs/ui build && tsdown",
|
|
75
75
|
"build:cli": "tsdown",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{ak as At,r as H,j as w,al as Dt,ag as Qe,e as J,Z as Tt,am as Et,ai as ze,an as Ve,l as re,aj as et,ao as He,a1 as qe,ap as tt,o as n,C as E,w as S,b as A,h as t,aq as me,z as de,ar as ot,as as nt,g as st,at as qt,B as Pe,au as ye,a5 as Pt,x as Rt,s as at,i as D,av as Mt,aw as fe,ax as oe,c as a,n as X,d as j,t as m,f as ve,p as _e,F as N,q as ne,a as o,ay as Ke,az as Ut,aA as Ge,aB as Lt,W as be,K as Re,aC as lt,aD as jt,N as Me,aE as We,aF as Ue,X as Le,aG as xe,aH as we,$ as ce,L as rt,y as Ot,O as je,A as Ft,D as it,H as Bt,M as Nt}from"./DHH7xZXJ.js";import{u as $e,c as ge,_ as he,d as zt,r as Ee,e as ct,f as dt,a as Vt,l as Ht,b as Kt,g as Gt}from"./D4yIuA0F.js";function ut(s){const r=At({dir:H("ltr")});return w(()=>s?.value||r.dir?.value||"ltr")}function Ye(){const s=H(),r=w(()=>["#text","#comment"].includes(s.value?.$el.nodeName)?s.value?.$el.nextElementSibling:Dt(s));return{primitiveElement:s,currentElement:r}}const Ze="data-reka-collection-item";function mt(s={}){const{key:r="",isProvider:v=!1}=s,i=`${r}CollectionProvider`;let p;if(v){const l=H(new Map);p={collectionRef:H(),itemMap:l},et(i,p)}else p=Qe(i);const y=(l=!1)=>{const u=p.collectionRef.value;if(!u)return[];const d=Array.from(u.querySelectorAll(`[${Ze}]`)),I=Array.from(p.itemMap.value.values()).sort((P,q)=>d.indexOf(P.ref)-d.indexOf(q.ref));return l?I:I.filter(P=>P.ref.dataset.disabled!=="")},_=J({name:"CollectionSlot",inheritAttrs:!1,setup(l,{slots:u,attrs:d}){const{primitiveElement:b,currentElement:I}=Ye();return re(I,()=>{p.collectionRef.value=I.value}),()=>ze(Ve,{ref:b,...d},u)}}),x=J({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:u,attrs:d}){const{primitiveElement:b,currentElement:I}=Ye();return Tt(P=>{if(I.value){const q=Et(I.value);p.itemMap.value.set(q,{ref:I.value,value:l.value}),P(()=>p.itemMap.value.delete(q))}}),()=>ze(Ve,{...d,[Ze]:"",ref:b},u)}}),h=w(()=>Array.from(p.itemMap.value.values())),g=w(()=>p.itemMap.value.size);return{getItems:y,reactiveItems:h,itemMapSize:g,CollectionSlot:_,CollectionItem:x}}const Wt="rovingFocusGroup.onEntryFocus",Yt={bubbles:!1,cancelable:!0},Zt={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Jt(s,r){return r!=="rtl"?s:s==="ArrowLeft"?"ArrowRight":s==="ArrowRight"?"ArrowLeft":s}function Xt(s,r,v){const i=Jt(s.key,v);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return Zt[i]}function pt(s,r=!1){const v=He();for(const i of s)if(i===v||(i.focus({preventScroll:r}),He()!==v))return}function Qt(s,r){return s.map((v,i)=>s[(r+i)%s.length])}const[eo,to]=ot("RovingFocusGroup");var oo=J({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(s,{expose:r,emit:v}){const i=s,p=v,{loop:y,orientation:_,dir:x}=qe(i),h=ut(x),g=tt(i,"currentTabStopId",p,{defaultValue:i.defaultCurrentTabStopId,passive:i.currentTabStopId===void 0}),l=H(!1),u=H(!1),d=H(0),{getItems:b,CollectionSlot:I}=mt({isProvider:!0});function P(U){const K=!u.value;if(U.currentTarget&&U.target===U.currentTarget&&K&&!l.value){const O=new CustomEvent(Wt,Yt);if(U.currentTarget.dispatchEvent(O),p("entryFocus",O),!O.defaultPrevented){const C=b().map(R=>R.ref).filter(R=>R.dataset.disabled!==""),f=C.find(R=>R.getAttribute("data-active")===""),c=C.find(R=>R.getAttribute("data-highlighted")===""),k=C.find(R=>R.id===g.value),$=[f,c,k,...C].filter(Boolean);pt($,i.preventScrollOnEntryFocus)}}u.value=!1}function q(){setTimeout(()=>{u.value=!1},1)}return r({getItems:b}),to({loop:y,dir:h,orientation:_,currentTabStopId:g,onItemFocus:U=>{g.value=U},onItemShiftTab:()=>{l.value=!0},onFocusableItemAdd:()=>{d.value++},onFocusableItemRemove:()=>{d.value--}}),(U,K)=>(n(),E(t(I),null,{default:S(()=>[A(t(me),{tabindex:l.value||d.value===0?-1:0,"data-orientation":t(_),as:U.as,"as-child":U.asChild,dir:t(h),style:{outline:"none"},onMousedown:K[0]||(K[0]=O=>u.value=!0),onMouseup:q,onFocus:P,onBlur:K[1]||(K[1]=O=>l.value=!1)},{default:S(()=>[de(U.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),no=oo,so=J({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(s){const r=s,v=eo(),i=nt(),p=w(()=>r.tabStopId||i),y=w(()=>v.currentTabStopId.value===p.value),{getItems:_,CollectionItem:x}=mt();st(()=>{r.focusable&&v.onFocusableItemAdd()}),qt(()=>{r.focusable&&v.onFocusableItemRemove()});function h(g){if(g.key==="Tab"&&g.shiftKey){v.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const l=Xt(g,v.orientation.value,v.dir.value);if(l!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||!r.allowShiftKey&&g.shiftKey)return;g.preventDefault();let u=[..._().map(d=>d.ref).filter(d=>d.dataset.disabled!=="")];if(l==="last")u.reverse();else if(l==="prev"||l==="next"){l==="prev"&&u.reverse();const d=u.indexOf(g.currentTarget);u=v.loop.value?Qt(u,d+1):u.slice(d+1)}Pe(()=>pt(u))}}return(g,l)=>(n(),E(t(x),null,{default:S(()=>[A(t(me),{tabindex:y.value?0:-1,"data-orientation":t(v).orientation.value,"data-active":g.active?"":void 0,"data-disabled":g.focusable?void 0:"",as:g.as,"as-child":g.asChild,onMousedown:l[0]||(l[0]=u=>{g.focusable?t(v).onItemFocus(p.value):u.preventDefault()}),onFocus:l[1]||(l[1]=u=>t(v).onItemFocus(p.value)),onKeydown:h},{default:S(()=>[de(g.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),ao=so;const[Oe,lo]=ot("TabsRoot");var ro=J({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(s,{emit:r}){const v=s,i=r,{orientation:p,unmountOnHide:y,dir:_}=qe(v),x=ut(_);ye();const h=tt(v,"modelValue",i,{defaultValue:v.defaultValue,passive:v.modelValue===void 0}),g=H(),l=Pt(new Set);return lo({modelValue:h,changeModelValue:u=>{h.value=u},orientation:p,dir:x,unmountOnHide:y,activationMode:v.activationMode,baseId:nt(void 0,"reka-tabs"),tabsList:g,contentIds:l,registerContent:u=>{l.value=new Set([...l.value,u])},unregisterContent:u=>{const d=new Set(l.value);d.delete(u),l.value=d}}),(u,d)=>(n(),E(t(me),{dir:t(x),"data-orientation":t(p),"as-child":u.asChild,as:u.as},{default:S(()=>[de(u.$slots,"default",{modelValue:t(h)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),io=ro;function ft(s,r){return`${s}-trigger-${r}`}function vt(s,r){return`${s}-content-${r}`}var co=J({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const r=s,{forwardRef:v}=ye(),i=Oe(),p=w(()=>ft(i.baseId,r.value)),y=w(()=>vt(i.baseId,r.value)),_=w(()=>r.value===i.modelValue.value),x=H(_.value);return st(()=>{i.registerContent(r.value),requestAnimationFrame(()=>{x.value=!1})}),Rt(()=>{i.unregisterContent(r.value)}),(h,g)=>(n(),E(t(Mt),{present:h.forceMount||_.value,"force-mount":""},{default:S(({present:l})=>[A(t(me),{id:y.value,ref:t(v),"as-child":h.asChild,as:h.as,role:"tabpanel","data-state":_.value?"active":"inactive","data-orientation":t(i).orientation.value,"aria-labelledby":p.value,hidden:!l,tabindex:"0",style:at({animationDuration:x.value?"0s":void 0})},{default:S(()=>[!t(i).unmountOnHide.value||l?de(h.$slots,"default",{key:0}):D("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),uo=co,mo=J({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const r=s,{loop:v}=qe(r),{forwardRef:i,currentElement:p}=ye(),y=Oe();return y.tabsList=p,(_,x)=>(n(),E(t(no),{"as-child":"",orientation:t(y).orientation.value,dir:t(y).dir.value,loop:t(v)},{default:S(()=>[A(t(me),{ref:t(i),role:"tablist","as-child":_.asChild,as:_.as,"aria-orientation":t(y).orientation.value},{default:S(()=>[de(_.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),po=mo,fo=J({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(s){const r=s,{forwardRef:v}=ye(),i=Oe(),p=w(()=>ft(i.baseId,r.value)),y=w(()=>i.contentIds.value.has(r.value)?vt(i.baseId,r.value):void 0),_=w(()=>r.value===i.modelValue.value);return(x,h)=>(n(),E(t(ao),{"as-child":"",focusable:!x.disabled,active:_.value},{default:S(()=>[A(t(me),{id:p.value,ref:t(v),role:"tab",type:x.as==="button"?"button":void 0,as:x.as,"as-child":x.asChild,"aria-selected":_.value?"true":"false","aria-controls":y.value,"data-state":_.value?"active":"inactive",disabled:x.disabled,"data-disabled":x.disabled?"":void 0,"data-orientation":t(i).orientation.value,onMousedown:h[0]||(h[0]=oe(g=>{!x.disabled&&g.ctrlKey===!1?t(i).changeModelValue(x.value):g.preventDefault()},["left"])),onKeydown:h[1]||(h[1]=fe(g=>t(i).changeModelValue(x.value),["enter","space"])),onFocus:h[2]||(h[2]=()=>{const g=t(i).activationMode!=="manual";!_.value&&!x.disabled&&g&&t(i).changeModelValue(x.value)})},{default:S(()=>[de(x.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),vo=fo;const _o=J({__name:"StatePill",props:{state:{},kind:{}},setup(s){const r=s,v=w(()=>{switch(r.state){case"open":case"reopened":return{color:"green",label:"Open"};case"merged":return{color:"purple",label:"Merged"};case"closed":return{color:"red",label:"Closed"};case"draft":return{color:"gray",label:"Draft"};case"not-planned":return{color:"gray",label:"Not planned"};case"pending":return{color:"yellow",label:"Pending",icon:"i-octicon-hourglass-16"}}return{color:"gray",label:r.state}});return(i,p)=>(n(),a("span",{class:X([`badge-color-${v.value.color}`,"uppercase tracking-wide text-[10px]"])},[v.value.icon?(n(),a("span",{key:0,class:X([v.value.icon,"mr-1 text-[10px]"])},null,2)):D("",!0),j(" "+m(v.value.label),1)],2))}}),bo=Object.assign(_o,{__name:"DisplayStatePill"}),_t=Symbol("ghfs-detail-scope");function go(s){et(_t,s)}function Ce(){return Qe(_t,null)}const ho={class:"flex flex-wrap items-center gap-1.5 mt-3 pt-2 border-t border-base"},ko=["title","onClick"],xo={key:0,class:"font-medium"},wo=["title"],yo={class:"flex items-center gap-0.5 p-1"},$o=["title","onClick"],Co=J({__name:"DetailReactions",props:{itemNumber:{},target:{},reactions:{}},setup(s){const r=s,v=be(),i=Ce(),p=w(()=>i?.projectId??v.value),y=ve(),_=_e(i?.projectId),x=$e(w(()=>r.itemNumber),i?.projectId),h=H(new Set),g=H(!1),l=H(!1),u=w(()=>x.entries.value.filter(k=>{const $=k.op;return $.action!=="add-reaction"&&$.action!=="remove-reaction"?!1:d($.target,r.target)}));function d(k,$){const R=k??{kind:"item"};return R.kind!==$.kind?!1:R.kind==="item"&&$.kind==="item"?!0:R.kind==="comment"&&$.kind==="comment"?R.commentId===$.commentId:R.kind==="review"&&$.kind==="review"?R.reviewId===$.reviewId:!1}function b(k){return r.reactions?r.reactions[Lt(k)]??0:0}function I(k){for(const $ of u.value){const R=$.op;if(R.reaction===k)return{entry:$,kind:R.action==="add-reaction"?"add":"remove"}}return null}function P(k){const $=b(k),R=I(k);return R?R.kind==="add"&&!h.value.has(k)?$+1:R.kind==="remove"&&h.value.has(k)?Math.max(0,$-1):$:$}const q=w(()=>Ge.filter(k=>P(k)>0||I(k)!==null)),U=w(()=>q.value.length>0);async function K(){if(!(g.value||l.value)){l.value=!0;try{const k=await y.$call("ghfs:get-viewer-reactions",p.value??"__default__",r.itemNumber,r.target);h.value=new Set(k),g.value=!0}catch{h.value=new Set,g.value=!0}finally{l.value=!1}}}async function O(k){await K();const $=I(k);if($){try{await y.$call("ghfs:remove-queue-op",p.value??"__default__",$.entry.id)}catch(L){_.setError(L.message)}return}const B={action:h.value.has(k)?"remove-reaction":"add-reaction",number:r.itemNumber,reaction:k,...r.target.kind!=="item"?{target:r.target}:{}};try{await y.$call("ghfs:add-queue-op",p.value??"__default__",B)}catch(L){_.setError(L.message)}}function C(k){const $=I(k);return $?.kind==="add"?"border-dashed border-yellow-500/60 bg-yellow-500/10 color-yellow-700 dark:color-yellow-300":$?.kind==="remove"?"border-dashed border-orange-500/60 bg-orange-500/10 color-orange-700 dark:color-orange-300 line-through":g.value&&h.value.has(k)?"border-primary-500/40 bg-primary-500/10 color-active":"border-base hover:bg-active"}function f(k){const $=I(k);return $?.kind==="add"?"bg-yellow-500/15 ring-1 ring-yellow-500/50":$?.kind==="remove"?"bg-orange-500/15 ring-1 ring-orange-500/50":g.value&&h.value.has(k)?"bg-primary-500/15 ring-1 ring-primary-500/40":"hover:bg-active"}function c(k){const $=I(k);return $?.kind==="add"?`pending add :${k}: — click to cancel`:$?.kind==="remove"?`pending remove :${k}: — click to cancel`:g.value&&h.value.has(k)?`you reacted :${k}: — click to queue removal`:`:${k}: — click to queue add`}return(k,$)=>(n(),a("div",ho,[(n(!0),a(N,null,ne(t(q),R=>(n(),a("button",{key:R,type:"button",title:c(R),class:X(["inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs leading-none transition",C(R)]),onClick:G=>O(R)},[o("span",null,m(t(Ke)[R]),1),P(R)>0?(n(),a("span",xo,m(P(R)),1)):D("",!0)],10,ko))),128)),A(t(Ut),{distance:6,triggers:["click"],onShow:K},{popper:S(({hide:R})=>[o("div",yo,[(n(!0),a(N,null,ne(t(Ge),G=>(n(),a("button",{key:G,type:"button",title:c(G),class:X(["inline-flex items-center justify-center w-8 h-8 rounded-full text-lg transition",f(G)]),onClick:B=>O(G).then(()=>R())},m(t(Ke)[G]),11,$o))),128))])]),default:S(()=>[o("button",{type:"button","aria-label":"Add reaction",title:t(U)?"Add reaction":"React",class:"inline-flex items-center justify-center rounded-full border border-base px-2 py-0.5 text-xs leading-none op-fade hover:op100 hover:bg-active transition"},[...$[0]||($[0]=[o("span",{class:"i-octicon-smiley-16"},null,-1)])],8,wo)]),_:1})]))}}),bt=Object.assign(Co,{__name:"PanelDetailReactions"}),Io={class:"relative pl-10","data-testid":"timeline-event"},So={class:"absolute left-0 top-0.5 inline-flex items-center justify-center w-8 h-8 rounded-full bg-base"},Ao={class:"w-6 h-6 rounded-full bg-#8881 dark:bg-#fff1 inline-flex items-center justify-center"},Do={class:"flex items-center gap-2 text-sm py-1 flex-wrap"},To=J({__name:"DetailTimelineEventRow",props:{icon:{},color:{default:"color-muted"},actor:{},createdAt:{}},setup(s){return(r,v)=>{const i=ge,p=he;return n(),a("div",Io,[o("span",So,[o("span",Ao,[o("span",{class:X([s.icon,s.color,"text-xs"])},null,2)])]),o("div",Do,[s.actor?(n(),E(i,{key:0,author:s.actor,size:16},null,8,["author"])):D("",!0),de(r.$slots,"default"),v[0]||(v[0]=o("span",{class:"color-faint"},"·",-1)),A(p,{time:s.createdAt},null,8,["time"])])])}}}),Eo=Object.assign(To,{__name:"PanelDetailTimelineEventRow"});function qo(s){if(!s)return"never";try{const r=Date.now()-new Date(s).getTime(),v=Math.round(r/1e3),i=Math.round(v/60),p=Math.round(i/60),y=Math.round(p/24);if(v<60)return`${v}s ago`;if(i<60)return`${i}m ago`;if(p<24)return`${p}h ago`;if(y<60)return`${y}d ago`;const _=Math.round(y/30);return _<24?`${_}mo ago`:`${Math.round(y/365)}y ago`}catch{return s}}function se(s){return s==="approved"?{border:"border-green-500/40",icon:"i-octicon-check-circle-fill-16",color:"color-green-600 dark:color-green-500",label:"approved these changes"}:s==="changes_requested"?{border:"border-red-500/40",icon:"i-octicon-file-diff-16",color:"color-red-600 dark:color-red-500",label:"requested changes"}:s==="dismissed"?{border:"border-neutral-500/40",icon:"i-octicon-x-16",color:"color-neutral-500 dark:color-neutral-400",label:"dismissed a review"}:{border:"border-blue-500/40",icon:"i-octicon-comment-16",color:"color-blue-600 dark:color-blue-500",label:"reviewed"}}const Po={committed:"i-octicon-git-commit-16",closed:"i-octicon-issue-closed-16",reopened:"i-octicon-issue-reopened-16",merged:"i-octicon-git-merge-16",labeled:"i-octicon-tag-16",unlabeled:"i-octicon-tag-16",assigned:"i-octicon-person-16",unassigned:"i-octicon-person-16",review_requested:"i-octicon-eye-16",review_request_removed:"i-octicon-eye-closed-16",review_dismissed:"i-octicon-x-16",renamed:"i-octicon-pencil-16",head_ref_force_pushed:"i-octicon-repo-push-16",head_ref_deleted:"i-octicon-trash-16",head_ref_restored:"i-octicon-history-16",locked:"i-octicon-lock-16",unlocked:"i-octicon-lock-16",ready_for_review:"i-octicon-git-pull-request-16",convert_to_draft:"i-octicon-git-pull-request-draft-16",referenced:"i-octicon-bookmark-16","cross-referenced":"i-octicon-cross-reference-16",pinned:"i-octicon-pin-16",unpinned:"i-octicon-pin-slash-16",transferred:"i-octicon-arrow-right-16",milestoned:"i-octicon-milestone-16",demilestoned:"i-octicon-milestone-16",marked_as_duplicate:"i-octicon-copy-16",unmarked_as_duplicate:"i-octicon-copy-16",connected:"i-octicon-link-16",disconnected:"i-octicon-link-slash-16",auto_merge_enabled:"i-octicon-git-merge-16",auto_merge_disabled:"i-octicon-git-merge-16",auto_squash_enabled:"i-octicon-git-merge-16",auto_squash_disabled:"i-octicon-git-merge-16",auto_rebase_enabled:"i-octicon-git-merge-16",auto_rebase_disabled:"i-octicon-git-merge-16",base_ref_changed:"i-octicon-git-branch-16",unknown:"i-octicon-dot-16"},Ro={merged:"color-purple-600 dark:color-purple-400",closed:"color-red-600 dark:color-red-500",reopened:"color-green-600 dark:color-green-500",ready_for_review:"color-green-600 dark:color-green-500",convert_to_draft:"color-neutral-500 dark:color-neutral-400"};function Y(s){return Po[s.kind]??"i-octicon-dot-16"}function Z(s){return Ro[s.kind]??"color-muted"}function Je(s){return s.replace(/[_-]+/g," ").toLowerCase()}function Mo(s,r){return!s||!r?null:`https://github.com/${s}/commit/${r}`}const Uo=new Set(["subscribed","unsubscribed","mentioned"]);function Lo(s){return Uo.has(s.kind)}const jo={class:"relative"},Oo={class:"flex flex-col gap-4"},Fo={key:0,class:"relative flex items-center gap-3 my-1 z-10","data-testid":"detail-last-seen-marker"},Bo={class:"text-xs font-medium text-orange-600 dark:text-orange-400 whitespace-nowrap"},No=["data-comment-id"],zo=["onClick"],Vo={class:"absolute left-0 top-0.5 inline-flex items-center justify-center w-8 h-8 rounded-full bg-base"},Ho={class:"font-mono font-medium"},Ko={class:"absolute left-0 top-3 inline-flex items-center justify-center w-8 h-8 rounded-full bg-base border border-base"},Go={class:"border border-base rounded-lg bg-base overflow-hidden"},Wo=["onClick"],Yo={class:"text-sm"},Zo={class:"font-medium"},Jo={class:"color-muted inline-flex items-center gap-1"},Xo={key:0,class:"i-ph-caret-down-duotone color-faint text-xs ml-auto"},Qo={class:"px-4 py-3"},en=["innerHTML"],tn={key:1,class:"text-sm color-muted italic"},on={key:2,class:"relative pl-10"},nn=["onClick"],sn={class:"absolute left-0 top-0.5 inline-flex items-center justify-center w-8 h-8 rounded-full bg-base"},an={class:"w-6 h-6 rounded-full bg-#8881 dark:bg-#fff1 inline-flex items-center justify-center"},ln={class:"color-muted"},rn={class:"absolute left-0 top-3 inline-flex items-center justify-center w-8 h-8 rounded-full bg-base border border-base"},cn=["onClick"],dn={class:"text-sm"},un={class:"font-medium"},mn={class:"color-muted inline-flex items-center gap-1"},pn={key:0,class:"i-ph-caret-down-duotone color-faint text-xs ml-auto"},fn={class:"px-4 py-3"},vn=["innerHTML"],_n={class:"color-muted"},bn={class:"font-medium"},gn=["href"],hn={class:"font-mono text-xs"},kn={key:1,class:"font-mono text-xs color-muted"},xn={class:"truncate"},wn={class:"color-muted"},yn={class:"color-muted"},$n={class:"color-muted"},Cn={key:1,class:"font-mono"},In={class:"italic color-muted line-through"},Sn={class:"italic"},An={class:"color-muted"},Dn=["href"],Tn={key:1,class:"font-mono color-muted"},En={key:2,class:"truncate max-w-md color-muted"},qn={key:3,class:"font-mono text-[11px] color-faint"},Pn={key:1,class:"color-faint italic"},Rn={class:"color-muted"},Mn={key:0,class:"font-mono italic"},Un=["href"],Ln={class:"font-mono text-xs"},jn={key:1,class:"font-mono text-xs color-muted"},On={class:"color-muted"},Fn=["href"],Bn={class:"font-mono text-xs"},Nn={key:1,class:"font-mono text-xs color-muted"},zn={class:"color-muted"},Vn=["href"],Hn={class:"font-mono text-xs"},Kn={key:1,class:"font-mono text-xs color-muted"},Gn={class:"color-muted"},Wn={key:0,class:"color-muted"},Yn={class:"italic"},Zn={class:"color-muted"},Jn={class:"color-muted"},Xn=["href"],Qn={class:"font-mono text-xs"},es={class:"font-mono text-xs color-muted"},ts={class:"font-mono text-xs"},os={class:"color-muted"},ns={key:0,class:"color-muted"},ss={key:1,class:"italic"},as={class:"color-muted"},ls={key:1,class:"color-muted italic"},rs={class:"color-muted"},is={class:"absolute left-0 top-3 inline-flex items-center justify-center w-8 h-8 rounded-full bg-base border border-dashed border-yellow-500/60"},cs={key:1,class:"i-octicon-hourglass-16 color-yellow-600 dark:color-yellow-400"},ds={class:"rounded-lg border-2 border-dashed border-yellow-500/60 bg-yellow-500/5 overflow-hidden"},us={class:"flex items-center gap-2 px-4 py-2 border-b border-dashed border-yellow-500/40"},ms={class:"text-sm"},ps={class:"font-medium"},fs={key:0,class:"color-muted"},vs={class:"px-4 py-3"},_s={class:"text-sm whitespace-pre-wrap font-sans"},bs=J({__name:"DetailTimeline",props:{item:{},comments:{},timeline:{},pendingComments:{}},emits:["editPending","removePending"],setup(s,{emit:r}){const v=s,i=r,{currentUser:p}=Re(),y=Ce(),_=_e(y?.projectId),x=lt(),h=w(()=>_.payload.value?.repo.repo??null),g=jt(),l=w(()=>_.payload.value?.bots??[]),u=Ue(new Set),d=w(()=>{const f=y?.projectId;return f?x.getSeenEntry(`${f}#${v.item.number}`)??null:null}),b=w(()=>{const f=d.value;if(!f)return null;for(const c of K.value)if(c.createdAt&&c.createdAt>f.lastSeenAt)return c.id;return null}),I=w(()=>qo(d.value?.lastSeenAt));function P(f){u.has(f)?u.delete(f):u.add(f)}function q(f){return f.kind==="comment"?We(f.author,l.value):f.event.kind==="reviewed"?We(f.event.actor,l.value):!1}function U(f){return g.value&&q(f)&&!u.has(f.id)}const K=w(()=>{const f=new Set,c=[];for(const k of v.comments)f.add(k.id),c.push({kind:"comment",id:`comment-${k.id}`,commentId:k.id,createdAt:k.createdAt,author:k.author,authorAvatarUrl:k.authorAvatarUrl,body:k.body,reactions:k.reactions});for(const k of v.timeline??[])Lo(k)||k.kind==="commented"&&k.commentId!=null&&f.has(k.commentId)||c.push({kind:"event",id:`event-${k.id}`,createdAt:k.createdAt,event:k});return c.sort((k,$)=>k.createdAt.localeCompare($.createdAt)),c});function O(f,c){return c||Mo(h.value,f)}function C(f){return f?f.slice(0,7):""}return(f,c)=>{const k=zt,$=he,R=bt,G=ge,B=Eo,L=ct,F=Me;return n(),a("div",jo,[c[35]||(c[35]=o("div",{class:"absolute left-[15px] top-0 bottom-0 w-px bg-#8882","aria-hidden":"true"},null,-1)),o("div",Oo,[(n(!0),a(N,null,ne(t(K),e=>(n(),a(N,{key:e.id},[e.id===t(b)?(n(),a("div",Fo,[c[6]||(c[6]=o("div",{class:"flex-1 h-px bg-orange-500/40"},null,-1)),o("span",Bo," Last seen "+m(t(I)),1),c[7]||(c[7]=o("div",{class:"flex-1 h-px bg-orange-500/40"},null,-1))])):D("",!0),e.kind==="comment"?(n(),a("div",{key:1,class:"relative pl-10","data-comment-id":e.id},[U(e)?(n(),a("button",{key:0,type:"button",class:"w-full flex items-center gap-2 text-sm py-1 text-left hover:bg-active rounded transition","data-testid":"collapsed-bot-comment",onClick:W=>P(e.id)},[o("span",Vo,[A(k,{login:e.author,src:e.authorAvatarUrl,size:24},null,8,["login","src"])]),o("span",Ho,"@"+m(e.author||"ghost"),1),c[8]||(c[8]=o("span",{class:"color-muted"},"commented",-1)),c[9]||(c[9]=o("span",{class:"color-faint"},"·",-1)),A($,{time:e.createdAt},null,8,["time"]),c[10]||(c[10]=o("span",{class:"i-ph-caret-right-duotone color-faint text-xs ml-auto shrink-0"},null,-1))],8,zo)):(n(),a(N,{key:1},[o("span",Ko,[A(k,{login:e.author,src:e.authorAvatarUrl,size:38},null,8,["login","src"])]),o("div",Go,[o("div",{class:X(["flex items-center gap-2 px-4 py-2 border-b border-base bg-#8881 dark:bg-#fff1",q(e)?"cursor-pointer hover:bg-#8882 dark:hover:bg-#fff2":""]),onClick:W=>q(e)&&P(e.id)},[o("span",Yo,[o("span",Zo,"@"+m(e.author||"ghost"),1),o("span",Jo,[c[11]||(c[11]=j(" commented ",-1)),A($,{time:e.createdAt},null,8,["time"])])]),q(e)?(n(),a("span",Xo)):D("",!0)],10,Wo),o("div",Qo,[e.body?(n(),a("div",{key:0,class:"markdown-body text-sm",innerHTML:("renderMarkdown"in f?f.renderMarkdown:t(Ee))(e.body)},null,8,en)):(n(),a("p",tn,"Empty comment.")),A(R,{"item-number":s.item.number,target:{kind:"comment",commentId:e.commentId},reactions:e.reactions},null,8,["item-number","target","reactions"])])])],64))],8,No)):e.event.kind==="reviewed"&&e.event.review?.body?(n(),a("div",on,[U(e)?(n(),a("button",{key:0,type:"button",class:"w-full flex items-center gap-2 text-sm py-1 text-left hover:bg-active rounded transition","data-testid":"collapsed-bot-review",onClick:W=>P(e.id)},[o("span",sn,[o("span",an,[o("span",{class:X([t(se)(e.event.review.state).icon,t(se)(e.event.review.state).color,"text-xs"])},null,2)])]),A(G,{author:e.event.actor?{login:e.event.actor,avatarUrl:e.event.actorAvatarUrl}:"ghost",size:16},null,8,["author"]),o("span",ln,m(t(se)(e.event.review.state).label),1),c[12]||(c[12]=o("span",{class:"color-faint"},"·",-1)),A($,{time:e.createdAt},null,8,["time"]),c[13]||(c[13]=o("span",{class:"i-ph-caret-right-duotone color-faint text-xs ml-auto shrink-0"},null,-1))],8,nn)):(n(),a(N,{key:1},[o("span",rn,[A(k,{login:e.event.actor,src:e.event.actorAvatarUrl,size:24},null,8,["login","src"])]),o("div",{class:X(["border-2 rounded-lg bg-base overflow-hidden",t(se)(e.event.review.state).border])},[o("div",{class:X(["flex items-center gap-2 px-4 py-2 border-b border-base bg-#8881 dark:bg-#fff1",q(e)?"cursor-pointer hover:bg-#8882 dark:hover:bg-#fff2":""]),onClick:W=>q(e)&&P(e.id)},[o("span",{class:X([t(se)(e.event.review.state).icon,t(se)(e.event.review.state).color])},null,2),o("span",dn,[o("span",un,"@"+m(e.event.actor||"ghost"),1),o("span",mn,[j(m(t(se)(e.event.review.state).label)+" ",1),A($,{time:e.createdAt},null,8,["time"])])]),q(e)?(n(),a("span",pn)):D("",!0)],10,cn),o("div",fn,[o("div",{class:"markdown-body text-sm",innerHTML:("renderMarkdown"in f?f.renderMarkdown:t(Ee))(e.event.review.body)},null,8,vn),e.event.review.nodeId?(n(),E(R,{key:0,"item-number":s.item.number,target:{kind:"review",reviewId:e.event.review.nodeId},reactions:e.event.review.reactions},null,8,["item-number","target","reactions"])):D("",!0)])],2)],64))])):e.event.kind==="reviewed"?(n(),E(B,{key:3,icon:t(se)(e.event.review?.state??"commented").icon,color:t(se)(e.event.review?.state??"commented").color,actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",_n,m(t(se)(e.event.review?.state??"commented").label),1)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="committed"?(n(),E(B,{key:4,icon:"i-octicon-git-commit-16",actor:null,"created-at":e.createdAt},{default:S(()=>[o("span",bn,m(e.event.actor||"unknown"),1),c[14]||(c[14]=o("span",{class:"color-muted"},"committed",-1)),O(e.event.sha,e.event.commitUrl)?(n(),a("a",{key:0,href:O(e.event.sha,e.event.commitUrl),target:"_blank",rel:"noreferrer",class:"color-active hover:underline",onClick:c[0]||(c[0]=oe(()=>{},["stop"]))},[o("code",hn,m(C(e.event.sha)),1)],8,gn)):(n(),a("code",kn,m(C(e.event.sha)),1)),o("span",xn,m(e.event.commitMessage),1)]),_:2},1032,["created-at"])):e.event.kind==="labeled"||e.event.kind==="unlabeled"?(n(),E(B,{key:5,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",wn,m(e.event.kind==="labeled"?"added":"removed"),1),A(L,{name:e.event.label.name,"fallback-color":e.event.label.color},null,8,["name","fallback-color"]),c[15]||(c[15]=o("span",{class:"color-muted"},"label",-1))]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="assigned"||e.event.kind==="unassigned"?(n(),E(B,{key:6,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",yn,m(e.event.kind==="assigned"?"assigned":"unassigned"),1),A(G,{author:e.event.assignee,size:16},null,8,["author"])]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="review_requested"||e.event.kind==="review_request_removed"?(n(),E(B,{key:7,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",$n,m(e.event.kind==="review_requested"?"requested review from":"removed review request for"),1),e.event.isTeam?(n(),a("span",Cn,"@"+m(e.event.requestedReviewer),1)):(n(),E(G,{key:0,author:e.event.requestedReviewer,size:16},null,8,["author"]))]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="renamed"?(n(),E(B,{key:8,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[c[16]||(c[16]=o("span",{class:"color-muted"},"renamed",-1)),o("span",In,m(e.event.rename.from),1),c[17]||(c[17]=o("span",{class:"color-muted"},"→",-1)),o("span",Sn,m(e.event.rename.to),1)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="referenced"||e.event.kind==="cross-referenced"||e.event.kind==="connected"||e.event.kind==="disconnected"||e.event.kind==="marked_as_duplicate"||e.event.kind==="unmarked_as_duplicate"?(n(),E(B,{key:9,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",An,m(e.event.kind==="cross-referenced"?"mentioned this from":e.event.kind==="referenced"?"referenced this in":e.event.kind==="connected"?"linked":e.event.kind==="disconnected"?"unlinked":e.event.kind==="marked_as_duplicate"?"marked this as a duplicate of":"unmarked this as a duplicate of"),1),e.event.source?(n(),a(N,{key:0},[e.event.source.url?(n(),a("a",{key:0,href:e.event.source.url,target:"_blank",rel:"noreferrer",class:"font-mono color-active hover:underline",onClick:c[1]||(c[1]=oe(()=>{},["stop"]))},"#"+m(e.event.source.number),9,Dn)):(n(),a("span",Tn,"#"+m(e.event.source.number),1)),e.event.source.title?(n(),a("span",En,m(e.event.source.title),1)):D("",!0),e.event.source.repo?(n(),a("span",qn,m(e.event.source.repo),1)):D("",!0)],64)):(n(),a("span",Pn,"another item"))]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="milestoned"||e.event.kind==="demilestoned"?(n(),E(B,{key:10,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",Rn,m(e.event.kind==="milestoned"?"added this to the milestone":"removed this from the milestone"),1),e.event.milestone?(n(),a("span",Mn,m(e.event.milestone),1)):D("",!0)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="merged"?(n(),E(B,{key:11,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[c[19]||(c[19]=o("span",{class:"color-muted"},"merged this pull request",-1)),e.event.sha?(n(),a(N,{key:0},[c[18]||(c[18]=o("span",{class:"color-muted"},"via commit",-1)),O(e.event.sha,e.event.commitUrl)?(n(),a("a",{key:0,href:O(e.event.sha,e.event.commitUrl),target:"_blank",rel:"noreferrer",class:"color-active hover:underline",onClick:c[2]||(c[2]=oe(()=>{},["stop"]))},[o("code",Ln,m(C(e.event.sha)),1)],8,Un)):(n(),a("code",jn,m(C(e.event.sha)),1))],64)):D("",!0)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="closed"?(n(),E(B,{key:12,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",On,"closed this"+m(e.event.stateReason==="not_planned"?" as not planned":""),1),e.event.sha?(n(),a(N,{key:0},[c[20]||(c[20]=o("span",{class:"color-muted"},"via",-1)),O(e.event.sha,e.event.commitUrl)?(n(),a("a",{key:0,href:O(e.event.sha,e.event.commitUrl),target:"_blank",rel:"noreferrer",class:"color-active hover:underline",onClick:c[3]||(c[3]=oe(()=>{},["stop"]))},[o("code",Bn,m(C(e.event.sha)),1)],8,Fn)):(n(),a("code",Nn,m(C(e.event.sha)),1))],64)):D("",!0)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="reopened"?(n(),E(B,{key:13,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[...c[21]||(c[21]=[o("span",{class:"color-muted"},"reopened this",-1)])]),_:1},8,["icon","color","actor","created-at"])):e.event.kind==="ready_for_review"||e.event.kind==="convert_to_draft"?(n(),E(B,{key:14,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",zn,m(e.event.kind==="ready_for_review"?"marked this as ready for review":"converted this to draft"),1)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="head_ref_force_pushed"?(n(),E(B,{key:15,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[c[23]||(c[23]=o("span",{class:"color-muted"},"force-pushed the branch",-1)),e.event.sha?(n(),a(N,{key:0},[c[22]||(c[22]=o("span",{class:"color-muted"},"to",-1)),O(e.event.sha,e.event.commitUrl)?(n(),a("a",{key:0,href:O(e.event.sha,e.event.commitUrl),target:"_blank",rel:"noreferrer",class:"color-active hover:underline",onClick:c[4]||(c[4]=oe(()=>{},["stop"]))},[o("code",Hn,m(C(e.event.sha)),1)],8,Vn)):(n(),a("code",Kn,m(C(e.event.sha)),1))],64)):D("",!0)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="head_ref_deleted"||e.event.kind==="head_ref_restored"?(n(),E(B,{key:16,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",Gn,m(e.event.kind==="head_ref_deleted"?"deleted the branch":"restored the branch"),1)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="locked"?(n(),E(B,{key:17,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[c[25]||(c[25]=o("span",{class:"color-muted"},"locked this conversation",-1)),e.event.lockReason?(n(),a("span",Wn,[c[24]||(c[24]=j("as ",-1)),o("span",Yn,m(e.event.lockReason),1)])):D("",!0)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="unlocked"?(n(),E(B,{key:18,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[...c[26]||(c[26]=[o("span",{class:"color-muted"},"unlocked this conversation",-1)])]),_:1},8,["icon","color","actor","created-at"])):e.event.kind==="pinned"||e.event.kind==="unpinned"?(n(),E(B,{key:19,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",Zn,m(e.event.kind==="pinned"?"pinned this":"unpinned this"),1)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="transferred"?(n(),E(B,{key:20,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",Jn,"transferred this "+m(s.item.kind==="pull"?"pull request":"issue"),1),e.event.fromRepo?(n(),a(N,{key:0},[c[27]||(c[27]=o("span",{class:"color-muted"},"from",-1)),o("a",{href:`https://github.com/${e.event.fromRepo}`,target:"_blank",rel:"noreferrer",class:"color-active hover:underline",onClick:c[5]||(c[5]=oe(()=>{},["stop"]))},[o("code",Qn,m(e.event.fromRepo),1)],8,Xn)],64)):D("",!0)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="base_ref_changed"?(n(),E(B,{key:21,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[c[30]||(c[30]=o("span",{class:"color-muted"},"changed the base branch",-1)),e.event.oldRef&&e.event.newRef?(n(),a(N,{key:0},[c[28]||(c[28]=o("span",{class:"color-muted"},"from",-1)),o("code",es,m(e.event.oldRef),1),c[29]||(c[29]=o("span",{class:"color-muted"},"to",-1)),o("code",ts,m(e.event.newRef),1)],64)):D("",!0)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="auto_merge_enabled"||e.event.kind==="auto_merge_disabled"||e.event.kind==="auto_squash_enabled"||e.event.kind==="auto_squash_disabled"||e.event.kind==="auto_rebase_enabled"||e.event.kind==="auto_rebase_disabled"?(n(),E(B,{key:22,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",os,m(t(Je)(e.event.kind)),1),e.event.commitTitle?(n(),a("span",ns,"with commit")):D("",!0),e.event.commitTitle?(n(),a("span",ss,m(e.event.commitTitle),1)):D("",!0)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="review_dismissed"?(n(),E(B,{key:23,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[c[31]||(c[31]=o("span",{class:"color-muted"},"dismissed",-1)),e.event.reviewedBy?(n(),E(G,{key:0,author:e.event.reviewedBy,size:16},null,8,["author"])):D("",!0),o("span",as,m(e.event.reviewedBy?"'s review":"a review"),1),e.event.dismissedReview.dismissalMessage?(n(),a("span",ls,"— "+m(e.event.dismissedReview.dismissalMessage),1)):D("",!0)]),_:2},1032,["icon","color","actor","created-at"])):e.event.kind==="commented"?(n(),E(B,{key:24,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[...c[32]||(c[32]=[o("span",{class:"color-muted"},"commented",-1)])]),_:1},8,["icon","color","actor","created-at"])):(n(),E(B,{key:25,icon:t(Y)(e.event),color:t(Z)(e.event),actor:e.event.actor,"created-at":e.createdAt},{default:S(()=>[o("span",rs,m(t(Je)(e.event.kind==="unknown"?e.event.rawKind??"unknown":e.event.kind)),1)]),_:2},1032,["icon","color","actor","created-at"]))],64))),128)),(n(!0),a(N,null,ne(s.pendingComments??[],e=>(n(),a("div",{key:`pending-${e.id}`,class:"relative pl-10"},[o("span",is,[t(p)?.login?(n(),E(k,{key:0,login:t(p).login,src:t(p).avatarUrl,size:30},null,8,["login","src"])):(n(),a("span",cs))]),o("div",ds,[o("div",us,[o("span",ms,[o("span",ps,"@"+m(t(p)?.login??"you"),1),c[33]||(c[33]=o("span",{class:"color-muted"}," · pending comment",-1)),e.op.action==="close-with-comment"?(n(),a("span",fs," · will also close")):D("",!0)]),c[34]||(c[34]=o("div",{class:"flex-1"},null,-1)),A(F,{icon:"i-ph-pencil-simple-duotone",size:"sm",tooltip:"Edit","aria-label":"Edit pending comment",onClick:W=>i("editPending",e)},null,8,["onClick"]),A(F,{icon:"i-ph-trash-duotone",size:"sm",tooltip:"Remove","aria-label":"Remove pending comment",onClick:W=>i("removePending",e)},null,8,["onClick"])]),o("div",vs,[o("p",_s,m(e.op.body||"(empty)"),1)])])]))),128))])])}}}),gs=Object.assign(bs,{__name:"PanelDetailTimeline"}),hs={class:"flex flex-col"},ks={class:"px-6 py-5"},xs={class:"rounded-lg border border-base bg-base overflow-hidden"},ws={class:"flex items-center gap-2 px-4 py-2 border-b border-base bg-#8881 dark:bg-#fff1"},ys={class:"text-sm color-muted flex items-center gap-1.5"},$s={class:"px-4 py-4"},Cs=["innerHTML"],Is={key:1,class:"text-sm color-muted italic"},Ss={key:0,class:"px-6 pb-6"},As=J({__name:"DetailConversationTab",props:{item:{},comments:{},timeline:{},pendingComments:{}},emits:["editPending","removePending"],setup(s,{emit:r}){const v=s,i=r,p=w(()=>Ee(v.item.body)),y=w(()=>v.comments.length>0||(v.timeline?.length??0)>0||(v.pendingComments?.length??0)>0);return(_,x)=>{const h=ge,g=he,l=bt,u=gs;return n(),a("div",hs,[o("section",ks,[o("div",xs,[o("div",ws,[A(h,{author:s.item.author?{login:s.item.author,avatarUrl:s.item.authorAvatarUrl}:"ghost",size:20},null,8,["author"]),o("span",ys,[o("span",null,"opened this "+m(s.item.kind==="pull"?"pull request":"issue"),1),A(g,{time:s.item.createdAt,colorize:"text"},null,8,["time"])])]),o("div",$s,[s.item.body?(n(),a("div",{key:0,class:"markdown-body text-sm",innerHTML:t(p)},null,8,Cs)):(n(),a("p",Is,"No description provided.")),A(l,{"item-number":s.item.number,target:{kind:"item"},reactions:s.item.reactions},null,8,["item-number","reactions"])])])]),t(y)?(n(),a("section",Ss,[A(u,{item:s.item,comments:s.comments,timeline:s.timeline,"pending-comments":s.pendingComments,onEditPending:x[0]||(x[0]=d=>i("editPending",d)),onRemovePending:x[1]||(x[1]=d=>i("removePending",d))},null,8,["item","comments","timeline","pending-comments"])])):D("",!0)])}}}),Ds=Object.assign(As,{__name:"PanelDetailConversationTab"}),Ts={class:"px-6 py-5"},Es={key:1,class:"border border-base rounded-lg bg-base overflow-hidden divide-y divide-#8882"},qs={class:"flex items-start gap-3"},Ps={class:"flex-1 min-w-0"},Rs={class:"flex items-start gap-2 flex-wrap"},Ms=["aria-label","onClick"],Us={class:"text-sm font-medium flex-1 min-w-0 leading-snug"},Ls={key:0,class:"mt-2 text-xs color-muted whitespace-pre-wrap font-sans"},js={class:"mt-1 flex items-center gap-2 text-xs color-muted flex-wrap"},Os={key:0,class:"font-mono"},Fs={key:1},Bs={class:"flex items-center gap-1 shrink-0"},Ns=["href"],zs={key:1,class:"font-mono text-xs color-muted px-2 py-1 rounded bg-#8881"},Vs=J({__name:"DetailPrCommitsTab",props:{commits:{}},setup(s){const r=s,v=Ue(new Set);function i(x){v.has(x)?v.delete(x):v.add(x)}function p(x){return x.split(`
|
|
2
|
-
`,1)[0]??""}function y(x){const h=x.indexOf(`
|
|
3
|
-
`);return h===-1?"":x.slice(h+1).trim()}async function _(x){try{await navigator.clipboard.writeText(x)}catch{}}return(x,h)=>{const g=Le,l=ge,u=he,d=Me;return n(),a("div",Ts,[!r.commits||r.commits.length===0?(n(),E(g,{key:0,icon:"i-ph-git-commit-duotone",message:"No commits synced for this pull request."})):(n(),a("ol",Es,[(n(!0),a(N,null,ne(r.commits,b=>(n(),a("li",{key:b.sha,class:"px-4 py-3"},[o("div",qs,[b.authorLogin?(n(),E(l,{key:0,author:b.authorLogin,size:24,"show-name":!1,class:"mt-0.5"},null,8,["author"])):D("",!0),o("div",Ps,[o("div",Rs,[y(b.message)?(n(),a("button",{key:0,type:"button",class:"w-5 h-5 mt-0.5 rounded op-fade hover:op100 hover:bg-active flex items-center justify-center transition","aria-label":t(v).has(b.sha)?"Collapse commit body":"Expand commit body",onClick:I=>i(b.sha)},[o("span",{class:X([t(v).has(b.sha)?"i-ph-caret-down-duotone":"i-ph-caret-right-duotone","text-xs"])},null,2)],8,Ms)):D("",!0),o("p",Us,m(p(b.message)),1)]),t(v).has(b.sha)&&y(b.message)?(n(),a("pre",Ls,m(y(b.message)),1)):D("",!0),o("div",js,[b.authorLogin?(n(),a("span",Os,"@"+m(b.authorLogin),1)):b.authorName?(n(),a("span",Fs,m(b.authorName),1)):D("",!0),h[0]||(h[0]=o("span",{class:"color-faint"},"·",-1)),A(u,{time:b.authorDate},null,8,["time"])])]),o("div",Bs,[A(d,{icon:"i-ph-copy-duotone",size:"sm",tooltip:"Copy SHA","aria-label":`Copy SHA ${b.sha}`,onClick:I=>_(b.sha)},null,8,["aria-label","onClick"]),b.url?(n(),a("a",{key:0,href:b.url,target:"_blank",rel:"noreferrer",class:"font-mono text-xs color-muted hover:color-active px-2 py-1 rounded bg-#8881"},m(b.sha.slice(0,7)),9,Ns)):(n(),a("code",zs,m(b.sha.slice(0,7)),1))])])]))),128))]))])}}}),Hs=Object.assign(Vs,{__name:"PanelDetailPrCommitsTab"}),Ks={class:"border border-base rounded-lg bg-base overflow-hidden"},Gs={class:"font-mono text-xs truncate flex-1"},Ws={class:"text-xs color-green-600 dark:color-green-500 font-mono"},Ys={class:"text-xs color-red-600 dark:color-red-500 font-mono"},Zs={key:0,class:"overflow-x-auto"},Js={class:"w-full font-mono text-xs border-collapse"},Xs={class:"bg-primary-500/8 dark:bg-primary-400/8"},Qs={colspan:"3",class:"px-3 py-1 color-muted text-[11px]"},ea={class:"w-10 text-right px-2 py-0.5 color-faint select-none tabular-nums border-r border-base"},ta={class:"w-10 text-right px-2 py-0.5 color-faint select-none tabular-nums border-r border-base"},oa={class:"px-3 py-0.5 whitespace-pre"},na=J({__name:"DetailDiffFile",props:{file:{},defaultOpen:{type:Boolean,default:!0}},setup(s){const r=s,v=H(r.defaultOpen),i=w(()=>{const{from:y,to:_}=r.file;return r.file.deleted&&y?y:r.file.new&&_?_:y&&_&&y!==_?`${y} → ${_}`:_??y??"(unknown)"}),p=w(()=>r.file.deleted?"deleted":r.file.new?"added":r.file.from&&r.file.to&&r.file.from!==r.file.to?"renamed":"");return(y,_)=>{const x=dt;return n(),a("div",Ks,[o("button",{type:"button",class:"w-full flex items-center gap-2 px-3 py-2 bg-#8881 dark:bg-#fff1 text-left hover:bg-#8882 transition",onClick:_[0]||(_[0]=h=>v.value=!t(v))},[o("span",{class:X([t(v)?"i-ph-caret-down-duotone":"i-ph-caret-right-duotone","text-xs color-muted shrink-0"])},null,2),_[1]||(_[1]=o("span",{class:"i-octicon-file-diff-16 color-muted shrink-0"},null,-1)),o("span",Gs,m(t(i)),1),t(p)?(n(),E(x,{key:0,color:"neutral",size:"xs",class:"uppercase tracking-wide"},{default:S(()=>[j(m(t(p)),1)]),_:1})):D("",!0),o("span",Ws,"+"+m(s.file.additions),1),o("span",Ys,"-"+m(s.file.deletions),1)]),t(v)?(n(),a("div",Zs,[o("table",Js,[o("tbody",null,[(n(!0),a(N,null,ne(s.file.chunks,(h,g)=>(n(),a(N,{key:g},[o("tr",Xs,[o("td",Qs,m(h.content),1)]),(n(!0),a(N,null,ne(h.changes,(l,u)=>(n(),a("tr",{key:`${g}-${u}`,class:X({"bg-green-500/10":l.type==="add","bg-red-500/10":l.type==="del"})},[o("td",ea,[l.type==="normal"?(n(),a(N,{key:0},[j(m(l.ln1),1)],64)):l.type==="del"?(n(),a(N,{key:1},[j(m(l.ln),1)],64)):D("",!0)]),o("td",ta,[l.type==="normal"?(n(),a(N,{key:0},[j(m(l.ln2),1)],64)):l.type==="add"?(n(),a(N,{key:1},[j(m(l.ln),1)],64)):D("",!0)]),o("td",oa,m(l.content),1)],2))),128))],64))),128))])])])):D("",!0)])}}}),sa=Object.assign(na,{__name:"PanelDetailDiffFile"}),ie=Ue(new Map);function aa(s){const r=be(),v=ve(),i=w(()=>{const y=s.value;return y==null?{state:"idle"}:ie.get(y)??{state:"idle"}});async function p(y=!1){const _=s.value;if(_==null)return;const x=ie.get(_);if(!(!y&&x&&x.state!=="idle"&&x.state!=="error")){ie.set(_,{state:"loading"});try{const h=await v.$call("ghfs:get-pull-patch",r.value??"__default__",_);h==null?ie.set(_,{state:"missing"}):ie.set(_,{state:"loaded",text:h})}catch(h){ie.set(_,{state:"error",error:h.message})}}}return re(s,y=>{if(y==null)return;const _=ie.get(y);(!_||_.state==="idle")&&p()},{immediate:!0}),{entry:i,load:p}}function la(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Te,Xe;function ra(){if(Xe)return Te;Xe=1,Te=l=>{if(!l)return[];if(typeof l!="string"||l.match(/^\s+$/))return[];const u=l.split(`
|
|
4
|
-
`);if(u.length===0)return[];const d=[];let b=null,I=null,P=0,q=0,U=null;const K=M=>{I?.changes.push({type:"normal",normal:!0,ln1:P++,ln2:q++,content:M}),U.oldLines--,U.newLines--},O=M=>{const[V,Q]=v(M)??[];b={chunks:[],deletions:0,additions:0,from:V,to:Q},d.push(b)},C=()=>{(!b||b.chunks.length)&&O()},f=(M,V)=>{C(),b.new=!0,b.newMode=V[1],b.from="/dev/null"},c=(M,V)=>{C(),b.deleted=!0,b.oldMode=V[1],b.to="/dev/null"},k=(M,V)=>{C(),b.oldMode=V[1]},$=(M,V)=>{C(),b.newMode=V[1]},R=(M,V)=>{C(),b.index=M.split(" ").slice(1),V[1]&&(b.oldMode=b.newMode=V[1].trim())},G=M=>{C(),b.from=p(M)},B=M=>{C(),b.to=p(M)},L=M=>+(M||1),F=(M,V)=>{b||O(M);const[Q,ee,ae,ue]=V.slice(1);P=+Q,q=+ae,I={content:M,changes:[],oldStart:+Q,oldLines:L(ee),newStart:+ae,newLines:L(ue)},U={oldLines:L(ee),newLines:L(ue)},b.chunks.push(I)},e=M=>{I&&(I.changes.push({type:"del",del:!0,ln:P++,content:M}),b.deletions++,U.oldLines--)},W=M=>{I&&(I.changes.push({type:"add",add:!0,ln:q++,content:M}),b.additions++,U.newLines--)},te=M=>{if(!I)return;const[V]=I.changes.slice(-1);I.changes.push({type:V.type,[V.type]:!0,ln1:V.ln1,ln2:V.ln2,ln:V.ln,content:M})},ke=[[/^diff\s/,O],[/^new file mode (\d+)$/,f],[/^deleted file mode (\d+)$/,c],[/^old mode (\d+)$/,k],[/^new mode (\d+)$/,$],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,R],[/^---\s/,G],[/^\+\+\+\s/,B],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,F],[/^\$/,te]],Ie=[[/^\$/,te],[/^-/,e],[/^\+/,W],[/^\s*/,K]],Se=M=>{for(const[V,Q]of Ie){const ee=M.match(V);if(ee){Q(M,ee);break}}U.oldLines===0&&U.newLines===0&&(U=null)},z=M=>{for(const[V,Q]of ke){const ee=M.match(V);if(ee){Q(M,ee);break}}},T=M=>{U?Se(M):z(M)};for(const M of u)T(M);return d};const s=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,r=/^(a|b|i|w|c|o|1|2)\//,v=l=>l?.match(s)?.map(u=>u.replace(r,"").replace(/("|')$/,"")),i=/^\\?['"]|\\?['"]$/g,p=l=>{let u=y(l,"-+").trim();return u=x(u),u.replace(i,"").replace(r,"")},y=(l,u)=>{l=g(l);const d=h(u);return l.replace(new RegExp(`^${d}+`),"")},_=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,x=l=>{const u=_.exec(l);return u&&(l=l.substring(0,u.index).trim()),l},h=l=>l instanceof RegExp?l.source:`[${g(l).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,g=l=>`${l??""}`;return Te}var ia=ra();const ca=la(ia);function da(s){return w(()=>{const r=s.value;if(!r)return[];try{return ca(r)}catch{return[]}})}const ua={class:"px-6 py-5 flex flex-col gap-4"},ma={key:3,class:"rounded-lg border border-red-500/40 bg-red-500/5 px-4 py-3 text-sm"},pa={class:"color-muted"},fa={class:"flex items-center gap-3 text-xs color-muted px-1"},va={class:"color-active"},_a={class:"color-green-600 dark:color-green-500 font-mono"},ba={class:"color-red-600 dark:color-red-500 font-mono"},ga=J({__name:"DetailPrChangesTab",props:{number:{},hasPatch:{type:Boolean}},setup(s){const r=s,v=w(()=>r.hasPatch?r.number:null),{entry:i,load:p}=aa(v),y=w(()=>i.value.state==="loaded"?i.value.text??"":""),_=da(y),x=w(()=>_.value.reduce((g,l)=>g+(l.additions??0),0)),h=w(()=>_.value.reduce((g,l)=>g+(l.deletions??0),0));return(g,l)=>{const u=Le,d=sa;return n(),a("div",ua,[s.hasPatch?t(i).state==="loading"?(n(),E(u,{key:1,size:"sm",message:"Loading patch…"},{default:S(()=>[...l[2]||(l[2]=[o("span",{class:"i-octicon-sync-16 animate-spin color-active text-xl"},null,-1)])]),_:1})):t(i).state==="missing"?(n(),E(u,{key:2,icon:"i-ph-file-x-duotone",title:"Patch file is missing",message:"Run `ghfs sync` to re-download."})):t(i).state==="error"?(n(),a("div",ma,[l[4]||(l[4]=o("p",{class:"font-medium color-red-600 dark:color-red-400 mb-1"},"Failed to load patch",-1)),o("p",pa,m(t(i).error),1),o("button",{type:"button",class:"btn-action-sm mt-2",onClick:l[0]||(l[0]=b=>t(p)(!0))},[...l[3]||(l[3]=[o("span",{class:"i-octicon-sync-16"},null,-1),j(" Retry ",-1)])])])):t(i).state==="loaded"?(n(),a(N,{key:4},[t(_).length===0?(n(),E(u,{key:0,icon:"i-ph-empty-duotone",message:"No file changes found in the patch."})):(n(),a(N,{key:1},[o("div",fa,[o("span",null,[o("strong",va,m(t(_).length),1),j(" file"+m(t(_).length===1?"":"s")+" changed",1)]),l[5]||(l[5]=o("span",{class:"color-faint"},"·",-1)),o("span",_a,"+"+m(t(x)),1),o("span",ba,"-"+m(t(h)),1)]),(n(!0),a(N,null,ne(t(_),(b,I)=>(n(),E(d,{key:`${b.from??""}-${b.to??""}-${I}`,file:b},null,8,["file"]))),128))],64))],64)):D("",!0):(n(),E(u,{key:0,icon:"i-ph-file-diff-duotone",title:"Patch not synced for this pull request"},{hint:S(()=>[...l[1]||(l[1]=[o("p",{class:"text-xs color-muted max-w-md"},[j(" Set "),o("code",{class:"font-mono text-[11px] bg-#8881 px-1 py-0.5 rounded"},"sync.patches"),j(" to "),o("code",{class:"font-mono text-[11px] bg-#8881 px-1 py-0.5 rounded"},"'all'"),j(" in your ghfs config to include closed PR patches. ")],-1)])]),_:1}))])}}}),ha=Object.assign(ga,{__name:"PanelDetailPrChangesTab"}),ka={class:"relative"},xa=["placeholder","onKeydown"],wa={class:"flex items-center gap-2 px-2 py-1.5 border-t border-base"},ya={key:0,class:"text-xs color-muted"},$a=["disabled"],Ca={key:0},Ia={key:1},Sa={key:2},Aa=["disabled"],Da=["disabled"],Ta={key:0},Ea={key:1},qa=J({__name:"DetailComposer",props:{number:{},kind:{}},emits:["submitted","cancelledEditing"],setup(s,{expose:r,emit:v}){const i=s,p=v,y=be(),_=Ce(),x=w(()=>_?.projectId??y.value),h=_e(_?.projectId),g=je(),l=ve(),u=$e(w(()=>i.number),_?.projectId),d=w(()=>i.kind==="pull"?"pull request":"issue"),b=w(()=>h.payload.value?.syncState.items[String(i.number)]?.data.item??null),I=w(()=>b.value?u.direction.value==="close"?"closed":u.direction.value==="reopen"?"open":b.value.state:"open"),P=H(!1),q=H(null),U=H(""),K=H(null),O=w({get(){return q.value?U.value:g.getDraft(i.number)},set(L){if(q.value){U.value=L;return}g.setDraft(i.number,L)}}),C=w(()=>q.value?!1:O.value.trim().length>0);re(()=>i.number,()=>{q.value=null,U.value=""});async function f(){if(P.value)return;const L=(q.value?U.value:g.getDraft(i.number)).trim();if(L){P.value=!0,h.setError(null);try{let F=null;if(q.value){const e=u.pendingComments.value.find(W=>W.id===q.value);if(e){const W=e.op;await l.$call("ghfs:update-queue-op",x.value??"__default__",e.id,{...W,body:L}),F=e.id}q.value=null,U.value=""}else{const e=await l.$call("ghfs:add-queue-op",x.value??"__default__",{action:"add-comment",number:i.number,body:L});F=$(e.entries,i.number,["add-comment"]),g.clearDraft(i.number)}p("submitted",F)}catch(F){h.setError(F.message)}finally{P.value=!1}}}async function c(){if(!(P.value||!b.value)){P.value=!0,h.setError(null);try{const L=g.getDraft(i.number).trim();let F=null;if(L){const e=await l.$call("ghfs:add-queue-op",x.value??"__default__",{action:"close-with-comment",number:i.number,body:L});F=$(e.entries,i.number,["close-with-comment"]),g.clearDraft(i.number)}else{const e=await l.$call("ghfs:add-queue-op",x.value??"__default__",{action:"close",number:i.number});F=$(e.entries,i.number,["close"])}p("submitted",F)}catch(L){h.setError(L.message)}finally{P.value=!1}}}async function k(){if(!(P.value||!b.value)){P.value=!0,h.setError(null);try{const L=await l.$call("ghfs:add-queue-op",x.value??"__default__",{action:"reopen",number:i.number}),F=$(L.entries,i.number,["reopen"]);p("submitted",F)}catch(L){h.setError(L.message)}finally{P.value=!1}}}function $(L,F,e){for(let W=L.length-1;W>=0;W-=1){const te=L[W];if(te&&te.op.number===F&&e.includes(te.op.action))return te.id}return null}function R(L){const F=L.op;U.value=F.body??"",q.value=L.id,Pe(()=>K.value?.focus())}function G(){q.value=null,U.value="",p("cancelledEditing")}function B(){K.value?.focus()}return r({startEditing:R,focus:B}),(L,F)=>{const e=rt,W=Ot;return n(),a("div",{class:X(["border border-base rounded-lg bg-base transition",t(q)?"ring-2 ring-yellow-500/60 border-yellow-500/60":"focus-within:border-active focus-within:ring-2 focus-within:ring-primary-500/30"])},[o("div",ka,[xe(o("textarea",{ref_key:"textarea",ref:K,"onUpdate:modelValue":F[0]||(F[0]=te=>ce(O)?O.value=te:null),"data-shortcut":"comment-draft",placeholder:t(q)?"Editing pending comment…":`Leave a comment on this ${t(d)}`,rows:"3",class:"peer w-full bg-transparent outline-none px-3 py-2 text-sm resize-none font-sans",onKeydown:[fe(oe(f,["meta","exact","prevent","stop"]),["enter"]),fe(oe(f,["ctrl","exact","prevent","stop"]),["enter"]),fe(oe(c,["meta","shift","prevent","stop"]),["enter"]),fe(oe(c,["ctrl","shift","prevent","stop"]),["enter"])]},null,40,xa),[[we,t(O)]]),A(e,{command:"comment.focus",tone:"muted",class:"absolute bottom-2 right-2 pointer-events-none peer-focus:op0 transition-opacity"})]),o("div",wa,[t(q)?(n(),a("span",ya,"Editing a queued comment")):D("",!0),F[4]||(F[4]=o("div",{class:"flex-1"},null,-1)),t(q)?(n(),a("button",{key:1,type:"button",class:"btn-action text-sm",onClick:G}," Cancel ")):D("",!0),t(I)==="open"?(n(),a("button",{key:2,type:"button",class:"btn-action text-sm",disabled:t(P),onClick:c},[F[1]||(F[1]=o("span",{class:"i-octicon-x-circle-16 color-red-500 dark:color-red-400"},null,-1)),t(u).direction.value==="reopen"?(n(),a("span",Ca,"Cancel reopen")):t(C)?(n(),a("span",Ia,"Close with comment")):(n(),a("span",Sa,"Close "+m(t(d)),1)),A(W,{keys:"⌘ ⇧ ↵",tone:"muted"})],8,$a)):(n(),a("button",{key:3,type:"button",class:"btn-action text-sm",disabled:t(P),onClick:k},[F[2]||(F[2]=o("span",{class:"i-octicon-issue-opened-16 color-green-500 dark:color-green-400"},null,-1)),j(" "+m(t(u).direction.value==="close"?"Cancel close":`Reopen ${t(d)}`),1)],8,Aa)),o("button",{type:"button",class:"btn-primary text-sm",disabled:!t(O).trim()||t(P),onClick:f},[F[3]||(F[3]=o("span",{class:"i-octicon-comment-16"},null,-1)),t(q)?(n(),a("span",Ta,"Update comment")):(n(),a("span",Ea,"Comment")),A(W,{keys:"⌘ ↵",tone:"muted"})],8,Da)])],2)}}}),Pa=Object.assign(qa,{__name:"PanelDetailComposer"}),Ra={class:"flex flex-col gap-1 text-sm"},Ma={class:"flex flex-col gap-1 text-sm"},Ua={class:"flex flex-col gap-1 text-sm"},La={key:0,class:"text-xs color-red-500"},ja=["disabled"],Oa=J({__name:"DetailUserOverrideDialog",props:{open:{type:Boolean,required:!0},openModifiers:{}},emits:["update:open"],setup(s){const r=Ft(s,"open"),{currentUser:v,override:i,setOverride:p}=Re(),y=H(""),_=H(""),x=H("");re(r,u=>{u&&(y.value=i.value?.login??v.value?.login??"",_.value=i.value?.name??v.value?.name??"",x.value=i.value?.avatarUrl??"")},{immediate:!0});const h=w(()=>{const u=x.value.trim();return u.length>0&&!u.startsWith("https://")});function g(){if(h.value)return;const u={login:y.value.trim()||void 0,name:_.value.trim()||void 0,avatarUrl:x.value.trim()||void 0};!u.login&&!u.name&&!u.avatarUrl?p(null):p(u),r.value=!1}function l(){p(null),r.value=!1}return(u,d)=>{const b=it;return n(),E(b,{open:r.value,"onUpdate:open":d[4]||(d[4]=I=>r.value=I),title:"Override user",icon:"i-ph-user-circle-duotone",width:"w-[min(92vw,28rem)]",description:"Override the handle, name, and avatar shown for your pending comments."},{footer:S(()=>[o("button",{type:"button",class:"btn-action-sm",onClick:l}," Reset to gh user "),d[9]||(d[9]=o("div",{class:"flex-1"},null,-1)),o("button",{type:"button",class:"btn-action-sm",onClick:d[3]||(d[3]=I=>r.value=!1)}," Cancel "),o("button",{type:"button",class:"btn-primary text-sm",disabled:t(h),onClick:g}," Save ",8,ja)]),default:S(()=>[o("form",{class:"px-5 py-4 flex flex-col gap-3",onSubmit:oe(g,["prevent"])},[o("label",Ra,[d[5]||(d[5]=o("span",{class:"color-muted text-xs"},"Handle",-1)),xe(o("input",{"onUpdate:modelValue":d[0]||(d[0]=I=>ce(y)?y.value=I:null),type:"text",placeholder:"octocat",class:"bg-transparent border border-base rounded px-2 py-1 outline-none focus:border-active"},null,512),[[we,t(y)]])]),o("label",Ma,[d[6]||(d[6]=o("span",{class:"color-muted text-xs"},"Display name (optional)",-1)),xe(o("input",{"onUpdate:modelValue":d[1]||(d[1]=I=>ce(_)?_.value=I:null),type:"text",placeholder:"The Octocat",class:"bg-transparent border border-base rounded px-2 py-1 outline-none focus:border-active"},null,512),[[we,t(_)]])]),o("label",Ua,[d[7]||(d[7]=o("span",{class:"color-muted text-xs"},"Avatar URL (optional, https only)",-1)),xe(o("input",{"onUpdate:modelValue":d[2]||(d[2]=I=>ce(x)?x.value=I:null),type:"url",placeholder:"https://…",class:X(["bg-transparent border border-base rounded px-2 py-1 outline-none focus:border-active",{"border-red-500/60":t(h)}])},null,2),[[we,t(x)]]),t(h)?(n(),a("span",La,"Must start with https://")):D("",!0)]),d[8]||(d[8]=o("p",{class:"text-xs color-muted"},[j(" Leave empty to use the "),o("code",{class:"font-mono"},"gh auth"),j(" identity. Stored in "),o("code",{class:"font-mono"},".ghfs/.ui.json"),j(". ")],-1))],32)]),_:1},8,["open"])}}}),Fa=Object.assign(Oa,{__name:"PanelDetailUserOverrideDialog"}),Ba={key:0,class:"font-mono text-xs color-muted"},Na={class:"px-4 py-2 border-b border-base"},za={class:"py-1"},Va={key:0,class:"px-4 py-6 text-sm text-center color-muted"},Ha=["onMouseenter","onClick"],Ka={key:0,class:"i-ph-check-bold text-white text-xs"},Ga={key:0,class:"color-muted text-xs truncate"},Wa={class:"text-xs color-muted"},Ya=J({__name:"DetailLabelEditor",setup(s){const r=be(),v=Ce(),i=w(()=>v?.projectId??r.value),p=_e(v?.projectId),y=ve(),_=je(),x=Bt(),h=w(()=>{const C=p.selectedNumber.value;return C==null?null:p.payload.value?.syncState.items[String(C)]??null}),g=w(()=>h.value?.data.item??null),l=$e(w(()=>g.value?.number??null),v?.projectId),u=w(()=>p.payload.value?.repositoryLabels??[]),d=w(()=>{const C=l.entries.value.find(f=>f.op.action==="set-labels");return C?[...C.op.labels]:[...g.value?.labels??[]]}),b=H(new Set),I=H(""),P=H(0),q=w(()=>{const C=I.value.trim().toLowerCase();return C?u.value.filter(f=>f.name.toLowerCase().includes(C)||(f.description?.toLowerCase().includes(C)??!1)):u.value});re(()=>_.labelEditorOpen.value,C=>{if(!C){K();return}b.value=new Set(d.value),I.value="",P.value=0}),re(q,()=>{P.value>=q.value.length&&(P.value=Math.max(0,q.value.length-1))});function U(C){const f=new Set(b.value);f.has(C)?f.delete(C):f.add(C),b.value=f}async function K(){if(!g.value)return;const C=new Set(d.value),f=b.value;if(C.size===f.size&&[...C].every(k=>f.has(k)))return;const c=[...f].sort();try{const k=l.entries.value.find($=>$.op.action==="set-labels");k?await y.$call("ghfs:update-queue-op",i.value??"__default__",k.id,{action:"set-labels",number:g.value.number,labels:c}):await y.$call("ghfs:add-queue-op",i.value??"__default__",{action:"set-labels",number:g.value.number,labels:c})}catch(k){p.setError(k.message)}}function O(C){if(C.key==="ArrowDown")C.preventDefault(),P.value=Math.min(q.value.length-1,P.value+1);else if(C.key==="ArrowUp")C.preventDefault(),P.value=Math.max(0,P.value-1);else if(C.key==="Enter"||C.key===" "){const f=q.value[P.value];f&&(C.preventDefault(),U(f.name))}}return(C,f)=>{const c=Vt,k=it;return n(),E(k,{open:t(_).labelEditorOpen.value,"onUpdate:open":f[1]||(f[1]=$=>t(_).labelEditorOpen.value=$),icon:"i-octicon-tag-16",width:"w-[min(92vw,32rem)]","max-height":"max-h-[70vh]","data-testid":"label-editor",description:"Toggle labels to queue a set-labels change for this item.",onKeydown:O},{header:S(()=>[f[2]||(f[2]=o("span",{class:"i-octicon-tag-16 color-active shrink-0"},null,-1)),f[3]||(f[3]=o("span",{class:"font-medium text-sm"},"Edit labels",-1)),t(g)?(n(),a("span",Ba,"#"+m(t(g).number),1)):D("",!0)]),actions:S(()=>[...f[4]||(f[4]=[o("span",{class:"text-xs color-muted"},[o("span",{class:"kbd"},"Esc"),j(" to save & close")],-1)])]),footer:S(()=>[f[5]||(f[5]=o("span",{class:"text-xs color-muted flex items-center gap-1"},[o("span",{class:"kbd"},"↑"),o("span",{class:"kbd"},"↓"),j(" move "),o("span",{class:"kbd"},"Enter"),j(" toggle ")],-1)),f[6]||(f[6]=o("div",{class:"flex-1"},null,-1)),o("span",Wa,m(t(b).size)+" selected",1)]),default:S(()=>[o("div",Na,[A(c,{modelValue:t(I),"onUpdate:modelValue":f[0]||(f[0]=$=>ce(I)?I.value=$:null),placeholder:"Filter labels…",icon:"i-ph-funnel-duotone","data-shortcut":"label-filter",autofocus:""},null,8,["modelValue"])]),o("ul",za,[t(q).length?D("",!0):(n(),a("li",Va,[t(u).length?(n(),a(N,{key:0},[j('No labels match "'+m(t(I))+'"',1)],64)):(n(),a(N,{key:1},[j("No labels in this repository yet.")],64))])),(n(!0),a(N,null,ne(t(q),($,R)=>(n(),a("li",{key:$.name,class:X(["flex items-center gap-3 px-3 py-1.5 text-sm cursor-pointer transition",t(P)===R?"bg-active":"hover:bg-active"]),onMouseenter:G=>P.value=R,onClick:G=>U($.name)},[o("span",{class:X(["inline-flex items-center justify-center w-4 h-4 rounded border border-base shrink-0 transition",t(b).has($.name)?"bg-primary-500 border-primary-500":""])},[t(b).has($.name)?(n(),a("span",Ka)):D("",!0)],2),o("span",{class:"inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-medium leading-none shrink-0",style:at(("labelStyle"in C?C.labelStyle:t(Ht))($.color,t(x)))},m($.name),5),$.description?(n(),a("span",Ga,m($.description),1)):D("",!0)],42,Ha))),128))])]),_:1},8,["open"])}}}),Za=Object.assign(Ya,{__name:"PanelDetailLabelEditor"}),Ja={key:0,class:"h-full flex flex-col items-center justify-center"},Xa={key:1,class:"h-full flex flex-col min-h-0 bg-base"},Qa={key:0,class:"flex items-center gap-2 px-6 pt-3 pb-1 text-xs color-muted","data-testid":"detail-repo-line"},el={class:"font-mono"},tl={class:"flex items-center gap-2 px-6 py-2.5 border-b border-base"},ol={class:"flex-1 min-w-0 flex items-baseline gap-2 flex-wrap"},nl=["innerHTML"],sl={class:"font-mono text-sm color-muted tabular-nums"},al={class:"text-xs color-muted flex items-center gap-1"},ll={class:"flex items-center gap-1 shrink-0"},rl={class:"border-b border-base text-xs"},il=["disabled","onClick"],cl={key:0,class:"color-faint italic"},dl={key:0,class:"px-6 py-1.5 flex items-center gap-1.5 flex-wrap"},ul={class:"font-mono italic"},ml={key:1,class:"px-6 py-2 border-b border-yellow-500/30 bg-yellow-500/8 flex items-center gap-3 text-sm"},pl={class:"flex-1 min-w-0"},fl={class:"font-medium"},vl={class:"color-muted"},_l=["disabled","title"],bl={key:0,class:"tab-count"},gl={key:0,class:"tab-count"},hl={key:4,class:"border-t border-base px-6 py-3 bg-base flex flex-col gap-2"},kl={class:"flex items-center gap-2 text-xs color-muted"},xl={key:1,class:"font-mono"},wl={key:2,class:"color-faint"},yl=J({__name:"Detail",props:{number:{default:null},projectId:{default:null},compact:{type:Boolean,default:!1},showRepo:{type:Boolean,default:!1}},setup(s){const r=s,v=be(),i=w(()=>r.projectId??v.value);go({projectId:i.value});const p=_e(r.projectId),y=ve(),_=je(),x=lt(),{currentUser:h}=Re(),g=H(!1),l=w(()=>r.number!=null?r.number:p.selectedNumber.value),u=w(()=>{const z=l.value;return z==null?null:p.payload.value?.syncState.items[String(z)]??null}),d=w(()=>u.value?.data.item??null),b=w(()=>u.value?.data.comments??[]),I=w(()=>u.value?.data.pull),P=w(()=>u.value?.data.commits??[]),q=w(()=>u.value?.data.timeline??[]),U=w(()=>!!u.value?.patchPath),K=w(()=>d.value?.labels??[]),O=w(()=>d.value?.assignees??[]),C=w({get(){return _.uiState.lastPrTab??"conversation"},set(z){_.setLastPrTab(z)}}),f=$e(w(()=>d.value?.number??null),r.projectId),c=w(()=>d.value?f.direction.value==="close"?"closed":f.direction.value==="reopen"?"open":d.value.state:"open"),k=w(()=>{if(!d.value)return"open";const z=c.value;return d.value.kind==="pull"?z==="open"?I.value?.isDraft?"draft":"open":I.value?.merged?"merged":"closed":z==="closed"?d.value.stateReason==="not_planned"?"not planned":"closed":"open"}),$=w(()=>d.value?.kind==="pull"?"pull request":"issue"),R=w(()=>p.payload.value?.repo.hasToken??!1),G=w(()=>{const z=p.payload.value;return z?{id:z.projectId,repo:z.repo.repo}:null}),B=w(()=>{const z=f.pendingTitle.value?.op;return z&&z.action==="set-title"?z.title:d.value?.title??""}),L=w(()=>!!f.pendingTitle.value),F=w(()=>Gt(B.value)),e=H(null),W=H(null);re(l,()=>{Pe(()=>{e.value&&(e.value.scrollTop=0)})}),re([l,i,()=>u.value?.data.comments?.length??0],()=>{const z=l.value,T=i.value,M=u.value;if(z==null||!T||!M)return;const V=M.data.comments??[];let Q=null,ee="";for(const ae of V)ae.createdAt&&ae.createdAt>ee&&(ee=ae.createdAt,Q=ae.id);x.markSeen(`${T}#${z}`,{lastCommentId:Q,lastSeenAt:new Date().toISOString()})},{immediate:!0});function te(z){W.value?.startEditing(z)}async function ke(z){p.setError(null);try{await y.$call("ghfs:remove-queue-op",i.value??"__default__",z.id)}catch(T){p.setError(T.message)}}async function Ie(){if(!d.value||p.executing.value)return;const z=f.entries.value.map(T=>T.id);if(z.length){p.setError(null),p.setExecuting(!0);try{await y.$call("ghfs:execute-queue",i.value??"__default__",{entryIds:z,continueOnError:!0})}catch(T){p.setError(`Execute failed: ${T.message}`),p.setExecuting(!1)}}}async function Se(){p.setError(null);for(const z of f.entries.value)try{await y.$call("ghfs:remove-queue-op",i.value??"__default__",z.id)}catch(T){p.setError(T.message);return}}return(z,T)=>{const M=Le,V=Nt,Q=Kt,ee=bo,ae=dt,ue=ge,gt=he,Fe=Me,pe=rt,ht=ct,Ae=vo,kt=po,Be=Ds,De=uo,xt=Hs,wt=ha,yt=io,$t=Pa,Ct=Fa,It=Za;return t(d)?(n(),a("article",Xa,[s.showRepo&&t(G)?(n(),a("div",Qa,[A(V,{project:t(G),size:16},null,8,["project"]),o("span",el,m(t(G).repo),1)])):D("",!0),o("header",tl,[A(Q,{item:t(d),pull:t(I),pending:t(f).direction.value,class:"shrink-0"},null,8,["item","pull","pending"]),o("div",ol,[o("h2",{class:X(["font-medium text-lg leading-tight",{italic:t(L)}]),"data-testid":"detail-title",innerHTML:t(F)},null,10,nl),o("span",sl,"#"+m(t(d).number),1),A(ee,{state:t(k),kind:t(d).kind},null,8,["state","kind"]),t(f).direction.value?(n(),E(ae,{key:0,color:"yellow",icon:"i-octicon-hourglass-16",size:"xs",class:"uppercase tracking-wide"},{default:S(()=>[...T[4]||(T[4]=[j(" pending ",-1)])]),_:1})):D("",!0),t(d).author?(n(),E(ue,{key:1,author:{login:t(d).author,avatarUrl:t(d).authorAvatarUrl},size:14},null,8,["author"])):D("",!0),o("span",al,[T[5]||(T[5]=o("span",{class:"color-faint"},"·",-1)),A(gt,{time:t(d).createdAt},null,8,["time"])])]),o("div",ll,[t(d)?.url?(n(),E(pe,{key:0,command:"list.open"},{default:S(()=>[A(Fe,{as:"a",href:t(d)?.url,target:"_blank",rel:"noreferrer",icon:"i-ph-arrow-square-out-duotone",size:"sm",tooltip:"Open on GitHub"},null,8,["href"])]),_:1})):D("",!0)])]),o("div",rl,[A(pe,{command:"item.labels",tone:"muted",class:"!flex w-full pr-4"},{default:S(({execute:le,disabled:St})=>[o("button",{type:"button",class:"flex-1 min-w-0 px-6 py-1.5 flex items-center gap-1.5 flex-wrap text-left hover:bg-active transition outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary-500/40","data-testid":"detail-labels-row",title:"Edit labels",disabled:St,onClick:le},[T[6]||(T[6]=o("span",{class:"i-octicon-tag-16 color-muted"},null,-1)),(n(!0),a(N,null,ne(t(K),Ne=>(n(),E(ht,{key:Ne,name:Ne},null,8,["name"]))),128)),t(K).length?D("",!0):(n(),a("span",cl,"no labels"))],8,il)]),_:1}),t(O).length||t(d).milestone?(n(),a("div",dl,[t(O).length?(n(),a(N,{key:0},[T[7]||(T[7]=o("span",{class:"i-octicon-person-16 color-muted"},null,-1)),(n(!0),a(N,null,ne(t(O),le=>(n(),E(ue,{key:le,author:le,size:14},null,8,["author"]))),128))],64)):D("",!0),t(d).milestone?(n(),a(N,{key:1},[T[8]||(T[8]=o("span",{class:"i-octicon-milestone-16 color-muted ml-2"},null,-1)),o("span",ul,m(t(d).milestone),1)],64)):D("",!0)])):D("",!0)]),t(f).hasPending.value?(n(),a("div",ml,[T[11]||(T[11]=o("span",{class:"i-octicon-hourglass-16 color-yellow-600 dark:color-yellow-400 shrink-0"},null,-1)),o("div",pl,[o("span",fl,m(t(f).entries.value.length)+" pending change"+m(t(f).entries.value.length===1?"":"s"),1),o("span",vl," queued for this "+m(t($)),1)]),s.compact?D("",!0):(n(),a(N,{key:0},[o("button",{type:"button",class:"btn-action-sm",disabled:t(p).executing.value||!t(R),title:t(R)?"Execute the pending changes for this item only":"No GitHub token available",onClick:Ie},[o("span",{class:X(t(p).executing.value?"i-octicon-sync-16 animate-spin":"i-ph-play-duotone")},null,2),T[9]||(T[9]=j(" Execute ",-1))],8,_l),o("button",{type:"button",class:"btn-action-sm",onClick:Se},[...T[10]||(T[10]=[o("span",{class:"i-ph-trash-duotone"},null,-1),j(" Discard ",-1)])])],64))])):D("",!0),t(d).kind==="pull"?(n(),E(yt,{key:2,modelValue:t(C),"onUpdate:modelValue":T[0]||(T[0]=le=>ce(C)?C.value=le:null),class:"flex-1 flex flex-col min-h-0"},{default:S(()=>[A(kt,{class:"flex items-stretch gap-1 px-4 pt-3 border-b border-base"},{default:S(()=>[A(Ae,{value:"conversation",class:"tab-trigger"},{default:S(()=>[T[12]||(T[12]=o("span",{class:"i-octicon-comment-discussion-16"},null,-1)),T[13]||(T[13]=j(" Conversation ",-1)),t(b).length+t(q).length?(n(),a("span",bl,m(t(b).length+t(q).length),1)):D("",!0),A(pe,{command:"pr.tab.conversation",tone:"muted"})]),_:1}),A(Ae,{value:"commits",class:"tab-trigger"},{default:S(()=>[T[14]||(T[14]=o("span",{class:"i-octicon-git-commit-16"},null,-1)),T[15]||(T[15]=j(" Commits ",-1)),t(P).length?(n(),a("span",gl,m(t(P).length),1)):D("",!0),A(pe,{command:"pr.tab.commits",tone:"muted"})]),_:1}),A(Ae,{value:"changes",class:"tab-trigger"},{default:S(()=>[T[16]||(T[16]=o("span",{class:"i-octicon-file-diff-16"},null,-1)),T[17]||(T[17]=j(" Changes ",-1)),A(pe,{command:"pr.tab.changes",tone:"muted"})]),_:1})]),_:1}),o("div",{ref_key:"scrollContainer",ref:e,"data-scroll":"detail",class:"flex-1 overflow-y-auto"},[A(De,{value:"conversation"},{default:S(()=>[A(Be,{item:t(d),comments:t(b),timeline:t(q),"pending-comments":t(f).pendingComments.value,onEditPending:te,onRemovePending:ke},null,8,["item","comments","timeline","pending-comments"])]),_:1}),A(De,{value:"commits"},{default:S(()=>[A(xt,{commits:t(P)},null,8,["commits"])]),_:1}),A(De,{value:"changes"},{default:S(()=>[A(wt,{number:t(d).number,"has-patch":t(U)},null,8,["number","has-patch"])]),_:1})],512)]),_:1},8,["modelValue"])):(n(),a("div",{key:3,ref_key:"scrollContainer",ref:e,"data-scroll":"detail",class:"flex-1 overflow-y-auto"},[A(Be,{item:t(d),comments:t(b),timeline:t(q),"pending-comments":t(f).pendingComments.value,onEditPending:te,onRemovePending:ke},null,8,["item","comments","timeline","pending-comments"])],512)),s.compact?D("",!0):(n(),a("footer",hl,[o("div",kl,[t(h)?.login?(n(),E(ue,{key:0,author:{login:t(h).login,avatarUrl:t(h).avatarUrl,name:t(h).name},size:18,link:!1},null,8,["author"])):(n(),a("span",xl,"(no user)")),t(h)?.name?(n(),a("span",wl,"· "+m(t(h).name),1)):D("",!0),T[18]||(T[18]=o("div",{class:"flex-1"},null,-1)),A(Fe,{icon:"i-ph-user-switch-duotone",size:"sm",tooltip:"Override user","aria-label":"Override user identity",onClick:T[1]||(T[1]=le=>g.value=!0)})]),A($t,{ref_key:"composerRef",ref:W,number:t(d).number,kind:t(d).kind},null,8,["number","kind"])])),A(Ct,{open:t(g),"onUpdate:open":T[2]||(T[2]=le=>ce(g)?g.value=le:null)},null,8,["open"]),A(It)])):(n(),a("div",Ja,[A(M,{icon:"i-octicon-inbox-16",title:"Select an item on the left to view it here",size:"lg"},{hint:S(()=>[...T[3]||(T[3]=[o("p",{class:"text-xs color-faint"},[j(" Use "),o("span",{class:"kbd"},"j"),j(),o("span",{class:"kbd"},"k"),j(" to navigate items, "),o("span",{class:"kbd"},"↑"),j(),o("span",{class:"kbd"},"↓"),j(" to scroll. ")],-1)])]),_:1})]))}}}),Il=Object.assign(yl,{__name:"PanelDetail"});export{Il as _,Pa as a,go as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as v,a as g,b as x}from"./DeX2bcSG.js";import{e as b,k as I,m as y,G as j,g as C,o as n,c as S,b as l,w as $,h as t,C as a,N as w,i as B,a as P,X as T,V as L,R as N,W as V,p as A}from"./DHH7xZXJ.js";import{_ as H}from"./DlAUqK2U.js";import"./D4yIuA0F.js";import"./BqmRGtwl.js";const M={class:"h-full flex flex-col","data-testid":"hub-todo-page"},E={class:"flex-1 min-h-0"},R=b({__name:"Todo",setup(r){const e=L(),s=N(),i=I(),{ensureLoaded:u}=y(),d=j();C(()=>{e.load()});async function _(o){await u(o.projectId),V().value=o.projectId,A(o.projectId).selectItem(o.number),d.push(`/${o.repo}/${o.number}`)}function m(){e.listItems.value.length!==0&&i.openStartDialog(e.listItems.value,{label:"Todo"})}return(o,G)=>{const p=v,h=w,f=g,c=T,k=x;return n(),S("div",M,[l(p,{mode:"hub"}),l(f,{variant:"todo",title:"Todo","item-total":t(e).items.value.length,projects:t(s).projects.value,kind:t(e).kind.value,counts:t(e).counts.value},{actions:$(()=>[t(e).listItems.value.length>0?(n(),a(h,{key:0,icon:"i-ph-cards-three-duotone",tooltip:"Start a card pile","aria-label":"Start a card pile","data-testid":"todo-cards-mode",onClick:m})):B("",!0)]),_:1},8,["item-total","projects","kind","counts"]),P("main",E,[t(e).loading.value&&t(e).items.value.length===0?(n(),a(c,{key:0,icon:"i-octicon-sync-16",title:"Loading todo list…"})):t(e).error.value?(n(),a(c,{key:1,icon:"i-ph-warning-duotone",title:`Failed to load: ${t(e).error.value}`},null,8,["title"])):t(e).items.value.length===0?(n(),a(c,{key:2,icon:"i-ph-bookmark-simple-duotone",title:"No items in your todo list",message:"Mark items as todo while triaging a card pile to see them here."})):(n(),a(k,{key:3,items:t(e).filteredListItems.value,"selected-key":null,"show-repo-name":!0,class:"h-full",onSelect:_},null,8,["items"]))])])}}}),U=Object.assign(R,{__name:"PanelTodo"}),D={};function F(r,e){const s=U;return n(),a(s)}const J=H(D,[["render",F]]);export{J as default};
|