@intent-hq/web 2.365.1 → 2.366.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{CJYn86Zh.js → 0M6fbwP5.js} +1 -1
  3. package/web/app/immutable/chunks/{CKje4aJN.js → 21sFenOt.js} +1 -1
  4. package/web/app/immutable/chunks/{BVrp8JNX.js → 49lTJ3BE.js} +2 -2
  5. package/web/app/immutable/chunks/{lrmMeOQf.js → 4h0tfUCi.js} +3 -3
  6. package/web/app/immutable/chunks/{mCOr3gFd.js → 5E0QgiwD.js} +1 -1
  7. package/web/app/immutable/chunks/{RmJBfBVs.js → 6uErOUPb.js} +1 -1
  8. package/web/app/immutable/chunks/{zZJCq9G-.js → B1SzcYNV.js} +1 -1
  9. package/web/app/immutable/chunks/{CkBkXm1t.js → B3UM3noM.js} +1 -1
  10. package/web/app/immutable/chunks/{DIM_Vy_1.js → BBy28q2Z.js} +1 -1
  11. package/web/app/immutable/chunks/{BkoWIItN.js → BCO7QB9d.js} +2 -2
  12. package/web/app/immutable/chunks/{XZZBqDDU.js → BFcLC0z2.js} +1 -1
  13. package/web/app/immutable/chunks/{ChAjeelV.js → BJ-fbkKc.js} +1 -1
  14. package/web/app/immutable/chunks/{BhPnF9Tm.js → BJI544co.js} +1 -1
  15. package/web/app/immutable/chunks/{COSufLLe.js → BKmmpS_o.js} +1 -1
  16. package/web/app/immutable/chunks/{BKYUqADc.js → BM_VA785.js} +2 -2
  17. package/web/app/immutable/chunks/{HaIAX7Y7.js → BMfv2h4V.js} +4 -4
  18. package/web/app/immutable/chunks/{DBKSlWdm.js → BPrfv6mU.js} +6 -6
  19. package/web/app/immutable/chunks/{noaeKV0Q.js → BQ1ZZijd.js} +1 -1
  20. package/web/app/immutable/chunks/{hcNIFtJ6.js → BRYJbzW_.js} +1 -1
  21. package/web/app/immutable/chunks/{hScRAhOj.js → BUF9JqHS.js} +1 -1
  22. package/web/app/immutable/chunks/{C0XKBd5S.js → BVTzd6Hl.js} +1 -1
  23. package/web/app/immutable/chunks/{BmC4tEjN.js → BXVypBPm.js} +1 -1
  24. package/web/app/immutable/chunks/{DltL77xh.js → BZvRHZRX.js} +3 -3
  25. package/web/app/immutable/chunks/{B1BgnlCp.js → B_DnvXWy.js} +1 -1
  26. package/web/app/immutable/chunks/{C7l0Qi5K.js → BbS3ITS9.js} +3 -3
  27. package/web/app/immutable/chunks/{DNdoVC6a.js → Bbhq0zNP.js} +1 -1
  28. package/web/app/immutable/chunks/{DxbU9ouN.js → BcPqtSWG.js} +1 -1
  29. package/web/app/immutable/chunks/{BtfRwPt7.js → BcZXVFY0.js} +1 -1
  30. package/web/app/immutable/chunks/{Dg4msq0S.js → Bd1yJLuT.js} +3 -3
  31. package/web/app/immutable/chunks/{D52r2_SQ.js → Be6UkUHV.js} +1 -1
  32. package/web/app/immutable/chunks/{vmkeuBVe.js → BgeOjbIJ.js} +1 -1
  33. package/web/app/immutable/chunks/{DtygAQLZ.js → BhRggWJG.js} +1 -1
  34. package/web/app/immutable/chunks/{Dt4bX8KM.js → BhdS24nz.js} +1 -1
  35. package/web/app/immutable/chunks/{DXO8eQ8m.js → BiwwC2i_.js} +1 -1
  36. package/web/app/immutable/chunks/{CAvsAMG1.js → BkkQ86YU.js} +3 -3
  37. package/web/app/immutable/chunks/{C65VWWrO.js → Blze1yhO.js} +1 -1
  38. package/web/app/immutable/chunks/{nP0kFcGH.js → BmCjoY7z.js} +1 -1
  39. package/web/app/immutable/chunks/{bOJ0A0T0.js → BnWwgbQb.js} +2 -2
  40. package/web/app/immutable/chunks/{DHrWTFlr.js → BtvkhtJl.js} +3 -3
  41. package/web/app/immutable/chunks/{dFXYIobT.js → Bu9XbfVp.js} +1 -1
  42. package/web/app/immutable/chunks/{ChgmG2BO.js → BuKCKjfD.js} +1 -1
  43. package/web/app/immutable/chunks/{Cxj53KWB.js → BvXw5pjm.js} +1 -1
  44. package/web/app/immutable/chunks/{DdVKhlSE.js → BxV3tHc5.js} +1 -1
  45. package/web/app/immutable/chunks/{CTZj8P4K.js → BxZoDX0x.js} +1 -1
  46. package/web/app/immutable/chunks/{DHP7uaTl.js → BytTiswf.js} +46 -46
  47. package/web/app/immutable/chunks/{EXklmDak.js → C-VaINAh.js} +1 -1
  48. package/web/app/immutable/chunks/{BFrK5arF.js → C1kTqhrr.js} +1 -1
  49. package/web/app/immutable/chunks/{DkA8rA6d.js → C6h7jyQ0.js} +1 -1
  50. package/web/app/immutable/chunks/{6AoPTtLI.js → CA7EW4TZ.js} +1 -1
  51. package/web/app/immutable/chunks/{DKAYHp4B.js → CCo3qtBT.js} +1 -1
  52. package/web/app/immutable/chunks/{Cv3VPe8L.js → CHANO0NR.js} +1 -1
  53. package/web/app/immutable/chunks/{CBhc_pLy.js → CJJx_QIR.js} +1 -1
  54. package/web/app/immutable/chunks/{CYaSc2Q1.js → CLObTzYA.js} +1 -1
  55. package/web/app/immutable/chunks/{C2I2Ii1u.js → CLrh-ioU.js} +1 -1
  56. package/web/app/immutable/chunks/{Bh-jBfbM.js → CNot5Xcx.js} +1 -1
  57. package/web/app/immutable/chunks/{Bn5omuEb.js → CPj748Kb.js} +1 -1
  58. package/web/app/immutable/chunks/{idGIWvOH.js → CSTA4Rpp.js} +1 -1
  59. package/web/app/immutable/chunks/{DL0qyyOL.js → CXPDYmq9.js} +1 -1
  60. package/web/app/immutable/chunks/{DQ-MSxyp.js → CY6Tgnsl.js} +1 -1
  61. package/web/app/immutable/chunks/{CJXN40w9.js → C_xHqw3E.js} +3 -3
  62. package/web/app/immutable/chunks/{DkjvcUsP.js → CavHmsXI.js} +2 -2
  63. package/web/app/immutable/chunks/{M5LF5FKY.js → CbVQfloe.js} +1 -1
  64. package/web/app/immutable/chunks/{BX9yK5SR.js → CcN7mJ_U.js} +1 -1
  65. package/web/app/immutable/chunks/{CSHq_biu.js → CcOfQ1Gy.js} +2 -2
  66. package/web/app/immutable/chunks/{pQG9xktk.js → ChtQ627P.js} +1 -1
  67. package/web/app/immutable/chunks/{BbS5Qizt.js → CiD1dowc.js} +1 -1
  68. package/web/app/immutable/chunks/{cTDZw3QR.js → Crc_RZlw.js} +1 -1
  69. package/web/app/immutable/chunks/{BEOu6eQL.js → Crxrlr4k.js} +1 -1
  70. package/web/app/immutable/chunks/{apIeVE2H.js → Cs2yVMNS.js} +1 -1
  71. package/web/app/immutable/chunks/{VPexQKGs.js → Cv5uE2nr.js} +1 -1
  72. package/web/app/immutable/chunks/{CVkMmqXo.js → CvrktPas.js} +1 -1
  73. package/web/app/immutable/chunks/{DbGYKgXT.js → CwQ__QB6.js} +1 -1
  74. package/web/app/immutable/chunks/{pGhoz8FU.js → Cz8SK8lY.js} +1 -1
  75. package/web/app/immutable/chunks/{qgDYb1By.js → D-_X4rIZ.js} +2 -2
  76. package/web/app/immutable/chunks/{BpsufErm.js → D06l8Z7y.js} +1 -1
  77. package/web/app/immutable/chunks/{B4H4s5Rg.js → D07ilAuT.js} +1 -1
  78. package/web/app/immutable/chunks/{DePeY13v.js → D0GXE8-2.js} +2 -2
  79. package/web/app/immutable/chunks/{DwUTqa-t.js → D0dCVsGx.js} +1 -1
  80. package/web/app/immutable/chunks/{BDEbFHGY.js → D0g7LNHv.js} +3 -3
  81. package/web/app/immutable/chunks/{DD3t48QH.js → D27jN3Dg.js} +1 -1
  82. package/web/app/immutable/chunks/{BgOH0Zzl.js → D3Uccj5-.js} +1 -1
  83. package/web/app/immutable/chunks/{Dno6xKfG.js → D7BSEHxV.js} +1 -1
  84. package/web/app/immutable/chunks/{tPn0bGH7.js → D7NgsFtX.js} +4 -4
  85. package/web/app/immutable/chunks/{Dwcp9g5N.js → D7p6sqYu.js} +1 -1
  86. package/web/app/immutable/chunks/{CU5BHy1W.js → DAV1dgP_.js} +1 -1
  87. package/web/app/immutable/chunks/{y4eDAS8h.js → DEBzQhFj.js} +1 -1
  88. package/web/app/immutable/chunks/{D3VgLsjX.js → DJghC2cn.js} +1 -1
  89. package/web/app/immutable/chunks/{CPqT58jI.js → DP8R2A_9.js} +1 -1
  90. package/web/app/immutable/chunks/{BR-Ar56A.js → DVYKRap9.js} +1 -1
  91. package/web/app/immutable/chunks/{DcrFkbHp.js → DVxZwdBj.js} +1 -1
  92. package/web/app/immutable/chunks/{BbdYMVNx.js → DY9_t95j.js} +1 -1
  93. package/web/app/immutable/chunks/{ChXP1yTZ.js → D_ID4BWe.js} +1 -1
  94. package/web/app/immutable/chunks/{CikjWVQh.js → Dao2qcXJ.js} +1 -1
  95. package/web/app/immutable/chunks/{DGrWVJ0v.js → DaqnlEJR.js} +1 -1
  96. package/web/app/immutable/chunks/{GuF0uSZG.js → DboA1NeQ.js} +1 -1
  97. package/web/app/immutable/chunks/{DBRi5-39.js → DcdXOwGw.js} +1 -1
  98. package/web/app/immutable/chunks/{bfJbR-yE.js → Det4RbYN.js} +1 -1
  99. package/web/app/immutable/chunks/{pXldx06t.js → DlT8jbfO.js} +1 -1
  100. package/web/app/immutable/chunks/{D--zmlwp.js → DmNvVRRE.js} +1 -1
  101. package/web/app/immutable/chunks/{D-qAIzQP.js → DqAYbvOg.js} +2 -2
  102. package/web/app/immutable/chunks/{B-AmD-Nq.js → DrNuCzBC.js} +1 -1
  103. package/web/app/immutable/chunks/{BuZhTAVX.js → DsVuLeey.js} +1 -1
  104. package/web/app/immutable/chunks/{8NOm3iaU.js → Dsr7i_He.js} +1 -1
  105. package/web/app/immutable/chunks/{DqNieJFI.js → Exc8p1jd.js} +1 -1
  106. package/web/app/immutable/chunks/{BjW79gKz.js → FBvbrcZr.js} +1 -1
  107. package/web/app/immutable/chunks/{CWADgVJP.js → HL3zgzKn.js} +1 -1
  108. package/web/app/immutable/chunks/{BNUyltQZ.js → Km71QNzW.js} +1 -1
  109. package/web/app/immutable/chunks/{D6dBEmMZ.js → OZBmmXod.js} +3 -3
  110. package/web/app/immutable/chunks/{DHh2eCii.js → QSE3LueN.js} +1 -1
  111. package/web/app/immutable/chunks/{CibNXCBL.js → QisRq2Sw.js} +1 -1
  112. package/web/app/immutable/chunks/{CGs0vmiU.js → V9WvgRYX.js} +1 -1
  113. package/web/app/immutable/chunks/{Z3XtTxwQ.js → VFjJnRWQ.js} +2 -2
  114. package/web/app/immutable/chunks/{C2MLvspO.js → W11aBxPu.js} +1 -1
  115. package/web/app/immutable/chunks/{DyYcnOWN.js → Zfe2ndo2.js} +1 -1
  116. package/web/app/immutable/chunks/{DOkTuNnC.js → _Kd9GHXD.js} +1 -1
  117. package/web/app/immutable/chunks/{4Kf5TY5X.js → _vlUWDHN.js} +1 -1
  118. package/web/app/immutable/chunks/{DTJ583wE.js → aMfDxuvw.js} +1 -1
  119. package/web/app/immutable/chunks/{DcimsnLD.js → cOqLUCrx.js} +1 -1
  120. package/web/app/immutable/chunks/{C0ItZHN5.js → fVUImVux.js} +1 -1
  121. package/web/app/immutable/chunks/{Cu9L3sv4.js → gb92yXjT.js} +1 -1
  122. package/web/app/immutable/chunks/{B74l16-1.js → iSEs_vDT.js} +1 -1
  123. package/web/app/immutable/chunks/{DT3Hhppd.js → k1zcqeIU.js} +1 -1
  124. package/web/app/immutable/chunks/{2AhpRF3T.js → qiLHIFHW.js} +1 -1
  125. package/web/app/immutable/chunks/{CxIswu2X.js → sYqaWTP3.js} +1 -1
  126. package/web/app/immutable/chunks/{CwhN6crj.js → uqpkI3ja.js} +1 -1
  127. package/web/app/immutable/entry/{app.7G8GWQFV.js → app.D_4OTEkX.js} +2 -2
  128. package/web/app/immutable/entry/start.qUtaE6c2.js +1 -0
  129. package/web/app/immutable/nodes/{0.DRiM7T-G.js → 0.2VtZG26z.js} +1 -1
  130. package/web/app/immutable/nodes/{1.9vkn3vyy.js → 1.B0usVk87.js} +1 -1
  131. package/web/app/immutable/nodes/{10.DSYgbbT9.js → 10.BsWr1W3S.js} +4 -4
  132. package/web/app/immutable/nodes/{11.CIM80lhx.js → 11.BQtMkcf2.js} +1 -1
  133. package/web/app/immutable/nodes/{15.3l37Ve75.js → 15.BLJkehTM.js} +1 -1
  134. package/web/app/immutable/nodes/{19.CnXH3Iz_.js → 19.CM_o2Cvu.js} +2 -2
  135. package/web/app/immutable/nodes/{2.wGzWUUPc.js → 2.D3E2UrAW.js} +4 -4
  136. package/web/app/immutable/nodes/{3.CTWSQnPv.js → 3.DdcIH9ug.js} +1 -1
  137. package/web/app/immutable/nodes/{4.BSig_ApP.js → 4.PpqfkNsN.js} +1 -1
  138. package/web/app/immutable/nodes/{5.NR-bMbpi.js → 5.D-L3Wu1j.js} +1 -1
  139. package/web/app/immutable/nodes/{6.Xig6esy6.js → 6.BD1nMsC2.js} +1 -1
  140. package/web/app/immutable/nodes/{7.FpVTsVRc.js → 7.CpDR971O.js} +1 -1
  141. package/web/app/immutable/nodes/{8.CqRfRN2m.js → 8.C49Lx7aV.js} +1 -1
  142. package/web/app/immutable/nodes/{9.nHcDmWdB.js → 9.BoGpnsP3.js} +11 -11
  143. package/web/app/version.json +1 -1
  144. package/web/generated/paraglide.js +8 -8
  145. package/web/index.html +9 -9
  146. package/web/app/immutable/entry/start.Cgrocrgj.js +0 -1
@@ -1,4 +1,4 @@
1
- import{k as qa,s as fa}from"./ChXP1yTZ.js";import{p as ma,g as Ct,I as Wa,X as Ka,e as Nn}from"./CDDY7bU6.js";import{Z as Qa,cW as Ga,A as Va,a_ as xn,bZ as Ya,v as Xa}from"./CikjWVQh.js";import{bm as c,t as Pt,bo as w,bw as Tt,b as Rt,bq as qn,bs as Re,br as Za}from"./DUPdECze.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 ze,bH as h,b$ as Kt,bV as le,cd as Mt,br as va,be as un,c5 as Ja,bi as En,bj as er,bf as hn,am as ta,ax as na,ai as tr,aj as nr,c0 as ar}from"./CJxGDkBm.js";import{i as M}from"./BxPVGrtc.js";import{s as _a}from"./NvPqoUzX.js";import{e as rr}from"./B8trXsZY.js";import{s as q,g as en,f as ve,b as sr}from"./DYGZj8tM.js";import{a as or,n as ha}from"./tAo3FW4C.js";import{r as ir,o as lr,A as aa,L as dr}from"./qgDYb1By.js";import{t as Dn}from"./DAsc1V4f.js";import{R as ra}from"./BDjmUG9E.js";import{I as ba}from"./Dlc9o8A3.js";import"./O8wCypGr.js";import{aN as wn,cK as ur,aw as cr,aL as pr,cE as gr,cF as fr,as as mr,au as vr,aB as _r,aH as hr,s as br,O as wr,e3 as kr,X as xr,cv as yr,c1 as $r}from"./R5qsERXh.js";import{I$ as Z,ck as zn,ci as wa,cl as kn,re as Ar,Dw as Sr,fM as ka,DB as Ir,bz as Cr,zO as Pr,mD as sa,ua as Tr,co as Rr,uL as oa,ny as Or,Dg as Lr,Dz as Nr,c6 as Er}from"./Dou_hoaA.js";import{A as Dr,b as Mr}from"./BD1NrJz7.js";import{y as Fr}from"./gsFx6FSh.js";import{l as zr}from"./fW0x-eTr.js";import{f as ia}from"./D--zmlwp.js";import{h as Br,g as jr}from"./BvbYtLg2.js";import{o as Hr,S as Ur}from"./CJXN40w9.js";import"./Cez5l2e8.js";import{ae as qr,ah as Wr,f as Mn,a1 as Kr}from"./CdO4czEi.js";import{h as Qr,F as la}from"./DeOvWG_V.js";import"./LvmqpfcL.js";import{C as Gr,k as Vr,j as Yr,i as Xr}from"./B5sCzlWo.js";import{L as Zr}from"./C2HONuYz.js";import{c as de}from"./DKOGfBeL.js";import{c as Bn,b as da,d as jn,a as Hn,A as xa}from"./D3VgLsjX.js";import{l as Wt,b as Jr}from"./CzTFPES1.js";import{F as es,bc as ts}from"./CKje4aJN.js";import{D as ns}from"./UwuLSYhm.js";import{b as as}from"./D0Mixsx9.js";import{T as rs}from"./8FzUlqXC.js";import"./Cp7HmDFx.js";import{cl as ya,cP as ss,cO as os,bR as is,M as ls,F as yn,b5 as ds,au as us,aK as cs,aG as ps,cT as gs,be as fs,aA as ms,aL as vs,b1 as _s,ah as ua,a8 as hs,c6 as bs,ag as ws,cF as ks,an as xs,cS as ys,aD as $s}from"./DWlZtz5u.js";import{b as As}from"./NtFyWdpR.js";import"./BlNY__m5.js";import{S as bn}from"./BcGvQa_4.js";import{E as Ss}from"./CMryofjF.js";import"./BA-RDf27.js";import{f as Is}from"./DNr6674E.js";import{P as Cs}from"./DlxzdASI.js";import{b as Ps,P as Ts}from"./CXs9CJFc.js";import{g as Rs,F as Os,f as Ls}from"./BBBowEhf.js";const Ns=80,Es=10,Ds=new Qa(Ga,{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 Ft(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 tl(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const i=Ft(o[1]);return Sn(o[0],i)?i:null}function Qn(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 v=r[1],f=v.match(/\\+$/)?.[0].length??0;if(v!==v.trim()||v.includes("**")||v.startsWith("*")||v.endsWith("*")||f%2!==0)return null}const p=Ft(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=Gn(o,!0),d=i.heading?{body:i.body}:Qn(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 nl(a){const n=[];let o=a;for(;o.trim();){const i=Gn(o,!0,Kn),d=i.heading?{title:i.heading,body:i.body}:Qn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function al(a){const n=Fs(a),o=[];let i=a;for(n.heading&&(o.push({title:n.heading,body:""}),i=n.body);i;){const d=Qn(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=Ft(d);return!d.includes(`
1
+ import{k as qa,s as fa}from"./D_ID4BWe.js";import{p as ma,g as Ct,I as Wa,X as Ka,e as Nn}from"./CDDY7bU6.js";import{Z as Qa,cW as Ga,A as Va,a_ as xn,bZ as Ya,v as Xa}from"./Dao2qcXJ.js";import{bm as c,t as Pt,bo as w,bw as Tt,b as Rt,bq as qn,bs as Re,br as Za}from"./DUPdECze.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 ze,bH as h,b$ as Kt,bV as le,cd as Mt,br as va,be as un,c5 as Ja,bi as En,bj as er,bf as hn,am as ta,ax as na,ai as tr,aj as nr,c0 as ar}from"./CJxGDkBm.js";import{i as M}from"./BxPVGrtc.js";import{s as _a}from"./NvPqoUzX.js";import{e as rr}from"./B8trXsZY.js";import{s as q,g as en,f as ve,b as sr}from"./DYGZj8tM.js";import{a as or,n as ha}from"./tAo3FW4C.js";import{r as ir,o as lr,A as aa,L as dr}from"./D-_X4rIZ.js";import{t as Dn}from"./DAsc1V4f.js";import{R as ra}from"./BDjmUG9E.js";import{I as ba}from"./Dlc9o8A3.js";import"./O8wCypGr.js";import{aN as wn,cK as ur,aw as cr,aL as pr,cE as gr,cF as fr,as as mr,au as vr,aB as _r,aH as hr,s as br,O as wr,e3 as kr,X as xr,cv as yr,c1 as $r}from"./R5qsERXh.js";import{I$ as Z,ck as zn,ci as wa,cl as kn,re as Ar,Dw as Sr,fM as ka,DB as Ir,bz as Cr,zO as Pr,mD as sa,ua as Tr,co as Rr,uL as oa,ny as Or,Dg as Lr,Dz as Nr,c6 as Er}from"./Dou_hoaA.js";import{A as Dr,b as Mr}from"./BD1NrJz7.js";import{y as Fr}from"./gsFx6FSh.js";import{l as zr}from"./fW0x-eTr.js";import{f as ia}from"./DmNvVRRE.js";import{h as Br,g as jr}from"./BvbYtLg2.js";import{o as Hr,S as Ur}from"./C_xHqw3E.js";import"./Cez5l2e8.js";import{ae as qr,ah as Wr,f as Mn,a1 as Kr}from"./CdO4czEi.js";import{h as Qr,F as la}from"./DeOvWG_V.js";import"./LvmqpfcL.js";import{C as Gr,k as Vr,j as Yr,i as Xr}from"./B5sCzlWo.js";import{L as Zr}from"./C2HONuYz.js";import{c as de}from"./DKOGfBeL.js";import{c as Bn,b as da,d as jn,a as Hn,A as xa}from"./DJghC2cn.js";import{l as Wt,b as Jr}from"./CzTFPES1.js";import{F as es,bc as ts}from"./21sFenOt.js";import{D as ns}from"./UwuLSYhm.js";import{b as as}from"./D0Mixsx9.js";import{T as rs}from"./8FzUlqXC.js";import"./Cp7HmDFx.js";import{cl as ya,cP as ss,cO as os,bR as is,M as ls,F as yn,b5 as ds,au as us,aK as cs,aG as ps,cT as gs,be as fs,aA as ms,aL as vs,b1 as _s,ah as ua,a8 as hs,c6 as bs,ag as ws,cF as ks,an as xs,cS as ys,aD as $s}from"./DWlZtz5u.js";import{b as As}from"./NtFyWdpR.js";import"./BlNY__m5.js";import{S as bn}from"./BcGvQa_4.js";import{E as Ss}from"./CMryofjF.js";import"./BA-RDf27.js";import{f as Is}from"./DNr6674E.js";import{P as Cs}from"./DlxzdASI.js";import{b as Ps,P as Ts}from"./CXs9CJFc.js";import{g as Rs,F as Os,f as Ls}from"./BBBowEhf.js";const Ns=80,Es=10,Ds=new Qa(Ga,{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 Ft(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 tl(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const i=Ft(o[1]);return Sn(o[0],i)?i:null}function Qn(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 v=r[1],f=v.match(/\\+$/)?.[0].length??0;if(v!==v.trim()||v.includes("**")||v.startsWith("*")||v.endsWith("*")||f%2!==0)return null}const p=Ft(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=Gn(o,!0),d=i.heading?{body:i.body}:Qn(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 nl(a){const n=[];let o=a;for(;o.trim();){const i=Gn(o,!0,Kn),d=i.heading?{title:i.heading,body:i.body}:Qn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function al(a){const n=Fs(a),o=[];let i=a;for(n.heading&&(o.push({title:n.heading,body:""}),i=n.body);i;){const d=Qn(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=Ft(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 Gn(a,n=!1,o=Ft){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&&Ft(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(" "))&&Ft(p[1])?{heading:o(p[1]),body:Un(a,i.length+p[0].length)}:{heading:null,body:a}}function Fs(a,{preserveInlineText:n=!1}={}){const o=n?Kn:Ft,i=Gn(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 v=Ft(p[1]),f=a.slice(d.length+p[0].length);if(f.trim()&&Sn(p[1],v))return{heading:o(p[1]),body:f}}return{heading:null,body:a}}const Qt="[--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)]",rl="type-body font-family-child font-normal text-muted-foreground",sl=`${Qt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,ol=`${Qt} 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`,il=`${Qt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1`,ll=`${Qt} relative min-w-0 max-w-full`,dl=`${Qt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,ul=`${Qt} operational-group-child-row ml-2 min-w-0 w-[calc(100%-0.5rem)] max-w-[calc(100%-0.5rem)]`,cl="pt-6",pl="text-muted-foreground",gl="text-muted-foreground",$a="font-normal text-muted-foreground",fl="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",ml="h-[16px]! w-[16px]! shrink-0",vl=`${Qt} 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`,_l=`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}`,hl=`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}`,bl="type-body flex min-w-0 shrink-0 items-center gap-1 whitespace-nowrap",wl="h-[16px]! w-[16px]! shrink-0 opacity-60 transition-transform duration-[var(--motion-fast)] motion-reduce:transition-none";function kl(a){return qa(a,{axis:"y",duration:ma()?0:150})}function cn(a){return a.type==="thinking"||a.type==="tool_use"||a.type==="content_group"}function xl(a){const n=a?.[0];return!n||cn(n)?"":"pt-4"}function yl(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 $l(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 v=cn(p),f=cn(d);return v&&f?"":p.type==="thinking"&&!f?"pt-6":v||f?"pt-4":"pt-1"}const Al="shrink-0 whitespace-nowrap text-ui text-subtle focus-visible:outline-none focus-visible:text-foreground";function zs(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"||Fr(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>'),Fn=_("<!> <!>",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>'),Qs=_('<div class="min-w-0"><dt class="truncate text-sm text-foreground"> </dt> <dd class="text-xs text-muted-foreground wrap-anywhere"> </dd></div>'),Gs=_('<dl class="ml-3.5 flex flex-col gap-2"></dl>'),Vs=_('<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 Jr(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 v=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,m)=>Rt(n,T,m)},S=Vs(),y=O(S),g=O(y),E=U(g,!0),F=b(g,2),Ce=U(F,!0);$(y);var D=b(y,2);Ct(D,21,()=>i().owners,T=>T.owner,(T,m)=>{var me=Bs();let ue;x(()=>{q(me,"data-owner",e(m).owner),ue=en(me,"",ue,{"flex-grow":e(m).share})}),l(T,me)}),$(D);var P=b(D,2);return de(P,()=>xa,(T,m)=>{m(T,{type:"multiple",children:(me,ue)=>{var R=Fn(),_e=H(R);Ct(_e,17,()=>i().groups,pe=>pe.kind,(pe,G)=>{var W=Oe(),ne=H(W);de(ne,()=>Bn,(ge,Fe)=>{Fe(ge,{get value(){return e(G).kind},get"data-prompt-group"(){return e(G).kind},children:(ot,Q)=>{var I=Fn(),ae=H(I);de(ae,()=>da,(he,N)=>{N(he,{level:4,children:(Le,X)=>{var K=Oe(),J=H(K);de(J,()=>jn,(V,oe)=>{oe(V,{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(Y=>L(yt,Y),[()=>c.agent_contextBreakdown_notCounted_label()]),l(ct,Nt)};M(tt,ct=>{e(G).kind==="native"&&ct(at)})}var Ee=b(tt,2),Gt=U(Ee,!0);$(be),x((ct,Nt)=>{q(je,"data-kind",e(G).kind),L(ut,ct),ve(Ee,1,`shrink-0 tabular-nums ${e(G).kind==="native"?"text-muted-foreground":""}`),L(Gt,Nt)},[()=>p(e(G).kind),()=>r(e(G).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(G).rows,J=>J.key,(J,V)=>{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(V).hint)),l(tt,at)};M(et,tt=>{e(V).hint&&tt(ut)})}$(oe),x(tt=>{L(Ne,e(V).label),ve(be,1,`tabular-nums ${e(V).counted?"":"text-muted-foreground"}`),L(je,tt)},[()=>r(e(V).estTokens)]),l(J,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 G=Oe(),W=H(G);de(W,()=>Bn,(ne,ge)=>{ge(ne,{value:"hidden-skills",class:"mt-1",children:(Fe,ot)=>{var Q=Fn(),I=H(Q);de(I,()=>da,(Be,he)=>{he(Be,{level:4,children:(N,Le)=>{var X=Oe(),K=H(X);de(K,()=>jn,(J,V)=>{V(J,{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=Gs();Ct(X,21,()=>i().hiddenSkills,K=>K.name,(K,J)=>{var V=Qs(),oe=O(V),ee=U(oe,!0),Ne=b(oe,2),be=U(Ne,!0);$(V),x(je=>{L(ee,e(J).name),L(be,je)},[()=>[e(J).detail,e(J).fix].filter(Boolean).join(" · ")]),l(K,V)}),$(X),l(N,X)},$$slots:{default:!0}})}),l(Fe,Q)},$$slots:{default:!0}})}),l(pe,G)};M(ce,pe=>{i().hiddenSkills.length>0&&pe(xe)})}l(me,R)},$$slots:{default:!0}})}),$(S),x((T,m)=>{q(S,"aria-labelledby",`${o}-title`),q(g,"id",`${o}-title`),L(E,T),L(Ce,m),q(D,"aria-label",e(v))},[()=>c.agent_contextBreakdown_title(),()=>c.agent_contextBreakdown_tokens_label({tokens:r(i().estTokens)})]),l(a,S),Lt(f)}const Ys=["intent","user"],Xs=["systemPrompt","toolDescription","provider"],Zs=["native","user","intent"],$n=a=>typeof a=="object"&&a!==null&&!Array.isArray(a),An=a=>typeof a=="number"&&Number.isFinite(a)&&a>=0,Js=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:v,controlHint:f}=a;if(typeof o!="string"||typeof i!="string"||!Js(d)||typeof r!="string"||!Xs.includes(r)||!An(p)||!An(v))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:v,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=Ys.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),v=Zs.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:v,owners:p,hiddenSkills:d.map(to).filter(f=>f!==null)}}async function ao(a){try{const n=await Qr("agent.getSession",{agentId:a});return no(n?.session?.promptBreakdown)}catch{return null}}const pa=es.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),v=w(n,"agentId",7),f=w(n,"breakdown",7),S=le(null);const y=u(()=>f()===void 0&&!!v());ze(()=>{if(!i()||!e(y)||!v())return;const D=v();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===v()?e(S).view:null),E=u(()=>so(p())),F=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 v()},set agentId(D){v(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()}));Gr(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 m=po(),me=O(m);{var ue=W=>{var ne=oo(),ge=O(ne);Aa(ge,{get breakdown(){return e(g)}}),$(ne),l(W,ne)};M(me,W=>{e(g)&&W(ue)})}var R=b(me,2),_e=O(R),ce=U(_e,!0),xe=b(_e,2),pe=U(xe,!0),G=b(xe,2);Ct(G,21,()=>e(F),W=>W.enabled,(W,ne)=>{var ge=co(),Fe=O(ge),ot=U(Fe,!0),Q=b(Fe,2);Ct(Q,21,()=>e(ne).rows,I=>I.key,(I,ae)=>{Zr(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=J=>{var V=lo(),oe=H(V);qr(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(J,V)},K=J=>{var V=Kt();x(()=>L(V,e(ae).label)),l(J,V)};M(Le,J=>{e(ae).description?J(X):J(K,-1)})}l(he,N)},$$slots:{title:!0}})},I=>{var ae=uo();l(I,ae)}),$(Q),$(ge),x(()=>{q(ge,"aria-label",e(ne).label),L(ot,e(ne).label)}),l(W,ge)}),$(G),$(R),$(m),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,m)},$$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),v=w(n,"workspaceId",7),f=w(n,"agentId",7);const S=crypto.randomUUID(),y=Mt(""),g=xn(y,S),E=u(()=>o()?.workspaceId===v()&&o().agentId===f()?o():void 0),F=u(()=>e(E)?.status==="pending"),Ce=u(()=>e(E)?.status==="failed"?e(E).error:"");ze(()=>{const m=v();return f(),y.set(m),()=>Z.dispatch(zn(m,S))}),ze(()=>{e(E)?.status==="succeeded"&&(r(!1),Z.dispatch(wa(v(),S,e(E).requestId)))});function D(){const m=xn.select(Z.state,v(),S);m?.agentId===f()&&m.status==="pending"||Z.dispatch(kn(v(),S,crypto.randomUUID(),f(),{kind:"retire"}))}var P={get open(){return r()},set open(m=!1){r(m),k()},get agentName(){return p()},set agentName(m){p(m),k()},get workspaceId(){return v()},set workspaceId(m){v(m),k()},get agentId(){return f()},set agentId(m){f(m),k()},$set:Tt,$on:(m,me)=>Rt(n,m,me)};{const m=ce=>{var xe=Oe(),pe=H(xe);{var G=W=>{var ne=go(),ge=U(ne,!0);x(()=>L(ge,e(Ce))),l(W,ne)};M(pe,W=>{e(Ce)&&W(G)})}l(ce,xe)};let me=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());ns(a,{get title(){return e(me)},get description(){return e(ue)},get confirmLabel(){return e(R)},get cancelLabel(){return e(_e)},focusSubmit:!1,focusCancel:!0,get busy(){return e(F)},onConfirm:D,get open(){return r()},set open(ce){r(ce)},details:m,$$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,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BKYUqADc.js","/app/immutable/chunks/DUPdECze.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/Dou_hoaA.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CxNkcb8W.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/NvPqoUzX.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/gsFx6FSh.js","/app/immutable/chunks/CKje4aJN.js","/app/immutable/chunks/BDjmUG9E.js","/app/immutable/chunks/BxPVGrtc.js","/app/immutable/chunks/DYGZj8tM.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CdO4czEi.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/CDDY7bU6.js","/app/immutable/chunks/DeOvWG_V.js","/app/immutable/chunks/BophAjr8.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DKOGfBeL.js","/app/immutable/chunks/Db6vgmuJ.js","/app/immutable/chunks/CzTFPES1.js","/app/immutable/chunks/CtnMBSuA.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/DWlZtz5u.js","/app/immutable/chunks/tAo3FW4C.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/R5qsERXh.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/Dc_PiRux.js","/app/immutable/chunks/1d4tWxyl.js","/app/immutable/chunks/Cu2deF-X.js","/app/immutable/chunks/CSHq_biu.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CflYgBql.js","/app/immutable/chunks/Bu_2dHSO.js","/app/immutable/chunks/B2F1R5gp.js","/app/immutable/chunks/Ddv73vDp.js","/app/immutable/chunks/BJNB3KvG.js","/app/immutable/chunks/B5aYN90J.js"])))=>i.map(i=>d[i]);
2
- import{t as Dt,bo as h,bw as Bt,b as Ft,bm as g,bp as Df,bs as yt,bq as ma,br as zs,b6 as ql,bj as Bf,b9 as Ff,bi as zf,ba as Hf,bf as jf,a$ as Wf,b3 as Uf,bh as qf,bk as Vf,a_ as Kf,b8 as Gf,b7 as Jf,b1 as Yf,be as Xf,bl as Zf,bu as Vl,bd as Qf,b5 as $f,b4 as eg,b2 as tg,bc as rg,bb as ng,bg as ag,b0 as og,_ as sg}from"./DUPdECze.js";import{bI as ig,bj as bo,aG as lg,bs as zt,ca as _t,c0 as Un,aD as e,a7 as ht,ay as De,bS as m,be as rr,b$ as jt,b_ as S,bO as x,W as u,bH as T,c9 as d,a5 as E,bl as N,bA as w,bn as Ht,bV as ve,aA as b,aB as k,c5 as vn,aC as Ua,bo as zo,br as Yr,bk as os,ai as so,cd as Ro,aw as Mn,a as cg,aj as Mr,c7 as dg,c6 as Kl,bf as Es,bz as Bd}from"./CJxGDkBm.js";import{i as F}from"./BxPVGrtc.js";import{k as oo}from"./Db6vgmuJ.js";import{g as Lt,h as ug,e as qn,I as ss,i as Rr,o as pg,p as fg,f as gg,s as vg}from"./CDDY7bU6.js";import{s as gn}from"./NvPqoUzX.js";import{c as Ir}from"./DKOGfBeL.js";import{n as Ti}from"./tAo3FW4C.js";import{b as mg,s as oe,g as Ln,e as Sn,c as lr,f as pt}from"./DYGZj8tM.js";import{b as vr}from"./NtFyWdpR.js";import{p as Fd,bG as zd,cX as Hd,dS as hg,dE as bg,aI as yg,cG as _g,ac as xg,d1 as wg,dD as Zo,aN as Hs,ce as kg,R as Sg,b as Ig,a9 as Gl,d7 as Cg,c2 as Eg,X as Pg,dz as Ag,a3 as Tg,dJ as Rg,aq as Mg,c_ as Lg,aE as Ng,n as Og,H as Dg}from"./R5qsERXh.js";import{c as Bg}from"./D-62MVd3.js";import{m as Wn,w as Fg,C as jd,c as zg,R as Hg}from"./BDjmUG9E.js";import{aa as Wd,f as St,ah as Ao,ae as Ri}from"./CdO4czEi.js";import{w as jg,F as Wg}from"./DeOvWG_V.js";import{T as Ug}from"./BOlG4HwD.js";import{F as Rt,bj as Mi,bO as qg,aq as Vg,aS as Kg,cQ as Gg,bn as sl,bE as Jg,aI as Ud,aN as il,d3 as Ps,ad as Li,cs as Yg,ch as Xg,cn as ll,cK as cl,bv as Zg,e as Qg,c3 as Jl,cd as $g,cq as ev,c$ as qd,bY as tv,ba as ci,bg as Go,aH as rv,aB as Ni,aw as Vd,be as Kd,bF as nv,B as av,by as ov,a2 as Gd,b5 as sv,a8 as Jd,cl as iv,an as Yd,cS as Xd,cO as Yl,au as Zd,aM as Xl,cA as lv,cZ as cv,cT as dv,aL as uv,b1 as pv,bR as Qd,bp as fv,ap as dl,c9 as Zl,aA as gv,ab as vv,a9 as mv}from"./DWlZtz5u.js";import{c as $d}from"./ChTqQfQN.js";import{g as hv}from"./CtnMBSuA.js";import{I$ as Ot,bT as bv,si as Ql,sT as yv,JR as _v,JX as xv,i as eu,IE as tu,nK as ru,n_ as nu,nZ as au,nD as js,qm as ul,yq as wv,vs as xs,uL as Oi,vu as kv,nr as ou,J4 as Sv,tz as Iv,oO as su,rC as pl,m8 as $l,a5 as ec,r6 as Cv,r2 as Ev,r7 as Pv,q_ as Av,r4 as Tv,vi as Rv,B3 as iu,B7 as lu,n$ as tc,bl as Di,Hn as Mv,IA as Lv,hg as rc,hf as Nv,nV as Ov,wt as Dv,wu as Bv,ws as nc,C2 as oa,cy as cu,cm as Fv,xr as zv,d7 as Hv,de as jv,Bd as Wv}from"./Dou_hoaA.js";import{z as du,I as uu}from"./gsFx6FSh.js";import{e as ac,i as pu}from"./1d4tWxyl.js";import{e as oc,d as fu,b as Uv,a as qv,f as Vv,I as Kv}from"./CBhc_pLy.js";import{b as gu}from"./PBL2-Yli.js";/* empty css */import{d as vu,G as mu,R as hu,g as bu,f as Gv,M as yu,C as Jv,q as fl,l as Yv,h as Xv,e as Zv,a as _u,o as Qv,S as Eo,K as $v}from"./B5sCzlWo.js";import{D as em,e as tm}from"./CxNkcb8W.js";import"./O8wCypGr.js";import"./Cez5l2e8.js";import"./LvmqpfcL.js";import{b as rm}from"./DtUqlXbM.js";import{r as nm}from"./DVdY8Cc0.js";import{a6 as am,ck as om,cm as sm,cl as im,b3 as lm,b1 as cm,b2 as dm,a4 as um,am as ms,al as pm,cV as fm,aB as sc,aJ as gm,ak as vm,C as mm,i as hm,E as ws,cW as bm,aY as ic,c$ as ym,ah as _m,a9 as xm,r as wm,p as km,aG as Sm,d2 as Im,cM as Cm,cF as Em,R as Pm,cw as Am,bU as Tm}from"./CikjWVQh.js";import{v as Rm,k as Mm,E as Lm,l as Nm,V as Om,q as Dm,n as Bm,A as lc,s as Fm,I as zm,R as Hm,m as jm,W as Wm,o as xu,S as wu,i as Um,g as cc,f as qm,e as Vm,j as Km,h as Gm,c as dc,r as Jm}from"./CJXN40w9.js";import{a as Ym}from"./6AoPTtLI.js";import{aA as Xm,aH as Zm,g as Qm,n as $m,aK as eh,K as th,M as rh,O as nh,at as ah,aD as oh,av as sh}from"./CflYgBql.js";import{f as ih,e as lh,m as Bi,bF as ch,B as dh,bE as uh,bB as ph,ai as uc,bD as fh,be as Fi,ar as gh,k as vh,b4 as mh,q as pc,A as hh,L as fc}from"./CKje4aJN.js";import{i as bh,I as Mo,c as gc}from"./Dlc9o8A3.js";import{A as yh,s as _h}from"./D6dBEmMZ.js";import{e as vc,l as mc,M as ku,m as zi,w as vo}from"./D3VgLsjX.js";import{b as Su}from"./D0Mixsx9.js";import{H as xh}from"./uaMLzsQ7.js";import{t as Qo}from"./DAsc1V4f.js";import{a as wh}from"./BlNY__m5.js";import{P as kh}from"./BIfeWxYG.js";import{C as Hi}from"./CmU8A6S6.js";import"./bOJ0A0T0.js";import{d as Sh,c as Ih}from"./CXs9CJFc.js";import{O as Ch,M as Eh}from"./DR6lkAOz.js";import{aQ as Ph,aY as Ah,aB as Th,b0 as Rh,aO as Mh,aU as Lh,a7 as No,b3 as hc,aK as Nh,aR as Oh,aX as gl,aS as vl,W as di,aq as Dh,X as Bh,a_ as Fh,aJ as zh,aT as Hh,aW as jh,b6 as Wh,b4 as Uh,ay as Iu,p as qh,n as Vh,aV as Kh,_ as Gh,ao as Jh,aD as Yh,z as Xh,aC as Zh,a8 as Qh}from"./lrmMeOQf.js";import{s as ji}from"./ChXP1yTZ.js";import{e as bc}from"./BP_Uw__C.js";import{M as $h}from"./D2QYaH-I.js";import{s as eb,a as tb}from"./BsieX9dN.js";import{u as ml,w as rb,v as Ws,I as nb,A as yc,e as Oo,d as Fa,J as _c,c as ab,f as ob,g as xc,i as sb,b as ib,o as Cu,j as lb,q as Wi,r as cb,O as db,x as ub,k as Eu,S as pb,N as fb,p as gb,n as wc,z as vb,s as mb}from"./DXO8eQ8m.js";import{o as kc,T as ui,a as hb}from"./qgDYb1By.js";import{O as bb,x as yb,i as _b,g as xb,T as wb,d as kb}from"./BeAfjfr4.js";import{D as $o}from"./DBRi5-39.js";import{l as or,e as Sb,f as Sc,m as Ic}from"./CzTFPES1.js";import{A as es}from"./CfruS_oL.js";import"./CuOzd6CB.js";import{h as Pu}from"./BigcqNWS.js";import{C as fa}from"./sCRZaCJk.js";import{M as Ib}from"./HaIAX7Y7.js";/* empty css */import{g as hl}from"./rvnDEnqx.js";import{h as Ui}from"./BKYUqADc.js";import{f as Cc,d as Cb}from"./D--zmlwp.js";import{c as ks}from"./DIcAJPWy.js";import{handleIntentLink as Eb}from"./DkjvcUsP.js";import{a as Ec}from"./D0H3cACA.js";import{t as qi}from"./D2MmXC4A.js";import{s as Pb,a as Ab,M as Au}from"./DltL77xh.js";import{b as Tb,k as Rb}from"./Ddv73vDp.js";import{m as Mb}from"./PVXvIyE8.js";import{showAssistantContent as Lb}from"./Z3XtTxwQ.js";import{o as As,c as Nb,n as Ob}from"./BbS5Qizt.js";import{p as Db}from"./CibNXCBL.js";import{H as Bb}from"./B8dlSoA0.js";import{d as Fb,c as zb,r as Hb,g as jb,w as Jo,e as Wb,W as Ub,b as qb}from"./C7l0Qi5K.js";import{A as Pc}from"./BD1NrJz7.js";import{m as Vb}from"./BOXv-Vsz.js";import{h as hs}from"./1KlOAsvK.js";import{g as Kb,e as Gb,f as Jb,h as Yb}from"./B5aYN90J.js";import{T as pi}from"./8FzUlqXC.js";import"./Cp7HmDFx.js";import{S as Wa}from"./BcGvQa_4.js";import{M as Xb,L as Zb,W as Qb,I as $b}from"./BJNB3KvG.js";import{S as ts,a as Vi,T as Tu,U as Ki,K as ey,A as ty,P as ry,N as ny,j as ay,R as Ac,V as oy}from"./BBBowEhf.js";import{D as sy}from"./BP0mUOHP.js";import{a as iy}from"./BOhDcNg3.js";import{a as ly}from"./BdWqymET.js";import{p as cy}from"./4Kf5TY5X.js";const dy="intent:inline-visual-draft";function pP(r,t){const n=t.title.replace(/\s+/g," ").trim(),a=JSON.stringify({inputs:t.inputs,results:t.results},null,2),o=(a.match(/`+/g)??[]).reduce((c,l)=>Math.max(c,l.length),0),s="`".repeat(Math.max(3,o+1));return`${r}${r?`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BM_VA785.js","/app/immutable/chunks/DUPdECze.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/Dou_hoaA.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CxNkcb8W.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/NvPqoUzX.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/gsFx6FSh.js","/app/immutable/chunks/21sFenOt.js","/app/immutable/chunks/BDjmUG9E.js","/app/immutable/chunks/BxPVGrtc.js","/app/immutable/chunks/DYGZj8tM.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CdO4czEi.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/CDDY7bU6.js","/app/immutable/chunks/DeOvWG_V.js","/app/immutable/chunks/BophAjr8.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DKOGfBeL.js","/app/immutable/chunks/Db6vgmuJ.js","/app/immutable/chunks/CzTFPES1.js","/app/immutable/chunks/CtnMBSuA.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/DWlZtz5u.js","/app/immutable/chunks/tAo3FW4C.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/R5qsERXh.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/Dc_PiRux.js","/app/immutable/chunks/1d4tWxyl.js","/app/immutable/chunks/Cu2deF-X.js","/app/immutable/chunks/CcOfQ1Gy.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CflYgBql.js","/app/immutable/chunks/Bu_2dHSO.js","/app/immutable/chunks/B2F1R5gp.js","/app/immutable/chunks/Ddv73vDp.js","/app/immutable/chunks/BJNB3KvG.js","/app/immutable/chunks/B5aYN90J.js"])))=>i.map(i=>d[i]);
2
+ import{t as Dt,bo as h,bw as Bt,b as Ft,bm as g,bp as Df,bs as yt,bq as ma,br as zs,b6 as ql,bj as Bf,b9 as Ff,bi as zf,ba as Hf,bf as jf,a$ as Wf,b3 as Uf,bh as qf,bk as Vf,a_ as Kf,b8 as Gf,b7 as Jf,b1 as Yf,be as Xf,bl as Zf,bu as Vl,bd as Qf,b5 as $f,b4 as eg,b2 as tg,bc as rg,bb as ng,bg as ag,b0 as og,_ as sg}from"./DUPdECze.js";import{bI as ig,bj as bo,aG as lg,bs as zt,ca as _t,c0 as Un,aD as e,a7 as ht,ay as De,bS as m,be as rr,b$ as jt,b_ as S,bO as x,W as u,bH as T,c9 as d,a5 as E,bl as N,bA as w,bn as Ht,bV as ve,aA as b,aB as k,c5 as vn,aC as Ua,bo as zo,br as Yr,bk as os,ai as so,cd as Ro,aw as Mn,a as cg,aj as Mr,c7 as dg,c6 as Kl,bf as Es,bz as Bd}from"./CJxGDkBm.js";import{i as F}from"./BxPVGrtc.js";import{k as oo}from"./Db6vgmuJ.js";import{g as Lt,h as ug,e as qn,I as ss,i as Rr,o as pg,p as fg,f as gg,s as vg}from"./CDDY7bU6.js";import{s as gn}from"./NvPqoUzX.js";import{c as Ir}from"./DKOGfBeL.js";import{n as Ti}from"./tAo3FW4C.js";import{b as mg,s as oe,g as Ln,e as Sn,c as lr,f as pt}from"./DYGZj8tM.js";import{b as vr}from"./NtFyWdpR.js";import{p as Fd,bG as zd,cX as Hd,dS as hg,dE as bg,aI as yg,cG as _g,ac as xg,d1 as wg,dD as Zo,aN as Hs,ce as kg,R as Sg,b as Ig,a9 as Gl,d7 as Cg,c2 as Eg,X as Pg,dz as Ag,a3 as Tg,dJ as Rg,aq as Mg,c_ as Lg,aE as Ng,n as Og,H as Dg}from"./R5qsERXh.js";import{c as Bg}from"./D-62MVd3.js";import{m as Wn,w as Fg,C as jd,c as zg,R as Hg}from"./BDjmUG9E.js";import{aa as Wd,f as St,ah as Ao,ae as Ri}from"./CdO4czEi.js";import{w as jg,F as Wg}from"./DeOvWG_V.js";import{T as Ug}from"./BOlG4HwD.js";import{F as Rt,bj as Mi,bO as qg,aq as Vg,aS as Kg,cQ as Gg,bn as sl,bE as Jg,aI as Ud,aN as il,d3 as Ps,ad as Li,cs as Yg,ch as Xg,cn as ll,cK as cl,bv as Zg,e as Qg,c3 as Jl,cd as $g,cq as ev,c$ as qd,bY as tv,ba as ci,bg as Go,aH as rv,aB as Ni,aw as Vd,be as Kd,bF as nv,B as av,by as ov,a2 as Gd,b5 as sv,a8 as Jd,cl as iv,an as Yd,cS as Xd,cO as Yl,au as Zd,aM as Xl,cA as lv,cZ as cv,cT as dv,aL as uv,b1 as pv,bR as Qd,bp as fv,ap as dl,c9 as Zl,aA as gv,ab as vv,a9 as mv}from"./DWlZtz5u.js";import{c as $d}from"./ChTqQfQN.js";import{g as hv}from"./CtnMBSuA.js";import{I$ as Ot,bT as bv,si as Ql,sT as yv,JR as _v,JX as xv,i as eu,IE as tu,nK as ru,n_ as nu,nZ as au,nD as js,qm as ul,yq as wv,vs as xs,uL as Oi,vu as kv,nr as ou,J4 as Sv,tz as Iv,oO as su,rC as pl,m8 as $l,a5 as ec,r6 as Cv,r2 as Ev,r7 as Pv,q_ as Av,r4 as Tv,vi as Rv,B3 as iu,B7 as lu,n$ as tc,bl as Di,Hn as Mv,IA as Lv,hg as rc,hf as Nv,nV as Ov,wt as Dv,wu as Bv,ws as nc,C2 as oa,cy as cu,cm as Fv,xr as zv,d7 as Hv,de as jv,Bd as Wv}from"./Dou_hoaA.js";import{z as du,I as uu}from"./gsFx6FSh.js";import{e as ac,i as pu}from"./1d4tWxyl.js";import{e as oc,d as fu,b as Uv,a as qv,f as Vv,I as Kv}from"./CJJx_QIR.js";import{b as gu}from"./PBL2-Yli.js";/* empty css */import{d as vu,G as mu,R as hu,g as bu,f as Gv,M as yu,C as Jv,q as fl,l as Yv,h as Xv,e as Zv,a as _u,o as Qv,S as Eo,K as $v}from"./B5sCzlWo.js";import{D as em,e as tm}from"./CxNkcb8W.js";import"./O8wCypGr.js";import"./Cez5l2e8.js";import"./LvmqpfcL.js";import{b as rm}from"./DtUqlXbM.js";import{r as nm}from"./DVdY8Cc0.js";import{a6 as am,ck as om,cm as sm,cl as im,b3 as lm,b1 as cm,b2 as dm,a4 as um,am as ms,al as pm,cV as fm,aB as sc,aJ as gm,ak as vm,C as mm,i as hm,E as ws,cW as bm,aY as ic,c$ as ym,ah as _m,a9 as xm,r as wm,p as km,aG as Sm,d2 as Im,cM as Cm,cF as Em,R as Pm,cw as Am,bU as Tm}from"./Dao2qcXJ.js";import{v as Rm,k as Mm,E as Lm,l as Nm,V as Om,q as Dm,n as Bm,A as lc,s as Fm,I as zm,R as Hm,m as jm,W as Wm,o as xu,S as wu,i as Um,g as cc,f as qm,e as Vm,j as Km,h as Gm,c as dc,r as Jm}from"./C_xHqw3E.js";import{a as Ym}from"./CA7EW4TZ.js";import{aA as Xm,aH as Zm,g as Qm,n as $m,aK as eh,K as th,M as rh,O as nh,at as ah,aD as oh,av as sh}from"./CflYgBql.js";import{f as ih,e as lh,m as Bi,bF as ch,B as dh,bE as uh,bB as ph,ai as uc,bD as fh,be as Fi,ar as gh,k as vh,b4 as mh,q as pc,A as hh,L as fc}from"./21sFenOt.js";import{i as bh,I as Mo,c as gc}from"./Dlc9o8A3.js";import{A as yh,s as _h}from"./OZBmmXod.js";import{e as vc,l as mc,M as ku,m as zi,w as vo}from"./DJghC2cn.js";import{b as Su}from"./D0Mixsx9.js";import{H as xh}from"./uaMLzsQ7.js";import{t as Qo}from"./DAsc1V4f.js";import{a as wh}from"./BlNY__m5.js";import{P as kh}from"./BIfeWxYG.js";import{C as Hi}from"./CmU8A6S6.js";import"./BnWwgbQb.js";import{d as Sh,c as Ih}from"./CXs9CJFc.js";import{O as Ch,M as Eh}from"./DR6lkAOz.js";import{aQ as Ph,aY as Ah,aB as Th,b0 as Rh,aO as Mh,aU as Lh,a7 as No,b3 as hc,aK as Nh,aR as Oh,aX as gl,aS as vl,W as di,aq as Dh,X as Bh,a_ as Fh,aJ as zh,aT as Hh,aW as jh,b6 as Wh,b4 as Uh,ay as Iu,p as qh,n as Vh,aV as Kh,_ as Gh,ao as Jh,aD as Yh,z as Xh,aC as Zh,a8 as Qh}from"./4h0tfUCi.js";import{s as ji}from"./D_ID4BWe.js";import{e as bc}from"./BP_Uw__C.js";import{M as $h}from"./D2QYaH-I.js";import{s as eb,a as tb}from"./BsieX9dN.js";import{u as ml,w as rb,v as Ws,I as nb,A as yc,e as Oo,d as Fa,J as _c,c as ab,f as ob,g as xc,i as sb,b as ib,o as Cu,j as lb,q as Wi,r as cb,O as db,x as ub,k as Eu,S as pb,N as fb,p as gb,n as wc,z as vb,s as mb}from"./BiwwC2i_.js";import{o as kc,T as ui,a as hb}from"./D-_X4rIZ.js";import{O as bb,x as yb,i as _b,g as xb,T as wb,d as kb}from"./BeAfjfr4.js";import{D as $o}from"./DcdXOwGw.js";import{l as or,e as Sb,f as Sc,m as Ic}from"./CzTFPES1.js";import{A as es}from"./CfruS_oL.js";import"./CuOzd6CB.js";import{h as Pu}from"./BigcqNWS.js";import{C as fa}from"./sCRZaCJk.js";import{M as Ib}from"./BMfv2h4V.js";/* empty css */import{g as hl}from"./rvnDEnqx.js";import{h as Ui}from"./BM_VA785.js";import{f as Cc,d as Cb}from"./DmNvVRRE.js";import{c as ks}from"./DIcAJPWy.js";import{handleIntentLink as Eb}from"./CavHmsXI.js";import{a as Ec}from"./D0H3cACA.js";import{t as qi}from"./D2MmXC4A.js";import{s as Pb,a as Ab,M as Au}from"./BZvRHZRX.js";import{b as Tb,k as Rb}from"./Ddv73vDp.js";import{m as Mb}from"./PVXvIyE8.js";import{showAssistantContent as Lb}from"./VFjJnRWQ.js";import{o as As,c as Nb,n as Ob}from"./CiD1dowc.js";import{p as Db}from"./QisRq2Sw.js";import{H as Bb}from"./B8dlSoA0.js";import{d as Fb,c as zb,r as Hb,g as jb,w as Jo,e as Wb,W as Ub,b as qb}from"./BbS3ITS9.js";import{A as Pc}from"./BD1NrJz7.js";import{m as Vb}from"./BOXv-Vsz.js";import{h as hs}from"./1KlOAsvK.js";import{g as Kb,e as Gb,f as Jb,h as Yb}from"./B5aYN90J.js";import{T as pi}from"./8FzUlqXC.js";import"./Cp7HmDFx.js";import{S as Wa}from"./BcGvQa_4.js";import{M as Xb,L as Zb,W as Qb,I as $b}from"./BJNB3KvG.js";import{S as ts,a as Vi,T as Tu,U as Ki,K as ey,A as ty,P as ry,N as ny,j as ay,R as Ac,V as oy}from"./BBBowEhf.js";import{D as sy}from"./BP0mUOHP.js";import{a as iy}from"./BOhDcNg3.js";import{a as ly}from"./BdWqymET.js";import{p as cy}from"./_vlUWDHN.js";const dy="intent:inline-visual-draft";function pP(r,t){const n=t.title.replace(/\s+/g," ").trim(),a=JSON.stringify({inputs:t.inputs,results:t.results},null,2),o=(a.match(/`+/g)??[]).reduce((c,l)=>Math.max(c,l.length),0),s="`".repeat(Math.max(3,o+1));return`${r}${r?`
3
3
 
4
4
  `:""}${n}
5
5
 
@@ -294,7 +294,7 @@ ${r.content}`:a.content=r.content,a):r.old_text!==void 0&&r.new_text!==void 0?(a
294
294
  `,Pk=["background","foreground","card","card-foreground","primary","primary-ink","primary-foreground","secondary","secondary-foreground","muted","muted-foreground","border","input","ring","danger","danger-background","info","info-foreground","success","success-foreground","warning","warning-foreground","font-ui","font-code","text-body-size","text-body-line-height","text-body-weight","text-body-tracking","radius-small","radius-medium","radius-large","app-background","sidebar","sidebar-accent","agent-avatar-surface-active","agent-avatar-foreground","diagram-host-surface","diagram-canvas","diagram-label-surface","diagram-node-surface","diagram-node-hover-surface","diagram-node-outline","diagram-node-title","diagram-metadata","diagram-group-outline","diagram-connector","diagram-connector-hover","diagram-connector-muted","diagram-connector-inactive","diagram-connector-danger","diagram-connector-success","diagram-connector-warning","diagram-connector-active","diagram-accent","diagram-accent-foreground","diagram-node-radius","diagram-group-radius","diagram-connector-width","text-caption-size","text-caption-line-height","text-caption-weight","text-caption-tracking","text-body-strong-size","text-body-strong-line-height","text-body-strong-weight","text-body-strong-tracking","space-1","space-2","space-3","space-4","space-5","space-6","space-7","control-height-compact","control-height-small","control-height-medium","control-height-large","radius-full","spring-fast","spring-fast-exit","spring-fast-ease","spring-moderate","spring-moderate-exit","spring-moderate-ease","spring-slow","spring-slow-exit","spring-slow-ease","spring-exit-ease","motion-fast","motion-standard","motion-slow","ease-standard","ease-emphasized-out","motion-reduced"],Ii=96,bd=2e4,Ak=480,jp=512,Tk=["default-src 'none'","script-src 'unsafe-inline'","style-src 'unsafe-inline'","img-src data:","connect-src 'none'","font-src data:","media-src 'none'","object-src 'none'","frame-src 'none'","child-src 'none'","worker-src 'none'","manifest-src 'none'","base-uri 'none'","form-action 'none'"].join("; ");function Rk(r,t,n,a,o,s){const c=new MessageChannel,l=MessagePort.prototype.postMessage.bind(c.port1);window.parent.postMessage({channel:r,type:"scroll-port"},"*",[c.port2]);const p=(C,D={})=>{window.parent.postMessage({channel:r,type:C,...D},"*")};let i=o?.state??null,f=null,v=!1;Object.defineProperty(window,"intentVisual",{configurable:!1,writable:!1,value:Object.freeze({get state(){return i},publish(C){try{if(!s(C))return!1;const D=JSON.parse(JSON.stringify(C));return i=D.state,f=D,v||(v=!0,requestAnimationFrame(()=>{v=!1,f&&p("snapshot",{snapshot:f}),f=null})),!0}catch{return!1}}})});let L=!1,y=-1,_=innerHeight,R=Number.NaN,M=0,B=0;const z=()=>{if(L=!1,!document.body)return;let C=Math.ceil(Math.max(document.body.scrollHeight,document.body.getBoundingClientRect().height));const D=innerHeight,V=C-D;if(D>_+1&&V>1&&Math.abs(V-R)<=1?M+=1:(D!==_||V<=1)&&(M=0),_=D,R=V,!B&&M>=3){B=Math.max(a,D);const J="Page height follows the frame (vh units or height: 100%); frame height held.";console.warn(J),p("layout",{message:J})}B&&(C=Math.min(C,B)),C!==y&&(y=C,p("resize",{height:C}))},I=()=>{L||(L=!0,requestAnimationFrame(z))},P=C=>{if(!C||typeof C.dark!="boolean"||!C.variables)return;const D=document.documentElement;D.classList.toggle("dark",C.dark),D.style.colorScheme=C.dark?"dark":"light";const V=C.variables["--inline-html-root-font-size"];"--inline-html-root-font-size"in t.variables&&typeof V=="string"&&V.length<512&&D.style.setProperty("--inline-html-root-font-size",V);for(const J of Object.keys(t.variables)){if(J==="--inline-html-root-font-size")continue;const Y=C.variables[J];typeof Y=="string"&&Y.length<512&&D.style.setProperty(J,Y)}I()};window.addEventListener("message",C=>{C.source!==window.parent||!C.data||C.data.channel!==r||C.data.type==="theme"&&P(C.data.theme)});const H=C=>{if(C.defaultPrevented||!C.isTrusted||C.ctrlKey||C.metaKey||C.shiftKey||!C.deltaY||Math.abs(C.deltaX)>Math.abs(C.deltaY))return;const D=Y=>{const xe=getComputedStyle(Y);if(Y!==document.scrollingElement&&!/^(auto|scroll|overlay)$/.test(xe.overflowY)||/^(hidden|clip)$/.test(xe.overflowY))return!1;const $=Y.scrollHeight-Y.clientHeight;return $>1&&(C.deltaY<0?Y.scrollTop>1:Y.scrollTop<$-1)};if(C.composedPath().some(Y=>Y instanceof Element&&D(Y))||document.scrollingElement&&D(document.scrollingElement))return;const V=C.deltaMode===WheelEvent.DOM_DELTA_LINE?parseFloat(getComputedStyle(document.body).lineHeight)||16:C.deltaMode===WheelEvent.DOM_DELTA_PAGE?innerHeight:1,J=Math.max(-n,Math.min(n,C.deltaY*V));Number.isFinite(J)&&(C.preventDefault(),l({deltaY:J}))};window.addEventListener("wheel",()=>{window.removeEventListener("wheel",H),window.addEventListener("wheel",H,{passive:!1})},{capture:!0,passive:!1}),window.addEventListener("error",C=>{C.message&&p("error",{message:C.message.slice(0,300)})}),window.addEventListener("unhandledrejection",C=>{const D=C.reason;p("error",{message:String(D instanceof Error?D.message:D).slice(0,300)})}),window.addEventListener("click",C=>{const D=C.target instanceof Element?C.target.closest("a, area"):null;if(!D)return;(D.getAttribute("href")??D.getAttribute("xlink:href"))?.startsWith("#")||C.preventDefault()},!0),window.addEventListener("submit",C=>C.preventDefault(),!0),P(t),window.addEventListener("DOMContentLoaded",()=>{new ResizeObserver(I).observe(document.body),new MutationObserver(I).observe(document.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),window.addEventListener("resize",I),document.addEventListener("load",I,!0),document.fonts.ready.then(I),p("ready"),I()},{once:!0})}function Mk(r,t,n,a,o){const s=document.createElement("iframe");s.setAttribute("sandbox","allow-scripts"),s.setAttribute("referrerpolicy","no-referrer"),s.title=n,s.style.cssText="display:block;width:100%;height:100%;border:0;";let c;const l=p=>{const i=p.data?.deltaY;typeof i=="number"&&Number.isFinite(i)&&i!==0&&Math.abs(i)<=a&&window.parent.postMessage({channel:r,type:"wheel",deltaY:i},"*")};window.addEventListener("message",p=>{const i=p.data;if(!(!i||typeof i!="object"||i.channel!==r)){if(p.source===window.parent&&i.type==="theme"){s.contentWindow?.postMessage({channel:r,type:"theme",theme:i.theme},"*");return}if(!(p.source!==s.contentWindow||p.origin!=="null")){if(i.type==="scroll-port"&&!c&&p.ports.length===1){c=p.ports[0],c.onmessage=l;return}i.type==="resize"&&typeof i.height=="number"&&Number.isFinite(i.height)&&i.height>=0?window.parent.postMessage({channel:r,type:"resize",height:i.height},"*"):i.type==="ready"?window.parent.postMessage({channel:r,type:"ready"},"*"):(i.type==="error"||i.type==="layout")&&typeof i.message=="string"?window.parent.postMessage({channel:r,type:i.type,message:i.message.slice(0,300)},"*"):i.type==="snapshot"&&o(i.snapshot)&&window.parent.postMessage({channel:r,type:"snapshot",snapshot:i.snapshot},"*")}}}),window.addEventListener("DOMContentLoaded",()=>{s.srcdoc=t,document.body.append(s)},{once:!0})}function Lk(r,t,n,a,o,s,c,l){const p=document.implementation.createHTMLDocument(""),i=p.createElement("template");i.innerHTML=n,p.body.append(i.content);const f=J=>{J.querySelectorAll("meta, base, link, iframe, frame, frameset, object, embed").forEach(Y=>Y.remove()),J.querySelectorAll("template").forEach(Y=>f(Y.content)),J.querySelectorAll("a, area").forEach(Y=>{for(const xe of["href","xlink:href"])Y.getAttribute(xe)?.startsWith("#")||Y.removeAttribute(xe);Y.removeAttribute("target"),Y.removeAttribute("ping"),Y.removeAttribute("download")})};f(p);const v=J=>JSON.stringify(J).replace(/</g,"\\u003c"),L=p.createElement("meta");L.httpEquiv="Content-Security-Policy",L.content=r.csp;const y=p.createElement("meta");y.setAttribute("charset","utf-8");const _=p.createElement("style"),R=/^data:[\w.+/-]+;base64,[A-Za-z0-9+/=]+$/.test(l)?`@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900;
295
295
  font-display: swap; src: url('${l}') format('woff2'); }`:"";_.textContent=`${R}${r.styles}`;const M=p.createElement("script"),B=v([a,o,r.maxScrollDelta,r.lockHeight,t(c)?c:null]);M.textContent=`(${r.bridge})(...${B}, (${r.validate}));`,p.head.prepend(L,y,_,M);const z=`<!doctype html>${p.documentElement.outerHTML}`,I=document.implementation.createHTMLDocument(""),P=I.createElement("meta");P.httpEquiv="Content-Security-Policy",P.content=r.csp.replace("frame-src 'none'","frame-src about:");const H=I.createElement("meta");H.setAttribute("charset","utf-8");const C=I.createElement("style");C.textContent="html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }";const D=I.createElement("script"),V=v([a,z,s,r.maxScrollDelta]);return D.textContent=`(${r.shell})(...${V}, (${r.validate}));`,I.head.prepend(P,H,C,D),`<!doctype html>${I.documentElement.outerHTML}`}const Nk=()=>({csp:Tk,styles:Ek,maxScrollDelta:jp,lockHeight:Ak,bridge:Rk.toString(),shell:Mk.toString(),validate:pl.toString()});function Ok(r,t,n,a,o=null,s=""){return Lk(Nk(),pl,r,t,n,a,o,s)}function yd(r){const t=getComputedStyle(r);return{dark:document.documentElement.classList.contains("dark"),variables:{...Object.fromEntries(Pk.map(n=>[`--${n}`,t.getPropertyValue(`--${n}`).trim()])),"--inline-html-root-font-size":getComputedStyle(document.documentElement).fontSize}}}function Dk(r,t,n,a,o=null){return Ok(r,t,n,a,o,Ck)}var Bk=k('<p class="type-caption m-0 break-words px-4 pb-2 text-muted-foreground"> </p>'),Fk=k('<div class="type-body flex items-center justify-between gap-3 px-4 py-2" role="status"><span class="text-danger"> </span> <!></div> <!>',1),zk=k('<p class="sr-only" role="status"> </p>'),Hk=k('<p class="type-body m-0 px-4 py-3 text-muted-foreground" role="status"> </p>'),jk=k('<div class="type-body px-4 py-2 text-danger" role="status"><p class="m-0"> </p> <p class="type-code m-0 break-words"> </p></div>'),Wk=k('<iframe sandbox="allow-scripts" referrerpolicy="no-referrer"></iframe>'),Uk=k('<div class="space-y-4 p-4" aria-hidden="true"><div class="space-y-2"><!> <!></div> <!> <div class="flex items-center gap-4"><!> <!> <!></div></div>'),qk=k('<span aria-hidden="true"><!></span> <span class="min-w-0 flex-1 whitespace-normal text-pretty"> </span>',1),Vk=k('<p class="type-caption m-0 break-words px-4 pb-2 text-muted-foreground" role="status"> <!></p>'),Kk=k('<th class="min-w-40 px-2 pb-3 align-top font-normal"><!> <div class="mt-1 flex gap-1"><!> <!></div></th>'),Gk=k('<td class="max-w-56 px-2 py-2 align-top break-words tabular-nums"> </td>'),Jk=k('<tr><th class="max-w-48 py-2 pr-4 align-top font-normal break-words text-muted-foreground"> </th><!></tr>'),Yk=k('<div class="overflow-x-auto px-4 pb-4" data-inline-visual-comparison=""><table class="type-body w-full border-separate border-spacing-0 text-left"><thead><tr><th class="min-w-28 pr-4 pb-3 font-normal text-muted-foreground"> </th><th class="min-w-32 px-2 pb-3 align-top font-medium"> </th><!></tr></thead><tbody></tbody></table></div>'),Xk=k("<!> <!>",1),Zk=k('<div data-inline-html="" class="my-3 min-w-0 overflow-hidden rounded-lg bg-background text-foreground"><!> <!> <div class="relative min-w-0"><!> <!></div> <div class="flex min-w-0 items-center justify-between gap-2 px-4 pt-1 pb-3" data-inline-visual-actions=""><!> <!></div> <!></div>');function Wp(r,t){if(new.target)return Dt({component:Wp,...r});zt(t,!0);const n=720,a=1e4;let o=h(t,"source",7),s=h(t,"isStreaming",7,!1),c=h(t,"isComplete",7,!0),l=h(t,"record",7),p=h(t,"storageStatus",7,"ready"),i=h(t,"onRecordChange",7),f=h(t,"onUseConfiguration",7),v=h(t,"onExport",7),L=h(t,"onRetry",7),y=h(t,"storageError",7),_=h(t,"exportStatus",7),R=h(t,"exportPath",7),M=h(t,"exportError",7),B,z=ve(void 0),I=ve(!1),P=ve(!1),H=ve(0),C=ve(""),D=ve(""),V=ve(!1),J=ve(""),Y=ve(Yr(Ii)),xe=ve(n),$=ve(""),we=ve($l()),de=ve(void 0),Te=ve(void 0),ie,Re=ve(void 0),se=ve(!1);const ee=d(()=>l()??e(we)),ke=d(()=>e(Te)!==void 0&&e(de)!==void 0&&!Mb(e(Te),e(de).inputs)),te=d(()=>p()!=="loading"&&(p()!=="error"||!!e(ee).current)),ge=d(()=>!s()&&c()&&!!o().trim()&&e(te)),He=d(()=>Math.min(bd,Math.max(Ii,e(Y)))),Xe=d(()=>s()||p()==="loading"?"loading":c()?o().trim()?e(J)?"error":e(V)?"ready":"loading":"empty":"incomplete"),X=d(()=>s()||p()==="loading"||e(ge)&&!e(V)&&!e(J)),Z=d(()=>Qv([{id:"source",label:e(P)?Ff():zf()},{id:"reload",label:Hf(),disabled:!e(ge)},{id:"save",label:jf(),when:!!(e(de)&&e(ge)),disabled:!e(V)||!!e(J)||e(ee).scenarios.length>=ec,group:"configuration"},{id:"compare",label:Wf(),when:!!(e(de)&&e(ge)&&e(ee).scenarios.length),group:"configuration"},{id:"export",label:Uf(),when:!!(e(de)&&e(ge)&&v()),disabled:!e(V)||_()==="saving",group:"configuration"}]));function Ye(ce){ce==="source"?T(P,!e(P)):ce==="reload"?T(H,e(H)+1):ce==="save"?G():ce==="compare"?T(se,!e(se)):ce==="export"&&v()?.({...e(ee),current:e(de)??null})}function W(ce){const Pe={...ce,current:e(de)??ce.current};T(we,Pe),i()?.(Pe)}function G(){const ce=e(de);!ce||e(ee).scenarios.length>=ec||(W({...e(ee),scenarios:[...e(ee).scenarios,{id:crypto.randomUUID(),name:qf({number:Ic(e(ee).scenarios.length+1)}),snapshot:structuredClone(ce)}]}),T(se,!0))}function q(ce,Pe){const rt=Pe.trim().slice(0,120);rt&&W({...e(ee),scenarios:e(ee).scenarios.map(st=>st.id===ce?{...st,name:rt}:st)})}function re(ce){const Pe=structuredClone(ce);T(de,Pe),T(Re,Pe),W({...e(ee),current:Pe}),T(H,e(H)+1)}function ye(ce){return typeof ce=="number"?Ic(ce):typeof ce=="string"?ce:JSON.stringify(ce)}function Oe(){!e(z)?.contentWindow||!e(D)||e(z).contentWindow.postMessage({channel:e(D),type:"theme",theme:yd(B)},"*")}function Q(ce){let Pe=B.parentElement;for(;Pe;){const rt=getComputedStyle(Pe),st=Pe.scrollHeight-Pe.clientHeight;if(/^(auto|scroll|overlay)$/.test(rt.overflowY)&&st>1){if(ce<0?Pe.scrollTop>0:Pe.scrollTop<st){Pe.dispatchEvent(new WheelEvent("wheel",{deltaY:ce,bubbles:!0})),Pe.scrollTop+=ce;return}if(/^(contain|none)$/.test(rt.overscrollBehaviorY))return}Pe=Pe.parentElement}window.scrollBy({top:ce,behavior:"instant"})}_t(()=>{if(!e(I))return;const ce=o(),Pe=e(ge);e(H),vn(()=>{ie!==ce&&(T(we,$l()),T(de,void 0),T(Te,void 0),T(se,!1),T(Re,void 0),ie=ce),T(V,!1),T(J,""),T($,""),T(Y,Ii,!0),T(D,crypto.randomUUID(),!0),T(C,Pe?Dk(ce,e(D),yd(B),ql(),e(Re)??e(de)??e(ee).current):"",!0),T(Re,void 0)})}),_t(()=>{if(!e(C)||e(V)||e(J))return;const ce=setTimeout(()=>{T(J,Bf(),!0)},a);return()=>clearTimeout(ce)}),os(()=>{T(I,!0);const ce=wt=>{if(wt.source!==e(z)?.contentWindow||wt.origin!=="null")return;const nt=wt.data;if(!(!nt||typeof nt!="object"||nt.channel!==e(D))){if(nt.type==="bootstrap"){e(z)?.contentWindow?.postMessage({channel:e(D),type:"initialize",documentHtml:e(C)},"*");return}if(nt.type==="resize"&&typeof nt.height=="number"&&Number.isFinite(nt.height)&&nt.height>=0)T(Y,Math.min(bd,Math.ceil(nt.height)),!0);else if(nt.type==="ready")T(V,!0),Oe();else if(nt.type==="error"&&typeof nt.message=="string")T(J,nt.message.slice(0,300),!0);else if(nt.type==="layout"&&typeof nt.message=="string")T($,nt.message.slice(0,300),!0);else if(nt.type==="snapshot"&&e(ge)&&pl(nt.snapshot)){const Pt=nt.snapshot;T(Te,e(Te)??structuredClone(Pt.inputs)),T(de,Pt),W({...e(ee),current:Pt})}else nt.type==="wheel"&&e(V)&&e(ge)&&!e(P)&&!e(X)&&typeof nt.deltaY=="number"&&Number.isFinite(nt.deltaY)&&nt.deltaY!==0&&Math.abs(nt.deltaY)<=jp&&Q(nt.deltaY)}},Pe=()=>{T(xe,Math.min(n,Math.max(160,Math.floor(window.innerHeight*.8))),!0)},rt=new MutationObserver(Oe);rt.observe(document.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme"]});const st=window.matchMedia("(prefers-color-scheme: dark)");return st.addEventListener("change",Oe),window.addEventListener("message",ce),window.addEventListener("resize",Pe),Pe(),()=>{rt.disconnect(),st.removeEventListener("change",Oe),window.removeEventListener("message",ce),window.removeEventListener("resize",Pe)}});var le={get source(){return o()},set source(ce){o(ce),b()},get isStreaming(){return s()},set isStreaming(ce=!1){s(ce),b()},get isComplete(){return c()},set isComplete(ce=!0){c(ce),b()},get record(){return l()},set record(ce){l(ce),b()},get storageStatus(){return p()},set storageStatus(ce="ready"){p(ce),b()},get onRecordChange(){return i()},set onRecordChange(ce){i(ce),b()},get onUseConfiguration(){return f()},set onUseConfiguration(ce){f(ce),b()},get onExport(){return v()},set onExport(ce){v(ce),b()},get onRetry(){return L()},set onRetry(ce){L(ce),b()},get storageError(){return y()},set storageError(ce){y(ce),b()},get exportStatus(){return _()},set exportStatus(ce){_(ce),b()},get exportPath(){return R()},set exportPath(ce){R(ce),b()},get exportError(){return M()},set exportError(ce){M(ce),b()},$set:Bt,$on:(ce,Pe)=>Ft(t,ce,Pe)},Ee=Zk(),et=E(Ee);{var _e=ce=>{var Pe=Fk(),rt=De(Pe),st=E(rt),wt=N(st,!0),nt=m(st,2);{var Pt=Mt=>{St(Mt,{variant:"ghost",size:"sm",get onclick(){return L()},children:(Jt,tr)=>{rr();var Kt=jt();S(Me=>x(Kt,Me),[()=>Qf()]),u(Jt,Kt)},$$slots:{default:!0}})};F(nt,Mt=>{L()&&Mt(Pt)})}w(rt);var bt=m(rt,2);{var kt=Mt=>{var Jt=Bk(),tr=N(Jt,!0);S(()=>x(tr,y())),u(Mt,Jt)};F(bt,Mt=>{y()&&Mt(kt)})}S(Mt=>x(wt,Mt),[()=>Vf()]),u(ce,Pe)};F(et,ce=>{p()==="error"&&ce(_e)})}var Ae=m(et,2);{var K=ce=>{var Pe=zk(),rt=N(Pe,!0);S(st=>x(rt,st),[()=>s()?Kf():Gf()]),u(ce,Pe)},Se=ce=>{var Pe=Hk(),rt=N(Pe,!0);S(st=>x(rt,st),[()=>c()?Yf():Jf()]),u(ce,Pe)},ue=ce=>{var Pe=jk(),rt=E(Pe),st=N(rt,!0),wt=m(rt,2),nt=N(wt,!0);w(Pe),S(Pt=>{x(st,Pt),x(nt,e(J))},[()=>Xf()]),u(ce,Pe)};F(Ae,ce=>{e(X)?ce(K):e(ge)?e(J)&&ce(ue,2):ce(Se,1)})}var O=m(Ae,2),U=E(O);{var me=ce=>{var Pe=ht(),rt=De(Pe);oo(rt,()=>e(D),st=>{var wt=Wk();let nt,Pt;vr(wt,bt=>T(z,bt),()=>e(z)),S(bt=>{oe(wt,"title",bt),oe(wt,"src",`/inline-html-sandbox.html#${e(D)}`),nt=pt(wt,1,"block w-full border-0 svelte-1kkow1d",null,nt,{"preview-hidden":e(P)||!e(V)}),oe(wt,"aria-hidden",e(P)||!e(V)),Pt=Ln(wt,"",Pt,{height:`${e(He)}px`})},[()=>ql()]),u(st,wt)}),u(ce,Pe)};F(U,ce=>{e(ge)&&e(C)&&ce(me)})}var Ke=m(U,2);{var Ne=ce=>{fa(ce,{get code(){return o()},language:"html",noBorder:!0,noMargin:!0,get maxHeight(){return e(xe)}})},Ve=ce=>{var Pe=Uk(),rt=E(Pe),st=E(rt);Eo(st,{class:"h-4 w-32 max-w-1/2"});var wt=m(st,2);Eo(wt,{class:"h-3 w-2/3"}),w(rt);var nt=m(rt,2);Eo(nt,{class:"aspect-video max-h-60 w-full rounded-lg"});var Pt=m(nt,2),bt=E(Pt);Eo(bt,{class:"h-3 w-16"});var kt=m(bt,2);Eo(kt,{class:"h-2 min-w-0 flex-1"});var Mt=m(kt,2);Eo(Mt,{class:"h-3 w-10"}),w(Pt),w(Pe),u(ce,Pe)};F(Ke,ce=>{e(P)?ce(Ne):e(X)&&ce(Ve,1)})}w(O);var Ge=m(O,2),lt=E(Ge);{var gt=ce=>{{let Pe=d(()=>!e(V)||!!e(J));St(ce,{variant:"plain",size:"sm",wrapContent:!1,get class(){return`${Wi} ${cb} h-auto min-w-0 shrink justify-start rounded-sm border border-transparent px-1.5 py-0.5 text-left hover:text-foreground`},style:"gap: var(--operational-leading-gap)","data-typography-role":"body",get disabled(){return e(Pe)},onclick:()=>e(de)&&f()(e(de)),children:(rt,st)=>{var wt=qk(),nt=De(wt),Pt=E(nt);Rt(Pt,{get icon(){return Gd},size:16,get class(){return Fa}}),w(nt);var bt=m(nt,2),kt=N(bt,!0);S(Mt=>{pt(nt,1,`${Oo??""} mt-px self-start`,"svelte-1kkow1d"),x(kt,Mt)},[()=>Zf()]),u(rt,wt)},$$slots:{default:!0}})}};F(lt,ce=>{e(de)&&e(ke)&&e(ge)&&f()&&!e(P)&&ce(gt)})}var Ct=m(lt,2);{const ce=(rt,st)=>{let wt=()=>(st?.()).props;{let nt=d(()=>Vl());St(rt,zs(wt,{variant:"ghost",size:"icon-sm",class:"ml-auto text-muted-foreground",get"aria-label"(){return e(nt)},children:(Pt,bt)=>{Rt(Pt,{get icon(){return sv},size:16})},$$slots:{default:!0}}))}};let Pe=d(()=>Vl());_u(Ct,{get actions(){return e(Z)},get ariaLabel(){return e(Pe)},align:"end",side:"top",onAction:Ye,trigger:ce,$$slots:{trigger:!0}})}w(Ge);var qt=m(Ge,2);{var It=ce=>{var Pe=Xk(),rt=De(Pe);{var st=Pt=>{var bt=Vk(),kt=E(bt),Mt=m(kt);{var Jt=tr=>{var Kt=jt();S(()=>x(Kt,M())),u(tr,Kt)};F(Mt,tr=>{_()==="error"&&M()&&tr(Jt)})}w(bt),S(tr=>x(kt,`${tr??""} `),[()=>_()==="saving"?$f():_()==="saved"?eg({path:R()??""}):tg()]),u(Pt,bt)};F(rt,Pt=>{_()&&Pt(st)})}var wt=m(rt,2);{var nt=Pt=>{var bt=Yk(),kt=E(bt),Mt=E(kt),Jt=E(Mt),tr=E(Jt),Kt=N(tr,!0),Me=m(tr),pe=N(Me,!0),Ze=m(Me);Lt(Ze,17,()=>e(ee).scenarios,tt=>tt.id,(tt,Be)=>{var ae=Kk(),be=E(ae);{let Fe=d(()=>ag());Mo(be,{get value(){return e(Be).name},get"aria-label"(){return e(Fe)},maxlength:120,onblur:ze=>{ze.currentTarget.value.trim()||(ze.currentTarget.value=e(Be).name),q(e(Be).id,ze.currentTarget.value)},onkeydown:ze=>{ze.key==="Enter"&&ze.currentTarget.blur(),ze.key==="Escape"&&(ze.currentTarget.value=e(Be).name,ze.currentTarget.blur())}})}var he=m(be,2),Ce=E(he);St(Ce,{variant:"ghost",size:"sm",onclick:()=>re(e(Be).snapshot),children:(Fe,ze)=>{rr();var Qe=jt();S(Je=>x(Qe,Je),[()=>rg()]),u(Fe,Qe)},$$slots:{default:!0}});var Ie=m(Ce,2);St(Ie,{variant:"ghost",size:"sm",onclick:()=>W({...e(ee),scenarios:e(ee).scenarios.filter(Fe=>Fe.id!==e(Be).id)}),children:(Fe,ze)=>{rr();var Qe=jt();S(Je=>x(Qe,Je),[()=>ng()]),u(Fe,Qe)},$$slots:{default:!0}}),w(he),w(ae),u(tt,ae)}),w(Jt),w(Mt);var ot=m(Mt);Lt(ot,20,()=>["inputs","results"],Rr,(tt,Be)=>{const ae=d(()=>Be),be=d(()=>Array.from(new Set([...Object.keys(e(de)[e(ae)]),...e(ee).scenarios.flatMap(Ie=>Object.keys(Ie.snapshot[e(ae)]))])));var he=ht(),Ce=De(he);Lt(Ce,16,()=>e(be),Ie=>Ie,(Ie,Fe)=>{var ze=Jk(),Qe=E(ze),Je=N(Qe,!0),We=m(Qe);Lt(We,17,()=>[e(de),...e(ee).scenarios.map($e=>$e.snapshot)],Rr,($e,Ue)=>{var qe=Gk(),dt=N(qe,!0);S(it=>x(dt,it),[()=>Object.hasOwn(e(Ue)[e(ae)],Fe)?ye(e(Ue)[e(ae)][Fe]):"—"]),u($e,qe)}),w(ze),S(()=>x(Je,Fe)),u(Ie,ze)}),u(tt,he)}),w(ot),w(kt),w(bt),S(tt=>{x(Kt,e(de).title),x(pe,tt)},[()=>og()]),u(Pt,bt)};F(wt,Pt=>{e(se)&&e(ee).scenarios.length&&Pt(nt)})}u(ce,Pe)};F(qt,ce=>{e(de)&&e(ge)&&ce(It)})}return w(Ee),vr(Ee,ce=>B=ce,()=>B),S(()=>{oe(Ee,"data-inline-html-status",e(Xe)),oe(Ee,"data-inline-html-layout",e($)?"viewport-locked":void 0),oe(Ee,"aria-busy",e(X))}),u(r,Ee),Ht(le)}var Qk=k('<div class="w-full min-w-0"><!></div>');function $k(r,t){if(new.target)return Dt({component:$k,...r});zt(t,!0);const n=()=>yt(e(y),"$agent$",o),a=()=>yt(e(B),"$entry$",o),[o,s]=ma();let c=h(t,"block",7),l=h(t,"role",7),p=h(t,"workspaceId",7),i=h(t,"agentId",7),f=h(t,"messageId",7),v=h(t,"contentBlockKey",7,""),L=ve(void 0);const y=d(()=>Hs(i()??"")),_=d(()=>l()==="assistant"&&p()&&i()&&f()&&c().metadata?.fenceClosed&&!c().metadata?.isStreaming&&n()&&!su(n())?{workspaceId:p(),agentId:i(),messageId:f(),blockKey:JSON.stringify([v(),c().metadata?.fenceStart??0]),source:c().content}:void 0),R=d(()=>!!(p()&&i()&&f()&&c().metadata?.fenceClosed&&!n())),M=d(()=>e(_)?Tv(e(_)):""),B=d(()=>Mh(e(M)));_t(()=>{e(_)&&Ot.dispatch(Cv(e(_)))});function z(J){!p()||!i()||n()?.retiredAt||e(L)?.dispatchEvent(new CustomEvent(dy,{bubbles:!0,detail:{workspaceId:p(),agentId:i(),snapshot:J}}))}var I={get block(){return c()},set block(J){c(J),b()},get role(){return l()},set role(J){l(J),b()},get workspaceId(){return p()},set workspaceId(J){p(J),b()},get agentId(){return i()},set agentId(J){i(J),b()},get messageId(){return f()},set messageId(J){f(J),b()},get contentBlockKey(){return v()},set contentBlockKey(J=""){v(J),b()},$set:Bt,$on:(J,Y)=>Ft(t,J,Y)},P=ht(),H=De(P);{var C=J=>{var Y=Qk(),xe=E(Y);{let $=d(()=>c().metadata?.isStreaming??!1),we=d(()=>c().metadata?.fenceClosed??!1),de=d(()=>a()?.record),Te=d(()=>e(_)?a()?.status??"loading":e(R)?"loading":"ready"),ie=d(()=>a()?.error),Re=d(()=>e(_)?Xe=>Ot.dispatch(Av(e(M),Xe)):void 0),se=d(()=>p()&&i()&&n()&&!n().retiredAt?z:void 0),ee=d(()=>e(_)?()=>Ot.dispatch(Pv(e(M))):void 0),ke=d(()=>e(_)?Xe=>Ot.dispatch(Ev(e(M),crypto.randomUUID(),Xe)):void 0),te=d(()=>a()?.export?.status),ge=d(()=>a()?.export?.path),He=d(()=>a()?.export?.error);Wp(xe,{get source(){return c().content},get isStreaming(){return e($)},get isComplete(){return e(we)},get record(){return e(de)},get storageStatus(){return e(Te)},get storageError(){return e(ie)},get onRecordChange(){return e(Re)},get onUseConfiguration(){return e(se)},get onRetry(){return e(ee)},get onExport(){return e(ke)},get exportStatus(){return e(te)},get exportPath(){return e(ge)},get exportError(){return e(He)}})}w(Y),vr(Y,$=>T(L,$),()=>e(L)),u(J,Y)},D=J=>{fa(J,{get code(){return c().content},language:"html"})};F(H,J=>{l()==="assistant"?J(C):J(D,-1)})}u(r,P);var V=Ht(I);return s(),V}var e2=k('<div class="digest-card flex items-start gap-2.5 py-5 px-6 my-4 shadow-xs text-base leading-normal border border-border"> </div>');function t2(r,t){if(new.target)return Dt({component:t2,...r});zt(t,!0);let n=h(t,"digest",7);var a={get digest(){return n()},set digest(c){n(c),b()},$set:Bt,$on:(c,l)=>Ft(t,c,l)},o=e2(),s=N(o,!0);return S(()=>x(s,n())),u(r,o),Ht(a)}var r2=k('<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-500/15 text-blue-600 dark:text-blue-400"> </span>'),n2=k('<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-muted text-muted-foreground"> </span>'),a2=k('<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-primary/10 text-primary/80"> </span>'),o2=k('<div class="flex items-start gap-3 px-4 py-2.5"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 flex-wrap"><span class="text-sm font-semibold text-foreground"> </span> <!> <!></div> <div class="mt-0.5 text-xs font-mono text-muted-foreground truncate"> </div></div></div>'),s2=k('<div class="detected-scripts-card my-3 rounded-lg border border-border bg-muted/30 overflow-hidden"><div class="flex items-center gap-2 px-4 py-2.5 border-b border-border bg-muted/40"><!> <span class="text-sm font-semibold text-foreground"> </span></div> <div class="divide-y divide-border"></div> <div class="px-4 py-2 border-t border-border bg-muted/20"><span class="text-xs text-muted-foreground"> </span></div></div>');function i2(r,t){if(new.target)return Dt({component:i2,...r});zt(t,!0);let n=h(t,"scripts",7);var a={get scripts(){return n()},set scripts(y){n(y),b()},$set:Bt,$on:(y,_)=>Ft(t,y,_)},o=s2(),s=E(o),c=E(s);Rt(c,{get icon(){return qd},size:"sm",class:"text-primary-ink/70"});var l=m(c,2),p=N(l,!0);w(s);var i=m(s,2);Lt(i,21,n,y=>y.name+y.command,(y,_)=>{var R=o2(),M=E(R),B=E(M),z=E(B),I=N(z,!0),P=m(z,2);{var H=xe=>{var $=r2(),we=N($,!0);S(de=>x(we,de),[()=>g.chat_detectedScripts_service_badge()]),u(xe,$)},C=xe=>{var $=n2(),we=N($,!0);S(de=>x(we,de),[()=>g.chat_detectedScripts_command_badge()]),u(xe,$)};F(P,xe=>{e(_).mode==="service"?xe(H):xe(C,-1)})}var D=m(P,2);{var V=xe=>{var $=a2(),we=N($,!0);S(()=>x(we,e(_).category)),u(xe,$)};F(D,xe=>{e(_).category&&e(_).category!=="other"&&xe(V)})}w(B);var J=m(B,2),Y=N(J,!0);w(M),w(R),S(()=>{x(I,e(_).name),x(Y,e(_).command)}),u(y,R)}),w(i);var f=m(i,2),v=E(f),L=N(v,!0);return w(f),w(o),S((y,_)=>{x(p,y),x(L,_)},[()=>g.chat_detectedScripts_title(),()=>n().length===1?g.chat_detectedScripts_count_one({count:or(n().length)}):g.chat_detectedScripts_count_many({count:or(n().length)})]),u(r,o),Ht(a)}function l2(r,t){if(new.target)return Dt({component:l2,...r});zt(t,!0);let n=h(t,"diff",7),a=h(t,"filePath",7),o=h(t,"language",7),s=h(t,"onApply",7),c=h(t,"onReject",7);function l(){s()?.(),Wn.success(g.chat_diffViewer_applied_toast())}function p(){c()?.(),Wn.info(g.chat_diffViewer_rejected_toast())}const i=d(()=>{const v=[];return s()&&v.push({label:g.chat_diffViewer_apply_label(),variant:"success",onClick:l}),c()&&v.push({label:g.chat_diffViewer_reject_label(),variant:"danger",onClick:p}),v});var f={get diff(){return n()},set diff(v){n(v),b()},get filePath(){return a()},set filePath(v){a(v),b()},get language(){return o()},set language(v){o(v),b()},get onApply(){return s()},set onApply(v){s(v),b()},get onReject(){return c()},set onReject(v){c(v),b()},$set:Bt,$on:(v,L)=>Ft(t,v,L)};{let v=d(()=>a()||g.chat_diffViewer_suggestedChanges_fallback());$o(r,{get patch(){return n()},get fileName(){return e(v)},get language(){return o()},get actions(){return e(i)},collapsible:!0,initialCollapsed:!1,maxHeight:"500px"})}return Ht(f)}var c2=Ua('<circle fill="none" style="transition: stroke-dasharray 0.3s ease-out"></circle>'),_d=Ua("<circle></circle>"),d2=Ua('<svg class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 fill-background" viewBox="0 0 8 6"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.69471 1.69471C7.87687 1.50611 7.97766 1.25351 7.97539 0.991311C7.97311 0.729114 7.86794 0.478302 7.68253 0.292894C7.49712 0.107485 7.24631 0.00231622 6.98411 3.78025e-05C6.72192 -0.00224062 6.46931 0.0985542 6.28071 0.280712L2.98771 3.57371L1.69471 2.28071C1.50611 2.09855 1.25351 1.99776 0.991311 2.00004C0.729114 2.00232 0.478302 2.10749 0.292894 2.29289C0.107485 2.4783 0.00231622 2.72911 3.78025e-05 2.99131C-0.00224062 3.25351 0.0985542 3.50611 0.280712 3.69471L2.28071 5.69471C2.46824 5.88218 2.72255 5.9875 2.98771 5.9875C3.25288 5.9875 3.50718 5.88218 3.69471 5.69471L7.69471 1.69471Z"></path></svg>'),u2=k('<div class="relative"><svg fill="none" xmlns="http://www.w3.org/2000/svg"><circle fill="none"></circle><!></svg> <!></div>');function Cs(r,t){if(new.target)return Dt({component:Cs,...r});zt(t,!0);let n=h(t,"phase",7),a=h(t,"progress",7,0),o=h(t,"size",7,16),s=h(t,"class",7,""),c=d(()=>o()/2),l=d(()=>e(c)),p=d(()=>e(c)),i=d(()=>o()*.12),f=d(()=>e(c)-e(i)/2),v=d(()=>e(c)*.35),L=d(()=>2*Math.PI*e(v)),y=d(()=>Math.max(0,Math.min(1,a()))*e(L));const _={planning:"#99999999",building:"#54B1F3",reviewing:"#6D7FF5",shipped:"var(--color-foreground)"};let R=d(()=>_[n()]||"currentColor");var M={get phase(){return n()},set phase($){n($),b()},get progress(){return a()},set progress($=0){a($),b()},get size(){return o()},set size($=16){o($),b()},get class(){return s()},set class($=""){s($),b()},$set:Bt,$on:($,we)=>Ft(t,$,we)},B=u2(),z=E(B),I=E(z),P=m(I);{var H=$=>{},C=$=>{var we=c2();S(()=>{oe(we,"cx",e(l)),oe(we,"cy",e(p)),oe(we,"r",e(v)*.8),oe(we,"stroke",e(R)),oe(we,"stroke-width",e(v)*1.5),oe(we,"stroke-dasharray",`${e(y)??""} ${e(L)??""}`),oe(we,"stroke-dashoffset",e(L)*.25),oe(we,"transform",`rotate(-90 ${e(l)??""} ${e(p)??""})`)}),u($,we)},D=$=>{var we=_d();S(()=>{oe(we,"cx",e(l)),oe(we,"cy",e(p)),oe(we,"r",e(f)*.6),oe(we,"fill",e(R))}),u($,we)},V=$=>{var we=_d();S(()=>{oe(we,"cx",e(l)),oe(we,"cy",e(p)),oe(we,"r",e(f)),oe(we,"fill",e(R))}),u($,we)};F(P,$=>{n()==="planning"?$(H):n()==="building"?$(C,1):n()==="reviewing"?$(D,2):n()==="shipped"&&$(V,3)})}w(z);var J=m(z,2);{var Y=$=>{},xe=$=>{var we=d2();S(()=>oe(we,"width",o()*.5)),u($,we)};F(J,$=>{n()==="reviewing"?$(Y):n()==="shipped"&&$(xe,1)})}return w(B),S(()=>{oe(z,"width",o()),oe(z,"height",o()),oe(z,"viewBox",`0 0 ${o()??""} ${o()??""}`),pt(z,0,lr(s())),oe(I,"cx",e(l)),oe(I,"cy",e(p)),oe(I,"r",e(f)),oe(I,"stroke",e(R)),oe(I,"stroke-width",e(i))}),u(r,B),Ht(M)}var xd=k('<span class="flex items-center gap-1"><span class="size-1.5 rounded-full"></span> </span>'),p2=k('<span class="flex items-center gap-1"><span class="size-1.5 rounded-full bg-border"></span> </span>'),wd=k('<span class="text-ui text-subtle truncate"> </span>'),kd=k('<div class="flex items-center gap-1 mt-0.5"><!> <!></div>'),Sd=k('<div class="flex items-start gap-2"><div class="shrink-0 mt-0.5"><!></div> <div class="flex-1 min-w-0"><div class="text-xs leading-snug truncate"> </div> <!></div></div>'),f2=k('<div class="flex items-center gap-2"><div class="shrink-0"><!></div> <span class="text-ui text-subtle truncate line-through"> </span></div>'),g2=k('<span class="text-ui text-subtle pl-4"> </span>'),v2=k('<div class="flex flex-col gap-0.5 pt-1 border-t border-border"><!> <!></div>'),m2=k('<div class="text-ui text-subtle"> </div>'),h2=k("<!> <!> <!> <!>",1),b2=k('<div class="flex flex-col py-2 px-3 gap-2 max-h-80 overflow-y-auto"><div class="flex items-center justify-between gap-3"><span class="text-xs font-semibold text-foreground"> </span> <div class="flex items-center gap-3 text-ui text-subtle"><!> <!> <!></div></div> <!></div>'),y2=k('<div class="rounded-[0.5px]"></div>');function Up(r,t){if(new.target)return Dt({component:Up,...r});zt(t,!0);let n=h(t,"stats",7),a=h(t,"tasks",23,()=>[]),o=h(t,"maxBars",7,20),s=h(t,"barWidth",7,"1px"),c=h(t,"barHeight",7,"16px"),l=h(t,"gap",7,"1px"),p=h(t,"class",7);const i={completed:"#22c55e",inProgress:"#4F7BF7",notStarted:"var(--border)"};let f=d(()=>{const{completed:P,inProgress:H,notStarted:C,total:D}=n();if(D===0)return[];const V=[...Array(P).fill("completed"),...Array(H).fill("inProgress"),...Array(Math.max(0,C)).fill("notStarted")];return V.length<=o()?V:V.slice(V.length-o())}),v=d(()=>a().filter(P=>P.status==="complete")),L=d(()=>a().filter(P=>P.status==="in_progress"||P.status==="review_required")),y=d(()=>a().filter(P=>P.status!=="complete"&&P.status!=="in_progress"&&P.status!=="review_required"&&P.status!=="cancelled")),_=d(()=>a().filter(P=>P.status==="cancelled")),R=d(()=>a().length>0);var M={get stats(){return n()},set stats(P){n(P),b()},get tasks(){return a()},set tasks(P=[]){a(P),b()},get maxBars(){return o()},set maxBars(P=20){o(P),b()},get barWidth(){return s()},set barWidth(P="1px"){s(P),b()},get barHeight(){return c()},set barHeight(P="16px"){c(P),b()},get gap(){return l()},set gap(P="1px"){l(P),b()},get class(){return p()},set class(P){p(P),b()},$set:Bt,$on:(P,H)=>Ft(t,P,H)},B=ht(),z=De(B);{var I=P=>{Ri(P,{side:"top",align:"start",sideOffset:6,contentClass:"max-w-xs p-0",delayDuration:200,disableHoverableContent:!1,content:C=>{var D=b2(),V=E(D),J=E(V),Y=N(J,!0),xe=m(J,2),$=E(xe);{var we=ke=>{var te=xd(),ge=E(te);Ln(ge,"",{},{"background-color":"#22c55e"});var He=m(ge);w(te),S(()=>x(He,` ${n().completed??""}`)),u(ke,te)};F($,ke=>{n().completed>0&&ke(we)})}var de=m($,2);{var Te=ke=>{var te=xd(),ge=E(te);Ln(ge,"",{},{"background-color":"#4F7BF7"});var He=m(ge);w(te),S(()=>x(He,` ${n().inProgress??""}`)),u(ke,te)};F(de,ke=>{n().inProgress>0&&ke(Te)})}var ie=m(de,2);{var Re=ke=>{var te=p2(),ge=m(E(te));w(te),S(()=>x(ge,` ${n().notStarted??""}`)),u(ke,te)};F(ie,ke=>{n().notStarted>0&&ke(Re)})}w(xe),w(V);var se=m(V,2);{var ee=ke=>{var te=h2(),ge=De(te);Lt(ge,17,()=>e(L),Rr,(W,G)=>{var q=Sd(),re=E(q),ye=E(re);ui(ye,{get status(){return e(G).status},size:14}),w(re);var Oe=m(re,2),Q=E(Oe),le=N(Q,!0),Ee=m(Q,2);{var et=_e=>{var Ae=kd(),K=E(Ae);{let O=d(()=>e(G).agentState||"idle");Pc(K,{get agentId(){return e(G).agentId},get state(){return e(O)},size:12,get specialist(){return e(G).agentSpecialist}})}var Se=m(K,2);{var ue=O=>{var U=wd(),me=N(U,!0);S(()=>x(me,e(G).agentName)),u(O,U)};F(Se,O=>{e(G).agentName&&O(ue)})}w(Ae),u(_e,Ae)};F(Ee,_e=>{e(G).agentId&&_e(et)})}w(Oe),w(q),S(()=>x(le,e(G).title)),u(W,q)});var He=m(ge,2);Lt(He,17,()=>e(y),Rr,(W,G)=>{var q=Sd(),re=E(q),ye=E(re);ui(ye,{get status(){return e(G).status},size:14}),w(re);var Oe=m(re,2),Q=E(Oe),le=N(Q,!0),Ee=m(Q,2);{var et=_e=>{var Ae=kd(),K=E(Ae);{let O=d(()=>e(G).agentState||"idle");Pc(K,{get agentId(){return e(G).agentId},get state(){return e(O)},size:12,get specialist(){return e(G).agentSpecialist}})}var Se=m(K,2);{var ue=O=>{var U=wd(),me=N(U,!0);S(()=>x(me,e(G).agentName)),u(O,U)};F(Se,O=>{e(G).agentName&&O(ue)})}w(Ae),u(_e,Ae)};F(Ee,_e=>{e(G).agentId&&_e(et)})}w(Oe),w(q),S(()=>x(le,e(G).title)),u(W,q)});var Xe=m(He,2);{var X=W=>{var G=v2(),q=E(G);Lt(q,17,()=>e(v).slice(0,3),Rr,(Oe,Q)=>{var le=f2(),Ee=E(le),et=E(Ee);ui(et,{status:"complete",size:12}),w(Ee);var _e=m(Ee,2),Ae=N(_e,!0);w(le),S(()=>x(Ae,e(Q).title)),u(Oe,le)});var re=m(q,2);{var ye=Oe=>{var Q=g2(),le=N(Q,!0);S(Ee=>x(le,Ee),[()=>g.workspace_taskProgressBar_moreCompleted_label({count:or(e(v).length-3)})]),u(Oe,Q)};F(re,Oe=>{e(v).length>3&&Oe(ye)})}w(G),u(W,G)};F(Xe,W=>{e(v).length>0&&W(X)})}var Z=m(Xe,2);{var Ye=W=>{var G=m2(),q=N(G,!0);S(re=>x(q,re),[()=>g.workspace_taskProgressBar_cancelled_label({count:or(e(_).length)})]),u(W,G)};F(Z,W=>{e(_).length>0&&W(Ye)})}u(ke,te)};F(se,ke=>{e(R)&&ke(ee)})}w(D),S(ke=>x(Y,ke),[()=>g.workspace_taskProgressBar_tasksRatio_label({completed:or(n().completed),total:or(n().total)})]),u(C,D)},children:(C,D)=>{{let V=d(()=>Sn("flex h-auto min-w-0 shrink items-end justify-start cursor-default rounded-none border-0",p())),J=d(()=>`gap: ${l()}`),Y=d(()=>g.workspace_taskProgressBar_tasksRatio_label({completed:or(n().completed),total:or(n().total)}));St(C,{variant:"plain",type:"button",wrapContent:!1,get class(){return e(V)},get style(){return e(J)},get"aria-label"(){return e(Y)},"data-task-progress-trigger":!0,children:(xe,$)=>{var we=ht(),de=De(we);Lt(de,17,()=>e(f),Rr,(Te,ie)=>{var Re=y2();let se;S(()=>se=Ln(Re,"",se,{width:s(),height:c(),"background-color":i[e(ie)]})),u(Te,Re)}),u(xe,we)},$$slots:{default:!0}})}},$$slots:{content:!0,default:!0}})};F(z,P=>{n().total>0&&P(I)})}return u(r,B),Ht(M)}function Tl(r,t){if(new.target)return Dt({component:Tl,...r});zt(t,!0);let n=h(t,"items",7),a=h(t,"ariaLabel",7),o=h(t,"open",15,!1),s=h(t,"orientation",7,"vertical"),c=h(t,"selection",7),l=h(t,"class",7,"");const p=d(()=>Wm(n(),c(),a()));var i={get items(){return n()},set items(f){n(f),b()},get ariaLabel(){return a()},set ariaLabel(f){a(f),b()},get open(){return o()},set open(f=!1){o(f),b()},get orientation(){return s()},set orientation(f="vertical"){s(f),b()},get selection(){return c()},set selection(f){c(f),b()},get class(){return l()},set class(f=""){l(f),b()},$set:Bt,$on:(f,v)=>Ft(t,f,v)};return _u(r,{get actions(){return e(p)},align:"end",get ariaLabel(){return a()},onAction:v=>jm(n(),v)?.onClick(),get open(){return o()},set open(v){o(v)},trigger:(v,L)=>{let y=()=>(L?.()).props;St(v,zs(y,{variant:"plain",size:"icon-compact",iconOnly:!0,type:"button",get class(){return l()},get"aria-label"(){return a()},onclick:_=>{_.stopPropagation(),y().onclick?.(_)},oncontextmenu:_=>{_.preventDefault(),_.stopPropagation()},children:(_,R)=>{$v(_,{get orientation(){return s()},class:"size-3.5"})},$$slots:{default:!0}}))},$$slots:{trigger:!0}}),Ht(i)}var _2=k('<span class="contents"><!></span>'),x2=k("<!> <!>",1);function qp(r,t){if(new.target)return Dt({component:qp,...r});zt(t,!0);let n=h(t,"workspaceId",7),a=h(t,"slot",7);const o=d(()=>hv(a()));let s=ve(null);_t(()=>{e(s)&&e(s).workspaceId!==n()&&T(s,null)});function c(_){const R=xu(_);R&&T(s,{...R,workspaceId:n()},!0)}function l(_){_.preventDefault(),_.stopPropagation();const R=_.currentTarget.getBoundingClientRect();T(s,{x:R.left,y:R.bottom+2,returnFocus:_.currentTarget,workspaceId:n()},!0)}function p(){T(s,null)}var i={get workspaceId(){return n()},set workspaceId(_){n(_),b()},get slot(){return a()},set slot(_){a(_),b()},$set:Bt,$on:(_,R)=>Ft(t,_,R)},f=x2(),v=De(f);{let _=d(()=>g.workspace_microKeyBadge_ariaLabel({number:or(a()+1)})),R=d(()=>g.workspace_microKeyBadge_tooltip({number:or(a()+1)})),M=d(()=>e(s)!==null);St(v,{variant:"ghost",size:"icon",type:"button",class:"micro-key-slot-badge size-4 min-w-0 shrink-0 cursor-pointer rounded-[3px] p-0 a11y-ignore",get"aria-label"(){return e(_)},get title(){return e(R)},onclick:l,oncontextmenu:c,onkeydown:c,"aria-haspopup":"menu",get"aria-expanded"(){return e(M)},children:(B,z)=>{var I=_2(),P=E(I);zg(P,{get slot(){return a()},get class(){return`transition-colors ${e(o)??""}`}}),w(I),u(B,I)},$$slots:{default:!0}})}var L=m(v,2);{var y=_=>{{let R=d(()=>e(s)?.x??0),M=d(()=>e(s)?.y??0),B=d(()=>e(s)?.returnFocus),z=d(()=>g.workspace_card_assignMicroKey_label()),I=d(()=>Fb(n(),p));wu(_,{get x(){return e(R)},get y(){return e(M)},get returnFocus(){return e(B)},selection:"single",get ariaLabel(){return e(z)},get items(){return e(I)},onClickOutside:p})}};F(L,_=>{e(s)&&_(y)})}return u(r,f),Ht(i)}var w2=k('<span class="flex size-4 shrink-0 items-center justify-center"><!></span>'),k2=k('<span data-workspace-card-pin-indicator="" aria-hidden="true"><!></span> <span class="sr-only"> </span>',1),S2=k('<span class="type-caption shrink-0 rounded-sm bg-muted-foreground/10 px-1.5 font-normal text-muted-foreground" data-workspace-card-trailing-label=""> </span>'),I2=k('<span data-workspace-card-pr-item=""><!></span>'),C2=k('<span class="flex shrink-0 items-center" data-workspace-card-pr-list=""><!></span>'),E2=k('<span data-workspace-card-time=""><!></span>'),P2=k('<span aria-hidden="true"><!></span>'),A2=k("<div><!> <!> <!> <!></div>"),T2=k('<div data-workspace-card-hover-surface=""><!></div>'),R2=k('<div role="group" data-workspace-card-row=""><!> <div class="relative z-10 flex shrink-0 items-center gap-1.5"><!> <!> <span class="sr-only"> </span></div> <div class="relative z-10 flex min-w-0 flex-1 items-center gap-2"><span class="flex min-w-0 flex-1 items-center gap-1" data-workspace-card-title-group=""><span dir="ltr" data-workspace-card-title=""><span class="wc-title-text svelte-1ct56pd"> </span></span> <!></span> <!> <!> <!></div> <!></div> <!> <!>',1),M2=k('<div class="relative z-10 flex shrink-0 items-center"><!></div>'),L2=k('<div><!> <!> <span class="font-medium truncate"> </span> <span class="shrink-0 text-muted-foreground">·</span> <span class="truncate text-xs text-muted-foreground"> </span> <!></div>'),N2=k('<div class="text-sm font-semibold truncate"> </div>'),Id=k('<span class="truncate"> </span>'),O2=k('<span class="text-muted-foreground">·</span>'),D2=k('<div class="flex items-center gap-1 truncate text-xs text-muted-foreground"><!> <!> <!></div>'),B2=k('<div><!> <!> <div class="flex items-center gap-2 text-xs"><!> <span class="truncate text-muted-foreground"> </span> <span> </span></div> <!></div>'),F2=k('<div class="flex items-center gap-2"><!> <span class="text-ui shrink-0 tabular-nums text-muted-foreground"> </span></div>'),z2=k('<div class="flex items-center justify-between text-ui"><span class="text-muted-foreground"> </span> <span class="tabular-nums"><span class="text-success"> </span> <span class="ml-1 text-danger"> </span></span></div>'),H2=k('<div class="flex items-center justify-between text-ui"><span class="text-muted-foreground"> </span></div>'),j2=k('<div class="flex items-center text-ui"><span> </span></div>'),W2=k('<div class="flex flex-col gap-1 px-3 pb-2.5"><!> <!> <!> <!></div>'),U2=k('<div class="relative z-10 flex items-center gap-1.5 px-2 pb-2"><!></div>'),q2=k('<div class="relative z-10 flex items-center gap-1.5 px-2 pb-2"><!> <!></div>'),V2=k('<div role="group"><!> <div class="flex items-start gap-2.5 px-3 pt-3 pb-2"><!> <div class="flex-1 min-w-0"><div class="text-sm font-medium"> </div> <div class="mt-0.5 line-clamp-2 text-xs leading-snug text-muted-foreground"> </div></div></div> <!> <!></div>');function Vp(r,t){if(new.target)return Dt({component:Vp,...r});zt(t,!0);const n=()=>yt(He,"$prMonitors$",c),a=()=>yt(Xe,"$microConnected$",c),o=()=>yt(Z,"$hidesOwnerActions$",c),s=()=>yt(X,"$workspaceKeySlot$",c),[c,l]=ma();let p=h(t,"workspace",7),i=h(t,"phase",7),f=h(t,"stats",7),v=h(t,"variant",7,"compact"),L=h(t,"showTime",7,!0),y=h(t,"isRunning",7,!1),_=h(t,"isUnread",7,!1),R=h(t,"isWaiting",7),M=h(t,"isPinned",7,!1),B=h(t,"streamingAgentIds",23,()=>[]),z=h(t,"hasSpec",7,!1),I=h(t,"isAgentRunning",7,!1),P=h(t,"agentDigest",7),H=h(t,"trailingLabel",7),C=h(t,"title",7),D=h(t,"repoName",7),V=h(t,"branch",7),J=h(t,"onClick",7),Y=h(t,"onAction",7),xe=h(t,"onTogglePin",7),$=h(t,"onMarkAsRead",7),we=h(t,"onOpenInNewWindow",7),de=h(t,"onHover",7),Te=h(t,"highlighted",7,!1),ie=h(t,"selected",7,!1),Re=h(t,"highlightId",7),se=h(t,"suppressHover",7,!1),ee=h(t,"isolateHoverReveal",7,!1),ke=h(t,"class",7),te=h(t,"actions",7);const ge=Ro("");_t(()=>{ge.set(p()?.id??"")});const He=Cg(ge),Xe=Vb(),X=eh(ge),Z=Eg(ge),Ye=d(()=>Hb(p()??{})),W=d(()=>jb(e(Ye)));let G=d(()=>p()?Db.url.pathname===`/workspace/${p().id}`:!1),q=d(()=>p()?`workspace-hover-card-${p().id}`:void 0),re=ve(!1),ye=ve(null),Oe=ve(null);_t(()=>{if(!e(Oe))return;const ne=hs(e(Oe),{id:Re()});return()=>ne.destroy()});let Q=ve(null),le=ve(null),Ee=ve(null),et=ve(0),_e=ve(0),Ae=d(()=>e(et)+(e(_e)>0?e(_e)+4:0));function K(){const ne=e(Q),ft=e(Ee);T(et,ne?Math.max(0,ne.scrollWidth-ne.clientWidth):0,!0),T(_e,ne&&ft&&ft.getClientRects().length>0?Math.max(0,ne.getBoundingClientRect().right-ft.getBoundingClientRect().left):0,!0)}_t(()=>{const ne=e(Q),ft=e(le),Gt=e(Ee);if(!ne||!ft||(K(),typeof ResizeObserver>"u"))return;const Xt=new ResizeObserver(K);return Xt.observe(ne),Xt.observe(ft),Gt&&Xt.observe(Gt),()=>Xt.disconnect()});let Se=null,ue=null,O=!1,U=!1,me=!1,Ke=!1,Ne=!1,Ve=!1,Ge=ve(!1),lt=!1,gt=null,Ct=ve(null),qt=null,It;function ce(){Se!==null&&(clearTimeout(Se),Se=null)}function Pe(){ue!==null&&(clearTimeout(ue),ue=null),qt?.(),qt=null}function rt(){Pe(),T(Ge,!0),T(re,!0),!Ne&&(Ne=!0,Jo.notifyOpened())}function st(){Pe(),clearTimeout(It),T(Ge,!1),T(re,!1),U=!1,Ke=!1,Ne&&(Ne=!1,Jo.notifyClosed())}function wt(){return O||U||me||Ke}function nt(){if(!e(re)){st();return}Pe(),ue=setTimeout(()=>{ue=null,wt()||st()},Ub),qt=Jo.deferClose(st)}function Pt(){U=!0,Pe()}function bt(){U=!1,!me&&!Ke&&nt()}function kt(){Ke=!0,clearTimeout(It),Pe()}function Mt(ne){const ft=ne.relatedTarget instanceof Node?ne.relatedTarget:null;if(ft&&be()?.contains(ft)||(Ke=!1,ft&&e(ye)?.contains(ft)))return;if(ft){!O&&!U&&st();return}const Gt=ne.target;clearTimeout(It),It=setTimeout(()=>{const Xt=document.activeElement,mr=be()?.contains(Xt)||e(ye)?.contains(Xt);Xt&&Xt!==Gt&&mr||!O&&!U&&st()},0)}function Jt(){gt!==null&&clearTimeout(gt),lt=!0,gt=setTimeout(()=>{lt=!1,gt=null},0)}function tr(ne){const ft=ne.target,Gt=be();ft instanceof Node&&Gt?.contains(ft)||ne.type==="scroll"&&e(ye)&&ft instanceof Node&&!ft.contains(e(ye))||(ne.type==="pointerdown"&&Jt(),ce(),st())}_t(()=>{if(e(Ge))return window.addEventListener("pointerdown",tr,!0),window.addEventListener("scroll",tr,!0),()=>{window.removeEventListener("pointerdown",tr,!0),window.removeEventListener("scroll",tr,!0)}});function Kt(ne){if(ne.key!=="Escape")return;const ft=ne.target;ft instanceof Node&&be()?.contains(ft)||(ne.preventDefault(),ne.stopPropagation(),Ve=me,ce(),st())}_t(()=>{if(e(re))return window.addEventListener("keydown",Kt,!0),()=>window.removeEventListener("keydown",Kt,!0)});const Me=d(()=>p()?Ag.select(Ot.state,p().id):null),pe=d(()=>e(Me)?e(Me):p()?.activePullRequest?p().activePullRequest:!p()?.prStatus||p().prNumber==null?null:{id:`legacy-pr-${p().prNumber}`,number:p().prNumber,url:p().prUrl??"",title:g.workspace_hoverCard_pullRequest_label(),status:p().prStatus,createdAt:p().updatedAt,updatedAt:p().updatedAt}),Ze=d(()=>Pg(p())),ot=d(()=>{if(!p()||e(Ze))return[];const ne=p(),ft=ne.repositoryOwner&&ne.repositoryName?`${ne.repositoryOwner}/${ne.repositoryName}`:void 0;return Um({workspacePRs:ne.pullRequests,activePR:e(pe),monitors:n(),workspaceRepo:ft,buildPrUrl:(Gt,Xt)=>km(Gt,ne.repositoryOwner,ne.repositoryName,Xt),getDisplayTitle:Gt=>Gt.title})}),tt=d(()=>e(ot)[0]);function Be(ne){const ft=ne.resource?.repository.provider==="gitlab"?`${ne.repo} !${ne.number}`:ne.repo?g.workspace_card_prBadge_repoLine_tooltip({repo:ne.repo,number:ne.number}):g.workspace_card_prBadge_label({number:` #${ne.number}`});return[Tg(ft,ne),ne.title,ne.details].filter(Boolean).join(`
296
296
  `)}function ae(ne){ne.key==="Enter"&&J()?.(ne)}function be(){return e(q)?document.getElementById(e(q)):null}function he(){return Array.from(be()?.querySelectorAll("button:not(:disabled), a[href]")??[])}function Ce(){const ne=e(ye)?.querySelector("[data-workspace-card-trigger]"),ft=be();if(!ne||!ft)return null;const Gt=Array.from(document.querySelectorAll('button:not(:disabled), a[href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])')).filter(mr=>mr.tabIndex>=0&&!ft.contains(mr)),Xt=Gt.indexOf(ne);return Xt>=0?Gt[Xt+1]:null}function Ie(ne){Ve=!!e(ye)?.contains(ne),st(),ne.focus({preventScroll:!0})}function Fe(){const ne=e(ye)?.querySelector("[data-workspace-card-trigger]");ne&&Ie(ne)}async function ze(ne){if(ne.key==="Escape"&&e(re)){ne.preventDefault(),ne.stopPropagation(),st();return}ne.key!=="ArrowDown"||se()||!p()||(ne.preventDefault(),ne.stopPropagation(),T(Ge,!0),T(re,!0),await Un(),he()[0]?.focus({preventScroll:!0}))}function Qe(ne){const ft=he(),Gt=ne.key==="Tab"&&ne.shiftKey&&ne.currentTarget===ft[0],mr=ne.key==="Tab"&&!ne.shiftKey&&ne.currentTarget===ft.at(-1)?Ce():null;ne.key!=="Escape"&&!Gt&&!mr||(ne.preventDefault(),ne.stopPropagation(),mr?Ie(mr):Fe())}function Je(){O=!0,Pe(),Jo.settleDeferredCloses(),K(),de()?.(),p()&&!se()&&!me&&(ce(),T(Ge,!0),Se=setTimeout(()=>{Se=null,rt()},Jo.currentOpenDelay))}function We(){O=!1,ce(),!me&&!Ke&&nt()}function $e(){me=!0,ce(),Pe(),!Ve&&(lt||p()&&!se()&&(T(Ge,!0),T(re,!0)))}function Ue(ne){const ft=ne.relatedTarget instanceof Node?ne.relatedTarget:null;ft&&e(ye)?.contains(ft)||(Ve=!1,me=!1,!(ft&&be()?.contains(ft))&&!O&&!U&&st())}_t(()=>{se()&&(ce(),Pe(),st())});let qe=ve(null),dt=ve(!1),it;_t(()=>{const ne=p()?.id;it!==ne&&(it=ne,T(dt,!1)),e(qe)&&e(qe).workspaceId!==p()?.id&&Et()});function ut(ne){if(!p())return;const ft=xu(ne);if(ft){if(T(dt,!1),vt().length===0){T(qe,null);return}T(qe,{...ft,returnFocus:ne.target instanceof HTMLElement?ne.target.closest("button")??e(ye)?.querySelector("button")??null:null,workspaceId:p().id},!0)}}function Et(){T(qe,null),T(dt,!1)}_t(()=>{e(dt)&&T(qe,null)}),bo(()=>{ce(),Pe(),gt!==null&&(clearTimeout(gt),gt=null),st()});function vt(){if(!p())return[];const ne=[];return we()&&ne.push({id:"open-new-window",label:g.workspace_card_openNewWindow_label(),icon:Jd,onClick:()=>{we()?.(),Et()}}),ne.push(...Wb(p().id,{connected:a(),onClose:Et})),o()||(e(Ze)||ne.push({id:"transfer",label:g.workspace_card_transfer_label(),icon:iv,onClick:()=>{Ot.dispatch(Rv({workspaceId:p().id,workspaceTitle:p().title})),Et()}}),ne.push({id:"archive",label:g.workspace_card_archive_label(),icon:Yd,onClick:()=>{Ot.dispatch(iu(p().id)),Et()}}),ne.push({id:"delete",label:g.workspace_card_deleteSpace_label(),icon:Xd,destructive:!0,onClick:()=>{Ot.dispatch(lu(p().id)),Et()}})),ne}let Wt=d(()=>I()&&P()?P():i()?.subtitle??""),Yt=d(()=>f()&&f().tasks.total>0?f().tasks.completed/f().tasks.total:0),Qt=d(()=>!!f()&&(f().tasks.total>0||f().files.changed>0||f().commits.total>0||f().pr.hasOpen||f().pr.hasMerged)),dr=d(()=>e(Ze)?void 0:V()),Br=d(()=>!f()||e(Ze)?"":f().pr.hasMerged?g.workspace_card_prMerged_label({number:f().pr.number??""}):f().pr.hasOpen?g.workspace_card_prOpen_label({number:f().pr.number?`#${f().pr.number}`:""}):""),on=d(()=>i()?.phase==="planning"?I()?{primary:{label:g.workspace_card_showCoordinator_label(),action:"show-coordinator"},secondary:{label:g.workspace_card_pause_label(),action:"pause"}}:z()||(f()?.tasks.total??0)>0?{primary:{label:g.workspace_card_approveStart_label(),action:"approve"},secondary:{label:g.workspace_card_viewSpec_label(),action:"view-spec"}}:{primary:{label:g.workspace_card_showCoordinator_label(),action:"show-coordinator"},secondary:{label:g.workspace_card_viewSpec_label(),action:"view-spec"}}:i()?.phase==="building"?{primary:{label:g.workspace_card_showCoordinator_label(),action:"show-coordinator"},secondary:{label:g.workspace_card_pause_label(),action:"pause"}}:i()?.phase==="reviewing"?{primary:{label:g.workspace_card_createPr_label(),action:"create-pr"},secondary:{label:g.workspace_card_showChanges_label(),action:"show-changes"}}:{primary:{label:g.workspace_card_archive_label(),action:"archive"},secondary:{label:g.workspace_card_showChanges_label(),action:"show-changes"}});const sn={planning:"bg-muted/20 text-muted-foreground",building:"bg-info/15 text-info",reviewing:"bg-primary/15 text-primary",shipped:"bg-foreground/10 text-foreground"};var ur={get workspace(){return p()},set workspace(ne){p(ne),b()},get phase(){return i()},set phase(ne){i(ne),b()},get stats(){return f()},set stats(ne){f(ne),b()},get variant(){return v()},set variant(ne="compact"){v(ne),b()},get showTime(){return L()},set showTime(ne=!0){L(ne),b()},get isRunning(){return y()},set isRunning(ne=!1){y(ne),b()},get isUnread(){return _()},set isUnread(ne=!1){_(ne),b()},get isWaiting(){return R()},set isWaiting(ne){R(ne),b()},get isPinned(){return M()},set isPinned(ne=!1){M(ne),b()},get streamingAgentIds(){return B()},set streamingAgentIds(ne=[]){B(ne),b()},get hasSpec(){return z()},set hasSpec(ne=!1){z(ne),b()},get isAgentRunning(){return I()},set isAgentRunning(ne=!1){I(ne),b()},get agentDigest(){return P()},set agentDigest(ne){P(ne),b()},get trailingLabel(){return H()},set trailingLabel(ne){H(ne),b()},get title(){return C()},set title(ne){C(ne),b()},get repoName(){return D()},set repoName(ne){D(ne),b()},get branch(){return V()},set branch(ne){V(ne),b()},get onClick(){return J()},set onClick(ne){J(ne),b()},get onAction(){return Y()},set onAction(ne){Y(ne),b()},get onTogglePin(){return xe()},set onTogglePin(ne){xe(ne),b()},get onMarkAsRead(){return $()},set onMarkAsRead(ne){$(ne),b()},get onOpenInNewWindow(){return we()},set onOpenInNewWindow(ne){we(ne),b()},get onHover(){return de()},set onHover(ne){de(ne),b()},get highlighted(){return Te()},set highlighted(ne=!1){Te(ne),b()},get selected(){return ie()},set selected(ne=!1){ie(ne),b()},get highlightId(){return Re()},set highlightId(ne){Re(ne),b()},get suppressHover(){return se()},set suppressHover(ne=!1){se(ne),b()},get isolateHoverReveal(){return ee()},set isolateHoverReveal(ne=!1){ee(ne),b()},get class(){return ke()},set class(ne){ke(ne),b()},get actions(){return te()},set actions(ne){te(ne),b()},$set:Bt,$on:(ne,ft)=>Ft(t,ne,ft)},Vn=ht(),$n=De(Vn);{var ha=ne=>{var ft=R2(),Gt=De(ft);let Xt;var mr=E(Gt);{let xt=d(()=>p().title||g.workspace_links_untitled_label()),Tt=d(()=>`workspace-status-state-${p().id}${M()?` workspace-pinned-state-${p().id}`:""}${e(re)?` ${e(q)}`:""}`),sr=d(()=>e(G)?"page":void 0);St(mr,{variant:"plain",class:"absolute inset-0 z-0 h-auto w-auto rounded-md focus-visible:border-transparent focus-visible:bg-background/50 focus-visible:ring-0",get"aria-label"(){return e(xt)},get"aria-describedby"(){return e(Tt)},get"aria-current"(){return e(sr)},"data-workspace-card-trigger":!0,onkeydown:ze,onclick:wr=>{wr.stopPropagation(),J()?.(wr)}})}var Kn=m(mr,2),Xr=E(Kn);{var ea=xt=>{var Tt=w2(),sr=E(Tt);{var wr=Cr=>{qp(Cr,{get workspaceId(){return p().id},get slot(){return s()}})};F(sr,Cr=>{s()!==null&&Cr(wr)})}w(Tt),u(xt,Tt)};F(Xr,xt=>{a()&&xt(ea)})}var Cn=m(Xr,2);Ri(Cn,{get content(){return e(W).tooltip},side:"bottom",sideOffset:4,children:(xt,Tt)=>{zb(xt,{get status(){return e(Ye)},size:14,decorative:!0,class:"justify-start"})},$$slots:{default:!0}});var En=m(Cn,2),ia=N(En,!0);w(Kn);var Lr=m(Kn,2),en=E(Lr),er=E(en),hr=E(er),yr=N(hr,!0);vr(hr,xt=>T(le,xt),()=>e(le)),w(er),vr(er,xt=>T(Q,xt),()=>e(Q));var Ar=m(er,2);{var kr=xt=>{var Tt=k2(),sr=De(Tt),wr=E(sr);Rt(wr,{get icon(){return Yl},size:"xs"}),w(sr);var Cr=m(sr,2),Kr=N(Cr,!0);S(Pn=>{pt(sr,1,`wc-pin-indicator inline-flex shrink-0 items-center text-muted-foreground transition-opacity
297
- ${xe()?Te()?"opacity-0":se()?"":ee()?"group-hover/wc:opacity-0 group-focus-within/wc:opacity-0":"group-hover:opacity-0 group-focus-within:opacity-0":""}`,"svelte-1ct56pd"),oe(Cr,"id",`workspace-pinned-state-${p().id??""}`),x(Kr,Pn)},[()=>g.layout_activeCard_pinned_header()]),u(xt,Tt)};F(Ar,xt=>{M()&&xt(kr)})}w(en);var cn=m(en,2);{var ba=xt=>{var Tt=S2(),sr=N(Tt,!0);S(()=>x(sr,H())),u(xt,Tt)};F(cn,xt=>{H()&&xt(ba)})}var hn=m(cn,2);{var Fr=xt=>{const Tt=d(()=>e(tt));var sr=C2(),wr=E(sr);{let Cr=d(()=>Be(e(Tt)));Ri(wr,{get content(){return e(Cr)},side:"bottom",sideOffset:4,children:(Kr,Pn)=>{var za=ht(),_a=De(za);{var Nr=Nn=>{{let zr=d(()=>Be(e(Tt)));St(Nn,{variant:"plain",size:"icon-compact",iconOnly:!0,get class(){return`size-5 shrink-0 rounded-sm ${e(Tt).foregroundClass??""}`},get"aria-label"(){return e(zr)},"data-workspace-card-pr-item":!0,get"data-pr-identity"(){return e(Tt).identity},get"data-pr-status"(){return e(Tt).status},onclick:dn=>{dn.stopPropagation();const Ha=p().id;sg(async()=>{const{handleLink:xa}=await import("./BKYUqADc.js").then(Ta=>Ta.l);return{handleLink:xa}},__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,39,40,41,42,43,44,45,46]),import.meta.url).then(({handleLink:xa})=>xa(e(Tt).url,{workspaceId:Ha,event:dn}))},children:(dn,Ha)=>{Rt(dn,{get icon(){return e(Tt).statusIcon},size:14})},$$slots:{default:!0}})}},Gn=Nn=>{var zr=I2(),dn=E(zr);Rt(dn,{get icon(){return e(Tt).statusIcon},size:14}),w(zr),S(Ha=>{pt(zr,1,`inline-flex size-5 shrink-0 items-center justify-center rounded-sm ${e(Tt).foregroundClass??""}`,"svelte-1ct56pd"),oe(zr,"aria-label",Ha),oe(zr,"data-pr-identity",e(Tt).identity),oe(zr,"data-pr-status",e(Tt).status)},[()=>Be(e(Tt))]),u(Nn,zr)};F(_a,Nn=>{e(Tt).url?Nn(Nr):Nn(Gn,-1)})}u(Kr,za)},$$slots:{default:!0}})}w(sr),S(Cr=>oe(sr,"aria-label",Cr),[()=>e(Tt).resource?.repository.provider==="gitlab"?g.workspace_hoverCard_mergeRequest_label():g.workspace_hoverCard_pullRequest_label()]),u(xt,sr)};F(hn,xt=>{e(tt)&&xt(Fr)})}var Vr=m(hn,2);{var ya=xt=>{var Tt=E2(),sr=E(Tt);{var wr=Kr=>{{let Pn=d(()=>tc(p()));Hg(Kr,{get date(){return e(Pn)},class:"type-caption whitespace-nowrap tabular-nums text-muted-foreground",compact:!0})}},Cr=d(()=>tc(p())>0);F(sr,Kr=>{e(Cr)&&Kr(wr)})}w(Tt),S(()=>pt(Tt,1,`wc-secondary shrink-0 ${te()||xe()||_()&&$()?Te()?"opacity-0":se()?"":ee()?"group-hover/wc:opacity-0 group-hover/message:opacity-0":"group-hover:opacity-0 group-hover/message:opacity-0":""}`,"svelte-1ct56pd")),u(xt,Tt)};F(Vr,xt=>{L()&&xt(ya)})}w(Lr);var Za=m(Lr,2);{var qa=xt=>{var Tt=A2(),sr=E(Tt);{var wr=Nr=>{{let Gn=d(()=>M()?"text-primary-ink":"text-muted-foreground"),Nn=d(()=>M()?g.workspace_card_unpin_ariaLabel():g.workspace_card_pin_ariaLabel()),zr=d(()=>M()?g.workspace_card_unpin_tooltip():g.workspace_card_pin_tooltip());St(Nr,{variant:"plain",size:"icon-xs",iconOnly:!0,get class(){return`transition-all hover:bg-muted/50 hover:text-foreground focus-visible:border-transparent focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:ring-0
297
+ ${xe()?Te()?"opacity-0":se()?"":ee()?"group-hover/wc:opacity-0 group-focus-within/wc:opacity-0":"group-hover:opacity-0 group-focus-within:opacity-0":""}`,"svelte-1ct56pd"),oe(Cr,"id",`workspace-pinned-state-${p().id??""}`),x(Kr,Pn)},[()=>g.layout_activeCard_pinned_header()]),u(xt,Tt)};F(Ar,xt=>{M()&&xt(kr)})}w(en);var cn=m(en,2);{var ba=xt=>{var Tt=S2(),sr=N(Tt,!0);S(()=>x(sr,H())),u(xt,Tt)};F(cn,xt=>{H()&&xt(ba)})}var hn=m(cn,2);{var Fr=xt=>{const Tt=d(()=>e(tt));var sr=C2(),wr=E(sr);{let Cr=d(()=>Be(e(Tt)));Ri(wr,{get content(){return e(Cr)},side:"bottom",sideOffset:4,children:(Kr,Pn)=>{var za=ht(),_a=De(za);{var Nr=Nn=>{{let zr=d(()=>Be(e(Tt)));St(Nn,{variant:"plain",size:"icon-compact",iconOnly:!0,get class(){return`size-5 shrink-0 rounded-sm ${e(Tt).foregroundClass??""}`},get"aria-label"(){return e(zr)},"data-workspace-card-pr-item":!0,get"data-pr-identity"(){return e(Tt).identity},get"data-pr-status"(){return e(Tt).status},onclick:dn=>{dn.stopPropagation();const Ha=p().id;sg(async()=>{const{handleLink:xa}=await import("./BM_VA785.js").then(Ta=>Ta.l);return{handleLink:xa}},__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,39,40,41,42,43,44,45,46]),import.meta.url).then(({handleLink:xa})=>xa(e(Tt).url,{workspaceId:Ha,event:dn}))},children:(dn,Ha)=>{Rt(dn,{get icon(){return e(Tt).statusIcon},size:14})},$$slots:{default:!0}})}},Gn=Nn=>{var zr=I2(),dn=E(zr);Rt(dn,{get icon(){return e(Tt).statusIcon},size:14}),w(zr),S(Ha=>{pt(zr,1,`inline-flex size-5 shrink-0 items-center justify-center rounded-sm ${e(Tt).foregroundClass??""}`,"svelte-1ct56pd"),oe(zr,"aria-label",Ha),oe(zr,"data-pr-identity",e(Tt).identity),oe(zr,"data-pr-status",e(Tt).status)},[()=>Be(e(Tt))]),u(Nn,zr)};F(_a,Nn=>{e(Tt).url?Nn(Nr):Nn(Gn,-1)})}u(Kr,za)},$$slots:{default:!0}})}w(sr),S(Cr=>oe(sr,"aria-label",Cr),[()=>e(Tt).resource?.repository.provider==="gitlab"?g.workspace_hoverCard_mergeRequest_label():g.workspace_hoverCard_pullRequest_label()]),u(xt,sr)};F(hn,xt=>{e(tt)&&xt(Fr)})}var Vr=m(hn,2);{var ya=xt=>{var Tt=E2(),sr=E(Tt);{var wr=Kr=>{{let Pn=d(()=>tc(p()));Hg(Kr,{get date(){return e(Pn)},class:"type-caption whitespace-nowrap tabular-nums text-muted-foreground",compact:!0})}},Cr=d(()=>tc(p())>0);F(sr,Kr=>{e(Cr)&&Kr(wr)})}w(Tt),S(()=>pt(Tt,1,`wc-secondary shrink-0 ${te()||xe()||_()&&$()?Te()?"opacity-0":se()?"":ee()?"group-hover/wc:opacity-0 group-hover/message:opacity-0":"group-hover:opacity-0 group-hover/message:opacity-0":""}`,"svelte-1ct56pd")),u(xt,Tt)};F(Vr,xt=>{L()&&xt(ya)})}w(Lr);var Za=m(Lr,2);{var qa=xt=>{var Tt=A2(),sr=E(Tt);{var wr=Nr=>{{let Gn=d(()=>M()?"text-primary-ink":"text-muted-foreground"),Nn=d(()=>M()?g.workspace_card_unpin_ariaLabel():g.workspace_card_pin_ariaLabel()),zr=d(()=>M()?g.workspace_card_unpin_tooltip():g.workspace_card_pin_tooltip());St(Nr,{variant:"plain",size:"icon-xs",iconOnly:!0,get class(){return`transition-all hover:bg-muted/50 hover:text-foreground focus-visible:border-transparent focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:ring-0
298
298
  ${e(Gn)??""}`},onclick:dn=>{dn.stopPropagation(),xe()?.(dn)},get"aria-label"(){return e(Nn)},get title(){return e(zr)},children:(dn,Ha)=>{var xa=P2(),Ta=E(xa);Rt(Ta,{get icon(){return Yl},size:"xs"}),w(xa),u(dn,xa)},$$slots:{default:!0}})}};F(sr,Nr=>{xe()&&Nr(wr)})}var Cr=m(sr,2);{var Kr=Nr=>{{let Gn=d(()=>g.workspace_card_markAsRead_label()),Nn=d(()=>g.workspace_card_markAsRead_label());St(Nr,{variant:"plain",size:"icon-xs",iconOnly:!0,class:"text-muted-foreground hover:bg-muted/50 hover:text-foreground focus-visible:border-transparent focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:ring-0",onclick:zr=>{zr.stopPropagation(),$()?.(zr)},get"aria-label"(){return e(Gn)},get title(){return e(Nn)},children:(zr,dn)=>{Rt(zr,{get icon(){return Zd},size:"xs"})},$$slots:{default:!0}})}};F(Cr,Nr=>{_()&&$()&&Nr(Kr)})}var Pn=m(Cr,2);gn(Pn,()=>te()??Es);var za=m(Pn,2);{var _a=Nr=>{{let Gn=d(vt),Nn=d(()=>g.workspace_progressCard_actions_ariaLabel());Tl(Nr,{get items(){return e(Gn)},get ariaLabel(){return e(Nn)},class:"flex size-5 cursor-pointer items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:outline-none",get open(){return e(dt)},set open(zr){T(dt,zr,!0)}})}};F(za,Nr=>{we()&&Nr(_a)})}w(Tt),vr(Tt,Nr=>T(Ee,Nr),()=>e(Ee)),S(()=>pt(Tt,1,`wc-actions absolute right-1 top-1/2 z-20 flex -translate-y-1/2 items-center gap-0.5 rounded-md bg-accent/95 px-0.5 focus-within:opacity-100
299
299
  ${ee()?"group-focus-within/wc:opacity-100":"group-focus-within:opacity-100"}
300
300
  ${Te()?"opacity-100":se()?"opacity-0":ee()?"opacity-0 group-hover/wc:opacity-100":"opacity-0 group-hover:opacity-100"}`,"svelte-1ct56pd")),u(xt,Tt)};F(Za,xt=>{(te()||we()||xe()||_()&&$())&&xt(qa)})}w(Gt),vr(Gt,xt=>T(ye,xt),()=>e(ye)),qn(Gt,(xt,Tt)=>hs?.(xt,Tt),()=>({id:Re()}));var Zr=m(Gt,2);{var tn=xt=>{Bb(xt,{get id(){return e(q)},get anchor(){return`--workspace-list-${p().id??""}`},position:"right",get anchorElement(){return e(ye)},class:"w-auto overflow-visible! rounded-lg border-0! bg-background! shadow-none!",onmouseenter:Pt,onmouseleave:bt,onfocusin:kt,onfocusout:Mt,children:(Tt,sr)=>{var wr=T2(),Cr=E(wr);qb(Cr,{get workspace(){return p()},get activeAgentIds(){return B()},onkeydown:Qe}),w(wr),vr(wr,Kr=>T(Ct,Kr),()=>e(Ct)),Mn("pointerenter",wr,Pt),Mn("pointerleave",wr,bt),Mr("focusin",wr,kt),Mr("focusout",wr,Mt),u(Tt,wr)},$$slots:{default:!0}})};F(Zr,xt=>{e(re)&&!se()&&xt(tn)})}var bn=m(Zr,2);{var xr=xt=>{const Tt=d(vt);var sr=ht(),wr=De(sr);{var Cr=Kr=>{{let Pn=d(()=>e(qe)?.x??0),za=d(()=>e(qe)?.y??0),_a=d(()=>e(qe)?.returnFocus),Nr=d(()=>g.workspace_progressCard_actions_ariaLabel());wu(Kr,{get x(){return e(Pn)},get y(){return e(za)},get returnFocus(){return e(_a)},get ariaLabel(){return e(Nr)},get items(){return e(Tt)},onClickOutside:Et})}};F(wr,Kr=>{e(Tt).length>0&&Kr(Cr)})}u(xt,sr)};F(bn,xt=>{e(qe)&&xt(xr)})}S((xt,Tt,sr)=>{pt(Gt,1,xt,"svelte-1ct56pd"),oe(Gt,"data-pinned",M()),oe(Gt,"data-highlight-id",Re()),Xt=Ln(Gt,"",Xt,{"anchor-name":`--workspace-list-${p().id??""}`}),oe(En,"id",`workspace-status-state-${p().id??""}`),x(ia,e(W).accessibleName),pt(er,1,`wc-title type-body min-w-0 truncate font-normal!
@@ -1 +1 @@
1
- import{b as i,aW as l,aw as d,P as o}from"./HaIAX7Y7.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{g as a,m as b,w as c,p as d,x as e,y as f,h as g,f as h};
1
+ import{b as i,aW as l,aw as d,P as o}from"./BMfv2h4V.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{g as a,m as b,w as c,p as d,x as e,y as f,h as g,f as h};
@@ -1 +1 @@
1
- import{b as a,B as w,ay as x}from"./HaIAX7Y7.js";var g=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=B(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),B=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{g as s};
1
+ import{b as a,B as w,ay as x}from"./BMfv2h4V.js";var g=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=B(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),B=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{g as s};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DeOvWG_V.js","/app/immutable/chunks/DUPdECze.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/gsFx6FSh.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BophAjr8.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/DYGZj8tM.js","/app/immutable/chunks/NvPqoUzX.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/rVFVSTiL.js","/app/immutable/chunks/Dou_hoaA.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CxNkcb8W.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/BeMU-UdF.js","/app/immutable/chunks/R5qsERXh.js","/app/immutable/chunks/DWlZtz5u.js","/app/immutable/chunks/DKOGfBeL.js","/app/immutable/chunks/BxPVGrtc.js","/app/immutable/chunks/CDDY7bU6.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/Dc_PiRux.js","/app/immutable/chunks/CzTFPES1.js","/app/immutable/chunks/Ccbg-J4J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/Cu2deF-X.js","/app/immutable/chunks/BeAfjfr4.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/CQpwPlmg.js","/app/immutable/chunks/B2F1R5gp.js","/app/immutable/chunks/7_fb2zE8.js","/app/immutable/chunks/vWF7FJqU.js","/app/immutable/chunks/DcBz7Q0p.js","/app/immutable/chunks/LguPrO6F.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/B7oqNDkm.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/BtfRwPt7.js","/app/immutable/chunks/CKje4aJN.js","/app/immutable/chunks/BDjmUG9E.js","/app/immutable/chunks/CdO4czEi.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/Db6vgmuJ.js","/app/immutable/chunks/CtnMBSuA.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/tAo3FW4C.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/1d4tWxyl.js","/app/immutable/chunks/CSHq_biu.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CflYgBql.js","/app/immutable/chunks/Bu_2dHSO.js","/app/immutable/chunks/Ddv73vDp.js","/app/immutable/chunks/BJNB3KvG.js"])))=>i.map(i=>d[i]);
2
- var F=Object.defineProperty;var $=(c,e,r)=>e in c?F(c,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[e]=r;var u=(c,e,r)=>$(c,typeof e!="symbol"?e+"":e,r);import{l as _}from"./ChTqQfQN.js";import{bm as b,_ as y}from"./DUPdECze.js";import{I$ as k,Cg as M}from"./Dou_hoaA.js";import{h as O}from"./DeOvWG_V.js";import{O as W}from"./CflYgBql.js";import{cO as L}from"./CikjWVQh.js";import{v as x,b7 as U,be as j}from"./CKje4aJN.js";import{a as z}from"./9hZyANjD.js";const N={USE_DEFAULT_CONTEXT:{id:"use-default-context",type:"command",get label(){return b.chat_mentions_useDefaultContext_label()},get description(){return b.chat_mentions_useDefaultContext_description()},icon:"🔄",uri:"devspace://command/use-default-context"},CLEAR_CONTEXT:{id:"clear-context",type:"command",get label(){return b.chat_mentions_clearContext_label()},get description(){return b.chat_mentions_clearContext_description()},icon:"🗑️",uri:"devspace://command/clear-context"}};function ke(c){return"items"in c||"subgroups"in c}function B(c){if(!c||typeof c!="object")return!1;const e=c;return!(typeof e.id!="string"||typeof e.label!="string"||typeof e.uri!="string"||typeof e.type!="string"||e.subtitle!==void 0&&typeof e.subtitle!="string"||e.description!==void 0&&typeof e.description!="string"||e.icon!==void 0&&typeof e.icon!="string"||e.score!==void 0&&typeof e.score!="number"||e.group!==void 0&&typeof e.group!="string")}function g(c,e){if(!c||!e)return null;const r=c.toLowerCase(),s=e.toLowerCase();let t=0;for(let a=0;a<s.length&&t<r.length;a++)s[a]===r[t]&&t++;if(t!==r.length)return null;const i=K(r,s);return i?{score:V(r,s,i),matches:i}:null}function K(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;for(let a=s;a<e.length;a++)if(e[a]===i){r.push(a),s=a+1,n=!0;break}if(!n)return null}return r}function V(c,e,r){let s=0;s+=1;let t=0;for(let l=1;l<r.length;l++)r[l]===r[l-1]+1&&(t+=.1);s+=t;let i=0;for(const l of r)(l===0||J(e,l))&&(i+=.15);s+=i,r[0]===0&&(s+=.2);const a=(r[r.length-1]-r[0])/e.length*.3;return s-=a,Math.min(s/2.5,1)}function J(c,e){if(e===0)return!0;const r=c[e],s=c[e-1];return r===r.toUpperCase()&&s===s.toLowerCase()||!/[a-z0-9]/i.test(s)}function G(c,e){if(!c||!e)return null;if(!c.includes("/"))return g(c,e);const r=c.split("/").filter(n=>n.length>0),s=e.split("/").filter(n=>n.length>0);if(r.length===0||s.length===0)return null;const t=H(r,s);return t?{score:X(r,s,t),matches:[]}:null}function H(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;const a=t===c.length-1;for(let o=s;o<e.length;o++){const l=e[o];if(g(i,l)){r.push(o),s=o+1,n=!0;break}if(a){const p=l.split(".")[0],m=l.includes(".")?l.split(".").pop():"";if(m&&g(i,m)){r.push(o),s=o+1,n=!0;break}if(p&&g(i,p)){r.push(o),s=o+1,n=!0;break}}}if(!n)return null}return r}function X(c,e,r){let s=0;s+=1,s+=r.length*.2;let t=0;for(let n=1;n<r.length;n++)r[n]===r[n-1]+1&&(t+=.15);s+=t,r.length>0&&r[r.length-1]===e.length-1&&(s+=.3);for(let n=0;n<c.length&&n<r.length;n++){const a=c[n],o=e[r[n]];a.toLowerCase()===o.toLowerCase()&&(s+=.2)}return Math.min(s/3,1)}function R(c,e,r){return JSON.stringify({query:c,workspaceId:r.workspaceId,repoPath:r.repoPath,currentFile:r.currentFile,currentNote:r.currentNote,providers:e.map(s=>[s.id,s.getCacheKey?.(r)])})}const D="*",Ce=["member","note","agent","file","folder","script","terminal",D,"specialist"];function Q(c,e){if(e.length===0)return[...c].sort((t,i)=>(i.score??0)-(t.score??0));const r=new Map(e.map((t,i)=>[t,i])),s=r.get(D)??e.length;return c.map(t=>({candidate:t,rank:r.get(t.type)??s})).sort((t,i)=>t.rank-i.rank||(i.candidate.score??0)-(t.candidate.score??0)).map(({candidate:t})=>t)}function Y(c,e){const r=new Map;return c.filter(s=>{const t=r.get(s.type)??0;return r.set(s.type,t+1),t<e})}class Ie{constructor(e={}){u(this,"searchDebounceTimer",null);u(this,"currentAbortController",null);u(this,"cache",new Map);u(this,"config");u(this,"isSearching",!1);this.config={debounceMs:e.debounceMs??100,maxResults:e.maxResults??50,cacheMaxAge:e.cacheMaxAge??3e4,enableSemantic:e.enableSemantic??!1,enableLivePreview:e.enableLivePreview??!0,enableCollaboration:e.enableCollaboration??!1,typeOrder:e.typeOrder??[],maxResultsPerKind:e.maxResultsPerKind??20}}async search(e,r,s){this.cancelPendingSearch();const t=R(e,r,s),i=this.cache.get(t);if(i&&!this.isCacheExpired(i))return _.debug("[SearchService] Returning cached results for:",e),i.results;const n=new AbortController;this.currentAbortController=n;const a=n.signal;return new Promise((o,l)=>{this.isSearching=!0;let p=!1;const m=()=>{a.removeEventListener("abort",v),this.currentAbortController===n&&(this.currentAbortController=null,this.searchDebounceTimer=null,this.isSearching=!1)},w=f=>{p||(p=!0,m(),o(f))},d=f=>{p||(p=!0,m(),l(f))},v=()=>d(new DOMException("Search cancelled","AbortError"));a.addEventListener("abort",v,{once:!0});const h=async()=>{try{if(a.aborted){d(new DOMException("Search cancelled","AbortError"));return}_.debug("[SearchService] Searching with providers:",r.map(C=>C.id));const f=R(e,r,s),P=await Promise.all(r.map(C=>this.searchWithProvider(C,e,s,a)));if(a.aborted)return;if(f!==R(e,r,s)){w([]);return}const S=this.combineResults(P.flat()).filter(C=>B(C)),E=this.applyFuzzyMatching(e,S),A=Q(E,this.config.typeOrder),T=this.config.typeOrder.length>0?Y(A,this.config.maxResultsPerKind):A.slice(0,this.config.maxResults);this.cache.set(f,{results:T,timestamp:Date.now()}),_.debug(`[SearchService] Found ${T.length} results`),w(T)}catch(f){a.aborted?d(new DOMException("Search cancelled","AbortError")):(_.error("[SearchService] Search error:",f),d(f instanceof Error?f:new Error(String(f))))}};e?this.searchDebounceTimer=setTimeout(h,this.config.debounceMs):h()})}async searchWithProvider(e,r,s,t){try{const i={...s,signal:t},n=await e.search(r,i),a=e.scoreRelevance?.bind(e);return a?n.map(o=>({...o,score:a(o,s)})):n}catch(i){return t.aborted||_.error(`[SearchService] Provider ${e.id} search failed:`,i),[]}}combineResults(e){const r=new Set,s=[];for(const t of e){const i=`${t.type}:${t.uri}`;r.has(i)||(r.add(i),s.push(t))}return s}applyFuzzyMatching(e,r){if(!e||e.length===0)return r;const t=r.map(i=>{let n=0;const a=i.meta?.path||i.meta?.fullPath||(i.subtitle?`${i.subtitle}/${i.label}`:i.label);if(a){const l=G(e,a);l&&(n=Math.max(n,l.score*1.8))}const o=g(e,i.label);if(o&&(n=Math.max(n,o.score*1.5)),i.subtitle){const l=g(e,i.subtitle);l&&(n=Math.max(n,l.score))}if(i.description){const l=g(e,i.description);l&&(n=Math.max(n,l.score*.5))}return{...i,score:n>0?n:i.score??0}}).filter(i=>i.score>0);return t.length>0?t:r}cancelPendingSearch(){this.searchDebounceTimer&&(clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=null),this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=null)}isCacheExpired(e){return Date.now()-e.timestamp>this.config.cacheMaxAge}clearCache(){this.cache.clear()}isLoading(){return this.isSearching}destroy(){this.cancelPendingSearch(),this.clearCache()}}class Z{constructor(){u(this,"id","file");u(this,"triggers",["@file","@f"]);u(this,"default",!0);u(this,"supportsRanges",!0);u(this,"supportsLivePreview",!0);u(this,"recentFiles",new Set);u(this,"fileIconMap",{ts:"📘",tsx:"⚛️",js:"📜",jsx:"⚛️",svelte:"🔥",vue:"💚",py:"🐍",rs:"🦀",go:"🐹",java:"☕",cpp:"⚙️",c:"⚙️",h:"📎",md:"📝",json:"📋",yaml:"📋",yml:"📋",toml:"📋",xml:"📋",html:"🌐",css:"🎨",scss:"🎨",sass:"🎨",less:"🎨",sql:"🗃️",sh:"🖥️",bash:"🖥️",zsh:"🖥️",fish:"🖥️",dockerfile:"🐳",docker:"🐳",gitignore:"🚫",env:"🔐",lock:"🔒",test:"🧪",spec:"🧪"})}async search(e,r){_.debug("[FileProvider] Searching for:",{query:e,context:{workspaceId:r.workspaceId}});const s=r.workspaceId;if(!s)return[];try{const t=await O("search.fileNames",{workspaceId:s,pattern:e||"",limit:10}),n=(Array.isArray(t?.files)?t.files:[]).map(a=>{const o=a.split("/").pop()||a,l=o.split(".").pop()||"";return{id:`file-${a}`,label:o,type:"file",uri:`file:${a}`,description:a,subtitle:a,score:.5,meta:{path:a,fullPath:a,relativePath:a,extension:l,language:this.getLanguageFromExtension(l)}}});return this.deduplicateAndDistinguish(n)}catch(t){return _.error("[FileProvider] Search failed:",t),[]}}async searchRecent(e,r){if(!r.recentFiles||r.recentFiles.length===0)return[];const s=await Promise.all(r.recentFiles.filter(t=>e?g(e,t)!==null:!0).slice(0,3).map(t=>{const i=t.split("/").pop()||t,n=i.split(".").pop()||"";return this.fileToCandidate({path:t,name:i,extension:n})}));return s.forEach(t=>{this.recentFiles.add(t.uri)}),s}async searchContextual(e,r){return r.currentFile?[]:[]}async fileToCandidate(e){const r=this.getFileIcon(e.extension),s=e.path,t=this.formatPath(s);return{id:`file-${e.path}`,type:"file",label:e.name,subtitle:t,description:s,icon:r,uri:`devspace://file/${encodeURIComponent(e.path)}`,meta:{path:s,fullPath:e.path,lastModified:e.lastModified,size:e.size,language:e.language||this.getLanguageFromExtension(e.extension)}}}combineResults(...e){const r=new Set,s=[];for(const t of e)for(const i of t)r.has(i.uri)||(r.add(i.uri),s.push(i));return this.deduplicateAndDistinguish(s)}deduplicateAndDistinguish(e){const r=new Map;for(const t of e){const i=t.label;let n=r.get(i);n||(n=[],r.set(i,n)),n.push(t)}const s=[];for(const[t,i]of r.entries())if(i.length===1)s.push(i[0]);else{const n=this.distinguishDuplicates(i);s.push(...n)}return s}distinguishDuplicates(e){const r=e.map(t=>t.description||t.meta?.path||"");return e.map((t,i)=>{const n=r[i],a=r.filter((p,m)=>m!==i),o=n.split("/");let l="";for(let p=o.length;p>0;p--){const m=o.slice(-p).join("/");if(!a.some(d=>d.split("/").slice(-p).join("/")===m)||p===1){l=m;break}}return{...t,subtitle:l}})}groupResults(e){const r={recent:[],relevant:[],other:[]};for(const t of e)this.recentFiles.has(t.uri)?r.recent.push(t):(t.score??0)>.7?r.relevant.push(t):r.other.push(t);const s=[];return r.recent.length>0&&s.push(...r.recent.slice(0,3).map(t=>({...t,group:b.chat_mentions_recentFiles_group()}))),r.relevant.length>0&&s.push(...r.relevant.slice(0,5).map(t=>({...t,group:b.chat_mentions_mostRelevant_group()}))),r.other.length>0&&s.push(...r.other.slice(0,10).map(t=>({...t,group:b.chat_mentions_otherFiles_group()}))),s}scoreRelevance(e,r){let s=.5;if(this.recentFiles.has(e.uri)&&(s+=.2),r.currentFile&&e.meta?.path){const t=r.currentFile.substring(0,r.currentFile.lastIndexOf("/")),i=e.meta.path.substring(0,e.meta.path.lastIndexOf("/"));t===i&&(s+=.15)}return r.imports?.includes(e.meta?.path||"")&&(s+=.25),r.currentFile?.includes(".test.")&&e.meta?.path?.includes(".test.")&&(s+=.1),Math.min(s,1)}getGroups(){return[{id:"files-recent",label:b.chat_mentions_recentFiles_group(),icon:"🕐"},{id:"files-all",label:b.chat_mentions_allFiles_group(),icon:"📁"},{id:"files-tests",label:b.chat_mentions_testFiles_group(),icon:"🧪"}]}getFileIcon(e){return this.fileIconMap[e.toLowerCase()]||"📄"}formatPath(e){if(e.length>40){const r=e.split("/");if(r.length>2)return`.../${r.slice(-2).join("/")}`}return e}getLanguageFromExtension(e){return{ts:"typescript",tsx:"typescriptreact",js:"javascript",jsx:"javascriptreact",py:"python",rs:"rust",go:"go",java:"java",cpp:"cpp",c:"c",svelte:"svelte",vue:"vue",md:"markdown",json:"json",yaml:"yaml",yml:"yaml",html:"html",css:"css",scss:"scss",sql:"sql",sh:"shellscript"}[e.toLowerCase()]||"plaintext"}}class q{constructor(){u(this,"id","member")}getCacheKey(e){const r=k.state;return JSON.stringify({backendId:W.select(r),ownPrincipalId:r.presence.ownPrincipalId,members:e.workspaceId?L.select(r,e.workspaceId):[]})}async search(e,r){const{workspaceId:s}=r;if(!s)return[];const t=e.replace(/^@/,"").toLowerCase();return L.select(k.state,s).filter(i=>i.login.toLowerCase().includes(t)).map(i=>({id:`member-${i.principalId}`,type:"member",label:i.login,subtitle:i.identity?`${i.identity.provider==="github"?"GitHub":"GitLab"} · ${i.identity.host}`:void 0,description:i.displayName??void 0,icon:"👤",uri:`devspace://member/${encodeURIComponent(i.principalId)}?workspaceId=${encodeURIComponent(s)}`,score:.8,meta:{workspaceId:s,principalId:i.principalId,identity:i.identity,avatarUrl:i.avatarUrl??void 0}}))}}class ee{constructor(){u(this,"id","folder");u(this,"triggers",["@folder","@dir"])}async search(e,r){const s=r.workspaceId;if(!s)return[];try{const{backendRequest:t}=await y(async()=>{const{backendRequest:o}=await import("./DeOvWG_V.js").then(l=>l.j);return{backendRequest:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),i=await t("search.fileNames",{workspaceId:s,pattern:e||"",limit:200}),n=Array.isArray(i?.files)?i.files:[],a=new Set;for(const o of n){const l=o.split("/");for(let p=1;p<l.length;p++)a.add(l.slice(0,p).join("/"))}return[...a].filter(o=>e?g(e,o.split("/").pop()||o)!==null:!0).slice(0,10).map(o=>({id:`folder-${o}`,type:"folder",label:o.split("/").pop()||o,description:o,icon:"📁",uri:`devspace://folder/${encodeURIComponent(o)}`,meta:{path:o,fullPath:o,relativePath:o}}))}catch(t){return _.debug("[FolderProvider] Failed to get folders:",t),[]}}}const te=10,re=.3;function se(c){const e=c.toLowerCase().split(/\s+/).filter(Boolean);return(r,s)=>{const t=r?g(c,r):null;if(t)return 1+t.score;if(s){const i=s.toLowerCase();if(e.every(n=>i.includes(n)))return re}return 0}}class ie{constructor(){u(this,"id","note");u(this,"triggers",["@note","@n"]);u(this,"supportsRanges",!0);u(this,"cachedNotes",[]);u(this,"lastCacheUpdate",0);u(this,"cacheTimeout",5e3)}async getSiblingWorkspaces(e){if(!e)return[];try{const[{store:r},{selectWorkspaceItems:s}]=await Promise.all([y(()=>import("./rVFVSTiL.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./R5qsERXh.js").then(n=>n.e9),__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,7,9,23,24,0,5,10,25,26]),import.meta.url)]),t=s.select(r.state),i=t.find(n=>n.id===e);return!i||!i.repositoryPath?[]:t.filter(n=>n.id!==e&&n.repositoryPath===i.repositoryPath)}catch(r){return _.debug("[NoteProvider] Failed to get sibling workspaces:",r),[]}}async fetchNotesFromWorkspace(e,r){try{const[{store:s},{listSlimNotesRequested:t}]=await Promise.all([y(()=>import("./rVFVSTiL.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./Dou_hoaA.js").then(n=>n.M7),__vite__mapDeps([12,13,2,14,15,4,8,1,16,6,3]),import.meta.url)]);return(await s.dispatch(t(e))).map(n=>({note:n,workspaceId:e,workspaceTitle:r}))}catch(s){_.debug(`[NoteProvider] Failed to fetch notes from workspace ${e}:`,s)}return[]}async search(e,r){if(!r.workspaceId)return[];const s=e.trim(),t=s?se(s):null;try{const i=await this.fetchNotesFromWorkspace(r.workspaceId),a=(await this.getSiblingWorkspaces(r.workspaceId)).map(d=>this.fetchNotesFromWorkspace(d.id,d.title)),l=(await Promise.all(a)).flat(),p=[...i,...l],w=(t?p.map(d=>({entry:d,score:t(d.note.title,d.note.content||d.note.contentPreview)})).filter(({score:d})=>d>0).sort((d,v)=>v.score-d.score):p.map(d=>({entry:d,score:void 0}))).slice(0,te).map(({entry:{note:d,workspaceId:v,workspaceTitle:h},score:f})=>{const P=v===r.workspaceId,I=P?void 0:b.chat_mentions_fromWorkspace_subtitle({workspace:h||v}),S=d.content||d.contentPreview;return{candidate:{id:d.id,type:"note",label:d.title||d.id||b.chat_mentions_untitledNote_label(),subtitle:I,description:S?`${S.substring(0,100)}...`:"",icon:"📝",uri:`devspace://note/${d.id}`,meta:{preview:S?.substring(0,200)||"",workspaceId:v,...P?{}:{isExternalLink:!0}}},score:f}});if(this.cachedNotes=w.map(({candidate:d})=>d),this.lastCacheUpdate=Date.now(),w.length>0)return w.map(({candidate:d,score:v})=>v!==void 0?{...d,score:v}:d)}catch(i){_.debug("[NoteProvider] Failed to fetch notes:",i)}return this.cachedNotes.length>0?t?this.cachedNotes.map(i=>({...i,score:t(i.label,i.meta?.preview)})).filter(i=>i.score>0).sort((i,n)=>n.score-i.score):this.cachedNotes:[]}getCachedNotes(){return Date.now()-this.lastCacheUpdate>this.cacheTimeout?[]:this.cachedNotes}}class ne{constructor(){u(this,"id","external");u(this,"triggers",["@docs","@external"])}async search(e,r){return[{id:"react-docs",label:"React Documentation",url:"https://react.dev",description:"Official React documentation"},{id:"mdn",label:"MDN Web Docs",url:"https://developer.mozilla.org",description:"Web technology documentation"},{id:"typescript",label:"TypeScript Handbook",url:"https://www.typescriptlang.org/docs/",description:"TypeScript documentation"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`external-${t.id}`,type:"external-source",label:t.label,description:t.description,icon:"📚",uri:`devspace://external/${t.id}`,meta:{url:t.url}}))}}class oe{constructor(){u(this,"id","rule");u(this,"triggers",["@rule","@intent"])}async search(e,r){return[{path:".intent/rules/cli.md",label:"CLI Rules"},{path:".intent/rules/frontend.md",label:"Frontend Rules"},{path:".intent/rules/python.md",label:"Python Rules"},{path:".intent/rules/sidecar.md",label:"Sidecar Rules"},{path:".intent/rules/systems.md",label:"Systems Rules"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:t.path,type:"rule",label:t.label,subtitle:t.path,icon:"📚",uri:`devspace://rule/${encodeURIComponent(t.path)}`,meta:{path:t.path}}))}}class ae{constructor(){u(this,"id","task");u(this,"triggers",["@task","@todo"])}async search(e,r){return[{id:"task-1",label:"Implement authentication",status:"in_progress",assignee:"John Doe"},{id:"task-2",label:"Write tests",status:"not_started",assignee:"Jane Smith"},{id:"task-3",label:"Deploy to production",status:"completed",assignee:"Bob Johnson"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`task-${t.id}`,type:"task",label:t.label,subtitle:`${t.status} • ${t.assignee}`,icon:"📋",uri:`devspace://task/${t.id}`,meta:{taskStatus:t.status,assignee:t.assignee}}))}}class ce{constructor(){u(this,"id","personality");u(this,"triggers",["@personality","@persona"]);u(this,"personalities",[{id:"auggie-personality-agent-default",name:"Agent Auggie",description:"Default helpful AI assistant",icon:"🤖",temperature:.7,model:"default",promptToken:"auggie-personality-agent-default"},{id:"auggie-personality-prototyper",name:"Prototyper Auggie",description:"Specialized in rapid prototyping",icon:"⚡",temperature:.7,model:"default",promptToken:"auggie-personality-prototyper"},{id:"auggie-personality-brainstorm",name:"Brainstorm Auggie",description:"Creative ideation and exploration",icon:"💡",temperature:.7,model:"default",promptToken:"auggie-personality-brainstorm"},{id:"auggie-personality-reviewer",name:"Reviewer Auggie",description:"Code review and feedback",icon:"🔍",temperature:.7,model:"default",promptToken:"auggie-personality-reviewer"}])}async search(e,r){return this.personalities.filter(s=>!e||g(e,s.name)!==null).map(s=>({id:s.id,type:"personality",label:s.name,subtitle:`${s.model}`,description:s.description,icon:s.icon,uri:`devspace://personality/${s.id}`,meta:{promptToken:s.promptToken}}))}}class le{constructor(){u(this,"id","command");u(this,"triggers",["@cmd","@command"])}async search(e,r){return[N.USE_DEFAULT_CONTEXT,N.CLEAR_CONTEXT].filter(t=>!e||t.label.toLowerCase().includes(e.toLowerCase()))}}class ue{constructor(){u(this,"id","terminal");u(this,"triggers",["@terminal","@term"])}async search(e,r){try{const{terminalManager:s}=await y(async()=>{const{terminalManager:h}=await import("./Ccbg-J4J.js").then(f=>f.b);return{terminalManager:h}},__vite__mapDeps([27,2,1,28,29,3,4,30,31,12,13,14,15,8,16,6,0,5,7,9,10,32,24,33,34,35,36,37,38,39,40,25,41,42]),import.meta.url),{selectTerminals:t,selectTerminalDisplayName:i}=await y(async()=>{const{selectTerminals:h,selectTerminalDisplayName:f}=await import("./B7oqNDkm.js").then(P=>P.i);return{selectTerminals:h,selectTerminalDisplayName:f}},__vite__mapDeps([41,12,13,2,14,15,4,8,1,16,6,3]),import.meta.url),a=k.state;if(!r.workspaceId)return[];const o=t.select(a,r.workspaceId),l=s.loadTerminalMetadata(r.workspaceId),p=new Set,m=[];for(const h of o)p.add(h.id),m.push({id:h.id,name:i.select(a,r.workspaceId,h.id)});for(const h of l)p.has(h.terminalId)||(p.add(h.terminalId),m.push({id:h.terminalId,name:h.title||b.terminal_quakeOverlay_terminal_fallback()}));if(m.length===0)return[];const d=e?["terminal","term"].some(h=>h.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(h)):!1;return(e&&!d?m.filter(h=>g(e,h.name)!==null):m).slice(0,10).map((h,f)=>({id:h.id,type:"terminal",label:h.name,subtitle:b.chat_mentions_terminalIndex_subtitle({index:f+1}),description:b.chat_mentions_terminalOutput_description(),icon:"💻",uri:`devspace://terminal/${encodeURIComponent(h.id)}`,meta:{workspaceId:r.workspaceId}}))}catch(s){return _.debug("[TerminalProvider] Failed to get terminals:",s),[]}}}class de{constructor(){u(this,"id","script");u(this,"triggers",["@script","@scripts"])}async search(e,r){try{const{selectScriptEntries:s}=await y(async()=>{const{selectScriptEntries:o}=await import("./BtfRwPt7.js");return{selectScriptEntries:o}},__vite__mapDeps([43,12,13,2,14,15,4,8,1,16,6,3,44,45,22,7,9,46,47,23,0,5,10,21,48,26,49,50,20,51,52,53,54,19,24,25,55,29,28,56,57,58,59,33,60,61,31]),import.meta.url);if(!r.workspaceId)return[];const t=s.select(k.state,r.workspaceId);if(t.length===0)return[];const n=e?["script","scripts"].some(o=>o.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(o)):!1;return(e&&!n?t.filter(o=>g(e,o.name)!==null||g(e,M(o))!==null):t).slice(0,10).map(o=>{const l=o.runtime.status,p=x(l)?b.chat_mentions_scriptRunning_label():l==="exited"?b.chat_mentions_scriptExited_label():b.chat_mentions_scriptIdle_label();return{id:o.id,type:"script",label:o.name,subtitle:`${p} · ${M(o)}`,description:b.chat_mentions_scriptOutput_description(),icon:"▶️",uri:`devspace://script/${encodeURIComponent(o.id)}`,meta:{workspaceId:r.workspaceId,command:o.command,status:x(l)?"ok":l==="exited"?"warning":void 0}}})}catch(s){return _.debug("[ScriptProvider] Failed to get scripts:",s),[]}}}class pe{constructor(){u(this,"id","specialist");u(this,"triggers",["@specialist","@spec"])}async search(e,r){try{const s=j.select(k.state);return!s||s.length===0?[]:s.filter(t=>e?g(e,t.name)!==null||g(e,t.id)!==null||g(e,t.description)!==null||g(e,"specialist")!==null:!0).map(t=>({id:`specialist-${t.id}`,type:"specialist",label:t.name,subtitle:t.description,description:t.description,icon:"👤",uri:`devspace://specialist/${encodeURIComponent(t.id)}`,group:"Specialists",score:.8,meta:{promptToken:`specialist/${t.id}`}})).slice(0,10)}catch(s){return _.debug("[SpecialistProvider] Failed to get specialists:",s),[]}}}class he{constructor(){u(this,"id","agent");u(this,"triggers",["@agent"])}async search(e,r){try{const{selectAllWorkspaceAgents:s}=await y(async()=>{const{selectAllWorkspaceAgents:a}=await import("./R5qsERXh.js").then(o=>o.e6);return{selectAllWorkspaceAgents:a}},__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,7,9,23,24,0,5,10,25,26]),import.meta.url),t=r.workspaceId;if(!t)return[];const i=s.select(k.state,t);if(i.length===0)return[];const n=[];for(const a of i){const o=a.id,l=a.name||o,p=a.metadata?.specialist||"";let m=a.metadata?.specialistName||"";if(p&&!m){const f=U.select(k.state,p);f&&(m=f.name)}if(e){const f=g(e,l)!==null,P=g(e,"agent")!==null,I=m&&g(e,m)!==null,S=p&&g(e,p)!==null;if(!f&&!P&&!I&&!S)continue}const w=a.isStreaming?"responding":a.status||"active",d=[];m?d.push(m):d.push("Agent"),d.push(w);const v=a.messages?.length||0;v>0&&d.push(`${v} msg${v!==1?"s":""}`);const h=a.lastActivity||a.lastModified;h&&!a.isStreaming&&d.push(z(new Date(h))),n.push({id:o,type:"agent",label:l,subtitle:d.join(" · "),description:m?b.chat_mentions_specialistAgentInWorkspace_description({specialist:m}):b.chat_mentions_agentInWorkspace_description(),icon:"🤖",uri:`devspace://agent/${encodeURIComponent(o)}`,group:b.chat_mentions_agents_group(),score:.7,meta:{workspaceId:t}})}return n.slice(0,10)}catch(s){return _.debug("[AgentProvider] Failed to get agents:",s),[]}}}class me{constructor(){u(this,"providers",new Map);u(this,"defaultProviders",[]);this.register(new Z),this.register(new ee),this.register(new ie),this.register(new ne),this.register(new oe),this.register(new ae),this.register(new ce),this.register(new le),this.register(new ue),this.register(new de),this.register(new he),this.register(new pe),this.register(new q),this.defaultProviders=["file","folder","note","terminal","script","agent","specialist","member"]}register(e){this.providers.set(e.id,e),_.debug("[ProviderRegistry] Registered provider:",e.id)}unregister(e){this.providers.delete(e)}get(e){return this.providers.get(e)}getAll(){return Array.from(this.providers.values())}getDefault(){return this.defaultProviders.map(e=>this.providers.get(e)).filter(Boolean)}getByTrigger(e){return Array.from(this.providers.values()).filter(r=>r.triggers?.includes(e))}async searchAll(e,r){const s=e.startsWith("@")?this.getByTrigger(e.split(" ")[0]):this.getDefault();return(await Promise.all(s.map(i=>i.search(e,r)))).flat()}}const Te=new me;export{Ie as D,Ce as M,Q as a,ke as i,Te as p,R as s};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DeOvWG_V.js","/app/immutable/chunks/DUPdECze.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/gsFx6FSh.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BophAjr8.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/DYGZj8tM.js","/app/immutable/chunks/NvPqoUzX.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/rVFVSTiL.js","/app/immutable/chunks/Dou_hoaA.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CxNkcb8W.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/BeMU-UdF.js","/app/immutable/chunks/R5qsERXh.js","/app/immutable/chunks/DWlZtz5u.js","/app/immutable/chunks/DKOGfBeL.js","/app/immutable/chunks/BxPVGrtc.js","/app/immutable/chunks/CDDY7bU6.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/Dc_PiRux.js","/app/immutable/chunks/CzTFPES1.js","/app/immutable/chunks/Ccbg-J4J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/Cu2deF-X.js","/app/immutable/chunks/BeAfjfr4.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/CQpwPlmg.js","/app/immutable/chunks/B2F1R5gp.js","/app/immutable/chunks/7_fb2zE8.js","/app/immutable/chunks/vWF7FJqU.js","/app/immutable/chunks/DcBz7Q0p.js","/app/immutable/chunks/LguPrO6F.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/B7oqNDkm.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/BcZXVFY0.js","/app/immutable/chunks/21sFenOt.js","/app/immutable/chunks/BDjmUG9E.js","/app/immutable/chunks/CdO4czEi.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/Db6vgmuJ.js","/app/immutable/chunks/CtnMBSuA.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/tAo3FW4C.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/1d4tWxyl.js","/app/immutable/chunks/CcOfQ1Gy.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CflYgBql.js","/app/immutable/chunks/Bu_2dHSO.js","/app/immutable/chunks/Ddv73vDp.js","/app/immutable/chunks/BJNB3KvG.js"])))=>i.map(i=>d[i]);
2
+ var F=Object.defineProperty;var $=(c,e,r)=>e in c?F(c,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[e]=r;var u=(c,e,r)=>$(c,typeof e!="symbol"?e+"":e,r);import{l as _}from"./ChTqQfQN.js";import{bm as b,_ as y}from"./DUPdECze.js";import{I$ as k,Cg as M}from"./Dou_hoaA.js";import{h as O}from"./DeOvWG_V.js";import{O as W}from"./CflYgBql.js";import{cO as L}from"./Dao2qcXJ.js";import{v as x,b7 as U,be as j}from"./21sFenOt.js";import{a as z}from"./9hZyANjD.js";const N={USE_DEFAULT_CONTEXT:{id:"use-default-context",type:"command",get label(){return b.chat_mentions_useDefaultContext_label()},get description(){return b.chat_mentions_useDefaultContext_description()},icon:"🔄",uri:"devspace://command/use-default-context"},CLEAR_CONTEXT:{id:"clear-context",type:"command",get label(){return b.chat_mentions_clearContext_label()},get description(){return b.chat_mentions_clearContext_description()},icon:"🗑️",uri:"devspace://command/clear-context"}};function ke(c){return"items"in c||"subgroups"in c}function B(c){if(!c||typeof c!="object")return!1;const e=c;return!(typeof e.id!="string"||typeof e.label!="string"||typeof e.uri!="string"||typeof e.type!="string"||e.subtitle!==void 0&&typeof e.subtitle!="string"||e.description!==void 0&&typeof e.description!="string"||e.icon!==void 0&&typeof e.icon!="string"||e.score!==void 0&&typeof e.score!="number"||e.group!==void 0&&typeof e.group!="string")}function g(c,e){if(!c||!e)return null;const r=c.toLowerCase(),s=e.toLowerCase();let t=0;for(let a=0;a<s.length&&t<r.length;a++)s[a]===r[t]&&t++;if(t!==r.length)return null;const i=K(r,s);return i?{score:V(r,s,i),matches:i}:null}function K(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;for(let a=s;a<e.length;a++)if(e[a]===i){r.push(a),s=a+1,n=!0;break}if(!n)return null}return r}function V(c,e,r){let s=0;s+=1;let t=0;for(let l=1;l<r.length;l++)r[l]===r[l-1]+1&&(t+=.1);s+=t;let i=0;for(const l of r)(l===0||J(e,l))&&(i+=.15);s+=i,r[0]===0&&(s+=.2);const a=(r[r.length-1]-r[0])/e.length*.3;return s-=a,Math.min(s/2.5,1)}function J(c,e){if(e===0)return!0;const r=c[e],s=c[e-1];return r===r.toUpperCase()&&s===s.toLowerCase()||!/[a-z0-9]/i.test(s)}function G(c,e){if(!c||!e)return null;if(!c.includes("/"))return g(c,e);const r=c.split("/").filter(n=>n.length>0),s=e.split("/").filter(n=>n.length>0);if(r.length===0||s.length===0)return null;const t=H(r,s);return t?{score:X(r,s,t),matches:[]}:null}function H(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;const a=t===c.length-1;for(let o=s;o<e.length;o++){const l=e[o];if(g(i,l)){r.push(o),s=o+1,n=!0;break}if(a){const p=l.split(".")[0],m=l.includes(".")?l.split(".").pop():"";if(m&&g(i,m)){r.push(o),s=o+1,n=!0;break}if(p&&g(i,p)){r.push(o),s=o+1,n=!0;break}}}if(!n)return null}return r}function X(c,e,r){let s=0;s+=1,s+=r.length*.2;let t=0;for(let n=1;n<r.length;n++)r[n]===r[n-1]+1&&(t+=.15);s+=t,r.length>0&&r[r.length-1]===e.length-1&&(s+=.3);for(let n=0;n<c.length&&n<r.length;n++){const a=c[n],o=e[r[n]];a.toLowerCase()===o.toLowerCase()&&(s+=.2)}return Math.min(s/3,1)}function R(c,e,r){return JSON.stringify({query:c,workspaceId:r.workspaceId,repoPath:r.repoPath,currentFile:r.currentFile,currentNote:r.currentNote,providers:e.map(s=>[s.id,s.getCacheKey?.(r)])})}const D="*",Ce=["member","note","agent","file","folder","script","terminal",D,"specialist"];function Q(c,e){if(e.length===0)return[...c].sort((t,i)=>(i.score??0)-(t.score??0));const r=new Map(e.map((t,i)=>[t,i])),s=r.get(D)??e.length;return c.map(t=>({candidate:t,rank:r.get(t.type)??s})).sort((t,i)=>t.rank-i.rank||(i.candidate.score??0)-(t.candidate.score??0)).map(({candidate:t})=>t)}function Y(c,e){const r=new Map;return c.filter(s=>{const t=r.get(s.type)??0;return r.set(s.type,t+1),t<e})}class Ie{constructor(e={}){u(this,"searchDebounceTimer",null);u(this,"currentAbortController",null);u(this,"cache",new Map);u(this,"config");u(this,"isSearching",!1);this.config={debounceMs:e.debounceMs??100,maxResults:e.maxResults??50,cacheMaxAge:e.cacheMaxAge??3e4,enableSemantic:e.enableSemantic??!1,enableLivePreview:e.enableLivePreview??!0,enableCollaboration:e.enableCollaboration??!1,typeOrder:e.typeOrder??[],maxResultsPerKind:e.maxResultsPerKind??20}}async search(e,r,s){this.cancelPendingSearch();const t=R(e,r,s),i=this.cache.get(t);if(i&&!this.isCacheExpired(i))return _.debug("[SearchService] Returning cached results for:",e),i.results;const n=new AbortController;this.currentAbortController=n;const a=n.signal;return new Promise((o,l)=>{this.isSearching=!0;let p=!1;const m=()=>{a.removeEventListener("abort",v),this.currentAbortController===n&&(this.currentAbortController=null,this.searchDebounceTimer=null,this.isSearching=!1)},w=f=>{p||(p=!0,m(),o(f))},d=f=>{p||(p=!0,m(),l(f))},v=()=>d(new DOMException("Search cancelled","AbortError"));a.addEventListener("abort",v,{once:!0});const h=async()=>{try{if(a.aborted){d(new DOMException("Search cancelled","AbortError"));return}_.debug("[SearchService] Searching with providers:",r.map(C=>C.id));const f=R(e,r,s),P=await Promise.all(r.map(C=>this.searchWithProvider(C,e,s,a)));if(a.aborted)return;if(f!==R(e,r,s)){w([]);return}const S=this.combineResults(P.flat()).filter(C=>B(C)),E=this.applyFuzzyMatching(e,S),A=Q(E,this.config.typeOrder),T=this.config.typeOrder.length>0?Y(A,this.config.maxResultsPerKind):A.slice(0,this.config.maxResults);this.cache.set(f,{results:T,timestamp:Date.now()}),_.debug(`[SearchService] Found ${T.length} results`),w(T)}catch(f){a.aborted?d(new DOMException("Search cancelled","AbortError")):(_.error("[SearchService] Search error:",f),d(f instanceof Error?f:new Error(String(f))))}};e?this.searchDebounceTimer=setTimeout(h,this.config.debounceMs):h()})}async searchWithProvider(e,r,s,t){try{const i={...s,signal:t},n=await e.search(r,i),a=e.scoreRelevance?.bind(e);return a?n.map(o=>({...o,score:a(o,s)})):n}catch(i){return t.aborted||_.error(`[SearchService] Provider ${e.id} search failed:`,i),[]}}combineResults(e){const r=new Set,s=[];for(const t of e){const i=`${t.type}:${t.uri}`;r.has(i)||(r.add(i),s.push(t))}return s}applyFuzzyMatching(e,r){if(!e||e.length===0)return r;const t=r.map(i=>{let n=0;const a=i.meta?.path||i.meta?.fullPath||(i.subtitle?`${i.subtitle}/${i.label}`:i.label);if(a){const l=G(e,a);l&&(n=Math.max(n,l.score*1.8))}const o=g(e,i.label);if(o&&(n=Math.max(n,o.score*1.5)),i.subtitle){const l=g(e,i.subtitle);l&&(n=Math.max(n,l.score))}if(i.description){const l=g(e,i.description);l&&(n=Math.max(n,l.score*.5))}return{...i,score:n>0?n:i.score??0}}).filter(i=>i.score>0);return t.length>0?t:r}cancelPendingSearch(){this.searchDebounceTimer&&(clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=null),this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=null)}isCacheExpired(e){return Date.now()-e.timestamp>this.config.cacheMaxAge}clearCache(){this.cache.clear()}isLoading(){return this.isSearching}destroy(){this.cancelPendingSearch(),this.clearCache()}}class Z{constructor(){u(this,"id","file");u(this,"triggers",["@file","@f"]);u(this,"default",!0);u(this,"supportsRanges",!0);u(this,"supportsLivePreview",!0);u(this,"recentFiles",new Set);u(this,"fileIconMap",{ts:"📘",tsx:"⚛️",js:"📜",jsx:"⚛️",svelte:"🔥",vue:"💚",py:"🐍",rs:"🦀",go:"🐹",java:"☕",cpp:"⚙️",c:"⚙️",h:"📎",md:"📝",json:"📋",yaml:"📋",yml:"📋",toml:"📋",xml:"📋",html:"🌐",css:"🎨",scss:"🎨",sass:"🎨",less:"🎨",sql:"🗃️",sh:"🖥️",bash:"🖥️",zsh:"🖥️",fish:"🖥️",dockerfile:"🐳",docker:"🐳",gitignore:"🚫",env:"🔐",lock:"🔒",test:"🧪",spec:"🧪"})}async search(e,r){_.debug("[FileProvider] Searching for:",{query:e,context:{workspaceId:r.workspaceId}});const s=r.workspaceId;if(!s)return[];try{const t=await O("search.fileNames",{workspaceId:s,pattern:e||"",limit:10}),n=(Array.isArray(t?.files)?t.files:[]).map(a=>{const o=a.split("/").pop()||a,l=o.split(".").pop()||"";return{id:`file-${a}`,label:o,type:"file",uri:`file:${a}`,description:a,subtitle:a,score:.5,meta:{path:a,fullPath:a,relativePath:a,extension:l,language:this.getLanguageFromExtension(l)}}});return this.deduplicateAndDistinguish(n)}catch(t){return _.error("[FileProvider] Search failed:",t),[]}}async searchRecent(e,r){if(!r.recentFiles||r.recentFiles.length===0)return[];const s=await Promise.all(r.recentFiles.filter(t=>e?g(e,t)!==null:!0).slice(0,3).map(t=>{const i=t.split("/").pop()||t,n=i.split(".").pop()||"";return this.fileToCandidate({path:t,name:i,extension:n})}));return s.forEach(t=>{this.recentFiles.add(t.uri)}),s}async searchContextual(e,r){return r.currentFile?[]:[]}async fileToCandidate(e){const r=this.getFileIcon(e.extension),s=e.path,t=this.formatPath(s);return{id:`file-${e.path}`,type:"file",label:e.name,subtitle:t,description:s,icon:r,uri:`devspace://file/${encodeURIComponent(e.path)}`,meta:{path:s,fullPath:e.path,lastModified:e.lastModified,size:e.size,language:e.language||this.getLanguageFromExtension(e.extension)}}}combineResults(...e){const r=new Set,s=[];for(const t of e)for(const i of t)r.has(i.uri)||(r.add(i.uri),s.push(i));return this.deduplicateAndDistinguish(s)}deduplicateAndDistinguish(e){const r=new Map;for(const t of e){const i=t.label;let n=r.get(i);n||(n=[],r.set(i,n)),n.push(t)}const s=[];for(const[t,i]of r.entries())if(i.length===1)s.push(i[0]);else{const n=this.distinguishDuplicates(i);s.push(...n)}return s}distinguishDuplicates(e){const r=e.map(t=>t.description||t.meta?.path||"");return e.map((t,i)=>{const n=r[i],a=r.filter((p,m)=>m!==i),o=n.split("/");let l="";for(let p=o.length;p>0;p--){const m=o.slice(-p).join("/");if(!a.some(d=>d.split("/").slice(-p).join("/")===m)||p===1){l=m;break}}return{...t,subtitle:l}})}groupResults(e){const r={recent:[],relevant:[],other:[]};for(const t of e)this.recentFiles.has(t.uri)?r.recent.push(t):(t.score??0)>.7?r.relevant.push(t):r.other.push(t);const s=[];return r.recent.length>0&&s.push(...r.recent.slice(0,3).map(t=>({...t,group:b.chat_mentions_recentFiles_group()}))),r.relevant.length>0&&s.push(...r.relevant.slice(0,5).map(t=>({...t,group:b.chat_mentions_mostRelevant_group()}))),r.other.length>0&&s.push(...r.other.slice(0,10).map(t=>({...t,group:b.chat_mentions_otherFiles_group()}))),s}scoreRelevance(e,r){let s=.5;if(this.recentFiles.has(e.uri)&&(s+=.2),r.currentFile&&e.meta?.path){const t=r.currentFile.substring(0,r.currentFile.lastIndexOf("/")),i=e.meta.path.substring(0,e.meta.path.lastIndexOf("/"));t===i&&(s+=.15)}return r.imports?.includes(e.meta?.path||"")&&(s+=.25),r.currentFile?.includes(".test.")&&e.meta?.path?.includes(".test.")&&(s+=.1),Math.min(s,1)}getGroups(){return[{id:"files-recent",label:b.chat_mentions_recentFiles_group(),icon:"🕐"},{id:"files-all",label:b.chat_mentions_allFiles_group(),icon:"📁"},{id:"files-tests",label:b.chat_mentions_testFiles_group(),icon:"🧪"}]}getFileIcon(e){return this.fileIconMap[e.toLowerCase()]||"📄"}formatPath(e){if(e.length>40){const r=e.split("/");if(r.length>2)return`.../${r.slice(-2).join("/")}`}return e}getLanguageFromExtension(e){return{ts:"typescript",tsx:"typescriptreact",js:"javascript",jsx:"javascriptreact",py:"python",rs:"rust",go:"go",java:"java",cpp:"cpp",c:"c",svelte:"svelte",vue:"vue",md:"markdown",json:"json",yaml:"yaml",yml:"yaml",html:"html",css:"css",scss:"scss",sql:"sql",sh:"shellscript"}[e.toLowerCase()]||"plaintext"}}class q{constructor(){u(this,"id","member")}getCacheKey(e){const r=k.state;return JSON.stringify({backendId:W.select(r),ownPrincipalId:r.presence.ownPrincipalId,members:e.workspaceId?L.select(r,e.workspaceId):[]})}async search(e,r){const{workspaceId:s}=r;if(!s)return[];const t=e.replace(/^@/,"").toLowerCase();return L.select(k.state,s).filter(i=>i.login.toLowerCase().includes(t)).map(i=>({id:`member-${i.principalId}`,type:"member",label:i.login,subtitle:i.identity?`${i.identity.provider==="github"?"GitHub":"GitLab"} · ${i.identity.host}`:void 0,description:i.displayName??void 0,icon:"👤",uri:`devspace://member/${encodeURIComponent(i.principalId)}?workspaceId=${encodeURIComponent(s)}`,score:.8,meta:{workspaceId:s,principalId:i.principalId,identity:i.identity,avatarUrl:i.avatarUrl??void 0}}))}}class ee{constructor(){u(this,"id","folder");u(this,"triggers",["@folder","@dir"])}async search(e,r){const s=r.workspaceId;if(!s)return[];try{const{backendRequest:t}=await y(async()=>{const{backendRequest:o}=await import("./DeOvWG_V.js").then(l=>l.j);return{backendRequest:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),i=await t("search.fileNames",{workspaceId:s,pattern:e||"",limit:200}),n=Array.isArray(i?.files)?i.files:[],a=new Set;for(const o of n){const l=o.split("/");for(let p=1;p<l.length;p++)a.add(l.slice(0,p).join("/"))}return[...a].filter(o=>e?g(e,o.split("/").pop()||o)!==null:!0).slice(0,10).map(o=>({id:`folder-${o}`,type:"folder",label:o.split("/").pop()||o,description:o,icon:"📁",uri:`devspace://folder/${encodeURIComponent(o)}`,meta:{path:o,fullPath:o,relativePath:o}}))}catch(t){return _.debug("[FolderProvider] Failed to get folders:",t),[]}}}const te=10,re=.3;function se(c){const e=c.toLowerCase().split(/\s+/).filter(Boolean);return(r,s)=>{const t=r?g(c,r):null;if(t)return 1+t.score;if(s){const i=s.toLowerCase();if(e.every(n=>i.includes(n)))return re}return 0}}class ie{constructor(){u(this,"id","note");u(this,"triggers",["@note","@n"]);u(this,"supportsRanges",!0);u(this,"cachedNotes",[]);u(this,"lastCacheUpdate",0);u(this,"cacheTimeout",5e3)}async getSiblingWorkspaces(e){if(!e)return[];try{const[{store:r},{selectWorkspaceItems:s}]=await Promise.all([y(()=>import("./rVFVSTiL.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./R5qsERXh.js").then(n=>n.e9),__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,7,9,23,24,0,5,10,25,26]),import.meta.url)]),t=s.select(r.state),i=t.find(n=>n.id===e);return!i||!i.repositoryPath?[]:t.filter(n=>n.id!==e&&n.repositoryPath===i.repositoryPath)}catch(r){return _.debug("[NoteProvider] Failed to get sibling workspaces:",r),[]}}async fetchNotesFromWorkspace(e,r){try{const[{store:s},{listSlimNotesRequested:t}]=await Promise.all([y(()=>import("./rVFVSTiL.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./Dou_hoaA.js").then(n=>n.M7),__vite__mapDeps([12,13,2,14,15,4,8,1,16,6,3]),import.meta.url)]);return(await s.dispatch(t(e))).map(n=>({note:n,workspaceId:e,workspaceTitle:r}))}catch(s){_.debug(`[NoteProvider] Failed to fetch notes from workspace ${e}:`,s)}return[]}async search(e,r){if(!r.workspaceId)return[];const s=e.trim(),t=s?se(s):null;try{const i=await this.fetchNotesFromWorkspace(r.workspaceId),a=(await this.getSiblingWorkspaces(r.workspaceId)).map(d=>this.fetchNotesFromWorkspace(d.id,d.title)),l=(await Promise.all(a)).flat(),p=[...i,...l],w=(t?p.map(d=>({entry:d,score:t(d.note.title,d.note.content||d.note.contentPreview)})).filter(({score:d})=>d>0).sort((d,v)=>v.score-d.score):p.map(d=>({entry:d,score:void 0}))).slice(0,te).map(({entry:{note:d,workspaceId:v,workspaceTitle:h},score:f})=>{const P=v===r.workspaceId,I=P?void 0:b.chat_mentions_fromWorkspace_subtitle({workspace:h||v}),S=d.content||d.contentPreview;return{candidate:{id:d.id,type:"note",label:d.title||d.id||b.chat_mentions_untitledNote_label(),subtitle:I,description:S?`${S.substring(0,100)}...`:"",icon:"📝",uri:`devspace://note/${d.id}`,meta:{preview:S?.substring(0,200)||"",workspaceId:v,...P?{}:{isExternalLink:!0}}},score:f}});if(this.cachedNotes=w.map(({candidate:d})=>d),this.lastCacheUpdate=Date.now(),w.length>0)return w.map(({candidate:d,score:v})=>v!==void 0?{...d,score:v}:d)}catch(i){_.debug("[NoteProvider] Failed to fetch notes:",i)}return this.cachedNotes.length>0?t?this.cachedNotes.map(i=>({...i,score:t(i.label,i.meta?.preview)})).filter(i=>i.score>0).sort((i,n)=>n.score-i.score):this.cachedNotes:[]}getCachedNotes(){return Date.now()-this.lastCacheUpdate>this.cacheTimeout?[]:this.cachedNotes}}class ne{constructor(){u(this,"id","external");u(this,"triggers",["@docs","@external"])}async search(e,r){return[{id:"react-docs",label:"React Documentation",url:"https://react.dev",description:"Official React documentation"},{id:"mdn",label:"MDN Web Docs",url:"https://developer.mozilla.org",description:"Web technology documentation"},{id:"typescript",label:"TypeScript Handbook",url:"https://www.typescriptlang.org/docs/",description:"TypeScript documentation"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`external-${t.id}`,type:"external-source",label:t.label,description:t.description,icon:"📚",uri:`devspace://external/${t.id}`,meta:{url:t.url}}))}}class oe{constructor(){u(this,"id","rule");u(this,"triggers",["@rule","@intent"])}async search(e,r){return[{path:".intent/rules/cli.md",label:"CLI Rules"},{path:".intent/rules/frontend.md",label:"Frontend Rules"},{path:".intent/rules/python.md",label:"Python Rules"},{path:".intent/rules/sidecar.md",label:"Sidecar Rules"},{path:".intent/rules/systems.md",label:"Systems Rules"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:t.path,type:"rule",label:t.label,subtitle:t.path,icon:"📚",uri:`devspace://rule/${encodeURIComponent(t.path)}`,meta:{path:t.path}}))}}class ae{constructor(){u(this,"id","task");u(this,"triggers",["@task","@todo"])}async search(e,r){return[{id:"task-1",label:"Implement authentication",status:"in_progress",assignee:"John Doe"},{id:"task-2",label:"Write tests",status:"not_started",assignee:"Jane Smith"},{id:"task-3",label:"Deploy to production",status:"completed",assignee:"Bob Johnson"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`task-${t.id}`,type:"task",label:t.label,subtitle:`${t.status} • ${t.assignee}`,icon:"📋",uri:`devspace://task/${t.id}`,meta:{taskStatus:t.status,assignee:t.assignee}}))}}class ce{constructor(){u(this,"id","personality");u(this,"triggers",["@personality","@persona"]);u(this,"personalities",[{id:"auggie-personality-agent-default",name:"Agent Auggie",description:"Default helpful AI assistant",icon:"🤖",temperature:.7,model:"default",promptToken:"auggie-personality-agent-default"},{id:"auggie-personality-prototyper",name:"Prototyper Auggie",description:"Specialized in rapid prototyping",icon:"⚡",temperature:.7,model:"default",promptToken:"auggie-personality-prototyper"},{id:"auggie-personality-brainstorm",name:"Brainstorm Auggie",description:"Creative ideation and exploration",icon:"💡",temperature:.7,model:"default",promptToken:"auggie-personality-brainstorm"},{id:"auggie-personality-reviewer",name:"Reviewer Auggie",description:"Code review and feedback",icon:"🔍",temperature:.7,model:"default",promptToken:"auggie-personality-reviewer"}])}async search(e,r){return this.personalities.filter(s=>!e||g(e,s.name)!==null).map(s=>({id:s.id,type:"personality",label:s.name,subtitle:`${s.model}`,description:s.description,icon:s.icon,uri:`devspace://personality/${s.id}`,meta:{promptToken:s.promptToken}}))}}class le{constructor(){u(this,"id","command");u(this,"triggers",["@cmd","@command"])}async search(e,r){return[N.USE_DEFAULT_CONTEXT,N.CLEAR_CONTEXT].filter(t=>!e||t.label.toLowerCase().includes(e.toLowerCase()))}}class ue{constructor(){u(this,"id","terminal");u(this,"triggers",["@terminal","@term"])}async search(e,r){try{const{terminalManager:s}=await y(async()=>{const{terminalManager:h}=await import("./Ccbg-J4J.js").then(f=>f.b);return{terminalManager:h}},__vite__mapDeps([27,2,1,28,29,3,4,30,31,12,13,14,15,8,16,6,0,5,7,9,10,32,24,33,34,35,36,37,38,39,40,25,41,42]),import.meta.url),{selectTerminals:t,selectTerminalDisplayName:i}=await y(async()=>{const{selectTerminals:h,selectTerminalDisplayName:f}=await import("./B7oqNDkm.js").then(P=>P.i);return{selectTerminals:h,selectTerminalDisplayName:f}},__vite__mapDeps([41,12,13,2,14,15,4,8,1,16,6,3]),import.meta.url),a=k.state;if(!r.workspaceId)return[];const o=t.select(a,r.workspaceId),l=s.loadTerminalMetadata(r.workspaceId),p=new Set,m=[];for(const h of o)p.add(h.id),m.push({id:h.id,name:i.select(a,r.workspaceId,h.id)});for(const h of l)p.has(h.terminalId)||(p.add(h.terminalId),m.push({id:h.terminalId,name:h.title||b.terminal_quakeOverlay_terminal_fallback()}));if(m.length===0)return[];const d=e?["terminal","term"].some(h=>h.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(h)):!1;return(e&&!d?m.filter(h=>g(e,h.name)!==null):m).slice(0,10).map((h,f)=>({id:h.id,type:"terminal",label:h.name,subtitle:b.chat_mentions_terminalIndex_subtitle({index:f+1}),description:b.chat_mentions_terminalOutput_description(),icon:"💻",uri:`devspace://terminal/${encodeURIComponent(h.id)}`,meta:{workspaceId:r.workspaceId}}))}catch(s){return _.debug("[TerminalProvider] Failed to get terminals:",s),[]}}}class de{constructor(){u(this,"id","script");u(this,"triggers",["@script","@scripts"])}async search(e,r){try{const{selectScriptEntries:s}=await y(async()=>{const{selectScriptEntries:o}=await import("./BcZXVFY0.js");return{selectScriptEntries:o}},__vite__mapDeps([43,12,13,2,14,15,4,8,1,16,6,3,44,45,22,7,9,46,47,23,0,5,10,21,48,26,49,50,20,51,52,53,54,19,24,25,55,29,28,56,57,58,59,33,60,61,31]),import.meta.url);if(!r.workspaceId)return[];const t=s.select(k.state,r.workspaceId);if(t.length===0)return[];const n=e?["script","scripts"].some(o=>o.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(o)):!1;return(e&&!n?t.filter(o=>g(e,o.name)!==null||g(e,M(o))!==null):t).slice(0,10).map(o=>{const l=o.runtime.status,p=x(l)?b.chat_mentions_scriptRunning_label():l==="exited"?b.chat_mentions_scriptExited_label():b.chat_mentions_scriptIdle_label();return{id:o.id,type:"script",label:o.name,subtitle:`${p} · ${M(o)}`,description:b.chat_mentions_scriptOutput_description(),icon:"▶️",uri:`devspace://script/${encodeURIComponent(o.id)}`,meta:{workspaceId:r.workspaceId,command:o.command,status:x(l)?"ok":l==="exited"?"warning":void 0}}})}catch(s){return _.debug("[ScriptProvider] Failed to get scripts:",s),[]}}}class pe{constructor(){u(this,"id","specialist");u(this,"triggers",["@specialist","@spec"])}async search(e,r){try{const s=j.select(k.state);return!s||s.length===0?[]:s.filter(t=>e?g(e,t.name)!==null||g(e,t.id)!==null||g(e,t.description)!==null||g(e,"specialist")!==null:!0).map(t=>({id:`specialist-${t.id}`,type:"specialist",label:t.name,subtitle:t.description,description:t.description,icon:"👤",uri:`devspace://specialist/${encodeURIComponent(t.id)}`,group:"Specialists",score:.8,meta:{promptToken:`specialist/${t.id}`}})).slice(0,10)}catch(s){return _.debug("[SpecialistProvider] Failed to get specialists:",s),[]}}}class he{constructor(){u(this,"id","agent");u(this,"triggers",["@agent"])}async search(e,r){try{const{selectAllWorkspaceAgents:s}=await y(async()=>{const{selectAllWorkspaceAgents:a}=await import("./R5qsERXh.js").then(o=>o.e6);return{selectAllWorkspaceAgents:a}},__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,7,9,23,24,0,5,10,25,26]),import.meta.url),t=r.workspaceId;if(!t)return[];const i=s.select(k.state,t);if(i.length===0)return[];const n=[];for(const a of i){const o=a.id,l=a.name||o,p=a.metadata?.specialist||"";let m=a.metadata?.specialistName||"";if(p&&!m){const f=U.select(k.state,p);f&&(m=f.name)}if(e){const f=g(e,l)!==null,P=g(e,"agent")!==null,I=m&&g(e,m)!==null,S=p&&g(e,p)!==null;if(!f&&!P&&!I&&!S)continue}const w=a.isStreaming?"responding":a.status||"active",d=[];m?d.push(m):d.push("Agent"),d.push(w);const v=a.messages?.length||0;v>0&&d.push(`${v} msg${v!==1?"s":""}`);const h=a.lastActivity||a.lastModified;h&&!a.isStreaming&&d.push(z(new Date(h))),n.push({id:o,type:"agent",label:l,subtitle:d.join(" · "),description:m?b.chat_mentions_specialistAgentInWorkspace_description({specialist:m}):b.chat_mentions_agentInWorkspace_description(),icon:"🤖",uri:`devspace://agent/${encodeURIComponent(o)}`,group:b.chat_mentions_agents_group(),score:.7,meta:{workspaceId:t}})}return n.slice(0,10)}catch(s){return _.debug("[AgentProvider] Failed to get agents:",s),[]}}}class me{constructor(){u(this,"providers",new Map);u(this,"defaultProviders",[]);this.register(new Z),this.register(new ee),this.register(new ie),this.register(new ne),this.register(new oe),this.register(new ae),this.register(new ce),this.register(new le),this.register(new ue),this.register(new de),this.register(new he),this.register(new pe),this.register(new q),this.defaultProviders=["file","folder","note","terminal","script","agent","specialist","member"]}register(e){this.providers.set(e.id,e),_.debug("[ProviderRegistry] Registered provider:",e.id)}unregister(e){this.providers.delete(e)}get(e){return this.providers.get(e)}getAll(){return Array.from(this.providers.values())}getDefault(){return this.defaultProviders.map(e=>this.providers.get(e)).filter(Boolean)}getByTrigger(e){return Array.from(this.providers.values()).filter(r=>r.triggers?.includes(e))}async searchAll(e,r){const s=e.startsWith("@")?this.getByTrigger(e.split(" ")[0]):this.getDefault();return(await Promise.all(s.map(i=>i.search(e,r)))).flat()}}const Te=new me;export{Ie as D,Ce as M,Q as a,ke as i,Te as p,R as s};