@intent-hq/web 2.341.6 → 2.341.7

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 (142) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{CxjuVNaB.js → 1YAwhu6p.js} +1 -1
  3. package/web/app/immutable/chunks/{Jv-9rt7e.js → 4NWDSoFd.js} +3 -3
  4. package/web/app/immutable/chunks/{jr94KtZQ.js → 6ibsXGup.js} +1 -1
  5. package/web/app/immutable/chunks/{qiaLhGtl.js → 7ojnw3sH.js} +1 -1
  6. package/web/app/immutable/chunks/{BCvU0pY_.js → 81iikGfb.js} +4 -4
  7. package/web/app/immutable/chunks/{al7tOgUm.js → B1I5WM9v.js} +1 -1
  8. package/web/app/immutable/chunks/{krFvILrS.js → B2vzeMIK.js} +1 -1
  9. package/web/app/immutable/chunks/{BwYbkpv0.js → B5nWrdoQ.js} +2 -2
  10. package/web/app/immutable/chunks/{BjpkVlel.js → B6-zId45.js} +1 -1
  11. package/web/app/immutable/chunks/{C5pZr_eO.js → B68RgPt4.js} +1 -1
  12. package/web/app/immutable/chunks/{D4Bvjyun.js → B7I76UX8.js} +1 -1
  13. package/web/app/immutable/chunks/{CflCv6yT.js → B8g9F0km.js} +1 -1
  14. package/web/app/immutable/chunks/{D-FJwCJv.js → B9AYzIYi.js} +1 -1
  15. package/web/app/immutable/chunks/{B8PX7I-9.js → BAZoUnVN.js} +2 -2
  16. package/web/app/immutable/chunks/{qEqgcfxF.js → BC_SYp-o.js} +2 -2
  17. package/web/app/immutable/chunks/{D-rH49j3.js → BCzlGnYf.js} +1 -1
  18. package/web/app/immutable/chunks/{6QGNsSrA.js → BLRecOpc.js} +1 -1
  19. package/web/app/immutable/chunks/{BFAk2LVP.js → BNgq2ZMa.js} +1 -1
  20. package/web/app/immutable/chunks/{BnVJp_cC.js → BXU9MHXS.js} +6 -6
  21. package/web/app/immutable/chunks/{DUyrpeKY.js → BYXO0Gk3.js} +1 -1
  22. package/web/app/immutable/chunks/{CoMKMk85.js → BektlRSU.js} +1 -1
  23. package/web/app/immutable/chunks/{DOK9MM6Z.js → Ben0nAYz.js} +1 -1
  24. package/web/app/immutable/chunks/{CjLHTWF9.js → Bh-O97bI.js} +1 -1
  25. package/web/app/immutable/chunks/{CGJQ5Lrw.js → BiQrgetk.js} +1 -1
  26. package/web/app/immutable/chunks/{nHCGi3DM.js → BjBZP2Sm.js} +1 -1
  27. package/web/app/immutable/chunks/{BC9gAJNT.js → BkLZMMzN.js} +1 -1
  28. package/web/app/immutable/chunks/{CE8tJ75b.js → BmMWCsyJ.js} +2 -2
  29. package/web/app/immutable/chunks/{B2hRa7Yb.js → BnznFsYJ.js} +1 -1
  30. package/web/app/immutable/chunks/{CrA_uKSD.js → Bo29KQce.js} +2 -2
  31. package/web/app/immutable/chunks/{D_NE3d33.js → BoeEuXNl.js} +1 -1
  32. package/web/app/immutable/chunks/{Bvi-Shh7.js → Bp2Nfjmb.js} +1 -1
  33. package/web/app/immutable/chunks/{DzJrfN9j.js → BpB7N1op.js} +1 -1
  34. package/web/app/immutable/chunks/{N1UEVlPw.js → Bq5sL6M1.js} +2 -2
  35. package/web/app/immutable/chunks/{JvJxAzOX.js → BtasFr4u.js} +4 -4
  36. package/web/app/immutable/chunks/{T5qovgYE.js → Bvy2zKDX.js} +3 -3
  37. package/web/app/immutable/chunks/{BRqE1tM8.js → BxF7_wvx.js} +1 -1
  38. package/web/app/immutable/chunks/{BH3meh56.js → BxrOQdnj.js} +1 -1
  39. package/web/app/immutable/chunks/{LLmJZdsw.js → BzARCMDL.js} +1 -1
  40. package/web/app/immutable/chunks/{C7YrFrbw.js → C-4sX4WB.js} +1 -1
  41. package/web/app/immutable/chunks/{CP_M_2ZB.js → C2vrWFtk.js} +1 -1
  42. package/web/app/immutable/chunks/{DAfonYfL.js → C5Fcfi4a.js} +1 -1
  43. package/web/app/immutable/chunks/{CJuyNLgE.js → C69fieuV.js} +1 -1
  44. package/web/app/immutable/chunks/{fkUE5_Q0.js → C9AWwiKL.js} +2 -2
  45. package/web/app/immutable/chunks/{CHtP2-4n.js → C9mV43sF.js} +1 -1
  46. package/web/app/immutable/chunks/{BIGsFVkI.js → CA5qStwv.js} +1 -1
  47. package/web/app/immutable/chunks/{CnNmiU5l.js → CG-AjHmw.js} +1 -1
  48. package/web/app/immutable/chunks/{DfkQEaXV.js → CMw3X-cM.js} +1 -1
  49. package/web/app/immutable/chunks/{CllmVeix.js → CNthkG74.js} +12 -12
  50. package/web/app/immutable/chunks/{6JOWUA0P.js → CQ88uPDU.js} +1 -1
  51. package/web/app/immutable/chunks/{BfyfSZdl.js → CXKyDRyX.js} +1 -1
  52. package/web/app/immutable/chunks/{BP7nlxNq.js → CZnSx3IG.js} +1 -1
  53. package/web/app/immutable/chunks/{2Ao-T8qf.js → CZsqRMpl.js} +1 -1
  54. package/web/app/immutable/chunks/{DGNeAaXl.js → CcbgOGTK.js} +1 -1
  55. package/web/app/immutable/chunks/{BckqRYZs.js → CdckxRoX.js} +1 -1
  56. package/web/app/immutable/chunks/{DtBRtc2i.js → CeCMyC6B.js} +1 -1
  57. package/web/app/immutable/chunks/{C7ByBZsV.js → CeH-8zz-.js} +1 -1
  58. package/web/app/immutable/chunks/{BV5oTCVw.js → CjWE3eOa.js} +1 -1
  59. package/web/app/immutable/chunks/{D2-uQyBY.js → Cjq0T7Yr.js} +1 -1
  60. package/web/app/immutable/chunks/{DDr1O9hn.js → Cobq24L_.js} +1 -1
  61. package/web/app/immutable/chunks/{CevzYtzb.js → CpXdD2pe.js} +1 -1
  62. package/web/app/immutable/chunks/{jBBqXN5m.js → CtxPws6S.js} +1 -1
  63. package/web/app/immutable/chunks/{YTC67ekm.js → CusuNfO9.js} +1 -1
  64. package/web/app/immutable/chunks/{D5Y-wADp.js → Cv7jb4Uj.js} +1 -1
  65. package/web/app/immutable/chunks/{CvYgDxVJ.js → Czy4ZgYr.js} +1 -1
  66. package/web/app/immutable/chunks/{DKTLNGza.js → D-Nl8cp7.js} +1 -1
  67. package/web/app/immutable/chunks/{B0BPiCIq.js → D02vVDIu.js} +1 -1
  68. package/web/app/immutable/chunks/{C5-5Zn5M.js → D0_ubDvW.js} +1 -1
  69. package/web/app/immutable/chunks/{CTqL3PzM.js → D5nioBhi.js} +1 -1
  70. package/web/app/immutable/chunks/{Bl7mtvej.js → D5pBf0jC.js} +1 -1
  71. package/web/app/immutable/chunks/{M-lXDPAs.js → D63pT3ik.js} +1 -1
  72. package/web/app/immutable/chunks/{BV9VbdHN.js → D6S0zdsw.js} +1 -1
  73. package/web/app/immutable/chunks/{D7on2OYy.js → D6a7EVHj.js} +1 -1
  74. package/web/app/immutable/chunks/{DifLuz3S.js → D7mmNGtO.js} +1 -1
  75. package/web/app/immutable/chunks/{DINs12JF.js → DAOXVkCb.js} +1 -1
  76. package/web/app/immutable/chunks/{D3sI15LX.js → DD3CUlXo.js} +1 -1
  77. package/web/app/immutable/chunks/{DUi9RlML.js → DDGVLuT3.js} +1 -1
  78. package/web/app/immutable/chunks/{C_7KXUMJ.js → DDIBsw5o.js} +1 -1
  79. package/web/app/immutable/chunks/{DFNl1TUB.js → DDcw3XhX.js} +1 -1
  80. package/web/app/immutable/chunks/{lDItBJz5.js → DJRflSCY.js} +1 -1
  81. package/web/app/immutable/chunks/{DCg6Psz1.js → DLmrG3a0.js} +1 -1
  82. package/web/app/immutable/chunks/{CXrLqpUL.js → DNTNA0lR.js} +1 -1
  83. package/web/app/immutable/chunks/{oMcc34RE.js → DO_NXLHx.js} +1 -1
  84. package/web/app/immutable/chunks/{C27DSvBR.js → DS0SHFd6.js} +1 -1
  85. package/web/app/immutable/chunks/{D5WJzeDf.js → DSCXs-q3.js} +1 -1
  86. package/web/app/immutable/chunks/{WzteeIMn.js → DUczM7TD.js} +1 -1
  87. package/web/app/immutable/chunks/{DTOx94XM.js → DUdjGJXf.js} +4 -4
  88. package/web/app/immutable/chunks/{DrMWLzGI.js → DUwN32hQ.js} +1 -1
  89. package/web/app/immutable/chunks/{Bvz-dBQx.js → DY0gt_BS.js} +1 -1
  90. package/web/app/immutable/chunks/{R9fjYuJn.js → DYFy2Ldf.js} +1 -1
  91. package/web/app/immutable/chunks/{CdLAF87I.js → DYJDw3uX.js} +1 -1
  92. package/web/app/immutable/chunks/{D87dDGLb.js → DZshGt8n.js} +4 -4
  93. package/web/app/immutable/chunks/{DvM8bJms.js → D_HEyzTO.js} +1 -1
  94. package/web/app/immutable/chunks/{Dci9hnTj.js → D_vngkiW.js} +1 -1
  95. package/web/app/immutable/chunks/{s2w6GV5M.js → DcWx2Amv.js} +1 -1
  96. package/web/app/immutable/chunks/{uxIOvU_P.js → De07dT_P.js} +1 -1
  97. package/web/app/immutable/chunks/{ByIzMOqf.js → DnnZVXl2.js} +1 -1
  98. package/web/app/immutable/chunks/{DAiFFgAJ.js → DsyMO7lt.js} +1 -1
  99. package/web/app/immutable/chunks/{zrlfyKcK.js → Dxrm8R2l.js} +1 -1
  100. package/web/app/immutable/chunks/{jgj4o1Uh.js → Dxy7-YsF.js} +1 -1
  101. package/web/app/immutable/chunks/{DwmpVKoW.js → DywAIT80.js} +1 -1
  102. package/web/app/immutable/chunks/{Cj20eHEu.js → Dz_5oWBH.js} +1 -1
  103. package/web/app/immutable/chunks/{By_-fe-o.js → EYLa5b66.js} +1 -1
  104. package/web/app/immutable/chunks/{Ced1BDxC.js → EZET2SWx.js} +1 -1
  105. package/web/app/immutable/chunks/{DSiABYr8.js → F7t0kUrs.js} +3 -3
  106. package/web/app/immutable/chunks/{BvpSU-JA.js → IIWOz2cn.js} +1 -1
  107. package/web/app/immutable/chunks/{0P3kNdul.js → K1xasT4s.js} +1 -1
  108. package/web/app/immutable/chunks/{CoApDTLs.js → N-8H6MfE.js} +1 -1
  109. package/web/app/immutable/chunks/{uG0ogRPF.js → NmTl74hx.js} +1 -1
  110. package/web/app/immutable/chunks/{CutmAjXi.js → Ou3SFDdl.js} +1 -1
  111. package/web/app/immutable/chunks/{D58pwzPt.js → PCmXghpH.js} +1 -1
  112. package/web/app/immutable/chunks/{DkH0frG1.js → U7DUVyx7.js} +1 -1
  113. package/web/app/immutable/chunks/{BjftfsNw.js → Vz71nOZi.js} +1 -1
  114. package/web/app/immutable/chunks/{Cr71dCQ9.js → XbvlLx0H.js} +1 -1
  115. package/web/app/immutable/chunks/{CJHy-JJE.js → ZX0Y7FB3.js} +1 -1
  116. package/web/app/immutable/chunks/{C4JT0UFD.js → bombbKOB.js} +1 -1
  117. package/web/app/immutable/chunks/{K1_w_nIY.js → dEQD1s3O.js} +1 -1
  118. package/web/app/immutable/chunks/{B6vq-Jnf.js → l-XeMHVA.js} +3 -3
  119. package/web/app/immutable/chunks/{m60HmQ1I.js → s8EWzU2o.js} +1 -1
  120. package/web/app/immutable/chunks/{Dpl1vNuS.js → ufCEqIju.js} +2 -2
  121. package/web/app/immutable/chunks/{SkSVpvq2.js → vYC7k36z.js} +1 -1
  122. package/web/app/immutable/chunks/{CaBVF8lo.js → vajMn1hF.js} +1 -1
  123. package/web/app/immutable/chunks/{DghFeJpM.js → wnsbxXgJ.js} +1 -1
  124. package/web/app/immutable/chunks/{B76iPCB8.js → xrhTb8jJ.js} +3 -3
  125. package/web/app/immutable/entry/{app.BYFXPHEi.js → app.Bbjsnx4F.js} +2 -2
  126. package/web/app/immutable/entry/start.CC-sOLAV.js +1 -0
  127. package/web/app/immutable/nodes/{0.DWqlOy-Q.js → 0.DIrmDdgP.js} +1 -1
  128. package/web/app/immutable/nodes/{1.ldbPcT5e.js → 1.0U9rVILo.js} +1 -1
  129. package/web/app/immutable/nodes/{10.DVqBY3OG.js → 10.DmuyDRUa.js} +1 -1
  130. package/web/app/immutable/nodes/{14.C-M1ZgmW.js → 14.BDU3mo5z.js} +1 -1
  131. package/web/app/immutable/nodes/{17.CFL-PLIe.js → 17.CaPm8EEa.js} +2 -2
  132. package/web/app/immutable/nodes/{2.D3qjCzco.js → 2.BUocyfyX.js} +4 -4
  133. package/web/app/immutable/nodes/{3.T86uAwai.js → 3.DgsM2P-7.js} +1 -1
  134. package/web/app/immutable/nodes/{4.Czq-r5qI.js → 4.BF7b7v6_.js} +1 -1
  135. package/web/app/immutable/nodes/{5.DBiCRujn.js → 5.DnMfc77x.js} +1 -1
  136. package/web/app/immutable/nodes/{6.CSz1iNfF.js → 6.DKcarngt.js} +1 -1
  137. package/web/app/immutable/nodes/{7.DOMZo383.js → 7.CNf5_kic.js} +1 -1
  138. package/web/app/immutable/nodes/{8.fP5NZuL5.js → 8.BHg8aZ3X.js} +4 -4
  139. package/web/app/immutable/nodes/{9.7pp9xb37.js → 9.6MWpxcjv.js} +4 -4
  140. package/web/app/version.json +1 -1
  141. package/web/index.html +9 -9
  142. package/web/app/immutable/entry/start.DE-Q5qIJ.js +0 -1
@@ -1,6 +1,6 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/Dpl1vNuS.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/O1QHAURn.js","/app/immutable/chunks/BBDxUL80.js","/app/immutable/chunks/haHmm526.js","/app/immutable/chunks/BkT9o_nd.js","/app/immutable/chunks/CAyg2ijY.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/DNqM68dO.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BUzdsYyD.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CovkQMd0.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/CR_t_AVn.js","/app/immutable/chunks/C2mPABxH.js","/app/immutable/chunks/4kJJ0Qm4.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BV0i7JjW.js","/app/immutable/chunks/BH3LKWph.js","/app/immutable/chunks/DV9nY0bt.js","/app/immutable/chunks/CWDPeeaf.js","/app/immutable/chunks/B0f-om7y.js","/app/immutable/chunks/BgCTNfXj.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/CqO6BKca.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BsieX9dN.js","/app/immutable/assets/observe-overflow.CbDLK6fN.css","/app/immutable/chunks/BViMgwIT.js","/app/immutable/chunks/DEEBY1o3.js","/app/immutable/chunks/CQkmEJ54.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/BeP4UORy.js","/app/immutable/chunks/CerLhVOI.js","/app/immutable/chunks/B1mZq3ve.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/DwupWOJr.js","/app/immutable/chunks/Drd3_KgI.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/B6kyqBFl.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/CflCv6yT.js","/app/immutable/chunks/VZEkDWIM.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/xEfOpOba.js","/app/immutable/chunks/RoOfSbrC.js","/app/immutable/chunks/Csj7SEat.js","/app/immutable/chunks/DrbtWgvN.js","/app/immutable/chunks/BVs4aETe.js","/app/immutable/chunks/BgLcfABG.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/N1UEVlPw.js","/app/immutable/chunks/C5pZr_eO.js","/app/immutable/chunks/BnVJp_cC.js","/app/immutable/chunks/D_NE3d33.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/D7on2OYy.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css","/app/immutable/chunks/C7YrFrbw.js","/app/immutable/chunks/D87dDGLb.js","/app/immutable/chunks/BjpkVlel.js","/app/immutable/chunks/BV3MrUXO.js","/app/immutable/chunks/DRjQ_WEk.js","/app/immutable/chunks/BCvU0pY_.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/lkH5RFQO.js","/app/immutable/chunks/DlwwHsb5.js","/app/immutable/assets/AttachmentPreview.BCSCCZGm.css","/app/immutable/assets/DiagramPresentation.Bfi3xHm0.css","/app/immutable/chunks/DCg6Psz1.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css"])))=>i.map(i=>d[i]);
2
- var Ua=Object.defineProperty;var Ba=(a,t,r)=>t in a?Ua(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var dt=(a,t,r)=>Ba(a,typeof t!="symbol"?t+"":t,r);import{bp as C,t as rt,br as y,a_ as re,bz as nt,b as st,bt as Va,bv as Jt,_ as ka}from"./O1QHAURn.js";import{bs as ot,a5 as N,aD as e,bA as T,b_ as X,W,bn as it,c9 as E,aA as x,aB as B,ca as yt,bk as ya,c6 as Ka,cd as Ht,bV as oe,bS as z,ay as Ee,bl as me,bO as be,ai as xa,a7 as xt,c0 as ja,bf as Ot,bH as O,aw as Be,aj as Se,aC as Ga,c3 as ft,bb as St,aF as Ya,br as Za,bj as Ja}from"./DYhIMPy1.js";import{j as Qa,l as Xa,v as Pe,w as pt,u as $,g as tt,n as Ut,p as $a}from"./CAyg2ijY.js";import{aO as er,cY as tr,M as ar,aw as rr,dm as nr,W as sr,dr as Aa,C as or,a0 as ir}from"./VZEkDWIM.js";import{t as Bt}from"./CWDPeeaf.js";import{a9 as cr,ao as lr,A as dr,n as ur,a5 as Ia,s as Vt,a4 as Kt,aJ as At,b5 as Ma,m as fr,aL as pr,b4 as mr}from"./BCvU0pY_.js";import{l as Qt}from"./DSiABYr8.js";import{bV as gr,bS as vr,bT as Xt,aB as hr}from"./DrbtWgvN.js";import{t as ut,P as br}from"./DV9nY0bt.js";import{f as jt,bc as qt}from"./CR_t_AVn.js";import{t as Ve,v as wr,I as Ct,F as $t,c as ea}from"./BkT9o_nd.js";import{ry as Ca,Ix as we,mq as _r,fF as kr,nk as yr,ul as xr,a as Ar,vX as Ir,t0 as Mr,rg as Cr,g as Sr,be as ta,v2 as Rr,sH as Er,v4 as Pr}from"./DNqM68dO.js";import{c as Tr,l as bt}from"./ChTqQfQN.js";import{o as Fr}from"./D7on2OYy.js";import{aN as Lr,aO as aa,by as Wr,ax as Nr,bx as Hr,aC as Or,c_ as qr,cO as Dr,F as wt,au as ra,bG as zr,bB as Ur}from"./B0f-om7y.js";import{l as Br}from"./BVs4aETe.js";import{p as Vr,c_ as _t,cZ as na,ao as Kr,d0 as Sa,a8 as Et,aE as Ra,aV as jr,aw as Gr,a7 as sa,r as Yr,aM as Zr,aR as Jr,F as Qr}from"./BjpkVlel.js";import{s as Rt}from"./BBDxUL80.js";import{b as at}from"./BaIAhI85.js";import{s as Xr}from"./BsieX9dN.js";import{c as $r,u as en,s as tn,a as an}from"./DfxQWSVU.js";import{z as oa,x as ia}from"./Dpl1vNuS.js";import{g as ca}from"./haHmm526.js";import{n as la}from"./BV3MrUXO.js";const rn=new Set(["failed","blocked","needs_attention","in_progress"]),nn={failed:{visual:"icon",icon:Dr,className:"text-foreground"},blocked:{visual:"icon",icon:qr,className:"text-danger"},needs_attention:{visual:"icon",icon:Or,className:"text-warning-ink"},in_progress:{visual:"dot",icon:null,className:"workspace-status-color-active"},waiting:{visual:"icon",icon:Hr,className:"text-muted-foreground"},unread:{visual:"dot",icon:null,className:"workspace-status-color-unread"},not_started:{visual:"dot",icon:null,className:"text-muted-foreground/35"},idle:{visual:"dot",icon:null,className:"text-muted-foreground/35"},complete:{visual:"icon",icon:Nr,className:"text-success"},pr_queued:{visual:"icon",icon:Wr,className:"text-info"},pr_ready:{visual:"icon",icon:aa,className:"text-success"},pr_open:{visual:"icon",icon:aa,className:"text-info"},pr_merged:{visual:"icon",icon:Lr,className:"text-purple-500"}};function sn(a){switch(a){case"failed":return C.workspace_statusIcon_failed_label();case"blocked":return C.workspace_statusIcon_blocked_label();case"needs_attention":return C.workspace_statusIcon_needsAttention_label();case"in_progress":return C.workspace_statusIcon_inProgress_label();case"waiting":return C.workspace_taskStatus_waiting_label();case"unread":return C.layout_activeCard_unread_header();case"not_started":return C.workspace_statusIcon_notStarted_label();case"idle":return C.workspace_statusIcon_idle_label();case"complete":return C.workspace_statusIcon_complete_label();case"pr_queued":return C.workspace_statusIcon_prQueued_label();case"pr_ready":return C.workspace_statusIcon_prReady_label();case"pr_open":return C.workspace_statusIcon_prOpen_label();case"pr_merged":return C.workspace_statusIcon_prMerged_label()}}function on(a){const t=Ca(a.displayStatus)?a.displayStatus:"not_started";return rn.has(t)?t:a.attention==="unread"?"unread":a.waiting===!0?"waiting":t}function Ea(a){const t=a==="waiting"||a==="unread"||Ca(a)?a:"not_started",r=sn(t);return{state:t,...nn[t],label:r,tooltip:r,accessibleName:r}}var cn=B('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),ln=B("<span><!></span>");function Pa(a,t){if(new.target)return rt({component:Pa,...a});ot(t,!0);let r=y(t,"status",7),d=y(t,"size",7,14),c=y(t,"decorative",7,!1),u=y(t,"class",7);const s=E(()=>Ea(r()));var o={get status(){return r()},set status(m){r(m),x()},get size(){return d()},set size(m=14){d(m),x()},get decorative(){return c()},set decorative(m=!1){c(m),x()},get class(){return u()},set class(m){u(m),x()},$set:nt,$on:(m,w)=>st(t,m,w)},v=ln(),_=N(v);{var b=m=>{var w=cn();W(m,w)},A=m=>{wt(m,{get icon(){return e(s).icon},class:"size-full!"})};re(_,m=>{e(s).visual==="dot"?m(b):e(s).icon&&m(A,1)})}return T(v),X(m=>{Pe(v,1,m,"svelte-14zk5l0"),pt(v,`width: ${d()??""}px; height: ${d()??""}px;`),$(v,"role",c()?void 0:"img"),$(v,"aria-label",c()?void 0:e(s).accessibleName),$(v,"aria-hidden",c()?"true":void 0),$(v,"title",c()?void 0:e(s).tooltip),$(v,"data-workspace-status",e(s).state),$(v,"data-workspace-status-visual",e(s).visual),$(v,"data-workspace-status-icon",e(s).icon?.iconName)},[()=>Qa(Xa("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",e(s).className,u()))]),W(a,v),it(o)}const Gt=6e4,Yt=60*Gt,Zt=24*Yt,da=30*Zt;function dn(a,t=new Date){if(a==null)return null;const r=a instanceof Date?a:new Date(a),d=r.getTime(),c=t.getTime();if(!Number.isFinite(d)||!Number.isFinite(c))return null;const u=Math.max(0,c-d);let s;u<Gt?s="<1m":u<Yt?s=`${Ve(Math.floor(u/Gt))}m`:u<Zt?s=`${Ve(Math.floor(u/Yt))}h`:u<da?s=`${Ve(Math.floor(u/Zt))}d`:s=`${Ve(Math.floor(u/da))}mo`;const o=d>c?t:r,v=wr(o,{now:t});return v?{compact:s,accessible:v,dateTime:r.toISOString()}:null}var un=B('<div><div class="grid gap-0.5 px-5 pt-4"><div class="flex min-w-0 items-center justify-between gap-3"><!> <!></div> <!> <!></div> <div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><div class="grid" data-workspace-hover-card-activity=""><!></div> <div class="pull-requests grid" data-workspace-hover-card-pr-column=""><!></div></div></div>'),fn=B('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),pn=B('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),mn=B('<span class="row-span-2 flex h-(--text-caption-line-height) items-center" aria-hidden="true"><!></span><span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-agent-name=""> </span><time class="type-caption whitespace-nowrap text-muted-foreground" data-workspace-hover-card-agent-time=""> </time> <span class="agent-detail type-caption flex min-w-0 items-start gap-1.5 text-muted-foreground svelte-1vax087" data-workspace-hover-card-agent-detail=""><span class="min-w-0 truncate" data-workspace-hover-card-agent-context=""> </span><!></span>',1),ua=B('<div role="listitem"><!></div>'),gn=B('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),vn=B('<section class="activity min-w-0" data-workspace-hover-card-activity="" data-workspace-hover-card-agent-table=""><div class="-mx-2 grid gap-2" role="list"></div> <!></section>'),hn=B('<!> <span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-pr-title=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-status=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-number=""> </span>',1),bn=B('<div class="grid w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-sm px-2 py-0 text-left" data-workspace-hover-card-pr-row=""><!></div>'),wn=B('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),_n=B('<section class="pull-requests min-w-0" data-workspace-hover-card-pr-column=""><div class="-mx-2 grid min-w-0 gap-2" role="list" data-workspace-hover-card-pr-list=""></div> <!></section>'),kn=B('<div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><!> <!></div>',1),yn=B('<header data-workspace-hover-card-header=""><div class="min-w-0" data-workspace-hover-card-identity=""><div class="flex min-w-0 items-center justify-between gap-3"><h2 class="type-body min-w-0 truncate font-medium text-foreground" data-workspace-hover-card-title=""> </h2> <span class="type-caption flex shrink-0 items-center gap-1.5 text-muted-foreground" data-workspace-hover-card-status=""><span class="truncate" data-workspace-hover-card-status-label=""> </span><!></span></div> <div class="type-caption mt-0.5 min-w-0 truncate text-muted-foreground" data-workspace-hover-card-repo=""> </div> <!></div></header> <!>',1),xn=B('<section class="workspace-hover-card shrink-0 overflow-hidden rounded-md bg-background text-left text-foreground shadow-(--elevation-overlay) ring-1 ring-border svelte-1vax087" data-workspace-hover-card="" data-workspace-hover-card-layout="landscape"><!></section>');function An(a,t){if(new.target)return rt({component:An,...a});ot(t,!0);const r=()=>Jt(F,"$workspaceAgents$",c),d=()=>Jt(i,"$prMonitors$",c),[c,u]=Va(),s=Tr("WorkspaceHoverCard");let o=y(t,"workspace",7),v=y(t,"isLoading",7,!1),_=y(t,"activeAgentIds",23,()=>[]),b=y(t,"loadAgentSessions",7,!0),A=y(t,"onkeydown",7),m=y(t,"staticData",7,!1);const w=Ht("");function q(){return m()?Ht([]):er(w)}function V(){return m()?Ht([]):tr(w)}const F=q(),i=V();yt(()=>w.set(o()?.id??""));let p=oe(0);ya(()=>Qt.subscribe(()=>Ka(p)));let k=E(()=>o()?.agentSummary?.agentIds??[]),P=E(()=>(e(p),o()?Qt.getStreamingAgentIdsForWorkspace(o().id):[])),U=null,K=new Set;yt(()=>{if(!o()||!b())return;const l=String(o().id);U!==l&&(U=l,K=new Set);for(const M of new Set([...e(k).slice(0,6),..._(),...e(P)]))K.has(M)||(we.dispatch(_r(l,M)),K.add(M))});function ne(l){return[l.name,l.context,l.questionMeta?.accessible,l.updated.accessible].filter(Boolean).join(". ")}function Le(l){return l?l.kind==="attention"?l.attention.reason?.trim()||null:"text"in l&&l.text.trim()||null:null}function le(l){return dn(l.lastActivity||l.updatedAt||l.createdAt)??{compact:"—",accessible:C.workspace_hoverCard_noRecentActivity_label()}}function ie(l){const M=String(l.status).toLowerCase(),L=yr(l),Q=lr(l),ye=Q==="question"?gr(l):null,he=Le(rr.select(we.state,String(l.id)));let xe,Ne,Ae,n,f,H,S=!1;if(Q==="question"){xe="attention",Ne="question",Ae=ye?.questions[0]?.question.trim()||he||C.workspace_hoverCard_question_label(),n="question",f=1;const G=ye?.questions.length??0;G>1&&(H={compact:`${Ve(1)}/${Ve(G)}`,accessible:C.chat_questionWizard_stepCounter_label({current:1,total:G})})}else if(Q==="attention-discussion")xe="attention",Ne="discussion",Ae=L?.reason?.trim()||C.chat_agentCard_attentionDiscussion_label(),n="attention-discussion",f=1;else if(Q==="attention-blocker"||M==="blocked")xe="attention",Ne="blocker",Ae=L?.reason?.trim()||C.chat_agentCard_attentionBlocker_label(),n="attention-blocker",f=0;else if(l.hasUnread)xe="attention",Ne="unread",Ae=he||C.chat_newMessagesDivider_label(),S=!!he,n="unread",f=2;else if(l.isStreaming||l.isProcessing||_().includes(String(l.id))||e(P).includes(String(l.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(M))xe="active",Ae=he||C.workspace_devScripts_running_label(),S=!!he,n=l.isProcessing?"responding":"running",f=3;else if(["waiting","pending","queued","starting"].includes(M))xe="waiting",Ae=he||C.workspace_taskStatus_waiting_label(),S=!!he,n="waiting",f=4;else return null;const Y=l.agentMetadata??l.metadata;return{id:String(l.id),name:l.name?.trim()||C.workspace_fileChanges_agent_label(),group:xe,attentionKind:Ne,avatarState:n,specialist:Y?.specialist,context:Ae,questionMeta:H,contextIsPreview:S,updated:le(l),priority:f}}let ge=E(()=>{const l=o()?.agentSummary,M=new Map;if(Array.isArray(l?.agents))for(const L of l.agents)L&&typeof L=="object"&&typeof L.id=="string"&&M.set(L.id,L.parentAgentId);return r().filter(L=>{const Q=M.get(String(L.id));return!(kr(L)!=="topLevel"||typeof Q=="string"&&Q||L.pendingDeleteAt||L.retiredAt||String(L.status).toLowerCase()==="deleted")})}),_e=E(()=>e(ge).map(ie).filter(l=>l!==null).sort((l,M)=>l.priority-M.priority)),Ge=E(()=>e(_e).slice(0,6)),I=E(()=>Math.max(0,e(_e).length-6)),ee=E(()=>o()?.repositoryName?o().repositoryOwner?`${o().repositoryOwner} / ${o().repositoryName}`:o().repositoryName:C.workspace_hoverCard_localRepository_label()),Re=E(()=>on(o()??{})),ve=E(()=>Ea(e(Re))),ce=E(()=>o()?.statusMessage?.trim()||"");function ke(l){if(!l)return null;const M=l.activePullRequest??l.pullRequests?.[0]??null;return M||(l.prStatus?{id:`legacy-pr-${l.prNumber??"workspace"}`,number:l.prNumber??0,url:l.prUrl??"",title:C.workspace_hoverCard_pullRequest_label(),status:l.prStatus,createdAt:l.updatedAt,updatedAt:l.updatedAt}:null)}let We=E(()=>o()?m()?ke(o()):nr.select(we.state,o().id)??ke(o()):null),de=E(()=>{if(!o()||ar(o()))return[];const l=o().repositoryOwner&&o().repositoryName?`${o().repositoryOwner}/${o().repositoryName}`:void 0;return cr({workspacePRs:o().pullRequests,activePR:e(We),monitors:d(),workspaceRepo:l,buildPrUrl:(M,L)=>Vr(M,o().repositoryOwner,o().repositoryName,L),getDisplayTitle:M=>M.title})}),Ze=E(()=>e(de).slice(0,3)),Te=E(()=>Math.max(0,e(de).length-3)),se=E(()=>e(_e).length>0),qe=E(()=>e(de).length>0),h=E(()=>e(se)||e(qe));function g(l){const M=l.resource?.repository.provider==="gitlab"?`${l.repo} !${l.number}`:l.repo?C.workspace_card_prBadge_repoLine_tooltip({repo:l.repo,number:l.number}):C.workspace_card_prBadge_label({number:` #${l.number}`});return[sr(M,l),l.title,l.details].filter(Boolean).join(`
3
- `)}function J(l,M){if(l.stopPropagation(),!o()||!b())return;const L=o().id;Br.select(we.state)!==L&&Fr(L).catch(Q=>{s.warn("Failed to switch workspace for hover-card agent",{agentId:M,error:Q})}),we.dispatch(xr(L,{agentId:M}))}function D(l,M){if(l.stopPropagation(),!o()||!M.url)return;const L=o().id;ka(async()=>{const{handleLink:Q}=await import("./Dpl1vNuS.js").then(ye=>ye.H);return{handleLink:Q}},__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,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]),import.meta.url).then(({handleLink:Q})=>Q(M.url,{workspaceId:L,event:l}))}var ae={get workspace(){return o()},set workspace(l){o(l),x()},get isLoading(){return v()},set isLoading(l=!1){v(l),x()},get activeAgentIds(){return _()},set activeAgentIds(l=[]){_(l),x()},get loadAgentSessions(){return b()},set loadAgentSessions(l=!0){b(l),x()},get onkeydown(){return A()},set onkeydown(l){A(l),x()},get staticData(){return m()},set staticData(l=!1){m(l),x()},$set:nt,$on:(l,M)=>st(t,l,M)},ue=xn(),j=N(ue);{var Ie=l=>{var M=un(),L=N(M),Q=N(L),ye=N(Q);ut(ye,{class:"h-7 min-w-0 max-w-64 flex-1"});var he=z(ye,2);ut(he,{class:"h-5 w-20 shrink-0"}),T(Q);var xe=z(Q,2);ut(xe,{class:"h-4 w-40"});var Ne=z(xe,2);ut(Ne,{class:"mt-2 h-10 w-full"}),T(L);var Ae=z(L,4),n=N(Ae),f=N(n);ut(f,{class:"h-10 w-full"}),T(n);var H=z(n,2),S=N(H);ut(S,{class:"h-10 w-full"}),T(H),T(Ae),T(M),W(l,M)},Fe=l=>{var M=yn(),L=Ee(M);let Q;var ye=N(L),he=N(ye),xe=N(he),Ne=me(xe,!0),Ae=z(xe,2),n=N(Ae),f=me(n,!0),H=z(n);Pa(H,{get status(){return e(Re)},size:16,decorative:!0}),T(Ae),T(he);var S=z(he,2),Y=me(S,!0),G=z(S,2);{var te=pe=>{var ze=fn(),It=me(ze,!0);tt(ze,(Mt,Pt)=>Bt?.(Mt,Pt),()=>e(ce)),X(()=>be(It,e(ce))),W(pe,ze)};re(G,pe=>{e(ce)&&pe(te)})}T(ye),T(L);var He=z(L,2);{var fe=pe=>{var ze=kn(),It=z(Ee(ze),2),Mt=N(It);{var Pt=Je=>{var Ke=vn(),Ye=N(Ke);Ut(Ye,21,()=>e(Ge),Z=>Z.id,(Z,R)=>{var Me=ua(),Qe=N(Me);{let Xe=E(()=>ne(e(R)));jt(Qe,{variant:"plain",wrapContent:!1,class:"grid h-auto! min-h-8 w-full min-w-0 cursor-pointer grid-cols-[1rem_minmax(0,1fr)_auto] items-start justify-normal gap-x-2 gap-y-0 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Xe)},"data-workspace-hover-card-agent-row":!0,get"data-agent-group-row"(){return e(R).group},get"data-attention-kind"(){return e(R).attentionKind},get onkeydown(){return A()},onclick:je=>J(je,e(R).id),children:(je,mt)=>{var Oe=mn(),Ce=Ee(Oe),Ue=N(Ce);{let et=E(()=>e(R).specialist??null);dr(Ue,{get agentId(){return e(R).id},variant:"compact",get state(){return e(R).avatarState},get specialist(){return e(et)}})}T(Ce);var ct=z(Ce),Lt=me(ct,!0),$e=z(ct),Wt=me($e,!0),gt=z($e,2),vt=N(gt),Nt=me(vt,!0);tt(vt,(et,lt)=>Bt?.(et,lt),()=>e(R).context);var Oa=z(vt);{var qa=et=>{var lt=pn(),Da=N(lt),za=me(Da,!0);T(lt),X(()=>{$(lt,"aria-label",e(R).questionMeta.accessible),be(za,e(R).questionMeta.compact)}),W(et,lt)};re(Oa,et=>{e(R).questionMeta&&et(qa)})}T(gt),X(()=>{be(Lt,e(R).name),$($e,"datetime",e(R).updated.dateTime),$($e,"aria-label",e(R).updated.accessible),be(Wt,e(R).updated.compact),$(gt,"data-workspace-hover-card-agent-preview",e(R).contextIsPreview||void 0),be(Nt,e(R).context)}),W(je,Oe)},$$slots:{default:!0}})}T(Me),W(Z,Me)}),T(Ye);var Tt=z(Ye,2);{var Ft=Z=>{var R=gn(),Me=N(R),Qe=me(Me,!0),Xe=z(Me,2);wt(Xe,{get icon(){return ra},size:10}),T(R),X(je=>be(Qe,je),[()=>C.workspace_hoverCard_moreAgents_label({count:Ve(e(I))})]),W(Z,R)};re(Tt,Z=>{e(I)&&Z(Ft)})}T(Ke),X(Z=>$(Ke,"aria-label",Z),[()=>C.workspace_multiSelectSidebar_agentsTab_label()]),W(Je,Ke)};re(Mt,Je=>{e(se)&&Je(Pt)})}var Na=z(Mt,2);{var Ha=Je=>{var Ke=_n(),Ye=N(Ke);Ut(Ye,21,()=>e(Ze),Z=>Z.identity,(Z,R)=>{var Me=ua();{const mt=Oe=>{var Ce=hn(),Ue=Ee(Ce);wt(Ue,{get icon(){return e(R).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${e(R).foregroundClass??""}`}});var ct=z(Ue,2),Lt=me(ct,!0),$e=z(ct,2),Wt=me($e,!0),gt=z($e,2),vt=me(gt,!0);X(Nt=>{be(Lt,Nt),be(Wt,e(R).accessibleStateLabel),be(vt,e(R).numberLabel??`#${e(R).number}`)},[()=>e(R).title||(e(R).resource?.repository.provider==="gitlab"?C.workspace_hoverCard_mergeRequest_label():C.workspace_hoverCard_pullRequest_label())]),W(Oe,Ce)};var Qe=N(Me);{var Xe=Oe=>{{let Ce=E(()=>g(e(R)));jt(Oe,{variant:"plain",wrapContent:!1,class:"grid h-auto! w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center justify-normal gap-x-2 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Ce)},"data-workspace-hover-card-pr-row":!0,get"data-pr-identity"(){return e(R).identity},get"data-pr-status"(){return e(R).status},get onkeydown(){return A()},onclick:Ue=>D(Ue,e(R)),children:(Ue,ct)=>{mt(Ue)},$$slots:{default:!0}})}},je=Oe=>{var Ce=bn(),Ue=N(Ce);mt(Ue),T(Ce),X(()=>{$(Ce,"data-pr-identity",e(R).identity),$(Ce,"data-pr-status",e(R).status)}),W(Oe,Ce)};re(Qe,Oe=>{e(R).url?Oe(Xe):Oe(je,-1)})}T(Me)}X(mt=>$(Me,"aria-label",mt),[()=>e(R).url?void 0:g(e(R))]),W(Z,Me)}),T(Ye);var Tt=z(Ye,2);{var Ft=Z=>{var R=wn(),Me=N(R),Qe=me(Me,!0),Xe=z(Me,2);wt(Xe,{get icon(){return ra},size:10}),T(R),X(je=>be(Qe,je),[()=>C.workspace_hoverCard_moreItems_label({count:Ve(e(Te))})]),W(Z,R)};re(Tt,Z=>{e(Te)&&Z(Ft)})}T(Ke),X((Z,R)=>{$(Ke,"aria-label",Z),$(Ye,"aria-label",R)},[()=>e(de).every(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_mergeRequests_label():e(de).some(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_reviews_label():C.workspace_hoverCard_pullRequests_label(),()=>e(de).every(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_mergeRequests_label():e(de).some(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_reviews_label():C.workspace_hoverCard_pullRequests_label()]),W(Je,Ke)};re(Na,Je=>{e(qe)&&Je(Ha)})}T(It),W(pe,ze)};re(He,pe=>{e(h)&&pe(fe)})}X(pe=>{Q=Pe(L,1,"min-w-0 px-5 pt-4",null,Q,{"pb-4":!e(h)}),be(Ne,pe),be(f,e(ve).label),be(Y,e(ee))},[()=>o().title||C.workspace_links_untitled_label()]),W(l,M)};re(j,l=>{v()||!o()?l(Ie):l(Fe,-1)})}T(ue),W(a,ue);var De=it(ae);return u(),De}const fa=800,Rs=175,In=300;function Mn(){let a=0,t=null;const r=new Set,d=new Set;function c(){return a>0||t!==null?0:fa}function u(){const o=c();r.forEach(v=>v(o))}function s(){t!==null&&(clearTimeout(t),t=null)}return{get currentOpenDelay(){return c()},subscribe(o){return r.add(o),o(c()),()=>r.delete(o)},notifyOpened(){const o=a===0&&t===null;s(),a+=1,o&&u()},notifyClosed(){a!==0&&(a-=1,!(a>0)&&(s(),t=setTimeout(()=>{t=null,u()},In)))},deferClose(o){return d.add(o),()=>d.delete(o)},settleDeferredCloses(){const o=[...d];d.clear(),o.forEach(v=>v())},reset(){const o=c()!==fa;s(),a=0,d.clear(),o&&u()}}}const Es=Mn();function Dt(a){const t=Aa.select(we.state,a);return t!==void 0&&Cr(t)}function Cn(a,t){if(!Dt(a))return[];const r=vr.select(we.state,a),d=Xt.select(we.state,a),c=hr.select(we.state),u=[];for(let s=0;s<Ar;s+=1){const o=c[s],v=o&&o!==a?Aa.select(we.state,o):void 0;u.push({id:`assign-micro-key-${s+1}`,label:v?C.workspace_card_assignOccupiedMicroKey_label({number:Ve(s+1),title:v.title}):C.workspace_card_assignMicroKeyNumber_label({number:Ve(s+1)}),checked:r===s,closeOnSelect:!0,onClick:()=>{Dt(a)&&we.dispatch(Ir(s,a)),t()}})}return d!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:C.workspace_card_unassignMicroKey_label(),onClick:()=>{Dt(a)&&Xt.select(we.state,a)===d&&we.dispatch(Mr(d)),t()}})),u}function Ps(a,{connected:t,onClose:r}){if(!t)return[];const d=Cn(a,r);if(d.length===0)return[];const c=d.filter(s=>"id"in s&&s.id!=="unassign-micro-key"),u=d.find(s=>"id"in s&&s.id==="unassign-micro-key");return[{id:"assign-micro-key",label:C.workspace_card_assignMicroKey_label(),icon:zr,onClick:()=>{},selection:"single",submenu:c},...u?[u]:[]]}var Sn=B('<div data-static-position="" role="tooltip"><!></div>'),pa=B('<div role="tooltip"><!></div>');function Rn(a,t){if(new.target)return rt({component:Rn,...a});ot(t,!0);let r=y(t,"id",7),d=y(t,"anchor",7),c=y(t,"position",7,"right"),u=y(t,"absolute",7,!1),s=y(t,"anchorElement",7,null),o=y(t,"staticPosition",7,!1),v=y(t,"class",7,""),_=y(t,"children",7),b=y(t,"onmouseenter",7),A=y(t,"onmouseleave",7),m=y(t,"onfocusin",7),w=y(t,"onfocusout",7);const q=$r(en()+2);tn(q);const V=an(q),F=8,i=4;let p=oe(null),k=oe(""),P=oe(void 0);const U=E(()=>c()==="bottom-right"||c()==="bottom-left"),K=E(()=>c()==="top"),ne=E(()=>o()?"relative":u()?"absolute":"fixed"),Le=E(()=>c()==="right"?{x:-4,y:0}:c()==="bottom"?{x:4,y:0}:e(K)?{x:0,y:4}:{x:0,y:-4});function le(h,g,J){return Math.max(g,Math.min(J,h))}let ie=null,ge=null;function _e(){return!ie?.isConnected||ge!==d()?!1:ie.style.getPropertyValue("anchor-name").includes(d())||getComputedStyle(ie).getPropertyValue("anchor-name").includes(d())}function Ge(){return s()?s():(_e()||(ie=Array.from(document.querySelectorAll('[style*="anchor-name"]')).find(h=>{const g=h.style.getPropertyValue("anchor-name"),J=getComputedStyle(h).getPropertyValue("anchor-name");return g.includes(d())||J.includes(d())})??null,ge=ie?d():null),ie)}function I(){if(o()||u()||!e(p))return;const h=Ge();if(!h)return;const g=h.getBoundingClientRect(),J=e(p).getBoundingClientRect(),D=window.innerWidth||document.documentElement.clientWidth,ae=window.innerHeight||document.documentElement.clientHeight,ue=J.width||e(p).offsetWidth,j=J.height||e(p).offsetHeight,Ie=Math.max(0,g.top-i-F),Fe=Math.max(0,ae-g.bottom-i-F),De=e(K)?!(Ie<j&&Fe>Ie):e(U)&&Fe<j&&Ie>Fe;let l=g.left,M=g.bottom+i,L=De?Ie:Fe;if(c()==="right"){const Q=g.left-i-F,ye=D-g.right-i-F;l=ye>=ue||ye>=Q?g.right+i:g.left-ue-i,M=g.top,L=Math.max(0,ae-F*2)}else c()==="bottom"?(l=g.left-ue-i,M=g.bottom-j):(e(K)||e(U))&&(c()==="bottom-left"?l=g.right-ue:e(K)&&(l=g.left+g.width/2-ue/2),M=De?g.top-Math.min(j,L)-i:g.bottom+i);l=le(l,F,Math.max(F,D-ue-F)),M=le(M,F,Math.max(F,ae-Math.min(j,L)-F)),O(P,`${L}px`),O(k,`left: ${l}px; top: ${M}px;`)}let ee=!1;async function Re(){ee||(ee=!0,await ja(),ee=!1,I())}let ve=null;function ce(){ve||(ve=Xr(()=>{ve=null,I()}))}function ke(h){const g=s()??(_e()?ie:null);g&&h.target instanceof Node&&!h.target.contains(g)||ce()}yt(()=>{const h=e(p),g=s();o()||u()||!h||!g||Re()}),ya(()=>{if(o())return;let h=null;return Re().then(()=>{if(!u()&&typeof ResizeObserver<"u"){h=new ResizeObserver(ce),e(p)&&h.observe(e(p));const g=Ge();g&&h.observe(g)}}),window.addEventListener("resize",ce),window.addEventListener("scroll",ke,!0),()=>{h?.disconnect(),window.removeEventListener("resize",ce),window.removeEventListener("scroll",ke,!0),ve?.(),ve=null}});var We={get id(){return r()},set id(h){r(h),x()},get anchor(){return d()},set anchor(h){d(h),x()},get position(){return c()},set position(h="right"){c(h),x()},get absolute(){return u()},set absolute(h=!1){u(h),x()},get anchorElement(){return s()},set anchorElement(h=null){s(h),x()},get staticPosition(){return o()},set staticPosition(h=!1){o(h),x()},get class(){return v()},set class(h=""){v(h),x()},get children(){return _()},set children(h){_(h),x()},get onmouseenter(){return b()},set onmouseenter(h){b(h),x()},get onmouseleave(){return A()},set onmouseleave(h){A(h),x()},get onfocusin(){return m()},set onfocusin(h){m(h),x()},get onfocusout(){return w()},set onfocusout(h){w(h),x()},$set:nt,$on:(h,g)=>st(t,h,g)},de=xt(),Ze=Ee(de);{var Te=h=>{var g=Sn(),J=N(g);Rt(J,()=>_()??Ot),T(g),at(g,D=>O(p,D),()=>e(p)),X(()=>{$(g,"id",r()),Pe(g,1,e(ne)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${V} `+v()),$(g,"data-surface-level",q)}),W(h,g)},se=h=>{var g=pa();let J;var D=N(g);Rt(D,()=>_()??Ot),T(g),at(g,ae=>O(p,ae),()=>e(p)),X(()=>{$(g,"id",r()),Pe(g,1,e(ne)+` z-50 w-64 flex flex-col border border-border pointer-events-none ${V} `+v()),$(g,"data-surface-level",q),J=pt(g,"",J,{"position-anchor":d(),right:c()==="bottom"?"anchor(left)":void 0,left:c()==="right"?"anchor(right)":e(U)?"anchor(left)":e(K)?"anchor(center)":void 0,top:c()==="right"?"anchor(top)":e(U)?"anchor(bottom)":void 0,bottom:c()==="bottom"?"anchor(bottom)":e(K)?"anchor(top)":void 0,"margin-right":c()==="bottom"?"8px":void 0,"margin-left":c()==="right"?"8px":void 0,"margin-top":e(U)?"4px":void 0,"margin-bottom":e(K)?"4px":void 0,translate:e(K)?"-50% 0":void 0})}),Be("mouseenter",g,function(...ae){b()?.apply(this,ae)}),Be("mouseleave",g,function(...ae){A()?.apply(this,ae)}),Se("focusin",g,function(...ae){m()?.apply(this,ae)}),Se("focusout",g,function(...ae){w()?.apply(this,ae)}),Ct(1,g,()=>$t,()=>({tier:"fast",...e(Le),scale:.96})),Ct(2,g,()=>ea,()=>({tier:"fast"})),W(h,g)},qe=h=>{br(h,{zIndex:50,children:(g,J)=>{var D=pa();let ae;var ue=N(D);Rt(ue,()=>_()??Ot),T(D),at(D,j=>O(p,j),()=>e(p)),X(()=>{$(D,"id",r()),Pe(D,1,e(ne)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${V} `+v()),$(D,"data-surface-level",q),ae=pt(D,e(k),ae,{"max-height":e(P)})}),Be("mouseenter",D,function(...j){b()?.apply(this,j)}),Be("mouseleave",D,function(...j){A()?.apply(this,j)}),Se("focusin",D,function(...j){m()?.apply(this,j)}),Se("focusout",D,function(...j){w()?.apply(this,j)}),Ct(1,D,()=>$t,()=>({tier:"fast",...e(Le),scale:.96})),Ct(2,D,()=>ea,()=>({tier:"fast"})),W(g,D)},$$slots:{default:!0}})};re(Ze,h=>{o()?h(Te):u()?h(se,1):h(qe,-1)})}return W(a,de),it(We)}xa(["focusin","focusout"]);function kt(a,t){return t||/^(?:https?:|data:|blob:|workspace-asset:)/i.test(a.trim())}function En(a,t){if(t||!a)return a;const r=document.createElement("template");r.innerHTML=a;for(const d of r.content.querySelectorAll("img, video")){const c=d.getAttribute("src")||d.getAttribute("data-media-src")||"",u=[...d.querySelectorAll("source")];if(!kt(c,!1)||u.some(o=>!kt(o.getAttribute("src")||"",!1))){const o=document.createElement("img");o.setAttribute("alt",d.getAttribute("alt")||d.getAttribute("data-name")||""),o.setAttribute("data-media-unavailable","node-owned"),d.replaceWith(o);continue}d.removeAttribute("srcset");const s=d.getAttribute("poster");s&&!kt(s,!1)&&d.removeAttribute("poster")}return r.innerHTML}const Pn=[/(^|[^\\])\$(?!\$)(?=\S)(?:\\.|[^\\$\n])+?\$(?!\$)/,/(^|[^\\])\\\((?:\\.|[^\\\n])*?\\\)/,/^(?: {0,3})(?:\$\$|\\\[)/m,/^\s*[-*]\s*\[[ x]\]/m,/```/,/`[^`]+`/,/\|.*\|/,/\[.*\]\(.*\)/,/!\[.*\]\(.*\)/,/<[a-z][\s\S]*>/i,/^#{1,6}\s/m,/^\s*>\s/m,/\*\*[^*]+\*\*/,/\*[^*]+\*/,/_[^_]+_/,/~~[^~]+~~/,/^[-*_]{3,}\s*$/m,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m];function Tn(a){return a&&(Pn.some(t=>t.test(a))||or(a,"markdown"))?"static":"simple"}var Fn=B("<!> <!>",1);function Ta(a,t){if(new.target)return rt({component:Ta,...a});ot(t,!0);let r=y(t,"workspaceId",7),d=y(t,"canUseMedia",7),c=oe(null),u=oe(null),s=oe(!1),o=oe(!1);function v(k){O(c,{url:k.getAttribute("src")||"",name:k.getAttribute("alt")||void 0,opener:k},!0),O(s,!0)}function _(k){const P=na(k.getAttribute("href")||"",r());return P&&d()(P)?(O(c,{url:P,name:k.textContent?.trim()||void 0,opener:k,assetLink:!0},!0),O(s,!0),!0):b(k)}function b(k){const P=_t(k.getAttribute("href")||"",r());return!P||!d()(P.url)?!1:(O(u,{url:P.url,mimeType:P.mimeType,name:k.textContent?.trim()||void 0,opener:k},!0),O(o,!0),!0)}yt(()=>{e(u)&&!_t(e(u).url,r())&&(O(o,!1),O(u,null)),e(c)?.assetLink&&!na(e(c).url,r())&&(O(s,!1),O(c,null))});var A={openImage:v,openAsset:_,get workspaceId(){return r()},set workspaceId(k){r(k),x()},get canUseMedia(){return d()},set canUseMedia(k){d(k),x()},$set:nt,$on:(k,P)=>st(t,k,P)},m=Fn(),w=Ee(m);{var q=k=>{ur(k,{get imageUrl(){return e(c).url},get imageName(){return e(c).name},get openerElement(){return e(c).opener},showActionsMenu:!0,get open(){return e(s)},set open(P){O(s,P,!0)}})},V=E(()=>e(c)&&d()(e(c).url));re(w,k=>{e(V)&&k(q)})}var F=z(w,2);{var i=k=>{Ia(k,{get videoUrl(){return e(u).url},get videoName(){return e(u).name},get mimeType(){return e(u).mimeType},sourceKind:"workspace",get openerElement(){return e(u).opener},get open(){return e(o)},set open(P){O(o,P,!0)}})},p=E(()=>e(u)&&_t(e(u).url,r())&&d()(e(u).url));re(F,k=>{e(p)&&k(i)})}return W(a,m),it(A)}var Ln=B('<div class="flex items-center gap-2"><!> <!></div>'),Wn=Ga('<svg viewBox="0 0 24 24" class="size-10" fill="none"><rect x="3" y="5" width="18" height="14" rx="2" stroke="currentColor"></rect><path d="m10 9 5 3-5 3V9Z" fill="currentColor"></path></svg>'),Nn=B('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><!></div> <video preload="metadata" playsinline="" tabindex="-1" aria-hidden="true"></video> <span class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20 motion-reduce:transition-none forced-colors:bg-transparent" aria-hidden="true"><span><svg viewBox="0 0 20 20" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),Hn=B("<div><!> <!></div>"),On=B('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function Fa(a,t){if(new.target)return rt({component:Fa,...a});ot(t,!0);let r=y(t,"source",7),d=y(t,"name",23,()=>C.chat_videoBlock_fromAgent_label()),c=y(t,"poster",7),u=y(t,"allowFileMedia",7,!0),s=y(t,"canOpenFile",7),o=y(t,"fluid",7,!1),v=y(t,"compact",7,!1),_=y(t,"compactPreview",7),b=oe(!1),A=oe(!1),m=oe(!1),w=oe(null);const q=E(()=>r().kind==="inline"?`data:${r().mimeType};base64,${r().data}`:r().url);function V(I){return kt(I,u()&&s()?.()!==!1)}const F=E(()=>!V(e(q))),i=E(()=>At(e(q))),p=E(()=>{if(!(!c()||!V(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const I=new URL(c());return(I.protocol==="https:"||I.protocol==="workspace-file:")&&!I.username&&!I.password?c():void 0}catch{return}}});function k(){O(A,!0),O(m,!1)}var P={get source(){return r()},set source(I){r(I),x()},get name(){return d()},set name(I=C.chat_videoBlock_fromAgent_label()){d(I),x()},get poster(){return c()},set poster(I){c(I),x()},get allowFileMedia(){return u()},set allowFileMedia(I=!0){u(I),x()},get canOpenFile(){return s()},set canOpenFile(I){s(I),x()},get fluid(){return o()},set fluid(I=!1){o(I),x()},get compact(){return v()},set compact(I=!1){v(I),x()},get compactPreview(){return _()},set compactPreview(I){_(I),x()},$set:nt,$on:(I,ee)=>st(t,I,ee)},U=On(),K=Ee(U);let ne;var Le=N(K);{var le=I=>{Vt(I,{get name(){return d()},reason:"load-failed"})},ie=I=>{var ee=Ln(),Re=N(ee);{let ce=E(()=>e(i)?.path),ke=E(()=>e(i)?.workspaceId);Vt(Re,{get name(){return d()},reason:"load-failed",get path(){return e(ce)},get workspaceId(){return e(ke)}})}var ve=z(Re,2);Kt(ve,{get videoUrl(){return e(q)},get videoName(){return d()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType}}),T(ee),W(I,ee)},ge=I=>{var ee=Hn();let Re;var ve=N(ee);{let We=E(()=>C.chat_videoBlock_play_ariaLabel({name:d()}));jt(ve,{wrapContent:!1,type:"button",variant:"ghost",size:"default",class:"relative block size-full cursor-pointer overflow-hidden rounded-lg border border-border bg-muted/40 p-0 shadow-(--elevation-raised) focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 forced-colors:border",get"aria-label"(){return e(We)},"data-testid":"chat-video-snapshot",onclick:()=>{V(e(q))&&O(b,!0)},get ref(){return e(w)},set ref(de){O(w,de,!0)},children:(de,Ze)=>{var Te=xt(),se=Ee(Te);{var qe=g=>{var J=xt(),D=Ee(J);Rt(D,_),W(g,J)},h=g=>{var J=Nn(),D=Ee(J),ae=N(D);{var ue=l=>{var M=Wn();W(l,M)};re(ae,l=>{o()||l(ue)})}T(D);var j=z(D,2);j.muted=!0;var Ie=z(j,2),Fe=N(Ie),De=me(Fe);T(Ie),X(()=>{$(j,"src",e(q)),$(j,"poster",e(p)),Pe(j,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${e(p)||e(A)&&!e(m)?"opacity-100":"opacity-0"}`),Pe(Fe,1,`flex ${v()?"size-6":"size-11"} shrink-0 aspect-square items-center justify-center rounded-full border border-white/70 bg-black/60 text-white shadow-(--elevation-raised) forced-colors:border forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]`),Pe(De,0,`ml-0.5 ${v()?"size-3":"size-5"}`)}),Be("loadeddata",j,k),Be("error",j,()=>O(m,!0)),W(g,J)};re(se,g=>{_()?g(qe):g(h,-1)})}W(de,Te)},$$slots:{default:!0}})}var ce=z(ve,2);{var ke=We=>{Kt(We,{get videoUrl(){return e(q)},get videoName(){return d()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},triggerClass:"absolute right-1.5 top-1.5 opacity-0 transition-opacity focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"})};re(ce,We=>{_()||We(ke)})}T(ee),X(()=>{Pe(ee,1,`group relative aspect-video w-full max-w-2xl ${o()?"max-h-72":"max-h-40"}`),Re=pt(ee,"",Re,{height:_()?"100%":void 0,width:o()?"min(100%, calc(18rem * 16 / 9))":"min(100%, calc(10rem * 16 / 9))"})}),W(I,ee)};re(Le,I=>{e(F)?I(le):e(m)?I(ie,1):I(ge,-1)})}T(K);var _e=z(K,2);{var Ge=I=>{Ia(I,{get videoUrl(){return e(q)},get videoName(){return d()},get poster(){return e(p)},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},get openerElement(){return e(w)},get open(){return e(b)},set open(ee){O(b,ee,!0)}})};re(_e,I=>{!e(m)&&!e(F)&&I(Ge)})}return X(()=>ne=pt(K,"",ne,{height:_()?"100%":void 0})),W(a,U),it(P)}const qn=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,Dn=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ma(a,t){if(typeof a!="string"||!a||a!==a.trim())return null;if(a.startsWith("workspace-asset://"))return _t(a,t);if(a.startsWith("workspace-file://")){const d=At(a);if(!d||d.workspaceId!==t)return null;const c=Sa(a);return c?la(c,t):null}const r=a.startsWith("intent://")?a:`intent://local/file/${a}`;return la(r,t)}function zn(a,t){if(a.startsWith("workspace-file://")){const r=At(a);if(!r||r.workspaceId!==t)return!1;const d=Sa(a);return!!d&&!!Et(d,t)}return!!Et(a,t,{readOnly:!0})}function Un(a,t){return(t===0||!a[t-1].trim())&&(t===a.length-1||!a[t+1].trim())}function Bn(a,t,r){const d=r[0];return a.findIndex((c,u)=>{if(u<=t)return!1;const s=c.trim();return s.length>=r.length&&s.split("").every(o=>o===d)})}function Vn(a,t){const r=a.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/ufCEqIju.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/O1QHAURn.js","/app/immutable/chunks/BBDxUL80.js","/app/immutable/chunks/haHmm526.js","/app/immutable/chunks/BkT9o_nd.js","/app/immutable/chunks/CAyg2ijY.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/DNqM68dO.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BUzdsYyD.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CovkQMd0.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/CR_t_AVn.js","/app/immutable/chunks/C2mPABxH.js","/app/immutable/chunks/4kJJ0Qm4.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BV0i7JjW.js","/app/immutable/chunks/BH3LKWph.js","/app/immutable/chunks/DV9nY0bt.js","/app/immutable/chunks/CWDPeeaf.js","/app/immutable/chunks/B0f-om7y.js","/app/immutable/chunks/BgCTNfXj.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/CqO6BKca.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BsieX9dN.js","/app/immutable/assets/observe-overflow.CbDLK6fN.css","/app/immutable/chunks/BViMgwIT.js","/app/immutable/chunks/DEEBY1o3.js","/app/immutable/chunks/CQkmEJ54.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/BeP4UORy.js","/app/immutable/chunks/CerLhVOI.js","/app/immutable/chunks/B1mZq3ve.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/DwupWOJr.js","/app/immutable/chunks/Drd3_KgI.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/B6kyqBFl.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/B8g9F0km.js","/app/immutable/chunks/VZEkDWIM.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/xEfOpOba.js","/app/immutable/chunks/RoOfSbrC.js","/app/immutable/chunks/Csj7SEat.js","/app/immutable/chunks/DrbtWgvN.js","/app/immutable/chunks/BVs4aETe.js","/app/immutable/chunks/BgLcfABG.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/Bq5sL6M1.js","/app/immutable/chunks/B68RgPt4.js","/app/immutable/chunks/BXU9MHXS.js","/app/immutable/chunks/BoeEuXNl.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/D6a7EVHj.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css","/app/immutable/chunks/C-4sX4WB.js","/app/immutable/chunks/DZshGt8n.js","/app/immutable/chunks/B6-zId45.js","/app/immutable/chunks/BV3MrUXO.js","/app/immutable/chunks/DRjQ_WEk.js","/app/immutable/chunks/81iikGfb.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/lkH5RFQO.js","/app/immutable/chunks/DlwwHsb5.js","/app/immutable/assets/AttachmentPreview.BCSCCZGm.css","/app/immutable/assets/DiagramPresentation.Bfi3xHm0.css","/app/immutable/chunks/DLmrG3a0.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css"])))=>i.map(i=>d[i]);
2
+ var Ua=Object.defineProperty;var Ba=(a,t,r)=>t in a?Ua(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var dt=(a,t,r)=>Ba(a,typeof t!="symbol"?t+"":t,r);import{bp as C,t as rt,br as y,a_ as re,bz as nt,b as st,bt as Va,bv as Jt,_ as ka}from"./O1QHAURn.js";import{bs as ot,a5 as N,aD as e,bA as T,b_ as X,W,bn as it,c9 as E,aA as x,aB as B,ca as yt,bk as ya,c6 as Ka,cd as Ht,bV as oe,bS as z,ay as Ee,bl as me,bO as be,ai as xa,a7 as xt,c0 as ja,bf as Ot,bH as O,aw as Be,aj as Se,aC as Ga,c3 as ft,bb as St,aF as Ya,br as Za,bj as Ja}from"./DYhIMPy1.js";import{j as Qa,l as Xa,v as Pe,w as pt,u as $,g as tt,n as Ut,p as $a}from"./CAyg2ijY.js";import{aO as er,cY as tr,M as ar,aw as rr,dm as nr,W as sr,dr as Aa,C as or,a0 as ir}from"./VZEkDWIM.js";import{t as Bt}from"./CWDPeeaf.js";import{a9 as cr,ao as lr,A as dr,n as ur,a5 as Ia,s as Vt,a4 as Kt,aJ as At,b5 as Ma,m as fr,aL as pr,b4 as mr}from"./81iikGfb.js";import{l as Qt}from"./F7t0kUrs.js";import{bV as gr,bS as vr,bT as Xt,aB as hr}from"./DrbtWgvN.js";import{t as ut,P as br}from"./DV9nY0bt.js";import{f as jt,bc as qt}from"./CR_t_AVn.js";import{t as Ve,v as wr,I as Ct,F as $t,c as ea}from"./BkT9o_nd.js";import{ry as Ca,Ix as we,mq as _r,fF as kr,nk as yr,ul as xr,a as Ar,vX as Ir,t0 as Mr,rg as Cr,g as Sr,be as ta,v2 as Rr,sH as Er,v4 as Pr}from"./DNqM68dO.js";import{c as Tr,l as bt}from"./ChTqQfQN.js";import{o as Fr}from"./D6a7EVHj.js";import{aN as Lr,aO as aa,by as Wr,ax as Nr,bx as Hr,aC as Or,c_ as qr,cO as Dr,F as wt,au as ra,bG as zr,bB as Ur}from"./B0f-om7y.js";import{l as Br}from"./BVs4aETe.js";import{p as Vr,c_ as _t,cZ as na,ao as Kr,d0 as Sa,a8 as Et,aE as Ra,aV as jr,aw as Gr,a7 as sa,r as Yr,aM as Zr,aR as Jr,F as Qr}from"./B6-zId45.js";import{s as Rt}from"./BBDxUL80.js";import{b as at}from"./BaIAhI85.js";import{s as Xr}from"./BsieX9dN.js";import{c as $r,u as en,s as tn,a as an}from"./DfxQWSVU.js";import{z as oa,x as ia}from"./ufCEqIju.js";import{g as ca}from"./haHmm526.js";import{n as la}from"./BV3MrUXO.js";const rn=new Set(["failed","blocked","needs_attention","in_progress"]),nn={failed:{visual:"icon",icon:Dr,className:"text-foreground"},blocked:{visual:"icon",icon:qr,className:"text-danger"},needs_attention:{visual:"icon",icon:Or,className:"text-warning-ink"},in_progress:{visual:"dot",icon:null,className:"workspace-status-color-active"},waiting:{visual:"icon",icon:Hr,className:"text-muted-foreground"},unread:{visual:"dot",icon:null,className:"workspace-status-color-unread"},not_started:{visual:"dot",icon:null,className:"text-muted-foreground/35"},idle:{visual:"dot",icon:null,className:"text-muted-foreground/35"},complete:{visual:"icon",icon:Nr,className:"text-success"},pr_queued:{visual:"icon",icon:Wr,className:"text-info"},pr_ready:{visual:"icon",icon:aa,className:"text-success"},pr_open:{visual:"icon",icon:aa,className:"text-info"},pr_merged:{visual:"icon",icon:Lr,className:"text-purple-500"}};function sn(a){switch(a){case"failed":return C.workspace_statusIcon_failed_label();case"blocked":return C.workspace_statusIcon_blocked_label();case"needs_attention":return C.workspace_statusIcon_needsAttention_label();case"in_progress":return C.workspace_statusIcon_inProgress_label();case"waiting":return C.workspace_taskStatus_waiting_label();case"unread":return C.layout_activeCard_unread_header();case"not_started":return C.workspace_statusIcon_notStarted_label();case"idle":return C.workspace_statusIcon_idle_label();case"complete":return C.workspace_statusIcon_complete_label();case"pr_queued":return C.workspace_statusIcon_prQueued_label();case"pr_ready":return C.workspace_statusIcon_prReady_label();case"pr_open":return C.workspace_statusIcon_prOpen_label();case"pr_merged":return C.workspace_statusIcon_prMerged_label()}}function on(a){const t=Ca(a.displayStatus)?a.displayStatus:"not_started";return rn.has(t)?t:a.attention==="unread"?"unread":a.waiting===!0?"waiting":t}function Ea(a){const t=a==="waiting"||a==="unread"||Ca(a)?a:"not_started",r=sn(t);return{state:t,...nn[t],label:r,tooltip:r,accessibleName:r}}var cn=B('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),ln=B("<span><!></span>");function Pa(a,t){if(new.target)return rt({component:Pa,...a});ot(t,!0);let r=y(t,"status",7),d=y(t,"size",7,14),c=y(t,"decorative",7,!1),u=y(t,"class",7);const s=E(()=>Ea(r()));var o={get status(){return r()},set status(m){r(m),x()},get size(){return d()},set size(m=14){d(m),x()},get decorative(){return c()},set decorative(m=!1){c(m),x()},get class(){return u()},set class(m){u(m),x()},$set:nt,$on:(m,w)=>st(t,m,w)},v=ln(),_=N(v);{var b=m=>{var w=cn();W(m,w)},A=m=>{wt(m,{get icon(){return e(s).icon},class:"size-full!"})};re(_,m=>{e(s).visual==="dot"?m(b):e(s).icon&&m(A,1)})}return T(v),X(m=>{Pe(v,1,m,"svelte-14zk5l0"),pt(v,`width: ${d()??""}px; height: ${d()??""}px;`),$(v,"role",c()?void 0:"img"),$(v,"aria-label",c()?void 0:e(s).accessibleName),$(v,"aria-hidden",c()?"true":void 0),$(v,"title",c()?void 0:e(s).tooltip),$(v,"data-workspace-status",e(s).state),$(v,"data-workspace-status-visual",e(s).visual),$(v,"data-workspace-status-icon",e(s).icon?.iconName)},[()=>Qa(Xa("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",e(s).className,u()))]),W(a,v),it(o)}const Gt=6e4,Yt=60*Gt,Zt=24*Yt,da=30*Zt;function dn(a,t=new Date){if(a==null)return null;const r=a instanceof Date?a:new Date(a),d=r.getTime(),c=t.getTime();if(!Number.isFinite(d)||!Number.isFinite(c))return null;const u=Math.max(0,c-d);let s;u<Gt?s="<1m":u<Yt?s=`${Ve(Math.floor(u/Gt))}m`:u<Zt?s=`${Ve(Math.floor(u/Yt))}h`:u<da?s=`${Ve(Math.floor(u/Zt))}d`:s=`${Ve(Math.floor(u/da))}mo`;const o=d>c?t:r,v=wr(o,{now:t});return v?{compact:s,accessible:v,dateTime:r.toISOString()}:null}var un=B('<div><div class="grid gap-0.5 px-5 pt-4"><div class="flex min-w-0 items-center justify-between gap-3"><!> <!></div> <!> <!></div> <div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><div class="grid" data-workspace-hover-card-activity=""><!></div> <div class="pull-requests grid" data-workspace-hover-card-pr-column=""><!></div></div></div>'),fn=B('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),pn=B('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),mn=B('<span class="row-span-2 flex h-(--text-caption-line-height) items-center" aria-hidden="true"><!></span><span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-agent-name=""> </span><time class="type-caption whitespace-nowrap text-muted-foreground" data-workspace-hover-card-agent-time=""> </time> <span class="agent-detail type-caption flex min-w-0 items-start gap-1.5 text-muted-foreground svelte-1vax087" data-workspace-hover-card-agent-detail=""><span class="min-w-0 truncate" data-workspace-hover-card-agent-context=""> </span><!></span>',1),ua=B('<div role="listitem"><!></div>'),gn=B('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),vn=B('<section class="activity min-w-0" data-workspace-hover-card-activity="" data-workspace-hover-card-agent-table=""><div class="-mx-2 grid gap-2" role="list"></div> <!></section>'),hn=B('<!> <span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-pr-title=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-status=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-number=""> </span>',1),bn=B('<div class="grid w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-sm px-2 py-0 text-left" data-workspace-hover-card-pr-row=""><!></div>'),wn=B('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),_n=B('<section class="pull-requests min-w-0" data-workspace-hover-card-pr-column=""><div class="-mx-2 grid min-w-0 gap-2" role="list" data-workspace-hover-card-pr-list=""></div> <!></section>'),kn=B('<div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><!> <!></div>',1),yn=B('<header data-workspace-hover-card-header=""><div class="min-w-0" data-workspace-hover-card-identity=""><div class="flex min-w-0 items-center justify-between gap-3"><h2 class="type-body min-w-0 truncate font-medium text-foreground" data-workspace-hover-card-title=""> </h2> <span class="type-caption flex shrink-0 items-center gap-1.5 text-muted-foreground" data-workspace-hover-card-status=""><span class="truncate" data-workspace-hover-card-status-label=""> </span><!></span></div> <div class="type-caption mt-0.5 min-w-0 truncate text-muted-foreground" data-workspace-hover-card-repo=""> </div> <!></div></header> <!>',1),xn=B('<section class="workspace-hover-card shrink-0 overflow-hidden rounded-md bg-background text-left text-foreground shadow-(--elevation-overlay) ring-1 ring-border svelte-1vax087" data-workspace-hover-card="" data-workspace-hover-card-layout="landscape"><!></section>');function An(a,t){if(new.target)return rt({component:An,...a});ot(t,!0);const r=()=>Jt(F,"$workspaceAgents$",c),d=()=>Jt(i,"$prMonitors$",c),[c,u]=Va(),s=Tr("WorkspaceHoverCard");let o=y(t,"workspace",7),v=y(t,"isLoading",7,!1),_=y(t,"activeAgentIds",23,()=>[]),b=y(t,"loadAgentSessions",7,!0),A=y(t,"onkeydown",7),m=y(t,"staticData",7,!1);const w=Ht("");function q(){return m()?Ht([]):er(w)}function V(){return m()?Ht([]):tr(w)}const F=q(),i=V();yt(()=>w.set(o()?.id??""));let p=oe(0);ya(()=>Qt.subscribe(()=>Ka(p)));let k=E(()=>o()?.agentSummary?.agentIds??[]),P=E(()=>(e(p),o()?Qt.getStreamingAgentIdsForWorkspace(o().id):[])),U=null,K=new Set;yt(()=>{if(!o()||!b())return;const l=String(o().id);U!==l&&(U=l,K=new Set);for(const M of new Set([...e(k).slice(0,6),..._(),...e(P)]))K.has(M)||(we.dispatch(_r(l,M)),K.add(M))});function ne(l){return[l.name,l.context,l.questionMeta?.accessible,l.updated.accessible].filter(Boolean).join(". ")}function Le(l){return l?l.kind==="attention"?l.attention.reason?.trim()||null:"text"in l&&l.text.trim()||null:null}function le(l){return dn(l.lastActivity||l.updatedAt||l.createdAt)??{compact:"—",accessible:C.workspace_hoverCard_noRecentActivity_label()}}function ie(l){const M=String(l.status).toLowerCase(),L=yr(l),Q=lr(l),ye=Q==="question"?gr(l):null,he=Le(rr.select(we.state,String(l.id)));let xe,Ne,Ae,n,f,H,S=!1;if(Q==="question"){xe="attention",Ne="question",Ae=ye?.questions[0]?.question.trim()||he||C.workspace_hoverCard_question_label(),n="question",f=1;const G=ye?.questions.length??0;G>1&&(H={compact:`${Ve(1)}/${Ve(G)}`,accessible:C.chat_questionWizard_stepCounter_label({current:1,total:G})})}else if(Q==="attention-discussion")xe="attention",Ne="discussion",Ae=L?.reason?.trim()||C.chat_agentCard_attentionDiscussion_label(),n="attention-discussion",f=1;else if(Q==="attention-blocker"||M==="blocked")xe="attention",Ne="blocker",Ae=L?.reason?.trim()||C.chat_agentCard_attentionBlocker_label(),n="attention-blocker",f=0;else if(l.hasUnread)xe="attention",Ne="unread",Ae=he||C.chat_newMessagesDivider_label(),S=!!he,n="unread",f=2;else if(l.isStreaming||l.isProcessing||_().includes(String(l.id))||e(P).includes(String(l.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(M))xe="active",Ae=he||C.workspace_devScripts_running_label(),S=!!he,n=l.isProcessing?"responding":"running",f=3;else if(["waiting","pending","queued","starting"].includes(M))xe="waiting",Ae=he||C.workspace_taskStatus_waiting_label(),S=!!he,n="waiting",f=4;else return null;const Y=l.agentMetadata??l.metadata;return{id:String(l.id),name:l.name?.trim()||C.workspace_fileChanges_agent_label(),group:xe,attentionKind:Ne,avatarState:n,specialist:Y?.specialist,context:Ae,questionMeta:H,contextIsPreview:S,updated:le(l),priority:f}}let ge=E(()=>{const l=o()?.agentSummary,M=new Map;if(Array.isArray(l?.agents))for(const L of l.agents)L&&typeof L=="object"&&typeof L.id=="string"&&M.set(L.id,L.parentAgentId);return r().filter(L=>{const Q=M.get(String(L.id));return!(kr(L)!=="topLevel"||typeof Q=="string"&&Q||L.pendingDeleteAt||L.retiredAt||String(L.status).toLowerCase()==="deleted")})}),_e=E(()=>e(ge).map(ie).filter(l=>l!==null).sort((l,M)=>l.priority-M.priority)),Ge=E(()=>e(_e).slice(0,6)),I=E(()=>Math.max(0,e(_e).length-6)),ee=E(()=>o()?.repositoryName?o().repositoryOwner?`${o().repositoryOwner} / ${o().repositoryName}`:o().repositoryName:C.workspace_hoverCard_localRepository_label()),Re=E(()=>on(o()??{})),ve=E(()=>Ea(e(Re))),ce=E(()=>o()?.statusMessage?.trim()||"");function ke(l){if(!l)return null;const M=l.activePullRequest??l.pullRequests?.[0]??null;return M||(l.prStatus?{id:`legacy-pr-${l.prNumber??"workspace"}`,number:l.prNumber??0,url:l.prUrl??"",title:C.workspace_hoverCard_pullRequest_label(),status:l.prStatus,createdAt:l.updatedAt,updatedAt:l.updatedAt}:null)}let We=E(()=>o()?m()?ke(o()):nr.select(we.state,o().id)??ke(o()):null),de=E(()=>{if(!o()||ar(o()))return[];const l=o().repositoryOwner&&o().repositoryName?`${o().repositoryOwner}/${o().repositoryName}`:void 0;return cr({workspacePRs:o().pullRequests,activePR:e(We),monitors:d(),workspaceRepo:l,buildPrUrl:(M,L)=>Vr(M,o().repositoryOwner,o().repositoryName,L),getDisplayTitle:M=>M.title})}),Ze=E(()=>e(de).slice(0,3)),Te=E(()=>Math.max(0,e(de).length-3)),se=E(()=>e(_e).length>0),qe=E(()=>e(de).length>0),h=E(()=>e(se)||e(qe));function g(l){const M=l.resource?.repository.provider==="gitlab"?`${l.repo} !${l.number}`:l.repo?C.workspace_card_prBadge_repoLine_tooltip({repo:l.repo,number:l.number}):C.workspace_card_prBadge_label({number:` #${l.number}`});return[sr(M,l),l.title,l.details].filter(Boolean).join(`
3
+ `)}function J(l,M){if(l.stopPropagation(),!o()||!b())return;const L=o().id;Br.select(we.state)!==L&&Fr(L).catch(Q=>{s.warn("Failed to switch workspace for hover-card agent",{agentId:M,error:Q})}),we.dispatch(xr(L,{agentId:M}))}function D(l,M){if(l.stopPropagation(),!o()||!M.url)return;const L=o().id;ka(async()=>{const{handleLink:Q}=await import("./ufCEqIju.js").then(ye=>ye.H);return{handleLink:Q}},__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,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]),import.meta.url).then(({handleLink:Q})=>Q(M.url,{workspaceId:L,event:l}))}var ae={get workspace(){return o()},set workspace(l){o(l),x()},get isLoading(){return v()},set isLoading(l=!1){v(l),x()},get activeAgentIds(){return _()},set activeAgentIds(l=[]){_(l),x()},get loadAgentSessions(){return b()},set loadAgentSessions(l=!0){b(l),x()},get onkeydown(){return A()},set onkeydown(l){A(l),x()},get staticData(){return m()},set staticData(l=!1){m(l),x()},$set:nt,$on:(l,M)=>st(t,l,M)},ue=xn(),j=N(ue);{var Ie=l=>{var M=un(),L=N(M),Q=N(L),ye=N(Q);ut(ye,{class:"h-7 min-w-0 max-w-64 flex-1"});var he=z(ye,2);ut(he,{class:"h-5 w-20 shrink-0"}),T(Q);var xe=z(Q,2);ut(xe,{class:"h-4 w-40"});var Ne=z(xe,2);ut(Ne,{class:"mt-2 h-10 w-full"}),T(L);var Ae=z(L,4),n=N(Ae),f=N(n);ut(f,{class:"h-10 w-full"}),T(n);var H=z(n,2),S=N(H);ut(S,{class:"h-10 w-full"}),T(H),T(Ae),T(M),W(l,M)},Fe=l=>{var M=yn(),L=Ee(M);let Q;var ye=N(L),he=N(ye),xe=N(he),Ne=me(xe,!0),Ae=z(xe,2),n=N(Ae),f=me(n,!0),H=z(n);Pa(H,{get status(){return e(Re)},size:16,decorative:!0}),T(Ae),T(he);var S=z(he,2),Y=me(S,!0),G=z(S,2);{var te=pe=>{var ze=fn(),It=me(ze,!0);tt(ze,(Mt,Pt)=>Bt?.(Mt,Pt),()=>e(ce)),X(()=>be(It,e(ce))),W(pe,ze)};re(G,pe=>{e(ce)&&pe(te)})}T(ye),T(L);var He=z(L,2);{var fe=pe=>{var ze=kn(),It=z(Ee(ze),2),Mt=N(It);{var Pt=Je=>{var Ke=vn(),Ye=N(Ke);Ut(Ye,21,()=>e(Ge),Z=>Z.id,(Z,R)=>{var Me=ua(),Qe=N(Me);{let Xe=E(()=>ne(e(R)));jt(Qe,{variant:"plain",wrapContent:!1,class:"grid h-auto! min-h-8 w-full min-w-0 cursor-pointer grid-cols-[1rem_minmax(0,1fr)_auto] items-start justify-normal gap-x-2 gap-y-0 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Xe)},"data-workspace-hover-card-agent-row":!0,get"data-agent-group-row"(){return e(R).group},get"data-attention-kind"(){return e(R).attentionKind},get onkeydown(){return A()},onclick:je=>J(je,e(R).id),children:(je,mt)=>{var Oe=mn(),Ce=Ee(Oe),Ue=N(Ce);{let et=E(()=>e(R).specialist??null);dr(Ue,{get agentId(){return e(R).id},variant:"compact",get state(){return e(R).avatarState},get specialist(){return e(et)}})}T(Ce);var ct=z(Ce),Lt=me(ct,!0),$e=z(ct),Wt=me($e,!0),gt=z($e,2),vt=N(gt),Nt=me(vt,!0);tt(vt,(et,lt)=>Bt?.(et,lt),()=>e(R).context);var Oa=z(vt);{var qa=et=>{var lt=pn(),Da=N(lt),za=me(Da,!0);T(lt),X(()=>{$(lt,"aria-label",e(R).questionMeta.accessible),be(za,e(R).questionMeta.compact)}),W(et,lt)};re(Oa,et=>{e(R).questionMeta&&et(qa)})}T(gt),X(()=>{be(Lt,e(R).name),$($e,"datetime",e(R).updated.dateTime),$($e,"aria-label",e(R).updated.accessible),be(Wt,e(R).updated.compact),$(gt,"data-workspace-hover-card-agent-preview",e(R).contextIsPreview||void 0),be(Nt,e(R).context)}),W(je,Oe)},$$slots:{default:!0}})}T(Me),W(Z,Me)}),T(Ye);var Tt=z(Ye,2);{var Ft=Z=>{var R=gn(),Me=N(R),Qe=me(Me,!0),Xe=z(Me,2);wt(Xe,{get icon(){return ra},size:10}),T(R),X(je=>be(Qe,je),[()=>C.workspace_hoverCard_moreAgents_label({count:Ve(e(I))})]),W(Z,R)};re(Tt,Z=>{e(I)&&Z(Ft)})}T(Ke),X(Z=>$(Ke,"aria-label",Z),[()=>C.workspace_multiSelectSidebar_agentsTab_label()]),W(Je,Ke)};re(Mt,Je=>{e(se)&&Je(Pt)})}var Na=z(Mt,2);{var Ha=Je=>{var Ke=_n(),Ye=N(Ke);Ut(Ye,21,()=>e(Ze),Z=>Z.identity,(Z,R)=>{var Me=ua();{const mt=Oe=>{var Ce=hn(),Ue=Ee(Ce);wt(Ue,{get icon(){return e(R).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${e(R).foregroundClass??""}`}});var ct=z(Ue,2),Lt=me(ct,!0),$e=z(ct,2),Wt=me($e,!0),gt=z($e,2),vt=me(gt,!0);X(Nt=>{be(Lt,Nt),be(Wt,e(R).accessibleStateLabel),be(vt,e(R).numberLabel??`#${e(R).number}`)},[()=>e(R).title||(e(R).resource?.repository.provider==="gitlab"?C.workspace_hoverCard_mergeRequest_label():C.workspace_hoverCard_pullRequest_label())]),W(Oe,Ce)};var Qe=N(Me);{var Xe=Oe=>{{let Ce=E(()=>g(e(R)));jt(Oe,{variant:"plain",wrapContent:!1,class:"grid h-auto! w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center justify-normal gap-x-2 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Ce)},"data-workspace-hover-card-pr-row":!0,get"data-pr-identity"(){return e(R).identity},get"data-pr-status"(){return e(R).status},get onkeydown(){return A()},onclick:Ue=>D(Ue,e(R)),children:(Ue,ct)=>{mt(Ue)},$$slots:{default:!0}})}},je=Oe=>{var Ce=bn(),Ue=N(Ce);mt(Ue),T(Ce),X(()=>{$(Ce,"data-pr-identity",e(R).identity),$(Ce,"data-pr-status",e(R).status)}),W(Oe,Ce)};re(Qe,Oe=>{e(R).url?Oe(Xe):Oe(je,-1)})}T(Me)}X(mt=>$(Me,"aria-label",mt),[()=>e(R).url?void 0:g(e(R))]),W(Z,Me)}),T(Ye);var Tt=z(Ye,2);{var Ft=Z=>{var R=wn(),Me=N(R),Qe=me(Me,!0),Xe=z(Me,2);wt(Xe,{get icon(){return ra},size:10}),T(R),X(je=>be(Qe,je),[()=>C.workspace_hoverCard_moreItems_label({count:Ve(e(Te))})]),W(Z,R)};re(Tt,Z=>{e(Te)&&Z(Ft)})}T(Ke),X((Z,R)=>{$(Ke,"aria-label",Z),$(Ye,"aria-label",R)},[()=>e(de).every(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_mergeRequests_label():e(de).some(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_reviews_label():C.workspace_hoverCard_pullRequests_label(),()=>e(de).every(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_mergeRequests_label():e(de).some(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_reviews_label():C.workspace_hoverCard_pullRequests_label()]),W(Je,Ke)};re(Na,Je=>{e(qe)&&Je(Ha)})}T(It),W(pe,ze)};re(He,pe=>{e(h)&&pe(fe)})}X(pe=>{Q=Pe(L,1,"min-w-0 px-5 pt-4",null,Q,{"pb-4":!e(h)}),be(Ne,pe),be(f,e(ve).label),be(Y,e(ee))},[()=>o().title||C.workspace_links_untitled_label()]),W(l,M)};re(j,l=>{v()||!o()?l(Ie):l(Fe,-1)})}T(ue),W(a,ue);var De=it(ae);return u(),De}const fa=800,Rs=175,In=300;function Mn(){let a=0,t=null;const r=new Set,d=new Set;function c(){return a>0||t!==null?0:fa}function u(){const o=c();r.forEach(v=>v(o))}function s(){t!==null&&(clearTimeout(t),t=null)}return{get currentOpenDelay(){return c()},subscribe(o){return r.add(o),o(c()),()=>r.delete(o)},notifyOpened(){const o=a===0&&t===null;s(),a+=1,o&&u()},notifyClosed(){a!==0&&(a-=1,!(a>0)&&(s(),t=setTimeout(()=>{t=null,u()},In)))},deferClose(o){return d.add(o),()=>d.delete(o)},settleDeferredCloses(){const o=[...d];d.clear(),o.forEach(v=>v())},reset(){const o=c()!==fa;s(),a=0,d.clear(),o&&u()}}}const Es=Mn();function Dt(a){const t=Aa.select(we.state,a);return t!==void 0&&Cr(t)}function Cn(a,t){if(!Dt(a))return[];const r=vr.select(we.state,a),d=Xt.select(we.state,a),c=hr.select(we.state),u=[];for(let s=0;s<Ar;s+=1){const o=c[s],v=o&&o!==a?Aa.select(we.state,o):void 0;u.push({id:`assign-micro-key-${s+1}`,label:v?C.workspace_card_assignOccupiedMicroKey_label({number:Ve(s+1),title:v.title}):C.workspace_card_assignMicroKeyNumber_label({number:Ve(s+1)}),checked:r===s,closeOnSelect:!0,onClick:()=>{Dt(a)&&we.dispatch(Ir(s,a)),t()}})}return d!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:C.workspace_card_unassignMicroKey_label(),onClick:()=>{Dt(a)&&Xt.select(we.state,a)===d&&we.dispatch(Mr(d)),t()}})),u}function Ps(a,{connected:t,onClose:r}){if(!t)return[];const d=Cn(a,r);if(d.length===0)return[];const c=d.filter(s=>"id"in s&&s.id!=="unassign-micro-key"),u=d.find(s=>"id"in s&&s.id==="unassign-micro-key");return[{id:"assign-micro-key",label:C.workspace_card_assignMicroKey_label(),icon:zr,onClick:()=>{},selection:"single",submenu:c},...u?[u]:[]]}var Sn=B('<div data-static-position="" role="tooltip"><!></div>'),pa=B('<div role="tooltip"><!></div>');function Rn(a,t){if(new.target)return rt({component:Rn,...a});ot(t,!0);let r=y(t,"id",7),d=y(t,"anchor",7),c=y(t,"position",7,"right"),u=y(t,"absolute",7,!1),s=y(t,"anchorElement",7,null),o=y(t,"staticPosition",7,!1),v=y(t,"class",7,""),_=y(t,"children",7),b=y(t,"onmouseenter",7),A=y(t,"onmouseleave",7),m=y(t,"onfocusin",7),w=y(t,"onfocusout",7);const q=$r(en()+2);tn(q);const V=an(q),F=8,i=4;let p=oe(null),k=oe(""),P=oe(void 0);const U=E(()=>c()==="bottom-right"||c()==="bottom-left"),K=E(()=>c()==="top"),ne=E(()=>o()?"relative":u()?"absolute":"fixed"),Le=E(()=>c()==="right"?{x:-4,y:0}:c()==="bottom"?{x:4,y:0}:e(K)?{x:0,y:4}:{x:0,y:-4});function le(h,g,J){return Math.max(g,Math.min(J,h))}let ie=null,ge=null;function _e(){return!ie?.isConnected||ge!==d()?!1:ie.style.getPropertyValue("anchor-name").includes(d())||getComputedStyle(ie).getPropertyValue("anchor-name").includes(d())}function Ge(){return s()?s():(_e()||(ie=Array.from(document.querySelectorAll('[style*="anchor-name"]')).find(h=>{const g=h.style.getPropertyValue("anchor-name"),J=getComputedStyle(h).getPropertyValue("anchor-name");return g.includes(d())||J.includes(d())})??null,ge=ie?d():null),ie)}function I(){if(o()||u()||!e(p))return;const h=Ge();if(!h)return;const g=h.getBoundingClientRect(),J=e(p).getBoundingClientRect(),D=window.innerWidth||document.documentElement.clientWidth,ae=window.innerHeight||document.documentElement.clientHeight,ue=J.width||e(p).offsetWidth,j=J.height||e(p).offsetHeight,Ie=Math.max(0,g.top-i-F),Fe=Math.max(0,ae-g.bottom-i-F),De=e(K)?!(Ie<j&&Fe>Ie):e(U)&&Fe<j&&Ie>Fe;let l=g.left,M=g.bottom+i,L=De?Ie:Fe;if(c()==="right"){const Q=g.left-i-F,ye=D-g.right-i-F;l=ye>=ue||ye>=Q?g.right+i:g.left-ue-i,M=g.top,L=Math.max(0,ae-F*2)}else c()==="bottom"?(l=g.left-ue-i,M=g.bottom-j):(e(K)||e(U))&&(c()==="bottom-left"?l=g.right-ue:e(K)&&(l=g.left+g.width/2-ue/2),M=De?g.top-Math.min(j,L)-i:g.bottom+i);l=le(l,F,Math.max(F,D-ue-F)),M=le(M,F,Math.max(F,ae-Math.min(j,L)-F)),O(P,`${L}px`),O(k,`left: ${l}px; top: ${M}px;`)}let ee=!1;async function Re(){ee||(ee=!0,await ja(),ee=!1,I())}let ve=null;function ce(){ve||(ve=Xr(()=>{ve=null,I()}))}function ke(h){const g=s()??(_e()?ie:null);g&&h.target instanceof Node&&!h.target.contains(g)||ce()}yt(()=>{const h=e(p),g=s();o()||u()||!h||!g||Re()}),ya(()=>{if(o())return;let h=null;return Re().then(()=>{if(!u()&&typeof ResizeObserver<"u"){h=new ResizeObserver(ce),e(p)&&h.observe(e(p));const g=Ge();g&&h.observe(g)}}),window.addEventListener("resize",ce),window.addEventListener("scroll",ke,!0),()=>{h?.disconnect(),window.removeEventListener("resize",ce),window.removeEventListener("scroll",ke,!0),ve?.(),ve=null}});var We={get id(){return r()},set id(h){r(h),x()},get anchor(){return d()},set anchor(h){d(h),x()},get position(){return c()},set position(h="right"){c(h),x()},get absolute(){return u()},set absolute(h=!1){u(h),x()},get anchorElement(){return s()},set anchorElement(h=null){s(h),x()},get staticPosition(){return o()},set staticPosition(h=!1){o(h),x()},get class(){return v()},set class(h=""){v(h),x()},get children(){return _()},set children(h){_(h),x()},get onmouseenter(){return b()},set onmouseenter(h){b(h),x()},get onmouseleave(){return A()},set onmouseleave(h){A(h),x()},get onfocusin(){return m()},set onfocusin(h){m(h),x()},get onfocusout(){return w()},set onfocusout(h){w(h),x()},$set:nt,$on:(h,g)=>st(t,h,g)},de=xt(),Ze=Ee(de);{var Te=h=>{var g=Sn(),J=N(g);Rt(J,()=>_()??Ot),T(g),at(g,D=>O(p,D),()=>e(p)),X(()=>{$(g,"id",r()),Pe(g,1,e(ne)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${V} `+v()),$(g,"data-surface-level",q)}),W(h,g)},se=h=>{var g=pa();let J;var D=N(g);Rt(D,()=>_()??Ot),T(g),at(g,ae=>O(p,ae),()=>e(p)),X(()=>{$(g,"id",r()),Pe(g,1,e(ne)+` z-50 w-64 flex flex-col border border-border pointer-events-none ${V} `+v()),$(g,"data-surface-level",q),J=pt(g,"",J,{"position-anchor":d(),right:c()==="bottom"?"anchor(left)":void 0,left:c()==="right"?"anchor(right)":e(U)?"anchor(left)":e(K)?"anchor(center)":void 0,top:c()==="right"?"anchor(top)":e(U)?"anchor(bottom)":void 0,bottom:c()==="bottom"?"anchor(bottom)":e(K)?"anchor(top)":void 0,"margin-right":c()==="bottom"?"8px":void 0,"margin-left":c()==="right"?"8px":void 0,"margin-top":e(U)?"4px":void 0,"margin-bottom":e(K)?"4px":void 0,translate:e(K)?"-50% 0":void 0})}),Be("mouseenter",g,function(...ae){b()?.apply(this,ae)}),Be("mouseleave",g,function(...ae){A()?.apply(this,ae)}),Se("focusin",g,function(...ae){m()?.apply(this,ae)}),Se("focusout",g,function(...ae){w()?.apply(this,ae)}),Ct(1,g,()=>$t,()=>({tier:"fast",...e(Le),scale:.96})),Ct(2,g,()=>ea,()=>({tier:"fast"})),W(h,g)},qe=h=>{br(h,{zIndex:50,children:(g,J)=>{var D=pa();let ae;var ue=N(D);Rt(ue,()=>_()??Ot),T(D),at(D,j=>O(p,j),()=>e(p)),X(()=>{$(D,"id",r()),Pe(D,1,e(ne)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${V} `+v()),$(D,"data-surface-level",q),ae=pt(D,e(k),ae,{"max-height":e(P)})}),Be("mouseenter",D,function(...j){b()?.apply(this,j)}),Be("mouseleave",D,function(...j){A()?.apply(this,j)}),Se("focusin",D,function(...j){m()?.apply(this,j)}),Se("focusout",D,function(...j){w()?.apply(this,j)}),Ct(1,D,()=>$t,()=>({tier:"fast",...e(Le),scale:.96})),Ct(2,D,()=>ea,()=>({tier:"fast"})),W(g,D)},$$slots:{default:!0}})};re(Ze,h=>{o()?h(Te):u()?h(se,1):h(qe,-1)})}return W(a,de),it(We)}xa(["focusin","focusout"]);function kt(a,t){return t||/^(?:https?:|data:|blob:|workspace-asset:)/i.test(a.trim())}function En(a,t){if(t||!a)return a;const r=document.createElement("template");r.innerHTML=a;for(const d of r.content.querySelectorAll("img, video")){const c=d.getAttribute("src")||d.getAttribute("data-media-src")||"",u=[...d.querySelectorAll("source")];if(!kt(c,!1)||u.some(o=>!kt(o.getAttribute("src")||"",!1))){const o=document.createElement("img");o.setAttribute("alt",d.getAttribute("alt")||d.getAttribute("data-name")||""),o.setAttribute("data-media-unavailable","node-owned"),d.replaceWith(o);continue}d.removeAttribute("srcset");const s=d.getAttribute("poster");s&&!kt(s,!1)&&d.removeAttribute("poster")}return r.innerHTML}const Pn=[/(^|[^\\])\$(?!\$)(?=\S)(?:\\.|[^\\$\n])+?\$(?!\$)/,/(^|[^\\])\\\((?:\\.|[^\\\n])*?\\\)/,/^(?: {0,3})(?:\$\$|\\\[)/m,/^\s*[-*]\s*\[[ x]\]/m,/```/,/`[^`]+`/,/\|.*\|/,/\[.*\]\(.*\)/,/!\[.*\]\(.*\)/,/<[a-z][\s\S]*>/i,/^#{1,6}\s/m,/^\s*>\s/m,/\*\*[^*]+\*\*/,/\*[^*]+\*/,/_[^_]+_/,/~~[^~]+~~/,/^[-*_]{3,}\s*$/m,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m];function Tn(a){return a&&(Pn.some(t=>t.test(a))||or(a,"markdown"))?"static":"simple"}var Fn=B("<!> <!>",1);function Ta(a,t){if(new.target)return rt({component:Ta,...a});ot(t,!0);let r=y(t,"workspaceId",7),d=y(t,"canUseMedia",7),c=oe(null),u=oe(null),s=oe(!1),o=oe(!1);function v(k){O(c,{url:k.getAttribute("src")||"",name:k.getAttribute("alt")||void 0,opener:k},!0),O(s,!0)}function _(k){const P=na(k.getAttribute("href")||"",r());return P&&d()(P)?(O(c,{url:P,name:k.textContent?.trim()||void 0,opener:k,assetLink:!0},!0),O(s,!0),!0):b(k)}function b(k){const P=_t(k.getAttribute("href")||"",r());return!P||!d()(P.url)?!1:(O(u,{url:P.url,mimeType:P.mimeType,name:k.textContent?.trim()||void 0,opener:k},!0),O(o,!0),!0)}yt(()=>{e(u)&&!_t(e(u).url,r())&&(O(o,!1),O(u,null)),e(c)?.assetLink&&!na(e(c).url,r())&&(O(s,!1),O(c,null))});var A={openImage:v,openAsset:_,get workspaceId(){return r()},set workspaceId(k){r(k),x()},get canUseMedia(){return d()},set canUseMedia(k){d(k),x()},$set:nt,$on:(k,P)=>st(t,k,P)},m=Fn(),w=Ee(m);{var q=k=>{ur(k,{get imageUrl(){return e(c).url},get imageName(){return e(c).name},get openerElement(){return e(c).opener},showActionsMenu:!0,get open(){return e(s)},set open(P){O(s,P,!0)}})},V=E(()=>e(c)&&d()(e(c).url));re(w,k=>{e(V)&&k(q)})}var F=z(w,2);{var i=k=>{Ia(k,{get videoUrl(){return e(u).url},get videoName(){return e(u).name},get mimeType(){return e(u).mimeType},sourceKind:"workspace",get openerElement(){return e(u).opener},get open(){return e(o)},set open(P){O(o,P,!0)}})},p=E(()=>e(u)&&_t(e(u).url,r())&&d()(e(u).url));re(F,k=>{e(p)&&k(i)})}return W(a,m),it(A)}var Ln=B('<div class="flex items-center gap-2"><!> <!></div>'),Wn=Ga('<svg viewBox="0 0 24 24" class="size-10" fill="none"><rect x="3" y="5" width="18" height="14" rx="2" stroke="currentColor"></rect><path d="m10 9 5 3-5 3V9Z" fill="currentColor"></path></svg>'),Nn=B('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><!></div> <video preload="metadata" playsinline="" tabindex="-1" aria-hidden="true"></video> <span class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20 motion-reduce:transition-none forced-colors:bg-transparent" aria-hidden="true"><span><svg viewBox="0 0 20 20" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),Hn=B("<div><!> <!></div>"),On=B('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function Fa(a,t){if(new.target)return rt({component:Fa,...a});ot(t,!0);let r=y(t,"source",7),d=y(t,"name",23,()=>C.chat_videoBlock_fromAgent_label()),c=y(t,"poster",7),u=y(t,"allowFileMedia",7,!0),s=y(t,"canOpenFile",7),o=y(t,"fluid",7,!1),v=y(t,"compact",7,!1),_=y(t,"compactPreview",7),b=oe(!1),A=oe(!1),m=oe(!1),w=oe(null);const q=E(()=>r().kind==="inline"?`data:${r().mimeType};base64,${r().data}`:r().url);function V(I){return kt(I,u()&&s()?.()!==!1)}const F=E(()=>!V(e(q))),i=E(()=>At(e(q))),p=E(()=>{if(!(!c()||!V(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const I=new URL(c());return(I.protocol==="https:"||I.protocol==="workspace-file:")&&!I.username&&!I.password?c():void 0}catch{return}}});function k(){O(A,!0),O(m,!1)}var P={get source(){return r()},set source(I){r(I),x()},get name(){return d()},set name(I=C.chat_videoBlock_fromAgent_label()){d(I),x()},get poster(){return c()},set poster(I){c(I),x()},get allowFileMedia(){return u()},set allowFileMedia(I=!0){u(I),x()},get canOpenFile(){return s()},set canOpenFile(I){s(I),x()},get fluid(){return o()},set fluid(I=!1){o(I),x()},get compact(){return v()},set compact(I=!1){v(I),x()},get compactPreview(){return _()},set compactPreview(I){_(I),x()},$set:nt,$on:(I,ee)=>st(t,I,ee)},U=On(),K=Ee(U);let ne;var Le=N(K);{var le=I=>{Vt(I,{get name(){return d()},reason:"load-failed"})},ie=I=>{var ee=Ln(),Re=N(ee);{let ce=E(()=>e(i)?.path),ke=E(()=>e(i)?.workspaceId);Vt(Re,{get name(){return d()},reason:"load-failed",get path(){return e(ce)},get workspaceId(){return e(ke)}})}var ve=z(Re,2);Kt(ve,{get videoUrl(){return e(q)},get videoName(){return d()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType}}),T(ee),W(I,ee)},ge=I=>{var ee=Hn();let Re;var ve=N(ee);{let We=E(()=>C.chat_videoBlock_play_ariaLabel({name:d()}));jt(ve,{wrapContent:!1,type:"button",variant:"ghost",size:"default",class:"relative block size-full cursor-pointer overflow-hidden rounded-lg border border-border bg-muted/40 p-0 shadow-(--elevation-raised) focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 forced-colors:border",get"aria-label"(){return e(We)},"data-testid":"chat-video-snapshot",onclick:()=>{V(e(q))&&O(b,!0)},get ref(){return e(w)},set ref(de){O(w,de,!0)},children:(de,Ze)=>{var Te=xt(),se=Ee(Te);{var qe=g=>{var J=xt(),D=Ee(J);Rt(D,_),W(g,J)},h=g=>{var J=Nn(),D=Ee(J),ae=N(D);{var ue=l=>{var M=Wn();W(l,M)};re(ae,l=>{o()||l(ue)})}T(D);var j=z(D,2);j.muted=!0;var Ie=z(j,2),Fe=N(Ie),De=me(Fe);T(Ie),X(()=>{$(j,"src",e(q)),$(j,"poster",e(p)),Pe(j,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${e(p)||e(A)&&!e(m)?"opacity-100":"opacity-0"}`),Pe(Fe,1,`flex ${v()?"size-6":"size-11"} shrink-0 aspect-square items-center justify-center rounded-full border border-white/70 bg-black/60 text-white shadow-(--elevation-raised) forced-colors:border forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]`),Pe(De,0,`ml-0.5 ${v()?"size-3":"size-5"}`)}),Be("loadeddata",j,k),Be("error",j,()=>O(m,!0)),W(g,J)};re(se,g=>{_()?g(qe):g(h,-1)})}W(de,Te)},$$slots:{default:!0}})}var ce=z(ve,2);{var ke=We=>{Kt(We,{get videoUrl(){return e(q)},get videoName(){return d()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},triggerClass:"absolute right-1.5 top-1.5 opacity-0 transition-opacity focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"})};re(ce,We=>{_()||We(ke)})}T(ee),X(()=>{Pe(ee,1,`group relative aspect-video w-full max-w-2xl ${o()?"max-h-72":"max-h-40"}`),Re=pt(ee,"",Re,{height:_()?"100%":void 0,width:o()?"min(100%, calc(18rem * 16 / 9))":"min(100%, calc(10rem * 16 / 9))"})}),W(I,ee)};re(Le,I=>{e(F)?I(le):e(m)?I(ie,1):I(ge,-1)})}T(K);var _e=z(K,2);{var Ge=I=>{Ia(I,{get videoUrl(){return e(q)},get videoName(){return d()},get poster(){return e(p)},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},get openerElement(){return e(w)},get open(){return e(b)},set open(ee){O(b,ee,!0)}})};re(_e,I=>{!e(m)&&!e(F)&&I(Ge)})}return X(()=>ne=pt(K,"",ne,{height:_()?"100%":void 0})),W(a,U),it(P)}const qn=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,Dn=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ma(a,t){if(typeof a!="string"||!a||a!==a.trim())return null;if(a.startsWith("workspace-asset://"))return _t(a,t);if(a.startsWith("workspace-file://")){const d=At(a);if(!d||d.workspaceId!==t)return null;const c=Sa(a);return c?la(c,t):null}const r=a.startsWith("intent://")?a:`intent://local/file/${a}`;return la(r,t)}function zn(a,t){if(a.startsWith("workspace-file://")){const r=At(a);if(!r||r.workspaceId!==t)return!1;const d=Sa(a);return!!d&&!!Et(d,t)}return!!Et(a,t,{readOnly:!0})}function Un(a,t){return(t===0||!a[t-1].trim())&&(t===a.length-1||!a[t+1].trim())}function Bn(a,t,r){const d=r[0];return a.findIndex((c,u)=>{if(u<=t)return!1;const s=c.trim();return s.length>=r.length&&s.split("").every(o=>o===d)})}function Vn(a,t){const r=a.split(`
4
4
  `),d=[];let c=[];const u=()=>{const s=c.join(`
5
5
  `);s.trim()&&d.push({type:"markdown",content:s}),c=[]};for(let s=0;s<r.length;s+=1){const o=r[s].match(Dn);if(o){const w=Bn(r,s,o[1]);if(w>s){const q=r.slice(s,w+1);if(o[2].trim()==="ws-block:video")try{const V=JSON.parse(r.slice(s+1,w).join(`
6
- `)),F=ma(V?.path,t);if(F){u(),d.push({type:"video",source:F,name:typeof V.path=="string"?V.path:void 0,poster:typeof V.poster=="string"?V.poster:void 0}),s=w;continue}}catch{}c.push(...q),s=w;continue}c.push(...r.slice(s));break}const _=!/^(?: {4}|\t)/.test(r[s])&&Un(r,s)?r[s].match(qn):null;if(!_){c.push(r[s]);continue}const[,b,A]=_,m=ma(A,t);m?(u(),d.push({type:"video",source:m,name:b||void 0})):A.startsWith("workspace-asset://")&&!Kr(A)||zn(A,t)?c.push(r[s]):c.push(`[${b}](${A})`)}return u(),d}function ht(a){return Ma(a.getAttribute("src")||"")}function zt(a){return a instanceof HTMLImageElement?a:a instanceof HTMLAnchorElement?a.querySelector("img"):null}function Kn(a,t){const r=a.getBoundingClientRect(),d=t.getBoundingClientRect();return{top:r.top-d.top+6,right:d.right-r.right+6}}function ga(a,t){const r=document.activeElement;return!!(r&&(r===a||r===a?.closest("a")||t?.contains(r)))}function jn(a,t){const r=a.getAttribute("src")||"",d=At(r)?.path??Ra(r,t)?.path;if(d)return d;if(r.startsWith("workspace-asset://")){const c=r.split(/[?#]/)[0].split("/").pop();if(c)return c}if(r&&!/^[a-z][a-z0-9+.-]*:/i.test(r)&&!r.startsWith("//"))try{return decodeURI(r)}catch{return r}return a.getAttribute("alt")||void 0}const La="data-image-sized",va=a=>typeof a=="number"&&Number.isInteger(a)&&a>0;function Gn(a){try{return encodeURI(a).replace(/%25/g,"%")}catch{return null}}function Yn(a){return a.startsWith("workspace-file://")?a.split(/[?#]/)[0]:a}function Zn(a,t,r){const d=new Map;for(const[c,u]of Object.entries(a)){if(!u||!va(u.width)||!va(u.height))continue;const s={width:u.width,height:u.height},o=new Set([c]),v=Gn(c);v&&o.add(v);for(const _ of[...o]){const b=Et(_,t);if(b&&o.add(b),r!==void 0){const A=jr(_,r);if(A){const m=Et(`intent://local/file/${A.split("/").map(encodeURIComponent).join("/")}`,t);m&&o.add(m)}}}for(const _ of o)d.has(_)||d.set(_,s)}return d}function Jn(a,t,r,d){if(!t||!a.includes("<img"))return a;const c=Zn(t,r,d);return c.size===0?a:a.replace(/<img\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,u=>{if(/\s(?:width|height)="/i.test(u))return u;const s=/\ssrc="([^"]*)"/i.exec(u);if(!s)return u;const o=Yn(s[1].replace(/&amp;/g,"&")),v=c.get(o);return v?u.replace(/\s*\/?>$/,` width="${v.width}" height="${v.height}" ${La}="">`):u})}function ha(a,t){let r=t,d,c=!1,u=!1;const s=new Map;function o(){for(const[b,{component:A,source:m}]of s)ft(A),a.contains(b)&&b.replaceWith(m);s.clear()}function v(){if(!u){for(const[b,{component:A}]of s)a.contains(b)||(ft(A),s.delete(b));if(r.enabled)for(const b of a.querySelectorAll("pre > code")){if(b.closest("[data-markdown-diagram]"))continue;const A=[...b.classList].find(F=>F.startsWith("language-"))?.slice(9);let m;if(A==="mermaid")m="mermaid";else if(A==="diagram"||A==="ws-block:diagram")m="diagram";else if(A==="ws-block")try{if(JSON.parse(b.textContent??"").type!=="diagram")continue;m="diagram"}catch{continue}else continue;const w=b.parentElement;if(!w)continue;if(!d){c||(c=!0,ka(()=>import("./C7YrFrbw.js"),__vite__mapDeps([66,2,1,67,48,68,50,14,7,9,10,11,12,3,13,15,25,18,6,8,51,17,16,19,20,52,5,49,46,41,28,38,36,47,53,54,55,56,57,58,59,69,70,0,4,21,22,23,24,26,27,29,30,31,32,33,34,35,37,39,40,42,43,44,45,60,61,62,63,64,65,71,72,73,74,75,76,77,78]),import.meta.url).then(F=>{d=F.default,c=!1,v()}).catch(F=>{c=!1,bt.error("Failed to load the Markdown diagram renderer",{error:F})}));return}const q=document.createElement("div");q.dataset.markdownDiagram=m,w.replaceWith(q);const V=St(d,{target:q,context:r.context,props:{kind:m,source:b.textContent??"",workspaceId:r.workspaceId}});s.set(q,{component:V,source:w})}}}const _=new MutationObserver(v);return _.observe(a,{childList:!0,subtree:!0}),queueMicrotask(v),{update(b){(r.enabled!==b.enabled||r.workspaceId!==b.workspaceId)&&o(),r=b,v()},destroy(){u=!0,_.disconnect(),o()}}}var Qn=B('<span class="min-w-0 max-w-full truncate"> </span>'),Xn=B('<span class="type-caption flex min-w-0 max-w-full items-start gap-2 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-loading-placeholder"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="flex min-w-0 flex-wrap items-baseline gap-x-1.5"><span> </span> <!></span></span>');function Wa(a,t){if(new.target)return rt({component:Wa,...a});ot(t,!0);let r=y(t,"name",7);var d={get name(){return r()},set name(m){r(m),x()},$set:nt,$on:(m,w)=>st(t,m,w)},c=Xn(),u=N(c),s=N(u);wt(s,{get icon(){return Ur},class:"size-3.5"}),T(u);var o=z(u,2),v=N(o),_=me(v,!0),b=z(v,2);{var A=m=>{var w=Qn(),q=me(w,!0);tt(w,(V,F)=>Bt?.(V,F),r),X(()=>be(q,r())),W(m,w)};re(b,m=>{r()&&m(A)})}return T(o),T(c),X(m=>be(_,m),[()=>C.ui_mediaLoadingPlaceholder_title_label()]),W(a,c),it(d)}const ba="markdown-image-frame";function $n(a,t){const r=new Map,d=new Map,c=new Map,u=[300,1e3];let s=!1;function o(i){let p=d.get(i);return p||(p={source:i.getAttribute("src")||"",workspaceId:t.getWorkspaceId(),retries:0,failureHandled:!1},d.set(i,p)),p}function v(i){const p=o(i);return!s&&a.contains(p.fallbackHost??i)&&p.workspaceId===t.getWorkspaceId()&&t.canUseMedia(p.source)&&!i.hasAttribute("data-media-unavailable")&&!i.hasAttribute("data-media-unsupported")&&sa(p.source)!==null}function _(i,p=!1){if(!v(i))return;const k=o(i),P=sa(k.source);if(!P)return;const U=k.fallbackHost,K=U?.contains(document.activeElement)??!1;if(k.failureHandled=!1,k.fallbackHost=void 0,p&&(k.retries=0),i.removeAttribute("src"),i.setAttribute("src",P),U){const ne=r.get(U);ne&&ft(ne),r.delete(U),U.replaceWith(i),q(),K&&a.contains(i)&&i.focus()}}function b(i){const p=o(i);s||!a.contains(i)||p.failureHandled||(p.failureHandled=!0,v(i)&&p.retries<u.length?p.timer=setTimeout(()=>{p.timer=void 0,_(i)},u[p.retries++]):w(i,"load-failed"))}function A(i){const p=i.parentElement;return p?.classList.contains(ba)?p:null}function m(i){const p=Number(i.getAttribute("width")),k=Number(i.getAttribute("height"));if(!(p>0&&k>0))return;const P=document.createElement("span");P.className=ba,P.style.aspectRatio=`${p} / ${k}`,P.style.setProperty("--image-aspect-ratio",`${p} / ${k}`),P.style.width=`min(${p}px, 100%)`,P.dataset.loaded="false",i.replaceWith(P),P.appendChild(i);const U=P.appendChild(document.createElement("span"));U.className="markdown-image-frame-placeholder",r.set(U,St(Wa,{target:U,props:{name:jn(i,t.getWorkspaceId())}}));const K=()=>{if(c.delete(i),s||!a.contains(P))return;P.dataset.loaded="true";const ne=r.get(U);ne&&(ft(ne),r.delete(U)),U.remove()};i.complete&&i.naturalWidth>0?K():(c.set(i,K),i.addEventListener("load",K,{once:!0}))}function w(i,p){const k=i.getAttribute("src")||i.getAttribute("data-media-src")||"",P=At(k),U=Ra(k,t.getWorkspaceId()),K=P?.path??U?.path,ne=P?.workspaceId??U?.workspaceId,Le=i.getAttribute("data-name")||i.getAttribute("alt")||K?.split("/").pop()||void 0,le=document.createElement(i instanceof HTMLVideoElement?"div":"span");le.className="media-unavailable-host",(A(i)??i).replaceWith(le),t.onMediaRemoved(i);let ie;if(i instanceof HTMLImageElement&&p==="load-failed"){const _e=o(i);_e.fallbackHost=le,v(i)&&(ie=()=>_(i,!0))}const ge=St(Vt,{target:le,props:{name:Le,reason:p,path:K,workspaceId:ne,onRetry:ie}});if(r.set(le,ge),i instanceof HTMLVideoElement){le.classList.add("flex","items-center","gap-2");const _e=le.appendChild(document.createElement("span"));r.set(_e,St(Kt,{target:_e,props:{videoUrl:k,videoName:Le,sourceKind:"workspace",mimeType:_t(k,t.getWorkspaceId())?.mimeType}}))}}function q(){if(!s){for(const i of a.querySelectorAll("img"))ht(i)&&!i.closest("a")&&(i.tabIndex=0,i.setAttribute("role","button")),!(i.hasAttribute("data-media-unsupported")||i.hasAttribute("data-media-unavailable"))&&(o(i),i.hasAttribute(La)&&!A(i)&&m(i),i.getAttribute("src")&&i.complete&&i.naturalWidth===0&&b(i));for(const i of a.querySelectorAll("[data-media-unsupported]"))w(i,"unsupported");for(const i of a.querySelectorAll("[data-media-unavailable]"))w(i,Gr(i));for(const[i,p]of d)a.contains(p.fallbackHost??i)||(p.timer!==void 0&&clearTimeout(p.timer),d.delete(i));for(const[i,p]of c)a.contains(i)||(i.removeEventListener("load",p),c.delete(i));for(const[i,p]of r)a.contains(i)||(ft(p),r.delete(i))}}function V(i){const p=i.target;(p instanceof HTMLImageElement||p instanceof HTMLVideoElement)&&(p instanceof HTMLImageElement?b(p):w(p,"load-failed"))}const F=new MutationObserver(q);return F.observe(a,{childList:!0,subtree:!0}),a.addEventListener("error",V,!0),queueMicrotask(q),{destroy(){s=!0,F.disconnect();for(const i of d.values())i.timer!==void 0&&clearTimeout(i.timer);d.clear();for(const[i,p]of c)i.removeEventListener("load",p);c.clear(),a.removeEventListener("error",V,!0);for(const i of r.values())ft(i);r.clear()}}}var es=B('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),ts=B("<div></div>"),wa=B('<div role="group"><!> <!></div>'),as=B('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),rs=B("<!> <!>",1);function _a(a,t){if(new.target)return rt({component:_a,...a});ot(t,!0);const r=n=>{var f=xt(),H=Ee(f);{var S=G=>{var te=es(),He=N(te);{let fe=E(()=>e(se).getAttribute("src")||""),pe=E(()=>e(se).getAttribute("alt")||void 0);at(fr(He,{get imageUrl(){return e(fe)},get imageName(){return e(pe)},get open(){return e(h)},set open(ze){O(h,ze,!0)}}),ze=>O(g,ze,!0),()=>e(g))}T(te),at(te,fe=>O(J,fe),()=>e(J)),X(()=>pt(te,`top: ${e(qe).top??""}px; right: ${e(qe).right??""}px;`)),W(G,te)},Y=E(()=>e(se)&&ge(e(se).getAttribute("src")||""));re(H,G=>{e(Y)&&G(S)})}W(n,f)};let d=y(t,"content",7),c=y(t,"isStreaming",7,!1),u=y(t,"className",7,""),s=y(t,"workspaceId",23,()=>ca()?.workspaceId??void 0),o=y(t,"relativeMediaBase",7),v=y(t,"onCodeBlockAction",7),_=y(t,"onFileClick",7),b=y(t,"canOpenFile",7),A=y(t,"allowFileMedia",7,!0),m=y(t,"taskBlockRenderMode",7,"placeholder"),w=y(t,"chatImageThumbnails",7,!1),q=y(t,"forceExternalLinks",7,!1),V=y(t,"renderRichFencesAsCode",7,!1),F=y(t,"renderDiagrams",7,!1),i=y(t,"allowSanitizedHtml",7,!1),p=y(t,"media",7);const k=Yr(),P=Ya(),U=E(()=>Vn(d(),s())),K=E(()=>e(U).some(n=>n.type==="video")),ne=E(()=>!e(K)&&e(U).length===1&&e(U)[0].type==="markdown"?e(U)[0].content:d()),Le=E(()=>Tn(e(ne)));let le=oe(null),ie=oe("");function ge(n){return kt(n,A()&&b()?.()!==!1)}const _e=E(()=>En(e(ie),A()&&b()?.()!==!1)),Ge=E(()=>pr(e(_e),s(),mr)),I=E(()=>`<div class="markdown-content">${e(Ge)}</div>`);let ee=0;const Re=150;let ve=-1/0,ce=null,ke=null;async function We(n,f,H,S){try{const Y=await Zr(n,{...f,readOnly:!0});if(S!==ee)return;O(ie,Jn(Y,H,f?.workspaceId,f?.relativeMediaBase),!0)}catch(Y){if(S!==ee)return;bt.error("Failed to process markdown:",Y);const G=n.replace(/[&<>"']/g,te=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[te]||te);O(ie,`<p>${G}</p>`)}}function de(){if(!ke)return;const n=Re-(performance.now()-ve);if(n>0){ce=setTimeout(()=>{ce=null,de()},n);return}const f=ke;ke=null,ve=performance.now(),f()}function Ze(){ce!==null&&(clearTimeout(ce),ce=null),ke=null,ve=-1/0}yt(()=>{const n=e(ne),f={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:m(),workspaceId:s(),relativeMediaBase:o()??(s()&&s()!==Sr?"":void 0),renderRichFencesAsCode:V()||F(),processPrimitives:!F(),allowSanitizedHtml:i(),renderMath:!c(),workspaceFileVersion:k},H=p(),S=++ee,Y=()=>void We(n,f,H,S);c()?(ke=Y,ce===null&&de()):(Ze(),Y())});let Te=oe(void 0),se=oe(null),qe=oe(Za({top:0,right:0})),h=oe(!1),g=oe(void 0),J=oe(null);function D(n){if(n.type==="mouseover"&&ga(e(se),e(J)))return;const f=n.target,H=zt(f);if(H&&ht(H)&&ge(H.getAttribute("src")||"")){if(e(se)===H)return;O(se,H,!0),O(qe,Kn(H,n.currentTarget),!0)}else if(e(se)&&!e(h)){if(f instanceof Node&&e(J)?.contains(f))return;O(se,null)}}function ae(){!e(h)&&!ga(e(se),e(J))&&O(se,null)}function ue(n){const f=zt(n.target);!f||!ht(f)||!ge(f.getAttribute("src")||"")||(n.preventDefault(),n.stopPropagation(),D(n),O(h,!0))}function j(n){return $n(n,{getWorkspaceId:()=>s(),canUseMedia:ge,onMediaRemoved:f=>{e(se)===f&&O(se,null)}})}function Ie(n){const f=n.target,H=f.closest("a");if(!H&&f instanceof HTMLImageElement){const Y=f.getAttribute("src")||"";if(Ma(Y)&&ge(Y)){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(Te)?.openImage(f);return}}if(H?.href){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(Te)?.openAsset(H))return;const Y=l(n),G=s()?ta(s()):void 0;ia(H.href,{workspaceId:G,canOpenFile:b(),sourcePanelId:Y,event:n,rawHref:H.getAttribute("href")??void 0,...q()?{forceExternal:!0}:{}});return}const S=Jr(f.closest("[data-mention]"));if(S){const{type:Y,meta:G}=S;if(Y==="file"&&S.filePath){if(b()?.()===!1)return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const te=S.filePath;bt.debug("[MarkdownViewer] File mention clicked",{filePath:te,meta:G});const He=l(n),fe=qt({event:n});if(_())_()(te,{line:S.line,openInAdjacentPanel:fe,sourcePanelId:He});else{const pe=s();pe&&we.dispatch(Rr(pe,te,{line:S.line,openInAdjacentPanel:fe,sourcePanelId:He}))}}else if(S.folderPath!==void 0){if(b()?.()===!1||!s())return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),we.dispatch(Er(s(),Qr(S.folderPath)))}else if(Y==="note"&&S.note){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const te=S.note.id;bt.debug("[MarkdownViewer] Note mention clicked",{noteId:te,meta:G});const He=l(n),fe=qt({event:n});if(S.note.workspaceId&&S.note.workspaceId!==s()){ia(ir(te,S.note.workspaceId),{workspaceId:s()?ta(s()):void 0,sourcePanelId:He,event:n});return}const pe=s();pe&&we.dispatch(Pr(pe,te,{openInAdjacentPanel:fe,sourcePanelId:He}))}}}function Fe(n){if(De(n),!n.defaultPrevented){if(n.target instanceof HTMLImageElement&&ht(n.target)&&(n.key==="Enter"||n.key===" ")){Ie(n);return}n.key!=="Enter"||!qt({event:n})||Ie(n)}}function De(n){const f=zt(n.target);!f||!ht(f)||!ge(f.getAttribute("src")||"")||e(g)?.handleCopy(n,f.getAttribute("src")||"")}function l(n){const f=n.target;if(f instanceof HTMLElement)return f.closest("[data-panel-id]")?.dataset.panelId}Ja(()=>{ee+=1,Ze()});var M={get content(){return d()},set content(n){d(n),x()},get isStreaming(){return c()},set isStreaming(n=!1){c(n),x()},get className(){return u()},set className(n=""){u(n),x()},get workspaceId(){return s()},set workspaceId(n=ca()?.workspaceId??void 0){s(n),x()},get relativeMediaBase(){return o()},set relativeMediaBase(n){o(n),x()},get onCodeBlockAction(){return v()},set onCodeBlockAction(n){v(n),x()},get onFileClick(){return _()},set onFileClick(n){_(n),x()},get canOpenFile(){return b()},set canOpenFile(n){b(n),x()},get allowFileMedia(){return A()},set allowFileMedia(n=!0){A(n),x()},get taskBlockRenderMode(){return m()},set taskBlockRenderMode(n="placeholder"){m(n),x()},get chatImageThumbnails(){return w()},set chatImageThumbnails(n=!1){w(n),x()},get forceExternalLinks(){return q()},set forceExternalLinks(n=!1){q(n),x()},get renderRichFencesAsCode(){return V()},set renderRichFencesAsCode(n=!1){V(n),x()},get renderDiagrams(){return F()},set renderDiagrams(n=!1){F(n),x()},get allowSanitizedHtml(){return i()},set allowSanitizedHtml(n=!1){i(n),x()},get media(){return p()},set media(n){p(n),x()},$set:nt,$on:(n,f)=>st(t,n,f)},L=rs(),Q=Ee(L);{var ye=n=>{var f=ts();Ut(f,21,()=>e(U),$a,(H,S)=>{var Y=xt(),G=Ee(Y);{var te=fe=>{Fa(fe,{get allowFileMedia(){return A()},get canOpenFile(){return b()},get source(){return e(S).source},get name(){return e(S).name},get poster(){return e(S).poster}})},He=fe=>{_a(fe,{get content(){return e(S).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return o()},get onCodeBlockAction(){return v()},get onFileClick(){return _()},get canOpenFile(){return b()},get allowFileMedia(){return A()},get taskBlockRenderMode(){return m()},get chatImageThumbnails(){return w()},get forceExternalLinks(){return q()},get renderRichFencesAsCode(){return V()},get renderDiagrams(){return F()},get allowSanitizedHtml(){return i()},get media(){return p()}})};re(G,fe=>{e(S).type==="video"?fe(te):fe(He,-1)})}W(H,Y)}),T(f),X(()=>Pe(f,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),W(n,f)},he=n=>{var f=wa();let H;var S=N(f);oa(S,()=>e(I));var Y=z(S,2);r(Y),T(f),tt(f,G=>j?.(G)),tt(f,(G,te)=>ha?.(G,te),()=>({enabled:F(),workspaceId:s(),context:P})),X(()=>H=Pe(f,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",H,{"chat-image-thumbnails":w()})),Se("click",f,Ie),Se("keydown",f,Fe),Be("copy",f,De),Se("contextmenu",f,ue),Se("mouseover",f,D),Se("focusin",f,D),Be("mouseleave",f,ae),W(n,f)},xe=n=>{var f=as(),H=N(f),S=me(H,!0);T(f),X(()=>{Pe(f,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),be(S,e(ne))}),W(n,f)},Ne=n=>{var f=wa();let H;var S=N(f);oa(S,()=>e(I));var Y=z(S,2);r(Y),T(f),at(f,G=>O(le,G),()=>e(le)),tt(f,G=>j?.(G)),tt(f,(G,te)=>ha?.(G,te),()=>({enabled:F(),workspaceId:s(),context:P})),X(()=>H=Pe(f,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",H,{"chat-image-thumbnails":w()})),Se("click",f,Ie),Se("keydown",f,Fe),Be("copy",f,De),Se("contextmenu",f,ue),Se("mouseover",f,D),Se("focusin",f,D),Be("mouseleave",f,ae),W(n,f)};re(Q,n=>{e(K)?n(ye):c()?n(he,1):e(Le)==="simple"&&!i()?n(xe,2):n(Ne,-1)})}var Ae=z(Q,2);return at(Ta(Ae,{get workspaceId(){return s()},canUseMedia:ge}),n=>O(Te,n,!0),()=>e(Te)),W(a,L),it(M)}xa(["click","keydown","contextmenu","mouseover","focusin"]);class Ts{constructor(t){dt(this,"container");dt(this,"previousFocus",null);dt(this,"firstFocusable",null);dt(this,"lastFocusable",null);dt(this,"handleKeyDown");this.container=t,this.handleKeyDown=this.onKeyDown.bind(this)}activate(){this.previousFocus=document.activeElement;const t=this.container.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])');t.length>0&&(this.firstFocusable=t[0],this.lastFocusable=t[t.length-1],this.firstFocusable.focus()),document.addEventListener("keydown",this.handleKeyDown)}deactivate(){document.removeEventListener("keydown",this.handleKeyDown),this.previousFocus&&this.previousFocus.focus()}onKeyDown(t){t.key==="Tab"&&(!this.firstFocusable||!this.lastFocusable||(t.shiftKey?document.activeElement===this.firstFocusable&&(t.preventDefault(),this.lastFocusable.focus()):document.activeElement===this.lastFocusable&&(t.preventDefault(),this.firstFocusable.focus())))}}function Fs(a,t){const r=_=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(_);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},d=_=>{const[b,A,m]=[_.r,_.g,_.b].map(w=>(w=w/255,w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4)));return .2126*b+.7152*A+.0722*m},c=r(a),u=r(t);if(!c||!u)return bt.warn("Invalid color values for contrast check",{foreground:a,background:t}),{ratio:0,passes:{aa:!1,aaa:!1}};const s=d(c),o=d(u),v=(Math.max(s,o)+.05)/(Math.min(s,o)+.05);return{ratio:v,passes:{aa:v>=4.5,aaa:v>=7}}}export{Fa as C,Ts as F,Rn as H,_a as M,Rs as W,Wa as a,fa as b,An as c,Pa as d,Fs as e,Cn as f,Ps as g,Ea as h,on as r,Vn as s,Es as w};
6
+ `)),F=ma(V?.path,t);if(F){u(),d.push({type:"video",source:F,name:typeof V.path=="string"?V.path:void 0,poster:typeof V.poster=="string"?V.poster:void 0}),s=w;continue}}catch{}c.push(...q),s=w;continue}c.push(...r.slice(s));break}const _=!/^(?: {4}|\t)/.test(r[s])&&Un(r,s)?r[s].match(qn):null;if(!_){c.push(r[s]);continue}const[,b,A]=_,m=ma(A,t);m?(u(),d.push({type:"video",source:m,name:b||void 0})):A.startsWith("workspace-asset://")&&!Kr(A)||zn(A,t)?c.push(r[s]):c.push(`[${b}](${A})`)}return u(),d}function ht(a){return Ma(a.getAttribute("src")||"")}function zt(a){return a instanceof HTMLImageElement?a:a instanceof HTMLAnchorElement?a.querySelector("img"):null}function Kn(a,t){const r=a.getBoundingClientRect(),d=t.getBoundingClientRect();return{top:r.top-d.top+6,right:d.right-r.right+6}}function ga(a,t){const r=document.activeElement;return!!(r&&(r===a||r===a?.closest("a")||t?.contains(r)))}function jn(a,t){const r=a.getAttribute("src")||"",d=At(r)?.path??Ra(r,t)?.path;if(d)return d;if(r.startsWith("workspace-asset://")){const c=r.split(/[?#]/)[0].split("/").pop();if(c)return c}if(r&&!/^[a-z][a-z0-9+.-]*:/i.test(r)&&!r.startsWith("//"))try{return decodeURI(r)}catch{return r}return a.getAttribute("alt")||void 0}const La="data-image-sized",va=a=>typeof a=="number"&&Number.isInteger(a)&&a>0;function Gn(a){try{return encodeURI(a).replace(/%25/g,"%")}catch{return null}}function Yn(a){return a.startsWith("workspace-file://")?a.split(/[?#]/)[0]:a}function Zn(a,t,r){const d=new Map;for(const[c,u]of Object.entries(a)){if(!u||!va(u.width)||!va(u.height))continue;const s={width:u.width,height:u.height},o=new Set([c]),v=Gn(c);v&&o.add(v);for(const _ of[...o]){const b=Et(_,t);if(b&&o.add(b),r!==void 0){const A=jr(_,r);if(A){const m=Et(`intent://local/file/${A.split("/").map(encodeURIComponent).join("/")}`,t);m&&o.add(m)}}}for(const _ of o)d.has(_)||d.set(_,s)}return d}function Jn(a,t,r,d){if(!t||!a.includes("<img"))return a;const c=Zn(t,r,d);return c.size===0?a:a.replace(/<img\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,u=>{if(/\s(?:width|height)="/i.test(u))return u;const s=/\ssrc="([^"]*)"/i.exec(u);if(!s)return u;const o=Yn(s[1].replace(/&amp;/g,"&")),v=c.get(o);return v?u.replace(/\s*\/?>$/,` width="${v.width}" height="${v.height}" ${La}="">`):u})}function ha(a,t){let r=t,d,c=!1,u=!1;const s=new Map;function o(){for(const[b,{component:A,source:m}]of s)ft(A),a.contains(b)&&b.replaceWith(m);s.clear()}function v(){if(!u){for(const[b,{component:A}]of s)a.contains(b)||(ft(A),s.delete(b));if(r.enabled)for(const b of a.querySelectorAll("pre > code")){if(b.closest("[data-markdown-diagram]"))continue;const A=[...b.classList].find(F=>F.startsWith("language-"))?.slice(9);let m;if(A==="mermaid")m="mermaid";else if(A==="diagram"||A==="ws-block:diagram")m="diagram";else if(A==="ws-block")try{if(JSON.parse(b.textContent??"").type!=="diagram")continue;m="diagram"}catch{continue}else continue;const w=b.parentElement;if(!w)continue;if(!d){c||(c=!0,ka(()=>import("./C-4sX4WB.js"),__vite__mapDeps([66,2,1,67,48,68,50,14,7,9,10,11,12,3,13,15,25,18,6,8,51,17,16,19,20,52,5,49,46,41,28,38,36,47,53,54,55,56,57,58,59,69,70,0,4,21,22,23,24,26,27,29,30,31,32,33,34,35,37,39,40,42,43,44,45,60,61,62,63,64,65,71,72,73,74,75,76,77,78]),import.meta.url).then(F=>{d=F.default,c=!1,v()}).catch(F=>{c=!1,bt.error("Failed to load the Markdown diagram renderer",{error:F})}));return}const q=document.createElement("div");q.dataset.markdownDiagram=m,w.replaceWith(q);const V=St(d,{target:q,context:r.context,props:{kind:m,source:b.textContent??"",workspaceId:r.workspaceId}});s.set(q,{component:V,source:w})}}}const _=new MutationObserver(v);return _.observe(a,{childList:!0,subtree:!0}),queueMicrotask(v),{update(b){(r.enabled!==b.enabled||r.workspaceId!==b.workspaceId)&&o(),r=b,v()},destroy(){u=!0,_.disconnect(),o()}}}var Qn=B('<span class="min-w-0 max-w-full truncate"> </span>'),Xn=B('<span class="type-caption flex min-w-0 max-w-full items-start gap-2 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-loading-placeholder"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="flex min-w-0 flex-wrap items-baseline gap-x-1.5"><span> </span> <!></span></span>');function Wa(a,t){if(new.target)return rt({component:Wa,...a});ot(t,!0);let r=y(t,"name",7);var d={get name(){return r()},set name(m){r(m),x()},$set:nt,$on:(m,w)=>st(t,m,w)},c=Xn(),u=N(c),s=N(u);wt(s,{get icon(){return Ur},class:"size-3.5"}),T(u);var o=z(u,2),v=N(o),_=me(v,!0),b=z(v,2);{var A=m=>{var w=Qn(),q=me(w,!0);tt(w,(V,F)=>Bt?.(V,F),r),X(()=>be(q,r())),W(m,w)};re(b,m=>{r()&&m(A)})}return T(o),T(c),X(m=>be(_,m),[()=>C.ui_mediaLoadingPlaceholder_title_label()]),W(a,c),it(d)}const ba="markdown-image-frame";function $n(a,t){const r=new Map,d=new Map,c=new Map,u=[300,1e3];let s=!1;function o(i){let p=d.get(i);return p||(p={source:i.getAttribute("src")||"",workspaceId:t.getWorkspaceId(),retries:0,failureHandled:!1},d.set(i,p)),p}function v(i){const p=o(i);return!s&&a.contains(p.fallbackHost??i)&&p.workspaceId===t.getWorkspaceId()&&t.canUseMedia(p.source)&&!i.hasAttribute("data-media-unavailable")&&!i.hasAttribute("data-media-unsupported")&&sa(p.source)!==null}function _(i,p=!1){if(!v(i))return;const k=o(i),P=sa(k.source);if(!P)return;const U=k.fallbackHost,K=U?.contains(document.activeElement)??!1;if(k.failureHandled=!1,k.fallbackHost=void 0,p&&(k.retries=0),i.removeAttribute("src"),i.setAttribute("src",P),U){const ne=r.get(U);ne&&ft(ne),r.delete(U),U.replaceWith(i),q(),K&&a.contains(i)&&i.focus()}}function b(i){const p=o(i);s||!a.contains(i)||p.failureHandled||(p.failureHandled=!0,v(i)&&p.retries<u.length?p.timer=setTimeout(()=>{p.timer=void 0,_(i)},u[p.retries++]):w(i,"load-failed"))}function A(i){const p=i.parentElement;return p?.classList.contains(ba)?p:null}function m(i){const p=Number(i.getAttribute("width")),k=Number(i.getAttribute("height"));if(!(p>0&&k>0))return;const P=document.createElement("span");P.className=ba,P.style.aspectRatio=`${p} / ${k}`,P.style.setProperty("--image-aspect-ratio",`${p} / ${k}`),P.style.width=`min(${p}px, 100%)`,P.dataset.loaded="false",i.replaceWith(P),P.appendChild(i);const U=P.appendChild(document.createElement("span"));U.className="markdown-image-frame-placeholder",r.set(U,St(Wa,{target:U,props:{name:jn(i,t.getWorkspaceId())}}));const K=()=>{if(c.delete(i),s||!a.contains(P))return;P.dataset.loaded="true";const ne=r.get(U);ne&&(ft(ne),r.delete(U)),U.remove()};i.complete&&i.naturalWidth>0?K():(c.set(i,K),i.addEventListener("load",K,{once:!0}))}function w(i,p){const k=i.getAttribute("src")||i.getAttribute("data-media-src")||"",P=At(k),U=Ra(k,t.getWorkspaceId()),K=P?.path??U?.path,ne=P?.workspaceId??U?.workspaceId,Le=i.getAttribute("data-name")||i.getAttribute("alt")||K?.split("/").pop()||void 0,le=document.createElement(i instanceof HTMLVideoElement?"div":"span");le.className="media-unavailable-host",(A(i)??i).replaceWith(le),t.onMediaRemoved(i);let ie;if(i instanceof HTMLImageElement&&p==="load-failed"){const _e=o(i);_e.fallbackHost=le,v(i)&&(ie=()=>_(i,!0))}const ge=St(Vt,{target:le,props:{name:Le,reason:p,path:K,workspaceId:ne,onRetry:ie}});if(r.set(le,ge),i instanceof HTMLVideoElement){le.classList.add("flex","items-center","gap-2");const _e=le.appendChild(document.createElement("span"));r.set(_e,St(Kt,{target:_e,props:{videoUrl:k,videoName:Le,sourceKind:"workspace",mimeType:_t(k,t.getWorkspaceId())?.mimeType}}))}}function q(){if(!s){for(const i of a.querySelectorAll("img"))ht(i)&&!i.closest("a")&&(i.tabIndex=0,i.setAttribute("role","button")),!(i.hasAttribute("data-media-unsupported")||i.hasAttribute("data-media-unavailable"))&&(o(i),i.hasAttribute(La)&&!A(i)&&m(i),i.getAttribute("src")&&i.complete&&i.naturalWidth===0&&b(i));for(const i of a.querySelectorAll("[data-media-unsupported]"))w(i,"unsupported");for(const i of a.querySelectorAll("[data-media-unavailable]"))w(i,Gr(i));for(const[i,p]of d)a.contains(p.fallbackHost??i)||(p.timer!==void 0&&clearTimeout(p.timer),d.delete(i));for(const[i,p]of c)a.contains(i)||(i.removeEventListener("load",p),c.delete(i));for(const[i,p]of r)a.contains(i)||(ft(p),r.delete(i))}}function V(i){const p=i.target;(p instanceof HTMLImageElement||p instanceof HTMLVideoElement)&&(p instanceof HTMLImageElement?b(p):w(p,"load-failed"))}const F=new MutationObserver(q);return F.observe(a,{childList:!0,subtree:!0}),a.addEventListener("error",V,!0),queueMicrotask(q),{destroy(){s=!0,F.disconnect();for(const i of d.values())i.timer!==void 0&&clearTimeout(i.timer);d.clear();for(const[i,p]of c)i.removeEventListener("load",p);c.clear(),a.removeEventListener("error",V,!0);for(const i of r.values())ft(i);r.clear()}}}var es=B('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),ts=B("<div></div>"),wa=B('<div role="group"><!> <!></div>'),as=B('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),rs=B("<!> <!>",1);function _a(a,t){if(new.target)return rt({component:_a,...a});ot(t,!0);const r=n=>{var f=xt(),H=Ee(f);{var S=G=>{var te=es(),He=N(te);{let fe=E(()=>e(se).getAttribute("src")||""),pe=E(()=>e(se).getAttribute("alt")||void 0);at(fr(He,{get imageUrl(){return e(fe)},get imageName(){return e(pe)},get open(){return e(h)},set open(ze){O(h,ze,!0)}}),ze=>O(g,ze,!0),()=>e(g))}T(te),at(te,fe=>O(J,fe),()=>e(J)),X(()=>pt(te,`top: ${e(qe).top??""}px; right: ${e(qe).right??""}px;`)),W(G,te)},Y=E(()=>e(se)&&ge(e(se).getAttribute("src")||""));re(H,G=>{e(Y)&&G(S)})}W(n,f)};let d=y(t,"content",7),c=y(t,"isStreaming",7,!1),u=y(t,"className",7,""),s=y(t,"workspaceId",23,()=>ca()?.workspaceId??void 0),o=y(t,"relativeMediaBase",7),v=y(t,"onCodeBlockAction",7),_=y(t,"onFileClick",7),b=y(t,"canOpenFile",7),A=y(t,"allowFileMedia",7,!0),m=y(t,"taskBlockRenderMode",7,"placeholder"),w=y(t,"chatImageThumbnails",7,!1),q=y(t,"forceExternalLinks",7,!1),V=y(t,"renderRichFencesAsCode",7,!1),F=y(t,"renderDiagrams",7,!1),i=y(t,"allowSanitizedHtml",7,!1),p=y(t,"media",7);const k=Yr(),P=Ya(),U=E(()=>Vn(d(),s())),K=E(()=>e(U).some(n=>n.type==="video")),ne=E(()=>!e(K)&&e(U).length===1&&e(U)[0].type==="markdown"?e(U)[0].content:d()),Le=E(()=>Tn(e(ne)));let le=oe(null),ie=oe("");function ge(n){return kt(n,A()&&b()?.()!==!1)}const _e=E(()=>En(e(ie),A()&&b()?.()!==!1)),Ge=E(()=>pr(e(_e),s(),mr)),I=E(()=>`<div class="markdown-content">${e(Ge)}</div>`);let ee=0;const Re=150;let ve=-1/0,ce=null,ke=null;async function We(n,f,H,S){try{const Y=await Zr(n,{...f,readOnly:!0});if(S!==ee)return;O(ie,Jn(Y,H,f?.workspaceId,f?.relativeMediaBase),!0)}catch(Y){if(S!==ee)return;bt.error("Failed to process markdown:",Y);const G=n.replace(/[&<>"']/g,te=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[te]||te);O(ie,`<p>${G}</p>`)}}function de(){if(!ke)return;const n=Re-(performance.now()-ve);if(n>0){ce=setTimeout(()=>{ce=null,de()},n);return}const f=ke;ke=null,ve=performance.now(),f()}function Ze(){ce!==null&&(clearTimeout(ce),ce=null),ke=null,ve=-1/0}yt(()=>{const n=e(ne),f={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:m(),workspaceId:s(),relativeMediaBase:o()??(s()&&s()!==Sr?"":void 0),renderRichFencesAsCode:V()||F(),processPrimitives:!F(),allowSanitizedHtml:i(),renderMath:!c(),workspaceFileVersion:k},H=p(),S=++ee,Y=()=>void We(n,f,H,S);c()?(ke=Y,ce===null&&de()):(Ze(),Y())});let Te=oe(void 0),se=oe(null),qe=oe(Za({top:0,right:0})),h=oe(!1),g=oe(void 0),J=oe(null);function D(n){if(n.type==="mouseover"&&ga(e(se),e(J)))return;const f=n.target,H=zt(f);if(H&&ht(H)&&ge(H.getAttribute("src")||"")){if(e(se)===H)return;O(se,H,!0),O(qe,Kn(H,n.currentTarget),!0)}else if(e(se)&&!e(h)){if(f instanceof Node&&e(J)?.contains(f))return;O(se,null)}}function ae(){!e(h)&&!ga(e(se),e(J))&&O(se,null)}function ue(n){const f=zt(n.target);!f||!ht(f)||!ge(f.getAttribute("src")||"")||(n.preventDefault(),n.stopPropagation(),D(n),O(h,!0))}function j(n){return $n(n,{getWorkspaceId:()=>s(),canUseMedia:ge,onMediaRemoved:f=>{e(se)===f&&O(se,null)}})}function Ie(n){const f=n.target,H=f.closest("a");if(!H&&f instanceof HTMLImageElement){const Y=f.getAttribute("src")||"";if(Ma(Y)&&ge(Y)){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(Te)?.openImage(f);return}}if(H?.href){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(Te)?.openAsset(H))return;const Y=l(n),G=s()?ta(s()):void 0;ia(H.href,{workspaceId:G,canOpenFile:b(),sourcePanelId:Y,event:n,rawHref:H.getAttribute("href")??void 0,...q()?{forceExternal:!0}:{}});return}const S=Jr(f.closest("[data-mention]"));if(S){const{type:Y,meta:G}=S;if(Y==="file"&&S.filePath){if(b()?.()===!1)return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const te=S.filePath;bt.debug("[MarkdownViewer] File mention clicked",{filePath:te,meta:G});const He=l(n),fe=qt({event:n});if(_())_()(te,{line:S.line,openInAdjacentPanel:fe,sourcePanelId:He});else{const pe=s();pe&&we.dispatch(Rr(pe,te,{line:S.line,openInAdjacentPanel:fe,sourcePanelId:He}))}}else if(S.folderPath!==void 0){if(b()?.()===!1||!s())return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),we.dispatch(Er(s(),Qr(S.folderPath)))}else if(Y==="note"&&S.note){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const te=S.note.id;bt.debug("[MarkdownViewer] Note mention clicked",{noteId:te,meta:G});const He=l(n),fe=qt({event:n});if(S.note.workspaceId&&S.note.workspaceId!==s()){ia(ir(te,S.note.workspaceId),{workspaceId:s()?ta(s()):void 0,sourcePanelId:He,event:n});return}const pe=s();pe&&we.dispatch(Pr(pe,te,{openInAdjacentPanel:fe,sourcePanelId:He}))}}}function Fe(n){if(De(n),!n.defaultPrevented){if(n.target instanceof HTMLImageElement&&ht(n.target)&&(n.key==="Enter"||n.key===" ")){Ie(n);return}n.key!=="Enter"||!qt({event:n})||Ie(n)}}function De(n){const f=zt(n.target);!f||!ht(f)||!ge(f.getAttribute("src")||"")||e(g)?.handleCopy(n,f.getAttribute("src")||"")}function l(n){const f=n.target;if(f instanceof HTMLElement)return f.closest("[data-panel-id]")?.dataset.panelId}Ja(()=>{ee+=1,Ze()});var M={get content(){return d()},set content(n){d(n),x()},get isStreaming(){return c()},set isStreaming(n=!1){c(n),x()},get className(){return u()},set className(n=""){u(n),x()},get workspaceId(){return s()},set workspaceId(n=ca()?.workspaceId??void 0){s(n),x()},get relativeMediaBase(){return o()},set relativeMediaBase(n){o(n),x()},get onCodeBlockAction(){return v()},set onCodeBlockAction(n){v(n),x()},get onFileClick(){return _()},set onFileClick(n){_(n),x()},get canOpenFile(){return b()},set canOpenFile(n){b(n),x()},get allowFileMedia(){return A()},set allowFileMedia(n=!0){A(n),x()},get taskBlockRenderMode(){return m()},set taskBlockRenderMode(n="placeholder"){m(n),x()},get chatImageThumbnails(){return w()},set chatImageThumbnails(n=!1){w(n),x()},get forceExternalLinks(){return q()},set forceExternalLinks(n=!1){q(n),x()},get renderRichFencesAsCode(){return V()},set renderRichFencesAsCode(n=!1){V(n),x()},get renderDiagrams(){return F()},set renderDiagrams(n=!1){F(n),x()},get allowSanitizedHtml(){return i()},set allowSanitizedHtml(n=!1){i(n),x()},get media(){return p()},set media(n){p(n),x()},$set:nt,$on:(n,f)=>st(t,n,f)},L=rs(),Q=Ee(L);{var ye=n=>{var f=ts();Ut(f,21,()=>e(U),$a,(H,S)=>{var Y=xt(),G=Ee(Y);{var te=fe=>{Fa(fe,{get allowFileMedia(){return A()},get canOpenFile(){return b()},get source(){return e(S).source},get name(){return e(S).name},get poster(){return e(S).poster}})},He=fe=>{_a(fe,{get content(){return e(S).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return o()},get onCodeBlockAction(){return v()},get onFileClick(){return _()},get canOpenFile(){return b()},get allowFileMedia(){return A()},get taskBlockRenderMode(){return m()},get chatImageThumbnails(){return w()},get forceExternalLinks(){return q()},get renderRichFencesAsCode(){return V()},get renderDiagrams(){return F()},get allowSanitizedHtml(){return i()},get media(){return p()}})};re(G,fe=>{e(S).type==="video"?fe(te):fe(He,-1)})}W(H,Y)}),T(f),X(()=>Pe(f,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),W(n,f)},he=n=>{var f=wa();let H;var S=N(f);oa(S,()=>e(I));var Y=z(S,2);r(Y),T(f),tt(f,G=>j?.(G)),tt(f,(G,te)=>ha?.(G,te),()=>({enabled:F(),workspaceId:s(),context:P})),X(()=>H=Pe(f,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",H,{"chat-image-thumbnails":w()})),Se("click",f,Ie),Se("keydown",f,Fe),Be("copy",f,De),Se("contextmenu",f,ue),Se("mouseover",f,D),Se("focusin",f,D),Be("mouseleave",f,ae),W(n,f)},xe=n=>{var f=as(),H=N(f),S=me(H,!0);T(f),X(()=>{Pe(f,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),be(S,e(ne))}),W(n,f)},Ne=n=>{var f=wa();let H;var S=N(f);oa(S,()=>e(I));var Y=z(S,2);r(Y),T(f),at(f,G=>O(le,G),()=>e(le)),tt(f,G=>j?.(G)),tt(f,(G,te)=>ha?.(G,te),()=>({enabled:F(),workspaceId:s(),context:P})),X(()=>H=Pe(f,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",H,{"chat-image-thumbnails":w()})),Se("click",f,Ie),Se("keydown",f,Fe),Be("copy",f,De),Se("contextmenu",f,ue),Se("mouseover",f,D),Se("focusin",f,D),Be("mouseleave",f,ae),W(n,f)};re(Q,n=>{e(K)?n(ye):c()?n(he,1):e(Le)==="simple"&&!i()?n(xe,2):n(Ne,-1)})}var Ae=z(Q,2);return at(Ta(Ae,{get workspaceId(){return s()},canUseMedia:ge}),n=>O(Te,n,!0),()=>e(Te)),W(a,L),it(M)}xa(["click","keydown","contextmenu","mouseover","focusin"]);class Ts{constructor(t){dt(this,"container");dt(this,"previousFocus",null);dt(this,"firstFocusable",null);dt(this,"lastFocusable",null);dt(this,"handleKeyDown");this.container=t,this.handleKeyDown=this.onKeyDown.bind(this)}activate(){this.previousFocus=document.activeElement;const t=this.container.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])');t.length>0&&(this.firstFocusable=t[0],this.lastFocusable=t[t.length-1],this.firstFocusable.focus()),document.addEventListener("keydown",this.handleKeyDown)}deactivate(){document.removeEventListener("keydown",this.handleKeyDown),this.previousFocus&&this.previousFocus.focus()}onKeyDown(t){t.key==="Tab"&&(!this.firstFocusable||!this.lastFocusable||(t.shiftKey?document.activeElement===this.firstFocusable&&(t.preventDefault(),this.lastFocusable.focus()):document.activeElement===this.lastFocusable&&(t.preventDefault(),this.firstFocusable.focus())))}}function Fs(a,t){const r=_=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(_);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},d=_=>{const[b,A,m]=[_.r,_.g,_.b].map(w=>(w=w/255,w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4)));return .2126*b+.7152*A+.0722*m},c=r(a),u=r(t);if(!c||!u)return bt.warn("Invalid color values for contrast check",{foreground:a,background:t}),{ratio:0,passes:{aa:!1,aaa:!1}};const s=d(c),o=d(u),v=(Math.max(s,o)+.05)/(Math.min(s,o)+.05);return{ratio:v,passes:{aa:v>=4.5,aaa:v>=7}}}export{Fa as C,Ts as F,Rn as H,_a as M,Rs as W,Wa as a,fa as b,An as c,Pa as d,Fs as e,Cn as f,Ps as g,Ea as h,on as r,Vn as s,Es as w};
@@ -1,4 +1,4 @@
1
- import{g as st}from"./CP_M_2ZB.js";import{g as it}from"./BFAk2LVP.js";import{s as at}from"./DFNl1TUB.js";import{b as f,ay as we,X as F,a1 as rt,aP as nt,bh as Ve,aW as fe,a_ as lt,V as ut,aZ as ot,U as ct,b0 as ht,Y as dt,z as I,r as pt,$ as At,am as ft,aU as gt,ab as mt,x as Ct,aV as bt,aI as U}from"./D87dDGLb.js";import{c as kt}from"./Cj20eHEu.js";import{aP as Et}from"./BjpkVlel.js";var Pe=(function(){var t=f(function(O,c,d,p){for(d=d||{},p=O.length;p--;d[O[p]]=c);return d},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],u=[1,26],h=[1,42],o=[1,24],g=[1,25],m=[1,32],_=[1,33],Y=[1,34],b=[1,45],me=[1,35],Ce=[1,36],be=[1,37],ke=[1,38],Ee=[1,27],Te=[1,28],ye=[1,29],De=[1,30],Fe=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],Be=[1,9],A=[1,8,9],te=[1,58],se=[1,59],ie=[1,60],ae=[1,61],re=[1,62],_e=[1,63],Se=[1,64],S=[1,8,9,41],Me=[1,77],R=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ne=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],le=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],ue=[1,103],W=[1,121],Q=[1,117],X=[1,113],j=[1,119],H=[1,114],q=[1,115],J=[1,116],Z=[1,118],$=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],oe=[12,39],Ne=[1,8,9,39,41,44,46],ce=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Le={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(c,d,p,l,C,e,ee){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(Be,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se}),{39:[1,65]},t(S,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Me,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(R,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(R,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ne,[2,133]),t(ne,[2,134]),t(ne,[2,135]),t(ne,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(Be,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se},t(A,[2,64]),{67:93,73:_e,74:Se},t(le,[2,83],{66:94,68:te,69:se,70:ie,71:ae,72:re}),t(K,[2,84]),t(K,[2,85]),t(K,[2,86]),t(K,[2,87]),t(K,[2,88]),t(Re,[2,89]),t(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:h,54:m,56:_},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ue},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:W,50:Q,59:110,60:X,82:j,84:111,85:112,86:H,87:q,88:J,89:Z,90:$},{60:[1,122]},{13:Me,55:123},t(S,[2,72]),t(S,[2,138]),{22:W,50:Q,59:124,60:X,61:[1,125],82:j,84:111,85:112,86:H,87:q,88:J,89:Z,90:$},t(Ge,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),{11:127,12:Ue,39:[2,36]},t(oe,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(oe,[2,10]),t(Ne,[2,55],{11:131,12:Ue}),t(Be,[2,7]),{9:[1,132]},t(ce,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(le,[2,82],{66:136,68:te,69:se,70:ie,71:ae,72:re}),t(le,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:h,54:m,56:_},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(S,[2,48],{39:[1,142]}),{41:[1,143]},t(S,[2,50]),{41:[2,61],45:144,51:ue},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:ze}),t(Ye,[2,107],{85:154,22:W,50:Q,60:X,82:j,86:H,87:q,88:J,89:Z,90:$}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(S,[2,71]),t(A,[2,73],{61:ze}),{60:[1,155]},t(R,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(oe,[2,12]),t(Ne,[2,56]),{1:[2,4]},t(ce,[2,69]),t(ce,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(le,[2,80]),t(S,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:h,54:m,56:_},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:h,54:m,56:_},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:h,54:m,56:_},{45:163,51:ue},t(S,[2,49]),{41:[2,62]},t(S,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:W,50:Q,60:X,82:j,84:169,85:112,86:H,87:q,88:J,89:Z,90:$},t(x,[2,110]),t(Ge,[2,75]),{14:[1,170]},t(oe,[2,11]),t(ce,[2,70]),t(S,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ue},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(Ye,[2,108],{85:154,22:W,50:Q,60:X,82:j,86:H,87:q,88:J,89:Z,90:$}),t(Ne,[2,8]),t(S,[2,51]),{41:[1,175]},t(S,[2,54]),t(A,[2,104]),t(S,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(c,d){if(d.recoverable)this.trace(c);else{var p=new Error(c);throw p.hash=d,p}},"parseError"),parse:f(function(c){var d=this,p=[0],l=[],C=[null],e=[],ee=this.table,s="",de=0,Ke=0,Ze=2,We=1,$e=e.slice.call(arguments,1),D=Object.create(this.lexer),V={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(V.yy[xe]=this.yy[xe]);D.setInput(c,V.yy),V.yy.lexer=D,V.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ve=D.yylloc;e.push(ve);var et=D.options&&D.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tt(N){p.length=p.length-2*N,C.length=C.length-N,e.length=e.length-N}f(tt,"popStack");function Qe(){var N;return N=l.pop()||D.lex()||We,typeof N!="number"&&(N instanceof Array&&(l=N,N=l.pop()),N=d.symbols_[N]||N),N}f(Qe,"lex");for(var B,P,L,Ie,G={},pe,v,Xe,Ae;;){if(P=p[p.length-1],this.defaultActions[P]?L=this.defaultActions[P]:((B===null||typeof B>"u")&&(B=Qe()),L=ee[P]&&ee[P][B]),typeof L>"u"||!L.length||!L[0]){var Oe="";Ae=[];for(pe in ee[P])this.terminals_[pe]&&pe>Ze&&Ae.push("'"+this.terminals_[pe]+"'");D.showPosition?Oe="Parse error on line "+(de+1)+`:
1
+ import{g as st}from"./C2vrWFtk.js";import{g as it}from"./BNgq2ZMa.js";import{s as at}from"./DDcw3XhX.js";import{b as f,ay as we,X as F,a1 as rt,aP as nt,bh as Ve,aW as fe,a_ as lt,V as ut,aZ as ot,U as ct,b0 as ht,Y as dt,z as I,r as pt,$ as At,am as ft,aU as gt,ab as mt,x as Ct,aV as bt,aI as U}from"./DZshGt8n.js";import{c as kt}from"./Dz_5oWBH.js";import{aP as Et}from"./B6-zId45.js";var Pe=(function(){var t=f(function(O,c,d,p){for(d=d||{},p=O.length;p--;d[O[p]]=c);return d},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],u=[1,26],h=[1,42],o=[1,24],g=[1,25],m=[1,32],_=[1,33],Y=[1,34],b=[1,45],me=[1,35],Ce=[1,36],be=[1,37],ke=[1,38],Ee=[1,27],Te=[1,28],ye=[1,29],De=[1,30],Fe=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],Be=[1,9],A=[1,8,9],te=[1,58],se=[1,59],ie=[1,60],ae=[1,61],re=[1,62],_e=[1,63],Se=[1,64],S=[1,8,9,41],Me=[1,77],R=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ne=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],le=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],ue=[1,103],W=[1,121],Q=[1,117],X=[1,113],j=[1,119],H=[1,114],q=[1,115],J=[1,116],Z=[1,118],$=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],oe=[12,39],Ne=[1,8,9,39,41,44,46],ce=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Le={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(c,d,p,l,C,e,ee){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(Be,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se}),{39:[1,65]},t(S,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Me,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(R,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(R,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ne,[2,133]),t(ne,[2,134]),t(ne,[2,135]),t(ne,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(Be,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se},t(A,[2,64]),{67:93,73:_e,74:Se},t(le,[2,83],{66:94,68:te,69:se,70:ie,71:ae,72:re}),t(K,[2,84]),t(K,[2,85]),t(K,[2,86]),t(K,[2,87]),t(K,[2,88]),t(Re,[2,89]),t(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:h,54:m,56:_},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ue},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:W,50:Q,59:110,60:X,82:j,84:111,85:112,86:H,87:q,88:J,89:Z,90:$},{60:[1,122]},{13:Me,55:123},t(S,[2,72]),t(S,[2,138]),{22:W,50:Q,59:124,60:X,61:[1,125],82:j,84:111,85:112,86:H,87:q,88:J,89:Z,90:$},t(Ge,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),{11:127,12:Ue,39:[2,36]},t(oe,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(oe,[2,10]),t(Ne,[2,55],{11:131,12:Ue}),t(Be,[2,7]),{9:[1,132]},t(ce,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(le,[2,82],{66:136,68:te,69:se,70:ie,71:ae,72:re}),t(le,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:h,54:m,56:_},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(S,[2,48],{39:[1,142]}),{41:[1,143]},t(S,[2,50]),{41:[2,61],45:144,51:ue},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:ze}),t(Ye,[2,107],{85:154,22:W,50:Q,60:X,82:j,86:H,87:q,88:J,89:Z,90:$}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(S,[2,71]),t(A,[2,73],{61:ze}),{60:[1,155]},t(R,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(oe,[2,12]),t(Ne,[2,56]),{1:[2,4]},t(ce,[2,69]),t(ce,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(le,[2,80]),t(S,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:h,54:m,56:_},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:h,54:m,56:_},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:h,54:m,56:_},{45:163,51:ue},t(S,[2,49]),{41:[2,62]},t(S,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:W,50:Q,60:X,82:j,84:169,85:112,86:H,87:q,88:J,89:Z,90:$},t(x,[2,110]),t(Ge,[2,75]),{14:[1,170]},t(oe,[2,11]),t(ce,[2,70]),t(S,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ue},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(Ye,[2,108],{85:154,22:W,50:Q,60:X,82:j,86:H,87:q,88:J,89:Z,90:$}),t(Ne,[2,8]),t(S,[2,51]),{41:[1,175]},t(S,[2,54]),t(A,[2,104]),t(S,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(c,d){if(d.recoverable)this.trace(c);else{var p=new Error(c);throw p.hash=d,p}},"parseError"),parse:f(function(c){var d=this,p=[0],l=[],C=[null],e=[],ee=this.table,s="",de=0,Ke=0,Ze=2,We=1,$e=e.slice.call(arguments,1),D=Object.create(this.lexer),V={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(V.yy[xe]=this.yy[xe]);D.setInput(c,V.yy),V.yy.lexer=D,V.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ve=D.yylloc;e.push(ve);var et=D.options&&D.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tt(N){p.length=p.length-2*N,C.length=C.length-N,e.length=e.length-N}f(tt,"popStack");function Qe(){var N;return N=l.pop()||D.lex()||We,typeof N!="number"&&(N instanceof Array&&(l=N,N=l.pop()),N=d.symbols_[N]||N),N}f(Qe,"lex");for(var B,P,L,Ie,G={},pe,v,Xe,Ae;;){if(P=p[p.length-1],this.defaultActions[P]?L=this.defaultActions[P]:((B===null||typeof B>"u")&&(B=Qe()),L=ee[P]&&ee[P][B]),typeof L>"u"||!L.length||!L[0]){var Oe="";Ae=[];for(pe in ee[P])this.terminals_[pe]&&pe>Ze&&Ae.push("'"+this.terminals_[pe]+"'");D.showPosition?Oe="Parse error on line "+(de+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+Ae.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Oe="Parse error on line "+(de+1)+": Unexpected "+(B==We?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Oe,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:ve,expected:Ae})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+B);switch(L[0]){case 1:p.push(B),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ke=D.yyleng,s=D.yytext,de=D.yylineno,ve=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],G.$=C[C.length-v],G._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},et&&(G._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),Ie=this.performAction.apply(G,[s,Ke,de,V.yy,L[1],C,e].concat($e)),typeof Ie<"u")return Ie;v&&(p=p.slice(0,-1*v*2),C=C.slice(0,-1*v),e=e.slice(0,-1*v)),p.push(this.productions_[L[1]][0]),C.push(G.$),e.push(G._$),Xe=ee[p[p.length-2]][p[p.length-1]],p.push(Xe);break;case 3:return!0}}return!0},"parse")},Je=(function(){var O={EOF:1,parseError:f(function(d,p){if(this.yy.parser)this.yy.parser.parseError(d,p);else throw new Error(d)},"parseError"),setInput:f(function(c,d){return this.yy=d||this.yy||{},this._input=c,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var d=c.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:f(function(c){var d=c.length,p=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===l.length?this.yylloc.first_column:0)+l[l.length-p.length].length-p[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(c){this.unput(this.match.slice(c))},"less"),pastInput:f(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var c=this.pastInput(),d=new Array(c.length+1).join("-");return c+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{t as pt,br as y,a_ as q,bz as bt,bt as Pt,b as Ct,bp as vt,bv as h}from"./O1QHAURn.js";import{bs as $t,ca as E,aD as n,c9 as i,a7 as J,ay as _,W as w,bn as kt,bS as St,aA as B,aB as yt}from"./DYhIMPy1.js";import{G as _t}from"./CovkQMd0.js";import{c as wt}from"./C2mPABxH.js";import{b7 as Bt}from"./BCvU0pY_.js";import{Ix as u,eu as It,ev as Wt,J2 as Rt,Jj as Ut,J7 as Tt,uS as Dt,o2 as V}from"./DNqM68dO.js";import{g as At}from"./DfN8_dcw.js";import{bA as Ft,bC as Ht,dr as xt}from"./VZEkDWIM.js";import{C as f}from"./DypB-Dwi.js";import"./SkSVpvq2.js";import"./CAyg2ijY.js";import"./BBDxUL80.js";import{bc as Mt}from"./B0f-om7y.js";import"./CR_t_AVn.js";import"./Dpl1vNuS.js";import{T as Nt}from"./jr94KtZQ.js";import"./BgCTNfXj.js";import{M as Lt}from"./C64Iv2ib.js";import{V as qt}from"./CyQ_uOB0.js";import{O as Et}from"./By_-fe-o.js";import{bR as Jt,bL as Vt,b6 as Gt}from"./BjpkVlel.js";import{i as Kt}from"./H2jLkRRS.js";var Ot=yt("<!> <!>",1);function jt(I,p){if(new.target)return pt({component:jt,...I});$t(p,!0);const W=()=>h(et,"$workspace",m),P=()=>h(Y,"$ftChanges$",m),G=()=>h(Z,"$ftCommits$",m),R=()=>h(Q,"$foldUnchanged",m),U=()=>h(z,"$lineWrapping",m),T=()=>h(X,"$diffSideBySide",m),[m,K]=Pt(),O=t=>{qt(t,{embedded:!0,get foldEnabled(){return R()},onToggleFold:()=>u.dispatch(Tt()),get wrapEnabled(){return U()},onToggleWrap:()=>u.dispatch(Ut()),get splitEnabled(){return T()},onToggleSplit:()=>u.dispatch(Rt())})},j=t=>{var e=Ot(),r=_(e);{let l=i(()=>vt.layout_diffHeader_goToFile_tooltip());wt(r,()=>Lt,(S,ht)=>{ht(S,{get icon(){return Mt},get label(){return n(l)},onclick:zt=>ft()})})}var s=St(r,2);{var d=l=>{Et(l,{get filePath(){return n($)},get workspaceId(){return o()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return n(v)}})};q(s,l=>{n($)&&l(d)})}w(t,e)},z=Jt(),Q=Vt(),X=Gt();let a=y(p,"tab",7),o=y(p,"workspaceId",7),b=y(p,"isActive",7);const C=Bt(()=>o()),Y=Ft(C),Z=Ht(C),tt=new Set([f.Committed,f.Pushed,f.PullRequest,f.Merged,f.Trunk]),D=At(),et=xt(C),nt=i(()=>W()?.worktreePath||W()?.repositoryPath||void 0);E(()=>{const t=o();if(!(!b()||!t||n(c)))return u.dispatch(It(t,"all")),()=>u.dispatch(Wt(t,"all"))});const c=i(()=>a().data?.gitRootId),A=i(()=>a().data?.gitRootPath),v=i(()=>n(A)||n(nt)),$=i(()=>a().diffPath&&n(v)?Kt(a().diffPath)?a().diffPath:`${n(v)}/${a().diffPath}`:null);function F(t,e){return!!(t.file===e||t.relativePath===e||t.relativePath&&e.endsWith("/"+t.relativePath)||t.file&&e.endsWith("/"+t.file)||t.relativePath&&t.relativePath.endsWith("/"+e)||t.file&&t.file.endsWith("/"+e))}function H(t){return!t||n(c)?null:P().find(e=>F(e,t)&&(e.stage==="staged"||e.stage==="unstaged"))??null}function at(t){if(!t||n(c))return null;let e=null,r=-1/0;for(const s of P()){if(!F(s,t)||!tt.has(s.stage)||!s.commitHash)continue;const d=s.attribution?.timestamp??0;d>=r&&(e=s,r=d)}return e}function it(t,e){return!!(t===e||e.endsWith("/"+t)||t.endsWith("/"+e))}function rt(t){if(!t||n(c))return null;for(const e of G())if(e?.hash&&e.files?.some(r=>r?.path&&it(r.path,t)))return{id:`diff-${t}-${e.hash}`,file:t,relativePath:t,status:"modified",stage:f.Committed,commitHash:e.hash,stats:{additions:0,deletions:0},attribution:{timestamp:e.timestamp??Date.now()}};return null}const x=i(()=>a().diffPath?H(a().diffPath):null),st=i(()=>{if(!a().diffPath)return 0;const t=H(a().diffPath),e=P().length;if(t){const r=t.stage==="staged"?1:t.stage==="unstaged"?2:3,s=(t.stats?.additions||0)+(t.stats?.deletions||0),d=t.attribution?.timestamp?t.attribution.timestamp%1e5:0;return r*1e6+s*1e3+d+e}return e}),g=i(()=>a().data?.change),M=i(()=>a().data?.branchBaseRef),N=i(()=>a().data?.branchBaseCommitSha),ot=i(()=>!!(n(M)||n(N))),k=i(()=>{if(n(g)?.commitHash)return n(g);if(n(x))return n(x);if(n(ot)&&n(g))return n(g);const t=at(a().diffPath??null);if(t)return t;const e=rt(a().diffPath??null);return e||(n(g)?n(g):{id:`diff-${a().diffPath}`,file:a().diffPath||"",relativePath:a().diffPath||"",status:"modified",stage:f.Unstaged,stats:{additions:0,deletions:0},attribution:{timestamp:Date.now()}})});function ft(t){if(!a().diffPath)return;const r={type:"file",title:a().diffPath.split("/").pop()||a().diffPath,closable:!0,filePath:n($)||a().diffPath,workspaceId:o()};u.dispatch(Dt(o(),r))}E(()=>{!D||!b()||D.registerActions({display:O,actions:j})});function dt(t,e){u.dispatch(V(o(),crypto.randomUUID(),{kind:"stageHunk",filePath:t,hunkPatch:e,source:"diff"}))}function ut(t,e){u.dispatch(V(o(),crypto.randomUUID(),{kind:"unstageHunk",filePath:t,hunkPatch:e,source:"diff"}))}var ct={get tab(){return a()},set tab(t){a(t),B()},get workspaceId(){return o()},set workspaceId(t){o(t),B()},get isActive(){return b()},set isActive(t){b(t),B()},$set:bt,$on:(t,e)=>Ct(p,t,e)},L=J(),lt=_(L);{var mt=t=>{var e=J(),r=_(e);_t(r,()=>a().diffPath,s=>{{let d=i(()=>T()?"split":"unified"),l=i(()=>!n(c)&&n(k).stage===f.Unstaged?dt:void 0),S=i(()=>!n(c)&&n(k).stage===f.Staged?ut:void 0);Nt(s,{get active(){return b()},get change(){return n(k)},get workspaceId(){return o()},get viewMode(){return n(d)},get foldUnchanged(){return R()},get lineWrapping(){return U()},get refreshKey(){return n(st)},get branchBaseRef(){return n(M)},get branchBaseCommitSha(){return n(N)},get gitRootId(){return n(c)},get gitRootPath(){return n(A)},get onStageHunk(){return n(l)},get onUnstageHunk(){return n(S)}})}}),w(t,e)};q(lt,t=>{a().diffPath&&t(mt)})}w(I,L);var gt=kt(ct);return K(),gt}export{jt as default};
1
+ import{t as pt,br as y,a_ as q,bz as bt,bt as Pt,b as Ct,bp as vt,bv as h}from"./O1QHAURn.js";import{bs as $t,ca as E,aD as n,c9 as i,a7 as J,ay as _,W as w,bn as kt,bS as St,aA as B,aB as yt}from"./DYhIMPy1.js";import{G as _t}from"./CovkQMd0.js";import{c as wt}from"./C2mPABxH.js";import{b7 as Bt}from"./81iikGfb.js";import{Ix as u,eu as It,ev as Wt,J2 as Rt,Jj as Ut,J7 as Tt,uS as Dt,o2 as V}from"./DNqM68dO.js";import{g as At}from"./DfN8_dcw.js";import{bA as Ft,bC as Ht,dr as xt}from"./VZEkDWIM.js";import{C as f}from"./DypB-Dwi.js";import"./vYC7k36z.js";import"./CAyg2ijY.js";import"./BBDxUL80.js";import{bc as Mt}from"./B0f-om7y.js";import"./CR_t_AVn.js";import"./ufCEqIju.js";import{T as Nt}from"./6ibsXGup.js";import"./BgCTNfXj.js";import{M as Lt}from"./C64Iv2ib.js";import{V as qt}from"./CyQ_uOB0.js";import{O as Et}from"./EYLa5b66.js";import{bR as Jt,bL as Vt,b6 as Gt}from"./B6-zId45.js";import{i as Kt}from"./H2jLkRRS.js";var Ot=yt("<!> <!>",1);function jt(I,p){if(new.target)return pt({component:jt,...I});$t(p,!0);const W=()=>h(et,"$workspace",m),P=()=>h(Y,"$ftChanges$",m),G=()=>h(Z,"$ftCommits$",m),R=()=>h(Q,"$foldUnchanged",m),U=()=>h(z,"$lineWrapping",m),T=()=>h(X,"$diffSideBySide",m),[m,K]=Pt(),O=t=>{qt(t,{embedded:!0,get foldEnabled(){return R()},onToggleFold:()=>u.dispatch(Tt()),get wrapEnabled(){return U()},onToggleWrap:()=>u.dispatch(Ut()),get splitEnabled(){return T()},onToggleSplit:()=>u.dispatch(Rt())})},j=t=>{var e=Ot(),r=_(e);{let l=i(()=>vt.layout_diffHeader_goToFile_tooltip());wt(r,()=>Lt,(S,ht)=>{ht(S,{get icon(){return Mt},get label(){return n(l)},onclick:zt=>ft()})})}var s=St(r,2);{var d=l=>{Et(l,{get filePath(){return n($)},get workspaceId(){return o()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return n(v)}})};q(s,l=>{n($)&&l(d)})}w(t,e)},z=Jt(),Q=Vt(),X=Gt();let a=y(p,"tab",7),o=y(p,"workspaceId",7),b=y(p,"isActive",7);const C=Bt(()=>o()),Y=Ft(C),Z=Ht(C),tt=new Set([f.Committed,f.Pushed,f.PullRequest,f.Merged,f.Trunk]),D=At(),et=xt(C),nt=i(()=>W()?.worktreePath||W()?.repositoryPath||void 0);E(()=>{const t=o();if(!(!b()||!t||n(c)))return u.dispatch(It(t,"all")),()=>u.dispatch(Wt(t,"all"))});const c=i(()=>a().data?.gitRootId),A=i(()=>a().data?.gitRootPath),v=i(()=>n(A)||n(nt)),$=i(()=>a().diffPath&&n(v)?Kt(a().diffPath)?a().diffPath:`${n(v)}/${a().diffPath}`:null);function F(t,e){return!!(t.file===e||t.relativePath===e||t.relativePath&&e.endsWith("/"+t.relativePath)||t.file&&e.endsWith("/"+t.file)||t.relativePath&&t.relativePath.endsWith("/"+e)||t.file&&t.file.endsWith("/"+e))}function H(t){return!t||n(c)?null:P().find(e=>F(e,t)&&(e.stage==="staged"||e.stage==="unstaged"))??null}function at(t){if(!t||n(c))return null;let e=null,r=-1/0;for(const s of P()){if(!F(s,t)||!tt.has(s.stage)||!s.commitHash)continue;const d=s.attribution?.timestamp??0;d>=r&&(e=s,r=d)}return e}function it(t,e){return!!(t===e||e.endsWith("/"+t)||t.endsWith("/"+e))}function rt(t){if(!t||n(c))return null;for(const e of G())if(e?.hash&&e.files?.some(r=>r?.path&&it(r.path,t)))return{id:`diff-${t}-${e.hash}`,file:t,relativePath:t,status:"modified",stage:f.Committed,commitHash:e.hash,stats:{additions:0,deletions:0},attribution:{timestamp:e.timestamp??Date.now()}};return null}const x=i(()=>a().diffPath?H(a().diffPath):null),st=i(()=>{if(!a().diffPath)return 0;const t=H(a().diffPath),e=P().length;if(t){const r=t.stage==="staged"?1:t.stage==="unstaged"?2:3,s=(t.stats?.additions||0)+(t.stats?.deletions||0),d=t.attribution?.timestamp?t.attribution.timestamp%1e5:0;return r*1e6+s*1e3+d+e}return e}),g=i(()=>a().data?.change),M=i(()=>a().data?.branchBaseRef),N=i(()=>a().data?.branchBaseCommitSha),ot=i(()=>!!(n(M)||n(N))),k=i(()=>{if(n(g)?.commitHash)return n(g);if(n(x))return n(x);if(n(ot)&&n(g))return n(g);const t=at(a().diffPath??null);if(t)return t;const e=rt(a().diffPath??null);return e||(n(g)?n(g):{id:`diff-${a().diffPath}`,file:a().diffPath||"",relativePath:a().diffPath||"",status:"modified",stage:f.Unstaged,stats:{additions:0,deletions:0},attribution:{timestamp:Date.now()}})});function ft(t){if(!a().diffPath)return;const r={type:"file",title:a().diffPath.split("/").pop()||a().diffPath,closable:!0,filePath:n($)||a().diffPath,workspaceId:o()};u.dispatch(Dt(o(),r))}E(()=>{!D||!b()||D.registerActions({display:O,actions:j})});function dt(t,e){u.dispatch(V(o(),crypto.randomUUID(),{kind:"stageHunk",filePath:t,hunkPatch:e,source:"diff"}))}function ut(t,e){u.dispatch(V(o(),crypto.randomUUID(),{kind:"unstageHunk",filePath:t,hunkPatch:e,source:"diff"}))}var ct={get tab(){return a()},set tab(t){a(t),B()},get workspaceId(){return o()},set workspaceId(t){o(t),B()},get isActive(){return b()},set isActive(t){b(t),B()},$set:bt,$on:(t,e)=>Ct(p,t,e)},L=J(),lt=_(L);{var mt=t=>{var e=J(),r=_(e);_t(r,()=>a().diffPath,s=>{{let d=i(()=>T()?"split":"unified"),l=i(()=>!n(c)&&n(k).stage===f.Unstaged?dt:void 0),S=i(()=>!n(c)&&n(k).stage===f.Staged?ut:void 0);Nt(s,{get active(){return b()},get change(){return n(k)},get workspaceId(){return o()},get viewMode(){return n(d)},get foldUnchanged(){return R()},get lineWrapping(){return U()},get refreshKey(){return n(st)},get branchBaseRef(){return n(M)},get branchBaseCommitSha(){return n(N)},get gitRootId(){return n(c)},get gitRootPath(){return n(A)},get onStageHunk(){return n(l)},get onUnstageHunk(){return n(S)}})}}),w(t,e)};q(lt,t=>{a().diffPath&&t(mt)})}w(I,L);var gt=kt(ct);return K(),gt}export{jt as default};
@@ -1 +1 @@
1
- import{t as ht,br as E,bz as $t,bt as It,b as bt,bv as d}from"./O1QHAURn.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as H,bV as N,aA as U}from"./DYhIMPy1.js";import{G as At}from"./CovkQMd0.js";import{b as Dt}from"./BaIAhI85.js";import{Ix as a,eu as Pt,ev as St,nV as Et,zf as Ut,nZ as _t,n_ as xt,J2 as Ft,Jj as Tt,J7 as vt,v4 as Wt,ul as Lt}from"./DNqM68dO.js";import{b7 as Ht}from"./BCvU0pY_.js";import{g as Nt}from"./DfN8_dcw.js";import{dr as Ot,bN as qt,bC as Bt,bG as Gt,bE as Mt}from"./VZEkDWIM.js";import{ae as Jt}from"./B6vq-Jnf.js";import{C as Kt}from"./BC9gAJNT.js";import{V as Vt}from"./CyQ_uOB0.js";import{bR as jt,bL as zt,b6 as Zt}from"./BjpkVlel.js";import{i as Qt}from"./H2jLkRRS.js";function Xt(_,f){if(new.target)return ht({component:Xt,..._});yt(f,!0);const O=()=>d(Y,"$gitRoots$",n),x=()=>d(X,"$workspace",n),q=()=>d(st,"$ftCommits$",n),B=()=>d(ot,"$ftOlderCommits$",n),y=()=>d(tt,"$commitRead$",n),G=()=>d(Z,"$foldUnchanged",n),M=()=>d(z,"$lineWrapping",n),J=()=>d(Q,"$diffSideBySide",n),K=()=>d(at,"$ftLoading$",n),[n,V]=It(),j=e=>{Vt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{H(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return G()},onToggleFold:()=>a.dispatch(vt()),get wrapEnabled(){return M()},onToggleWrap:()=>a.dispatch(Tt()),get splitEnabled(){return J()},onToggleSplit:()=>a.dispatch(Ft())})},z=jt(),Z=zt(),Q=Zt();let h=E(f,"tab",7),i=E(f,"workspaceId",7),$=E(f,"isActive",7);const F=Nt(),g=Ht(()=>i()),X=Ot(g),Y=Jt(g),w=crypto.randomUUID(),tt=qt(g,w),c=s(()=>h().data?.commitHash||""),T=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(r)))return a.dispatch(Pt(e,"history")),()=>a.dispatch(St(e,"history"))});const r=s(()=>h().data?.gitRootId||""),v=s(()=>t(r)&&O().find(e=>e.id===t(r))?.path||""),et=s(()=>t(v)||x()?.worktreePath||x()?.repositoryPath||""),st=Bt(g),ot=Gt(g),at=Mt(g),nt=s(()=>q()||[]),it=s(()=>B()||[]),p=s(()=>t(r)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),D=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(r)?y():void 0),l=s(()=>t(D)?.result?.kind==="commitDetails"?t(D).result.details:null),rt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),dt=s(()=>t(D)?.loading??!1);k(()=>{const e=t(c),o=i(),I=t(r);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(Et(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:I||void 0})),()=>a.dispatch(Ut(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(rt));let C=N(!0),R=N(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",I=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Qt(o)?o:`${t(et)}/${o}`,action:"modify",additions:I,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(T)}}));k(()=>{!F||!$()||F.registerActions({display:j})});const W=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(r))||!e))return a.dispatch(_t(e,W)),()=>a.dispatch(xt(e,W))});var mt={get tab(){return h()},set tab(e){h(e),U()},get workspaceId(){return i()},set workspaceId(e){i(e),U()},get isActive(){return $()},set isActive(e){$(e),U()},$set:$t,$on:(e,o)=>bt(f,e,o)},L=Ct(),gt=Rt(L);At(gt,()=>JSON.stringify([i(),t(r),t(c)]),e=>{{let o=s(()=>K()||t(dt)),I=s(()=>t(r)||void 0),u=s(()=>t(v)||void 0),ut=s(()=>({hash:t(c),message:t(T),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));Dt(Kt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(I)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Lt(i(),{agentId:b,openInAdjacentPanel:P,sourcePanelId:S}))},onOpenNote:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Wt(i(),b,{openInAdjacentPanel:P,sourcePanelId:S}))}}),b=>H(R,b,!0),()=>t(R))}}),kt(_,L);var pt=wt(mt);return V(),pt}export{Xt as default};
1
+ import{t as ht,br as E,bz as $t,bt as It,b as bt,bv as d}from"./O1QHAURn.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as H,bV as N,aA as U}from"./DYhIMPy1.js";import{G as At}from"./CovkQMd0.js";import{b as Dt}from"./BaIAhI85.js";import{Ix as a,eu as Pt,ev as St,nV as Et,zf as Ut,nZ as _t,n_ as xt,J2 as Ft,Jj as Tt,J7 as vt,v4 as Wt,ul as Lt}from"./DNqM68dO.js";import{b7 as Ht}from"./81iikGfb.js";import{g as Nt}from"./DfN8_dcw.js";import{dr as Ot,bN as qt,bC as Bt,bG as Gt,bE as Mt}from"./VZEkDWIM.js";import{ae as Jt}from"./l-XeMHVA.js";import{C as Kt}from"./BkLZMMzN.js";import{V as Vt}from"./CyQ_uOB0.js";import{bR as jt,bL as zt,b6 as Zt}from"./B6-zId45.js";import{i as Qt}from"./H2jLkRRS.js";function Xt(_,f){if(new.target)return ht({component:Xt,..._});yt(f,!0);const O=()=>d(Y,"$gitRoots$",n),x=()=>d(X,"$workspace",n),q=()=>d(st,"$ftCommits$",n),B=()=>d(ot,"$ftOlderCommits$",n),y=()=>d(tt,"$commitRead$",n),G=()=>d(Z,"$foldUnchanged",n),M=()=>d(z,"$lineWrapping",n),J=()=>d(Q,"$diffSideBySide",n),K=()=>d(at,"$ftLoading$",n),[n,V]=It(),j=e=>{Vt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{H(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return G()},onToggleFold:()=>a.dispatch(vt()),get wrapEnabled(){return M()},onToggleWrap:()=>a.dispatch(Tt()),get splitEnabled(){return J()},onToggleSplit:()=>a.dispatch(Ft())})},z=jt(),Z=zt(),Q=Zt();let h=E(f,"tab",7),i=E(f,"workspaceId",7),$=E(f,"isActive",7);const F=Nt(),g=Ht(()=>i()),X=Ot(g),Y=Jt(g),w=crypto.randomUUID(),tt=qt(g,w),c=s(()=>h().data?.commitHash||""),T=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(r)))return a.dispatch(Pt(e,"history")),()=>a.dispatch(St(e,"history"))});const r=s(()=>h().data?.gitRootId||""),v=s(()=>t(r)&&O().find(e=>e.id===t(r))?.path||""),et=s(()=>t(v)||x()?.worktreePath||x()?.repositoryPath||""),st=Bt(g),ot=Gt(g),at=Mt(g),nt=s(()=>q()||[]),it=s(()=>B()||[]),p=s(()=>t(r)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),D=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(r)?y():void 0),l=s(()=>t(D)?.result?.kind==="commitDetails"?t(D).result.details:null),rt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),dt=s(()=>t(D)?.loading??!1);k(()=>{const e=t(c),o=i(),I=t(r);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(Et(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:I||void 0})),()=>a.dispatch(Ut(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(rt));let C=N(!0),R=N(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",I=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Qt(o)?o:`${t(et)}/${o}`,action:"modify",additions:I,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(T)}}));k(()=>{!F||!$()||F.registerActions({display:j})});const W=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(r))||!e))return a.dispatch(_t(e,W)),()=>a.dispatch(xt(e,W))});var mt={get tab(){return h()},set tab(e){h(e),U()},get workspaceId(){return i()},set workspaceId(e){i(e),U()},get isActive(){return $()},set isActive(e){$(e),U()},$set:$t,$on:(e,o)=>bt(f,e,o)},L=Ct(),gt=Rt(L);At(gt,()=>JSON.stringify([i(),t(r),t(c)]),e=>{{let o=s(()=>K()||t(dt)),I=s(()=>t(r)||void 0),u=s(()=>t(v)||void 0),ut=s(()=>({hash:t(c),message:t(T),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));Dt(Kt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(I)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Lt(i(),{agentId:b,openInAdjacentPanel:P,sourcePanelId:S}))},onOpenNote:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Wt(i(),b,{openInAdjacentPanel:P,sourcePanelId:S}))}}),b=>H(R,b,!0),()=>t(R))}}),kt(_,L);var pt=wt(mt);return V(),pt}export{Xt as default};
@@ -1,4 +1,4 @@
1
- import{b as p,ay as C,aX as H,W as _,r as q,a6 as G,B as U,aV as j,X as K}from"./D87dDGLb.js";var A="",M="",O="",D=[],b=new Map,v=p(e=>j(e,K()),"sanitizeText"),y=p(e=>{switch(e.type){case"terminal":return{...e,value:v(e.value)};case"nonterminal":return{...e,name:v(e.name)};case"sequence":return{...e,elements:e.elements.map(y)};case"choice":return{...e,alternatives:e.alternatives.map(y)};case"optional":return{...e,element:y(e.element)};case"repetition":return{...e,element:y(e.element),separator:e.separator?y(e.separator):void 0};case"special":return{...e,text:v(e.text)}}},"sanitizeAstNode"),J=p(()=>{A="",M="",O="",D.length=0,b.clear(),q(),C.debug("[Railroad] Database cleared")},"clear"),Y=p(e=>{A=v(e),C.debug("[Railroad] Title set:",e)},"setTitle"),P=p(()=>A,"getTitle"),Q=p(e=>{const i={...e,name:v(e.name),definition:y(e.definition),comment:e.comment?v(e.comment):void 0};C.debug("[Railroad] Adding rule:",i.name),b.has(i.name)&&C.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),D.push(i),b.set(i.name,i)},"addRule"),Z=p(()=>D,"getRules"),V=p(e=>b.get(e),"getRule"),ee=p(e=>{M=v(e).replace(/^\s+/g,""),C.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),te=p(()=>M,"getAccTitle"),re=p(e=>{O=v(e).replace(/\n\s+/g,`
1
+ import{b as p,ay as C,aX as H,W as _,r as q,a6 as G,B as U,aV as j,X as K}from"./DZshGt8n.js";var A="",M="",O="",D=[],b=new Map,v=p(e=>j(e,K()),"sanitizeText"),y=p(e=>{switch(e.type){case"terminal":return{...e,value:v(e.value)};case"nonterminal":return{...e,name:v(e.name)};case"sequence":return{...e,elements:e.elements.map(y)};case"choice":return{...e,alternatives:e.alternatives.map(y)};case"optional":return{...e,element:y(e.element)};case"repetition":return{...e,element:y(e.element),separator:e.separator?y(e.separator):void 0};case"special":return{...e,text:v(e.text)}}},"sanitizeAstNode"),J=p(()=>{A="",M="",O="",D.length=0,b.clear(),q(),C.debug("[Railroad] Database cleared")},"clear"),Y=p(e=>{A=v(e),C.debug("[Railroad] Title set:",e)},"setTitle"),P=p(()=>A,"getTitle"),Q=p(e=>{const i={...e,name:v(e.name),definition:y(e.definition),comment:e.comment?v(e.comment):void 0};C.debug("[Railroad] Adding rule:",i.name),b.has(i.name)&&C.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),D.push(i),b.set(i.name,i)},"addRule"),Z=p(()=>D,"getRules"),V=p(e=>b.get(e),"getRule"),ee=p(e=>{M=v(e).replace(/^\s+/g,""),C.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),te=p(()=>M,"getAccTitle"),re=p(e=>{O=v(e).replace(/\n\s+/g,`
2
2
  `),C.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ie=p(()=>O,"getAccDescription"),ae=Y,ne=P,oe={clear:J,setTitle:Y,getTitle:P,addRule:Q,getRules:Z,getRule:V,setAccTitle:ee,getAccTitle:te,setAccDescription:re,getAccDescription:ie,setDiagramTitle:ae,getDiagramTitle:ne},f={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},le=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,se=/^[\w "',.-]+$/,de=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),L=p(e=>e?Object.keys(e).every(i=>i==="railroad"||de.has(i)):!1,"isRailroadStyleOptions"),ce=p(e=>e?"railroad"in e&&e.railroad?e.railroad:L(e)?e:{}:{},"extractRailroadOverrides"),me=p(e=>{if(!e||L(e))return{};const{railroad:i,svgId:n,theme:a,look:t,...r}=e;return r},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return le.test(n)?n:i},"sanitizeColorValue"),X=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return se.test(n)?n:i},"sanitizeFontFamilyValue"),F=p((e,i)=>{const n=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:i},"sanitizeNumberValue"),he=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),pe=p(e=>{const i=X(e.fontFamily,f.fontFamily),n=he(e.fontSize)??f.fontSize;return{...f,fontFamily:i,fontSize:n,terminalFill:m(e.secondBkg??e.secondaryColor,f.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,f.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,f.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,f.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,f.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,f.nonTerminalTextColor),lineColor:m(e.lineColor,f.lineColor),markerFill:m(e.lineColor,f.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,f.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,f.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,f.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,f.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,f.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,f.ruleNameColor)}},"buildThemeDefaults"),E=p(e=>{const i=_(),n={...G(),...i.themeVariables??{},...me(e)},a=pe(n),t={...i.railroad??{},...ce(e)};return{compactMode:t.compactMode??a.compactMode,padding:F(t.padding,a.padding),verticalSeparation:F(t.verticalSeparation,a.verticalSeparation),horizontalSeparation:F(t.horizontalSeparation,a.horizontalSeparation),arcRadius:F(t.arcRadius,a.arcRadius),fontSize:F(t.fontSize,a.fontSize),fontFamily:X(t.fontFamily,a.fontFamily),terminalFill:m(t.terminalFill,a.terminalFill),terminalStroke:m(t.terminalStroke,a.terminalStroke),terminalTextColor:m(t.terminalTextColor,a.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,a.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,a.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,a.nonTerminalTextColor),lineColor:m(t.lineColor,a.lineColor),strokeWidth:F(t.strokeWidth,a.strokeWidth),markerFill:m(t.markerFill,a.markerFill),commentFill:m(t.commentFill,a.commentFill),commentStroke:m(t.commentStroke,a.commentStroke),commentTextColor:m(t.commentTextColor,a.commentTextColor),specialFill:m(t.specialFill,a.specialFill),specialStroke:m(t.specialStroke,a.specialStroke),ruleNameColor:m(t.ruleNameColor,a.ruleNameColor),showMarkers:t.showMarkers??a.showMarkers,markerRadius:F(t.markerRadius,a.markerRadius)}},"buildRailroadStyleOptions"),Te=p(e=>{const{fontFamily:i,fontSize:n,terminalFill:a,terminalStroke:t,terminalTextColor:r,nonTerminalFill:o,nonTerminalStroke:g,nonTerminalTextColor:l,lineColor:s,strokeWidth:h,markerFill:u,commentFill:c,commentStroke:w,commentTextColor:d,specialFill:T,specialStroke:z,ruleNameColor:S}=E(e);return`
3
3
  .railroad-diagram {
4
4
  font-family: ${i};