@intent-hq/web 2.342.10 → 2.342.11
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/package.json +1 -1
- package/web/app/immutable/chunks/{DnpDtYbO.js → 0WpdeH0V.js} +1 -1
- package/web/app/immutable/chunks/{ClvOrYJK.js → 45ae1O1C.js} +1 -1
- package/web/app/immutable/chunks/{CEPeLq3h.js → 5DKubOhJ.js} +1 -1
- package/web/app/immutable/chunks/{WFmKN8sA.js → 6ZL8pMJq.js} +1 -1
- package/web/app/immutable/chunks/{DPHLMXXB.js → 8lCQWtLf.js} +1 -1
- package/web/app/immutable/chunks/{0THIUDHC.js → B23Z4ykB.js} +1 -1
- package/web/app/immutable/chunks/{D9hYtFgK.js → B3EgEX5b.js} +1 -1
- package/web/app/immutable/chunks/{B6xfCcCc.js → B4cGKs9g.js} +1 -1
- package/web/app/immutable/chunks/{CUJhxiPI.js → B4rc57RF.js} +1 -1
- package/web/app/immutable/chunks/{DusNPXQF.js → B6uG0ArS.js} +1 -1
- package/web/app/immutable/chunks/{D0uQWC2c.js → B9-qQprA.js} +1 -1
- package/web/app/immutable/chunks/{DUqFUm2r.js → BBjpHj2n.js} +1 -1
- package/web/app/immutable/chunks/{axgQo8cw.js → BCfxyarf.js} +1 -1
- package/web/app/immutable/chunks/{D3cE9nLc.js → BCz2ovsd.js} +1 -1
- package/web/app/immutable/chunks/{DSf7xPiS.js → BHJNTM27.js} +1 -1
- package/web/app/immutable/chunks/{B5LF76XB.js → BIEJIWBe.js} +4 -4
- package/web/app/immutable/chunks/{DaUHNiCF.js → BJYoke6t.js} +1 -1
- package/web/app/immutable/chunks/{C00CKhUO.js → BKqksTRj.js} +1 -1
- package/web/app/immutable/chunks/{DjCL1Hxh.js → BL1FCb_O.js} +1 -1
- package/web/app/immutable/chunks/{CjzmJepK.js → BMytut7W.js} +1 -1
- package/web/app/immutable/chunks/{DbyXyasD.js → BW_zmCou.js} +1 -1
- package/web/app/immutable/chunks/{B4BIeyFw.js → BWdzMsRu.js} +1 -1
- package/web/app/immutable/chunks/{DuS6s3Hb.js → BaYvSfFJ.js} +1 -1
- package/web/app/immutable/chunks/{U5KHGPBO.js → Bd-swEiF.js} +2 -2
- package/web/app/immutable/chunks/{C2P8j-iW.js → BgDlW42z.js} +1 -1
- package/web/app/immutable/chunks/{DrcXjKQ_.js → BikT2-cw.js} +1 -1
- package/web/app/immutable/chunks/{Z5bnli72.js → BingBe2H.js} +3 -3
- package/web/app/immutable/chunks/{D5xrBxHO.js → BnZGkUcY.js} +1 -1
- package/web/app/immutable/chunks/{DzG9oS3W.js → Bop09Ucj.js} +1 -1
- package/web/app/immutable/chunks/{CZUe-5xr.js → BqMNzHV7.js} +1 -1
- package/web/app/immutable/chunks/{DZr9s6Pw.js → Bqj4t23R.js} +1 -1
- package/web/app/immutable/chunks/{lueIr-rh.js → BrHV7tWT.js} +4 -4
- package/web/app/immutable/chunks/{DECca1-5.js → BrOVLepx.js} +4 -4
- package/web/app/immutable/chunks/{EceC8-O2.js → Bu0uovey.js} +1 -1
- package/web/app/immutable/chunks/{DYJfIIFo.js → BydBuUN1.js} +1 -1
- package/web/app/immutable/chunks/{B8Xt0Fuy.js → C0BlHFtx.js} +2 -2
- package/web/app/immutable/chunks/{CstEmW17.js → C4eeIdl6.js} +1 -1
- package/web/app/immutable/chunks/{BkPD62Sm.js → C68a3xYB.js} +1 -1
- package/web/app/immutable/chunks/{DMYklue_.js → C9uXxykt.js} +1 -1
- package/web/app/immutable/chunks/{FEOKRLhr.js → CA53EmKM.js} +1 -1
- package/web/app/immutable/chunks/{CfQAH0hP.js → CB0ffBbR.js} +2 -2
- package/web/app/immutable/chunks/{xmj9VQiT.js → CClPu08B.js} +1 -1
- package/web/app/immutable/chunks/{DbiEyP6R.js → CFkObFE_.js} +1 -1
- package/web/app/immutable/chunks/{C5NMlDdz.js → CGWmNXwS.js} +1 -1
- package/web/app/immutable/chunks/{C3LJZi03.js → CGhzCDUv.js} +1 -1
- package/web/app/immutable/chunks/{DfsGU3Wn.js → CL3wzbI5.js} +1 -1
- package/web/app/immutable/chunks/{B4PJH7D3.js → CL4CFkXu.js} +12 -12
- package/web/app/immutable/chunks/{CE7R4ADw.js → CLiCDN3s.js} +1 -1
- package/web/app/immutable/chunks/{D8Af3nYK.js → CMeapStP.js} +1 -1
- package/web/app/immutable/chunks/{bZzmY7dL.js → CVRt-jvn.js} +1 -1
- package/web/app/immutable/chunks/{BiK9aV24.js → CWcKhSzv.js} +1 -1
- package/web/app/immutable/chunks/{BIpRxjYy.js → CXanpoZy.js} +3 -3
- package/web/app/immutable/chunks/{DTRzEXDv.js → CXlKDVxv.js} +1 -1
- package/web/app/immutable/chunks/{Brk0d2Yh.js → CYQ01nBO.js} +3 -3
- package/web/app/immutable/chunks/{xgz6tLTq.js → CYvmOvIf.js} +1 -1
- package/web/app/immutable/chunks/{DIE2xEGx.js → C_aEdmBY.js} +4 -4
- package/web/app/immutable/chunks/{BThBX3NU.js → Ca5ilCub.js} +1 -1
- package/web/app/immutable/chunks/{D8rIse1T.js → Cafxy2gS.js} +1 -1
- package/web/app/immutable/chunks/{CNLihcDS.js → CbV4_5TP.js} +1 -1
- package/web/app/immutable/chunks/{BcCszrUD.js → CbabGGQ6.js} +1 -1
- package/web/app/immutable/chunks/{BHoNN3Qm.js → CdLeE6r8.js} +1 -1
- package/web/app/immutable/chunks/{40Nd55Kt.js → CfCVFpEi.js} +2 -2
- package/web/app/immutable/chunks/{Duhn8Rxm.js → CgppJm9C.js} +1 -1
- package/web/app/immutable/chunks/{BtjjO5-R.js → ChjSruK6.js} +1 -1
- package/web/app/immutable/chunks/{DriTY1JC.js → Ck9vt2te.js} +1 -1
- package/web/app/immutable/chunks/{cjpQKFKe.js → CkA-dhEI.js} +1 -1
- package/web/app/immutable/chunks/{AQT4HclA.js → CndGhMSu.js} +1 -1
- package/web/app/immutable/chunks/{DqzMEdu3.js → CpGIiGYT.js} +1 -1
- package/web/app/immutable/chunks/{Cm4H7d3F.js → CqQ4fYcx.js} +1 -1
- package/web/app/immutable/chunks/{CYKUoAtj.js → CrL_S4an.js} +1 -1
- package/web/app/immutable/chunks/{DY6rFXPh.js → Cy4Nb-iH.js} +1 -1
- package/web/app/immutable/chunks/{yU2Ozt8f.js → D1srGe6x.js} +1 -1
- package/web/app/immutable/chunks/{EQHtbLJx.js → D5UcC2W-.js} +1 -1
- package/web/app/immutable/chunks/{zfpJcV11.js → D6CQ3vCi.js} +1 -1
- package/web/app/immutable/chunks/{D7Bt6CWc.js → D8F_PP3b.js} +3 -3
- package/web/app/immutable/chunks/{CSEhUqXf.js → D94yY3fK.js} +3 -3
- package/web/app/immutable/chunks/{B-a4oBhE.js → DAsaUdCq.js} +1 -1
- package/web/app/immutable/chunks/{BiBUw7Gf.js → DHV428mU.js} +1 -1
- package/web/app/immutable/chunks/{2zBnfhc0.js → DHmPGjhz.js} +1 -1
- package/web/app/immutable/chunks/{PKFab1LF.js → DJFYPZaT.js} +1 -1
- package/web/app/immutable/chunks/{CfTOHLZX.js → DLA9SqJr.js} +1 -1
- package/web/app/immutable/chunks/{BHVIonrt.js → DO1Yw77G.js} +2 -2
- package/web/app/immutable/chunks/{CpwTpNAY.js → DQR2WwrF.js} +1 -1
- package/web/app/immutable/chunks/{Ch976N_A.js → DS0zgKuo.js} +1 -1
- package/web/app/immutable/chunks/{C-XSTrgb.js → DSryNQ0J.js} +17 -17
- package/web/app/immutable/chunks/{BuwsjKxk.js → DTUA_IWl.js} +2 -2
- package/web/app/immutable/chunks/{1liB3Nap.js → DfplH18l.js} +1 -1
- package/web/app/immutable/chunks/{DspLnLHB.js → DhuXXSmP.js} +2 -2
- package/web/app/immutable/chunks/{C_WCW0pZ.js → DkX0ItuT.js} +1 -1
- package/web/app/immutable/chunks/{CrpuS6Ni.js → DlY9zDzR.js} +1 -1
- package/web/app/immutable/chunks/{DP3zLz97.js → Dm7Hynte.js} +1 -1
- package/web/app/immutable/chunks/{Cz7zkfuI.js → Dq0NqfIy.js} +1 -1
- package/web/app/immutable/chunks/{BZEQhOg-.js → DwgLBrx9.js} +1 -1
- package/web/app/immutable/chunks/{DHwVhbU6.js → KGC2yQad.js} +1 -1
- package/web/app/immutable/chunks/{DZ48MMZ5.js → M3X4Qbds.js} +1 -1
- package/web/app/immutable/chunks/{CKdN1cCE.js → M_EApwg1.js} +1 -1
- package/web/app/immutable/chunks/{B9vEAveM.js → NK6wfg1E.js} +1 -1
- package/web/app/immutable/chunks/{Bpe3qOEk.js → NQLfBEID.js} +1 -1
- package/web/app/immutable/chunks/{BFu_t_Z1.js → P4gMcZpU.js} +1 -1
- package/web/app/immutable/chunks/{DIUWL4pO.js → P7TngFRd.js} +1 -1
- package/web/app/immutable/chunks/{BrG4kjhA.js → QkiXeaJJ.js} +1 -1
- package/web/app/immutable/chunks/{w4Z-hwiU.js → TVbPMdsf.js} +1 -1
- package/web/app/immutable/chunks/{DW7TAOpx.js → T_ZgxkZ5.js} +1 -1
- package/web/app/immutable/chunks/{B205Hay6.js → TwjxWugk.js} +1 -1
- package/web/app/immutable/chunks/{YsZHimAl.js → VXOnuLP5.js} +1 -1
- package/web/app/immutable/chunks/{CDb_ubYB.js → W68TC-cn.js} +1 -1
- package/web/app/immutable/chunks/{fjwSz6Ls.js → WpFD34Fm.js} +1 -1
- package/web/app/immutable/chunks/{DW-jvC4s.js → YA99c2r2.js} +1 -1
- package/web/app/immutable/chunks/{CEMqt0Cp.js → ZTLNTSwZ.js} +1 -1
- package/web/app/immutable/chunks/{CHZQwNOP.js → _EWuOQ1S.js} +1 -1
- package/web/app/immutable/chunks/{DtvtE_L9.js → duiIDJJw.js} +1 -1
- package/web/app/immutable/chunks/{DOE93G2F.js → ePZL5-BT.js} +1 -1
- package/web/app/immutable/chunks/{Q8jT5C71.js → euqWZqFv.js} +1 -1
- package/web/app/immutable/chunks/{BYYYyD1o.js → fuoMKeBF.js} +1 -1
- package/web/app/immutable/chunks/{DbknkG4W.js → gNRK0Qch.js} +1 -1
- package/web/app/immutable/chunks/{Bm8kqAm8.js → k2AOFc0s.js} +1 -1
- package/web/app/immutable/chunks/{CHc_0N7g.js → lrO9ZngQ.js} +1 -1
- package/web/app/immutable/chunks/{BA1-CV5U.js → olwByklL.js} +1 -1
- package/web/app/immutable/chunks/{o2hG3dk-.js → p2el263R.js} +1 -1
- package/web/app/immutable/chunks/{BDbnsjQH.js → sF_6bvKN.js} +1 -1
- package/web/app/immutable/chunks/{DuEP-GLD.js → u-Emsu1q.js} +1 -1
- package/web/app/immutable/chunks/{DIUt4wjF.js → y2szrCFl.js} +1 -1
- package/web/app/immutable/chunks/{BMp6iFxZ.js → yUw81UAc.js} +2 -2
- package/web/app/immutable/chunks/{Chxftzo7.js → yvd8Q0sI.js} +6 -6
- package/web/app/immutable/entry/{app.BipGAxSD.js → app.GD34-jUt.js} +2 -2
- package/web/app/immutable/entry/start.DhBg8g5C.js +1 -0
- package/web/app/immutable/nodes/{0.CRDjU4rX.js → 0.eQwIe5Oe.js} +1 -1
- package/web/app/immutable/nodes/{1.CREGl2Pt.js → 1._iHIJZNm.js} +1 -1
- package/web/app/immutable/nodes/{10.CMwz_1nI.js → 10.u4JGGETq.js} +1 -1
- package/web/app/immutable/nodes/{14.CV8rtwPq.js → 14.DAJoiitF.js} +1 -1
- package/web/app/immutable/nodes/{17.BtyZD7Rw.js → 17.DdO48vrW.js} +2 -2
- package/web/app/immutable/nodes/{2.kIfgDx6U.js → 2.CE7awgYO.js} +4 -4
- package/web/app/immutable/nodes/{3.Bnf1EqEs.js → 3.CSJiStCS.js} +1 -1
- package/web/app/immutable/nodes/{4.D_ON5RZE.js → 4.DucC8cUm.js} +1 -1
- package/web/app/immutable/nodes/{5.DJWDqCb3.js → 5.Cj7GLlWW.js} +1 -1
- package/web/app/immutable/nodes/{6.B_DMhjSu.js → 6.YWf6lwvj.js} +1 -1
- package/web/app/immutable/nodes/{7.CrzoTO8s.js → 7.MIoZjD8e.js} +1 -1
- package/web/app/immutable/nodes/{8.DjCB3qt1.js → 8.CkutZ-Aa.js} +4 -4
- package/web/app/immutable/nodes/{9.B4rL513Y.js → 9.pOkHxlza.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.Doft0JHv.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as oe,br as st,a_ as at,bp as Q,bz as ie,bv as $t,bt as Me,b as ce}from"./DXyyWeag.js";import{bs as le,a5 as L,bS as C,ay as Yt,aD as t,bA as $,bl as K,b_ as k,bO as D,W as _,bn as de,c9 as y,aA as rt,aB as O,bV as Mt,br as _a,aw as De,aj as Se,bH as V,ai as ya,be as Ia,b$ as xa,bf as wa,aC as he,a7 as Be}from"./DYhIMPy1.js";import{v as Xt,I as ea,w as ne,n as jt,u as gt,p as Ne,j as se}from"./CjaOLL1c.js";import{b as ba}from"./BaIAhI85.js";import{f as Ut}from"./Bfr1QjPr.js";import{A as aa,ao as na,an as sa}from"./
|
|
1
|
+
import{t as oe,br as st,a_ as at,bp as Q,bz as ie,bv as $t,bt as Me,b as ce}from"./DXyyWeag.js";import{bs as le,a5 as L,bS as C,ay as Yt,aD as t,bA as $,bl as K,b_ as k,bO as D,W as _,bn as de,c9 as y,aA as rt,aB as O,bV as Mt,br as _a,aw as De,aj as Se,bH as V,ai as ya,be as Ia,b$ as xa,bf as wa,aC as he,a7 as Be}from"./DYhIMPy1.js";import{v as Xt,I as ea,w as ne,n as jt,u as gt,p as Ne,j as se}from"./CjaOLL1c.js";import{b as ba}from"./BaIAhI85.js";import{f as Ut}from"./Bfr1QjPr.js";import{A as aa,ao as na,an as sa}from"./BrOVLepx.js";import"./Cuqq8bL5.js";import{al as ra,aC as oa,an as Aa,ao as ka,ap as We,ag as ia,a as $a,p as Ta,dw as Ca,aO as Sa,aq as Na}from"./D3QcPFoL.js";import{R as Fa}from"./DT4bpJWb.js";import{F as pe,bx as Oa,bc as Ra,ay as Ma,aS as Wa,cz as Da}from"./BTdkHPOB.js";import{H as Ba}from"./BrHV7tWT.js";import{e as La}from"./Bd-swEiF.js";import{L as Ea}from"./CYQ01nBO.js";import{f as Pa}from"./Cafxy2gS.js";import{c as Nt,Iy as Oe,ny as Ga,fF as za,bW as ja,s0 as Ka,ul as Ha}from"./D5ej8a-y.js";function qa(e){return e.type==="agent"}const Xa=180,Ya=180;var Le=O('<div class="activity-pill shrink-0 text-xs px-3 py-1.5 bg-muted/60 border border-border rounded-lg text-subtle max-w-32 truncate"><!> </div>'),Ua=O('<div class="text-ui text-subtle line-clamp-2 leading-tight px-1"> </div>'),Va=O('<div><div class="flex items-center justify-center gap-1"><!> <span class="truncate"> </span></div> <!> <!></div>'),Qa=O('<div class="text-sm text-primary-ink flex items-center justify-center gap-1"><!> <span class="truncate"> </span></div>'),Fe=O('<span class="text-xs text-subtle"> </span>'),Za=O('<span class="status-pill text-xs px-1.5 py-0.5 bg-muted/80 rounded-md text-subtle truncate max-w-[130px]"> </span>'),Ja=O('<div class="text-ui text-subtle truncate w-full px-1 leading-tight"> </div>'),tn=O('<div class="flex flex-col items-center gap-1"><div class="flex items-center justify-center gap-1.5"><!> <!></div> <!></div>'),en=O('<div class="text-sm text-subtle line-clamp-3 leading-tight"> </div>'),an=O('<div class="avatar-wrapper h-9 w-12 flex items-center justify-center bg-background rounded-full"><!></div> <span class="font-semibold text-center leading-tight line-clamp-2"> </span> <div class="status-footer mt-auto pt-2 w-full text-center"><!></div>',1),nn=O('<div class="agent-card-wrapper flex items-center gap-3 shadow"><!> <!> <!></div>');function ca(e,a){if(new.target)return oe({component:ca,...e});le(a,!0);const s=()=>$t(_t,"$attentionRequest$",o),g=()=>$t(it,"$agentSession$",o),u=()=>$t(x,"$agentIsResponding$",o),c=()=>$t(ct,"$agentIsWaitingForOtherAgents$",o),d=()=>$t(P,"$agentIsWaiting$",o),i=()=>$t(I,"$agentIsThinking$",o),[o,l]=Me();let n=st(a,"agent",7),p=st(a,"activeFile",7),R=st(a,"activeNote",7),h=st(a,"agentNames",7),v=st(a,"onclick",7),b=st(a,"onmouseenter",7),S=st(a,"onmouseleave",7);const x=ra(n().agentId),it=oa(n().agentId),E=y(()=>!n().waitingForAgentIds||n().waitingForAgentIds.length===0?[]:n().waitingForAgentIds.map(A=>h()?.get(A)||Q.agentOverview_hierarchyCard_agent_fallback()).slice(0,2)),I=Aa(n().agentId),P=ka(n().agentId),ct=We(n().agentId),_t=ia(n().agentId),Ft=y(()=>{const A={attentionKind:s()?.kind??null};return g()?na(g(),A):sa({status:n().status,isResponding:u(),isWaitingForOtherAgents:c()},{...A,isCompleted:n().status==="completed",isFailed:n().status==="failed"})});var Dt={get agent(){return n()},set agent(A){n(A),rt()},get activeFile(){return p()},set activeFile(A){p(A),rt()},get activeNote(){return R()},set activeNote(A){R(A),rt()},get agentNames(){return h()},set agentNames(A){h(A),rt()},get onclick(){return v()},set onclick(A){v(A),rt()},get onmouseenter(){return b()},set onmouseenter(A){b(A),rt()},get onmouseleave(){return S()},set onmouseleave(A){S(A),rt()},$set:ie,$on:(A,B)=>ce(a,A,B)},ht=nn(),bt=L(ht);{var Kt=A=>{var B=Le(),Tt=L(B);pe(Tt,{get icon(){return Ra},size:"xs",class:"inline"});var Rt=C(Tt);$(B),k(()=>D(Rt,` ${p()??""}`)),_(A,B)};at(bt,A=>{p()&&u()&&A(Kt)})}var Ot=C(bt,2);{let A=y(()=>d()?"border-primary-ink border-2":"");Ut(Ot,{variant:"ghost",type:"button",get class(){return`agent-card flex flex-col items-center px-2.5 py-4 bg-card border border-border
|
|
2
2
|
hover:shadow transition-all cursor-pointer ${t(A)??""}`},get style(){return`width: 180px; height: 180px; anchor-name: --agent-hierarchy-${n().agentId??""};`},get onclick(){return v()},get onmouseenter(){return b()},get onmouseleave(){return S()},children:(B,Tt)=>{var Rt=an(),Lt=Yt(Rt),me=L(Lt);aa(me,{get agentId(){return n().agentId},variant:"emphasized",get state(){return t(Ft)},get specialist(){return n().specialist}}),$(Lt);var Zt=C(Lt,2),_e=K(Zt,!0),Jt=C(Zt,2),te=L(Jt);{var ye=ft=>{var r=Va(),f=L(r),M=L(f);{let z=y(()=>s().kind==="blocker"?Ma:Wa);pe(M,{get icon(){return t(z)},size:"xs"})}var W=C(M,2),m=K(W,!0);$(f);var H=C(f,2);{var nt=z=>{var It=Ua(),ot=K(It,!0);k(()=>D(ot,s().reason)),_(z,It)};at(H,z=>{s().reason&&z(nt)})}var N=C(H,2);{var G=z=>{Fa(z,{get date(){return s().timestamp},class:"text-ui text-ghost"})};at(N,z=>{s().timestamp&&z(G)})}$(r),k(z=>{Xt(r,1,`text-sm flex flex-col items-center gap-0.5 ${s().kind==="blocker"?"text-red-500":"text-warning-ink"}`),D(m,z)},[()=>s().kind==="blocker"?Q.chat_agentCard_attentionBlocker_label():Q.chat_agentCard_attentionDiscussion_label()]),_(ft,r)},yt=ft=>{var r=Qa(),f=L(r);pe(f,{get icon(){return Oa},size:"xs",class:"animate-pulse"});var M=C(f,2),W=K(M,!0);$(r),k(m=>D(W,m),[()=>Q.agentOverview_hierarchyCard_waitingFor_label({names:t(E).join(", ")})]),_(ft,r)},Ie=ft=>{const r=y(()=>n().activeToolName?$a(n().activeToolName,n().activeToolInput||{}):null),f=y(()=>t(r)&&!t(r).hidden?t(r):null);var M=tn(),W=L(M),m=L(W);ea(m,{size:14});var H=C(m,2);{var nt=Y=>{var Z=Fe(),pt=K(Z,!0);k(Et=>D(pt,Et),[()=>Q.agentOverview_hierarchyCard_thinking_label()]),_(Y,Z)},N=Y=>{var Z=Za(),pt=K(Z);k(()=>D(pt,`${t(f).verb??""}
|
|
3
3
|
${t(f).subject??""}`)),_(Y,Z)},G=Y=>{var Z=Fe(),pt=K(Z);k(()=>D(pt,`${t(f).verb??""}...`)),_(Y,Z)},z=Y=>{var Z=Fe(),pt=K(Z,!0);k(Et=>D(pt,Et),[()=>Q.agentOverview_hierarchyCard_responding_label()]),_(Y,Z)};at(H,Y=>{i()?Y(nt):t(f)&&t(f).subject?Y(N,1):t(f)?Y(G,2):Y(z,-1)})}$(W);var It=C(W,2);{var ot=Y=>{var Z=Ja(),pt=K(Z,!0);k(()=>D(pt,n().lastResponse)),_(Y,Z)};at(It,Y=>{!t(f)&&n().lastResponse&&Y(ot)})}$(M),_(ft,M)},xe=ft=>{var r=en(),f=K(r,!0);k(()=>D(f,n().lastResponse)),_(ft,r)};at(te,ft=>{s()?ft(ye):c()?ft(yt,1):u()||i()?ft(Ie,2):n().lastResponse&&ft(xe,3)})}$(Jt),k(()=>D(_e,n().name)),_(B,Rt)},$$slots:{default:!0}})}var ge=C(Ot,2);{var Bt=A=>{var B=Le(),Tt=L(B);pe(Tt,{get icon(){return Da},size:"xs",class:"inline"});var Rt=C(Tt);$(B),k(Lt=>D(Rt,` ${Lt??""}`),[()=>Q.agentOverview_hierarchyCard_note_label()]),_(A,B)};at(ge,A=>{R()&&u()&&A(Bt)})}$(ht),_(e,ht);var Qt=de(Dt);return l(),Qt}const sn=50;var rn=O('<span class="sr-only"> </span> <!>',1);function Re(e,a){if(new.target)return oe({component:Re,...e});le(a,!0);const s=()=>$t(R,"$attentionRequest$",c),g=()=>$t(h,"$agentSession$",c),u=()=>$t(p,"$agentIsWaitingForOtherAgents$",c),[c,d]=Me();let i=st(a,"agent",7),o=st(a,"onclick",7),l=st(a,"onmouseenter",7),n=st(a,"onmouseleave",7);const p=We(i().agentId),R=ia(i().agentId),h=oa(i().agentId),v=y(()=>{const x={attentionKind:s()?.kind??null};return g()?na(g(),x):sa({status:i().status,isResponding:i().status==="responding",isWaitingForOtherAgents:u()},{...x,isCompleted:i().status==="completed",isFailed:i().status==="failed"})});var b={get agent(){return i()},set agent(x){i(x),rt()},get onclick(){return o()},set onclick(x){o(x),rt()},get onmouseenter(){return l()},set onmouseenter(x){l(x),rt()},get onmouseleave(){return n()},set onmouseleave(x){n(x),rt()},$set:ie,$on:(x,it)=>ce(a,x,it)};Ut(e,{variant:"ghost",type:"button",class:"background-agent-card relative flex flex-col items-center justify-center gap-1 rounded-full bg-sidebar hover:bg-muted/70 transition-colors cursor-pointer p-2",get style(){return`width: 50px; min-height: 50px; anchor-name: --agent-hierarchy-${i().agentId??""};`},get onclick(){return o()},get onmouseenter(){return l()},get onmouseleave(){return n()},children:(x,it)=>{var E=rn(),I=Yt(E),P=K(I,!0),ct=C(I,2);aa(ct,{get agentId(){return i().agentId},size:32,get state(){return t(v)},get specialist(){return i().specialist}}),k(()=>D(P,i().name)),_(x,E)},$$slots:{default:!0}});var S=de(b);return d(),S}var re=he('<path fill="none"></path>'),on=O('<div class="batch-group-box relative z-10 bg-background border border-border rounded-xl"></div>'),cn=O('<svg class="connector-svg" style="overflow: visible; display: block;"><!><!></svg> <div class="children-items-row flex items-start justify-center"></div>',1),ln=O('<div class="children-wrapper flex flex-col items-center"></div>'),dn=O('<div class="agent-tree-node flex flex-col items-center"><div class="agent-card-wrapper relative z-10"><!></div> <!></div>'),gn=O('<div class="absolute inset-0 flex items-center justify-center"><div class="text-center text-subtle"><p class="text-lg font-medium"> </p> <p class="text-sm mt-1"> </p></div></div>'),un=O('<div class="utility-corral border border-dashed border-border rounded-lg p-3 min-w-20"><div class="corral-label text-xs text-subtle font-medium mb-2 text-center"> </div> <div class="corral-agents flex flex-col items-center gap-2"></div></div>'),fn=O('<div class="utility-corrals flex flex-col gap-4"></div>'),pn=O('<div class="text-xs text-subtle capitalize"> </div>'),vn=O('<span class="px-1.5 py-0.5 text-ui font-medium bg-muted text-subtle rounded"> </span>'),hn=O('<span class="text-warning-ink"> </span>'),mn=O('<span class="text-primary-ink"> </span>'),_n=O('<span class="text-green-500"> </span>'),yn=O('<span class="text-red-500"> </span>'),In=O("<span> </span>"),xn=O('<div class="text-xs text-subtle line-clamp-3 border-t border-border pt-2 mt-2"> </div>'),wn=O('<div class="text-xs text-subtle flex items-center gap-1"><!> <span> </span></div>'),bn=O('<div class="p-3 space-y-2"><div class="flex items-center gap-2"><!> <div class="flex-1 min-w-0"><div class="font-medium text-sm truncate"> </div> <!></div> <!></div> <div class="text-xs text-subtle"><!></div> <div class="text-xs text-subtle"> </div> <!> <!></div>'),An=he('<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="5" y1="12" x2="19" y2="12"></line></svg>'),kn=he('<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>'),$n=he('<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"></path></svg>'),Tn=O('<div class="canvas-content absolute inset-0 flex items-center justify-center p-8 svelte-13q5gm4"><div class="hierarchy-wrapper flex items-start gap-8"><!> <div class="main-hierarchy flex flex-col items-center gap-4"><div class="hierarchy-container flex flex-col items-center gap-4"><div class="roots-row flex justify-center"></div></div></div></div> <!></div> <div class="zoom-controls absolute bottom-4 right-4 flex items-center gap-1 bg-card border border-border rounded-lg shadow-sm p-1"><!> <!> <!> <div class="w-px h-6 bg-border mx-1"></div> <!></div> <div class="absolute bottom-4 left-4 text-xs text-subtle"> </div>',1),Cn=O('<div class="agent-hierarchy-graph relative w-full h-full overflow-hidden bg-background svelte-13q5gm4"><!></div>');function la(e,a){if(new.target)return oe({component:la,...e});le(a,!0);const s=(r,f=wa,M)=>{const W=y(()=>f().agent.isBackground),m=y(()=>f().children.length>0),H=y(()=>t(m)&&f().children[0]?.agent.isBackground?sn:Xa),nt=y(()=>16),N=y(()=>60),G=y(()=>t(m)?Rt(f().children,t(H),i):[]),z=y(()=>(()=>{const F=[];for(let q=0;q<t(G).length;q+=Tt)F.push(t(G).slice(q,q+Tt));return F})()),It=y(()=>t(z).map(F=>F.reduce((q,J)=>q+J.width,0)+Math.max(0,F.length-1)*i)),ot=y(()=>Math.max(...t(It),0));var Y=dn(),Z=L(Y),pt=L(Z);{var Et=F=>{Re(F,{get agent(){return f().agent},onclick:q=>te(f().agent,q),onmouseenter:()=>x(f().agent.agentId),onmouseleave:it})},we=F=>{ca(F,{get agent(){return f().agent},get activeFile(){return f().activeFile},get activeNote(){return f().activeNote},get agentNames(){return t(Lt)},onclick:q=>te(f().agent,q),onmouseenter:()=>x(f().agent.agentId),onmouseleave:it})};at(pt,F=>{t(W)?F(Et):F(we,-1)})}$(Z);var be=C(Z,2);{var U=F=>{const q=y(()=>f().agent.status==="waiting"?f().agent.waitingForAgentIds||[]:[]),J=y(()=>t(q).length>0),et=y(()=>t(N)/2);var xt=ln();jt(xt,21,()=>t(z),Ne,(Ht,At,Ct)=>{const Pt=y(()=>t(It)[Ct]),ee=y(()=>(t(ot)-t(Pt))/2),Ae=y(()=>(()=>{let ut=0;return t(At).map(j=>{const St=ut+j.width/2;return ut+=j.width+i,St})})());var ue=cn(),Gt=Yt(ue);gt(Gt,"height",t(N));var qt=L(Gt);{var ke=ut=>{var j=re();k(()=>{gt(j,"d",`M ${t(ot)/2} -${Ya} L ${t(ot)/2} ${t(N)/3}`),gt(j,"stroke",t(J)?"var(--primary-ink)":"currentColor"),Xt(j,0,se(t(J)?"":"text-border")),gt(j,"stroke-width",t(J)?2:1)}),_(ut,j)},$e=ut=>{var j=re();k(()=>{gt(j,"d",`M ${t(ot)/2} 0 L ${t(ot)/2} ${t(N)/3}`),gt(j,"stroke",t(J)?"var(--primary-ink)":"currentColor"),Xt(j,0,se(t(J)?"":"text-border")),gt(j,"stroke-width",t(J)?2:1)}),_(ut,j)};at(qt,ut=>{Ct>0?ut(ke):ut($e,-1)})}var Te=C(qt);jt(Te,17,()=>t(At),Ne,(ut,j,St)=>{const vt=y(()=>t(ee)+t(Ae)[St]),lt=y(()=>t(ot)/2),zt=y(()=>t(j).type==="batch"?t(j).children.some(wt=>t(q).includes(wt.agent.agentId)):t(q).includes(t(j).child.agent.agentId)),mt=y(()=>t(zt)?"var(--color-primary)":"currentColor"),kt=y(()=>t(zt)?"":"text-border"),w=y(()=>t(zt)?2:1),T=y(()=>t(j).type==="batch"?t(N)-A:t(N)),tt=y(()=>Math.abs(t(vt)-t(lt))),X=y(()=>Math.min(t(nt),t(tt)/2));var fe=Be(),Ce=Yt(fe);{var va=wt=>{var dt=re();k(()=>{gt(dt,"d",`M ${t(lt)??""} ${t(N)/3} L ${t(lt)??""} ${t(T)??""}`),gt(dt,"stroke",t(mt)),Xt(dt,0,se(t(kt)),"svelte-13q5gm4"),gt(dt,"stroke-width",t(w))}),_(wt,dt)},ha=wt=>{var dt=re();k(()=>{gt(dt,"d",`M ${t(lt)??""} ${t(N)/3}
|
|
4
4
|
L ${t(lt)??""} ${t(et)-t(X)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var a1=Object.defineProperty;var i1=(t,e,r)=>e in t?a1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>i1(t,typeof e!="symbol"?e+"":e,r);import{cD as ur,aU as s1,ds as _l,_ as R0,Y as ya,Z as o1,X as l1,a1 as c1,ab as u1,U as d1,dT as h1,M as p1,ba as Pl,cG as Pr,dr as Ll,aT as m1,aX as f1,co as g1,cE as v1,c9 as b1,dl as Xa,dN as y1,dG as w1,ay as Fn,al as k1,at as Ti,dq as Ol,dD as x1,dX as $l,dW as S1}from"./D3QcPFoL.js";import{D as Ps,bv as A1,bM as T1,aY as E1}from"./BFu_t_Z1.js";import{M as M1,F as i0}from"./DyvrH0mm.js";import{yC as gn,Iy as E,ny as ge,nx as Se,aM as C1,g as Bl,y as Re,be as c0,jT as Ei,lS as vn,aj as jt,lR as Ls,l$ as Os,lY as $s,jq as ql,gj as Ka,GW as I1,t4 as z1,zZ as R1,oB as D1,mE as bn,By as N1,iw as _1,m9 as P1,lM as L1}from"./D5ej8a-y.js";import{bp as ne}from"./DXyyWeag.js";import{t as rt}from"./BboIV5H5.js";import{l as O1,d as xr}from"./ChkzKl5W.js";import{a as u0}from"./BdWqymET.js";import{o as pe,r as Gt,e as d0,s as V,_ as Xe,l as h0,g as $1,n as Pe,c as or,b as Ue,u as B1,d as q1}from"./CIyUrgF0.js";import{j as Fl}from"./uXuxG9cN.js";import{w as F1}from"./DEYvT_CO.js";import{b as H1}from"./DHQOuksI.js";import{i as He}from"./RD9QY1Yc.js";import{l as wa,c as Hl}from"./ChTqQfQN.js";import{f as Mi,C as Ul,D as Wl,l as U1,z as Gl,r as W1,u as G1}from"./CRsmjbca.js";import{e as j1,h as Sr}from"./pKvpKpo4.js";import{ax as p0}from"./Bfr1QjPr.js";import{i as Bs}from"./DogedYC1.js";const Ge=[];for(let t=0;t<256;++t)Ge.push((t+256).toString(16).slice(1));function V1(t,e=0){return(Ge[t[e+0]]+Ge[t[e+1]]+Ge[t[e+2]]+Ge[t[e+3]]+"-"+Ge[t[e+4]]+Ge[t[e+5]]+"-"+Ge[t[e+6]]+Ge[t[e+7]]+"-"+Ge[t[e+8]]+Ge[t[e+9]]+"-"+Ge[t[e+10]]+Ge[t[e+11]]+Ge[t[e+12]]+Ge[t[e+13]]+Ge[t[e+14]]+Ge[t[e+15]]).toLowerCase()}const Y1=new Uint8Array(16);function X1(){return crypto.getRandomValues(Y1)}function Ci(t,e,r){return crypto.randomUUID?crypto.randomUUID():K1(t)}function K1(t,e,r){t=t||{};const n=t.random??t.rng?.()??X1();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,V1(n)}function Ii(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=Ii({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?M1(r.replace(/\.git\/?$/,""),e):null}function w5(t,e){return t.type==="local"?t.plainFolder?"folder":"local":Ii(t,e)?.provider==="gitlab"?"gitlab":"github"}function jl(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function k5(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=jl(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function x5(t){return t.type==="local"&&t.path?t.path:void 0}const Z1=["/.clones/","/.repo-cache/"];function S5(t){const e=t.replaceAll("\\","/");return Z1.some(r=>e.includes(r))}function A5(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Q1(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function T5(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Q1(r)}}function E5(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,jl(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const J1="known-repos",ed=6e4;function td({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=gn(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(gn(s),s);for(const s of e.repos)a.set(gn(s),s)}const i=[...a.values()].filter(s=>!r[gn(s)]);return n==="all"?i:i.slice(0,9)}function M5(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function C5({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<ed?"skip":"load"}function I5(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=Ii(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function rd({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ps)?Ps:null;return s===null||!i(s)?null:s}const z5=E.createSelector(t=>t.workspaceInitializer.hydrated),R5=E.createSelector(t=>t.workspaceInitializer.compactFormState),D5=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),N5=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),_5=E.createSelector(t=>t.workspaceInitializer.branchByRepo),P5=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),L5=E.createSelector(t=>ge(t.workspaceInitializer.recentRepos)),O5=E.createSelector((t,e)=>Se(t.workspaceInitializer.recentRepoRefreshes,e)),$5=E.createSelector((t,e)=>Se(t.workspaceInitializer.directoryStatusChecks,e)),B5=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),q5=E.createSelector(t=>ge(t.workspaceInitializer.remoteSetups)),F5=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),H5=E.createSelector(t=>t.workspaceInitializer.agentByRepo),U5=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),W5=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),G5=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),j5=E.createSelector((t,e)=>({restore:Se(t.workspaceInitializer.draftRestores,e),clear:Se(t.workspaceInitializer.draftClears,e)})),V5=E.createSelector((t,e,r)=>{const n=Se(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),Y5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationOutcomes,e)),X5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationResumes,e)),K5=E.createSelector(t=>rd({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:T1.select(t),orchestratorId:A1.select(t)?.id??null})),nd=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=ur.select(t);return e&&r&&s1.select(t)?JSON.stringify([r,e]):null}),Z5=E.createSelector(t=>{const e=nd.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),ad=E.createSelector(t=>{const e=Se(t.workspaceInitializer.recentRepoRefreshes,J1),r=ur.select(t);return td({saved:ge(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),Q5=E.createSelector(t=>_l.select(t)?ad.select(t):[]),J5=E.createSelector(t=>E1.select(t)||void 0),qs="workspace-debug-flags",yn={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class id{constructor(){se(this,"flags");se(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return yn;try{const e=localStorage.getItem(qs);if(e)return{...yn,...JSON.parse(e)}}catch(e){wa.error("Failed to load debug flags:",e)}return yn}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(qs,JSON.stringify(this.flags))}catch(e){wa.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...yn},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),wa.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const ka=new id;function e3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function sd(t){return t.charAt(0).toUpperCase()+t.slice(1)}function t3(t){if(!t||t.trim().length===0)return ne.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ne.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ne.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ne.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ne.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ne.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ne.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ne.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ne.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ne.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ne.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ne.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ne.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ne.workspace_sidebarHeader_branchTooLong_error()}function r3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function Za(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function n3(t,e){return`${e}:${t.agentId??"manual"}`}function od(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function ld(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function cd(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function a3(t,e,r,n){const a=od(t,e),i=n?` (origin/${n})`:"";return r?a===1?ne.workspace_sidebarChanges_addToPr_one({suffix:i}):ne.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ne.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ne.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function i3(t,e,r){const n=ld(t,e),a=r?` (origin/${r})`:"";return n===1?ne.workspace_sidebarChanges_undoPush_one({suffix:a}):ne.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function s3(t,e){const r=cd(t,e);return r===1?ne.workspace_sidebarChanges_undoCommit_one():ne.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function o3(t,e){return e===0&&t.length>0}function l3(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function c3(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function u3(t,e,r){return r?.path===t&&r?.staged===e}function d3(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function h3(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function ud(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function p3(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=ud(s.url),d=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:Za(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:d,crossRepoDisplay:d?zi(d,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:Za(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function m3(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??C1.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function dd(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function xa(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=R0(i),c=o.toLowerCase(),d=a.find(p=>!!o&&p.url.toLowerCase()===c||(i.resource||i.monitorAvailability?p.monitorIdentity===ya(i):!p.resource&&!p.monitorAvailability&&(s?!p.crossRepo&&p.number===i.prNumber:p.crossRepo===i.repo&&p.number===i.prNumber)));if(d){d.monitorAgentId=i.agentId,d.resource=i.resource,d.monitorAvailability=i.monitorAvailability,d.monitorIdentity=i.resource||i.monitorAvailability?ya(i):void 0,d.monitorSnapshot=i.lastSnapshot??d.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${o1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?ya(i):void 0,url:o,htmlUrl:o,status:dd(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:zi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function zi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function f3(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const S of n)S.repoOwner&&S.repoName&&s.add(`${S.repoOwner}/${S.repoName}`.toLowerCase());let o=t;const c=[],d=[];if(t.some(S=>S.crossRepo)){o=[];for(const S of t)S.crossRepo?s.has(S.crossRepo.toLowerCase())?c.push(S):d.push(S):o.push(S)}const p=[],g=[],v=[];for(const S of e){const C=S.repo.toLowerCase();R0(S)&&o.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&(!i||C===i)?p.push(S):R0(S)&&c.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&s.has(C)?g.push(S):v.push(S)}const w=xa(o,p,r),A=r?.split("/")[0],M=new Set([...w,...c,...d].map(S=>`${(S.crossRepo??r??"").toLowerCase()}#${S.number}`)),D=[...c];for(const S of n){if(!S.repoOwner||!S.repoName)continue;const C=`${S.repoOwner}/${S.repoName}`;for(const W of S.pullRequests??[]){const K=`${C.toLowerCase()}#${W.number}`;if(M.has(K))continue;M.add(K);const X=W.url||`https://github.com/${C}/pull/${W.number}`,T=i!==void 0&&C.toLowerCase()===i;D.push({number:W.number,title:a(W),url:X,htmlUrl:X,status:Za(W.status),createdAt:W.createdAt,updatedAt:W.updatedAt,crossRepo:T?void 0:C,crossRepoDisplay:T?void 0:zi(C,A)})}}return{own:w,otherRoots:xa(D,g,r),otherTracked:xa(d,v,r)}}function Fs(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function g3(t){const e=t.status==="merged"?ne.workspace_prSection_merged_label():t.status==="closed"?ne.workspace_prSection_closed_label():t.status==="draft"?ne.workspace_prSection_statusDraft_label():Fs(t)?ne.workspace_prSection_statusQueued_label():ne.workspace_prSection_statusOpen_label(),r=[l1(t)??e],n=Fs(t)?O1(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ne.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ne.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ne.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ne.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ne.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ne.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ne.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(sd(a.mergeBlockedReason))),r.join(`
|
|
1
|
+
var a1=Object.defineProperty;var i1=(t,e,r)=>e in t?a1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>i1(t,typeof e!="symbol"?e+"":e,r);import{cD as ur,aU as s1,ds as _l,_ as R0,Y as ya,Z as o1,X as l1,a1 as c1,ab as u1,U as d1,dT as h1,M as p1,ba as Pl,cG as Pr,dr as Ll,aT as m1,aX as f1,co as g1,cE as v1,c9 as b1,dl as Xa,dN as y1,dG as w1,ay as Fn,al as k1,at as Ti,dq as Ol,dD as x1,dX as $l,dW as S1}from"./D3QcPFoL.js";import{D as Ps,bv as A1,bM as T1,aY as E1}from"./P4gMcZpU.js";import{M as M1,F as i0}from"./DyvrH0mm.js";import{yC as gn,Iy as E,ny as ge,nx as Se,aM as C1,g as Bl,y as Re,be as c0,jT as Ei,lS as vn,aj as jt,lR as Ls,l$ as Os,lY as $s,jq as ql,gj as Ka,GW as I1,t4 as z1,zZ as R1,oB as D1,mE as bn,By as N1,iw as _1,m9 as P1,lM as L1}from"./D5ej8a-y.js";import{bp as ne}from"./DXyyWeag.js";import{t as rt}from"./BboIV5H5.js";import{l as O1,d as xr}from"./ChkzKl5W.js";import{a as u0}from"./BdWqymET.js";import{o as pe,r as Gt,e as d0,s as V,_ as Xe,l as h0,g as $1,n as Pe,c as or,b as Ue,u as B1,d as q1}from"./CIyUrgF0.js";import{j as Fl}from"./uXuxG9cN.js";import{w as F1}from"./DEYvT_CO.js";import{b as H1}from"./DHQOuksI.js";import{i as He}from"./RD9QY1Yc.js";import{l as wa,c as Hl}from"./ChTqQfQN.js";import{f as Mi,C as Ul,D as Wl,l as U1,z as Gl,r as W1,u as G1}from"./CRsmjbca.js";import{e as j1,h as Sr}from"./pKvpKpo4.js";import{ax as p0}from"./Bfr1QjPr.js";import{i as Bs}from"./DogedYC1.js";const Ge=[];for(let t=0;t<256;++t)Ge.push((t+256).toString(16).slice(1));function V1(t,e=0){return(Ge[t[e+0]]+Ge[t[e+1]]+Ge[t[e+2]]+Ge[t[e+3]]+"-"+Ge[t[e+4]]+Ge[t[e+5]]+"-"+Ge[t[e+6]]+Ge[t[e+7]]+"-"+Ge[t[e+8]]+Ge[t[e+9]]+"-"+Ge[t[e+10]]+Ge[t[e+11]]+Ge[t[e+12]]+Ge[t[e+13]]+Ge[t[e+14]]+Ge[t[e+15]]).toLowerCase()}const Y1=new Uint8Array(16);function X1(){return crypto.getRandomValues(Y1)}function Ci(t,e,r){return crypto.randomUUID?crypto.randomUUID():K1(t)}function K1(t,e,r){t=t||{};const n=t.random??t.rng?.()??X1();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,V1(n)}function Ii(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=Ii({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?M1(r.replace(/\.git\/?$/,""),e):null}function w5(t,e){return t.type==="local"?t.plainFolder?"folder":"local":Ii(t,e)?.provider==="gitlab"?"gitlab":"github"}function jl(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function k5(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=jl(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function x5(t){return t.type==="local"&&t.path?t.path:void 0}const Z1=["/.clones/","/.repo-cache/"];function S5(t){const e=t.replaceAll("\\","/");return Z1.some(r=>e.includes(r))}function A5(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Q1(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function T5(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Q1(r)}}function E5(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,jl(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const J1="known-repos",ed=6e4;function td({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=gn(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(gn(s),s);for(const s of e.repos)a.set(gn(s),s)}const i=[...a.values()].filter(s=>!r[gn(s)]);return n==="all"?i:i.slice(0,9)}function M5(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function C5({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<ed?"skip":"load"}function I5(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=Ii(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function rd({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ps)?Ps:null;return s===null||!i(s)?null:s}const z5=E.createSelector(t=>t.workspaceInitializer.hydrated),R5=E.createSelector(t=>t.workspaceInitializer.compactFormState),D5=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),N5=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),_5=E.createSelector(t=>t.workspaceInitializer.branchByRepo),P5=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),L5=E.createSelector(t=>ge(t.workspaceInitializer.recentRepos)),O5=E.createSelector((t,e)=>Se(t.workspaceInitializer.recentRepoRefreshes,e)),$5=E.createSelector((t,e)=>Se(t.workspaceInitializer.directoryStatusChecks,e)),B5=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),q5=E.createSelector(t=>ge(t.workspaceInitializer.remoteSetups)),F5=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),H5=E.createSelector(t=>t.workspaceInitializer.agentByRepo),U5=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),W5=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),G5=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),j5=E.createSelector((t,e)=>({restore:Se(t.workspaceInitializer.draftRestores,e),clear:Se(t.workspaceInitializer.draftClears,e)})),V5=E.createSelector((t,e,r)=>{const n=Se(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),Y5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationOutcomes,e)),X5=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationResumes,e)),K5=E.createSelector(t=>rd({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:T1.select(t),orchestratorId:A1.select(t)?.id??null})),nd=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=ur.select(t);return e&&r&&s1.select(t)?JSON.stringify([r,e]):null}),Z5=E.createSelector(t=>{const e=nd.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),ad=E.createSelector(t=>{const e=Se(t.workspaceInitializer.recentRepoRefreshes,J1),r=ur.select(t);return td({saved:ge(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),Q5=E.createSelector(t=>_l.select(t)?ad.select(t):[]),J5=E.createSelector(t=>E1.select(t)||void 0),qs="workspace-debug-flags",yn={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class id{constructor(){se(this,"flags");se(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return yn;try{const e=localStorage.getItem(qs);if(e)return{...yn,...JSON.parse(e)}}catch(e){wa.error("Failed to load debug flags:",e)}return yn}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(qs,JSON.stringify(this.flags))}catch(e){wa.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...yn},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),wa.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const ka=new id;function e3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function sd(t){return t.charAt(0).toUpperCase()+t.slice(1)}function t3(t){if(!t||t.trim().length===0)return ne.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ne.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ne.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ne.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ne.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ne.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ne.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ne.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ne.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ne.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ne.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ne.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ne.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ne.workspace_sidebarHeader_branchTooLong_error()}function r3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function Za(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function n3(t,e){return`${e}:${t.agentId??"manual"}`}function od(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function ld(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function cd(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function a3(t,e,r,n){const a=od(t,e),i=n?` (origin/${n})`:"";return r?a===1?ne.workspace_sidebarChanges_addToPr_one({suffix:i}):ne.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ne.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ne.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function i3(t,e,r){const n=ld(t,e),a=r?` (origin/${r})`:"";return n===1?ne.workspace_sidebarChanges_undoPush_one({suffix:a}):ne.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function s3(t,e){const r=cd(t,e);return r===1?ne.workspace_sidebarChanges_undoCommit_one():ne.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function o3(t,e){return e===0&&t.length>0}function l3(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function c3(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function u3(t,e,r){return r?.path===t&&r?.staged===e}function d3(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function h3(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function ud(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function p3(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=ud(s.url),d=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:Za(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:d,crossRepoDisplay:d?zi(d,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:Za(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function m3(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??C1.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function dd(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function xa(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=R0(i),c=o.toLowerCase(),d=a.find(p=>!!o&&p.url.toLowerCase()===c||(i.resource||i.monitorAvailability?p.monitorIdentity===ya(i):!p.resource&&!p.monitorAvailability&&(s?!p.crossRepo&&p.number===i.prNumber:p.crossRepo===i.repo&&p.number===i.prNumber)));if(d){d.monitorAgentId=i.agentId,d.resource=i.resource,d.monitorAvailability=i.monitorAvailability,d.monitorIdentity=i.resource||i.monitorAvailability?ya(i):void 0,d.monitorSnapshot=i.lastSnapshot??d.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${o1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?ya(i):void 0,url:o,htmlUrl:o,status:dd(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:zi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function zi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function f3(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const S of n)S.repoOwner&&S.repoName&&s.add(`${S.repoOwner}/${S.repoName}`.toLowerCase());let o=t;const c=[],d=[];if(t.some(S=>S.crossRepo)){o=[];for(const S of t)S.crossRepo?s.has(S.crossRepo.toLowerCase())?c.push(S):d.push(S):o.push(S)}const p=[],g=[],v=[];for(const S of e){const C=S.repo.toLowerCase();R0(S)&&o.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&(!i||C===i)?p.push(S):R0(S)&&c.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&s.has(C)?g.push(S):v.push(S)}const w=xa(o,p,r),A=r?.split("/")[0],M=new Set([...w,...c,...d].map(S=>`${(S.crossRepo??r??"").toLowerCase()}#${S.number}`)),D=[...c];for(const S of n){if(!S.repoOwner||!S.repoName)continue;const C=`${S.repoOwner}/${S.repoName}`;for(const W of S.pullRequests??[]){const K=`${C.toLowerCase()}#${W.number}`;if(M.has(K))continue;M.add(K);const X=W.url||`https://github.com/${C}/pull/${W.number}`,T=i!==void 0&&C.toLowerCase()===i;D.push({number:W.number,title:a(W),url:X,htmlUrl:X,status:Za(W.status),createdAt:W.createdAt,updatedAt:W.updatedAt,crossRepo:T?void 0:C,crossRepoDisplay:T?void 0:zi(C,A)})}}return{own:w,otherRoots:xa(D,g,r),otherTracked:xa(d,v,r)}}function Fs(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function g3(t){const e=t.status==="merged"?ne.workspace_prSection_merged_label():t.status==="closed"?ne.workspace_prSection_closed_label():t.status==="draft"?ne.workspace_prSection_statusDraft_label():Fs(t)?ne.workspace_prSection_statusQueued_label():ne.workspace_prSection_statusOpen_label(),r=[l1(t)??e],n=Fs(t)?O1(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ne.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ne.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ne.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ne.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ne.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ne.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ne.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(sd(a.mergeBlockedReason))),r.join(`
|
|
2
2
|
`)}function v3(t,e){return e.has(t??"manual")}function b3(t,e){return{path:t.relativePath,additions:t.stats.additions,deletions:t.stats.deletions,staged:e,status:t.status,attribution:t.attribution?.agent?{agentId:t.attribution.agent.agentId,agentName:t.attribution.agent.agentName,sessionId:t.attribution.agent.sessionId,turnNumber:t.attribution.agent.turnNumber,timestamp:t.attribution.timestamp}:void 0}}const Vl=500;function y3(t,e=Vl){const r=Math.max(0,Math.floor(e));return t.length<=r?{visible:t,shown:t.length,hiddenCount:0}:{visible:t.slice(0,r),shown:r,hiddenCount:t.length-r}}function w3(t,e,r=Vl){let n=Math.max(0,Math.floor(r)),a=0,i=0;return{groups:t.map(o=>{if(e(o))return{group:o,visibleFiles:[]};const c=Math.min(n,o.files.length);return n-=c,a+=c,i+=o.files.length-c,{group:o,visibleFiles:c===o.files.length?o.files:o.files.slice(0,c)}}),shown:a,hiddenCount:i}}function k3(t){if(t.hiddenCount<=0)return"";const e=rt(t.shown),r=rt(t.shown+t.hiddenCount);return t.hiddenCount===1?ne.workspace_fileChanges_hiddenFiles_one({shown:e,total:r}):ne.workspace_fileChanges_hiddenFiles_many({shown:e,total:r,count:rt(t.hiddenCount)})}function hd(t){if(!t)return{};try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function Qa(t){return t.startsWith("@")?t.slice(1):t}function pd(t,e,r,n){const a=t.fullPath||t.path||t.filename;if(a)return Qa(String(a));const i=[r,e,n.trim()].map(Qa).filter(Boolean),s=i.find(o=>o.includes("/"))??i[0];return s?c1(s).path:void 0}function md(t){const e=t.line??t.startLine??t.range?.start;return typeof e=="number"&&Number.isFinite(e)?e:void 0}function fd(t){if(!t||t.getAttribute("data-mention")===null)return null;const e=t.getAttribute("data-type")||"",r=t.getAttribute("data-id")||"",n=t.getAttribute("data-label")||"",a=t.getAttribute("data-uri")||"",i=hd(t.getAttribute("data-meta")),s={type:e,id:r,label:n,uri:a,meta:i},o=a.startsWith("intent://")?a:typeof i.fullUrl=="string"&&i.fullUrl.startsWith("intent://")?i.fullUrl:void 0;if(o&&(s.intentUrl=o),e==="file"||e==="file-range"){const c=pd(i,n,r,t.textContent||"");c&&(s.filePath=c);const d=md(i);d!==void 0&&(s.line=d)}else if(e==="folder"||e==="source-folder"){const c=i.fullPath||i.path||r||n,d=c?Qa(String(c)).replace(/\/+$/,""):"";d&&(s.folderPath=d)}else if(e==="note"||e==="note-range"){const c=i.noteId||r;c&&(s.note=i.isExternalLink&&i.workspaceId?{id:c,workspaceId:String(i.workspaceId)}:{id:c})}return s}function x3(t){return{sidebarTabId:"files",type:"file",filePath:`${t}/`}}function Ri(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Lr=Ri();function Yl(t){Lr=t}var Ir={exec:()=>null};function Xr(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),a=e[n];return a||(a=t(n),e[n]=a),a}}function ce(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ye.caret,"$1"),r=r.replace(a,s),n},getRegex:()=>new RegExp(r,e)};return n}var gd=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),Ye={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Xr(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Xr(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Xr(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Xr(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Xr(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Xr(t=>new RegExp(`^ {0,${t}}>`))},vd=/^(?:[ \t]*(?:\n|$))+/,bd=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yd=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,W0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,wd=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Di=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Xl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kl=ce(Xl).replace(/bull/g,Di).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),kd=ce(Xl).replace(/bull/g,Di).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ni=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,xd=/^[^\n]+/,_i=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Sd=ce(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_i).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ad=ce(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Di).getRegex(),Hn="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Pi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Td=ce("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Pi).replace("tag",Hn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Zl=t=>ce(Ni).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex(),Ed=Zl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Md=Zl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Cd=ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Md).getRegex(),Li={blockquote:Cd,code:bd,def:Sd,fences:yd,heading:wd,hr:W0,html:Td,lheading:Kl,list:Ad,newline:vd,paragraph:Ed,table:Ir,text:xd},Hs=ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex(),Id={...Li,lheading:kd,table:Hs,paragraph:ce(Ni).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hs).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex()},zd={...Li,html:ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Pi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ir,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ce(Ni).replace("hr",W0).replace("heading",` *#{1,6} *[^
|
|
3
3
|
]`).replace("lheading",Kl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Rd=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Dd=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ql=/^( {2,}|\\)\n(?!\s*$)/,Nd=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Vt=/[\p{P}\p{S}]/u,m0=/[\s\p{P}\p{S}]/u,G0=/[^\s\p{P}\p{S}]/u,_d=ce(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,m0).getRegex(),Pd=/[\p{Pi}\p{Ps}"']/u,Jl=/(?!~)[\p{P}\p{S}]/u,Ld=/(?!~)[\s\p{P}\p{S}]/u,Od=/(?:[^\s\p{P}\p{S}]|~)/u,$d=ce(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",gd?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ec=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Bd=ce(ec,"u").replace(/punct/g,Vt).getRegex(),qd=ce(ec,"u").replace(/punct/g,Jl).getRegex(),Fd=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Hd=ce(Fd,"u").replace(/openQuote/g,Pd).replace(/punct/g,Vt).getRegex(),tc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ud=ce(tc,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Wd=ce(tc,"gu").replace(/notPunctSpace/g,Od).replace(/punctSpace/g,Ld).replace(/punct/g,Jl).getRegex(),Gd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",jd=ce(Gd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Vd=ce("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Yd="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Xd=ce(Yd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Kd=ce(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Vt).getRegex(),Zd="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Qd=ce(Zd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Jd=ce(/\\(punct)/,"gu").replace(/punct/g,Vt).getRegex(),eh=ce(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),th=ce(Pi).replace("(?:-->|$)","-->").getRegex(),rh=ce("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",th).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Pn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,nh=ce(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Pn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rc=ce(/^!?\[(label)\]\[(ref)\]/).replace("label",Pn).replace("ref",_i).getRegex(),nc=ce(/^!?\[(ref)\](?:\[\])?/).replace("ref",_i).getRegex(),ah=ce("reflink|nolink(?!\\()","g").replace("reflink",rc).replace("nolink",nc).getRegex(),Us=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Oi={_backpedal:Ir,anyPunctuation:Jd,autolink:eh,blockSkip:$d,br:Ql,code:Dd,del:Ir,delLDelim:Ir,delRDelim:Ir,emStrongLDelim:Bd,emStrongRDelimAst:Ud,emStrongRDelimUnd:Vd,escape:Rd,link:nh,nolink:nc,punctuation:_d,reflink:rc,reflinkSearch:ah,tag:rh,text:Nd,url:Ir},ih={...Oi,emStrongLDelim:Hd,emStrongRDelimAst:jd,emStrongRDelimUnd:Xd,link:ce(/^!?\[(label)\]\((.*?)\)/).replace("label",Pn).getRegex(),reflink:ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Pn).getRegex()},Ja={...Oi,emStrongRDelimAst:Wd,emStrongLDelim:qd,delLDelim:Kd,delRDelim:Qd,url:ce(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Us).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ce(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Us).getRegex()},sh={...Ja,br:ce(Ql).replace("{2,}","*").getRegex(),text:ce(Ja.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wn={normal:Li,gfm:Id,pedantic:zd},S0={normal:Oi,gfm:Ja,breaks:sh,pedantic:ih},oh={"&":"&","<":"<",">":">",'"':""","'":"'"},Ws=t=>oh[t];function Dt(t,e){if(e){if(Ye.escapeTest.test(t))return t.replace(Ye.escapeReplace,Ws)}else if(Ye.escapeTestNoEncode.test(t))return t.replace(Ye.escapeReplaceNoEncode,Ws);return t}function Gs(t){try{t=encodeURI(t).replace(Ye.percentDecode,"%")}catch{return null}return t}function js(t,e){let r=t.replace(Ye.findPipe,(i,s,o)=>{let c=!1,d=s;for(;--d>=0&&o[d]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Ye.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Ye.slashPipe,"|");return n}function tr(t,e,r){let n=t.length;if(n===0)return"";let a=0;for(;a<n&&t.charAt(n-a-1)===e;)a++;return t.slice(0,n-a)}function Vs(t){let e=t.split(`
|
|
4
4
|
`),r=e.length-1;for(;r>=0&&Ye.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as Ye,br as h,a_ as M,bz as Ze,b as $e,bt as nt,bp as k,bv as je}from"./DXyyWeag.js";import{bo as st,bs as et,a7 as L,ay as y,aD as e,bS as U,W as c,a5 as Pe,bA as De,bH as j,bl as _e,b_ as oe,bO as de,bn as tt,bf as Ve,bV as Ee,aA as v,c9 as w,aB as H,be as it,b$ as lt,bj as dt,cd as ct,ca as Xe,bk as ut}from"./DYhIMPy1.js";import{i as G}from"./RD9QY1Yc.js";import{Iy as Le,mT as pt,uB as ft}from"./D5ej8a-y.js";import{b8 as ht}from"./BFu_t_Z1.js";import{cn as vt}from"./D3QcPFoL.js";import{c as gt}from"./ChTqQfQN.js";import{i as Ue,t as He}from"./H2jLkRRS.js";import{w as _t}from"./DyvrH0mm.js";import{d as mt}from"./B0Z-1lwJ.js";import{F as Re,as as bt,at as kt,cQ as Je,aV as qe,bc as wt,ak as yt,aj as At,cN as Ge}from"./BTdkHPOB.js";import{k as K,w as Ft}from"./DT4bpJWb.js";import{n as Wt,u as Ne,v as xe,g as Te,j as Ct}from"./CjaOLL1c.js";import{s as xt}from"./Cuqq8bL5.js";import{f as It,ai as Pt,aX as Dt}from"./Bfr1QjPr.js";import"./DJkHth-B.js";import{c as Q}from"./CnVt0JNG.js";import{a as Mt,r as Et}from"./CZUe-5xr.js";import{M as Ot,t as Be}from"./4NMrKcis.js";import{l as Ke,o as St,n as Rt,R as Nt,m as Tt,k as Bt,g as zt,i as jt}from"./CX_KiszT.js";import{m as ze}from"./D6bHtnlF.js";var Vt=H('<img alt="" class="size-4"/>'),Xt=H('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Lt=H("<span> </span>"),Ut=H('<span data-menu-action-detail=""> </span>'),Ht=H('<span aria-hidden="true"><!></span>'),Qe=H("<!> <!> <!>",1),Jt=H('<div class="my-1 h-px bg-border" role="separator"></div>'),Me=H("<!> <!>",1),qt=H('<!> <p data-menu-action-note=""> </p>',1),Gt=H('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Kt=H('<p data-menu-action-note=""> </p>'),Qt=H('<div class="pl-4"><!> <!></div>'),Yt=H('<span class="sr-only"> </span>');function me(be,d){const ke=st();if(new.target)return Ye({component:me,...be});et(d,!0);const Ie=(p,r=Ve)=>{var O=L(),S=y(O);{var V=W=>{const x=w(()=>Mt(r().editor));var X=L(),m=y(X);{var f=s=>{var i=Vt();oe(()=>Ne(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=L(),b=y(i);Q(b,()=>e(x),(T,ae)=>{ae(T,{size:16})}),c(s,i)},N=s=>{{let i=w(()=>Et(r().editor.category));Re(s,{get icon(){return e(i)},size:16})}};M(m,s=>{r().editor.iconBase64?s(f):e(x)?s(o,1):s(N,-1)})}c(W,X)},R=W=>{var x=L(),X=y(x);xt(X,()=>r().iconSnippet),c(W,x)},q=W=>{{let x=w(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Re(W,{get icon(){return r().icon},get weight(){return J()},size:16,get class(){return e(x)}})}};M(S,W=>{r().editor?W(V):r().iconSnippet?W(R,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=Ve)=>{var O=Qe(),S=y(O);{var V=m=>{var f=Xt(),o=Pe(f),N=_e(o,!0);Te(o,(b,T)=>Be?.(b,T),()=>r().label);var s=U(o,2),i=_e(s,!0);De(f),oe(()=>{de(N,r().label),de(i,r().disabledReason)}),c(m,f)},R=m=>{var f=Lt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().label),oe(()=>{xe(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};M(S,m=>{r().disabledReason?m(V):m(R,-1)})}var q=U(S,2);{var W=m=>{var f=Ut(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().detail),oe(()=>{xe(f,1,`ml-4 min-w-0 truncate ${(r().detailTone==="danger"?"text-danger":ze)??""}`),de(o,r().detail)}),c(m,f)};M(q,m=>{r().detail&&m(W)})}var x=U(q,2);{var X=m=>{var f=Ht(),o=Pe(f);Pt(o,{children:(N,s)=>{it();var i=lt();oe(b=>de(i,b),[()=>Dt(r().shortcut)]),c(N,i)},$$slots:{default:!0}}),De(f),oe(()=>xe(f,1,Ct(E()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};M(x,m=>{r().shortcut&&m(X)})}c(p,O)};let we=h(d,"actions",7),E=h(d,"menu",7),J=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Ee(null);function Y(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return we()},set actions(p){we(p),v()},get menu(){return E()},set menu(p){E(p),v()},get iconWeight(){return J()},set iconWeight(p){J(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ze,$on:(p,r)=>$e(d,p,r)},se=L(),ie=y(se);return Wt(ie,17,we,p=>p.id,(p,r)=>{const O=i=>{Ie(i,()=>e(r))},S=w(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),V=w(()=>e(r).disabled||e(r).disabledReason!==void 0),R=w(()=>e(r).disabledReason?`${ke}-${e(r).id}-reason`:void 0);var q=Qe(),W=y(q);{var x=i=>{var b=L(),T=y(b);{var ae=a=>{var n=L(),g=y(n);Q(g,()=>Ke,(C,P)=>{P(C,{})}),c(a,n)},ue=a=>{var n=Jt();c(a,n)};M(T,a=>{E()?a(ae):a(ue,-1)})}c(i,b)};M(W,i=>{e(r).dividerBefore&&i(x)})}var X=U(W,2);{var m=i=>{var b=L(),T=y(b);{var ae=g=>{var C=L(),P=y(C);Q(P,()=>Tt,(I,D)=>{D(I,{children:(B,Z)=>{var $=Me(),pe=y($);{let te=w(()=>e(S)?O:void 0);Q(pe,()=>St,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=U(pe,2);{let te=w(()=>e(r).note?`${ke}-${e(r).id}-note`:void 0);Q(ee,()=>Rt,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=Me(),l=y(t);{var _=re=>{var Ae=Me(),Fe=y(Ae);{let Ce=w(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Q(Fe,()=>Nt,(ge,Se)=>{Se(ge,{get value(){return e(Ce)},get"aria-label"(){return e(r).label},children:(rt,$t)=>{{let at=w(()=>e(r).submenu.filter(ot=>ot.checked!==void 0));me(rt,{get actions(){return e(at)},selection:"single",get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var We=U(Fe,2);{let Ce=w(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(We,{get actions(){return e(Ce)},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})};M(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=U(l,2);{var Oe=re=>{var Ae=qt(),Fe=y(Ae);Q(Fe,()=>Ke,(ge,Se)=>{Se(ge,{})});var We=U(Fe,2),Ce=_e(We,!0);oe(()=>{Ne(We,"id",`${ke}-${e(r).id}-note`),xe(We,1,`type-caption px-2 py-1 ${ze}`),de(Ce,e(r).note)}),c(re,Ae)};M(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,C)},ue=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>Bt,(D,B)=>{B(D,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},a=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>zt,(D,B)=>{B(D,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},n=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0),D=w(()=>e(r).variant==="destructive");Q(P,()=>jt,(B,Z)=>{Z(B,{get leading(){return e(I)},get destructive(){return e(D)},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,C)};M(T,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})},o=i=>{var b=Me(),T=y(b);{let a=w(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=w(()=>e(r).submenu?e(F)===e(r).id:void 0);It(T,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?j(F,e(F)===e(r).id?null:e(r).id,!0):Y(e(r)),children:(g,C)=>{var P=Gt(),I=y(P),D=Pe(I);Ie(D,()=>e(r)),De(I);var B=U(I,2);ne(B,()=>e(r));var Z=U(B,2);{var $=ee=>{{let te=w(()=>e(F)===e(r).id?bt:kt);Re(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=L(),fe=y(te);{let he=w(()=>e(r).checked?"checked":"empty");Q(fe,()=>Ot,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};M(Z,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=U(T,2);{var ue=a=>{var n=Qt(),g=Pe(n);me(g,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}});var C=U(g,2);{var P=I=>{var D=Kt(),B=_e(D,!0);oe(()=>{xe(D,1,`type-caption px-2 py-1 ${ze}`),de(B,e(r).note)}),c(I,D)};M(C,I=>{e(r).note&&I(P)})}De(n),c(a,n)};M(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};M(X,i=>{E()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var N=U(X,2);{var s=i=>{var b=Yt(),T=_e(b,!0);oe(()=>{Ne(b,"id",e(R)),de(T,e(r).disabledReason)}),c(i,b)};M(N,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),tt(ce)}function Zt(be,d){if(new.target)return Ye({component:Zt,...be});et(d,!0);const ke=()=>je(T,"$installedEditors$",ne),Ie=()=>je(ue,"$isWorkspaceHostLocal$",ne),[ne,we]=nt();let E=h(d,"layout",7,"list"),J=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Y=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),S=h(d,"showPathCopy",7,!0),V=h(d,"showFileNameCopy",7,!1),R=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),x=h(d,"isWorkspaceRoot",7,!1),X=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=gt("WorkspaceActionsMenu");let N=!1;dt(()=>{N=!0});function s(){N||p()?.()}const i=_t("externalEditors"),b=ct(A());Xe(()=>{b.set(A())});const T=ht(b),ae=w(ke),ue=vt(b);let a=Ee(""),n=Ee(""),g=Ee(!1);ut(()=>{Le.dispatch(pt())}),Xe(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");x()?j(a,le,!0):Ue(u())?j(a,u().replace(/\\/g,"/"),!0):j(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),j(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else j(a,u()),j(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else j(a,u()),j(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{j(a,u()),j(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(j(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function C(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!x()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Le.dispatch(ft(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function D(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await C();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:k.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||k.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openOtherFailed_error())}}async function Z(){if(e(a))try{await navigator.clipboard.writeText(He(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Ue(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(He(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Y()&&(Y()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){j(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(k.ui_workspaceActions_deletedFile_label({name:t}),Ft({duration:15e3,action:{label:k.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),mt("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(k.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(k.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||k.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(k.ui_workspaceActions_deleteFileFailed_error())}finally{j(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=w(()=>{const t=[];R()&&(i&&Ie()&&t.push({id:"open-in",label:k.ui_openCombo_openInApp_tooltip(),icon:Je,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:k.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{D(_)}})),{id:"choose-app",label:k.ui_workspaceActions_chooseApp_label(),icon:Je,onClick:()=>{B()}}]}),S()&&t.push({id:"copy-absolute-path",label:k.ui_workspaceActions_copyAbsolutePath_label(),icon:qe,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Z()}}),S()&&!x()&&t.push({id:"copy-relative-path",label:k.ui_workspaceActions_copyRelativePath_label(),icon:qe,disabled:!u(),onClick:()=>{$()}}),V()&&!F()&&t.push({id:"copy-file-name",label:k.ui_workspaceActions_copyFileName_label(),icon:wt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(X())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?k.ui_workspaceActions_unarchiveSpace_label():k.ui_workspaceActions_archiveSpace_label(),icon:ie()?yt:At,dividerBefore:t.length>0,onClick:fe}),r()&&Y()&&t.push({id:"delete-workspace",label:k.ui_workspaceActions_deleteSpace_label(),icon:Ge,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:k.ui_workspaceActions_deleteFile_label(),icon:Ge,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return E()},set layout(t="list"){E(t),v()},get iconWeight(){return J()},set iconWeight(t){J(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Y()},set onDelete(t=void 0){Y(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return S()},set showPathCopy(t=!0){S(t),v()},get showFileNameCopy(){return V()},set showFileNameCopy(t=!1){V(t),v()},get showFileActions(){return R()},set showFileActions(t=!0){R(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return x()},set isWorkspaceRoot(t=!1){x(t),v()},get additionalActions(){return X()},set additionalActions(t=[]){X(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ze,$on:(t,l)=>$e(d,t,l)};{let t=w(()=>E()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return J()}})}var ye=tt(ve);return we(),ye}export{Zt as default};
|
|
1
|
+
import{t as Ye,br as h,a_ as M,bz as Ze,b as $e,bt as nt,bp as k,bv as je}from"./DXyyWeag.js";import{bo as st,bs as et,a7 as L,ay as y,aD as e,bS as U,W as c,a5 as Pe,bA as De,bH as j,bl as _e,b_ as oe,bO as de,bn as tt,bf as Ve,bV as Ee,aA as v,c9 as w,aB as H,be as it,b$ as lt,bj as dt,cd as ct,ca as Xe,bk as ut}from"./DYhIMPy1.js";import{i as G}from"./RD9QY1Yc.js";import{Iy as Le,mT as pt,uB as ft}from"./D5ej8a-y.js";import{b8 as ht}from"./P4gMcZpU.js";import{cn as vt}from"./D3QcPFoL.js";import{c as gt}from"./ChTqQfQN.js";import{i as Ue,t as He}from"./H2jLkRRS.js";import{w as _t}from"./DyvrH0mm.js";import{d as mt}from"./B0Z-1lwJ.js";import{F as Re,as as bt,at as kt,cQ as Je,aV as qe,bc as wt,ak as yt,aj as At,cN as Ge}from"./BTdkHPOB.js";import{k as K,w as Ft}from"./DT4bpJWb.js";import{n as Wt,u as Ne,v as xe,g as Te,j as Ct}from"./CjaOLL1c.js";import{s as xt}from"./Cuqq8bL5.js";import{f as It,ai as Pt,aX as Dt}from"./Bfr1QjPr.js";import"./DJkHth-B.js";import{c as Q}from"./CnVt0JNG.js";import{a as Mt,r as Et}from"./BqMNzHV7.js";import{M as Ot,t as Be}from"./4NMrKcis.js";import{l as Ke,o as St,n as Rt,R as Nt,m as Tt,k as Bt,g as zt,i as jt}from"./CX_KiszT.js";import{m as ze}from"./D6bHtnlF.js";var Vt=H('<img alt="" class="size-4"/>'),Xt=H('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Lt=H("<span> </span>"),Ut=H('<span data-menu-action-detail=""> </span>'),Ht=H('<span aria-hidden="true"><!></span>'),Qe=H("<!> <!> <!>",1),Jt=H('<div class="my-1 h-px bg-border" role="separator"></div>'),Me=H("<!> <!>",1),qt=H('<!> <p data-menu-action-note=""> </p>',1),Gt=H('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Kt=H('<p data-menu-action-note=""> </p>'),Qt=H('<div class="pl-4"><!> <!></div>'),Yt=H('<span class="sr-only"> </span>');function me(be,d){const ke=st();if(new.target)return Ye({component:me,...be});et(d,!0);const Ie=(p,r=Ve)=>{var O=L(),S=y(O);{var V=W=>{const x=w(()=>Mt(r().editor));var X=L(),m=y(X);{var f=s=>{var i=Vt();oe(()=>Ne(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=L(),b=y(i);Q(b,()=>e(x),(T,ae)=>{ae(T,{size:16})}),c(s,i)},N=s=>{{let i=w(()=>Et(r().editor.category));Re(s,{get icon(){return e(i)},size:16})}};M(m,s=>{r().editor.iconBase64?s(f):e(x)?s(o,1):s(N,-1)})}c(W,X)},R=W=>{var x=L(),X=y(x);xt(X,()=>r().iconSnippet),c(W,x)},q=W=>{{let x=w(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Re(W,{get icon(){return r().icon},get weight(){return J()},size:16,get class(){return e(x)}})}};M(S,W=>{r().editor?W(V):r().iconSnippet?W(R,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=Ve)=>{var O=Qe(),S=y(O);{var V=m=>{var f=Xt(),o=Pe(f),N=_e(o,!0);Te(o,(b,T)=>Be?.(b,T),()=>r().label);var s=U(o,2),i=_e(s,!0);De(f),oe(()=>{de(N,r().label),de(i,r().disabledReason)}),c(m,f)},R=m=>{var f=Lt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().label),oe(()=>{xe(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};M(S,m=>{r().disabledReason?m(V):m(R,-1)})}var q=U(S,2);{var W=m=>{var f=Ut(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().detail),oe(()=>{xe(f,1,`ml-4 min-w-0 truncate ${(r().detailTone==="danger"?"text-danger":ze)??""}`),de(o,r().detail)}),c(m,f)};M(q,m=>{r().detail&&m(W)})}var x=U(q,2);{var X=m=>{var f=Ht(),o=Pe(f);Pt(o,{children:(N,s)=>{it();var i=lt();oe(b=>de(i,b),[()=>Dt(r().shortcut)]),c(N,i)},$$slots:{default:!0}}),De(f),oe(()=>xe(f,1,Ct(E()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};M(x,m=>{r().shortcut&&m(X)})}c(p,O)};let we=h(d,"actions",7),E=h(d,"menu",7),J=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Ee(null);function Y(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return we()},set actions(p){we(p),v()},get menu(){return E()},set menu(p){E(p),v()},get iconWeight(){return J()},set iconWeight(p){J(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ze,$on:(p,r)=>$e(d,p,r)},se=L(),ie=y(se);return Wt(ie,17,we,p=>p.id,(p,r)=>{const O=i=>{Ie(i,()=>e(r))},S=w(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),V=w(()=>e(r).disabled||e(r).disabledReason!==void 0),R=w(()=>e(r).disabledReason?`${ke}-${e(r).id}-reason`:void 0);var q=Qe(),W=y(q);{var x=i=>{var b=L(),T=y(b);{var ae=a=>{var n=L(),g=y(n);Q(g,()=>Ke,(C,P)=>{P(C,{})}),c(a,n)},ue=a=>{var n=Jt();c(a,n)};M(T,a=>{E()?a(ae):a(ue,-1)})}c(i,b)};M(W,i=>{e(r).dividerBefore&&i(x)})}var X=U(W,2);{var m=i=>{var b=L(),T=y(b);{var ae=g=>{var C=L(),P=y(C);Q(P,()=>Tt,(I,D)=>{D(I,{children:(B,Z)=>{var $=Me(),pe=y($);{let te=w(()=>e(S)?O:void 0);Q(pe,()=>St,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=U(pe,2);{let te=w(()=>e(r).note?`${ke}-${e(r).id}-note`:void 0);Q(ee,()=>Rt,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=Me(),l=y(t);{var _=re=>{var Ae=Me(),Fe=y(Ae);{let Ce=w(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Q(Fe,()=>Nt,(ge,Se)=>{Se(ge,{get value(){return e(Ce)},get"aria-label"(){return e(r).label},children:(rt,$t)=>{{let at=w(()=>e(r).submenu.filter(ot=>ot.checked!==void 0));me(rt,{get actions(){return e(at)},selection:"single",get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var We=U(Fe,2);{let Ce=w(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(We,{get actions(){return e(Ce)},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})};M(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=U(l,2);{var Oe=re=>{var Ae=qt(),Fe=y(Ae);Q(Fe,()=>Ke,(ge,Se)=>{Se(ge,{})});var We=U(Fe,2),Ce=_e(We,!0);oe(()=>{Ne(We,"id",`${ke}-${e(r).id}-note`),xe(We,1,`type-caption px-2 py-1 ${ze}`),de(Ce,e(r).note)}),c(re,Ae)};M(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,C)},ue=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>Bt,(D,B)=>{B(D,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},a=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>zt,(D,B)=>{B(D,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},n=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0),D=w(()=>e(r).variant==="destructive");Q(P,()=>jt,(B,Z)=>{Z(B,{get leading(){return e(I)},get destructive(){return e(D)},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,C)};M(T,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})},o=i=>{var b=Me(),T=y(b);{let a=w(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=w(()=>e(r).submenu?e(F)===e(r).id:void 0);It(T,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?j(F,e(F)===e(r).id?null:e(r).id,!0):Y(e(r)),children:(g,C)=>{var P=Gt(),I=y(P),D=Pe(I);Ie(D,()=>e(r)),De(I);var B=U(I,2);ne(B,()=>e(r));var Z=U(B,2);{var $=ee=>{{let te=w(()=>e(F)===e(r).id?bt:kt);Re(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=L(),fe=y(te);{let he=w(()=>e(r).checked?"checked":"empty");Q(fe,()=>Ot,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};M(Z,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=U(T,2);{var ue=a=>{var n=Qt(),g=Pe(n);me(g,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}});var C=U(g,2);{var P=I=>{var D=Kt(),B=_e(D,!0);oe(()=>{xe(D,1,`type-caption px-2 py-1 ${ze}`),de(B,e(r).note)}),c(I,D)};M(C,I=>{e(r).note&&I(P)})}De(n),c(a,n)};M(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};M(X,i=>{E()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var N=U(X,2);{var s=i=>{var b=Yt(),T=_e(b,!0);oe(()=>{Ne(b,"id",e(R)),de(T,e(r).disabledReason)}),c(i,b)};M(N,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),tt(ce)}function Zt(be,d){if(new.target)return Ye({component:Zt,...be});et(d,!0);const ke=()=>je(T,"$installedEditors$",ne),Ie=()=>je(ue,"$isWorkspaceHostLocal$",ne),[ne,we]=nt();let E=h(d,"layout",7,"list"),J=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Y=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),S=h(d,"showPathCopy",7,!0),V=h(d,"showFileNameCopy",7,!1),R=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),x=h(d,"isWorkspaceRoot",7,!1),X=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=gt("WorkspaceActionsMenu");let N=!1;dt(()=>{N=!0});function s(){N||p()?.()}const i=_t("externalEditors"),b=ct(A());Xe(()=>{b.set(A())});const T=ht(b),ae=w(ke),ue=vt(b);let a=Ee(""),n=Ee(""),g=Ee(!1);ut(()=>{Le.dispatch(pt())}),Xe(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");x()?j(a,le,!0):Ue(u())?j(a,u().replace(/\\/g,"/"),!0):j(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),j(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else j(a,u()),j(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else j(a,u()),j(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{j(a,u()),j(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(j(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function C(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!x()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Le.dispatch(ft(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function D(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await C();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:k.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||k.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openOtherFailed_error())}}async function Z(){if(e(a))try{await navigator.clipboard.writeText(He(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Ue(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(He(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Y()&&(Y()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){j(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(k.ui_workspaceActions_deletedFile_label({name:t}),Ft({duration:15e3,action:{label:k.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),mt("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(k.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(k.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||k.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(k.ui_workspaceActions_deleteFileFailed_error())}finally{j(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=w(()=>{const t=[];R()&&(i&&Ie()&&t.push({id:"open-in",label:k.ui_openCombo_openInApp_tooltip(),icon:Je,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:k.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{D(_)}})),{id:"choose-app",label:k.ui_workspaceActions_chooseApp_label(),icon:Je,onClick:()=>{B()}}]}),S()&&t.push({id:"copy-absolute-path",label:k.ui_workspaceActions_copyAbsolutePath_label(),icon:qe,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Z()}}),S()&&!x()&&t.push({id:"copy-relative-path",label:k.ui_workspaceActions_copyRelativePath_label(),icon:qe,disabled:!u(),onClick:()=>{$()}}),V()&&!F()&&t.push({id:"copy-file-name",label:k.ui_workspaceActions_copyFileName_label(),icon:wt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(X())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?k.ui_workspaceActions_unarchiveSpace_label():k.ui_workspaceActions_archiveSpace_label(),icon:ie()?yt:At,dividerBefore:t.length>0,onClick:fe}),r()&&Y()&&t.push({id:"delete-workspace",label:k.ui_workspaceActions_deleteSpace_label(),icon:Ge,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:k.ui_workspaceActions_deleteFile_label(),icon:Ge,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return E()},set layout(t="list"){E(t),v()},get iconWeight(){return J()},set iconWeight(t){J(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Y()},set onDelete(t=void 0){Y(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return S()},set showPathCopy(t=!0){S(t),v()},get showFileNameCopy(){return V()},set showFileNameCopy(t=!1){V(t),v()},get showFileActions(){return R()},set showFileActions(t=!0){R(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return x()},set isWorkspaceRoot(t=!1){x(t),v()},get additionalActions(){return X()},set additionalActions(t=[]){X(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ze,$on:(t,l)=>$e(d,t,l)};{let t=w(()=>E()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return J()}})}var ye=tt(ve);return we(),ye}export{Zt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as qa,s as fa}from"./
|
|
1
|
+
import{k as qa,s as fa}from"./DQR2WwrF.js";import{s as va,n as Ct,u as q,w as en,v as me,I as Wa,X as Ka,i as Ga,g as Nn}from"./CjaOLL1c.js";import{Z as Qa,cT as Ya,A as Va,aY as xn,bX as Xa,v as Ja}from"./olwByklL.js";import{bp as c,t as Pt,br as w,a_ as M,bz as Tt,b as Rt,bt as qn,bv as Re,bu as Za}from"./DXyyWeag.js";import{bo as Wn,bs as Ot,a5 as O,bl as U,bS as b,bA as $,b_ as x,aD as e,W as l,ay as H,a7 as Oe,bO as L,bn as Lt,c9 as u,aA as k,aB as _,ca as Fe,bH as h,b$ as Kt,bV as le,cd as Mt,br as ma,be as un,c5 as er,bi as En,bj as tr,bf as hn,am as ta,ax as na,ai as nr,aj as ar,c0 as rr}from"./DYhIMPy1.js";import{s as _a}from"./Cuqq8bL5.js";import{e as sr}from"./B5m4HK_m.js";import{t as Wt,k as or,a as ir,I as ha}from"./BboIV5H5.js";import{r as lr,o as dr,A as aa,L as ur}from"./yUw81UAc.js";import{S as bn,t as Dn}from"./4NMrKcis.js";import{R as ra}from"./DT4bpJWb.js";import{I as ba}from"./ChOlbK8y.js";import"./Co9PgWQA.js";import{aC as wn,cz as cr,al as pr,aA as gr,ct as fr,cu as vr,ah as mr,aj as _r,aq as hr,aw as br,l as wr,G as kr,dS as xr,M as yr,ck as $r,bS as Ar}from"./D3QcPFoL.js";import{Iy as J,cd as Fn,cb as wa,ce as kn,qT as Sr,C$ as Ir,fF as ka,D4 as Cr,bs as Pr,zg as Tr,mq as sa,tN as Rr,ch as Or,ul as oa,nk as Lr,CL as Nr,D2 as Er,b$ as Dr}from"./D5ej8a-y.js";import{K as Mr,A as zr,at as Fr,ao as Br,T as jr}from"./BrOVLepx.js";import{y as Hr}from"./DyvrH0mm.js";import{l as Ur}from"./BP-Q7b0i.js";import{f as ia}from"./Cafxy2gS.js";import{h as qr,g as Wr}from"./BVwzqysu.js";import"./BKnW-cqy.js";import{ax as Kr,am as Gr,ap as Qr,f as Mn,a5 as Yr,bc as la}from"./Bfr1QjPr.js";import"./Dwmx7Nbz.js";import{c as Vr,o as Xr,n as Jr,m as Zr,E as es}from"./CX_KiszT.js";import{c as Bn,b as da,d as jn,a as Hn,A as xa,j as ts,l as ns,P as as}from"./Bd-swEiF.js";import{c as de}from"./CnVt0JNG.js";import{F as rs,j as ss,bx as os,i as is,bK as ls}from"./P4gMcZpU.js";import{D as ds,b as us}from"./2YGlULfT.js";import{T as cs}from"./BqxV3q0f.js";import"./C5oPUaEZ.js";import{cg as ya,cK as ps,cJ as gs,bN as fs,x as vs,F as yn,b1 as ms,aq as _s,aG as hs,aC as bs,cO as ws,ba as ks,aw as xs,aH as ys,aZ as $s,ad as ua,a4 as As,c1 as Ss,ac as Is,cA as Cs,aj as Ps,cN as Ts,az as Rs}from"./BTdkHPOB.js";import{b as Os}from"./BaIAhI85.js";import"./D6bHtnlF.js";import"./B0gQeWRk.js";import{f as Ls}from"./B8xn49s1.js";const Ns=80,Es=10,Ds=new Qa(Ya,{renderer:{html({text:a}){return Va(a)},image({tokens:a}){return this.parser.parseInline(a)}}});function Kn(a){const n=document.createElement("template");n.innerHTML=Ds.parseInline(a,{async:!1});for(const o of n.content.querySelectorAll("br"))o.replaceWith(" ");return(n.content.textContent??"").replace(/\s+/g," ").trim()}function zt(a){return a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`+([^`]*?)`+/g,"$1").replace(/<[^>]+>/g,"").replace(/\\([\\`*_[\]{}()#+\-.!>])/g,"$1").replace(/[*~]/g,"").replace(/(^|[^A-Za-z0-9])_+/g,"$1").replace(/_+([^A-Za-z0-9]|$)/g,"$1").replace(/\s+/g," ").trim()}function Un(a,n){return a.slice(n).replace(/^(?:[ \t]*(?:\r\n|\n|\r))+/,"")}function Sn(a,n){return!n||n.length>Ns||n.split(/\s+/).length>Es||/[.!?;]$/.test(n)?!1:!/^[ \t]*(?:[-+*][ \t]+|\d+[.)][ \t]+|>|```|~~~|\|)/.test(a)}function Ui(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const i=zt(o[1]);return Sn(o[0],i)?i:null}function Gn(a,n=!1,o=!0){const i=a.match(/^(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",r=a.slice(i.length).match(/^\*\*([^\r\n]+)\*\*[ \t]*(?:(?:\r\n|\n|\r)|$)/);if(!r)return null;if(n){const m=r[1],f=m.match(/\\+$/)?.[0].length??0;if(m!==m.trim()||m.includes("**")||m.startsWith("*")||m.endsWith("*")||f%2!==0)return null}const p=zt(r[1]);return Sn(r[0],p)?{title:n&&o?Kn(r[1]):p,body:Un(a,i.length+r[0].length)}:null}function ca(a){const n=[];let o=a;for(;o.trim();){const i=Qn(o,!0),d=i.heading?{body:i.body}:Gn(o,!0,!1);if(!d)return null;n.push(o.slice(0,o.length-d.body.length)),o=d.body}return n.length?n:null}function qi(a){const n=[];let o=a;for(;o.trim();){const i=Qn(o,!0,Kn),d=i.heading?{title:i.heading,body:i.body}:Gn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function Wi(a){const n=zs(a),o=[];let i=a;for(n.heading&&(o.push({title:n.heading,body:""}),i=n.body);i;){const d=Gn(i);if(!d||d.body.length>=i.length)break;o.push({title:d.title,body:""}),i=d.body}if(o.length===0){const d=a.trim(),r=zt(d);return!d.includes(`
|
|
2
2
|
`)&&Sn(d,r)?[{title:r,body:""}]:d?[{title:null,body:d}]:[]}return o[o.length-1].body=i.trim(),o}function Ms(a){const n=a.replace(/^ {0,3}/,"");return!/^(?:\s|>|`{3}|~{3}|(?:[-+*]|\d+[.)])(?:[ \t]|$)|#{1,6}(?:[ \t]|$)|<|\[[^\]]*\]:)/.test(n)&&!/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})$/.test(n)}function Qn(a,n=!1,o=zt){const i=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",d=a.slice(i.length);if(n&&/^(?: {4}| {0,3}\t)/.test(d))return{heading:null,body:a};const r=d.match(/^[ \t]{0,3}#{1,6}[ \t]+([^\r\n]*?)(?:[ \t]+#+)?[ \t]*(?:\r\n|\n|\r|$)/);if(r&&zt(r[1]))return{heading:o(r[1]),body:Un(a,i.length+r[0].length)};const p=d.match(/^([^\r\n]+)(?:\r\n|\n|\r)([ \t]{0,3})(?:=+|-+)[ \t]*(?:\r\n|\n|\r|$)/);return p&&(!n||Ms(p[1])&&!p[2].includes(" "))&&zt(p[1])?{heading:o(p[1]),body:Un(a,i.length+p[0].length)}:{heading:null,body:a}}function zs(a,{preserveInlineText:n=!1}={}){const o=n?Kn:zt,i=Qn(a,!1,o);if(i.heading)return i;const d=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",p=a.slice(d.length).match(/^([^\r\n]+)(?:\r\n|\n|\r)(?:[ \t]*(?:\r\n|\n|\r))+/);if(p){const m=zt(p[1]),f=a.slice(d.length+p[0].length);if(f.trim()&&Sn(p[1],m))return{heading:o(p[1]),body:f}}return{heading:null,body:a}}const Gt="[--operational-row-inline-padding:var(--chat-operational-row-inline-padding,0.5rem)] [--operational-leading-slot-size:1.25rem] [--operational-leading-half-slot-size:0.625rem] [--operational-leading-gap:var(--chat-operational-leading-gap,0.5rem)]",Ki="type-body font-family-child font-normal text-muted-foreground",Gi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,Qi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1.5`,Yi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1`,Vi=`${Gt} relative min-w-0 max-w-full`,Xi=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,Ji=`${Gt} operational-group-child-row ml-2 min-w-0 w-[calc(100%-0.5rem)] max-w-[calc(100%-0.5rem)]`,Zi="pt-6",el="text-muted-foreground",tl="text-muted-foreground",$a="font-normal text-muted-foreground",nl="tool-call-container group relative block w-full min-w-0 max-w-full overflow-hidden type-body font-family-child font-normal text-muted-foreground",al="h-[16px]! w-[16px]! shrink-0",rl=`${Gt} relative grid h-7 w-full min-w-0 max-w-full grid-cols-[var(--operational-leading-slot-size)_minmax(0,1fr)_auto] items-center gap-[var(--operational-leading-gap)] overflow-hidden rounded-md px-[var(--operational-row-inline-padding)] type-body transition-colors duration-[var(--motion-fast)] motion-reduce:transition-none`,sl=`a11y-ignore pointer-events-none flex size-[var(--operational-leading-slot-size)] min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center [&_svg]:size-[16px]! ${$a}`,ol=`type-body block min-w-0 max-w-full truncate overflow-hidden text-ellipsis whitespace-nowrap border-0 bg-transparent p-0 text-left ${$a}`,il="type-body flex min-w-0 shrink-0 items-center gap-1 whitespace-nowrap",ll="h-[16px]! w-[16px]! shrink-0 opacity-60 transition-transform duration-[var(--motion-fast)] motion-reduce:transition-none";function dl(a){return qa(a,{axis:"y",duration:va()?0:150})}function cn(a){return a.type==="thinking"||a.type==="tool_use"||a.type==="content_group"}function ul(a){const n=a?.[0];return!n||cn(n)?"":"pt-4"}function cl(a,n,o=()=>!0){const i=a[n];if(!i||!o(i)||!cn(i))return!1;let d=n-1;for(;d>=0&&!o(a[d]);)d-=1;return d>=0&&cn(a[d])}function pl(a,n,o=()=>!0,i=!1){const d=a[n];if(!d||!o(d))return"";let r=n-1;for(;r>=0&&!o(a[r]);)r-=1;if(r<0)return"";const p=a[r];if(p.type==="thinking"&&d.type==="thinking")return i||ca(p.text??p.content??"")!==null&&ca(d.text??d.content??"")!==null?"":"pt-14";const m=cn(p),f=cn(d);return m&&f?"":p.type==="thinking"&&!f?"pt-6":m||f?"pt-4":"pt-1"}const gl="shrink-0 whitespace-nowrap text-ui text-subtle focus-visible:outline-none focus-visible:text-foreground";function Fs(a){if(a?.status==="halted")return c.agent_node_halted_label();if(a?.status==="resuming")return c.agent_node_resuming_label();if(a?.placement?.target==="remote"||Hr(a?.placement?.target)){if(a.placementError)return c.remoteAgent_status_failed();if(a.cloudStart)return c.remoteAgent_status_starting();if(a.effectiveIsolation==="pending")return a.setup?.state==="pending"?c.remoteAgent_status_preparingCheckout():a.setup?.state==="running"?c.remoteAgent_status_runningSetup():c.remoteAgent_status_starting()}if(a?.placement&&a.effectiveIsolation==="pending")return c.agent_node_provisioning_label()}var Bs=_('<span class="owner-fill block h-full svelte-sxf8s9"></span>'),js=_('<span class="shrink-0 text-xs text-muted-foreground"> </span>'),Hs=_('<span class="flex items-center gap-2"><span class="group-key size-1.5 shrink-0 rounded-full svelte-sxf8s9"></span> <span class="min-w-0 flex-1"> </span> <!> <span> </span></span>'),Us=_('<dd class="col-span-2 pl-[1.125rem] text-xs text-muted-foreground wrap-anywhere"> </dd>'),qs=_(`<div class="grid grid-cols-[1fr_auto] items-baseline gap-x-3 py-0.5 text-sm"><dt class="relative min-w-0 pl-[1.125rem] wrap-anywhere before:absolute before:top-2 before:left-0 before:size-1 before:rounded-full before:bg-muted-foreground before:content-['']"> </dt> <dd> </dd> <!></div>`),Ws=_('<dl class="ml-3.5 text-foreground"></dl>'),zn=_("<!> <!>",1),Ks=_('<span class="flex items-center gap-2"><span class="min-w-0 flex-1"> </span> <span class="shrink-0 tabular-nums text-muted-foreground"> </span></span>'),Gs=_('<div class="min-w-0"><dt class="truncate text-sm text-foreground"> </dt> <dd class="text-xs text-muted-foreground wrap-anywhere"> </dd></div>'),Qs=_('<dl class="ml-3.5 flex flex-col gap-2"></dl>'),Ys=_('<section class="min-w-0" data-testid="prompt-breakdown"><div class="mb-3 flex items-baseline justify-between gap-3"><h3 class="text-sm font-medium"> </h3> <span class="shrink-0 text-sm tabular-nums text-muted-foreground"> </span></div> <div class="owner-strip mb-2 flex h-1.5 w-full overflow-hidden svelte-sxf8s9" role="img"></div> <!></section>');function Aa(a,n){const o=Wn();if(new.target)return Pt({component:Aa,...a});Ot(n,!0);let i=w(n,"breakdown",7);const d="type-body font-normal text-foreground data-[state=open]:font-normal";function r(T){return or(T,{maximumFractionDigits:T<1e4?1:0})}function p(T){return T==="native"?c.agent_contextBreakdown_owner_native_label():T==="intent"?c.agent_contextBreakdown_owner_intent_label():c.agent_contextBreakdown_owner_user_label()}const m=u(()=>i().owners.map(T=>c.agent_contextBreakdown_ownerShare_label({owner:p(T.owner),tokens:r(T.estTokens)})).join(", "));var f={get breakdown(){return i()},set breakdown(T){i(T),k()},$set:Tt,$on:(T,v)=>Rt(n,T,v)},S=Ys(),y=O(S),g=O(y),E=U(g,!0),z=b(g,2),Ce=U(z,!0);$(y);var D=b(y,2);Ct(D,21,()=>i().owners,T=>T.owner,(T,v)=>{var ve=Bs();let ue;x(()=>{q(ve,"data-owner",e(v).owner),ue=en(ve,"",ue,{"flex-grow":e(v).share})}),l(T,ve)}),$(D);var P=b(D,2);return de(P,()=>xa,(T,v)=>{v(T,{type:"multiple",children:(ve,ue)=>{var R=zn(),_e=H(R);Ct(_e,17,()=>i().groups,pe=>pe.kind,(pe,Q)=>{var W=Oe(),ne=H(W);de(ne,()=>Bn,(ge,ze)=>{ze(ge,{get value(){return e(Q).kind},get"data-prompt-group"(){return e(Q).kind},children:(ot,G)=>{var I=zn(),ae=H(I);de(ae,()=>da,(he,N)=>{N(he,{level:4,children:(Le,X)=>{var K=Oe(),Z=H(K);de(Z,()=>jn,(Y,oe)=>{oe(Y,{inset:!1,class:d,children:(ee,Ne)=>{var be=Hs(),je=O(be),et=b(je,2),ut=U(et,!0),tt=b(et,2);{var at=ct=>{var Nt=js(),yt=U(Nt,!0);x(V=>L(yt,V),[()=>c.agent_contextBreakdown_notCounted_label()]),l(ct,Nt)};M(tt,ct=>{e(Q).kind==="native"&&ct(at)})}var Ee=b(tt,2),Qt=U(Ee,!0);$(be),x((ct,Nt)=>{q(je,"data-kind",e(Q).kind),L(ut,ct),me(Ee,1,`shrink-0 tabular-nums ${e(Q).kind==="native"?"text-muted-foreground":""}`),L(Qt,Nt)},[()=>p(e(Q).kind),()=>r(e(Q).estTokens)]),l(ee,be)},$$slots:{default:!0}})}),l(Le,K)},$$slots:{default:!0}})});var Be=b(ae,2);de(Be,()=>Hn,(he,N)=>{N(he,{inset:!1,children:(Le,X)=>{var K=Ws();Ct(K,21,()=>e(Q).rows,Z=>Z.key,(Z,Y)=>{var oe=qs(),ee=O(oe),Ne=U(ee,!0),be=b(ee,2),je=U(be,!0),et=b(be,2);{var ut=tt=>{var at=Us(),Ee=U(at,!0);x(()=>L(Ee,e(Y).hint)),l(tt,at)};M(et,tt=>{e(Y).hint&&tt(ut)})}$(oe),x(tt=>{L(Ne,e(Y).label),me(be,1,`tabular-nums ${e(Y).counted?"":"text-muted-foreground"}`),L(je,tt)},[()=>r(e(Y).estTokens)]),l(Z,oe)}),$(K),l(Le,K)},$$slots:{default:!0}})}),l(ot,I)},$$slots:{default:!0}})}),l(pe,W)});var ce=b(_e,2);{var xe=pe=>{var Q=Oe(),W=H(Q);de(W,()=>Bn,(ne,ge)=>{ge(ne,{value:"hidden-skills",class:"mt-1",children:(ze,ot)=>{var G=zn(),I=H(G);de(I,()=>da,(Be,he)=>{he(Be,{level:4,children:(N,Le)=>{var X=Oe(),K=H(X);de(K,()=>jn,(Z,Y)=>{Y(Z,{inset:!1,class:d,children:(oe,ee)=>{var Ne=Ks(),be=O(Ne),je=U(be,!0),et=b(be,2),ut=U(et,!0);$(Ne),x((tt,at)=>{L(je,tt),L(ut,at)},[()=>c.agent_contextBreakdown_hiddenSkills_title(),()=>Wt(i().hiddenSkills.length)]),l(oe,Ne)},$$slots:{default:!0}})}),l(N,X)},$$slots:{default:!0}})});var ae=b(I,2);de(ae,()=>Hn,(Be,he)=>{he(Be,{inset:!1,children:(N,Le)=>{var X=Qs();Ct(X,21,()=>i().hiddenSkills,K=>K.name,(K,Z)=>{var Y=Gs(),oe=O(Y),ee=U(oe,!0),Ne=b(oe,2),be=U(Ne,!0);$(Y),x(je=>{L(ee,e(Z).name),L(be,je)},[()=>[e(Z).detail,e(Z).fix].filter(Boolean).join(" · ")]),l(K,Y)}),$(X),l(N,X)},$$slots:{default:!0}})}),l(ze,G)},$$slots:{default:!0}})}),l(pe,Q)};M(ce,pe=>{i().hiddenSkills.length>0&&pe(xe)})}l(ve,R)},$$slots:{default:!0}})}),$(S),x((T,v)=>{q(S,"aria-labelledby",`${o}-title`),q(g,"id",`${o}-title`),L(E,T),L(Ce,v),q(D,"aria-label",e(m))},[()=>c.agent_contextBreakdown_title(),()=>c.agent_contextBreakdown_tokens_label({tokens:r(i().estTokens)})]),l(a,S),Lt(f)}const Vs=["intent","user"],Xs=["systemPrompt","toolDescription","provider"],Js=["native","user","intent"],$n=a=>typeof a=="object"&&a!==null&&!Array.isArray(a),An=a=>typeof a=="number"&&Number.isFinite(a)&&a>=0,Zs=a=>a==="intent"||a==="user";function eo(a,n){if(!$n(a))return null;const{id:o,label:i,owner:d,location:r,chars:p,estTokens:m,controlHint:f}=a;if(typeof o!="string"||typeof i!="string"||!Zs(d)||typeof r!="string"||!Xs.includes(r)||!An(p)||!An(m))return null;const S=$n(f)&&typeof f.text=="string"&&f.text;return{key:`${n}:${o}`,id:o,label:i,owner:d,chars:p,estTokens:m,counted:r!=="provider",...S?{hint:S}:{}}}function to(a){if(!$n(a))return null;const{name:n,reason:o,detail:i,fix:d}=a;return[n,o,i,d].some(r=>typeof r!="string")?null:{name:n,reason:o,detail:i,fix:d}}function no(a){if(!$n(a)||a.available!==!0)return null;const{totalChars:n,estTokens:o,sections:i,hiddenSkills:d}=a;if(!An(n)||!An(o)||!Array.isArray(i)||!Array.isArray(d))return null;const r=i.map(eo).filter(f=>f!==null).sort((f,S)=>S.chars-f.chars),p=Vs.map(f=>{const S=r.filter(g=>g.counted&&g.owner===f),y=S.reduce((g,E)=>g+E.chars,0);return{owner:f,chars:y,estTokens:S.reduce((g,E)=>g+E.estTokens,0),share:n>0?y/n:0}}).filter(f=>f.chars>0),m=Js.map(f=>{const S=r.filter(y=>f==="native"?!y.counted:y.counted&&y.owner===f);return{kind:f,chars:S.reduce((y,g)=>y+g.chars,0),estTokens:S.reduce((y,g)=>y+g.estTokens,0),rows:S}}).filter(f=>f.rows.length>0);return{totalChars:n,estTokens:o,rows:r,groups:m,owners:p,hiddenSkills:d.map(to).filter(f=>f!==null)}}async function ao(a){try{const n=await Kr("agent.getSession",{agentId:a});return no(n?.session?.promptBreakdown)}catch{return null}}const pa=rs.map(a=>({key:a.path.replace(/^agentFeatures\./,""),label:a.label,description:a.description}));function ro(a){const n=a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").toLowerCase().trim();return n.charAt(0).toUpperCase()+n.slice(1)}function so(a){const n=a??{},o=pa.map(r=>({key:r.key,label:r.label(),description:r.description(),enabled:n[r.key]===!0,known:!0})),i=new Set(pa.map(r=>r.key)),d=[];for(const[r,p]of Object.entries(n))i.has(r)||d.push({key:r,label:ro(r),description:null,enabled:p===!0,known:!1});return d.sort((r,p)=>r.label.localeCompare(p.label)),o.concat(d)}var oo=_('<div class="mb-6 border-b border-border pb-6"><!></div>'),io=_("<span> </span>"),lo=_('<!> <span class="sr-only"> </span>',1),uo=_('<div role="listitem" class="text-xs text-subtle" aria-hidden="true">—</div>'),co=_('<section class="min-w-0"><h4 class="text-sm font-medium mb-3"> </h4> <div role="list" class="space-y-2"></div></section>'),po=_('<div class="@container"><!> <section><h3 class="text-sm font-medium"> </h3> <p class="mb-4 mt-1 text-sm text-muted-foreground"> </p> <div class="grid grid-cols-1 gap-6 @min-[28rem]:grid-cols-2" data-testid="harness-features-list"></div></section></div>');function Sa(a,n){const o=Wn();if(new.target)return Pt({component:Sa,...a});Ot(n,!0);let i=w(n,"open",15,!1),d=w(n,"static",7,!1),r=w(n,"version",7),p=w(n,"features",7,null),m=w(n,"agentId",7),f=w(n,"breakdown",7),S=le(null);const y=u(()=>f()===void 0&&!!m());Fe(()=>{if(!i()||!e(y)||!m())return;const D=m();let P=!0;return ao(D).then(T=>{P&&h(S,{agentId:D,view:T},!0)}),()=>{P=!1}});const g=u(()=>f()!==void 0?f():e(y)&&e(S)&&e(S).agentId===m()?e(S).view:null),E=u(()=>so(p())),z=u(()=>[{enabled:!0,label:c.chat_shared_valueOn_label(),rows:e(E).filter(D=>D.enabled)},{enabled:!1,label:c.chat_shared_valueOff_label(),rows:e(E).filter(D=>!D.enabled)}]);var Ce={get open(){return i()},set open(D=!1){i(D),k()},get static(){return d()},set static(D=!1){d(D),k()},get version(){return r()},set version(D){r(D),k()},get features(){return p()},set features(D=null){p(D),k()},get agentId(){return m()},set agentId(D){m(D),k()},get breakdown(){return f()},set breakdown(D){f(D),k()},$set:Tt,$on:(D,P)=>Rt(n,D,P)};{let D=u(()=>c.chat_harnessFeaturesModal_title({version:r()}));Vr(a,{get static(){return d()},get title(){return e(D)},size:"wide",get open(){return i()},set open(P){i(P)},children:(P,T)=>{var v=po(),ve=O(v);{var ue=W=>{var ne=oo(),ge=O(ne);Aa(ge,{get breakdown(){return e(g)}}),$(ne),l(W,ne)};M(ve,W=>{e(g)&&W(ue)})}var R=b(ve,2),_e=O(R),ce=U(_e,!0),xe=b(_e,2),pe=U(xe,!0),Q=b(xe,2);Ct(Q,21,()=>e(z),W=>W.enabled,(W,ne)=>{var ge=co(),ze=O(ge),ot=U(ze,!0),G=b(ze,2);Ct(G,21,()=>e(ne).rows,I=>I.key,(I,ae)=>{ts(I,{role:"listitem",class:"min-h-0 px-0 py-0 [&_.truncate]:whitespace-normal","data-testid":"harness-feature-state",get"data-feature"(){return e(ae).key},get"data-enabled"(){return e(ae).enabled},title:he=>{var N=Oe(),Le=H(N);{var X=Z=>{var Y=lo(),oe=H(Y);Gr(oe,{get content(){return e(ae).description},side:"top",size:"sm",children:(be,je)=>{var et=io(),ut=U(et,!0);x(()=>L(ut,e(ae).label)),l(be,et)},$$slots:{default:!0}});var ee=b(oe,2),Ne=U(ee,!0);x(()=>L(Ne,e(ae).description)),l(Z,Y)},K=Z=>{var Y=Kt();x(()=>L(Y,e(ae).label)),l(Z,Y)};M(Le,Z=>{e(ae).description?Z(X):Z(K,-1)})}l(he,N)},$$slots:{title:!0}})},I=>{var ae=uo();l(I,ae)}),$(G),$(ge),x(()=>{q(ge,"aria-label",e(ne).label),L(ot,e(ne).label)}),l(W,ge)}),$(Q),$(R),$(v),x((W,ne)=>{q(R,"aria-labelledby",`${o}-capabilities`),q(_e,"id",`${o}-capabilities`),L(ce,W),L(pe,ne)},[()=>c.chat_harnessFeaturesModal_capabilities_title(),()=>c.chat_harnessFeaturesModal_description()]),l(P,v)},$$slots:{default:!0}})}return Lt(Ce)}var go=_('<p role="alert" class="type-body text-danger"> </p>');function Ia(a,n){if(new.target)return Pt({component:Ia,...a});Ot(n,!0);const o=()=>Re(g,"$outcome$",i),[i,d]=qn();let r=w(n,"open",15,!1),p=w(n,"agentName",7),m=w(n,"workspaceId",7),f=w(n,"agentId",7);const S=crypto.randomUUID(),y=Mt(""),g=xn(y,S),E=u(()=>o()?.workspaceId===m()&&o().agentId===f()?o():void 0),z=u(()=>e(E)?.status==="pending"),Ce=u(()=>e(E)?.status==="failed"?e(E).error:"");Fe(()=>{const v=m();return f(),y.set(v),()=>J.dispatch(Fn(v,S))}),Fe(()=>{e(E)?.status==="succeeded"&&(r(!1),J.dispatch(wa(m(),S,e(E).requestId)))});function D(){const v=xn.select(J.state,m(),S);v?.agentId===f()&&v.status==="pending"||J.dispatch(kn(m(),S,crypto.randomUUID(),f(),{kind:"retire"}))}var P={get open(){return r()},set open(v=!1){r(v),k()},get agentName(){return p()},set agentName(v){p(v),k()},get workspaceId(){return m()},set workspaceId(v){m(v),k()},get agentId(){return f()},set agentId(v){f(v),k()},$set:Tt,$on:(v,ve)=>Rt(n,v,ve)};{const v=ce=>{var xe=Oe(),pe=H(xe);{var Q=W=>{var ne=go(),ge=U(ne,!0);x(()=>L(ge,e(Ce))),l(W,ne)};M(pe,W=>{e(Ce)&&W(Q)})}l(ce,xe)};let ve=u(()=>c.modals_retireAgent_title()),ue=u(()=>c.modals_retireAgent_description({name:p()})),R=u(()=>c.modals_retireAgent_confirm_label()),_e=u(()=>c.modals_bulkActionConfirm_cancel_label());ds(a,{get title(){return e(ve)},get description(){return e(ue)},get confirmLabel(){return e(R)},get cancelLabel(){return e(_e)},focusSubmit:!1,focusCancel:!0,get busy(){return e(z)},onConfirm:D,get open(){return r()},set open(ce){r(ce)},details:v,$$slots:{details:!0}})}var T=Lt(P);return d(),T}function fo({agentName:a,specialist:n}){const o=n?`{ topLevel: true, specialist: ${JSON.stringify(n)} }`:"{ topLevel: true }",i=n?`and keep the same specialist (${JSON.stringify(n)})`:"and, if you were created with a specialist, pass that exact same `specialist` value in the options";return`Please replace yourself with a fresh top-level agent and run a gradual, coordinated hand-off:
|
|
3
3
|
|
|
4
4
|
1. Create your replacement now: call \`ws.agent.create(${JSON.stringify(a)}, kickoffMessage, ${o})\`. The first argument must be your EXACT current name (${JSON.stringify(a)}) ${i}. Write the kickoff message as a thorough context hand-off: the overall goal, the current state of the work, key notes and files, decisions already made, and open threads.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as z}from"./
|
|
1
|
+
import{p as z}from"./M_EApwg1.js";import{b as f,q as B,aX as E,B as F,ay as $,a_ as P,V as A,b0 as W,Y as _,U as N,aZ as Y,W as L,O as M,r as O}from"./BIEJIWBe.js";import{p as I}from"./2gme4FSl.js";var U=M.packet,u,C=(u=class{constructor(){this.packet=[],this.setAccTitle=P,this.getAccTitle=A,this.setDiagramTitle=W,this.getDiagramTitle=_,this.getAccDescription=N,this.setAccDescription=Y}getConfig(){const t=B({...U,...L().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){O(),this.packet=[]}},f(u,"PacketDB"),u),X=1e4,j=f((e,t)=>{z(e,t);let r=-1,s=[],i=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:o,bits:d,label:g}of e.blocks){if(a!==void 0&&o!==void 0&&o<a)throw new Error(`Packet block ${a} - ${o} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${o??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(o??=a+(d??1)-1,d??=o-a+1,r=o,$.debug(`Packet block ${a} - ${r} with label ${g}`);s.length<=l+1&&t.getPacket().length<X;){const[c,p]=q({start:a,end:o,bits:d,label:g},i,l);if(s.push(c),c.end+1===i*l&&(t.pushWord(s),s=[],i++),!p)break;({start:a,end:o,bits:d,label:g}=p)}}t.pushWord(s)},"populate"),q=f((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const s=t*r-1,i=t*r;return[{start:e.start,end:s,label:e.label,bits:s-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},"getNextFittingBlock"),S={parser:{yy:void 0},parse:f(async e=>{const t=await I("packet",e),r=S.parser?.yy;if(!(r instanceof C))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");$.debug(t),j(t,r)},"parse")},G=f((e,t,r,s)=>{const i=s.db,l=i.getConfig(),{rowHeight:a,paddingY:o,bitWidth:d,bitsPerRow:g}=l,c=i.getPacket(),p=i.getDiagramTitle(),m=a+o,n=m*(c.length+1)-(p?0:a),h=d*g+2,k=E(t);k.attr("viewBox",`0 0 ${h} ${n}`),F(k,n,h,l.useMaxWidth);for(const[x,b]of c.entries())H(k,b,x,l);k.append("text").text(p).attr("x",h/2).attr("y",n-m/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),H=f((e,t,r,{rowHeight:s,paddingX:i,paddingY:l,bitWidth:a,bitsPerRow:o,showBits:d,bitOrder:g})=>{const c=e.append("g"),p=r*(s+l)+l,m=g==="descending";for(const n of t){const h=n.end-n.start+1,k=n.start%o,b=(m?o-k-h:k)*a+1,w=h*a-i;if(c.append("rect").attr("x",b).attr("y",p).attr("width",w).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",b+w/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(n.label),!d)continue;const[D,T]=m?[n.end,n.start]:[n.start,n.end],v=h===1,y=p-2;c.append("text").attr("x",b+(v?w/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",v?"middle":"start").text(D),v||c.append("text").attr("x",b+w).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(T)}},"drawWord"),K={draw:G},V={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},Z=f(({packet:e}={})=>{const t=B(V,e);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${t.byteFontSize};
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as o,W as pt,x as nt,am as Wt,an as Rt,au as Pt,H as Bt,X as ft,ay as E,aX as Vt,aH as Ft,b3 as yt,aW as U,d as ct,_ as zt,y as Ot,r as Gt}from"./
|
|
1
|
+
import{b as o,W as pt,x as nt,am as Wt,an as Rt,au as Pt,H as Bt,X as ft,ay as E,aX as Vt,aH as Ft,b3 as yt,aW as U,d as ct,_ as zt,y as Ot,r as Gt}from"./BIEJIWBe.js";var tt=(function(){var e=o(function(k,a,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=a);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],s=[1,12],r=[1,13],n=[1,14],h=[1,15],c=[1,16],i=[1,19],y=[1,20],p={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(a,d,l,g,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:g.setDirection("LR");break;case 4:g.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:g.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),g.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),g.getCommonDb().setAccDescription(this.$);break;case 15:g.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:g.addTask(u[v],0,""),this.$=u[v];break;case 19:g.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:s,15:r,17:n,19:h,20:c,21:17,22:18,23:i,24:y},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:s,15:r,17:n,19:h,20:c,21:17,22:18,23:i,24:y},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(a,d){if(d.recoverable)this.trace(a);else{var l=new Error(a);throw l.hash=d,l}},"parseError"),parse:o(function(a){var d=this,l=[0],g=[],x=[null],u=[],S=this.table,v="",I=0,C=0,R=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(a,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var K=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=g.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(g=A,A=g.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,W={},G,B,Z,j;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";j=[];for(G in S[$])this.terminals_[G]&&G>R&&j.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`:
|
|
2
2
|
`+w.showPosition()+`
|
|
3
3
|
Expecting `+j.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on line "+(I+1)+": Unexpected "+(_==O?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Y,{text:w.match,token:this.terminals_[_]||_,line:w.yylineno,loc:F,expected:j})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+_);switch(T[0]){case 1:l.push(_),x.push(w.yytext),u.push(w.yylloc),l.push(T[1]),_=null,C=w.yyleng,v=w.yytext,I=w.yylineno,F=w.yylloc;break;case 2:if(B=this.productions_[T[1]][1],W.$=x[x.length-B],W._$={first_line:u[u.length-(B||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(B||1)].first_column,last_column:u[u.length-1].last_column},K&&(W._$.range=[u[u.length-(B||1)].range[0],u[u.length-1].range[1]]),P=this.performAction.apply(W,[v,C,I,H.yy,T[1],x,u].concat(L)),typeof P<"u")return P;B&&(l=l.slice(0,-1*B*2),x=x.slice(0,-1*B),u=u.slice(0,-1*B)),l.push(this.productions_[T[1]][0]),x.push(W.$),u.push(W._$),Z=S[l[l.length-2]][l[l.length-1]],l.push(Z);break;case 3:return!0}}return!0},"parse")},m=(function(){var k={EOF:1,parseError:o(function(d,l){if(this.yy.parser)this.yy.parser.parseError(d,l);else throw new Error(d)},"parseError"),setInput:o(function(a,d){return this.yy=d||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var d=a.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:o(function(a){var d=a.length,l=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===g.length?this.yylloc.first_column:0)+g[g.length-l.length].length-l[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(a){this.unput(this.match.slice(a))},"less"),pastInput:o(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var a=this.pastInput(),d=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{_ as ue,t as ne,br as v,a_ as A,bz as re,b as se,bp as k}from"./DXyyWeag.js";import{Iy as pe}from"./D5ej8a-y.js";import{bI as de,bs as ie,a7 as le,ay as X,aD as r,W as f,bn as oe,c9 as L,aA as h,a5 as q,bA as G,b_ as T,aB as P,bl as U,bO as W,bS as S,ca as fe,bH as ge,bV as _e,aC as B}from"./DYhIMPy1.js";import{j as me,l as ve,v as te,g as he,w as ce,u as M}from"./CjaOLL1c.js";import{u as Ce,I as O,e as $,B as J}from"./BboIV5H5.js";import{t as we}from"./4NMrKcis.js";import{F as ke}from"./BTdkHPOB.js";import{M as be}from"./DqzMEdu3.js";import{a as xe}from"./D3QcPFoL.js";import{aM as Te}from"./BA1-CV5U.js";import{f as Se}from"./Bfr1QjPr.js";function ct(t,a,c){if(t.metaKey||t.ctrlKey||!(t.currentTarget instanceof Element)||!t.currentTarget.closest("[data-assistant-panels]"))return!1;const e=pe.state.agentSessions.byAgentId[c]?.workspaceId??a,i=t.currentTarget.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId;return ue(async()=>{const{showAssistantContent:o}=await import("./DspLnLHB.js");return{showAssistantContent:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]),import.meta.url).then(({showAssistantContent:o})=>o(`intent://local/${e}/agent/${c}`,{layoutId:i})),!0}const ye=Symbol("panel-context");function ut(t){de(ye,{panelId:t})}function Ee(t){if(t?.target)return t.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}function pt(t,a){const c=a?.panelId??Ee(t),e=t.metaKey||t.ctrlKey;return{sourcePanelId:c,openInAdjacentPanel:e}}var Ie=P('<span class="text-subtle animate-pulse"> </span>'),Me=P('<span class="text-green-600 dark:text-green-400 flex items-center gap-0.5"><span class="opacity-70">+</span> <span> </span></span>'),Ae=P('<span class="text-red-600 dark:text-red-400 flex items-center gap-0.5"><span class="opacity-70">-</span> <span> </span></span>'),Le=P('<span class="text-subtle"> </span>'),Ne=P("<!> <!> <!>",1),Pe=P("<div><!></div>");function Re(t,a){if(new.target)return ne({component:Re,...t});ie(a,!0);let c=v(a,"additions",7,0),e=v(a,"deletions",7,0),i=v(a,"showZero",7,!1),o=v(a,"size",7,"sm"),_=v(a,"inline",7,!0),u=v(a,"loading",7,!1),d=v(a,"class",7,""),y=L(()=>i()||c()>0||e()>0||u()),R=L(()=>{switch(o()){case"xs":return"text-ui gap-1";case"sm":return"text-xs gap-1.5";case"md":return"text-sm gap-2";case"lg":return"text-base gap-2.5";default:return"text-xs gap-1.5"}});function H(n){return Ce(n,{notation:"compact"})}var F={get additions(){return c()},set additions(n=0){c(n),h()},get deletions(){return e()},set deletions(n=0){e(n),h()},get showZero(){return i()},set showZero(n=!1){i(n),h()},get size(){return o()},set size(n="sm"){o(n),h()},get inline(){return _()},set inline(n=!0){_(n),h()},get loading(){return u()},set loading(n=!1){u(n),h()},get class(){return d()},set class(n=""){d(n),h()},$set:re,$on:(n,w)=>se(a,n,w)},C=le(),z=X(C);{var p=n=>{var w=Pe(),K=q(w);{var E=g=>{var m=Ie(),N=U(m,!0);T(D=>W(N,D),[()=>k.shared_lineChangeStats_calculating_label()]),f(g,m)},V=g=>{var m=Ne(),N=X(m);{var D=s=>{var l=Me(),b=S(q(l),2),I=U(b,!0);G(l),T(Y=>W(I,Y),[()=>H(c())]),f(s,l)};A(N,s=>{(c()>0||i())&&s(D)})}var Z=S(N,2);{var j=s=>{var l=Ae(),b=S(q(l),2),I=U(b,!0);G(l),T(Y=>W(I,Y),[()=>H(e())]),f(s,l)};A(Z,s=>{(e()>0||i())&&s(j)})}var x=S(Z,2);{var Q=s=>{var l=Le(),b=U(l,!0);T(I=>W(b,I),[()=>k.shared_lineChangeStats_noChanges_label()]),f(s,l)};A(x,s=>{!c()&&!e()&&!i()&&s(Q)})}f(g,m)};A(K,g=>{u()?g(E):g(V,-1)})}G(w),T(g=>te(w,1,g),[()=>me(ve("whitespace-nowrap",_()?"inline-flex":"flex","items-center font-mono",r(R),d()))]),f(n,w)};A(z,n=>{r(y)&&n(p)})}return f(t,C),oe(F)}const ze=new Map([["STRONG","strong"],["B","strong"],["EM","em"],["I","em"],["CODE","code"]]),De=new Set(["AUDIO","BUTTON","CANVAS","DETAILS","EMBED","HR","IFRAME","IMG","INPUT","OBJECT","PICTURE","PRE","SELECT","SVG","TABLE","TEXTAREA","VIDEO"]),Oe=new Set(["ARTICLE","BLOCKQUOTE","DD","DIV","DT","FOOTER","H1","H2","H3","H4","H5","H6","HEADER","LI","P","SECTION"]);function Be(t){return typeof Intl.Segmenter=="function"?Array.from(new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(t),({segment:a})=>a):Array.from(t)}function ee(t,a,c,e){for(const i of Be(a.replace(/\s+/gu," "))){const o=i===" ";if(!(o&&(!e.hasText||e.lastWasSpace))){if(e.visibleLength>=c){if(o)return;e.truncated||t.append(document.createTextNode("…")),e.truncated=!0;return}t.append(document.createTextNode(i)),e.visibleLength+=1,e.hasText=!0,e.lastWasSpace=o}}}function ae(t,a,c,e){if(e.truncated)return;if(t.nodeType===Node.TEXT_NODE){ee(a,t.textContent??"",c,e);return}if(!(t instanceof HTMLElement)||De.has(t.tagName))return;if(t.tagName==="BR"){ee(a," ",c,e);return}const i=ze.get(t.tagName);if(i){const o=document.createElement(i);a.append(o);for(const _ of t.childNodes)ae(_,o,c,e);o.textContent||o.remove();return}Oe.has(t.tagName)&&e.hasText&&ee(a," ",c,e);for(const o of t.childNodes)ae(o,a,c,e)}async function He(t,a=80){const c=await Te(t,{allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!1,processPrimitives:!1,taskBlockRenderMode:"content"}),e=document.createElement("template");e.innerHTML=c;const i=document.createElement("span"),o={visibleLength:0,hasText:!1,lastWasSpace:!1,truncated:!1},_=Math.max(0,Math.floor(a));for(const u of e.content.childNodes)ae(u,i,_,o);return i.innerHTML.trim()}async function Fe(t){const a=await He(t,Number.MAX_SAFE_INTEGER),c=document.createElement("span");return c.innerHTML=a,(c.textContent??"").replace(/<\/?[A-Za-z][^>]*>/gu,"").replace(/\s+/gu," ").trim()}var Ve=P('<span data-testid="agent-preview-tool-icon"><!></span>'),Ze=P('<span><!> <span class="min-w-0 flex-1 truncate text-inherit opacity-[inherit]" data-testid="agent-preview-tool-text"> </span></span>');function Ue(t,a){if(new.target)return ne({component:Ue,...t});ie(a,!0);const c=new Set(["figma","sentry","playwright","github","linear","slack","context7"]);let e=v(a,"toolUse",7),i=v(a,"animate",7,!1),o=v(a,"iconSize",7,12),_=v(a,"showIcon",7,!0),u=v(a,"class",7,"");const d=L(()=>xe(e().name,e().input||{})),y=L(()=>[r(d).verb,r(d).subject,r(d).path].filter(Boolean).join(" ").trim()||r(d).verb||k.chat_previewToolLabel_tool_fallback());let R=_e("");fe(()=>{const p=r(y);let n=!1;return Fe(p).then(w=>{n||ge(R,w,!0)}),()=>{n=!0}});var H={get toolUse(){return e()},set toolUse(p){e(p),h()},get animate(){return i()},set animate(p=!1){i(p),h()},get iconSize(){return o()},set iconSize(p=12){o(p),h()},get showIcon(){return _()},set showIcon(p=!0){_(p),h()},get class(){return u()},set class(p=""){u(p),h()},$set:re,$on:(p,n)=>se(a,p,n)},F=le(),C=X(F);{var z=p=>{var n=Ze(),w=q(n);{var K=g=>{var m=Ve(),N=q(m);{var D=x=>{be(x,{get iconName(){return r(d).mcpSource},get label(){return r(d).mcpSource},get size(){return o()}})},Z=L(()=>r(d).mcpSource&&c.has(r(d).mcpSource)),j=x=>{ke(x,{get icon(){return r(d).icon},class:"h-full! w-full! text-inherit opacity-[inherit]"})};A(N,x=>{r(Z)?x(D):x(j,-1)})}G(m),T(()=>{te(m,1,`agent-preview-tool-icon inline-flex shrink-0 items-center justify-center text-inherit opacity-[inherit] ${i()?"animate-pulse":""}`,"svelte-115ywqs"),ce(m,`width: ${o()??""}px; height: ${o()??""}px;`)}),f(g,m)};A(w,g=>{_()&&g(K)})}var E=S(w,2),V=U(E,!0);he(E,(g,m)=>we?.(g,m),()=>r(R)),G(n),T(()=>{te(n,1,`type-body inline-flex w-full min-w-0 items-center font-normal ${_()?"gap-1.5":""} ${u()??""}`,"svelte-115ywqs"),W(V,r(R))}),f(p,n)};A(C,p=>{r(d).hidden||p(z)})}return f(t,F),oe(H)}var qe=B('<circle cx="12" cy="12" r="10" stroke-width="2" fill="none"></circle>'),Ge=B('<path d="M7 12.5L10.5 16L17 9" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" fill="none"></path>'),Ke=B('<path d="M5 19L19 5" stroke-width="2.5" stroke-linecap="round"></path>'),je=B('<path d="M13.1372 17.7135C13.1372 18.1682 12.9566 18.6042 12.6351 18.9257C12.3136 19.2472 11.8776 19.4278 11.4229 19.4278C10.9683 19.4278 10.5322 19.2472 10.2107 18.9257C9.88925 18.6042 9.70864 18.1682 9.70864 17.7135C9.70864 17.2589 9.88925 16.8228 10.2107 16.5014C10.5322 16.1799 10.9683 15.9993 11.4229 15.9993C11.8776 15.9993 12.3136 16.1799 12.6351 16.5014C12.9566 16.8228 13.1372 17.2589 13.1372 17.7135ZM10.2109 7.07297C10.3957 6.88872 10.6201 6.7491 10.8671 6.66473C11.114 6.58037 11.377 6.55349 11.6359 6.58615C11.8948 6.61881 12.1428 6.71015 12.361 6.8532C12.5793 6.99625 12.762 7.18724 12.8953 7.4116C13.0285 7.63597 13.1088 7.8878 13.1299 8.14789C13.1511 8.40799 13.1126 8.66948 13.0174 8.91244C12.9222 9.1554 12.7728 9.37342 12.5805 9.54988C12.3883 9.72634 12.1583 9.85659 11.9081 9.93068C11.1212 10.1604 10.1372 10.901 10.1372 12.1421V12.5707C10.1372 12.9117 10.2727 13.2387 10.5138 13.4798C10.7549 13.7209 11.0819 13.8564 11.4229 13.8564C11.7639 13.8564 12.0909 13.7209 12.3321 13.4798C12.5732 13.2387 12.7086 12.9117 12.7086 12.5707V12.3735C13.3281 12.1785 13.8952 11.8451 14.3669 11.3988C14.8387 10.9524 15.2029 10.4046 15.4319 9.79683C15.6609 9.18906 15.7487 8.53719 15.6888 7.89048C15.6289 7.24377 15.4228 6.61913 15.0861 6.06376C14.7494 5.50838 14.2908 5.03681 13.7451 4.68466C13.1994 4.33251 12.5808 4.10899 11.936 4.03101C11.2912 3.95302 10.6371 4.0226 10.0232 4.23449C9.40925 4.44638 8.8515 4.79503 8.39207 5.25411C8.26933 5.37277 8.17145 5.51469 8.10414 5.67158C8.03683 5.82848 8.00145 5.9972 8.00004 6.16792C7.99864 6.33864 8.03125 6.50792 8.09597 6.6659C8.16069 6.82388 8.25623 6.96739 8.37701 7.08805C8.49778 7.20871 8.64138 7.30411 8.79942 7.36868C8.95746 7.43326 9.12677 7.46571 9.29749 7.46414C9.4682 7.46258 9.6369 7.42703 9.79373 7.35958C9.95056 7.29212 10.0924 7.19411 10.2109 7.07125V7.07297Z" fill="white" class="origin-center"></path>'),We=B('<path d="M12 5.5V13.5" stroke="white" stroke-width="3" stroke-linecap="round"></path><circle cx="12" cy="17.5" r="1.6" fill="white" class="origin-center"></circle>',1),Xe=B('<path d="M11.6668 13.649C12.1044 13.649 12.5241 13.4751 12.8336 13.1656C13.1431 12.8562 13.3169 12.4365 13.3169 11.9988C13.3169 11.5611 13.1431 11.1414 12.8336 10.832C12.5241 10.5225 12.1044 10.3486 11.6668 10.3486C11.2291 10.3486 10.8094 10.5225 10.4999 10.832C10.1905 11.1414 10.0166 11.5611 10.0166 11.9988C10.0166 12.4365 10.1905 12.8562 10.4999 13.1656C10.8094 13.4751 11.2291 13.649 11.6668 13.649Z" fill="white" class="origin-center"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.38506 12.3064C4.31566 12.1046 4.31566 11.8855 4.38506 11.6837C4.90912 10.1693 5.89241 8.85596 7.198 7.92665C8.50359 6.99734 10.0665 6.4983 11.669 6.49902C13.2716 6.49975 14.834 7.00021 16.1388 7.9307C17.4435 8.8612 18.4256 10.1754 18.9483 11.6903C19.0177 11.8921 19.0177 12.1112 18.9483 12.313C18.4245 13.8278 17.4412 15.1416 16.1355 16.0712C14.8298 17.0008 13.2666 17.5 11.6638 17.4993C10.0609 17.4986 8.49824 16.9979 7.19336 16.0671C5.88848 15.1363 4.90641 13.8217 4.38396 12.3064H4.38506ZM14.9681 11.9984C14.9681 12.8737 14.6204 13.7131 14.0015 14.3321C13.3825 14.951 12.5431 15.2987 11.6678 15.2987C10.7925 15.2987 9.95304 14.951 9.33411 14.3321C8.71517 13.7131 8.36746 12.8737 8.36746 11.9984C8.36746 11.1231 8.71517 10.2836 9.33411 9.66468C9.95304 9.04575 10.7925 8.69803 11.6678 8.69803C12.5431 8.69803 13.3825 9.04575 14.0015 9.66468C14.6204 10.2836 14.9681 11.1231 14.9681 11.9984Z" fill="white" class="origin-center"></path>',1),Je=B('<svg viewBox="0 0 24 24" fill="none"><defs><clipPath><rect x="48%" y="0" width="100%" height="100%"></rect></clipPath></defs><circle cx="50%" cy="50%" class="transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none origin-center"></circle><circle cx="50%" cy="50%" r="45%" stroke-width="2.5" fill="none" class="transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none"></circle><!></svg>');function Qe(t,a){if(new.target)return ne({component:Qe,...t});ie(a,!0);const c=new Set(["not_started","waiting","discussion_needed","blocked","in_progress","review_required","complete","cancelled"]);let e=v(a,"status",7),i=v(a,"size",7,16),o=v(a,"onclick",7);const _=Math.random().toString(36).substring(2,9);let u=L(()=>e()==="todo"?"not_started":e()==="in-progress"?"in_progress":e()==="done"?"complete":typeof e()=="string"&&c.has(e())?e():"unknown");const d={not_started:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0},waiting:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0},discussion_needed:{stroke:"#f59e0b",fill:"#f59e0b",innerCircleRPercentage:100},blocked:{stroke:"#ef4444",fill:"#ef4444",innerCircleRPercentage:100},in_progress:{stroke:"#00BCFF",fill:"#00BCFF",innerCircleRPercentage:55},review_required:{stroke:"#3b82f6",fill:"#3b82f6",innerCircleRPercentage:100},complete:{stroke:"#22c55e",fill:"#00BD7D",innerCircleRPercentage:100},cancelled:{stroke:"#99999966",fill:"#99999966",innerCircleRPercentage:0},unknown:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0}};let y=L(()=>d[r(u)]||d.not_started);const R={not_started:k.tiptap_taskStatus_notStarted_label,waiting:k.tiptap_taskStatus_waiting_label,discussion_needed:k.tiptap_taskStatus_discussionNeeded_label,blocked:k.tiptap_taskStatus_blocked_label,in_progress:k.tiptap_taskStatus_inProgress_label,review_required:k.tiptap_taskStatus_reviewRequired_label,complete:k.tiptap_taskStatus_complete_label,cancelled:k.tiptap_taskStatus_cancelled_label,unknown:k.tiptap_taskStatus_unknown_label};let H=L(()=>(R[r(u)]??k.tiptap_taskStatus_unknown_label)());var F={get status(){return e()},set status(C){e(C),h()},get size(){return i()},set size(C=16){i(C),h()},get onclick(){return o()},set onclick(C){o(C),h()},$set:re,$on:(C,z)=>se(a,C,z)};{let C=L(()=>k.tiptap_taskStatus_status_tooltip({status:r(H)}));Se(t,{type:"button",variant:"ghost",size:"icon-compact",iconOnly:!0,class:"task-status-icon shrink-0 cursor-pointer bg-transparent border-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-primary-ink rounded-full",get style(){return`width: ${i()??""}px; height: ${i()??""}px;`},get onclick(){return o()},get title(){return r(C)},children:(z,p)=>{var n=Je(),w=q(n),K=U(w),E=S(w),V=S(E),g=S(V);{var m=s=>{},N=s=>{var l=qe();T(()=>M(l,"stroke",r(y).stroke)),f(s,l)},D=s=>{var l=Ge();O(3,l,()=>$,()=>({tier:"slow"})),f(s,l)},Z=s=>{var l=Ke();T(()=>M(l,"stroke",r(y).stroke)),O(3,l,()=>$,()=>({tier:"slow"})),f(s,l)},j=s=>{var l=je();O(3,l,()=>J,()=>({tier:"slow"})),f(s,l)},x=s=>{var l=We(),b=X(l),I=S(b);O(3,b,()=>$,()=>({tier:"slow"})),O(3,I,()=>J,()=>({tier:"slow"})),f(s,l)},Q=s=>{var l=Xe(),b=X(l),I=S(b);O(3,b,()=>J,()=>({tier:"slow"})),O(3,I,()=>J,()=>({tier:"slow"})),f(s,l)};A(g,s=>{r(u)==="not_started"||r(u)==="waiting"?s(m):r(u)==="in_progress"?s(N,1):r(u)==="complete"?s(D,2):r(u)==="cancelled"?s(Z,3):r(u)==="discussion_needed"?s(j,4):r(u)==="blocked"?s(x,5):r(u)==="review_required"&&s(Q,6)})}G(n),T(()=>{M(n,"width",i()),M(n,"height",i()),ce(n,`width: ${i()??""}px; height: ${i()??""}px;`),M(K,"id",`half-clip-${_??""}`),M(E,"r",`${r(y).innerCircleRPercentage*.5}%`),M(E,"fill",r(y).fill),M(E,"clip-path",r(u)==="in_progress"?`url(#half-clip-${_})`:"none"),M(V,"stroke",r(y).stroke)}),f(z,n)},$$slots:{default:!0}})}return oe(F)}export{Ue as A,Re as L,Qe as T,Ee as a,He as b,pt as g,ct as o,Fe as r,ut as s};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DhuXXSmP.js","/app/immutable/chunks/DXyyWeag.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/D5ej8a-y.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/ppRpwazH.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/Cuqq8bL5.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/DyvrH0mm.js","/app/immutable/chunks/ChkzKl5W.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/Bfr1QjPr.js","/app/immutable/chunks/CjaOLL1c.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/CnVt0JNG.js","/app/immutable/chunks/BybfkKTj.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/DogedYC1.js","/app/immutable/chunks/pKvpKpo4.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/DNBv5HWD.js","/app/immutable/chunks/DO1Yw77G.js","/app/immutable/chunks/DT4bpJWb.js","/app/immutable/chunks/BboIV5H5.js","/app/immutable/chunks/DJkHth-B.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/BTdkHPOB.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/D3QcPFoL.js","/app/immutable/chunks/DEYvT_CO.js","/app/immutable/chunks/DHQOuksI.js","/app/immutable/chunks/Bl3ku6zY.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as ue,t as ne,br as v,a_ as A,bz as re,b as se,bp as k}from"./DXyyWeag.js";import{Iy as pe}from"./D5ej8a-y.js";import{bI as de,bs as ie,a7 as le,ay as X,aD as r,W as f,bn as oe,c9 as L,aA as h,a5 as q,bA as G,b_ as T,aB as P,bl as U,bO as W,bS as S,ca as fe,bH as ge,bV as _e,aC as B}from"./DYhIMPy1.js";import{j as me,l as ve,v as te,g as he,w as ce,u as M}from"./CjaOLL1c.js";import{u as Ce,I as O,e as $,B as J}from"./BboIV5H5.js";import{t as we}from"./4NMrKcis.js";import{F as ke}from"./BTdkHPOB.js";import{M as be}from"./CpGIiGYT.js";import{a as xe}from"./D3QcPFoL.js";import{aM as Te}from"./olwByklL.js";import{f as Se}from"./Bfr1QjPr.js";function ct(t,a,c){if(t.metaKey||t.ctrlKey||!(t.currentTarget instanceof Element)||!t.currentTarget.closest("[data-assistant-panels]"))return!1;const e=pe.state.agentSessions.byAgentId[c]?.workspaceId??a,i=t.currentTarget.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId;return ue(async()=>{const{showAssistantContent:o}=await import("./DhuXXSmP.js");return{showAssistantContent:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]),import.meta.url).then(({showAssistantContent:o})=>o(`intent://local/${e}/agent/${c}`,{layoutId:i})),!0}const ye=Symbol("panel-context");function ut(t){de(ye,{panelId:t})}function Ee(t){if(t?.target)return t.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}function pt(t,a){const c=a?.panelId??Ee(t),e=t.metaKey||t.ctrlKey;return{sourcePanelId:c,openInAdjacentPanel:e}}var Ie=P('<span class="text-subtle animate-pulse"> </span>'),Me=P('<span class="text-green-600 dark:text-green-400 flex items-center gap-0.5"><span class="opacity-70">+</span> <span> </span></span>'),Ae=P('<span class="text-red-600 dark:text-red-400 flex items-center gap-0.5"><span class="opacity-70">-</span> <span> </span></span>'),Le=P('<span class="text-subtle"> </span>'),Ne=P("<!> <!> <!>",1),Pe=P("<div><!></div>");function Re(t,a){if(new.target)return ne({component:Re,...t});ie(a,!0);let c=v(a,"additions",7,0),e=v(a,"deletions",7,0),i=v(a,"showZero",7,!1),o=v(a,"size",7,"sm"),_=v(a,"inline",7,!0),u=v(a,"loading",7,!1),d=v(a,"class",7,""),y=L(()=>i()||c()>0||e()>0||u()),R=L(()=>{switch(o()){case"xs":return"text-ui gap-1";case"sm":return"text-xs gap-1.5";case"md":return"text-sm gap-2";case"lg":return"text-base gap-2.5";default:return"text-xs gap-1.5"}});function H(n){return Ce(n,{notation:"compact"})}var F={get additions(){return c()},set additions(n=0){c(n),h()},get deletions(){return e()},set deletions(n=0){e(n),h()},get showZero(){return i()},set showZero(n=!1){i(n),h()},get size(){return o()},set size(n="sm"){o(n),h()},get inline(){return _()},set inline(n=!0){_(n),h()},get loading(){return u()},set loading(n=!1){u(n),h()},get class(){return d()},set class(n=""){d(n),h()},$set:re,$on:(n,w)=>se(a,n,w)},C=le(),z=X(C);{var p=n=>{var w=Pe(),K=q(w);{var E=g=>{var m=Ie(),N=U(m,!0);T(D=>W(N,D),[()=>k.shared_lineChangeStats_calculating_label()]),f(g,m)},V=g=>{var m=Ne(),N=X(m);{var D=s=>{var l=Me(),b=S(q(l),2),I=U(b,!0);G(l),T(Y=>W(I,Y),[()=>H(c())]),f(s,l)};A(N,s=>{(c()>0||i())&&s(D)})}var Z=S(N,2);{var j=s=>{var l=Ae(),b=S(q(l),2),I=U(b,!0);G(l),T(Y=>W(I,Y),[()=>H(e())]),f(s,l)};A(Z,s=>{(e()>0||i())&&s(j)})}var x=S(Z,2);{var Q=s=>{var l=Le(),b=U(l,!0);T(I=>W(b,I),[()=>k.shared_lineChangeStats_noChanges_label()]),f(s,l)};A(x,s=>{!c()&&!e()&&!i()&&s(Q)})}f(g,m)};A(K,g=>{u()?g(E):g(V,-1)})}G(w),T(g=>te(w,1,g),[()=>me(ve("whitespace-nowrap",_()?"inline-flex":"flex","items-center font-mono",r(R),d()))]),f(n,w)};A(z,n=>{r(y)&&n(p)})}return f(t,C),oe(F)}const ze=new Map([["STRONG","strong"],["B","strong"],["EM","em"],["I","em"],["CODE","code"]]),De=new Set(["AUDIO","BUTTON","CANVAS","DETAILS","EMBED","HR","IFRAME","IMG","INPUT","OBJECT","PICTURE","PRE","SELECT","SVG","TABLE","TEXTAREA","VIDEO"]),Oe=new Set(["ARTICLE","BLOCKQUOTE","DD","DIV","DT","FOOTER","H1","H2","H3","H4","H5","H6","HEADER","LI","P","SECTION"]);function Be(t){return typeof Intl.Segmenter=="function"?Array.from(new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(t),({segment:a})=>a):Array.from(t)}function ee(t,a,c,e){for(const i of Be(a.replace(/\s+/gu," "))){const o=i===" ";if(!(o&&(!e.hasText||e.lastWasSpace))){if(e.visibleLength>=c){if(o)return;e.truncated||t.append(document.createTextNode("…")),e.truncated=!0;return}t.append(document.createTextNode(i)),e.visibleLength+=1,e.hasText=!0,e.lastWasSpace=o}}}function ae(t,a,c,e){if(e.truncated)return;if(t.nodeType===Node.TEXT_NODE){ee(a,t.textContent??"",c,e);return}if(!(t instanceof HTMLElement)||De.has(t.tagName))return;if(t.tagName==="BR"){ee(a," ",c,e);return}const i=ze.get(t.tagName);if(i){const o=document.createElement(i);a.append(o);for(const _ of t.childNodes)ae(_,o,c,e);o.textContent||o.remove();return}Oe.has(t.tagName)&&e.hasText&&ee(a," ",c,e);for(const o of t.childNodes)ae(o,a,c,e)}async function He(t,a=80){const c=await Te(t,{allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!1,processPrimitives:!1,taskBlockRenderMode:"content"}),e=document.createElement("template");e.innerHTML=c;const i=document.createElement("span"),o={visibleLength:0,hasText:!1,lastWasSpace:!1,truncated:!1},_=Math.max(0,Math.floor(a));for(const u of e.content.childNodes)ae(u,i,_,o);return i.innerHTML.trim()}async function Fe(t){const a=await He(t,Number.MAX_SAFE_INTEGER),c=document.createElement("span");return c.innerHTML=a,(c.textContent??"").replace(/<\/?[A-Za-z][^>]*>/gu,"").replace(/\s+/gu," ").trim()}var Ve=P('<span data-testid="agent-preview-tool-icon"><!></span>'),Ze=P('<span><!> <span class="min-w-0 flex-1 truncate text-inherit opacity-[inherit]" data-testid="agent-preview-tool-text"> </span></span>');function Ue(t,a){if(new.target)return ne({component:Ue,...t});ie(a,!0);const c=new Set(["figma","sentry","playwright","github","linear","slack","context7"]);let e=v(a,"toolUse",7),i=v(a,"animate",7,!1),o=v(a,"iconSize",7,12),_=v(a,"showIcon",7,!0),u=v(a,"class",7,"");const d=L(()=>xe(e().name,e().input||{})),y=L(()=>[r(d).verb,r(d).subject,r(d).path].filter(Boolean).join(" ").trim()||r(d).verb||k.chat_previewToolLabel_tool_fallback());let R=_e("");fe(()=>{const p=r(y);let n=!1;return Fe(p).then(w=>{n||ge(R,w,!0)}),()=>{n=!0}});var H={get toolUse(){return e()},set toolUse(p){e(p),h()},get animate(){return i()},set animate(p=!1){i(p),h()},get iconSize(){return o()},set iconSize(p=12){o(p),h()},get showIcon(){return _()},set showIcon(p=!0){_(p),h()},get class(){return u()},set class(p=""){u(p),h()},$set:re,$on:(p,n)=>se(a,p,n)},F=le(),C=X(F);{var z=p=>{var n=Ze(),w=q(n);{var K=g=>{var m=Ve(),N=q(m);{var D=x=>{be(x,{get iconName(){return r(d).mcpSource},get label(){return r(d).mcpSource},get size(){return o()}})},Z=L(()=>r(d).mcpSource&&c.has(r(d).mcpSource)),j=x=>{ke(x,{get icon(){return r(d).icon},class:"h-full! w-full! text-inherit opacity-[inherit]"})};A(N,x=>{r(Z)?x(D):x(j,-1)})}G(m),T(()=>{te(m,1,`agent-preview-tool-icon inline-flex shrink-0 items-center justify-center text-inherit opacity-[inherit] ${i()?"animate-pulse":""}`,"svelte-115ywqs"),ce(m,`width: ${o()??""}px; height: ${o()??""}px;`)}),f(g,m)};A(w,g=>{_()&&g(K)})}var E=S(w,2),V=U(E,!0);he(E,(g,m)=>we?.(g,m),()=>r(R)),G(n),T(()=>{te(n,1,`type-body inline-flex w-full min-w-0 items-center font-normal ${_()?"gap-1.5":""} ${u()??""}`,"svelte-115ywqs"),W(V,r(R))}),f(p,n)};A(C,p=>{r(d).hidden||p(z)})}return f(t,F),oe(H)}var qe=B('<circle cx="12" cy="12" r="10" stroke-width="2" fill="none"></circle>'),Ge=B('<path d="M7 12.5L10.5 16L17 9" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" fill="none"></path>'),Ke=B('<path d="M5 19L19 5" stroke-width="2.5" stroke-linecap="round"></path>'),je=B('<path d="M13.1372 17.7135C13.1372 18.1682 12.9566 18.6042 12.6351 18.9257C12.3136 19.2472 11.8776 19.4278 11.4229 19.4278C10.9683 19.4278 10.5322 19.2472 10.2107 18.9257C9.88925 18.6042 9.70864 18.1682 9.70864 17.7135C9.70864 17.2589 9.88925 16.8228 10.2107 16.5014C10.5322 16.1799 10.9683 15.9993 11.4229 15.9993C11.8776 15.9993 12.3136 16.1799 12.6351 16.5014C12.9566 16.8228 13.1372 17.2589 13.1372 17.7135ZM10.2109 7.07297C10.3957 6.88872 10.6201 6.7491 10.8671 6.66473C11.114 6.58037 11.377 6.55349 11.6359 6.58615C11.8948 6.61881 12.1428 6.71015 12.361 6.8532C12.5793 6.99625 12.762 7.18724 12.8953 7.4116C13.0285 7.63597 13.1088 7.8878 13.1299 8.14789C13.1511 8.40799 13.1126 8.66948 13.0174 8.91244C12.9222 9.1554 12.7728 9.37342 12.5805 9.54988C12.3883 9.72634 12.1583 9.85659 11.9081 9.93068C11.1212 10.1604 10.1372 10.901 10.1372 12.1421V12.5707C10.1372 12.9117 10.2727 13.2387 10.5138 13.4798C10.7549 13.7209 11.0819 13.8564 11.4229 13.8564C11.7639 13.8564 12.0909 13.7209 12.3321 13.4798C12.5732 13.2387 12.7086 12.9117 12.7086 12.5707V12.3735C13.3281 12.1785 13.8952 11.8451 14.3669 11.3988C14.8387 10.9524 15.2029 10.4046 15.4319 9.79683C15.6609 9.18906 15.7487 8.53719 15.6888 7.89048C15.6289 7.24377 15.4228 6.61913 15.0861 6.06376C14.7494 5.50838 14.2908 5.03681 13.7451 4.68466C13.1994 4.33251 12.5808 4.10899 11.936 4.03101C11.2912 3.95302 10.6371 4.0226 10.0232 4.23449C9.40925 4.44638 8.8515 4.79503 8.39207 5.25411C8.26933 5.37277 8.17145 5.51469 8.10414 5.67158C8.03683 5.82848 8.00145 5.9972 8.00004 6.16792C7.99864 6.33864 8.03125 6.50792 8.09597 6.6659C8.16069 6.82388 8.25623 6.96739 8.37701 7.08805C8.49778 7.20871 8.64138 7.30411 8.79942 7.36868C8.95746 7.43326 9.12677 7.46571 9.29749 7.46414C9.4682 7.46258 9.6369 7.42703 9.79373 7.35958C9.95056 7.29212 10.0924 7.19411 10.2109 7.07125V7.07297Z" fill="white" class="origin-center"></path>'),We=B('<path d="M12 5.5V13.5" stroke="white" stroke-width="3" stroke-linecap="round"></path><circle cx="12" cy="17.5" r="1.6" fill="white" class="origin-center"></circle>',1),Xe=B('<path d="M11.6668 13.649C12.1044 13.649 12.5241 13.4751 12.8336 13.1656C13.1431 12.8562 13.3169 12.4365 13.3169 11.9988C13.3169 11.5611 13.1431 11.1414 12.8336 10.832C12.5241 10.5225 12.1044 10.3486 11.6668 10.3486C11.2291 10.3486 10.8094 10.5225 10.4999 10.832C10.1905 11.1414 10.0166 11.5611 10.0166 11.9988C10.0166 12.4365 10.1905 12.8562 10.4999 13.1656C10.8094 13.4751 11.2291 13.649 11.6668 13.649Z" fill="white" class="origin-center"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.38506 12.3064C4.31566 12.1046 4.31566 11.8855 4.38506 11.6837C4.90912 10.1693 5.89241 8.85596 7.198 7.92665C8.50359 6.99734 10.0665 6.4983 11.669 6.49902C13.2716 6.49975 14.834 7.00021 16.1388 7.9307C17.4435 8.8612 18.4256 10.1754 18.9483 11.6903C19.0177 11.8921 19.0177 12.1112 18.9483 12.313C18.4245 13.8278 17.4412 15.1416 16.1355 16.0712C14.8298 17.0008 13.2666 17.5 11.6638 17.4993C10.0609 17.4986 8.49824 16.9979 7.19336 16.0671C5.88848 15.1363 4.90641 13.8217 4.38396 12.3064H4.38506ZM14.9681 11.9984C14.9681 12.8737 14.6204 13.7131 14.0015 14.3321C13.3825 14.951 12.5431 15.2987 11.6678 15.2987C10.7925 15.2987 9.95304 14.951 9.33411 14.3321C8.71517 13.7131 8.36746 12.8737 8.36746 11.9984C8.36746 11.1231 8.71517 10.2836 9.33411 9.66468C9.95304 9.04575 10.7925 8.69803 11.6678 8.69803C12.5431 8.69803 13.3825 9.04575 14.0015 9.66468C14.6204 10.2836 14.9681 11.1231 14.9681 11.9984Z" fill="white" class="origin-center"></path>',1),Je=B('<svg viewBox="0 0 24 24" fill="none"><defs><clipPath><rect x="48%" y="0" width="100%" height="100%"></rect></clipPath></defs><circle cx="50%" cy="50%" class="transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none origin-center"></circle><circle cx="50%" cy="50%" r="45%" stroke-width="2.5" fill="none" class="transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none"></circle><!></svg>');function Qe(t,a){if(new.target)return ne({component:Qe,...t});ie(a,!0);const c=new Set(["not_started","waiting","discussion_needed","blocked","in_progress","review_required","complete","cancelled"]);let e=v(a,"status",7),i=v(a,"size",7,16),o=v(a,"onclick",7);const _=Math.random().toString(36).substring(2,9);let u=L(()=>e()==="todo"?"not_started":e()==="in-progress"?"in_progress":e()==="done"?"complete":typeof e()=="string"&&c.has(e())?e():"unknown");const d={not_started:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0},waiting:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0},discussion_needed:{stroke:"#f59e0b",fill:"#f59e0b",innerCircleRPercentage:100},blocked:{stroke:"#ef4444",fill:"#ef4444",innerCircleRPercentage:100},in_progress:{stroke:"#00BCFF",fill:"#00BCFF",innerCircleRPercentage:55},review_required:{stroke:"#3b82f6",fill:"#3b82f6",innerCircleRPercentage:100},complete:{stroke:"#22c55e",fill:"#00BD7D",innerCircleRPercentage:100},cancelled:{stroke:"#99999966",fill:"#99999966",innerCircleRPercentage:0},unknown:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0}};let y=L(()=>d[r(u)]||d.not_started);const R={not_started:k.tiptap_taskStatus_notStarted_label,waiting:k.tiptap_taskStatus_waiting_label,discussion_needed:k.tiptap_taskStatus_discussionNeeded_label,blocked:k.tiptap_taskStatus_blocked_label,in_progress:k.tiptap_taskStatus_inProgress_label,review_required:k.tiptap_taskStatus_reviewRequired_label,complete:k.tiptap_taskStatus_complete_label,cancelled:k.tiptap_taskStatus_cancelled_label,unknown:k.tiptap_taskStatus_unknown_label};let H=L(()=>(R[r(u)]??k.tiptap_taskStatus_unknown_label)());var F={get status(){return e()},set status(C){e(C),h()},get size(){return i()},set size(C=16){i(C),h()},get onclick(){return o()},set onclick(C){o(C),h()},$set:re,$on:(C,z)=>se(a,C,z)};{let C=L(()=>k.tiptap_taskStatus_status_tooltip({status:r(H)}));Se(t,{type:"button",variant:"ghost",size:"icon-compact",iconOnly:!0,class:"task-status-icon shrink-0 cursor-pointer bg-transparent border-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-primary-ink rounded-full",get style(){return`width: ${i()??""}px; height: ${i()??""}px;`},get onclick(){return o()},get title(){return r(C)},children:(z,p)=>{var n=Je(),w=q(n),K=U(w),E=S(w),V=S(E),g=S(V);{var m=s=>{},N=s=>{var l=qe();T(()=>M(l,"stroke",r(y).stroke)),f(s,l)},D=s=>{var l=Ge();O(3,l,()=>$,()=>({tier:"slow"})),f(s,l)},Z=s=>{var l=Ke();T(()=>M(l,"stroke",r(y).stroke)),O(3,l,()=>$,()=>({tier:"slow"})),f(s,l)},j=s=>{var l=je();O(3,l,()=>J,()=>({tier:"slow"})),f(s,l)},x=s=>{var l=We(),b=X(l),I=S(b);O(3,b,()=>$,()=>({tier:"slow"})),O(3,I,()=>J,()=>({tier:"slow"})),f(s,l)},Q=s=>{var l=Xe(),b=X(l),I=S(b);O(3,b,()=>J,()=>({tier:"slow"})),O(3,I,()=>J,()=>({tier:"slow"})),f(s,l)};A(g,s=>{r(u)==="not_started"||r(u)==="waiting"?s(m):r(u)==="in_progress"?s(N,1):r(u)==="complete"?s(D,2):r(u)==="cancelled"?s(Z,3):r(u)==="discussion_needed"?s(j,4):r(u)==="blocked"?s(x,5):r(u)==="review_required"&&s(Q,6)})}G(n),T(()=>{M(n,"width",i()),M(n,"height",i()),ce(n,`width: ${i()??""}px; height: ${i()??""}px;`),M(K,"id",`half-clip-${_??""}`),M(E,"r",`${r(y).innerCircleRPercentage*.5}%`),M(E,"fill",r(y).fill),M(E,"clip-path",r(u)==="in_progress"?`url(#half-clip-${_})`:"none"),M(V,"stroke",r(y).stroke)}),f(z,n)},$$slots:{default:!0}})}return oe(F)}export{Ue as A,Re as L,Qe as T,Ee as a,He as b,pt as g,ct as o,Fe as r,ut as s};
|