@intent-hq/web 2.384.1 → 2.384.2

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 (148) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{DTdAlnvg.js → 2bsrY56g.js} +5 -5
  3. package/web/app/immutable/chunks/{BJ1Bk8co.js → 4QXQvR4H.js} +1 -1
  4. package/web/app/immutable/chunks/{CZDat5YW.js → 4oPBEC4-.js} +1 -1
  5. package/web/app/immutable/chunks/{D5reO2Y0.js → B4l71ix-.js} +1 -1
  6. package/web/app/immutable/chunks/{C1GvdDuD.js → B7RoQL2j.js} +2 -2
  7. package/web/app/immutable/chunks/{BFBQinse.js → B7h1ZmQS.js} +1 -1
  8. package/web/app/immutable/chunks/{D5i4Tktw.js → B7o2QL9R.js} +1 -1
  9. package/web/app/immutable/chunks/{4rRlR2tp.js → B8evz7o6.js} +2 -2
  10. package/web/app/immutable/chunks/{0_OkSok2.js → B8nUpMEz.js} +1 -1
  11. package/web/app/immutable/chunks/{BX_Jr21Z.js → BAAb6Ol7.js} +1 -1
  12. package/web/app/immutable/chunks/{qAXb8ucI.js → BBV_EtXR.js} +1 -1
  13. package/web/app/immutable/chunks/{5ibcqblv.js → BCx-pM-8.js} +1 -1
  14. package/web/app/immutable/chunks/{BkUPUOzV.js → BEiVNbJd.js} +1 -1
  15. package/web/app/immutable/chunks/{Tk34IzPH.js → BEjISjEF.js} +1 -1
  16. package/web/app/immutable/chunks/{jzrltQdi.js → BEpYOO0x.js} +1 -1
  17. package/web/app/immutable/chunks/{Dh_uOrf0.js → BFc0Rlfo.js} +1 -1
  18. package/web/app/immutable/chunks/{BgPJ_lbZ.js → BGN0Ete3.js} +1 -1
  19. package/web/app/immutable/chunks/{C7OV0KqB.js → BGaOyp5o.js} +1 -1
  20. package/web/app/immutable/chunks/{DvdS-8it.js → BHKaBN6i.js} +1 -1
  21. package/web/app/immutable/chunks/{JD0Hsmjx.js → BJZU-qAV.js} +1 -1
  22. package/web/app/immutable/chunks/{BACpI8G6.js → BK6CZrM5.js} +1 -1
  23. package/web/app/immutable/chunks/{BYIgLpGQ.js → BNFLngEB.js} +1 -1
  24. package/web/app/immutable/chunks/{Bmn4uqsd.js → BPZBxYco.js} +1 -1
  25. package/web/app/immutable/chunks/{B7eTEd5f.js → BRsOtr8M.js} +1 -1
  26. package/web/app/immutable/chunks/{eZPmVSmq.js → BYU-C1jV.js} +2 -2
  27. package/web/app/immutable/chunks/{ZAUoxjxb.js → BaodMpKG.js} +1 -1
  28. package/web/app/immutable/chunks/{eTRx_lEs.js → Bap7o4n5.js} +1 -1
  29. package/web/app/immutable/chunks/{Di0D97hw.js → BcffwE-d.js} +1 -1
  30. package/web/app/immutable/chunks/{Cj5p8V3Z.js → BhpCwvYl.js} +1 -1
  31. package/web/app/immutable/chunks/{CQhRmQZt.js → Bm6FDHvN.js} +1 -1
  32. package/web/app/immutable/chunks/{CFjwzuFW.js → BqU6TsU1.js} +1 -1
  33. package/web/app/immutable/chunks/{BGN2EuCq.js → Bw8_vMki.js} +1 -1
  34. package/web/app/immutable/chunks/{DRg21hWl.js → BziYv9ZW.js} +2 -2
  35. package/web/app/immutable/chunks/{BtBv0U_D.js → BzllE3aT.js} +2 -2
  36. package/web/app/immutable/chunks/{C41iTvQS.js → C4IVoYqo.js} +1 -1
  37. package/web/app/immutable/chunks/{Cxz7a3ln.js → CBZTF7Qa.js} +4 -4
  38. package/web/app/immutable/chunks/{E92QiCEr.js → CBvkahdk.js} +1 -1
  39. package/web/app/immutable/chunks/{BltFs6ST.js → CCAcpS1o.js} +2 -2
  40. package/web/app/immutable/chunks/{CGmFuvv3.js → CI-VmE1m.js} +1 -1
  41. package/web/app/immutable/chunks/{MEhQGTPs.js → CJ72QIuX.js} +3 -3
  42. package/web/app/immutable/chunks/{lDDdxVqt.js → CJHIllR1.js} +1 -1
  43. package/web/app/immutable/chunks/{BiM95_Ol.js → CK2Cr1RP.js} +1 -1
  44. package/web/app/immutable/chunks/{CDVdEpeY.js → CNzCvSR9.js} +1 -1
  45. package/web/app/immutable/chunks/{DM_kAcca.js → CP9jggxp.js} +1 -1
  46. package/web/app/immutable/chunks/{CvCS8OAf.js → CSIAWhhl.js} +1 -1
  47. package/web/app/immutable/chunks/{IjcPbG76.js → CUWtSiZ5.js} +1 -1
  48. package/web/app/immutable/chunks/{CMn1nNPl.js → CU_25eHm.js} +1 -1
  49. package/web/app/immutable/chunks/{D59epBkG.js → CYQKXGJn.js} +1 -1
  50. package/web/app/immutable/chunks/{CjsT6P1W.js → CayjT2l8.js} +1 -1
  51. package/web/app/immutable/chunks/{d7CFoqrB.js → Cb0AGw5F.js} +1 -1
  52. package/web/app/immutable/chunks/{DnkGrT83.js → CbDsELcV.js} +3 -3
  53. package/web/app/immutable/chunks/{B57eLsJv.js → CbucW-av.js} +1 -1
  54. package/web/app/immutable/chunks/{lma_Aa_Q.js → CceLSCZq.js} +1 -1
  55. package/web/app/immutable/chunks/{CdhlQsS3.js → CdMAY9xp.js} +1 -1
  56. package/web/app/immutable/chunks/{B1DQbauY.js → CgJXgMzB.js} +1 -1
  57. package/web/app/immutable/chunks/{BHXs-6um.js → ChdMCKvy.js} +1 -1
  58. package/web/app/immutable/chunks/{CrjK8LH9.js → Chx7ONT3.js} +1 -1
  59. package/web/app/immutable/chunks/{BvGyYsBI.js → Ciei8d6b.js} +3 -3
  60. package/web/app/immutable/chunks/{DvjmmZhh.js → CjyJQV6j.js} +1 -1
  61. package/web/app/immutable/chunks/{Dkgk_rvZ.js → CnHcPhIW.js} +4 -4
  62. package/web/app/immutable/chunks/{8uGKFevW.js → Ct8L3-dh.js} +1 -1
  63. package/web/app/immutable/chunks/{3BCyU2N-.js → Cw2ZnpX7.js} +1 -1
  64. package/web/app/immutable/chunks/{CEaHYCM5.js → Cx6Utm5I.js} +1 -1
  65. package/web/app/immutable/chunks/{DSTc-o8X.js → D0sQr-H_.js} +1 -1
  66. package/web/app/immutable/chunks/{ByNdLM3c.js → D2LsUZli.js} +1 -1
  67. package/web/app/immutable/chunks/{CfE9G-Vk.js → D3qs3VJZ.js} +1 -1
  68. package/web/app/immutable/chunks/{DnQOpOtg.js → D4ZMSrvm.js} +3 -3
  69. package/web/app/immutable/chunks/{BbV6R15i.js → D4g4334W.js} +1 -1
  70. package/web/app/immutable/chunks/{C8veqOP9.js → D5u143LD.js} +1 -1
  71. package/web/app/immutable/chunks/{gZ0nGq7V.js → D6Hf6lXy.js} +1 -1
  72. package/web/app/immutable/chunks/{BV8D9pH6.js → D8elUKsb.js} +1 -1
  73. package/web/app/immutable/chunks/{KmGBeLVg.js → D8s3q34H.js} +1 -1
  74. package/web/app/immutable/chunks/{CeOHBQlu.js → DAzQ7i2U.js} +1 -1
  75. package/web/app/immutable/chunks/{CQ9fljqW.js → DB0jxR-D.js} +1 -1
  76. package/web/app/immutable/chunks/{D_DdTIu0.js → DCGl0RXW.js} +7 -7
  77. package/web/app/immutable/chunks/{ClyQ7g2p.js → DGZLYT-c.js} +1 -1
  78. package/web/app/immutable/chunks/{CCej7AMq.js → DHbqsCcC.js} +1 -1
  79. package/web/app/immutable/chunks/{BMPSP6zy.js → DJM7b4MF.js} +1 -1
  80. package/web/app/immutable/chunks/{C-srtNB0.js → DKLk3Wx8.js} +1 -1
  81. package/web/app/immutable/chunks/{BMW8QkkW.js → DKrlwauu.js} +1 -1
  82. package/web/app/immutable/chunks/{DUhda8VE.js → DLKd3Oyl.js} +1 -1
  83. package/web/app/immutable/chunks/{DA6dl8M4.js → DN-MAVuE.js} +1 -1
  84. package/web/app/immutable/chunks/{CKc3ivIh.js → DOU-V4Cg.js} +2 -2
  85. package/web/app/immutable/chunks/{C2jf24pz.js → DV6uX7ff.js} +1 -1
  86. package/web/app/immutable/chunks/{DQdjZnba.js → DVL_BM5a.js} +1 -1
  87. package/web/app/immutable/chunks/{XS67_4Nj.js → DY52XPja.js} +2 -2
  88. package/web/app/immutable/chunks/{DAUcVagO.js → DZjKvOyB.js} +1 -1
  89. package/web/app/immutable/chunks/{DVuQpyKc.js → DZnKNdAN.js} +1 -1
  90. package/web/app/immutable/chunks/{P9PnSQNh.js → DaZ7K0cS.js} +3 -3
  91. package/web/app/immutable/chunks/{CTKlTmjI.js → DcACHBPs.js} +1 -1
  92. package/web/app/immutable/chunks/{BegKMnH4.js → Df-2xtN9.js} +1 -1
  93. package/web/app/immutable/chunks/{CcNZQwT1.js → Dfh8DRT0.js} +3 -3
  94. package/web/app/immutable/chunks/{XzLIP4y8.js → Dg5FvxXA.js} +1 -1
  95. package/web/app/immutable/chunks/{esAd2hCU.js → Dk0Z1pVU.js} +1 -1
  96. package/web/app/immutable/chunks/{Rz920YbF.js → DkET5D1Z.js} +1 -1
  97. package/web/app/immutable/chunks/{BXClhyCJ.js → Dl9we4aZ.js} +1 -1
  98. package/web/app/immutable/chunks/{DUkL2vjQ.js → DltbAw1B.js} +1 -1
  99. package/web/app/immutable/chunks/{BQXu3XXC.js → Dm9EHXJZ.js} +1 -1
  100. package/web/app/immutable/chunks/{HP51nVq8.js → DnozpXMO.js} +1 -1
  101. package/web/app/immutable/chunks/{Dc7e-OgI.js → DoStKyYK.js} +2 -2
  102. package/web/app/immutable/chunks/{Cr6ukNck.js → DpeQIGDn.js} +1 -1
  103. package/web/app/immutable/chunks/{CzG_0Mji.js → H9nIRlnK.js} +1 -1
  104. package/web/app/immutable/chunks/{CZ56JG-R.js → Ipu7_2rx.js} +1 -1
  105. package/web/app/immutable/chunks/{Ue4xifLs.js → McOgUz0K.js} +1 -1
  106. package/web/app/immutable/chunks/{Bk1CZ_aH.js → MsC14vMO.js} +1 -1
  107. package/web/app/immutable/chunks/{rjhGooNa.js → NZ_vlsKe.js} +1 -1
  108. package/web/app/immutable/chunks/{wsPxCWV4.js → QFC15GkG.js} +2 -2
  109. package/web/app/immutable/chunks/{ClNWpSoj.js → RzextV4B.js} +1 -1
  110. package/web/app/immutable/chunks/{evy8DaDH.js → WWSsQ21S.js} +1 -1
  111. package/web/app/immutable/chunks/{4Pag07jF.js → YTt0B0lA.js} +1 -1
  112. package/web/app/immutable/chunks/{-31r5MID.js → ZNhLMxqQ.js} +1 -1
  113. package/web/app/immutable/chunks/{Cm60YBNN.js → Za_i3D8P.js} +4 -4
  114. package/web/app/immutable/chunks/{DtO9zNSi.js → _0LhNaan.js} +1 -1
  115. package/web/app/immutable/chunks/{0vzGySSF.js → akx8_VtJ.js} +1 -1
  116. package/web/app/immutable/chunks/{DneGzq7o.js → ez7LBTR9.js} +1 -1
  117. package/web/app/immutable/chunks/{BxiKdHSR.js → gkPeOUJv.js} +1 -1
  118. package/web/app/immutable/chunks/{CRGZeiHP.js → h3LTJhAu.js} +1 -1
  119. package/web/app/immutable/chunks/{D2rdAIDv.js → hcDGwCEP.js} +1 -1
  120. package/web/app/immutable/chunks/{gIt--5se.js → jiLgt56M.js} +1 -1
  121. package/web/app/immutable/chunks/{BWM_jjc6.js → jmJoSjVa.js} +1 -1
  122. package/web/app/immutable/chunks/{B80lqB7E.js → mLzVJBUx.js} +1 -1
  123. package/web/app/immutable/chunks/{BswbJQ0U.js → oTjaecL9.js} +1 -1
  124. package/web/app/immutable/chunks/{D8mJ0i4V.js → oki3b9jv.js} +1 -1
  125. package/web/app/immutable/chunks/{DJEkkAqR.js → qLxI2L63.js} +1 -1
  126. package/web/app/immutable/chunks/{8eQog6L5.js → rYnu2FeJ.js} +1 -1
  127. package/web/app/immutable/chunks/{B4T9RExk.js → tF7VK2wM.js} +1 -1
  128. package/web/app/immutable/chunks/{zJz5NUAZ.js → wZz1J3UE.js} +1 -1
  129. package/web/app/immutable/entry/{app.BN9LppoE.js → app.CHgb5yMQ.js} +2 -2
  130. package/web/app/immutable/entry/start.CINDVXKj.js +1 -0
  131. package/web/app/immutable/nodes/{0.DuuUT7lf.js → 0.DECevrtM.js} +1 -1
  132. package/web/app/immutable/nodes/{1.CuKU_s85.js → 1.LZZdSQoJ.js} +1 -1
  133. package/web/app/immutable/nodes/{10.DkGJji_v.js → 10.KUh1filM.js} +1 -1
  134. package/web/app/immutable/nodes/{11.DswJjpxi.js → 11.D5CTYtT6.js} +1 -1
  135. package/web/app/immutable/nodes/{15.CDuV6cP7.js → 15.5st_fzCN.js} +1 -1
  136. package/web/app/immutable/nodes/{19.DvjAcoWG.js → 19.wB7XsK3B.js} +2 -2
  137. package/web/app/immutable/nodes/{2.r_yCTdWa.js → 2.C7whbYui.js} +1 -1
  138. package/web/app/immutable/nodes/{3.BzmP3XDj.js → 3.KbBbpAm6.js} +1 -1
  139. package/web/app/immutable/nodes/{4.BPX7a1xw.js → 4.C1b_QyI0.js} +1 -1
  140. package/web/app/immutable/nodes/{5.CbH1sau-.js → 5.CG-B5vOM.js} +1 -1
  141. package/web/app/immutable/nodes/{6.DXN3u4yU.js → 6.v-GnNHdu.js} +1 -1
  142. package/web/app/immutable/nodes/{7.BAFpN-hf.js → 7.D9LU-AZb.js} +1 -1
  143. package/web/app/immutable/nodes/{8.COZNLTaW.js → 8.BJP_1POW.js} +1 -1
  144. package/web/app/immutable/nodes/9.f8mHa7_b.js +14 -0
  145. package/web/app/version.json +1 -1
  146. package/web/index.html +9 -9
  147. package/web/app/immutable/entry/start.Dyk9KswN.js +0 -1
  148. package/web/app/immutable/nodes/9.VZM4RxD5.js +0 -14
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/rNjiZ_3W.js","/app/immutable/chunks/hY0rMePc.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BTc_j7Dt.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/leDczq9h.js","/app/immutable/chunks/CjZEyjv4.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BQ1b28aV.js","/app/immutable/chunks/DXdFemRu.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/B4mHWFlW.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/C9aF-Sor.js","/app/immutable/chunks/DETS1-K4.js","/app/immutable/chunks/BNN0vAFF.js","/app/immutable/chunks/BWmYJDmC.js","/app/immutable/chunks/D400ElMz.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CAmQkXZq.js","/app/immutable/chunks/B7JHU89G.js","/app/immutable/chunks/CPel99qV.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/AXE1aiRo.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/B0fUscDD.js","/app/immutable/chunks/Bygp72Wl.js","/app/immutable/chunks/CEjK2ich.js","/app/immutable/chunks/AYsHMWH3.js","/app/immutable/chunks/BwLxx4IG.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/05jEdw2V.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/Bk1CZ_aH.js","/app/immutable/chunks/-31r5MID.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/wsPxCWV4.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/Mh0PqgbP.js","/app/immutable/chunks/CcSZrbR4.js","/app/immutable/chunks/B4PfEXaO.js","/app/immutable/chunks/DZEg_JlV.js"])))=>i.map(i=>d[i]);
2
- var F=Object.defineProperty;var $=(c,e,r)=>e in c?F(c,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[e]=r;var u=(c,e,r)=>$(c,typeof e!="symbol"?e+"":e,r);import{l as _}from"./ChTqQfQN.js";import{bm as b,_ as y}from"./hY0rMePc.js";import{Jx as k,CF as M}from"./DXdFemRu.js";import{h as O}from"./rNjiZ_3W.js";import{O as W}from"./Mh0PqgbP.js";import{cO as L}from"./3BCyU2N-.js";import{u as x,b6 as U,bd as j}from"./-31r5MID.js";import{a as z}from"./CWezNj5-.js";const N={USE_DEFAULT_CONTEXT:{id:"use-default-context",type:"command",get label(){return b.chat_mentions_useDefaultContext_label()},get description(){return b.chat_mentions_useDefaultContext_description()},icon:"🔄",uri:"devspace://command/use-default-context"},CLEAR_CONTEXT:{id:"clear-context",type:"command",get label(){return b.chat_mentions_clearContext_label()},get description(){return b.chat_mentions_clearContext_description()},icon:"🗑️",uri:"devspace://command/clear-context"}};function ke(c){return"items"in c||"subgroups"in c}function B(c){if(!c||typeof c!="object")return!1;const e=c;return!(typeof e.id!="string"||typeof e.label!="string"||typeof e.uri!="string"||typeof e.type!="string"||e.subtitle!==void 0&&typeof e.subtitle!="string"||e.description!==void 0&&typeof e.description!="string"||e.icon!==void 0&&typeof e.icon!="string"||e.score!==void 0&&typeof e.score!="number"||e.group!==void 0&&typeof e.group!="string")}function g(c,e){if(!c||!e)return null;const r=c.toLowerCase(),s=e.toLowerCase();let t=0;for(let a=0;a<s.length&&t<r.length;a++)s[a]===r[t]&&t++;if(t!==r.length)return null;const i=K(r,s);return i?{score:V(r,s,i),matches:i}:null}function K(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;for(let a=s;a<e.length;a++)if(e[a]===i){r.push(a),s=a+1,n=!0;break}if(!n)return null}return r}function V(c,e,r){let s=0;s+=1;let t=0;for(let l=1;l<r.length;l++)r[l]===r[l-1]+1&&(t+=.1);s+=t;let i=0;for(const l of r)(l===0||J(e,l))&&(i+=.15);s+=i,r[0]===0&&(s+=.2);const a=(r[r.length-1]-r[0])/e.length*.3;return s-=a,Math.min(s/2.5,1)}function J(c,e){if(e===0)return!0;const r=c[e],s=c[e-1];return r===r.toUpperCase()&&s===s.toLowerCase()||!/[a-z0-9]/i.test(s)}function G(c,e){if(!c||!e)return null;if(!c.includes("/"))return g(c,e);const r=c.split("/").filter(n=>n.length>0),s=e.split("/").filter(n=>n.length>0);if(r.length===0||s.length===0)return null;const t=H(r,s);return t?{score:X(r,s,t),matches:[]}:null}function H(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;const a=t===c.length-1;for(let o=s;o<e.length;o++){const l=e[o];if(g(i,l)){r.push(o),s=o+1,n=!0;break}if(a){const p=l.split(".")[0],m=l.includes(".")?l.split(".").pop():"";if(m&&g(i,m)){r.push(o),s=o+1,n=!0;break}if(p&&g(i,p)){r.push(o),s=o+1,n=!0;break}}}if(!n)return null}return r}function X(c,e,r){let s=0;s+=1,s+=r.length*.2;let t=0;for(let n=1;n<r.length;n++)r[n]===r[n-1]+1&&(t+=.15);s+=t,r.length>0&&r[r.length-1]===e.length-1&&(s+=.3);for(let n=0;n<c.length&&n<r.length;n++){const a=c[n],o=e[r[n]];a.toLowerCase()===o.toLowerCase()&&(s+=.2)}return Math.min(s/3,1)}function R(c,e,r){return JSON.stringify({query:c,workspaceId:r.workspaceId,repoPath:r.repoPath,currentFile:r.currentFile,currentNote:r.currentNote,providers:e.map(s=>[s.id,s.getCacheKey?.(r)])})}const D="*",Ce=["member","note","agent","file","folder","script","terminal",D,"specialist"];function Q(c,e){if(e.length===0)return[...c].sort((t,i)=>(i.score??0)-(t.score??0));const r=new Map(e.map((t,i)=>[t,i])),s=r.get(D)??e.length;return c.map(t=>({candidate:t,rank:r.get(t.type)??s})).sort((t,i)=>t.rank-i.rank||(i.candidate.score??0)-(t.candidate.score??0)).map(({candidate:t})=>t)}function Y(c,e){const r=new Map;return c.filter(s=>{const t=r.get(s.type)??0;return r.set(s.type,t+1),t<e})}class Ie{constructor(e={}){u(this,"searchDebounceTimer",null);u(this,"currentAbortController",null);u(this,"cache",new Map);u(this,"config");u(this,"isSearching",!1);this.config={debounceMs:e.debounceMs??100,maxResults:e.maxResults??50,cacheMaxAge:e.cacheMaxAge??3e4,enableSemantic:e.enableSemantic??!1,enableLivePreview:e.enableLivePreview??!0,enableCollaboration:e.enableCollaboration??!1,typeOrder:e.typeOrder??[],maxResultsPerKind:e.maxResultsPerKind??20}}async search(e,r,s){this.cancelPendingSearch();const t=R(e,r,s),i=this.cache.get(t);if(i&&!this.isCacheExpired(i))return _.debug("[SearchService] Returning cached results for:",e),i.results;const n=new AbortController;this.currentAbortController=n;const a=n.signal;return new Promise((o,l)=>{this.isSearching=!0;let p=!1;const m=()=>{a.removeEventListener("abort",v),this.currentAbortController===n&&(this.currentAbortController=null,this.searchDebounceTimer=null,this.isSearching=!1)},w=f=>{p||(p=!0,m(),o(f))},d=f=>{p||(p=!0,m(),l(f))},v=()=>d(new DOMException("Search cancelled","AbortError"));a.addEventListener("abort",v,{once:!0});const h=async()=>{try{if(a.aborted){d(new DOMException("Search cancelled","AbortError"));return}_.debug("[SearchService] Searching with providers:",r.map(C=>C.id));const f=R(e,r,s),P=await Promise.all(r.map(C=>this.searchWithProvider(C,e,s,a)));if(a.aborted)return;if(f!==R(e,r,s)){w([]);return}const S=this.combineResults(P.flat()).filter(C=>B(C)),E=this.applyFuzzyMatching(e,S),A=Q(E,this.config.typeOrder),T=this.config.typeOrder.length>0?Y(A,this.config.maxResultsPerKind):A.slice(0,this.config.maxResults);this.cache.set(f,{results:T,timestamp:Date.now()}),_.debug(`[SearchService] Found ${T.length} results`),w(T)}catch(f){a.aborted?d(new DOMException("Search cancelled","AbortError")):(_.error("[SearchService] Search error:",f),d(f instanceof Error?f:new Error(String(f))))}};e?this.searchDebounceTimer=setTimeout(h,this.config.debounceMs):h()})}async searchWithProvider(e,r,s,t){try{const i={...s,signal:t},n=await e.search(r,i),a=e.scoreRelevance?.bind(e);return a?n.map(o=>({...o,score:a(o,s)})):n}catch(i){return t.aborted||_.error(`[SearchService] Provider ${e.id} search failed:`,i),[]}}combineResults(e){const r=new Set,s=[];for(const t of e){const i=`${t.type}:${t.uri}`;r.has(i)||(r.add(i),s.push(t))}return s}applyFuzzyMatching(e,r){if(!e||e.length===0)return r;const t=r.map(i=>{let n=0;const a=i.meta?.path||i.meta?.fullPath||(i.subtitle?`${i.subtitle}/${i.label}`:i.label);if(a){const l=G(e,a);l&&(n=Math.max(n,l.score*1.8))}const o=g(e,i.label);if(o&&(n=Math.max(n,o.score*1.5)),i.subtitle){const l=g(e,i.subtitle);l&&(n=Math.max(n,l.score))}if(i.description){const l=g(e,i.description);l&&(n=Math.max(n,l.score*.5))}return{...i,score:n>0?n:i.score??0}}).filter(i=>i.score>0);return t.length>0?t:r}cancelPendingSearch(){this.searchDebounceTimer&&(clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=null),this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=null)}isCacheExpired(e){return Date.now()-e.timestamp>this.config.cacheMaxAge}clearCache(){this.cache.clear()}isLoading(){return this.isSearching}destroy(){this.cancelPendingSearch(),this.clearCache()}}class Z{constructor(){u(this,"id","file");u(this,"triggers",["@file","@f"]);u(this,"default",!0);u(this,"supportsRanges",!0);u(this,"supportsLivePreview",!0);u(this,"recentFiles",new Set);u(this,"fileIconMap",{ts:"📘",tsx:"⚛️",js:"📜",jsx:"⚛️",svelte:"🔥",vue:"💚",py:"🐍",rs:"🦀",go:"🐹",java:"☕",cpp:"⚙️",c:"⚙️",h:"📎",md:"📝",json:"📋",yaml:"📋",yml:"📋",toml:"📋",xml:"📋",html:"🌐",css:"🎨",scss:"🎨",sass:"🎨",less:"🎨",sql:"🗃️",sh:"🖥️",bash:"🖥️",zsh:"🖥️",fish:"🖥️",dockerfile:"🐳",docker:"🐳",gitignore:"🚫",env:"🔐",lock:"🔒",test:"🧪",spec:"🧪"})}async search(e,r){_.debug("[FileProvider] Searching for:",{query:e,context:{workspaceId:r.workspaceId}});const s=r.workspaceId;if(!s)return[];try{const t=await O("search.fileNames",{workspaceId:s,pattern:e||"",limit:10}),n=(Array.isArray(t?.files)?t.files:[]).map(a=>{const o=a.split("/").pop()||a,l=o.split(".").pop()||"";return{id:`file-${a}`,label:o,type:"file",uri:`file:${a}`,description:a,subtitle:a,score:.5,meta:{path:a,fullPath:a,relativePath:a,extension:l,language:this.getLanguageFromExtension(l)}}});return this.deduplicateAndDistinguish(n)}catch(t){return _.error("[FileProvider] Search failed:",t),[]}}async searchRecent(e,r){if(!r.recentFiles||r.recentFiles.length===0)return[];const s=await Promise.all(r.recentFiles.filter(t=>e?g(e,t)!==null:!0).slice(0,3).map(t=>{const i=t.split("/").pop()||t,n=i.split(".").pop()||"";return this.fileToCandidate({path:t,name:i,extension:n})}));return s.forEach(t=>{this.recentFiles.add(t.uri)}),s}async searchContextual(e,r){return r.currentFile?[]:[]}async fileToCandidate(e){const r=this.getFileIcon(e.extension),s=e.path,t=this.formatPath(s);return{id:`file-${e.path}`,type:"file",label:e.name,subtitle:t,description:s,icon:r,uri:`devspace://file/${encodeURIComponent(e.path)}`,meta:{path:s,fullPath:e.path,lastModified:e.lastModified,size:e.size,language:e.language||this.getLanguageFromExtension(e.extension)}}}combineResults(...e){const r=new Set,s=[];for(const t of e)for(const i of t)r.has(i.uri)||(r.add(i.uri),s.push(i));return this.deduplicateAndDistinguish(s)}deduplicateAndDistinguish(e){const r=new Map;for(const t of e){const i=t.label;let n=r.get(i);n||(n=[],r.set(i,n)),n.push(t)}const s=[];for(const[t,i]of r.entries())if(i.length===1)s.push(i[0]);else{const n=this.distinguishDuplicates(i);s.push(...n)}return s}distinguishDuplicates(e){const r=e.map(t=>t.description||t.meta?.path||"");return e.map((t,i)=>{const n=r[i],a=r.filter((p,m)=>m!==i),o=n.split("/");let l="";for(let p=o.length;p>0;p--){const m=o.slice(-p).join("/");if(!a.some(d=>d.split("/").slice(-p).join("/")===m)||p===1){l=m;break}}return{...t,subtitle:l}})}groupResults(e){const r={recent:[],relevant:[],other:[]};for(const t of e)this.recentFiles.has(t.uri)?r.recent.push(t):(t.score??0)>.7?r.relevant.push(t):r.other.push(t);const s=[];return r.recent.length>0&&s.push(...r.recent.slice(0,3).map(t=>({...t,group:b.chat_mentions_recentFiles_group()}))),r.relevant.length>0&&s.push(...r.relevant.slice(0,5).map(t=>({...t,group:b.chat_mentions_mostRelevant_group()}))),r.other.length>0&&s.push(...r.other.slice(0,10).map(t=>({...t,group:b.chat_mentions_otherFiles_group()}))),s}scoreRelevance(e,r){let s=.5;if(this.recentFiles.has(e.uri)&&(s+=.2),r.currentFile&&e.meta?.path){const t=r.currentFile.substring(0,r.currentFile.lastIndexOf("/")),i=e.meta.path.substring(0,e.meta.path.lastIndexOf("/"));t===i&&(s+=.15)}return r.imports?.includes(e.meta?.path||"")&&(s+=.25),r.currentFile?.includes(".test.")&&e.meta?.path?.includes(".test.")&&(s+=.1),Math.min(s,1)}getGroups(){return[{id:"files-recent",label:b.chat_mentions_recentFiles_group(),icon:"🕐"},{id:"files-all",label:b.chat_mentions_allFiles_group(),icon:"📁"},{id:"files-tests",label:b.chat_mentions_testFiles_group(),icon:"🧪"}]}getFileIcon(e){return this.fileIconMap[e.toLowerCase()]||"📄"}formatPath(e){if(e.length>40){const r=e.split("/");if(r.length>2)return`.../${r.slice(-2).join("/")}`}return e}getLanguageFromExtension(e){return{ts:"typescript",tsx:"typescriptreact",js:"javascript",jsx:"javascriptreact",py:"python",rs:"rust",go:"go",java:"java",cpp:"cpp",c:"c",svelte:"svelte",vue:"vue",md:"markdown",json:"json",yaml:"yaml",yml:"yaml",html:"html",css:"css",scss:"scss",sql:"sql",sh:"shellscript"}[e.toLowerCase()]||"plaintext"}}class q{constructor(){u(this,"id","member")}getCacheKey(e){const r=k.state;return JSON.stringify({backendId:W.select(r),ownPrincipalId:r.presence.ownPrincipalId,members:e.workspaceId?L.select(r,e.workspaceId):[]})}async search(e,r){const{workspaceId:s}=r;if(!s)return[];const t=e.replace(/^@/,"").toLowerCase();return L.select(k.state,s).filter(i=>i.login.toLowerCase().includes(t)).map(i=>({id:`member-${i.principalId}`,type:"member",label:i.login,subtitle:i.identity?`${i.identity.provider==="github"?"GitHub":"GitLab"} · ${i.identity.host}`:void 0,description:i.displayName??void 0,icon:"👤",uri:`devspace://member/${encodeURIComponent(i.principalId)}?workspaceId=${encodeURIComponent(s)}`,score:.8,meta:{workspaceId:s,principalId:i.principalId,identity:i.identity,avatarUrl:i.avatarUrl??void 0}}))}}class ee{constructor(){u(this,"id","folder");u(this,"triggers",["@folder","@dir"])}async search(e,r){const s=r.workspaceId;if(!s)return[];try{const{backendRequest:t}=await y(async()=>{const{backendRequest:o}=await import("./rNjiZ_3W.js").then(l=>l.j);return{backendRequest:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),i=await t("search.fileNames",{workspaceId:s,pattern:e||"",limit:200}),n=Array.isArray(i?.files)?i.files:[],a=new Set;for(const o of n){const l=o.split("/");for(let p=1;p<l.length;p++)a.add(l.slice(0,p).join("/"))}return[...a].filter(o=>e?g(e,o.split("/").pop()||o)!==null:!0).slice(0,10).map(o=>({id:`folder-${o}`,type:"folder",label:o.split("/").pop()||o,description:o,icon:"📁",uri:`devspace://folder/${encodeURIComponent(o)}`,meta:{path:o,fullPath:o,relativePath:o}}))}catch(t){return _.debug("[FolderProvider] Failed to get folders:",t),[]}}}const te=10,re=.3;function se(c){const e=c.toLowerCase().split(/\s+/).filter(Boolean);return(r,s)=>{const t=r?g(c,r):null;if(t)return 1+t.score;if(s){const i=s.toLowerCase();if(e.every(n=>i.includes(n)))return re}return 0}}class ie{constructor(){u(this,"id","note");u(this,"triggers",["@note","@n"]);u(this,"supportsRanges",!0);u(this,"cachedNotes",[]);u(this,"lastCacheUpdate",0);u(this,"cacheTimeout",5e3)}async getSiblingWorkspaces(e){if(!e)return[];try{const[{store:r},{selectWorkspaceItems:s}]=await Promise.all([y(()=>import("./BQ1b28aV.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./C9aF-Sor.js").then(n=>n.ee),__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,7,9,23,24,0,5,10,25,26]),import.meta.url)]),t=s.select(r.state),i=t.find(n=>n.id===e);return!i||!i.repositoryPath?[]:t.filter(n=>n.id!==e&&n.repositoryPath===i.repositoryPath)}catch(r){return _.debug("[NoteProvider] Failed to get sibling workspaces:",r),[]}}async fetchNotesFromWorkspace(e,r){try{const[{store:s},{listSlimNotesRequested:t}]=await Promise.all([y(()=>import("./BQ1b28aV.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./DXdFemRu.js").then(n=>n.MF),__vite__mapDeps([12,13,2,14,15,4,8,1,16,6,3]),import.meta.url)]);return(await s.dispatch(t(e))).map(n=>({note:n,workspaceId:e,workspaceTitle:r}))}catch(s){_.debug(`[NoteProvider] Failed to fetch notes from workspace ${e}:`,s)}return[]}async search(e,r){if(!r.workspaceId)return[];const s=e.trim(),t=s?se(s):null;try{const i=await this.fetchNotesFromWorkspace(r.workspaceId),a=(await this.getSiblingWorkspaces(r.workspaceId)).map(d=>this.fetchNotesFromWorkspace(d.id,d.title)),l=(await Promise.all(a)).flat(),p=[...i,...l],w=(t?p.map(d=>({entry:d,score:t(d.note.title,d.note.content||d.note.contentPreview)})).filter(({score:d})=>d>0).sort((d,v)=>v.score-d.score):p.map(d=>({entry:d,score:void 0}))).slice(0,te).map(({entry:{note:d,workspaceId:v,workspaceTitle:h},score:f})=>{const P=v===r.workspaceId,I=P?void 0:b.chat_mentions_fromWorkspace_subtitle({workspace:h||v}),S=d.content||d.contentPreview;return{candidate:{id:d.id,type:"note",label:d.title||d.id||b.chat_mentions_untitledNote_label(),subtitle:I,description:S?`${S.substring(0,100)}...`:"",icon:"📝",uri:`devspace://note/${d.id}`,meta:{preview:S?.substring(0,200)||"",workspaceId:v,...P?{}:{isExternalLink:!0}}},score:f}});if(this.cachedNotes=w.map(({candidate:d})=>d),this.lastCacheUpdate=Date.now(),w.length>0)return w.map(({candidate:d,score:v})=>v!==void 0?{...d,score:v}:d)}catch(i){_.debug("[NoteProvider] Failed to fetch notes:",i)}return this.cachedNotes.length>0?t?this.cachedNotes.map(i=>({...i,score:t(i.label,i.meta?.preview)})).filter(i=>i.score>0).sort((i,n)=>n.score-i.score):this.cachedNotes:[]}getCachedNotes(){return Date.now()-this.lastCacheUpdate>this.cacheTimeout?[]:this.cachedNotes}}class ne{constructor(){u(this,"id","external");u(this,"triggers",["@docs","@external"])}async search(e,r){return[{id:"react-docs",label:"React Documentation",url:"https://react.dev",description:"Official React documentation"},{id:"mdn",label:"MDN Web Docs",url:"https://developer.mozilla.org",description:"Web technology documentation"},{id:"typescript",label:"TypeScript Handbook",url:"https://www.typescriptlang.org/docs/",description:"TypeScript documentation"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`external-${t.id}`,type:"external-source",label:t.label,description:t.description,icon:"📚",uri:`devspace://external/${t.id}`,meta:{url:t.url}}))}}class oe{constructor(){u(this,"id","rule");u(this,"triggers",["@rule","@intent"])}async search(e,r){return[{path:".intent/rules/cli.md",label:"CLI Rules"},{path:".intent/rules/frontend.md",label:"Frontend Rules"},{path:".intent/rules/python.md",label:"Python Rules"},{path:".intent/rules/sidecar.md",label:"Sidecar Rules"},{path:".intent/rules/systems.md",label:"Systems Rules"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:t.path,type:"rule",label:t.label,subtitle:t.path,icon:"📚",uri:`devspace://rule/${encodeURIComponent(t.path)}`,meta:{path:t.path}}))}}class ae{constructor(){u(this,"id","task");u(this,"triggers",["@task","@todo"])}async search(e,r){return[{id:"task-1",label:"Implement authentication",status:"in_progress",assignee:"John Doe"},{id:"task-2",label:"Write tests",status:"not_started",assignee:"Jane Smith"},{id:"task-3",label:"Deploy to production",status:"completed",assignee:"Bob Johnson"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`task-${t.id}`,type:"task",label:t.label,subtitle:`${t.status} • ${t.assignee}`,icon:"📋",uri:`devspace://task/${t.id}`,meta:{taskStatus:t.status,assignee:t.assignee}}))}}class ce{constructor(){u(this,"id","personality");u(this,"triggers",["@personality","@persona"]);u(this,"personalities",[{id:"auggie-personality-agent-default",name:"Agent Auggie",description:"Default helpful AI assistant",icon:"🤖",temperature:.7,model:"default",promptToken:"auggie-personality-agent-default"},{id:"auggie-personality-prototyper",name:"Prototyper Auggie",description:"Specialized in rapid prototyping",icon:"⚡",temperature:.7,model:"default",promptToken:"auggie-personality-prototyper"},{id:"auggie-personality-brainstorm",name:"Brainstorm Auggie",description:"Creative ideation and exploration",icon:"💡",temperature:.7,model:"default",promptToken:"auggie-personality-brainstorm"},{id:"auggie-personality-reviewer",name:"Reviewer Auggie",description:"Code review and feedback",icon:"🔍",temperature:.7,model:"default",promptToken:"auggie-personality-reviewer"}])}async search(e,r){return this.personalities.filter(s=>!e||g(e,s.name)!==null).map(s=>({id:s.id,type:"personality",label:s.name,subtitle:`${s.model}`,description:s.description,icon:s.icon,uri:`devspace://personality/${s.id}`,meta:{promptToken:s.promptToken}}))}}class le{constructor(){u(this,"id","command");u(this,"triggers",["@cmd","@command"])}async search(e,r){return[N.USE_DEFAULT_CONTEXT,N.CLEAR_CONTEXT].filter(t=>!e||t.label.toLowerCase().includes(e.toLowerCase()))}}class ue{constructor(){u(this,"id","terminal");u(this,"triggers",["@terminal","@term"])}async search(e,r){try{const{terminalManager:s}=await y(async()=>{const{terminalManager:h}=await import("./CPel99qV.js").then(f=>f.b);return{terminalManager:h}},__vite__mapDeps([27,2,1,28,29,3,4,30,31,12,13,14,15,8,16,6,0,5,7,9,10,32,24,33,34,35,36,37,38,39,40,25,41,42]),import.meta.url),{selectTerminals:t,selectTerminalDisplayName:i}=await y(async()=>{const{selectTerminals:h,selectTerminalDisplayName:f}=await import("./05jEdw2V.js").then(P=>P.i);return{selectTerminals:h,selectTerminalDisplayName:f}},__vite__mapDeps([41,12,13,2,14,15,4,8,1,16,6,3]),import.meta.url),a=k.state;if(!r.workspaceId)return[];const o=t.select(a,r.workspaceId),l=s.loadTerminalMetadata(r.workspaceId),p=new Set,m=[];for(const h of o)p.add(h.id),m.push({id:h.id,name:i.select(a,r.workspaceId,h.id)});for(const h of l)p.has(h.terminalId)||(p.add(h.terminalId),m.push({id:h.terminalId,name:h.title||b.terminal_quakeOverlay_terminal_fallback()}));if(m.length===0)return[];const d=e?["terminal","term"].some(h=>h.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(h)):!1;return(e&&!d?m.filter(h=>g(e,h.name)!==null):m).slice(0,10).map((h,f)=>({id:h.id,type:"terminal",label:h.name,subtitle:b.chat_mentions_terminalIndex_subtitle({index:f+1}),description:b.chat_mentions_terminalOutput_description(),icon:"💻",uri:`devspace://terminal/${encodeURIComponent(h.id)}`,meta:{workspaceId:r.workspaceId}}))}catch(s){return _.debug("[TerminalProvider] Failed to get terminals:",s),[]}}}class de{constructor(){u(this,"id","script");u(this,"triggers",["@script","@scripts"])}async search(e,r){try{const{selectScriptEntries:s}=await y(async()=>{const{selectScriptEntries:o}=await import("./Bk1CZ_aH.js");return{selectScriptEntries:o}},__vite__mapDeps([43,12,13,2,14,15,4,8,1,16,6,3,44,19,20,21,22,7,9,23,24,0,5,10,25,26,45,29,28,46,47,48,49,33,50,51,31]),import.meta.url);if(!r.workspaceId)return[];const t=s.select(k.state,r.workspaceId);if(t.length===0)return[];const n=e?["script","scripts"].some(o=>o.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(o)):!1;return(e&&!n?t.filter(o=>g(e,o.name)!==null||g(e,M(o))!==null):t).slice(0,10).map(o=>{const l=o.runtime.status,p=x(l)?b.chat_mentions_scriptRunning_label():l==="exited"?b.chat_mentions_scriptExited_label():b.chat_mentions_scriptIdle_label();return{id:o.id,type:"script",label:o.name,subtitle:`${p} · ${M(o)}`,description:b.chat_mentions_scriptOutput_description(),icon:"▶️",uri:`devspace://script/${encodeURIComponent(o.id)}`,meta:{workspaceId:r.workspaceId,command:o.command,status:x(l)?"ok":l==="exited"?"warning":void 0}}})}catch(s){return _.debug("[ScriptProvider] Failed to get scripts:",s),[]}}}class pe{constructor(){u(this,"id","specialist");u(this,"triggers",["@specialist","@spec"])}async search(e,r){try{const s=j.select(k.state);return!s||s.length===0?[]:s.filter(t=>e?g(e,t.name)!==null||g(e,t.id)!==null||g(e,t.description)!==null||g(e,"specialist")!==null:!0).map(t=>({id:`specialist-${t.id}`,type:"specialist",label:t.name,subtitle:t.description,description:t.description,icon:"👤",uri:`devspace://specialist/${encodeURIComponent(t.id)}`,group:"Specialists",score:.8,meta:{promptToken:`specialist/${t.id}`}})).slice(0,10)}catch(s){return _.debug("[SpecialistProvider] Failed to get specialists:",s),[]}}}class he{constructor(){u(this,"id","agent");u(this,"triggers",["@agent"])}async search(e,r){try{const{selectAllWorkspaceAgents:s}=await y(async()=>{const{selectAllWorkspaceAgents:a}=await import("./C9aF-Sor.js").then(o=>o.eb);return{selectAllWorkspaceAgents:a}},__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,7,9,23,24,0,5,10,25,26]),import.meta.url),t=r.workspaceId;if(!t)return[];const i=s.select(k.state,t);if(i.length===0)return[];const n=[];for(const a of i){const o=a.id,l=a.name||o,p=a.metadata?.specialist||"";let m=a.metadata?.specialistName||"";if(p&&!m){const f=U.select(k.state,p);f&&(m=f.name)}if(e){const f=g(e,l)!==null,P=g(e,"agent")!==null,I=m&&g(e,m)!==null,S=p&&g(e,p)!==null;if(!f&&!P&&!I&&!S)continue}const w=a.isStreaming?"responding":a.status||"active",d=[];m?d.push(m):d.push("Agent"),d.push(w);const v=a.messages?.length||0;v>0&&d.push(`${v} msg${v!==1?"s":""}`);const h=a.lastActivity||a.lastModified;h&&!a.isStreaming&&d.push(z(new Date(h))),n.push({id:o,type:"agent",label:l,subtitle:d.join(" · "),description:m?b.chat_mentions_specialistAgentInWorkspace_description({specialist:m}):b.chat_mentions_agentInWorkspace_description(),icon:"🤖",uri:`devspace://agent/${encodeURIComponent(o)}`,group:b.chat_mentions_agents_group(),score:.7,meta:{workspaceId:t}})}return n.slice(0,10)}catch(s){return _.debug("[AgentProvider] Failed to get agents:",s),[]}}}class me{constructor(){u(this,"providers",new Map);u(this,"defaultProviders",[]);this.register(new Z),this.register(new ee),this.register(new ie),this.register(new ne),this.register(new oe),this.register(new ae),this.register(new ce),this.register(new le),this.register(new ue),this.register(new de),this.register(new he),this.register(new pe),this.register(new q),this.defaultProviders=["file","folder","note","terminal","script","agent","specialist","member"]}register(e){this.providers.set(e.id,e),_.debug("[ProviderRegistry] Registered provider:",e.id)}unregister(e){this.providers.delete(e)}get(e){return this.providers.get(e)}getAll(){return Array.from(this.providers.values())}getDefault(){return this.defaultProviders.map(e=>this.providers.get(e)).filter(Boolean)}getByTrigger(e){return Array.from(this.providers.values()).filter(r=>r.triggers?.includes(e))}async searchAll(e,r){const s=e.startsWith("@")?this.getByTrigger(e.split(" ")[0]):this.getDefault();return(await Promise.all(s.map(i=>i.search(e,r)))).flat()}}const Te=new me;export{Ie as D,Ce as M,Q as a,ke as i,Te as p,R as s};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/rNjiZ_3W.js","/app/immutable/chunks/hY0rMePc.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BTc_j7Dt.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/leDczq9h.js","/app/immutable/chunks/CjZEyjv4.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BQ1b28aV.js","/app/immutable/chunks/DXdFemRu.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/B4mHWFlW.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/C9aF-Sor.js","/app/immutable/chunks/DETS1-K4.js","/app/immutable/chunks/BNN0vAFF.js","/app/immutable/chunks/BWmYJDmC.js","/app/immutable/chunks/D400ElMz.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CAmQkXZq.js","/app/immutable/chunks/B7JHU89G.js","/app/immutable/chunks/CPel99qV.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/AXE1aiRo.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/B0fUscDD.js","/app/immutable/chunks/Bygp72Wl.js","/app/immutable/chunks/CEjK2ich.js","/app/immutable/chunks/AYsHMWH3.js","/app/immutable/chunks/BwLxx4IG.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/05jEdw2V.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/MsC14vMO.js","/app/immutable/chunks/ZNhLMxqQ.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/QFC15GkG.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/Mh0PqgbP.js","/app/immutable/chunks/CcSZrbR4.js","/app/immutable/chunks/B4PfEXaO.js","/app/immutable/chunks/DZEg_JlV.js"])))=>i.map(i=>d[i]);
2
+ var F=Object.defineProperty;var $=(c,e,r)=>e in c?F(c,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):c[e]=r;var u=(c,e,r)=>$(c,typeof e!="symbol"?e+"":e,r);import{l as _}from"./ChTqQfQN.js";import{bm as b,_ as y}from"./hY0rMePc.js";import{Jx as k,CF as M}from"./DXdFemRu.js";import{h as O}from"./rNjiZ_3W.js";import{O as W}from"./Mh0PqgbP.js";import{cO as L}from"./Cw2ZnpX7.js";import{u as x,b6 as U,bd as j}from"./ZNhLMxqQ.js";import{a as z}from"./CWezNj5-.js";const N={USE_DEFAULT_CONTEXT:{id:"use-default-context",type:"command",get label(){return b.chat_mentions_useDefaultContext_label()},get description(){return b.chat_mentions_useDefaultContext_description()},icon:"🔄",uri:"devspace://command/use-default-context"},CLEAR_CONTEXT:{id:"clear-context",type:"command",get label(){return b.chat_mentions_clearContext_label()},get description(){return b.chat_mentions_clearContext_description()},icon:"🗑️",uri:"devspace://command/clear-context"}};function ke(c){return"items"in c||"subgroups"in c}function B(c){if(!c||typeof c!="object")return!1;const e=c;return!(typeof e.id!="string"||typeof e.label!="string"||typeof e.uri!="string"||typeof e.type!="string"||e.subtitle!==void 0&&typeof e.subtitle!="string"||e.description!==void 0&&typeof e.description!="string"||e.icon!==void 0&&typeof e.icon!="string"||e.score!==void 0&&typeof e.score!="number"||e.group!==void 0&&typeof e.group!="string")}function g(c,e){if(!c||!e)return null;const r=c.toLowerCase(),s=e.toLowerCase();let t=0;for(let a=0;a<s.length&&t<r.length;a++)s[a]===r[t]&&t++;if(t!==r.length)return null;const i=K(r,s);return i?{score:V(r,s,i),matches:i}:null}function K(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;for(let a=s;a<e.length;a++)if(e[a]===i){r.push(a),s=a+1,n=!0;break}if(!n)return null}return r}function V(c,e,r){let s=0;s+=1;let t=0;for(let l=1;l<r.length;l++)r[l]===r[l-1]+1&&(t+=.1);s+=t;let i=0;for(const l of r)(l===0||J(e,l))&&(i+=.15);s+=i,r[0]===0&&(s+=.2);const a=(r[r.length-1]-r[0])/e.length*.3;return s-=a,Math.min(s/2.5,1)}function J(c,e){if(e===0)return!0;const r=c[e],s=c[e-1];return r===r.toUpperCase()&&s===s.toLowerCase()||!/[a-z0-9]/i.test(s)}function G(c,e){if(!c||!e)return null;if(!c.includes("/"))return g(c,e);const r=c.split("/").filter(n=>n.length>0),s=e.split("/").filter(n=>n.length>0);if(r.length===0||s.length===0)return null;const t=H(r,s);return t?{score:X(r,s,t),matches:[]}:null}function H(c,e){const r=[];let s=0;for(let t=0;t<c.length;t++){const i=c[t];let n=!1;const a=t===c.length-1;for(let o=s;o<e.length;o++){const l=e[o];if(g(i,l)){r.push(o),s=o+1,n=!0;break}if(a){const p=l.split(".")[0],m=l.includes(".")?l.split(".").pop():"";if(m&&g(i,m)){r.push(o),s=o+1,n=!0;break}if(p&&g(i,p)){r.push(o),s=o+1,n=!0;break}}}if(!n)return null}return r}function X(c,e,r){let s=0;s+=1,s+=r.length*.2;let t=0;for(let n=1;n<r.length;n++)r[n]===r[n-1]+1&&(t+=.15);s+=t,r.length>0&&r[r.length-1]===e.length-1&&(s+=.3);for(let n=0;n<c.length&&n<r.length;n++){const a=c[n],o=e[r[n]];a.toLowerCase()===o.toLowerCase()&&(s+=.2)}return Math.min(s/3,1)}function R(c,e,r){return JSON.stringify({query:c,workspaceId:r.workspaceId,repoPath:r.repoPath,currentFile:r.currentFile,currentNote:r.currentNote,providers:e.map(s=>[s.id,s.getCacheKey?.(r)])})}const D="*",Ce=["member","note","agent","file","folder","script","terminal",D,"specialist"];function Q(c,e){if(e.length===0)return[...c].sort((t,i)=>(i.score??0)-(t.score??0));const r=new Map(e.map((t,i)=>[t,i])),s=r.get(D)??e.length;return c.map(t=>({candidate:t,rank:r.get(t.type)??s})).sort((t,i)=>t.rank-i.rank||(i.candidate.score??0)-(t.candidate.score??0)).map(({candidate:t})=>t)}function Y(c,e){const r=new Map;return c.filter(s=>{const t=r.get(s.type)??0;return r.set(s.type,t+1),t<e})}class Ie{constructor(e={}){u(this,"searchDebounceTimer",null);u(this,"currentAbortController",null);u(this,"cache",new Map);u(this,"config");u(this,"isSearching",!1);this.config={debounceMs:e.debounceMs??100,maxResults:e.maxResults??50,cacheMaxAge:e.cacheMaxAge??3e4,enableSemantic:e.enableSemantic??!1,enableLivePreview:e.enableLivePreview??!0,enableCollaboration:e.enableCollaboration??!1,typeOrder:e.typeOrder??[],maxResultsPerKind:e.maxResultsPerKind??20}}async search(e,r,s){this.cancelPendingSearch();const t=R(e,r,s),i=this.cache.get(t);if(i&&!this.isCacheExpired(i))return _.debug("[SearchService] Returning cached results for:",e),i.results;const n=new AbortController;this.currentAbortController=n;const a=n.signal;return new Promise((o,l)=>{this.isSearching=!0;let p=!1;const m=()=>{a.removeEventListener("abort",v),this.currentAbortController===n&&(this.currentAbortController=null,this.searchDebounceTimer=null,this.isSearching=!1)},w=f=>{p||(p=!0,m(),o(f))},d=f=>{p||(p=!0,m(),l(f))},v=()=>d(new DOMException("Search cancelled","AbortError"));a.addEventListener("abort",v,{once:!0});const h=async()=>{try{if(a.aborted){d(new DOMException("Search cancelled","AbortError"));return}_.debug("[SearchService] Searching with providers:",r.map(C=>C.id));const f=R(e,r,s),P=await Promise.all(r.map(C=>this.searchWithProvider(C,e,s,a)));if(a.aborted)return;if(f!==R(e,r,s)){w([]);return}const S=this.combineResults(P.flat()).filter(C=>B(C)),E=this.applyFuzzyMatching(e,S),A=Q(E,this.config.typeOrder),T=this.config.typeOrder.length>0?Y(A,this.config.maxResultsPerKind):A.slice(0,this.config.maxResults);this.cache.set(f,{results:T,timestamp:Date.now()}),_.debug(`[SearchService] Found ${T.length} results`),w(T)}catch(f){a.aborted?d(new DOMException("Search cancelled","AbortError")):(_.error("[SearchService] Search error:",f),d(f instanceof Error?f:new Error(String(f))))}};e?this.searchDebounceTimer=setTimeout(h,this.config.debounceMs):h()})}async searchWithProvider(e,r,s,t){try{const i={...s,signal:t},n=await e.search(r,i),a=e.scoreRelevance?.bind(e);return a?n.map(o=>({...o,score:a(o,s)})):n}catch(i){return t.aborted||_.error(`[SearchService] Provider ${e.id} search failed:`,i),[]}}combineResults(e){const r=new Set,s=[];for(const t of e){const i=`${t.type}:${t.uri}`;r.has(i)||(r.add(i),s.push(t))}return s}applyFuzzyMatching(e,r){if(!e||e.length===0)return r;const t=r.map(i=>{let n=0;const a=i.meta?.path||i.meta?.fullPath||(i.subtitle?`${i.subtitle}/${i.label}`:i.label);if(a){const l=G(e,a);l&&(n=Math.max(n,l.score*1.8))}const o=g(e,i.label);if(o&&(n=Math.max(n,o.score*1.5)),i.subtitle){const l=g(e,i.subtitle);l&&(n=Math.max(n,l.score))}if(i.description){const l=g(e,i.description);l&&(n=Math.max(n,l.score*.5))}return{...i,score:n>0?n:i.score??0}}).filter(i=>i.score>0);return t.length>0?t:r}cancelPendingSearch(){this.searchDebounceTimer&&(clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=null),this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=null)}isCacheExpired(e){return Date.now()-e.timestamp>this.config.cacheMaxAge}clearCache(){this.cache.clear()}isLoading(){return this.isSearching}destroy(){this.cancelPendingSearch(),this.clearCache()}}class Z{constructor(){u(this,"id","file");u(this,"triggers",["@file","@f"]);u(this,"default",!0);u(this,"supportsRanges",!0);u(this,"supportsLivePreview",!0);u(this,"recentFiles",new Set);u(this,"fileIconMap",{ts:"📘",tsx:"⚛️",js:"📜",jsx:"⚛️",svelte:"🔥",vue:"💚",py:"🐍",rs:"🦀",go:"🐹",java:"☕",cpp:"⚙️",c:"⚙️",h:"📎",md:"📝",json:"📋",yaml:"📋",yml:"📋",toml:"📋",xml:"📋",html:"🌐",css:"🎨",scss:"🎨",sass:"🎨",less:"🎨",sql:"🗃️",sh:"🖥️",bash:"🖥️",zsh:"🖥️",fish:"🖥️",dockerfile:"🐳",docker:"🐳",gitignore:"🚫",env:"🔐",lock:"🔒",test:"🧪",spec:"🧪"})}async search(e,r){_.debug("[FileProvider] Searching for:",{query:e,context:{workspaceId:r.workspaceId}});const s=r.workspaceId;if(!s)return[];try{const t=await O("search.fileNames",{workspaceId:s,pattern:e||"",limit:10}),n=(Array.isArray(t?.files)?t.files:[]).map(a=>{const o=a.split("/").pop()||a,l=o.split(".").pop()||"";return{id:`file-${a}`,label:o,type:"file",uri:`file:${a}`,description:a,subtitle:a,score:.5,meta:{path:a,fullPath:a,relativePath:a,extension:l,language:this.getLanguageFromExtension(l)}}});return this.deduplicateAndDistinguish(n)}catch(t){return _.error("[FileProvider] Search failed:",t),[]}}async searchRecent(e,r){if(!r.recentFiles||r.recentFiles.length===0)return[];const s=await Promise.all(r.recentFiles.filter(t=>e?g(e,t)!==null:!0).slice(0,3).map(t=>{const i=t.split("/").pop()||t,n=i.split(".").pop()||"";return this.fileToCandidate({path:t,name:i,extension:n})}));return s.forEach(t=>{this.recentFiles.add(t.uri)}),s}async searchContextual(e,r){return r.currentFile?[]:[]}async fileToCandidate(e){const r=this.getFileIcon(e.extension),s=e.path,t=this.formatPath(s);return{id:`file-${e.path}`,type:"file",label:e.name,subtitle:t,description:s,icon:r,uri:`devspace://file/${encodeURIComponent(e.path)}`,meta:{path:s,fullPath:e.path,lastModified:e.lastModified,size:e.size,language:e.language||this.getLanguageFromExtension(e.extension)}}}combineResults(...e){const r=new Set,s=[];for(const t of e)for(const i of t)r.has(i.uri)||(r.add(i.uri),s.push(i));return this.deduplicateAndDistinguish(s)}deduplicateAndDistinguish(e){const r=new Map;for(const t of e){const i=t.label;let n=r.get(i);n||(n=[],r.set(i,n)),n.push(t)}const s=[];for(const[t,i]of r.entries())if(i.length===1)s.push(i[0]);else{const n=this.distinguishDuplicates(i);s.push(...n)}return s}distinguishDuplicates(e){const r=e.map(t=>t.description||t.meta?.path||"");return e.map((t,i)=>{const n=r[i],a=r.filter((p,m)=>m!==i),o=n.split("/");let l="";for(let p=o.length;p>0;p--){const m=o.slice(-p).join("/");if(!a.some(d=>d.split("/").slice(-p).join("/")===m)||p===1){l=m;break}}return{...t,subtitle:l}})}groupResults(e){const r={recent:[],relevant:[],other:[]};for(const t of e)this.recentFiles.has(t.uri)?r.recent.push(t):(t.score??0)>.7?r.relevant.push(t):r.other.push(t);const s=[];return r.recent.length>0&&s.push(...r.recent.slice(0,3).map(t=>({...t,group:b.chat_mentions_recentFiles_group()}))),r.relevant.length>0&&s.push(...r.relevant.slice(0,5).map(t=>({...t,group:b.chat_mentions_mostRelevant_group()}))),r.other.length>0&&s.push(...r.other.slice(0,10).map(t=>({...t,group:b.chat_mentions_otherFiles_group()}))),s}scoreRelevance(e,r){let s=.5;if(this.recentFiles.has(e.uri)&&(s+=.2),r.currentFile&&e.meta?.path){const t=r.currentFile.substring(0,r.currentFile.lastIndexOf("/")),i=e.meta.path.substring(0,e.meta.path.lastIndexOf("/"));t===i&&(s+=.15)}return r.imports?.includes(e.meta?.path||"")&&(s+=.25),r.currentFile?.includes(".test.")&&e.meta?.path?.includes(".test.")&&(s+=.1),Math.min(s,1)}getGroups(){return[{id:"files-recent",label:b.chat_mentions_recentFiles_group(),icon:"🕐"},{id:"files-all",label:b.chat_mentions_allFiles_group(),icon:"📁"},{id:"files-tests",label:b.chat_mentions_testFiles_group(),icon:"🧪"}]}getFileIcon(e){return this.fileIconMap[e.toLowerCase()]||"📄"}formatPath(e){if(e.length>40){const r=e.split("/");if(r.length>2)return`.../${r.slice(-2).join("/")}`}return e}getLanguageFromExtension(e){return{ts:"typescript",tsx:"typescriptreact",js:"javascript",jsx:"javascriptreact",py:"python",rs:"rust",go:"go",java:"java",cpp:"cpp",c:"c",svelte:"svelte",vue:"vue",md:"markdown",json:"json",yaml:"yaml",yml:"yaml",html:"html",css:"css",scss:"scss",sql:"sql",sh:"shellscript"}[e.toLowerCase()]||"plaintext"}}class q{constructor(){u(this,"id","member")}getCacheKey(e){const r=k.state;return JSON.stringify({backendId:W.select(r),ownPrincipalId:r.presence.ownPrincipalId,members:e.workspaceId?L.select(r,e.workspaceId):[]})}async search(e,r){const{workspaceId:s}=r;if(!s)return[];const t=e.replace(/^@/,"").toLowerCase();return L.select(k.state,s).filter(i=>i.login.toLowerCase().includes(t)).map(i=>({id:`member-${i.principalId}`,type:"member",label:i.login,subtitle:i.identity?`${i.identity.provider==="github"?"GitHub":"GitLab"} · ${i.identity.host}`:void 0,description:i.displayName??void 0,icon:"👤",uri:`devspace://member/${encodeURIComponent(i.principalId)}?workspaceId=${encodeURIComponent(s)}`,score:.8,meta:{workspaceId:s,principalId:i.principalId,identity:i.identity,avatarUrl:i.avatarUrl??void 0}}))}}class ee{constructor(){u(this,"id","folder");u(this,"triggers",["@folder","@dir"])}async search(e,r){const s=r.workspaceId;if(!s)return[];try{const{backendRequest:t}=await y(async()=>{const{backendRequest:o}=await import("./rNjiZ_3W.js").then(l=>l.j);return{backendRequest:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),i=await t("search.fileNames",{workspaceId:s,pattern:e||"",limit:200}),n=Array.isArray(i?.files)?i.files:[],a=new Set;for(const o of n){const l=o.split("/");for(let p=1;p<l.length;p++)a.add(l.slice(0,p).join("/"))}return[...a].filter(o=>e?g(e,o.split("/").pop()||o)!==null:!0).slice(0,10).map(o=>({id:`folder-${o}`,type:"folder",label:o.split("/").pop()||o,description:o,icon:"📁",uri:`devspace://folder/${encodeURIComponent(o)}`,meta:{path:o,fullPath:o,relativePath:o}}))}catch(t){return _.debug("[FolderProvider] Failed to get folders:",t),[]}}}const te=10,re=.3;function se(c){const e=c.toLowerCase().split(/\s+/).filter(Boolean);return(r,s)=>{const t=r?g(c,r):null;if(t)return 1+t.score;if(s){const i=s.toLowerCase();if(e.every(n=>i.includes(n)))return re}return 0}}class ie{constructor(){u(this,"id","note");u(this,"triggers",["@note","@n"]);u(this,"supportsRanges",!0);u(this,"cachedNotes",[]);u(this,"lastCacheUpdate",0);u(this,"cacheTimeout",5e3)}async getSiblingWorkspaces(e){if(!e)return[];try{const[{store:r},{selectWorkspaceItems:s}]=await Promise.all([y(()=>import("./BQ1b28aV.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./C9aF-Sor.js").then(n=>n.ee),__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,7,9,23,24,0,5,10,25,26]),import.meta.url)]),t=s.select(r.state),i=t.find(n=>n.id===e);return!i||!i.repositoryPath?[]:t.filter(n=>n.id!==e&&n.repositoryPath===i.repositoryPath)}catch(r){return _.debug("[NoteProvider] Failed to get sibling workspaces:",r),[]}}async fetchNotesFromWorkspace(e,r){try{const[{store:s},{listSlimNotesRequested:t}]=await Promise.all([y(()=>import("./BQ1b28aV.js"),__vite__mapDeps([11,12,13,2,14,15,4,8,1,16,6,3,17,18]),import.meta.url),y(()=>import("./DXdFemRu.js").then(n=>n.MF),__vite__mapDeps([12,13,2,14,15,4,8,1,16,6,3]),import.meta.url)]);return(await s.dispatch(t(e))).map(n=>({note:n,workspaceId:e,workspaceTitle:r}))}catch(s){_.debug(`[NoteProvider] Failed to fetch notes from workspace ${e}:`,s)}return[]}async search(e,r){if(!r.workspaceId)return[];const s=e.trim(),t=s?se(s):null;try{const i=await this.fetchNotesFromWorkspace(r.workspaceId),a=(await this.getSiblingWorkspaces(r.workspaceId)).map(d=>this.fetchNotesFromWorkspace(d.id,d.title)),l=(await Promise.all(a)).flat(),p=[...i,...l],w=(t?p.map(d=>({entry:d,score:t(d.note.title,d.note.content||d.note.contentPreview)})).filter(({score:d})=>d>0).sort((d,v)=>v.score-d.score):p.map(d=>({entry:d,score:void 0}))).slice(0,te).map(({entry:{note:d,workspaceId:v,workspaceTitle:h},score:f})=>{const P=v===r.workspaceId,I=P?void 0:b.chat_mentions_fromWorkspace_subtitle({workspace:h||v}),S=d.content||d.contentPreview;return{candidate:{id:d.id,type:"note",label:d.title||d.id||b.chat_mentions_untitledNote_label(),subtitle:I,description:S?`${S.substring(0,100)}...`:"",icon:"📝",uri:`devspace://note/${d.id}`,meta:{preview:S?.substring(0,200)||"",workspaceId:v,...P?{}:{isExternalLink:!0}}},score:f}});if(this.cachedNotes=w.map(({candidate:d})=>d),this.lastCacheUpdate=Date.now(),w.length>0)return w.map(({candidate:d,score:v})=>v!==void 0?{...d,score:v}:d)}catch(i){_.debug("[NoteProvider] Failed to fetch notes:",i)}return this.cachedNotes.length>0?t?this.cachedNotes.map(i=>({...i,score:t(i.label,i.meta?.preview)})).filter(i=>i.score>0).sort((i,n)=>n.score-i.score):this.cachedNotes:[]}getCachedNotes(){return Date.now()-this.lastCacheUpdate>this.cacheTimeout?[]:this.cachedNotes}}class ne{constructor(){u(this,"id","external");u(this,"triggers",["@docs","@external"])}async search(e,r){return[{id:"react-docs",label:"React Documentation",url:"https://react.dev",description:"Official React documentation"},{id:"mdn",label:"MDN Web Docs",url:"https://developer.mozilla.org",description:"Web technology documentation"},{id:"typescript",label:"TypeScript Handbook",url:"https://www.typescriptlang.org/docs/",description:"TypeScript documentation"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`external-${t.id}`,type:"external-source",label:t.label,description:t.description,icon:"📚",uri:`devspace://external/${t.id}`,meta:{url:t.url}}))}}class oe{constructor(){u(this,"id","rule");u(this,"triggers",["@rule","@intent"])}async search(e,r){return[{path:".intent/rules/cli.md",label:"CLI Rules"},{path:".intent/rules/frontend.md",label:"Frontend Rules"},{path:".intent/rules/python.md",label:"Python Rules"},{path:".intent/rules/sidecar.md",label:"Sidecar Rules"},{path:".intent/rules/systems.md",label:"Systems Rules"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:t.path,type:"rule",label:t.label,subtitle:t.path,icon:"📚",uri:`devspace://rule/${encodeURIComponent(t.path)}`,meta:{path:t.path}}))}}class ae{constructor(){u(this,"id","task");u(this,"triggers",["@task","@todo"])}async search(e,r){return[{id:"task-1",label:"Implement authentication",status:"in_progress",assignee:"John Doe"},{id:"task-2",label:"Write tests",status:"not_started",assignee:"Jane Smith"},{id:"task-3",label:"Deploy to production",status:"completed",assignee:"Bob Johnson"}].filter(t=>!e||g(e,t.label)!==null).map(t=>({id:`task-${t.id}`,type:"task",label:t.label,subtitle:`${t.status} • ${t.assignee}`,icon:"📋",uri:`devspace://task/${t.id}`,meta:{taskStatus:t.status,assignee:t.assignee}}))}}class ce{constructor(){u(this,"id","personality");u(this,"triggers",["@personality","@persona"]);u(this,"personalities",[{id:"auggie-personality-agent-default",name:"Agent Auggie",description:"Default helpful AI assistant",icon:"🤖",temperature:.7,model:"default",promptToken:"auggie-personality-agent-default"},{id:"auggie-personality-prototyper",name:"Prototyper Auggie",description:"Specialized in rapid prototyping",icon:"⚡",temperature:.7,model:"default",promptToken:"auggie-personality-prototyper"},{id:"auggie-personality-brainstorm",name:"Brainstorm Auggie",description:"Creative ideation and exploration",icon:"💡",temperature:.7,model:"default",promptToken:"auggie-personality-brainstorm"},{id:"auggie-personality-reviewer",name:"Reviewer Auggie",description:"Code review and feedback",icon:"🔍",temperature:.7,model:"default",promptToken:"auggie-personality-reviewer"}])}async search(e,r){return this.personalities.filter(s=>!e||g(e,s.name)!==null).map(s=>({id:s.id,type:"personality",label:s.name,subtitle:`${s.model}`,description:s.description,icon:s.icon,uri:`devspace://personality/${s.id}`,meta:{promptToken:s.promptToken}}))}}class le{constructor(){u(this,"id","command");u(this,"triggers",["@cmd","@command"])}async search(e,r){return[N.USE_DEFAULT_CONTEXT,N.CLEAR_CONTEXT].filter(t=>!e||t.label.toLowerCase().includes(e.toLowerCase()))}}class ue{constructor(){u(this,"id","terminal");u(this,"triggers",["@terminal","@term"])}async search(e,r){try{const{terminalManager:s}=await y(async()=>{const{terminalManager:h}=await import("./CPel99qV.js").then(f=>f.b);return{terminalManager:h}},__vite__mapDeps([27,2,1,28,29,3,4,30,31,12,13,14,15,8,16,6,0,5,7,9,10,32,24,33,34,35,36,37,38,39,40,25,41,42]),import.meta.url),{selectTerminals:t,selectTerminalDisplayName:i}=await y(async()=>{const{selectTerminals:h,selectTerminalDisplayName:f}=await import("./05jEdw2V.js").then(P=>P.i);return{selectTerminals:h,selectTerminalDisplayName:f}},__vite__mapDeps([41,12,13,2,14,15,4,8,1,16,6,3]),import.meta.url),a=k.state;if(!r.workspaceId)return[];const o=t.select(a,r.workspaceId),l=s.loadTerminalMetadata(r.workspaceId),p=new Set,m=[];for(const h of o)p.add(h.id),m.push({id:h.id,name:i.select(a,r.workspaceId,h.id)});for(const h of l)p.has(h.terminalId)||(p.add(h.terminalId),m.push({id:h.terminalId,name:h.title||b.terminal_quakeOverlay_terminal_fallback()}));if(m.length===0)return[];const d=e?["terminal","term"].some(h=>h.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(h)):!1;return(e&&!d?m.filter(h=>g(e,h.name)!==null):m).slice(0,10).map((h,f)=>({id:h.id,type:"terminal",label:h.name,subtitle:b.chat_mentions_terminalIndex_subtitle({index:f+1}),description:b.chat_mentions_terminalOutput_description(),icon:"💻",uri:`devspace://terminal/${encodeURIComponent(h.id)}`,meta:{workspaceId:r.workspaceId}}))}catch(s){return _.debug("[TerminalProvider] Failed to get terminals:",s),[]}}}class de{constructor(){u(this,"id","script");u(this,"triggers",["@script","@scripts"])}async search(e,r){try{const{selectScriptEntries:s}=await y(async()=>{const{selectScriptEntries:o}=await import("./MsC14vMO.js");return{selectScriptEntries:o}},__vite__mapDeps([43,12,13,2,14,15,4,8,1,16,6,3,44,19,20,21,22,7,9,23,24,0,5,10,25,26,45,29,28,46,47,48,49,33,50,51,31]),import.meta.url);if(!r.workspaceId)return[];const t=s.select(k.state,r.workspaceId);if(t.length===0)return[];const n=e?["script","scripts"].some(o=>o.startsWith(e.toLowerCase())||e.toLowerCase().startsWith(o)):!1;return(e&&!n?t.filter(o=>g(e,o.name)!==null||g(e,M(o))!==null):t).slice(0,10).map(o=>{const l=o.runtime.status,p=x(l)?b.chat_mentions_scriptRunning_label():l==="exited"?b.chat_mentions_scriptExited_label():b.chat_mentions_scriptIdle_label();return{id:o.id,type:"script",label:o.name,subtitle:`${p} · ${M(o)}`,description:b.chat_mentions_scriptOutput_description(),icon:"▶️",uri:`devspace://script/${encodeURIComponent(o.id)}`,meta:{workspaceId:r.workspaceId,command:o.command,status:x(l)?"ok":l==="exited"?"warning":void 0}}})}catch(s){return _.debug("[ScriptProvider] Failed to get scripts:",s),[]}}}class pe{constructor(){u(this,"id","specialist");u(this,"triggers",["@specialist","@spec"])}async search(e,r){try{const s=j.select(k.state);return!s||s.length===0?[]:s.filter(t=>e?g(e,t.name)!==null||g(e,t.id)!==null||g(e,t.description)!==null||g(e,"specialist")!==null:!0).map(t=>({id:`specialist-${t.id}`,type:"specialist",label:t.name,subtitle:t.description,description:t.description,icon:"👤",uri:`devspace://specialist/${encodeURIComponent(t.id)}`,group:"Specialists",score:.8,meta:{promptToken:`specialist/${t.id}`}})).slice(0,10)}catch(s){return _.debug("[SpecialistProvider] Failed to get specialists:",s),[]}}}class he{constructor(){u(this,"id","agent");u(this,"triggers",["@agent"])}async search(e,r){try{const{selectAllWorkspaceAgents:s}=await y(async()=>{const{selectAllWorkspaceAgents:a}=await import("./C9aF-Sor.js").then(o=>o.eb);return{selectAllWorkspaceAgents:a}},__vite__mapDeps([19,6,4,1,2,12,13,14,15,8,16,3,20,21,22,7,9,23,24,0,5,10,25,26]),import.meta.url),t=r.workspaceId;if(!t)return[];const i=s.select(k.state,t);if(i.length===0)return[];const n=[];for(const a of i){const o=a.id,l=a.name||o,p=a.metadata?.specialist||"";let m=a.metadata?.specialistName||"";if(p&&!m){const f=U.select(k.state,p);f&&(m=f.name)}if(e){const f=g(e,l)!==null,P=g(e,"agent")!==null,I=m&&g(e,m)!==null,S=p&&g(e,p)!==null;if(!f&&!P&&!I&&!S)continue}const w=a.isStreaming?"responding":a.status||"active",d=[];m?d.push(m):d.push("Agent"),d.push(w);const v=a.messages?.length||0;v>0&&d.push(`${v} msg${v!==1?"s":""}`);const h=a.lastActivity||a.lastModified;h&&!a.isStreaming&&d.push(z(new Date(h))),n.push({id:o,type:"agent",label:l,subtitle:d.join(" · "),description:m?b.chat_mentions_specialistAgentInWorkspace_description({specialist:m}):b.chat_mentions_agentInWorkspace_description(),icon:"🤖",uri:`devspace://agent/${encodeURIComponent(o)}`,group:b.chat_mentions_agents_group(),score:.7,meta:{workspaceId:t}})}return n.slice(0,10)}catch(s){return _.debug("[AgentProvider] Failed to get agents:",s),[]}}}class me{constructor(){u(this,"providers",new Map);u(this,"defaultProviders",[]);this.register(new Z),this.register(new ee),this.register(new ie),this.register(new ne),this.register(new oe),this.register(new ae),this.register(new ce),this.register(new le),this.register(new ue),this.register(new de),this.register(new he),this.register(new pe),this.register(new q),this.defaultProviders=["file","folder","note","terminal","script","agent","specialist","member"]}register(e){this.providers.set(e.id,e),_.debug("[ProviderRegistry] Registered provider:",e.id)}unregister(e){this.providers.delete(e)}get(e){return this.providers.get(e)}getAll(){return Array.from(this.providers.values())}getDefault(){return this.defaultProviders.map(e=>this.providers.get(e)).filter(Boolean)}getByTrigger(e){return Array.from(this.providers.values()).filter(r=>r.triggers?.includes(e))}async searchAll(e,r){const s=e.startsWith("@")?this.getByTrigger(e.split(" ")[0]):this.getDefault();return(await Promise.all(s.map(i=>i.search(e,r)))).flat()}}const Te=new me;export{Ie as D,Ce as M,Q as a,ke as i,Te as p,R as s};
@@ -1,2 +1,2 @@
1
- import{t as ht,bo as _,bm as g,bw as bt,b as xt}from"./hY0rMePc.js";import{bs as yt,a7 as kt,ay as Q,W as p,bn as At,aA as h,a5 as q,bS as u,bl as S,bA as W,aD as e,b_ as D,bO as x,aB as k,bH as et,c9 as y,bV as at,be as wt,b$ as It}from"./3SdAC2_C.js";import{i as f}from"./BWmYJDmC.js";import{I as Bt,g as Ct}from"./D400ElMz.js";import{n as Pt,j as zt}from"./72S4_8Fo.js";import{f as F}from"./CIU_APaR.js";import"./rNjiZ_3W.js";import"./leDczq9h.js";import"./CjZEyjv4.js";import{F as rt,ce as Rt,cq as St,au as Wt}from"./DETS1-K4.js";import{A as Dt}from"./Djz9uuuA.js";import{D as Lt}from"./Ue4xifLs.js";import{Jx as $t,v0 as Ht}from"./DXdFemRu.js";import{g as Nt}from"./DgAgTFcK.js";var jt=k('<span class="type-caption shrink-0 font-medium text-success"> </span>'),qt=k('<!> <span class="type-body flex-1 truncate text-left font-medium text-foreground"> </span> <span class="type-caption shrink-0 tabular-nums"><span class="text-success"> </span> <span class="ml-1 text-danger"> </span></span> <!>',1),Ft=k("<!> ",1),Mt=k('<div class="mb-2 flex gap-1"></div>'),Ot=k('<div class="border-t border-border p-2"><!> <!></div>'),Vt=k('<div class="ws-block-widget type-body my-2 overflow-hidden rounded-md border border-border bg-card text-foreground shadow-(--elevation-raised)"><div class="flex min-h-9 items-center gap-2 px-3 py-1.5"><!> <!> <!></div> <!></div>'),Et=k('<div class="ws-block-widget type-caption my-2 text-muted-foreground"> </div>');function Jt(U,n){if(new.target)return ht({component:Jt,...U});yt(n,!0);let A=_(n,"patches",7),M=_(n,"label",23,()=>g.ui_patchBlock_label()),O=_(n,"lastApply",7),w=_(n,"linkedAgentId",7),L=_(n,"workspaceId",7),P=_(n,"applying",7,!1),$=_(n,"onApply",7),H=_(n,"onRevert",7),V=at(!1),E=at(0),z=y(()=>A()?.[e(E)]),J=y(()=>O()?.status==="success");function st(t){const o=t.split(`
1
+ import{t as ht,bo as _,bm as g,bw as bt,b as xt}from"./hY0rMePc.js";import{bs as yt,a7 as kt,ay as Q,W as p,bn as At,aA as h,a5 as q,bS as u,bl as S,bA as W,aD as e,b_ as D,bO as x,aB as k,bH as et,c9 as y,bV as at,be as wt,b$ as It}from"./3SdAC2_C.js";import{i as f}from"./BWmYJDmC.js";import{I as Bt,g as Ct}from"./D400ElMz.js";import{n as Pt,j as zt}from"./72S4_8Fo.js";import{f as F}from"./CIU_APaR.js";import"./rNjiZ_3W.js";import"./leDczq9h.js";import"./CjZEyjv4.js";import{F as rt,ce as Rt,cq as St,au as Wt}from"./DETS1-K4.js";import{A as Dt}from"./Djz9uuuA.js";import{D as Lt}from"./McOgUz0K.js";import{Jx as $t,v0 as Ht}from"./DXdFemRu.js";import{g as Nt}from"./DgAgTFcK.js";var jt=k('<span class="type-caption shrink-0 font-medium text-success"> </span>'),qt=k('<!> <span class="type-body flex-1 truncate text-left font-medium text-foreground"> </span> <span class="type-caption shrink-0 tabular-nums"><span class="text-success"> </span> <span class="ml-1 text-danger"> </span></span> <!>',1),Ft=k("<!> ",1),Mt=k('<div class="mb-2 flex gap-1"></div>'),Ot=k('<div class="border-t border-border p-2"><!> <!></div>'),Vt=k('<div class="ws-block-widget type-body my-2 overflow-hidden rounded-md border border-border bg-card text-foreground shadow-(--elevation-raised)"><div class="flex min-h-9 items-center gap-2 px-3 py-1.5"><!> <!> <!></div> <!></div>'),Et=k('<div class="ws-block-widget type-caption my-2 text-muted-foreground"> </div>');function Jt(U,n){if(new.target)return ht({component:Jt,...U});yt(n,!0);let A=_(n,"patches",7),M=_(n,"label",23,()=>g.ui_patchBlock_label()),O=_(n,"lastApply",7),w=_(n,"linkedAgentId",7),L=_(n,"workspaceId",7),P=_(n,"applying",7,!1),$=_(n,"onApply",7),H=_(n,"onRevert",7),V=at(!1),E=at(0),z=y(()=>A()?.[e(E)]),J=y(()=>O()?.status==="success");function st(t){const o=t.split(`
2
2
  `);let v=0,b=0;for(const I of o)I.startsWith("+")&&!I.startsWith("+++")?v++:I.startsWith("-")&&!I.startsWith("---")&&b++;return{addCount:v,removeCount:b}}let X=y(()=>e(z)?st(e(z).diff):{addCount:0,removeCount:0}),T=y(()=>P()?{label:g.ui_patchBlock_applying_label(),icon:null}:e(J)?{label:g.ui_patchBlock_revert_label(),icon:St}:{label:g.ui_patchBlock_apply_label(),icon:Wt}),nt=y(()=>!!($()||H()));function ot(){et(V,!e(V))}function it(){e(J)?H()?.():$()?.()}var lt={get patches(){return A()},set patches(t){A(t),h()},get label(){return M()},set label(t=g.ui_patchBlock_label()){M(t),h()},get lastApply(){return O()},set lastApply(t){O(t),h()},get linkedAgentId(){return w()},set linkedAgentId(t){w(t),h()},get workspaceId(){return L()},set workspaceId(t){L(t),h()},get applying(){return P()},set applying(t=!1){P(t),h()},get onApply(){return $()},set onApply(t){$(t),h()},get onRevert(){return H()},set onRevert(t){H(t),h()},$set:bt,$on:(t,o)=>xt(n,t,o)},Y=kt(),ct=Q(Y);{var dt=t=>{var o=Vt(),v=q(o),b=q(v);{var I=a=>{{let c=y(()=>g.ui_patchBlock_viewAgent_tooltip());F(a,{variant:"plain",size:"icon-compact",iconOnly:!0,class:"size-4! shrink-0 rounded-sm! transition-opacity hover:opacity-80",onclick:i=>{L()&&$t.dispatch(Ht(L(),{agentId:w(),...Nt(i)}))},get title(){return e(c)},children:(i,m)=>{Dt(i,{get agentId(){return w()},variant:"compact"})},$$slots:{default:!0}})}};f(b,a=>{w()&&a(I)})}var Z=u(b,2);F(Z,{variant:"plain",size:"compact",class:"h-auto! min-w-0 flex-1 shrink items-center justify-start gap-2 px-0! py-0! text-muted-foreground transition-colors hover:text-foreground",truncateLabel:!1,labelClass:"flex min-w-0 flex-1 items-center gap-2",onclick:ot,children:(a,c)=>{var i=qt(),m=Q(i);{var B=l=>{rt(l,{get icon(){return Rt},size:10,class:"text-muted-foreground"})};f(m,l=>{w()||l(B)})}var C=u(m,2),s=S(C,!0),d=u(C,2),r=q(d),R=S(r),N=u(r,2),G=S(N);W(d);var K=u(d,2);{var tt=l=>{var j=jt(),_t=S(j,!0);D(gt=>x(_t,gt),[()=>g.ui_patchBlock_applied_label()]),p(l,j)};f(K,l=>{e(J)&&l(tt)})}D(()=>{x(s,M()),x(R,`+${e(X).addCount??""}`),x(G,`-${e(X).removeCount??""}`)}),p(a,i)},$$slots:{default:!0}});var ut=u(Z,2);{var ft=a=>{F(a,{variant:"ghost-light",size:"sm",class:"type-caption shrink-0",onclick:it,get disabled(){return P()},children:(c,i)=>{var m=Ft(),B=Q(m);{var C=r=>{Bt(r,{size:12})},s=r=>{rt(r,{get icon(){return e(T).icon},size:"xs"})};f(B,r=>{P()?r(C):e(T).icon&&r(s,1)})}var d=u(B);D(()=>x(d,` ${e(T).label??""}`)),p(c,m)},$$slots:{default:!0}})};f(ut,a=>{e(nt)&&a(ft)})}W(v);var vt=u(v,2);{var mt=a=>{var c=Ot(),i=q(c);{var m=s=>{var d=Mt();Ct(d,23,A,(r,R)=>`patch-${R}-${r.filePath}`,(r,R,N)=>{{let G=y(()=>e(N)===e(E)?"default":"ghost-light");F(r,{get variant(){return e(G)},size:"sm",class:"type-caption",onclick:()=>et(E,e(N),!0),children:(K,tt)=>{wt();var l=It();D(j=>x(l,j),[()=>e(R).filePath.split("/").pop()]),p(K,l)},$$slots:{default:!0}})}}),W(d),p(s,d)};f(i,s=>{A().length>1&&s(m)})}var B=u(i,2);{var C=s=>{Lt(s,{get patch(){return e(z).diff},get fileName(){return e(z).filePath},showHeader:!0,showStats:!0,showLineNumbers:!0,maxHeight:"300px",collapsible:!1,class:"overflow-hidden rounded-sm border border-border"})};f(B,s=>{e(z)&&s(C)})}W(c),Pt(3,c,()=>zt,()=>({tier:"moderate"})),p(a,c)};f(vt,a=>{e(V)&&a(mt)})}W(o),p(t,o)},pt=t=>{var o=Et(),v=S(o,!0);D(b=>x(v,b),[()=>g.ui_patchBlock_invalid_error()]),p(t,o)};f(ct,t=>{A()?.length?t(dt):t(pt,-1)})}return p(U,Y),At(lt)}export{Jt as P};
@@ -1 +1 @@
1
- import{t as F,bo as l,bm as u,bw as G,b as H,bs as re,bq as se}from"./hY0rMePc.js";import{bs as K,a5 as P,bl as w,bS as m,bA as $,be as z,b$ as N,b_ as k,bO as _,W as v,aD as ae,bn as L,aA as p,c9 as ne,aB as B,c5 as R,a7 as oe,ay as ie}from"./3SdAC2_C.js";import{i as q}from"./BWmYJDmC.js";import{s as T}from"./leDczq9h.js";import{f as A}from"./CIU_APaR.js";import"./rNjiZ_3W.js";import{D as ce}from"./Bc3o0U_Z.js";import{a3 as de}from"./BltFs6ST.js";import{Jx as ue,j2 as le}from"./DXdFemRu.js";var pe=B('<p class="text-sm text-muted-foreground"> </p>'),W=B('<p role="status" class="text-sm"> </p>'),ge=B('<div class="flex max-h-[min(calc(100dvh-8rem),calc(var(--toast-max-height,100dvh)-2rem))] min-h-0 min-w-0 flex-col gap-3" role="group"><div class="min-h-0 space-y-3 overflow-y-auto break-words" role="region" tabindex="0"><p class="font-medium break-words"> </p> <p class="text-sm text-muted-foreground"> </p> <!> <!> <!> <!></div> <div class="flex shrink-0 flex-wrap gap-2"><!> <!> <!></div></div>');function M(y,r){if(new.target)return F({component:M,...y});K(r,!0);let a=l(r,"request",7),g=l(r,"pending",7,!1),b=l(r,"settingUp",7,!1),c=l(r,"guidance",7),d=l(r,"checklist",7),i=l(r,"onDecision",7);var C={get request(){return a()},set request(e){a(e),p()},get pending(){return g()},set pending(e=!1){g(e),p()},get settingUp(){return b()},set settingUp(e=!1){b(e),p()},get guidance(){return c()},set guidance(e){c(e),p()},get checklist(){return d()},set checklist(e){d(e),p()},get onDecision(){return i()},set onDecision(e){i(e),p()},$set:G,$on:(e,t)=>H(r,e,t)},x=ge(),f=P(x),I=P(f),U=w(I,!0),D=m(I,2),n=w(D,!0),h=m(D,2);{var Q=e=>{var t=pe(),s=w(t,!0);k(o=>_(s,o),[()=>u.desktop_consent_claimPrimary({computer:a().computerName})]),v(e,t)};q(h,e=>{a().claimsPrimary&&e(Q)})}var O=m(h,2);{var V=e=>{ce(e,{get checklist(){return d()}})};q(O,e=>{d()&&e(V)})}var S=m(O,2);{var X=e=>{var t=W(),s=w(t,!0);k(()=>_(s,c())),v(e,t)};q(S,e=>{c()&&e(X)})}var Y=m(S,2);{var Z=e=>{var t=W(),s=w(t,!0);k(o=>_(s,o),[()=>u.desktop_consent_pending()]),v(e,t)};q(Y,e=>{g()&&!b()&&e(Z)})}$(f);var j=m(f,2),E=P(j);A(E,{size:"compact",variant:"primary",get disabled(){return g()},onclick:()=>i()("allow_once"),children:(e,t)=>{z();var s=N();k(o=>_(s,o),[()=>u.desktop_consent_once()]),v(e,s)},$$slots:{default:!0}});var J=m(E,2);A(J,{size:"compact",variant:"outline",get disabled(){return g()},onclick:()=>i()("allow_future"),children:(e,t)=>{z();var s=N();k(o=>_(s,o),[()=>u.desktop_consent_future()]),v(e,s)},$$slots:{default:!0}});var ee=m(J,2);{let e=ne(()=>g()&&!b());A(ee,{size:"compact",variant:"ghost",get disabled(){return ae(e)},onclick:()=>i()("deny"),children:(t,s)=>{z();var o=N();k(te=>_(o,te),[()=>u.desktop_consent_deny()]),v(t,o)},$$slots:{default:!0}})}return $(j),$(x),k((e,t,s,o)=>{T(x,"aria-label",e),T(f,"aria-label",t),_(U,s),_(n,o)},[()=>u.desktop_consent_title(),()=>u.desktop_consent_title(),()=>u.desktop_consent_request({agent:a().agentName,computer:a().computerName}),()=>u.desktop_consent_description()]),v(y,x),L(C)}function me(y,r){if(new.target)return F({component:me,...y});K(r,!0);const a=()=>re(C,"$entry",g),[g,b]=se();let c=l(r,"workspaceId",7),d=l(r,"agentId",7),i=l(r,"requestId",7);const C=de(R(()=>c()),R(()=>d()));var x={get workspaceId(){return c()},set workspaceId(n){c(n),p()},get agentId(){return d()},set agentId(n){d(n),p()},get requestId(){return i()},set requestId(n){i(n),p()},$set:G,$on:(n,h)=>H(r,n,h)},f=oe(),I=ie(f);{var U=n=>{M(n,{get request(){return a().pending},get pending(){return a().submitting},get settingUp(){return a().settingUp},get guidance(){return a().error},get checklist(){return a().osChecklist},onDecision:h=>ue.dispatch(le(c(),d(),i(),h))})};q(I,n=>{a()?.pending?.requestId===i()&&n(U)})}v(y,f);var D=L(x);return b(),D}export{me as default};
1
+ import{t as F,bo as l,bm as u,bw as G,b as H,bs as re,bq as se}from"./hY0rMePc.js";import{bs as K,a5 as P,bl as w,bS as m,bA as $,be as z,b$ as N,b_ as k,bO as _,W as v,aD as ae,bn as L,aA as p,c9 as ne,aB as B,c5 as R,a7 as oe,ay as ie}from"./3SdAC2_C.js";import{i as q}from"./BWmYJDmC.js";import{s as T}from"./leDczq9h.js";import{f as A}from"./CIU_APaR.js";import"./rNjiZ_3W.js";import{D as ce}from"./Bc3o0U_Z.js";import{a3 as de}from"./CCAcpS1o.js";import{Jx as ue,j2 as le}from"./DXdFemRu.js";var pe=B('<p class="text-sm text-muted-foreground"> </p>'),W=B('<p role="status" class="text-sm"> </p>'),ge=B('<div class="flex max-h-[min(calc(100dvh-8rem),calc(var(--toast-max-height,100dvh)-2rem))] min-h-0 min-w-0 flex-col gap-3" role="group"><div class="min-h-0 space-y-3 overflow-y-auto break-words" role="region" tabindex="0"><p class="font-medium break-words"> </p> <p class="text-sm text-muted-foreground"> </p> <!> <!> <!> <!></div> <div class="flex shrink-0 flex-wrap gap-2"><!> <!> <!></div></div>');function M(y,r){if(new.target)return F({component:M,...y});K(r,!0);let a=l(r,"request",7),g=l(r,"pending",7,!1),b=l(r,"settingUp",7,!1),c=l(r,"guidance",7),d=l(r,"checklist",7),i=l(r,"onDecision",7);var C={get request(){return a()},set request(e){a(e),p()},get pending(){return g()},set pending(e=!1){g(e),p()},get settingUp(){return b()},set settingUp(e=!1){b(e),p()},get guidance(){return c()},set guidance(e){c(e),p()},get checklist(){return d()},set checklist(e){d(e),p()},get onDecision(){return i()},set onDecision(e){i(e),p()},$set:G,$on:(e,t)=>H(r,e,t)},x=ge(),f=P(x),I=P(f),U=w(I,!0),D=m(I,2),n=w(D,!0),h=m(D,2);{var Q=e=>{var t=pe(),s=w(t,!0);k(o=>_(s,o),[()=>u.desktop_consent_claimPrimary({computer:a().computerName})]),v(e,t)};q(h,e=>{a().claimsPrimary&&e(Q)})}var O=m(h,2);{var V=e=>{ce(e,{get checklist(){return d()}})};q(O,e=>{d()&&e(V)})}var S=m(O,2);{var X=e=>{var t=W(),s=w(t,!0);k(()=>_(s,c())),v(e,t)};q(S,e=>{c()&&e(X)})}var Y=m(S,2);{var Z=e=>{var t=W(),s=w(t,!0);k(o=>_(s,o),[()=>u.desktop_consent_pending()]),v(e,t)};q(Y,e=>{g()&&!b()&&e(Z)})}$(f);var j=m(f,2),E=P(j);A(E,{size:"compact",variant:"primary",get disabled(){return g()},onclick:()=>i()("allow_once"),children:(e,t)=>{z();var s=N();k(o=>_(s,o),[()=>u.desktop_consent_once()]),v(e,s)},$$slots:{default:!0}});var J=m(E,2);A(J,{size:"compact",variant:"outline",get disabled(){return g()},onclick:()=>i()("allow_future"),children:(e,t)=>{z();var s=N();k(o=>_(s,o),[()=>u.desktop_consent_future()]),v(e,s)},$$slots:{default:!0}});var ee=m(J,2);{let e=ne(()=>g()&&!b());A(ee,{size:"compact",variant:"ghost",get disabled(){return ae(e)},onclick:()=>i()("deny"),children:(t,s)=>{z();var o=N();k(te=>_(o,te),[()=>u.desktop_consent_deny()]),v(t,o)},$$slots:{default:!0}})}return $(j),$(x),k((e,t,s,o)=>{T(x,"aria-label",e),T(f,"aria-label",t),_(U,s),_(n,o)},[()=>u.desktop_consent_title(),()=>u.desktop_consent_title(),()=>u.desktop_consent_request({agent:a().agentName,computer:a().computerName}),()=>u.desktop_consent_description()]),v(y,x),L(C)}function me(y,r){if(new.target)return F({component:me,...y});K(r,!0);const a=()=>re(C,"$entry",g),[g,b]=se();let c=l(r,"workspaceId",7),d=l(r,"agentId",7),i=l(r,"requestId",7);const C=de(R(()=>c()),R(()=>d()));var x={get workspaceId(){return c()},set workspaceId(n){c(n),p()},get agentId(){return d()},set agentId(n){d(n),p()},get requestId(){return i()},set requestId(n){i(n),p()},$set:G,$on:(n,h)=>H(r,n,h)},f=oe(),I=ie(f);{var U=n=>{M(n,{get request(){return a().pending},get pending(){return a().submitting},get settingUp(){return a().settingUp},get guidance(){return a().error},get checklist(){return a().osChecklist},onDecision:h=>ue.dispatch(le(c(),d(),i(),h))})};q(I,n=>{a()?.pending?.requestId===i()&&n(U)})}v(y,f);var D=L(x);return b(),D}export{me as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/C2jf24pz.js","/app/immutable/chunks/hY0rMePc.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BWmYJDmC.js","/app/immutable/chunks/CXul4WJt.js","/app/immutable/chunks/IjcPbG76.js","/app/immutable/chunks/D400ElMz.js","/app/immutable/chunks/CjZEyjv4.js","/app/immutable/chunks/leDczq9h.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BNN0vAFF.js","/app/immutable/chunks/x_GKKTQV.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIU_APaR.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/rNjiZ_3W.js","/app/immutable/chunks/BTc_j7Dt.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/B7JHU89G.js","/app/immutable/chunks/BXT21uPn.js","/app/immutable/chunks/DXdFemRu.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/B4mHWFlW.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/DETS1-K4.js","/app/immutable/chunks/72S4_8Fo.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CbaFGz2w.js","/app/immutable/chunks/DB4f78Ip.js","/app/immutable/chunks/CmbheRhJ.js","/app/immutable/chunks/COB2k0Aa.js","/app/immutable/chunks/DXB4L22V.js","/app/immutable/chunks/BEvFtidS.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/CbqBbwIN.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/uAXEbxa8.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/D0I7VQ8a.js","/app/immutable/chunks/DnHJL326.js","/app/immutable/chunks/D2Rapl2X.js","/app/immutable/chunks/O63l2zGE.js","/app/immutable/chunks/BjLb7AHW.js","/app/immutable/chunks/Dv-bjgEk.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/-J-Hmuck.js","/app/immutable/assets/SettingsPage.CKvEnOAL.css","/app/immutable/chunks/DQdjZnba.js","/app/immutable/chunks/goTpbPhD.js","/app/immutable/chunks/MEhQGTPs.js","/app/immutable/chunks/AXE1aiRo.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/B0fUscDD.js","/app/immutable/chunks/C9aF-Sor.js","/app/immutable/chunks/CAmQkXZq.js","/app/immutable/chunks/D-62MVd3.js","/app/immutable/chunks/Cb6nJOfB.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BJ1Bk8co.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/-31r5MID.js","/app/immutable/chunks/wsPxCWV4.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/Mh0PqgbP.js","/app/immutable/chunks/CcSZrbR4.js","/app/immutable/chunks/B4PfEXaO.js","/app/immutable/chunks/DZEg_JlV.js","/app/immutable/chunks/1MN-thc1.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/DxDZbRkP.js","/app/immutable/chunks/CKc3ivIh.js","/app/immutable/chunks/CCPr9hs_.js","/app/immutable/chunks/CQcEqK4G.js","/app/immutable/chunks/CpimfPxg.js","/app/immutable/chunks/Di3TE7pQ.js","/app/immutable/chunks/BXyd6A9p.js","/app/immutable/chunks/0tWsVa0y.js","/app/immutable/chunks/C6g7LzDB.js","/app/immutable/assets/DockScreenshotEditorWindow.DNkBhnHK.css","/app/immutable/assets/dock-tokens.C3wiNkmL.css","/app/immutable/chunks/3BCyU2N-.js","/app/immutable/chunks/DnQOpOtg.js","/app/immutable/chunks/X-wIiWCo.js","/app/immutable/chunks/CmImGhNY.js","/app/immutable/assets/select-viewport.CV-KWLNP.css","/app/immutable/chunks/C9fPgzDG.js","/app/immutable/chunks/DpmMYKqt.js","/app/immutable/chunks/DU4sJYad.js","/app/immutable/chunks/I8XhKsSY.js","/app/immutable/chunks/BzW_moTi.js","/app/immutable/chunks/BVlMQ1xQ.js","/app/immutable/chunks/BX_Jr21Z.js","/app/immutable/chunks/DhHLTWgE.js","/app/immutable/chunks/Bb9tq6rt.js","/app/immutable/chunks/BDPP0w0q.js","/app/immutable/assets/checkbox.D429NJZk.css","/app/immutable/chunks/BJTYazIn.js","/app/immutable/chunks/HP51nVq8.js","/app/immutable/chunks/DTdAlnvg.js","/app/immutable/chunks/lma_Aa_Q.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/BiM95_Ol.js","/app/immutable/chunks/CWezNj5-.js","/app/immutable/assets/directory-picker-service.Eai7L_H2.css","/app/immutable/chunks/BvGyYsBI.js","/app/immutable/chunks/BNm3whw0.js","/app/immutable/chunks/C1GvdDuD.js","/app/immutable/chunks/Bcb1iqQJ.js","/app/immutable/chunks/Djz9uuuA.js","/app/immutable/assets/AgentAvatar.CZKKHyEm.css","/app/immutable/assets/avatar-state.BzFIexJN.css","/app/immutable/chunks/k863GLf6.js","/app/immutable/assets/TipTapEditor.BmeA7Qtk.css","/app/immutable/chunks/C4VXXfVL.js","/app/immutable/chunks/BmALJKBY.js","/app/immutable/chunks/BJHkJxQ6.js","/app/immutable/assets/image-context-items.D_hsaikk.css","/app/immutable/chunks/CvCS8OAf.js","/app/immutable/chunks/CGaMCAik.js","/app/immutable/assets/AttachmentPreview.DWUPhcKi.css","/app/immutable/chunks/Dkgk_rvZ.js","/app/immutable/chunks/Rz920YbF.js","/app/immutable/chunks/CQhRmQZt.js","/app/immutable/chunks/Bu13V5mO.js","/app/immutable/chunks/CJoPlWyA.js","/app/immutable/chunks/BGN2EuCq.js","/app/immutable/chunks/BtBv0U_D.js","/app/immutable/chunks/Jh2BVut2.js","/app/immutable/chunks/BKD7o1lQ.js","/app/immutable/assets/TaskStatusIcon.sfU2TZ7a.css","/app/immutable/chunks/CegXgKbh.js","/app/immutable/chunks/CwTWayd0.js","/app/immutable/chunks/CVoQx6Vw.js","/app/immutable/assets/AgentCard.Cna0hri3.css","/app/immutable/chunks/Ue4xifLs.js","/app/immutable/chunks/DEB8jcix.js","/app/immutable/chunks/lwn02icp.js","/app/immutable/chunks/DMrypNw-.js","/app/immutable/assets/TrackedChangeDiffViewer.CveSjyPc.css","/app/immutable/chunks/RWWlGLMu.js","/app/immutable/chunks/DaXosNFA.js","/app/immutable/chunks/CcNhqKh5.js","/app/immutable/assets/syntax-highlighting.CrQGLq0X.css","/app/immutable/assets/CodeBlock.BezhEtUo.css","/app/immutable/chunks/Cxz7a3ln.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/D5-RCLzi.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css","/app/immutable/chunks/KU76P7cR.js","/app/immutable/chunks/DRg21hWl.js","/app/immutable/chunks/DgAgTFcK.js","/app/immutable/chunks/C-BsEdGZ.js","/app/immutable/chunks/P9PnSQNh.js","/app/immutable/assets/MarkdownViewer.D2MexjjT.css","/app/immutable/chunks/Dc7e-OgI.js","/app/immutable/chunks/KMO8sO00.js","/app/immutable/chunks/DUkL2vjQ.js","/app/immutable/chunks/CcNZQwT1.js","/app/immutable/assets/workspace-key-menu.DrT-Fxqq.css","/app/immutable/chunks/A0p6PvBn.js","/app/immutable/chunks/YqTahsxp.js","/app/immutable/chunks/CE0jr9sE.js","/app/immutable/chunks/CJtFSxbf.js","/app/immutable/chunks/0_OkSok2.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css","/app/immutable/assets/chat-search.Cjb73igJ.css","/app/immutable/chunks/BQXu3XXC.js","/app/immutable/chunks/4jB5IsVV.js","/app/immutable/chunks/edw8TVSr.js","/app/immutable/chunks/Cr6ukNck.js","/app/immutable/chunks/D4WPlvMg.js","/app/immutable/chunks/CZ56JG-R.js","/app/immutable/chunks/BFBQinse.js","/app/immutable/chunks/2V6-Yhg-.js","/app/immutable/chunks/D5reO2Y0.js","/app/immutable/chunks/DDnDtSlm.js","/app/immutable/assets/AgentAvatarStack.DOhClFuX.css","/app/immutable/chunks/CcmN1reb.js","/app/immutable/assets/conversation-turns.P_pkAsRX.css","/app/immutable/chunks/05jEdw2V.js","/app/immutable/chunks/BTtAt-Pu.js","/app/immutable/chunks/6kZoubzS.js","/app/immutable/chunks/BLZhAOLT.js","/app/immutable/chunks/BvFRd1je.js","/app/immutable/chunks/CrjK8LH9.js","/app/immutable/chunks/BbV6R15i.js","/app/immutable/chunks/xmnalplU.js","/app/immutable/chunks/H2jLkRRS.js","/app/immutable/chunks/CXCw-Jw-.js","/app/immutable/assets/WorkspaceSetupCard.DNLkSKZg.css","/app/immutable/chunks/DTU57FsX.js","/app/immutable/chunks/DL6gGkHp.js","/app/immutable/assets/DockRecordingEditor.BX1NXczK.css","/app/immutable/chunks/DpChblex.js","/app/immutable/chunks/IxfPVMNO.js","/app/immutable/chunks/DvjmmZhh.js","/app/immutable/assets/ChatPanel.B73KM22O.css","/app/immutable/assets/HomeWorkspaceDetail.Dp5EWw2P.css","/app/immutable/chunks/BV8D9pH6.js","/app/immutable/chunks/DCP9TL-A.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/DyHx5QFY.js","/app/immutable/chunks/CXXVPWBH.js","/app/immutable/chunks/DWGXN6Nr.js","/app/immutable/chunks/DnkGrT83.js","/app/immutable/chunks/CJW4jhjq.js","/app/immutable/assets/BrowserTabType.DojB6H-_.css","/app/immutable/chunks/E92QiCEr.js","/app/immutable/chunks/ClNWpSoj.js","/app/immutable/chunks/D3yXvqwY.js","/app/immutable/chunks/CPel99qV.js","/app/immutable/chunks/Bygp72Wl.js","/app/immutable/chunks/CEjK2ich.js","/app/immutable/chunks/AYsHMWH3.js","/app/immutable/chunks/BwLxx4IG.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/Bk1CZ_aH.js","/app/immutable/assets/confirm-script-deletion.CqNa5NIC.css","/app/immutable/chunks/CvxVjZLu.js","/app/immutable/assets/Terminal.Ddek5eNE.css","/app/immutable/chunks/BaJfBXet.js","/app/immutable/chunks/BdnR40vX.js","/app/immutable/chunks/DJEkkAqR.js","/app/immutable/chunks/D_DdTIu0.js","/app/immutable/chunks/C0A3yiL9.js","/app/immutable/chunks/BltFs6ST.js","/app/immutable/chunks/CRFehAxF.js","/app/immutable/chunks/D2rdAIDv.js","/app/immutable/chunks/CSiaiLHL.js","/app/immutable/chunks/BhVPbMnV.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/xeMXLCBg.js","/app/immutable/chunks/BIv0yV05.js","/app/immutable/chunks/BO4HougN.js","/app/immutable/chunks/rjhGooNa.js","/app/immutable/assets/AgentOverviewTabType.DU1WpoFR.css","/app/immutable/chunks/BxiKdHSR.js","/app/immutable/chunks/D5i4Tktw.js","/app/immutable/chunks/Bc3o0U_Z.js","/app/immutable/chunks/B7eTEd5f.js","/app/immutable/chunks/BOpszErG.js","/app/immutable/assets/DiscussionTabType.D3Laoutn.css","/app/immutable/chunks/XzLIP4y8.js","/app/immutable/chunks/cKonll34.js","/app/immutable/chunks/BAdVoGAI.js","/app/immutable/assets/CodeEditor.Bq04Rj-N.css","/app/immutable/chunks/CHMwcoWM.js","/app/immutable/assets/LineChangesBadge.CJ0J_Z0k.css","/app/immutable/chunks/Bosi029J.js","/app/immutable/assets/NoteTabType.AG_iwaNn.css","/app/immutable/chunks/CCej7AMq.js","/app/immutable/chunks/wEnqV1Ol.js","/app/immutable/chunks/Df4fyHSB.js","/app/immutable/chunks/C5tAJtyd.js","/app/immutable/assets/FileTabType.BUKcoHE1.css","/app/immutable/chunks/C8veqOP9.js","/app/immutable/chunks/zJz5NUAZ.js","/app/immutable/chunks/evy8DaDH.js","/app/immutable/chunks/gZ0nGq7V.js","/app/immutable/assets/ChatChangesPanel.BQqG1JnE.css","/app/immutable/chunks/eTRx_lEs.js","/app/immutable/chunks/lDDdxVqt.js","/app/immutable/chunks/BMW8QkkW.js","/app/immutable/chunks/YtoDeXhM.js","/app/immutable/chunks/_Tye__BB.js","/app/immutable/chunks/BWtgRgi0.js","/app/immutable/chunks/BZ9svoQk.js"])))=>i.map(i=>d[i]);
2
- import{bm as e,_ as c,t as Te,bo as ie,bw as he,b as ke}from"./hY0rMePc.js";import{t as u}from"./C0CrTfQC.js";import{bD as ue,bv as Ve,cK as Ne,aO as $e,cn as Me,aV as ge,bg as Ke,aN as Be,aM as Ge,bs as He,bL as qe,b_ as Fe,bJ as je,F as Ue}from"./DETS1-K4.js";import{R as H}from"./BzqJYEOZ.js";import{bs as we,ca as Q,bH as v,aD as t,bV as K,br as ze,a7 as q,ay as M,W as p,bn as Le,c9 as b,aA as ne,a5 as X,bA as Z,bS as ye,aw as Ye,aB as W,be as F,b$ as x,b_ as I,bO as E,bl as Je,bk as Qe}from"./3SdAC2_C.js";import{i as D}from"./BWmYJDmC.js";import{s as fe}from"./leDczq9h.js";import{L as me}from"./BJHkJxQ6.js";import{C as Xe,L as be}from"./CbaFGz2w.js";import{I as Ze}from"./CmbheRhJ.js";import"./COB2k0Aa.js";import"./uAXEbxa8.js";import{f as le}from"./CIU_APaR.js";import{v as Ie}from"./rNjiZ_3W.js";import"./CbqBbwIN.js";import"./CjZEyjv4.js";import{I as ve}from"./D400ElMz.js";import{I as et}from"./Bqd7fdCF.js";import"./BTc_j7Dt.js";import{a as tt}from"./BdWqymET.js";function xt(){u.register({type:"workspace",loadComponent:()=>c(()=>import("./C2jf24pz.js"),__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,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209]),import.meta.url),defaultWidthTier:"wide",icon:ue,get defaultTitle(){return e.workspace_page_workspaceResource_label()},get categoryLabel(){return e.workspace_page_workspaceResource_label()},renameable:!1}),u.register({type:"browser",loadComponent:()=>c(()=>import("./BV8D9pH6.js"),__vite__mapDeps([210,1,2,3,11,6,7,8,9,10,15,211,22,23,24,25,26,18,13,4,71,14,16,17,19,12,20,21,27,28,29,30,31,32,45,33,34,35,36,37,38,39,40,41,42,43,44,46,58,72,64,62,65,68,60,59,73,74,75,76,63,77,78,181,92,57,61,182,212,123,213,125,52,136,86,214,99,100,215,109,110,111,112,113,216,217,102,218]),import.meta.url),defaultWidthTier:"wide",icon:Ve,get defaultTitle(){return e.layout_tabTypes_browser_title()},get categoryLabel(){return e.layout_tabTypes_browser_category()},sidebarTabId:"browser",renameable:!1}),u.register({type:"terminal",loadComponent:()=>c(()=>import("./E92QiCEr.js"),__vite__mapDeps([219,1,2,3,4,11,28,7,8,9,10,6,64,18,22,23,24,25,26,13,62,16,17,19,65,20,220,15,221,222,59,60,57,58,61,63,223,224,225,226,227,112,212,191,228,14,12,21,27,29,30,31,32,213,229,72,68,73,74,75,76,77,78,36,42,43,40,41,217,230,38,35,39,136,33,34,37,44,45,46,215,231,149,232,233,102,234]),import.meta.url),defaultWidthTier:"medium",icon:Ne,get defaultTitle(){return e.layout_tabTypes_terminal_title()},get categoryLabel(){return e.layout_tabTypes_terminal_category()},sidebarTabId:"terminals",renameable:!1}),u.register({type:"code-review",loadComponent:()=>c(()=>import("./DJEkkAqR.js"),__vite__mapDeps([235,1,2,22,23,24,25,9,7,26,18,13,3,29,6,8,10,64,28,11,62,16,17,19,65,20,216,76,63,78,92,72,68,60,59,73,74,75,77,58,57,61,217,181,12,14,15,4,21,27,30,31,32,182,102,236,237,178,84,87,179,180,130,132,133,142,229,167,238,234,239,36,42,43,40,41,113,112,172,206,191,213,143,135,71,240,241,242,243,244,199,151,109,110,111,245,246,223,224,225,226,227,140,153,154,35,164,82,69,70,33,34,37,38,39,44,45,46,79,80,81,50,51,117,165,125,52]),import.meta.url),defaultWidthTier:"wide",icon:$e,get defaultTitle(){return e.layout_tabTypes_codeReview_title()},get categoryLabel(){return e.layout_tabTypes_codeReview_category()},renameable:!1}),u.register({type:"agent-overview",loadComponent:()=>c(()=>import("./rjhGooNa.js"),__vite__mapDeps([247,1,2,3,6,7,8,9,10,15,14,16,13,17,18,19,11,4,119,120,121,75,22,23,24,25,26,76,63,77,64,28,62,65,20,78,58,122,12,21,27,29,30,31,32,158,81,51,178,84,87,68,60,59,179,180,130,92,72,73,74,57,61,132,133,142,109,110,111,112,113,248]),import.meta.url),defaultWidthTier:"narrow",icon:Me,get defaultTitle(){return e.layout_tabTypes_agentOverview_title()},get categoryLabel(){return e.layout_tabTypes_agents_category()},renameable:!1}),u.register({type:"agent",loadComponent:()=>c(()=>import("./BxiKdHSR.js"),__vite__mapDeps([249,1,2,3,4,6,7,8,9,10,11,15,72,22,23,24,25,26,18,13,64,28,62,16,17,19,65,20,68,60,59,73,74,75,76,63,77,78,58,250,14,251,238,12,21,27,29,30,31,32,237,102,57,61,133,205,44,45,215,240,132,92,241,103,35,36,47,48,49,42,43,50,51,52,53,104,38,39,105,86,34,37,40,41,71,82,33,46,106,107,81,108,95,96,109,110,111,112,113,114,115,194,54,55,56,66,67,69,70,79,80,83,84,85,87,88,89,90,91,93,94,97,98,99,100,101,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,195,196,197,198,199,200,201,202,203,204,206,207,208,217,216]),import.meta.url),defaultWidthTier:"chat",icon:ge,get defaultTitle(){return e.layout_tabTypes_agent_title()},get categoryLabel(){return e.layout_tabTypes_agents_category()},sidebarTabId:"agents",renameable:!0}),u.register({type:"discussion",loadComponent:()=>c(()=>import("./B7eTEd5f.js"),__vite__mapDeps([252,1,2,3,4,11,8,9,7,10,16,13,17,18,19,38,6,29,35,15,36,14,39,33,34,37,27,40,41,28,42,31,43,44,45,46,21,22,23,24,25,26,217,12,20,30,32,64,62,65,72,68,60,59,73,74,75,76,63,77,78,58,92,57,61,194,88,89,66,114,120,121,125,52,161,82,164,140,69,70,71,79,80,81,50,51,117,165,99,100,48,236,216,181,182,102,237,178,84,87,179,180,130,132,133,142,229,167,238,234,239,113,112,172,206,191,213,143,135,240,241,242,243,244,199,151,109,110,111,245,246,223,224,225,226,227,129,131,253,98,94,95,49,96,97,118,215,254]),import.meta.url),defaultWidthTier:"chat",icon:ge,get defaultTitle(){return e.workspace_discussion_title()},get categoryLabel(){return e.workspace_discussion_list_label()},sidebarTabId:"people",renameable:!1}),u.register({type:"note",loadComponent:()=>c(()=>import("./XzLIP4y8.js"),__vite__mapDeps([255,1,2,3,11,64,18,9,22,23,24,25,7,26,13,28,8,10,6,62,16,17,19,65,20,215,181,92,72,68,60,59,73,74,75,76,63,77,78,58,57,61,12,14,15,4,21,27,29,30,31,32,182,35,36,81,88,89,50,51,33,34,37,38,39,40,41,42,43,44,45,46,117,120,121,138,139,140,141,116,71,52,69,70,79,80,82,67,118,114,119,122,123,100,124,236,216,217,102,237,178,84,87,179,180,130,132,133,142,229,167,238,234,239,113,112,172,206,191,213,143,135,240,241,242,243,244,199,151,109,110,111,245,246,223,224,225,226,227,146,55,147,148,149,150,256,257,258,108,95,49,96,163,195,259,260,153,154,106,48,107,261,156,157,158,159,152,155,162,184,192,136,197,198,174,164,165,262]),import.meta.url),defaultWidthTier:"medium",icon:H.note,get defaultTitle(){return e.layout_tabTypes_note_title()},get categoryLabel(){return e.layout_tabTypes_context_category()},sidebarTabId:"notes",renameable:!0}),u.register({type:"file",loadComponent:()=>c(()=>import("./CCej7AMq.js"),__vite__mapDeps([263,1,2,3,4,6,7,8,9,10,11,15,22,23,24,25,26,18,13,215,151,64,28,62,16,17,19,65,20,264,68,60,59,199,77,12,14,21,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,236,61,57,58,63,92,72,73,74,75,76,78,216,217,181,182,102,237,178,84,87,179,180,130,132,133,142,229,167,238,234,239,113,112,172,206,191,213,143,135,71,240,241,242,243,244,109,110,111,245,246,223,224,225,226,227,256,257,117,258,164,140,82,69,70,79,80,81,50,51,165,136,265,123,266,233,267]),import.meta.url),defaultWidthTier:"wide",icon:Ke,get defaultTitle(){return e.layout_tabTypes_file_title()},get categoryLabel(){return e.layout_tabTypes_files_category()},sidebarTabId:"files",renameable:!0}),u.register({type:"diff",loadComponent:()=>c(()=>import("./C8veqOP9.js"),__vite__mapDeps([268,1,2,3,4,11,163,22,23,24,25,9,7,26,18,13,215,64,28,8,10,6,62,16,17,19,65,20,146,55,15,132,59,92,72,68,60,73,74,75,76,63,77,78,58,57,61,21,133,147,148,14,149,35,29,36,150,269,151,33,34,37,27,38,39,40,41,42,31,43,44,45,46,117,136,265,197,198,174,12,30,32,199,121]),import.meta.url),defaultWidthTier:"wide",icon:Be,get defaultTitle(){return e.layout_tabTypes_diff_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},sidebarTabId:"files",renameable:!1}),u.register({type:"changes",loadComponent:()=>c(()=>import("./evy8DaDH.js"),__vite__mapDeps([270,1,2,4,15,22,23,24,25,9,7,26,18,13,163,215,64,28,11,3,8,10,6,62,16,17,19,65,20,216,76,63,78,92,72,68,60,59,73,74,75,77,58,57,61,217,181,12,14,21,27,29,30,31,32,182,102,271,160,259,260,146,55,132,133,147,148,149,35,36,150,269,151,33,34,37,38,39,40,41,42,43,44,45,46,117,120,121,106,48,49,107,134,135,71,126,143,178,84,87,179,180,130,142,236,237,229,167,238,234,239,113,112,172,206,191,213,240,241,242,243,244,199,109,110,111,245,246,223,224,225,226,227,272,265]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_changes_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},sidebarTabId:"changes",renameable:!1}),u.register({type:"local-changes",loadComponent:()=>c(()=>import("./eTRx_lEs.js"),__vite__mapDeps([273,1,2,15,22,23,24,25,9,7,26,18,13,163,215,64,28,11,3,8,10,6,62,16,17,19,65,20,271,29,160,259,260,92,72,68,60,59,73,74,75,76,63,77,78,58,57,61,146,55,132,21,133,147,148,14,4,149,35,36,150,269,151,33,34,37,27,38,39,40,41,42,31,43,44,45,46,117,120,121,106,30,48,49,107,12,32,134,135,71,126,143,181,182,216,217,102,178,84,87,179,180,130,142,236,237,229,167,238,234,239,113,112,172,206,191,213,240,241,242,243,244,199,109,110,111,245,246,223,224,225,226,227,272,265]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_localChanges_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},sidebarTabId:"changes",renameable:!1}),u.register({type:"chat-changes",loadComponent:()=>c(()=>import("./lDDdxVqt.js"),__vite__mapDeps([274,1,2,3,271,6,7,8,9,10,29,15,22,23,24,25,26,18,13,160,64,28,11,62,16,17,19,65,20,259,260,92,72,68,60,59,73,74,75,76,63,77,78,58,57,61,146,55,132,21,133,147,148,14,4,149,35,36,150,269,151,33,34,37,27,38,39,40,41,42,31,43,44,45,46,117,120,121,106,30,48,49,107,12,32,134,135,71,126,143,181,182,216,217,102,178,84,87,179,180,130,142,236,237,229,167,238,234,239,113,112,172,206,191,213,240,241,242,243,244,199,109,110,111,245,246,223,224,225,226,227,272]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_chatChanges_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},renameable:!1}),u.register({type:"activity-changes",loadComponent:()=>c(()=>import("./BMW8QkkW.js"),__vite__mapDeps([275,1,2,3,4,11,62,241,24,59,146,8,9,7,10,55,15,132,16,13,17,18,19,22,23,25,26,92,64,28,6,65,20,72,68,60,73,74,75,76,63,77,78,58,57,61,21,133,147,148,14,149,35,29,36,150,269,151,33,34,37,27,38,39,40,41,42,31,43,44,45,46,117,215,136,265,197,198,174,12,30,32,199,121]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_activityChanges_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},renameable:!1}),u.register({type:"hook-script",loadComponent:()=>c(()=>import("./YtoDeXhM.js"),__vite__mapDeps([276,1,2,3,152,6,7,8,9,10,140,153,59,154,12,13,14,15,16,17,18,19,11,4,20,21,22,23,24,25,26,27,28,29,30,31,32,155,167,64,62,65,76,63,77]),import.meta.url),defaultWidthTier:"medium",icon:Ge,get defaultTitle(){return e.chat_backgroundHooks_viewScript_label()},get categoryLabel(){return e.layout_tabTypes_panel_category()},renameable:!1}),u.register({type:"settings",loadComponent:()=>c(()=>import("./_Tye__BB.js"),__vite__mapDeps([277,1,2]),import.meta.url),defaultWidthTier:"narrow",icon:He,get defaultTitle(){return e.layout_tabTypes_settings_title()},get categoryLabel(){return e.layout_tabTypes_settings_category()},renameable:!1}),u.register({type:"overview",loadComponent:()=>c(()=>import("./BWtgRgi0.js"),__vite__mapDeps([278,1,2]),import.meta.url),defaultWidthTier:"narrow",icon:ue,get defaultTitle(){return e.layout_tabTypes_overview_title()},get categoryLabel(){return e.layout_tabTypes_overview_category()},renameable:!1})}async function Wt(y){if(y?.restoreStatus!=="restored")return;const _=new Set(Object.values(y.panels).flatMap(r=>{const k=r.tabs.find(l=>l.id===r.activeTabId);return k?[k.type]:[]}));await Promise.allSettled([..._].map(r=>u.loadComponent(r)))}var at=W("<!> <!>",1),rt=W('<img class="h-auto w-full max-w-64 rounded-lg" width="512" height="512"/>'),ot=W('<div class="flex aspect-square w-full max-w-64 items-center justify-center"><!></div>'),st=W('<div class="flex justify-center" data-testid="passkey-qr"><!></div>'),it=W('<div class="flex justify-center py-4 text-muted-foreground"><!></div>'),nt=W('<p class="type-caption text-muted-foreground" data-testid="passkey-pin-advice"> </p>'),lt=W('<form id="passkey-pin-form" class="flex flex-col gap-3"><!> <!></form>');function Pe(y,_){if(new.target)return Te({component:Pe,...y});we(_,!0);let r=ie(_,"payload",7),k=ie(_,"static",7,!1),l=ie(_,"onRespond",7),f=K(!1),A=K(""),U=K("");const a=b(()=>r()?.view??null);Q(()=>{v(f,r()!==null)}),Q(()=>{t(a)?.step!=="pin"&&v(A,"")});let z=K(0),Y=K(ze(Date.now()));Q(()=>{const i=t(a)?.step==="pin"&&t(a).kind==="device"?t(a).retryAfterMs:void 0;if(typeof i!="number"){v(z,0);return}const T=Date.now();v(Y,T,!0),v(z,T+i);const w=setInterval(()=>{v(Y,Date.now(),!0),t(Y)>=t(z)&&clearInterval(w)},250);return()=>clearInterval(w)});const ee=b(()=>Math.max(0,Math.ceil((t(z)-t(Y))/1e3))),_e=b(()=>t(a)?.step==="pin"&&(t(a).kind==="device"?t(ee)>0:typeof t(a).retryAfterMs=="number"));Q(()=>{const i=t(a)?.step==="qr"?t(a).data:"";if(!i){v(U,"");return}let T=!0;return c(async()=>{const{default:w}=await import("./BZ9svoQk.js").then(C=>C.b);return{default:w}},__vite__mapDeps([279,59]),import.meta.url).then(({default:w})=>w.toDataURL(i,{width:512,margin:2})).then(w=>{T&&v(U,w,!0)}),()=>{T=!1}});const Ee=b(()=>r()?r().kind==="create"?e.passkeys_dialog_createTitle_label({site:r().rpId}):e.passkeys_dialog_getTitle_label({site:r().rpId}):"");function De(i){switch(i){case"bluetooth-off":return e.passkeys_dialog_bluetoothOff_error();case"bluetooth-missing":return e.passkeys_dialog_bluetoothMissing_error();case"pin-locked":return e.passkeys_dialog_pinLocked_error();case"timeout":return e.passkeys_dialog_timeout_error();case"already-registered":return e.passkeys_dialog_alreadyRegistered_error();case"unavailable":return e.passkeys_dialog_unavailable_error();case"device-locked":return e.passkeys_dialog_deviceLocked_error();case"device-already-registered":return e.passkeys_dialog_deviceAlreadyRegistered_error();case"device-no-passkey":return e.passkeys_dialog_deviceNoPasskey_error({site:r()?.rpId??""});case"device-old-pin-wrong":return e.passkeys_dialog_deviceOldPinWrong_error();case"device-failed":return e.passkeys_dialog_deviceFailed_error();default:return e.passkeys_dialog_failed_error()}}const Ae=b(()=>{if(!(!t(a)||!r()))switch(t(a).step){case"choose-transport":return r().kind==="create"?e.passkeys_dialog_chooseCreate_description():e.passkeys_dialog_chooseGet_description();case"qr":case"progress":switch(t(a).progress){case"waiting-for-phone":return e.passkeys_dialog_waitingForPhone_description();case"connecting":return e.passkeys_dialog_connecting_description();case"waiting-for-approval":return e.passkeys_dialog_waitingForApproval_description();case"touch-key":return e.passkeys_dialog_touchKey_description();case"processing":return e.passkeys_dialog_processing_description();default:return t(a).step==="progress"&&t(a).transport==="usb"?e.passkeys_dialog_insertKey_description():e.passkeys_dialog_starting_description()}case"pin":return t(a).kind==="usb"?e.passkeys_dialog_pin_description():t(a).oldPin?e.passkeys_dialog_deviceOldPin_description():e.passkeys_dialog_devicePin_description();case"choose-account":return e.passkeys_dialog_chooseAccount_description();case"error":return De(t(a).reason)}}),de=b(()=>t(a)?.step==="pin"&&t(a).kind==="device"?t(a).oldPin?e.passkeys_dialog_deviceOldPin_label():e.passkeys_dialog_devicePin_label():e.passkeys_dialog_pin_label()),Ce=b(()=>{if(t(a)?.step==="pin"){if(t(a).kind==="device"){if(t(ee)>0)return e.passkeys_dialog_devicePinWait_error({seconds:t(ee)})}else if(typeof t(a).retryAfterMs=="number")return e.passkeys_dialog_pinRetryAfter_error();if(t(a).wrongPin)return typeof t(a).attemptsLeft=="number"?t(a).attemptsLeft===1?e.passkeys_dialog_wrongPinAttempts_one({count:t(a).attemptsLeft}):e.passkeys_dialog_wrongPinAttempts_many({count:t(a).attemptsLeft}):e.passkeys_dialog_wrongPin_error()}}),Oe=b(()=>{if(t(a)?.step!=="choose-transport")return[];const i=t(a).hybrid==="bluetooth-off"?e.passkeys_dialog_bluetoothOff_description():t(a).hybrid==="bluetooth-missing"?e.passkeys_dialog_bluetoothMissing_description():void 0;return[...t(a).device?[{id:"device",label:e.passkeys_dialog_thisDevice_label(),note:void 0,icon:qe}]:[],{id:"hybrid",label:e.passkeys_dialog_phone_label(),note:i,icon:Fe},{id:"usb",label:e.passkeys_dialog_securityKey_label(),note:void 0,icon:je}]});function te(){l()({action:"cancel"})}function Re(i){if(i.preventDefault(),!t(A))return;const T=t(A);v(A,""),l()({action:"pin",pin:T})}var xe={get payload(){return r()},set payload(i){r(i),ne()},get static(){return k()},set static(i=!1){k(i),ne()},get onRespond(){return l()},set onRespond(i){l(i),ne()},$set:he,$on:(i,T)=>ke(_,i,T)},pe=q(),We=M(pe);{var Se=i=>{{const T=C=>{var ae=q(),J=M(ae);{var re=P=>{le(P,{variant:"secondary",onclick:te,children:(S,B)=>{F();var V=x();I(d=>E(V,d),[()=>e.passkeys_dialog_close_label()]),p(S,V)},$$slots:{default:!0}})},oe=P=>{var S=at(),B=M(S);le(B,{variant:"ghost",onclick:te,children:(n,m)=>{F();var s=x();I(L=>E(s,L),[()=>e.passkeys_dialog_cancel_label()]),p(n,s)},$$slots:{default:!0}});var V=ye(B,2);{var d=n=>{{let m=b(()=>!t(A)||t(_e));le(n,{variant:"primary",type:"submit",form:"passkey-pin-form",get disabled(){return t(m)},children:(s,L)=>{F();var o=x();I(g=>E(o,g),[()=>e.passkeys_dialog_continue_label()]),p(s,o)},$$slots:{default:!0}})}};D(V,n=>{t(a).step==="pin"&&n(d)})}p(P,S)};D(J,P=>{t(a).step==="error"?P(re):P(oe,-1)})}p(C,ae)};let w=b(()=>t(a).step==="error"?e.passkeys_dialog_close_label():e.passkeys_dialog_cancel_label());Xe(i,{get static(){return k()},get title(){return t(Ee)},get description(){return t(Ae)},size:"sm",dismissOnInteractOutside:!1,get closeLabel(){return t(w)},onClose:te,get open(){return t(f)},set open(C){v(f,C,!0)},footer:T,children:(C,ae)=>{var J=q(),re=M(J);{var oe=d=>{{const n=(s,L)=>{let o=()=>(L?.()).item;me(s,{leading:h=>{Ue(h,{get icon(){return o().icon},fw:!0})},title:h=>{F();var R=x();I(()=>E(R,o().label)),p(h,R)},description:h=>{var R=q(),se=M(R);{var G=$=>{var ce=x();I(()=>E(ce,o().note)),p($,ce)};D(se,$=>{o().note&&$(G)})}p(h,R)},$$slots:{leading:!0,title:!0,description:!0}})};let m=b(()=>e.passkeys_dialog_transports_ariaLabel());be(d,{get items(){return t(Oe)},getKey:s=>s.id,getText:s=>s.label,get ariaLabel(){return t(m)},onActivate:s=>l()({action:"transport",transport:s.id}),row:n,$$slots:{row:!0}})}},P=d=>{var n=st(),m=X(n);{var s=o=>{var g=rt();I(O=>{fe(g,"src",t(U)),fe(g,"alt",O)},[()=>e.passkeys_dialog_qrImage_ariaLabel()]),p(o,g)},L=o=>{var g=ot(),O=X(g);ve(O,{size:20}),Z(g),p(o,g)};D(m,o=>{t(U)?o(s):o(L,-1)})}Z(n),p(d,n)},S=d=>{var n=it(),m=X(n);ve(m,{size:20}),Z(n),p(d,n)},B=d=>{var n=lt(),m=X(n);{let o=b(()=>t(a).kind==="device"?"numeric":void 0);Ze(m,{type:"password",get inputmode(){return t(o)},autocomplete:"off",get"aria-label"(){return t(de)},get placeholder(){return t(de)},get error(){return t(Ce)},get disabled(){return t(_e)},autofocus:!0,get value(){return t(A)},set value(g){v(A,g,!0)}})}var s=ye(m,2);{var L=o=>{var g=nt(),O=Je(g,!0);I(N=>E(O,N),[()=>e.passkeys_dialog_devicePinAdvice_description()]),p(o,g)};D(s,o=>{t(a).firstPasskey&&o(L)})}Z(n),Ye("submit",n,Re),p(d,n)},V=d=>{{const n=(s,L)=>{let o=()=>(L?.()).item;me(s,{title:N=>{F();var h=x();I(()=>E(h,o().userDisplayName||o().userName)),p(N,h)},description:N=>{var h=q(),R=M(h);{var se=G=>{var $=x();I(()=>E($,o().userName)),p(G,$)};D(R,G=>{o().userDisplayName&&o().userName&&G(se)})}p(N,h)},$$slots:{title:!0,description:!0}})};let m=b(()=>e.passkeys_dialog_accounts_ariaLabel());be(d,{get items(){return t(a).accounts},getKey:s=>s.index,getText:s=>s.userDisplayName||s.userName,get ariaLabel(){return t(m)},onActivate:s=>l()({action:"choose",index:s.index}),row:n,$$slots:{row:!0}})}};D(re,d=>{t(a).step==="choose-transport"?d(oe):t(a).step==="qr"?d(P,1):t(a).step==="progress"?d(S,2):t(a).step==="pin"?d(B,3):t(a).step==="choose-account"&&d(V,4)})}p(C,J)},$$slots:{footer:!0,default:!0}})}};D(We,i=>{r()&&t(a)&&i(Se)})}return p(y,pe),Le(xe)}const _t=new tt("PasskeyDialog"),j=et.PASSKEYS;function dt(y){const _=Ie();if(!_)return()=>{};const r=_.on(j.DIALOG_SHOW,l=>{const f=l;!f||typeof f.ceremonyId!="string"||!f.view||y.onShow(f)}),k=_.on(j.DIALOG_CLOSE,l=>{const f=l;f&&typeof f.ceremonyId=="string"&&y.onClose(f.ceremonyId)});return()=>{_.offById(j.DIALOG_SHOW,r),_.offById(j.DIALOG_CLOSE,k)}}function pt(y){const _=Ie();_&&_.invoke(j.DIALOG_RESPOND,y).catch(()=>{_t.warn("Passkey dialog response failed",{action:y.action})})}function ct(y,_){if(new.target)return Te({component:ct,...y});we(_,!0);let r=K(null);Qe(()=>dt({onShow:l=>{v(r,l,!0)},onClose:l=>{t(r)?.ceremonyId===l&&v(r,null)}}));var k={$set:he,$on:(l,f)=>ke(_,l,f)};return Pe(y,{get payload(){return t(r)},onRespond:l=>{t(r)&&pt({...l,ceremonyId:t(r).ceremonyId})}}),Le(k)}export{ct as P,Wt as p,xt as r};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DV6uX7ff.js","/app/immutable/chunks/hY0rMePc.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BWmYJDmC.js","/app/immutable/chunks/CXul4WJt.js","/app/immutable/chunks/CUWtSiZ5.js","/app/immutable/chunks/D400ElMz.js","/app/immutable/chunks/CjZEyjv4.js","/app/immutable/chunks/leDczq9h.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BNN0vAFF.js","/app/immutable/chunks/x_GKKTQV.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIU_APaR.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/rNjiZ_3W.js","/app/immutable/chunks/BTc_j7Dt.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/B7JHU89G.js","/app/immutable/chunks/BXT21uPn.js","/app/immutable/chunks/DXdFemRu.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/B4mHWFlW.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/DETS1-K4.js","/app/immutable/chunks/72S4_8Fo.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CbaFGz2w.js","/app/immutable/chunks/DB4f78Ip.js","/app/immutable/chunks/CmbheRhJ.js","/app/immutable/chunks/COB2k0Aa.js","/app/immutable/chunks/DXB4L22V.js","/app/immutable/chunks/BEvFtidS.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/CbqBbwIN.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/uAXEbxa8.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/D0I7VQ8a.js","/app/immutable/chunks/DnHJL326.js","/app/immutable/chunks/D2Rapl2X.js","/app/immutable/chunks/O63l2zGE.js","/app/immutable/chunks/BjLb7AHW.js","/app/immutable/chunks/Dv-bjgEk.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/-J-Hmuck.js","/app/immutable/assets/SettingsPage.CKvEnOAL.css","/app/immutable/chunks/DVL_BM5a.js","/app/immutable/chunks/goTpbPhD.js","/app/immutable/chunks/CJ72QIuX.js","/app/immutable/chunks/AXE1aiRo.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/B0fUscDD.js","/app/immutable/chunks/C9aF-Sor.js","/app/immutable/chunks/CAmQkXZq.js","/app/immutable/chunks/D-62MVd3.js","/app/immutable/chunks/Cb6nJOfB.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/4QXQvR4H.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/ZNhLMxqQ.js","/app/immutable/chunks/QFC15GkG.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/Mh0PqgbP.js","/app/immutable/chunks/CcSZrbR4.js","/app/immutable/chunks/B4PfEXaO.js","/app/immutable/chunks/DZEg_JlV.js","/app/immutable/chunks/1MN-thc1.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/DxDZbRkP.js","/app/immutable/chunks/DOU-V4Cg.js","/app/immutable/chunks/CCPr9hs_.js","/app/immutable/chunks/CQcEqK4G.js","/app/immutable/chunks/CpimfPxg.js","/app/immutable/chunks/Di3TE7pQ.js","/app/immutable/chunks/BXyd6A9p.js","/app/immutable/chunks/0tWsVa0y.js","/app/immutable/chunks/C6g7LzDB.js","/app/immutable/assets/DockScreenshotEditorWindow.DNkBhnHK.css","/app/immutable/assets/dock-tokens.C3wiNkmL.css","/app/immutable/chunks/Cw2ZnpX7.js","/app/immutable/chunks/D4ZMSrvm.js","/app/immutable/chunks/X-wIiWCo.js","/app/immutable/chunks/CmImGhNY.js","/app/immutable/assets/select-viewport.CV-KWLNP.css","/app/immutable/chunks/C9fPgzDG.js","/app/immutable/chunks/DpmMYKqt.js","/app/immutable/chunks/DU4sJYad.js","/app/immutable/chunks/I8XhKsSY.js","/app/immutable/chunks/BzW_moTi.js","/app/immutable/chunks/BVlMQ1xQ.js","/app/immutable/chunks/BAAb6Ol7.js","/app/immutable/chunks/DhHLTWgE.js","/app/immutable/chunks/Bb9tq6rt.js","/app/immutable/chunks/BDPP0w0q.js","/app/immutable/assets/checkbox.D429NJZk.css","/app/immutable/chunks/BJTYazIn.js","/app/immutable/chunks/DnozpXMO.js","/app/immutable/chunks/2bsrY56g.js","/app/immutable/chunks/CceLSCZq.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CK2Cr1RP.js","/app/immutable/chunks/CWezNj5-.js","/app/immutable/assets/directory-picker-service.Eai7L_H2.css","/app/immutable/chunks/Ciei8d6b.js","/app/immutable/chunks/BNm3whw0.js","/app/immutable/chunks/B7RoQL2j.js","/app/immutable/chunks/Bcb1iqQJ.js","/app/immutable/chunks/Djz9uuuA.js","/app/immutable/assets/AgentAvatar.CZKKHyEm.css","/app/immutable/assets/avatar-state.BzFIexJN.css","/app/immutable/chunks/k863GLf6.js","/app/immutable/assets/TipTapEditor.BmeA7Qtk.css","/app/immutable/chunks/C4VXXfVL.js","/app/immutable/chunks/BmALJKBY.js","/app/immutable/chunks/BJHkJxQ6.js","/app/immutable/assets/image-context-items.D_hsaikk.css","/app/immutable/chunks/CSIAWhhl.js","/app/immutable/chunks/CGaMCAik.js","/app/immutable/assets/AttachmentPreview.DWUPhcKi.css","/app/immutable/chunks/CnHcPhIW.js","/app/immutable/chunks/DkET5D1Z.js","/app/immutable/chunks/Bm6FDHvN.js","/app/immutable/chunks/Bu13V5mO.js","/app/immutable/chunks/CJoPlWyA.js","/app/immutable/chunks/Bw8_vMki.js","/app/immutable/chunks/BzllE3aT.js","/app/immutable/chunks/Jh2BVut2.js","/app/immutable/chunks/BKD7o1lQ.js","/app/immutable/assets/TaskStatusIcon.sfU2TZ7a.css","/app/immutable/chunks/CegXgKbh.js","/app/immutable/chunks/CwTWayd0.js","/app/immutable/chunks/CVoQx6Vw.js","/app/immutable/assets/AgentCard.Cna0hri3.css","/app/immutable/chunks/McOgUz0K.js","/app/immutable/chunks/DEB8jcix.js","/app/immutable/chunks/lwn02icp.js","/app/immutable/chunks/DMrypNw-.js","/app/immutable/assets/TrackedChangeDiffViewer.CveSjyPc.css","/app/immutable/chunks/RWWlGLMu.js","/app/immutable/chunks/DaXosNFA.js","/app/immutable/chunks/CcNhqKh5.js","/app/immutable/assets/syntax-highlighting.CrQGLq0X.css","/app/immutable/assets/CodeBlock.BezhEtUo.css","/app/immutable/chunks/CBZTF7Qa.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/D5-RCLzi.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css","/app/immutable/chunks/KU76P7cR.js","/app/immutable/chunks/BziYv9ZW.js","/app/immutable/chunks/DgAgTFcK.js","/app/immutable/chunks/C-BsEdGZ.js","/app/immutable/chunks/DaZ7K0cS.js","/app/immutable/assets/MarkdownViewer.D2MexjjT.css","/app/immutable/chunks/DoStKyYK.js","/app/immutable/chunks/KMO8sO00.js","/app/immutable/chunks/DltbAw1B.js","/app/immutable/chunks/Dfh8DRT0.js","/app/immutable/assets/workspace-key-menu.DrT-Fxqq.css","/app/immutable/chunks/A0p6PvBn.js","/app/immutable/chunks/YqTahsxp.js","/app/immutable/chunks/CE0jr9sE.js","/app/immutable/chunks/CJtFSxbf.js","/app/immutable/chunks/B8nUpMEz.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css","/app/immutable/assets/chat-search.Cjb73igJ.css","/app/immutable/chunks/Dm9EHXJZ.js","/app/immutable/chunks/4jB5IsVV.js","/app/immutable/chunks/edw8TVSr.js","/app/immutable/chunks/DpeQIGDn.js","/app/immutable/chunks/D4WPlvMg.js","/app/immutable/chunks/Ipu7_2rx.js","/app/immutable/chunks/B7h1ZmQS.js","/app/immutable/chunks/2V6-Yhg-.js","/app/immutable/chunks/B4l71ix-.js","/app/immutable/chunks/DDnDtSlm.js","/app/immutable/assets/AgentAvatarStack.DOhClFuX.css","/app/immutable/chunks/CcmN1reb.js","/app/immutable/assets/conversation-turns.P_pkAsRX.css","/app/immutable/chunks/05jEdw2V.js","/app/immutable/chunks/BTtAt-Pu.js","/app/immutable/chunks/6kZoubzS.js","/app/immutable/chunks/BLZhAOLT.js","/app/immutable/chunks/BvFRd1je.js","/app/immutable/chunks/Chx7ONT3.js","/app/immutable/chunks/D4g4334W.js","/app/immutable/chunks/xmnalplU.js","/app/immutable/chunks/H2jLkRRS.js","/app/immutable/chunks/CXCw-Jw-.js","/app/immutable/assets/WorkspaceSetupCard.DNLkSKZg.css","/app/immutable/chunks/DTU57FsX.js","/app/immutable/chunks/DL6gGkHp.js","/app/immutable/assets/DockRecordingEditor.BX1NXczK.css","/app/immutable/chunks/DpChblex.js","/app/immutable/chunks/IxfPVMNO.js","/app/immutable/chunks/CjyJQV6j.js","/app/immutable/assets/ChatPanel.B73KM22O.css","/app/immutable/assets/HomeWorkspaceDetail.Dp5EWw2P.css","/app/immutable/chunks/D8elUKsb.js","/app/immutable/chunks/DCP9TL-A.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/DyHx5QFY.js","/app/immutable/chunks/CXXVPWBH.js","/app/immutable/chunks/DWGXN6Nr.js","/app/immutable/chunks/CbDsELcV.js","/app/immutable/chunks/CJW4jhjq.js","/app/immutable/assets/BrowserTabType.DojB6H-_.css","/app/immutable/chunks/CBvkahdk.js","/app/immutable/chunks/RzextV4B.js","/app/immutable/chunks/D3yXvqwY.js","/app/immutable/chunks/CPel99qV.js","/app/immutable/chunks/Bygp72Wl.js","/app/immutable/chunks/CEjK2ich.js","/app/immutable/chunks/AYsHMWH3.js","/app/immutable/chunks/BwLxx4IG.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/MsC14vMO.js","/app/immutable/assets/confirm-script-deletion.CqNa5NIC.css","/app/immutable/chunks/CvxVjZLu.js","/app/immutable/assets/Terminal.Ddek5eNE.css","/app/immutable/chunks/BaJfBXet.js","/app/immutable/chunks/BdnR40vX.js","/app/immutable/chunks/qLxI2L63.js","/app/immutable/chunks/DCGl0RXW.js","/app/immutable/chunks/C0A3yiL9.js","/app/immutable/chunks/CCAcpS1o.js","/app/immutable/chunks/CRFehAxF.js","/app/immutable/chunks/hcDGwCEP.js","/app/immutable/chunks/CSiaiLHL.js","/app/immutable/chunks/BhVPbMnV.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/xeMXLCBg.js","/app/immutable/chunks/BIv0yV05.js","/app/immutable/chunks/BO4HougN.js","/app/immutable/chunks/NZ_vlsKe.js","/app/immutable/assets/AgentOverviewTabType.DU1WpoFR.css","/app/immutable/chunks/gkPeOUJv.js","/app/immutable/chunks/B7o2QL9R.js","/app/immutable/chunks/Bc3o0U_Z.js","/app/immutable/chunks/BRsOtr8M.js","/app/immutable/chunks/BOpszErG.js","/app/immutable/assets/DiscussionTabType.D3Laoutn.css","/app/immutable/chunks/Dg5FvxXA.js","/app/immutable/chunks/cKonll34.js","/app/immutable/chunks/BAdVoGAI.js","/app/immutable/assets/CodeEditor.Bq04Rj-N.css","/app/immutable/chunks/CHMwcoWM.js","/app/immutable/assets/LineChangesBadge.CJ0J_Z0k.css","/app/immutable/chunks/Bosi029J.js","/app/immutable/assets/NoteTabType.AG_iwaNn.css","/app/immutable/chunks/DHbqsCcC.js","/app/immutable/chunks/wEnqV1Ol.js","/app/immutable/chunks/Df4fyHSB.js","/app/immutable/chunks/C5tAJtyd.js","/app/immutable/assets/FileTabType.BUKcoHE1.css","/app/immutable/chunks/D5u143LD.js","/app/immutable/chunks/wZz1J3UE.js","/app/immutable/chunks/WWSsQ21S.js","/app/immutable/chunks/D6Hf6lXy.js","/app/immutable/assets/ChatChangesPanel.BQqG1JnE.css","/app/immutable/chunks/Bap7o4n5.js","/app/immutable/chunks/CJHIllR1.js","/app/immutable/chunks/DKrlwauu.js","/app/immutable/chunks/YtoDeXhM.js","/app/immutable/chunks/_Tye__BB.js","/app/immutable/chunks/BWtgRgi0.js","/app/immutable/chunks/BZ9svoQk.js"])))=>i.map(i=>d[i]);
2
+ import{bm as e,_ as c,t as Te,bo as ie,bw as he,b as ke}from"./hY0rMePc.js";import{t as u}from"./C0CrTfQC.js";import{bD as ue,bv as Ve,cK as Ne,aO as $e,cn as Me,aV as ge,bg as Ke,aN as Be,aM as Ge,bs as He,bL as qe,b_ as Fe,bJ as je,F as Ue}from"./DETS1-K4.js";import{R as H}from"./BzqJYEOZ.js";import{bs as we,ca as Q,bH as v,aD as t,bV as K,br as ze,a7 as q,ay as M,W as p,bn as Le,c9 as b,aA as ne,a5 as X,bA as Z,bS as ye,aw as Ye,aB as W,be as F,b$ as x,b_ as I,bO as E,bl as Je,bk as Qe}from"./3SdAC2_C.js";import{i as D}from"./BWmYJDmC.js";import{s as fe}from"./leDczq9h.js";import{L as me}from"./BJHkJxQ6.js";import{C as Xe,L as be}from"./CbaFGz2w.js";import{I as Ze}from"./CmbheRhJ.js";import"./COB2k0Aa.js";import"./uAXEbxa8.js";import{f as le}from"./CIU_APaR.js";import{v as Ie}from"./rNjiZ_3W.js";import"./CbqBbwIN.js";import"./CjZEyjv4.js";import{I as ve}from"./D400ElMz.js";import{I as et}from"./Bqd7fdCF.js";import"./BTc_j7Dt.js";import{a as tt}from"./BdWqymET.js";function xt(){u.register({type:"workspace",loadComponent:()=>c(()=>import("./DV6uX7ff.js"),__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,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209]),import.meta.url),defaultWidthTier:"wide",icon:ue,get defaultTitle(){return e.workspace_page_workspaceResource_label()},get categoryLabel(){return e.workspace_page_workspaceResource_label()},renameable:!1}),u.register({type:"browser",loadComponent:()=>c(()=>import("./D8elUKsb.js"),__vite__mapDeps([210,1,2,3,11,6,7,8,9,10,15,211,22,23,24,25,26,18,13,4,71,14,16,17,19,12,20,21,27,28,29,30,31,32,45,33,34,35,36,37,38,39,40,41,42,43,44,46,58,72,64,62,65,68,60,59,73,74,75,76,63,77,78,181,92,57,61,182,212,123,213,125,52,136,86,214,99,100,215,109,110,111,112,113,216,217,102,218]),import.meta.url),defaultWidthTier:"wide",icon:Ve,get defaultTitle(){return e.layout_tabTypes_browser_title()},get categoryLabel(){return e.layout_tabTypes_browser_category()},sidebarTabId:"browser",renameable:!1}),u.register({type:"terminal",loadComponent:()=>c(()=>import("./CBvkahdk.js"),__vite__mapDeps([219,1,2,3,4,11,28,7,8,9,10,6,64,18,22,23,24,25,26,13,62,16,17,19,65,20,220,15,221,222,59,60,57,58,61,63,223,224,225,226,227,112,212,191,228,14,12,21,27,29,30,31,32,213,229,72,68,73,74,75,76,77,78,36,42,43,40,41,217,230,38,35,39,136,33,34,37,44,45,46,215,231,149,232,233,102,234]),import.meta.url),defaultWidthTier:"medium",icon:Ne,get defaultTitle(){return e.layout_tabTypes_terminal_title()},get categoryLabel(){return e.layout_tabTypes_terminal_category()},sidebarTabId:"terminals",renameable:!1}),u.register({type:"code-review",loadComponent:()=>c(()=>import("./qLxI2L63.js"),__vite__mapDeps([235,1,2,22,23,24,25,9,7,26,18,13,3,29,6,8,10,64,28,11,62,16,17,19,65,20,216,76,63,78,92,72,68,60,59,73,74,75,77,58,57,61,217,181,12,14,15,4,21,27,30,31,32,182,102,236,237,178,84,87,179,180,130,132,133,142,229,167,238,234,239,36,42,43,40,41,113,112,172,206,191,213,143,135,71,240,241,242,243,244,199,151,109,110,111,245,246,223,224,225,226,227,140,153,154,35,164,82,69,70,33,34,37,38,39,44,45,46,79,80,81,50,51,117,165,125,52]),import.meta.url),defaultWidthTier:"wide",icon:$e,get defaultTitle(){return e.layout_tabTypes_codeReview_title()},get categoryLabel(){return e.layout_tabTypes_codeReview_category()},renameable:!1}),u.register({type:"agent-overview",loadComponent:()=>c(()=>import("./NZ_vlsKe.js"),__vite__mapDeps([247,1,2,3,6,7,8,9,10,15,14,16,13,17,18,19,11,4,119,120,121,75,22,23,24,25,26,76,63,77,64,28,62,65,20,78,58,122,12,21,27,29,30,31,32,158,81,51,178,84,87,68,60,59,179,180,130,92,72,73,74,57,61,132,133,142,109,110,111,112,113,248]),import.meta.url),defaultWidthTier:"narrow",icon:Me,get defaultTitle(){return e.layout_tabTypes_agentOverview_title()},get categoryLabel(){return e.layout_tabTypes_agents_category()},renameable:!1}),u.register({type:"agent",loadComponent:()=>c(()=>import("./gkPeOUJv.js"),__vite__mapDeps([249,1,2,3,4,6,7,8,9,10,11,15,72,22,23,24,25,26,18,13,64,28,62,16,17,19,65,20,68,60,59,73,74,75,76,63,77,78,58,250,14,251,238,12,21,27,29,30,31,32,237,102,57,61,133,205,44,45,215,240,132,92,241,103,35,36,47,48,49,42,43,50,51,52,53,104,38,39,105,86,34,37,40,41,71,82,33,46,106,107,81,108,95,96,109,110,111,112,113,114,115,194,54,55,56,66,67,69,70,79,80,83,84,85,87,88,89,90,91,93,94,97,98,99,100,101,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,195,196,197,198,199,200,201,202,203,204,206,207,208,217,216]),import.meta.url),defaultWidthTier:"chat",icon:ge,get defaultTitle(){return e.layout_tabTypes_agent_title()},get categoryLabel(){return e.layout_tabTypes_agents_category()},sidebarTabId:"agents",renameable:!0}),u.register({type:"discussion",loadComponent:()=>c(()=>import("./BRsOtr8M.js"),__vite__mapDeps([252,1,2,3,4,11,8,9,7,10,16,13,17,18,19,38,6,29,35,15,36,14,39,33,34,37,27,40,41,28,42,31,43,44,45,46,21,22,23,24,25,26,217,12,20,30,32,64,62,65,72,68,60,59,73,74,75,76,63,77,78,58,92,57,61,194,88,89,66,114,120,121,125,52,161,82,164,140,69,70,71,79,80,81,50,51,117,165,99,100,48,236,216,181,182,102,237,178,84,87,179,180,130,132,133,142,229,167,238,234,239,113,112,172,206,191,213,143,135,240,241,242,243,244,199,151,109,110,111,245,246,223,224,225,226,227,129,131,253,98,94,95,49,96,97,118,215,254]),import.meta.url),defaultWidthTier:"chat",icon:ge,get defaultTitle(){return e.workspace_discussion_title()},get categoryLabel(){return e.workspace_discussion_list_label()},sidebarTabId:"people",renameable:!1}),u.register({type:"note",loadComponent:()=>c(()=>import("./Dg5FvxXA.js"),__vite__mapDeps([255,1,2,3,11,64,18,9,22,23,24,25,7,26,13,28,8,10,6,62,16,17,19,65,20,215,181,92,72,68,60,59,73,74,75,76,63,77,78,58,57,61,12,14,15,4,21,27,29,30,31,32,182,35,36,81,88,89,50,51,33,34,37,38,39,40,41,42,43,44,45,46,117,120,121,138,139,140,141,116,71,52,69,70,79,80,82,67,118,114,119,122,123,100,124,236,216,217,102,237,178,84,87,179,180,130,132,133,142,229,167,238,234,239,113,112,172,206,191,213,143,135,240,241,242,243,244,199,151,109,110,111,245,246,223,224,225,226,227,146,55,147,148,149,150,256,257,258,108,95,49,96,163,195,259,260,153,154,106,48,107,261,156,157,158,159,152,155,162,184,192,136,197,198,174,164,165,262]),import.meta.url),defaultWidthTier:"medium",icon:H.note,get defaultTitle(){return e.layout_tabTypes_note_title()},get categoryLabel(){return e.layout_tabTypes_context_category()},sidebarTabId:"notes",renameable:!0}),u.register({type:"file",loadComponent:()=>c(()=>import("./DHbqsCcC.js"),__vite__mapDeps([263,1,2,3,4,6,7,8,9,10,11,15,22,23,24,25,26,18,13,215,151,64,28,62,16,17,19,65,20,264,68,60,59,199,77,12,14,21,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,236,61,57,58,63,92,72,73,74,75,76,78,216,217,181,182,102,237,178,84,87,179,180,130,132,133,142,229,167,238,234,239,113,112,172,206,191,213,143,135,71,240,241,242,243,244,109,110,111,245,246,223,224,225,226,227,256,257,117,258,164,140,82,69,70,79,80,81,50,51,165,136,265,123,266,233,267]),import.meta.url),defaultWidthTier:"wide",icon:Ke,get defaultTitle(){return e.layout_tabTypes_file_title()},get categoryLabel(){return e.layout_tabTypes_files_category()},sidebarTabId:"files",renameable:!0}),u.register({type:"diff",loadComponent:()=>c(()=>import("./D5u143LD.js"),__vite__mapDeps([268,1,2,3,4,11,163,22,23,24,25,9,7,26,18,13,215,64,28,8,10,6,62,16,17,19,65,20,146,55,15,132,59,92,72,68,60,73,74,75,76,63,77,78,58,57,61,21,133,147,148,14,149,35,29,36,150,269,151,33,34,37,27,38,39,40,41,42,31,43,44,45,46,117,136,265,197,198,174,12,30,32,199,121]),import.meta.url),defaultWidthTier:"wide",icon:Be,get defaultTitle(){return e.layout_tabTypes_diff_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},sidebarTabId:"files",renameable:!1}),u.register({type:"changes",loadComponent:()=>c(()=>import("./WWSsQ21S.js"),__vite__mapDeps([270,1,2,4,15,22,23,24,25,9,7,26,18,13,163,215,64,28,11,3,8,10,6,62,16,17,19,65,20,216,76,63,78,92,72,68,60,59,73,74,75,77,58,57,61,217,181,12,14,21,27,29,30,31,32,182,102,271,160,259,260,146,55,132,133,147,148,149,35,36,150,269,151,33,34,37,38,39,40,41,42,43,44,45,46,117,120,121,106,48,49,107,134,135,71,126,143,178,84,87,179,180,130,142,236,237,229,167,238,234,239,113,112,172,206,191,213,240,241,242,243,244,199,109,110,111,245,246,223,224,225,226,227,272,265]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_changes_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},sidebarTabId:"changes",renameable:!1}),u.register({type:"local-changes",loadComponent:()=>c(()=>import("./Bap7o4n5.js"),__vite__mapDeps([273,1,2,15,22,23,24,25,9,7,26,18,13,163,215,64,28,11,3,8,10,6,62,16,17,19,65,20,271,29,160,259,260,92,72,68,60,59,73,74,75,76,63,77,78,58,57,61,146,55,132,21,133,147,148,14,4,149,35,36,150,269,151,33,34,37,27,38,39,40,41,42,31,43,44,45,46,117,120,121,106,30,48,49,107,12,32,134,135,71,126,143,181,182,216,217,102,178,84,87,179,180,130,142,236,237,229,167,238,234,239,113,112,172,206,191,213,240,241,242,243,244,199,109,110,111,245,246,223,224,225,226,227,272,265]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_localChanges_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},sidebarTabId:"changes",renameable:!1}),u.register({type:"chat-changes",loadComponent:()=>c(()=>import("./CJHIllR1.js"),__vite__mapDeps([274,1,2,3,271,6,7,8,9,10,29,15,22,23,24,25,26,18,13,160,64,28,11,62,16,17,19,65,20,259,260,92,72,68,60,59,73,74,75,76,63,77,78,58,57,61,146,55,132,21,133,147,148,14,4,149,35,36,150,269,151,33,34,37,27,38,39,40,41,42,31,43,44,45,46,117,120,121,106,30,48,49,107,12,32,134,135,71,126,143,181,182,216,217,102,178,84,87,179,180,130,142,236,237,229,167,238,234,239,113,112,172,206,191,213,240,241,242,243,244,199,109,110,111,245,246,223,224,225,226,227,272]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_chatChanges_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},renameable:!1}),u.register({type:"activity-changes",loadComponent:()=>c(()=>import("./DKrlwauu.js"),__vite__mapDeps([275,1,2,3,4,11,62,241,24,59,146,8,9,7,10,55,15,132,16,13,17,18,19,22,23,25,26,92,64,28,6,65,20,72,68,60,73,74,75,76,63,77,78,58,57,61,21,133,147,148,14,149,35,29,36,150,269,151,33,34,37,27,38,39,40,41,42,31,43,44,45,46,117,215,136,265,197,198,174,12,30,32,199,121]),import.meta.url),defaultWidthTier:"wide",icon:H.changes,get defaultTitle(){return e.layout_tabTypes_activityChanges_title()},get categoryLabel(){return e.layout_tabTypes_changes_category()},renameable:!1}),u.register({type:"hook-script",loadComponent:()=>c(()=>import("./YtoDeXhM.js"),__vite__mapDeps([276,1,2,3,152,6,7,8,9,10,140,153,59,154,12,13,14,15,16,17,18,19,11,4,20,21,22,23,24,25,26,27,28,29,30,31,32,155,167,64,62,65,76,63,77]),import.meta.url),defaultWidthTier:"medium",icon:Ge,get defaultTitle(){return e.chat_backgroundHooks_viewScript_label()},get categoryLabel(){return e.layout_tabTypes_panel_category()},renameable:!1}),u.register({type:"settings",loadComponent:()=>c(()=>import("./_Tye__BB.js"),__vite__mapDeps([277,1,2]),import.meta.url),defaultWidthTier:"narrow",icon:He,get defaultTitle(){return e.layout_tabTypes_settings_title()},get categoryLabel(){return e.layout_tabTypes_settings_category()},renameable:!1}),u.register({type:"overview",loadComponent:()=>c(()=>import("./BWtgRgi0.js"),__vite__mapDeps([278,1,2]),import.meta.url),defaultWidthTier:"narrow",icon:ue,get defaultTitle(){return e.layout_tabTypes_overview_title()},get categoryLabel(){return e.layout_tabTypes_overview_category()},renameable:!1})}async function Wt(y){if(y?.restoreStatus!=="restored")return;const _=new Set(Object.values(y.panels).flatMap(r=>{const k=r.tabs.find(l=>l.id===r.activeTabId);return k?[k.type]:[]}));await Promise.allSettled([..._].map(r=>u.loadComponent(r)))}var at=W("<!> <!>",1),rt=W('<img class="h-auto w-full max-w-64 rounded-lg" width="512" height="512"/>'),ot=W('<div class="flex aspect-square w-full max-w-64 items-center justify-center"><!></div>'),st=W('<div class="flex justify-center" data-testid="passkey-qr"><!></div>'),it=W('<div class="flex justify-center py-4 text-muted-foreground"><!></div>'),nt=W('<p class="type-caption text-muted-foreground" data-testid="passkey-pin-advice"> </p>'),lt=W('<form id="passkey-pin-form" class="flex flex-col gap-3"><!> <!></form>');function Pe(y,_){if(new.target)return Te({component:Pe,...y});we(_,!0);let r=ie(_,"payload",7),k=ie(_,"static",7,!1),l=ie(_,"onRespond",7),f=K(!1),A=K(""),U=K("");const a=b(()=>r()?.view??null);Q(()=>{v(f,r()!==null)}),Q(()=>{t(a)?.step!=="pin"&&v(A,"")});let z=K(0),Y=K(ze(Date.now()));Q(()=>{const i=t(a)?.step==="pin"&&t(a).kind==="device"?t(a).retryAfterMs:void 0;if(typeof i!="number"){v(z,0);return}const T=Date.now();v(Y,T,!0),v(z,T+i);const w=setInterval(()=>{v(Y,Date.now(),!0),t(Y)>=t(z)&&clearInterval(w)},250);return()=>clearInterval(w)});const ee=b(()=>Math.max(0,Math.ceil((t(z)-t(Y))/1e3))),_e=b(()=>t(a)?.step==="pin"&&(t(a).kind==="device"?t(ee)>0:typeof t(a).retryAfterMs=="number"));Q(()=>{const i=t(a)?.step==="qr"?t(a).data:"";if(!i){v(U,"");return}let T=!0;return c(async()=>{const{default:w}=await import("./BZ9svoQk.js").then(C=>C.b);return{default:w}},__vite__mapDeps([279,59]),import.meta.url).then(({default:w})=>w.toDataURL(i,{width:512,margin:2})).then(w=>{T&&v(U,w,!0)}),()=>{T=!1}});const Ee=b(()=>r()?r().kind==="create"?e.passkeys_dialog_createTitle_label({site:r().rpId}):e.passkeys_dialog_getTitle_label({site:r().rpId}):"");function De(i){switch(i){case"bluetooth-off":return e.passkeys_dialog_bluetoothOff_error();case"bluetooth-missing":return e.passkeys_dialog_bluetoothMissing_error();case"pin-locked":return e.passkeys_dialog_pinLocked_error();case"timeout":return e.passkeys_dialog_timeout_error();case"already-registered":return e.passkeys_dialog_alreadyRegistered_error();case"unavailable":return e.passkeys_dialog_unavailable_error();case"device-locked":return e.passkeys_dialog_deviceLocked_error();case"device-already-registered":return e.passkeys_dialog_deviceAlreadyRegistered_error();case"device-no-passkey":return e.passkeys_dialog_deviceNoPasskey_error({site:r()?.rpId??""});case"device-old-pin-wrong":return e.passkeys_dialog_deviceOldPinWrong_error();case"device-failed":return e.passkeys_dialog_deviceFailed_error();default:return e.passkeys_dialog_failed_error()}}const Ae=b(()=>{if(!(!t(a)||!r()))switch(t(a).step){case"choose-transport":return r().kind==="create"?e.passkeys_dialog_chooseCreate_description():e.passkeys_dialog_chooseGet_description();case"qr":case"progress":switch(t(a).progress){case"waiting-for-phone":return e.passkeys_dialog_waitingForPhone_description();case"connecting":return e.passkeys_dialog_connecting_description();case"waiting-for-approval":return e.passkeys_dialog_waitingForApproval_description();case"touch-key":return e.passkeys_dialog_touchKey_description();case"processing":return e.passkeys_dialog_processing_description();default:return t(a).step==="progress"&&t(a).transport==="usb"?e.passkeys_dialog_insertKey_description():e.passkeys_dialog_starting_description()}case"pin":return t(a).kind==="usb"?e.passkeys_dialog_pin_description():t(a).oldPin?e.passkeys_dialog_deviceOldPin_description():e.passkeys_dialog_devicePin_description();case"choose-account":return e.passkeys_dialog_chooseAccount_description();case"error":return De(t(a).reason)}}),de=b(()=>t(a)?.step==="pin"&&t(a).kind==="device"?t(a).oldPin?e.passkeys_dialog_deviceOldPin_label():e.passkeys_dialog_devicePin_label():e.passkeys_dialog_pin_label()),Ce=b(()=>{if(t(a)?.step==="pin"){if(t(a).kind==="device"){if(t(ee)>0)return e.passkeys_dialog_devicePinWait_error({seconds:t(ee)})}else if(typeof t(a).retryAfterMs=="number")return e.passkeys_dialog_pinRetryAfter_error();if(t(a).wrongPin)return typeof t(a).attemptsLeft=="number"?t(a).attemptsLeft===1?e.passkeys_dialog_wrongPinAttempts_one({count:t(a).attemptsLeft}):e.passkeys_dialog_wrongPinAttempts_many({count:t(a).attemptsLeft}):e.passkeys_dialog_wrongPin_error()}}),Oe=b(()=>{if(t(a)?.step!=="choose-transport")return[];const i=t(a).hybrid==="bluetooth-off"?e.passkeys_dialog_bluetoothOff_description():t(a).hybrid==="bluetooth-missing"?e.passkeys_dialog_bluetoothMissing_description():void 0;return[...t(a).device?[{id:"device",label:e.passkeys_dialog_thisDevice_label(),note:void 0,icon:qe}]:[],{id:"hybrid",label:e.passkeys_dialog_phone_label(),note:i,icon:Fe},{id:"usb",label:e.passkeys_dialog_securityKey_label(),note:void 0,icon:je}]});function te(){l()({action:"cancel"})}function Re(i){if(i.preventDefault(),!t(A))return;const T=t(A);v(A,""),l()({action:"pin",pin:T})}var xe={get payload(){return r()},set payload(i){r(i),ne()},get static(){return k()},set static(i=!1){k(i),ne()},get onRespond(){return l()},set onRespond(i){l(i),ne()},$set:he,$on:(i,T)=>ke(_,i,T)},pe=q(),We=M(pe);{var Se=i=>{{const T=C=>{var ae=q(),J=M(ae);{var re=P=>{le(P,{variant:"secondary",onclick:te,children:(S,B)=>{F();var V=x();I(d=>E(V,d),[()=>e.passkeys_dialog_close_label()]),p(S,V)},$$slots:{default:!0}})},oe=P=>{var S=at(),B=M(S);le(B,{variant:"ghost",onclick:te,children:(n,m)=>{F();var s=x();I(L=>E(s,L),[()=>e.passkeys_dialog_cancel_label()]),p(n,s)},$$slots:{default:!0}});var V=ye(B,2);{var d=n=>{{let m=b(()=>!t(A)||t(_e));le(n,{variant:"primary",type:"submit",form:"passkey-pin-form",get disabled(){return t(m)},children:(s,L)=>{F();var o=x();I(g=>E(o,g),[()=>e.passkeys_dialog_continue_label()]),p(s,o)},$$slots:{default:!0}})}};D(V,n=>{t(a).step==="pin"&&n(d)})}p(P,S)};D(J,P=>{t(a).step==="error"?P(re):P(oe,-1)})}p(C,ae)};let w=b(()=>t(a).step==="error"?e.passkeys_dialog_close_label():e.passkeys_dialog_cancel_label());Xe(i,{get static(){return k()},get title(){return t(Ee)},get description(){return t(Ae)},size:"sm",dismissOnInteractOutside:!1,get closeLabel(){return t(w)},onClose:te,get open(){return t(f)},set open(C){v(f,C,!0)},footer:T,children:(C,ae)=>{var J=q(),re=M(J);{var oe=d=>{{const n=(s,L)=>{let o=()=>(L?.()).item;me(s,{leading:h=>{Ue(h,{get icon(){return o().icon},fw:!0})},title:h=>{F();var R=x();I(()=>E(R,o().label)),p(h,R)},description:h=>{var R=q(),se=M(R);{var G=$=>{var ce=x();I(()=>E(ce,o().note)),p($,ce)};D(se,$=>{o().note&&$(G)})}p(h,R)},$$slots:{leading:!0,title:!0,description:!0}})};let m=b(()=>e.passkeys_dialog_transports_ariaLabel());be(d,{get items(){return t(Oe)},getKey:s=>s.id,getText:s=>s.label,get ariaLabel(){return t(m)},onActivate:s=>l()({action:"transport",transport:s.id}),row:n,$$slots:{row:!0}})}},P=d=>{var n=st(),m=X(n);{var s=o=>{var g=rt();I(O=>{fe(g,"src",t(U)),fe(g,"alt",O)},[()=>e.passkeys_dialog_qrImage_ariaLabel()]),p(o,g)},L=o=>{var g=ot(),O=X(g);ve(O,{size:20}),Z(g),p(o,g)};D(m,o=>{t(U)?o(s):o(L,-1)})}Z(n),p(d,n)},S=d=>{var n=it(),m=X(n);ve(m,{size:20}),Z(n),p(d,n)},B=d=>{var n=lt(),m=X(n);{let o=b(()=>t(a).kind==="device"?"numeric":void 0);Ze(m,{type:"password",get inputmode(){return t(o)},autocomplete:"off",get"aria-label"(){return t(de)},get placeholder(){return t(de)},get error(){return t(Ce)},get disabled(){return t(_e)},autofocus:!0,get value(){return t(A)},set value(g){v(A,g,!0)}})}var s=ye(m,2);{var L=o=>{var g=nt(),O=Je(g,!0);I(N=>E(O,N),[()=>e.passkeys_dialog_devicePinAdvice_description()]),p(o,g)};D(s,o=>{t(a).firstPasskey&&o(L)})}Z(n),Ye("submit",n,Re),p(d,n)},V=d=>{{const n=(s,L)=>{let o=()=>(L?.()).item;me(s,{title:N=>{F();var h=x();I(()=>E(h,o().userDisplayName||o().userName)),p(N,h)},description:N=>{var h=q(),R=M(h);{var se=G=>{var $=x();I(()=>E($,o().userName)),p(G,$)};D(R,G=>{o().userDisplayName&&o().userName&&G(se)})}p(N,h)},$$slots:{title:!0,description:!0}})};let m=b(()=>e.passkeys_dialog_accounts_ariaLabel());be(d,{get items(){return t(a).accounts},getKey:s=>s.index,getText:s=>s.userDisplayName||s.userName,get ariaLabel(){return t(m)},onActivate:s=>l()({action:"choose",index:s.index}),row:n,$$slots:{row:!0}})}};D(re,d=>{t(a).step==="choose-transport"?d(oe):t(a).step==="qr"?d(P,1):t(a).step==="progress"?d(S,2):t(a).step==="pin"?d(B,3):t(a).step==="choose-account"&&d(V,4)})}p(C,J)},$$slots:{footer:!0,default:!0}})}};D(We,i=>{r()&&t(a)&&i(Se)})}return p(y,pe),Le(xe)}const _t=new tt("PasskeyDialog"),j=et.PASSKEYS;function dt(y){const _=Ie();if(!_)return()=>{};const r=_.on(j.DIALOG_SHOW,l=>{const f=l;!f||typeof f.ceremonyId!="string"||!f.view||y.onShow(f)}),k=_.on(j.DIALOG_CLOSE,l=>{const f=l;f&&typeof f.ceremonyId=="string"&&y.onClose(f.ceremonyId)});return()=>{_.offById(j.DIALOG_SHOW,r),_.offById(j.DIALOG_CLOSE,k)}}function pt(y){const _=Ie();_&&_.invoke(j.DIALOG_RESPOND,y).catch(()=>{_t.warn("Passkey dialog response failed",{action:y.action})})}function ct(y,_){if(new.target)return Te({component:ct,...y});we(_,!0);let r=K(null);Qe(()=>dt({onShow:l=>{v(r,l,!0)},onClose:l=>{t(r)?.ceremonyId===l&&v(r,null)}}));var k={$set:he,$on:(l,f)=>ke(_,l,f)};return Pe(y,{get payload(){return t(r)},onRespond:l=>{t(r)&&pt({...l,ceremonyId:t(r).ceremonyId})}}),Le(k)}export{ct as P,Wt as p,xt as r};
@@ -1 +1 @@
1
- import{D as C}from"./3BCyU2N-.js";import{t as re,bo as y,bw as se,b as ae,bm as I}from"./hY0rMePc.js";import{bs as ne,cb as oe,c5 as ie,bH as k,aD as b,a5 as G,bA as W,b_ as R,W as E,bn as le,bV as q,c9 as F,aA as x,ay as H,bl as N,bS as L,bO as O,a7 as ce,aB as P}from"./3SdAC2_C.js";import{i as de}from"./BWmYJDmC.js";import{k as me}from"./CXul4WJt.js";import{s as D}from"./leDczq9h.js";import{a as ue}from"./Cxz7a3ln.js";const K=C.shape.model,pe=C.shape.states.unwrap().element;function U(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function fe(t){return/^(?:|model|model\.(?:nodes|edges|groups)|states)$/.test(t)}function ge(t){let e=0;const s=()=>{for(;/[\t\n\r ]/.test(t[e]??"\0");)e+=1},a=(l,d)=>{if(d>64)throw new Error("JSON nesting limit exceeded");s();const f=e,m=t[e];if(m===void 0)return{complete:!1};if(m==='"'){for(e+=1;e<t.length;){const r=t[e++];if(r==="\\")e+=1;else if(r==='"')return{value:JSON.parse(t.slice(f,e)),complete:!0}}return{complete:!1}}if(m==="{"||m==="["){const r=m==="{",c=r?Object.create(null):[],h=r?"}":"]";if(e+=1,s(),t[e]===h)return e+=1,{value:c,complete:!0};for(;e<t.length;){let i="";if(r){if(t[e]!=='"')throw new Error("Expected JSON property");const _=a(l,d+1);if(!_.complete)return{value:c,complete:!1};if(i=_.value,s(),e===t.length)return{value:c,complete:!1};if(t[e++]!==":")throw new Error("Expected JSON colon")}const g=r?l?`${l}.${i}`:i:`${l}[]`,v=a(g,d+1);if((v.complete||fe(g)&&v.value!==void 0)&&(Array.isArray(c)?c.push(v.value):c[i]=v.value),!v.complete)return{value:c,complete:!1};if(s(),e===t.length)return{value:c,complete:!1};if(t[e]===h)return e+=1,{value:c,complete:!0};if(t[e++]!==",")throw new Error("Expected JSON separator");s()}return{value:c,complete:!1}}for(;e<t.length&&!/[\t\n\r ,}\]]/.test(t[e]);)e+=1;return e===t.length?{complete:!1}:{value:JSON.parse(t.slice(f,e)),complete:!0}},n=a("",0);if(s(),n.complete&&e!==t.length)throw new Error("Unexpected JSON suffix");return n}function J(t){const e=new Set;return t.filter(({id:s})=>e.has(s)?!1:(e.add(s),!0))}function z(t,e,s,a){return[t.visibleNodes,t.highlightedNodes].every(n=>n?.every(l=>e.has(l))??!0)&&[t.visibleEdges,t.highlightedEdges].every(n=>n?.every(l=>s.has(l))??!0)&&(t.visibleGroups?.every(n=>a.has(n))??!0)&&(t.camera?.focus===void 0||e.has(t.camera.focus))}function ve(t){if(!U(t)||!U(t.model))return null;const e=t.model,s=(i,g)=>Array.isArray(i)?i.filter(v=>g.safeParse(v).success):[];let a=J(s(e.nodes,K.shape.nodes.element)),n=J(s(e.groups,K.shape.groups.unwrap().element)),l=!0;for(;l;){const i=new Set(a.map(({id:u})=>u)),g=n.filter(u=>u.nodeIds.every(A=>i.has(A))),v=new Set(g.map(({id:u})=>u)),_=a.filter(u=>u.group===void 0||v.has(u.group));l=_.length!==a.length||g.length!==n.length,a=_,n=g}if(!a.length)return null;const d=new Set(a.map(({id:i})=>i)),f=J(s(e.edges,K.shape.edges.element)).filter(i=>d.has(i.from)&&d.has(i.to)),m=new Set(f.map(({id:i})=>i)),r=new Set(n.map(({id:i})=>i)),c=J(s(t.states,pe)).filter(i=>z(i,d,m,r)),h={...t,model:{...e,nodes:a,edges:f,...e.groups===void 0?{}:{groups:n}},...t.states===void 0?{}:{states:c}};return c.some(i=>i.id===h.currentStateId)||delete h.currentStateId,C.safeParse(h).success?h:null}function V(t){if(!C.safeParse(t).success)return null;const e=t,{nodes:s,edges:a,groups:n=[]}=e.model,l=e.states??[],d=new Set(s.map(({id:r})=>r)),f=new Set(a.map(({id:r})=>r)),m=new Set(n.map(({id:r})=>r));return[s,a,n,l].some(r=>new Set(r.map(({id:c})=>c)).size!==r.length)||s.some(r=>r.group!==void 0&&!m.has(r.group))||a.some(r=>!d.has(r.from)||!d.has(r.to))||n.some(r=>r.nodeIds.some(c=>!d.has(c)))||l.some(r=>!z(r,d,f,m))||e.currentStateId!==void 0&&!l.some(r=>r.id===e.currentStateId)?null:e}function Oe(t,e=!1){const s=(a,n,l)=>({rawSource:t,status:a,diagram:n,...l?{error:l}:{}});try{if(e){const n=V(JSON.parse(t));return n?s("complete",n):s("invalid",null,"Invalid diagram payload")}const a=ge(t);if(a.complete){const n=V(a.value);if(n)return s("complete",n)}return s("partial",ve(a.value))}catch{return s(e?"invalid":"partial",null,e?"Invalid diagram JSON":void 0)}}var he=P('<div class="diagram-feedback svelte-p097sp" role="alert"><strong> </strong> <span> </span></div> <pre class="diagram-source svelte-p097sp"> </pre>',1),we=P('<div class="diagram-feedback svelte-p097sp" role="status"> </div>'),Se=P('<div class="streaming-diagram svelte-p097sp"><!></div>');function _e(t,e){if(new.target)return re({component:_e,...t});ne(e,!0);let s=y(e,"diagram",7),a=y(e,"isStreaming",7,!1),n=y(e,"source",7),l=y(e,"sourceError",7),d=y(e,"viewResetKey",7),f=y(e,"onBindingClick",7),m=q(null),r=q(0),c="",h,i=!1;oe(()=>{const o=s(),p=n(),w=d(),S=a(),B=!!l();ie(()=>{i&&(w!==h||!p.startsWith(c))&&(k(m,null),k(r,b(r)+1)),i=!0,c=p,h=w,B||!S&&!o?k(m,null):o&&k(m,o,!0)})});const g=F(()=>l()?null:s()??(a()?b(m):null)),v=F(()=>!!l()||!a()&&!s());var _={get diagram(){return s()},set diagram(o){s(o),x()},get isStreaming(){return a()},set isStreaming(o=!1){a(o),x()},get source(){return n()},set source(o){n(o),x()},get sourceError(){return l()},set sourceError(o){l(o),x()},get viewResetKey(){return d()},set viewResetKey(o){d(o),x()},get onBindingClick(){return f()},set onBindingClick(o){f(o),x()},$set:se,$on:(o,p)=>ae(e,o,p)},u=Se(),A=G(u);{var M=o=>{var p=he(),w=H(p),S=G(w),B=N(S,!0),X=L(S,2),Y=N(X,!0);W(w);var j=L(w,2),Z=N(j,!0);R(($,ee,te)=>{O(B,$),O(Y,ee),D(j,"aria-label",te),O(Z,n())},[()=>I.markdown_mermaid_renderFailed_error(),()=>I.diagram_renderer_error_description(),()=>I.markdown_mermaid_viewSource_label()]),E(o,p)},Q=o=>{var p=ce(),w=H(p);me(w,()=>b(r),S=>{ue(S,{get diagram(){return b(g)},editable:!1,get viewResetKey(){return d()},get onBindingClick(){return f()}})}),E(o,p)},T=o=>{var p=we(),w=N(p,!0);R(S=>O(w,S),[()=>I.ui_spinner_loading_ariaLabel()]),E(o,p)};de(A,o=>{b(v)?o(M):b(g)?o(Q,1):o(T,-1)})}return W(u),R(()=>{D(u,"aria-busy",a()),D(u,"data-diagram-streaming",a())}),E(t,u),le(_)}export{_e as S,Oe as p};
1
+ import{D as C}from"./Cw2ZnpX7.js";import{t as re,bo as y,bw as se,b as ae,bm as I}from"./hY0rMePc.js";import{bs as ne,cb as oe,c5 as ie,bH as k,aD as b,a5 as G,bA as W,b_ as R,W as E,bn as le,bV as q,c9 as F,aA as x,ay as H,bl as N,bS as L,bO as O,a7 as ce,aB as P}from"./3SdAC2_C.js";import{i as de}from"./BWmYJDmC.js";import{k as me}from"./CXul4WJt.js";import{s as D}from"./leDczq9h.js";import{a as ue}from"./CBZTF7Qa.js";const K=C.shape.model,pe=C.shape.states.unwrap().element;function U(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function fe(t){return/^(?:|model|model\.(?:nodes|edges|groups)|states)$/.test(t)}function ge(t){let e=0;const s=()=>{for(;/[\t\n\r ]/.test(t[e]??"\0");)e+=1},a=(l,d)=>{if(d>64)throw new Error("JSON nesting limit exceeded");s();const f=e,m=t[e];if(m===void 0)return{complete:!1};if(m==='"'){for(e+=1;e<t.length;){const r=t[e++];if(r==="\\")e+=1;else if(r==='"')return{value:JSON.parse(t.slice(f,e)),complete:!0}}return{complete:!1}}if(m==="{"||m==="["){const r=m==="{",c=r?Object.create(null):[],h=r?"}":"]";if(e+=1,s(),t[e]===h)return e+=1,{value:c,complete:!0};for(;e<t.length;){let i="";if(r){if(t[e]!=='"')throw new Error("Expected JSON property");const _=a(l,d+1);if(!_.complete)return{value:c,complete:!1};if(i=_.value,s(),e===t.length)return{value:c,complete:!1};if(t[e++]!==":")throw new Error("Expected JSON colon")}const g=r?l?`${l}.${i}`:i:`${l}[]`,v=a(g,d+1);if((v.complete||fe(g)&&v.value!==void 0)&&(Array.isArray(c)?c.push(v.value):c[i]=v.value),!v.complete)return{value:c,complete:!1};if(s(),e===t.length)return{value:c,complete:!1};if(t[e]===h)return e+=1,{value:c,complete:!0};if(t[e++]!==",")throw new Error("Expected JSON separator");s()}return{value:c,complete:!1}}for(;e<t.length&&!/[\t\n\r ,}\]]/.test(t[e]);)e+=1;return e===t.length?{complete:!1}:{value:JSON.parse(t.slice(f,e)),complete:!0}},n=a("",0);if(s(),n.complete&&e!==t.length)throw new Error("Unexpected JSON suffix");return n}function J(t){const e=new Set;return t.filter(({id:s})=>e.has(s)?!1:(e.add(s),!0))}function z(t,e,s,a){return[t.visibleNodes,t.highlightedNodes].every(n=>n?.every(l=>e.has(l))??!0)&&[t.visibleEdges,t.highlightedEdges].every(n=>n?.every(l=>s.has(l))??!0)&&(t.visibleGroups?.every(n=>a.has(n))??!0)&&(t.camera?.focus===void 0||e.has(t.camera.focus))}function ve(t){if(!U(t)||!U(t.model))return null;const e=t.model,s=(i,g)=>Array.isArray(i)?i.filter(v=>g.safeParse(v).success):[];let a=J(s(e.nodes,K.shape.nodes.element)),n=J(s(e.groups,K.shape.groups.unwrap().element)),l=!0;for(;l;){const i=new Set(a.map(({id:u})=>u)),g=n.filter(u=>u.nodeIds.every(A=>i.has(A))),v=new Set(g.map(({id:u})=>u)),_=a.filter(u=>u.group===void 0||v.has(u.group));l=_.length!==a.length||g.length!==n.length,a=_,n=g}if(!a.length)return null;const d=new Set(a.map(({id:i})=>i)),f=J(s(e.edges,K.shape.edges.element)).filter(i=>d.has(i.from)&&d.has(i.to)),m=new Set(f.map(({id:i})=>i)),r=new Set(n.map(({id:i})=>i)),c=J(s(t.states,pe)).filter(i=>z(i,d,m,r)),h={...t,model:{...e,nodes:a,edges:f,...e.groups===void 0?{}:{groups:n}},...t.states===void 0?{}:{states:c}};return c.some(i=>i.id===h.currentStateId)||delete h.currentStateId,C.safeParse(h).success?h:null}function V(t){if(!C.safeParse(t).success)return null;const e=t,{nodes:s,edges:a,groups:n=[]}=e.model,l=e.states??[],d=new Set(s.map(({id:r})=>r)),f=new Set(a.map(({id:r})=>r)),m=new Set(n.map(({id:r})=>r));return[s,a,n,l].some(r=>new Set(r.map(({id:c})=>c)).size!==r.length)||s.some(r=>r.group!==void 0&&!m.has(r.group))||a.some(r=>!d.has(r.from)||!d.has(r.to))||n.some(r=>r.nodeIds.some(c=>!d.has(c)))||l.some(r=>!z(r,d,f,m))||e.currentStateId!==void 0&&!l.some(r=>r.id===e.currentStateId)?null:e}function Oe(t,e=!1){const s=(a,n,l)=>({rawSource:t,status:a,diagram:n,...l?{error:l}:{}});try{if(e){const n=V(JSON.parse(t));return n?s("complete",n):s("invalid",null,"Invalid diagram payload")}const a=ge(t);if(a.complete){const n=V(a.value);if(n)return s("complete",n)}return s("partial",ve(a.value))}catch{return s(e?"invalid":"partial",null,e?"Invalid diagram JSON":void 0)}}var he=P('<div class="diagram-feedback svelte-p097sp" role="alert"><strong> </strong> <span> </span></div> <pre class="diagram-source svelte-p097sp"> </pre>',1),we=P('<div class="diagram-feedback svelte-p097sp" role="status"> </div>'),Se=P('<div class="streaming-diagram svelte-p097sp"><!></div>');function _e(t,e){if(new.target)return re({component:_e,...t});ne(e,!0);let s=y(e,"diagram",7),a=y(e,"isStreaming",7,!1),n=y(e,"source",7),l=y(e,"sourceError",7),d=y(e,"viewResetKey",7),f=y(e,"onBindingClick",7),m=q(null),r=q(0),c="",h,i=!1;oe(()=>{const o=s(),p=n(),w=d(),S=a(),B=!!l();ie(()=>{i&&(w!==h||!p.startsWith(c))&&(k(m,null),k(r,b(r)+1)),i=!0,c=p,h=w,B||!S&&!o?k(m,null):o&&k(m,o,!0)})});const g=F(()=>l()?null:s()??(a()?b(m):null)),v=F(()=>!!l()||!a()&&!s());var _={get diagram(){return s()},set diagram(o){s(o),x()},get isStreaming(){return a()},set isStreaming(o=!1){a(o),x()},get source(){return n()},set source(o){n(o),x()},get sourceError(){return l()},set sourceError(o){l(o),x()},get viewResetKey(){return d()},set viewResetKey(o){d(o),x()},get onBindingClick(){return f()},set onBindingClick(o){f(o),x()},$set:se,$on:(o,p)=>ae(e,o,p)},u=Se(),A=G(u);{var M=o=>{var p=he(),w=H(p),S=G(w),B=N(S,!0),X=L(S,2),Y=N(X,!0);W(w);var j=L(w,2),Z=N(j,!0);R(($,ee,te)=>{O(B,$),O(Y,ee),D(j,"aria-label",te),O(Z,n())},[()=>I.markdown_mermaid_renderFailed_error(),()=>I.diagram_renderer_error_description(),()=>I.markdown_mermaid_viewSource_label()]),E(o,p)},Q=o=>{var p=ce(),w=H(p);me(w,()=>b(r),S=>{ue(S,{get diagram(){return b(g)},editable:!1,get viewResetKey(){return d()},get onBindingClick(){return f()}})}),E(o,p)},T=o=>{var p=we(),w=N(p,!0);R(S=>O(w,S),[()=>I.ui_spinner_loading_ariaLabel()]),E(o,p)};de(A,o=>{b(v)?o(M):b(g)?o(Q,1):o(T,-1)})}return W(u),R(()=>{D(u,"aria-busy",a()),D(u,"data-diagram-streaming",a())}),E(t,u),le(_)}export{_e as S,Oe as p};