@intent-hq/web 2.346.6 → 2.346.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{C_7dsakQ.js → -e8CXeVs.js} +1 -1
  3. package/web/app/immutable/chunks/{DI80ZNIw.js → 7uDreJHE.js} +1 -1
  4. package/web/app/immutable/chunks/{BkL200pu.js → 87nhMNcH.js} +4 -4
  5. package/web/app/immutable/chunks/{BJScJ18v.js → AXGmKfvU.js} +1 -1
  6. package/web/app/immutable/chunks/{BcXXTJlb.js → B-VSh3wf.js} +1 -1
  7. package/web/app/immutable/chunks/{EJB5bdXM.js → B4kTYcAj.js} +1 -1
  8. package/web/app/immutable/chunks/{B28RqyNs.js → B4rPFvYB.js} +1 -1
  9. package/web/app/immutable/chunks/{DTIBu4w9.js → B71JNHWD.js} +1 -1
  10. package/web/app/immutable/chunks/{DAtn3syX.js → B7WyDdGX.js} +1 -1
  11. package/web/app/immutable/chunks/{C_ljQm1V.js → B9W8KfsY.js} +1 -1
  12. package/web/app/immutable/chunks/{Be5456eH.js → BDPOc7V6.js} +2 -2
  13. package/web/app/immutable/chunks/{CaA-htwb.js → BFCqCX6w.js} +3 -3
  14. package/web/app/immutable/chunks/{Byq91_c-.js → BFM5w46H.js} +2 -2
  15. package/web/app/immutable/chunks/{-JevDvlP.js → BMAqdXv7.js} +1 -1
  16. package/web/app/immutable/chunks/{DdQFRJrC.js → BNVmW1uZ.js} +1 -1
  17. package/web/app/immutable/chunks/{u9IFdNn6.js → BS2rXad-.js} +1 -1
  18. package/web/app/immutable/chunks/{D5SeaOci.js → BTLLp91d.js} +1 -1
  19. package/web/app/immutable/chunks/{BPzOnvNA.js → BXe1baKr.js} +1 -1
  20. package/web/app/immutable/chunks/{B8suWc52.js → BZXx4oAF.js} +1 -1
  21. package/web/app/immutable/chunks/{DhdgUzma.js → B_keSK2s.js} +1 -1
  22. package/web/app/immutable/chunks/{ChcJLcLm.js → B_zHVi1K.js} +1 -1
  23. package/web/app/immutable/chunks/{DkKgyz1e.js → Bdc65NEQ.js} +1 -1
  24. package/web/app/immutable/chunks/{D4SzkUNZ.js → BeQgENlX.js} +2 -2
  25. package/web/app/immutable/chunks/{D9qN0bss.js → Birl2IVg.js} +1 -1
  26. package/web/app/immutable/chunks/{DWpvI-rO.js → BkihpvKL.js} +1 -1
  27. package/web/app/immutable/chunks/{DuY_i2mb.js → BlFd81-v.js} +1 -1
  28. package/web/app/immutable/chunks/{BsiP9jat.js → BlT4teVV.js} +4 -4
  29. package/web/app/immutable/chunks/{C9GTwcDD.js → Bps4iLJn.js} +4 -4
  30. package/web/app/immutable/chunks/{CYI38TT4.js → Bqoh360O.js} +1 -1
  31. package/web/app/immutable/chunks/{Cfrr2szR.js → BsK6wYXS.js} +1 -1
  32. package/web/app/immutable/chunks/{1ZG7ksae.js → BvJvc00D.js} +1 -1
  33. package/web/app/immutable/chunks/{DEx8d2kh.js → BvsWgdDN.js} +1 -1
  34. package/web/app/immutable/chunks/{CsmCnbCD.js → BwRzklL-.js} +1 -1
  35. package/web/app/immutable/chunks/{Hb1d_WPy.js → Bz3o8mDx.js} +1 -1
  36. package/web/app/immutable/chunks/{CDP99zgj.js → Bzwi2DK9.js} +1 -1
  37. package/web/app/immutable/chunks/{U7SsMQct.js → C-ed1TQP.js} +1 -1
  38. package/web/app/immutable/chunks/{D_pF64nv.js → C77WGAqb.js} +1 -1
  39. package/web/app/immutable/chunks/{C4TSbAj7.js → CCm4GqAl.js} +1 -1
  40. package/web/app/immutable/chunks/{Dfhb9qw2.js → CHoHyRl1.js} +1 -1
  41. package/web/app/immutable/chunks/{CppTLlj2.js → CKLDoMvu.js} +1 -1
  42. package/web/app/immutable/chunks/{4eHil2Q6.js → CNe7onyb.js} +1 -1
  43. package/web/app/immutable/chunks/{B6xLrxSy.js → COluFRpM.js} +1 -1
  44. package/web/app/immutable/chunks/{C7mvdGAm.js → COnjfEGr.js} +1 -1
  45. package/web/app/immutable/chunks/{Boxybwc5.js → CQGCQvNO.js} +1 -1
  46. package/web/app/immutable/chunks/{CZHXOPAK.js → CQdlmcpA.js} +1 -1
  47. package/web/app/immutable/chunks/{DNtuS0Va.js → CT1ksaco.js} +1 -1
  48. package/web/app/immutable/chunks/{By1Ead6w.js → CTznmnCI.js} +1 -1
  49. package/web/app/immutable/chunks/{BMG9_mUS.js → CUs0opCC.js} +1 -1
  50. package/web/app/immutable/chunks/{IoC3U43a.js → CW7SMyin.js} +1 -1
  51. package/web/app/immutable/chunks/{Biro3pac.js → CYgkTCkB.js} +1 -1
  52. package/web/app/immutable/chunks/{DC63GbRu.js → CZZEgzPG.js} +1 -1
  53. package/web/app/immutable/chunks/{DoQjTkOT.js → CZh3YXGa.js} +1 -1
  54. package/web/app/immutable/chunks/{C-Qo8Sm3.js → CZlx42aK.js} +1 -1
  55. package/web/app/immutable/chunks/{Cb7H8-7W.js → C_8_aIYH.js} +1 -1
  56. package/web/app/immutable/chunks/{BCtYysKf.js → Ca-HFDl4.js} +1 -1
  57. package/web/app/immutable/chunks/{Budt6h7m.js → CbVy_SFp.js} +1 -1
  58. package/web/app/immutable/chunks/{SsYaBxTt.js → Cc2zTL0w.js} +1 -1
  59. package/web/app/immutable/chunks/{l1NC9Hgm.js → Chj4eExC.js} +1 -1
  60. package/web/app/immutable/chunks/{DAkcpm4B.js → CiOVJ92X.js} +1 -1
  61. package/web/app/immutable/chunks/{Pmmb3VR-.js → Cj2RYqvI.js} +1 -1
  62. package/web/app/immutable/chunks/{p8bG6pVA.js → CoxfoefW.js} +1 -1
  63. package/web/app/immutable/chunks/{BHd9jGui.js → CoyCN9J6.js} +1 -1
  64. package/web/app/immutable/chunks/{BN9__Tfb.js → CpAH86bK.js} +1 -1
  65. package/web/app/immutable/chunks/{Cg2mHoca.js → CqPWbhqQ.js} +1 -1
  66. package/web/app/immutable/chunks/{Dq4-W1Dc.js → CqX9OYLx.js} +1 -1
  67. package/web/app/immutable/chunks/{IlPmC08g.js → CrDXkRmL.js} +3 -3
  68. package/web/app/immutable/chunks/{D7sw__ZG.js → CruURYIo.js} +1 -1
  69. package/web/app/immutable/chunks/{CtDWlQV1.js → CsP3_IiP.js} +1 -1
  70. package/web/app/immutable/chunks/{Cwug6YYm.js → CsdYTvLa.js} +1 -1
  71. package/web/app/immutable/chunks/{XnAFWmTe.js → CuMYCRBc.js} +1 -1
  72. package/web/app/immutable/chunks/{Bb-HNWJ1.js → CvOEFHIi.js} +1 -1
  73. package/web/app/immutable/chunks/{Beu80YXu.js → CvfICP_e.js} +3 -3
  74. package/web/app/immutable/chunks/{MGrNDwzT.js → CyIRNhfo.js} +1 -1
  75. package/web/app/immutable/chunks/{BuaHh82p.js → CzTOJ-RC.js} +1 -1
  76. package/web/app/immutable/chunks/{muLZixgh.js → D26xAGUV.js} +2 -2
  77. package/web/app/immutable/chunks/{DvvLPx_4.js → D39kn1Kj.js} +1 -1
  78. package/web/app/immutable/chunks/{1o18ErRW.js → D5XNO0iw.js} +12 -12
  79. package/web/app/immutable/chunks/{CGB0BSDf.js → D8rDmkBS.js} +1 -1
  80. package/web/app/immutable/chunks/{CWfnG_ZS.js → D9JU74lv.js} +1 -1
  81. package/web/app/immutable/chunks/{TVV4Q9gU.js → DAdnLTte.js} +1 -1
  82. package/web/app/immutable/chunks/{DudQTeC0.js → DBLNxGLo.js} +2 -2
  83. package/web/app/immutable/chunks/{DTe6Ftd1.js → DBtReqdq.js} +1 -1
  84. package/web/app/immutable/chunks/{CjnXXzJq.js → DDd0mrO_.js} +1 -1
  85. package/web/app/immutable/chunks/{zyfDez44.js → DGPt1Rmr.js} +1 -1
  86. package/web/app/immutable/chunks/{Daxq-PwF.js → DIo6dt4D.js} +1 -1
  87. package/web/app/immutable/chunks/{BRFbBztl.js → DIzQd2Pc.js} +1 -1
  88. package/web/app/immutable/chunks/{CVpfSBkA.js → DJtfG0d7.js} +1 -1
  89. package/web/app/immutable/chunks/{BnOlexUh.js → DPWE7gCc.js} +1 -1
  90. package/web/app/immutable/chunks/{u-ym1ckW.js → DQOXI0aG.js} +1 -1
  91. package/web/app/immutable/chunks/{CGoiyEVp.js → DRfFNuAv.js} +1 -1
  92. package/web/app/immutable/chunks/{CO4uYULP.js → DYR-Lw2g.js} +2 -2
  93. package/web/app/immutable/chunks/{BfbRBMGb.js → DaGPt6aR.js} +1 -1
  94. package/web/app/immutable/chunks/{h2KHMaND.js → DbwBDRhB.js} +1 -1
  95. package/web/app/immutable/chunks/{CBRxBLXr.js → DdHWhFZW.js} +1 -1
  96. package/web/app/immutable/chunks/{DURyQFvW.js → Deeg9Eu-.js} +1 -1
  97. package/web/app/immutable/chunks/{C5ulZDi1.js → DgI1Tl0-.js} +1 -1
  98. package/web/app/immutable/chunks/{BxBAnSu_.js → Dijipve3.js} +1 -1
  99. package/web/app/immutable/chunks/{B4RN26_e.js → Dj3yCQKZ.js} +1 -1
  100. package/web/app/immutable/chunks/{BJRCgXWd.js → DkrbZVri.js} +3 -3
  101. package/web/app/immutable/chunks/{k-EyN6jr.js → DpR5pCWV.js} +1 -1
  102. package/web/app/immutable/chunks/{DdvVzktP.js → DqbmScxl.js} +1 -1
  103. package/web/app/immutable/chunks/{CZjZfFnV.js → DsfybZhj.js} +1 -1
  104. package/web/app/immutable/chunks/{B2tkVgmm.js → Dys6C3u0.js} +1 -1
  105. package/web/app/immutable/chunks/{0rarVWHK.js → DzaZjwWE.js} +4 -4
  106. package/web/app/immutable/chunks/{oSRnc4fj.js → Exl2b2cW.js} +3 -3
  107. package/web/app/immutable/chunks/{BS-cVYii.js → FLqL4ipM.js} +1 -1
  108. package/web/app/immutable/chunks/{CCwJ5z-q.js → Hd61r63s.js} +1 -1
  109. package/web/app/immutable/chunks/{B-7dyAv6.js → HxiDYrBi.js} +2 -2
  110. package/web/app/immutable/chunks/{BbsGQHyK.js → K8bSaOgl.js} +1 -1
  111. package/web/app/immutable/chunks/{B0ckY47V.js → OzS1Lc27.js} +1 -1
  112. package/web/app/immutable/chunks/{BwhsGVp4.js → QCacuydi.js} +1 -1
  113. package/web/app/immutable/chunks/{8L6YSSzw.js → ZbRk-UkQ.js} +1 -1
  114. package/web/app/immutable/chunks/{i1ZckDxa.js → aKDMgeHa.js} +1 -1
  115. package/web/app/immutable/chunks/{CTYi4ogQ.js → cuI1HNig.js} +1 -1
  116. package/web/app/immutable/chunks/{e5B2ipLi.js → hoB_B0gc.js} +1 -1
  117. package/web/app/immutable/chunks/{DbIzzzQq.js → i_NTivOk.js} +1 -1
  118. package/web/app/immutable/chunks/{DXLKYoeU.js → izSb4qrH.js} +1 -1
  119. package/web/app/immutable/chunks/{CEgJ5sIL.js → l0ISWt9F.js} +2 -2
  120. package/web/app/immutable/chunks/{B0ttdHxY.js → m-YSnsRn.js} +1 -1
  121. package/web/app/immutable/chunks/{BNVDzSju.js → nhXrKuzk.js} +2 -2
  122. package/web/app/immutable/chunks/{AlA3CYjp.js → uNdiTdeS.js} +1 -1
  123. package/web/app/immutable/chunks/{DUPWbCtk.js → vYw2RcgV.js} +1 -1
  124. package/web/app/immutable/chunks/{Dv42ruvP.js → wZy9ojGD.js} +1 -1
  125. package/web/app/immutable/chunks/{CqVAVQKY.js → zapl_pAB.js} +1 -1
  126. package/web/app/immutable/entry/{app.EUfioTI5.js → app.DvMxHwjm.js} +2 -2
  127. package/web/app/immutable/entry/start.CdInQEt-.js +1 -0
  128. package/web/app/immutable/nodes/{0.CsgopzU7.js → 0.CSBCH_h-.js} +1 -1
  129. package/web/app/immutable/nodes/{1.q-wS_1pz.js → 1.BJSseA5f.js} +1 -1
  130. package/web/app/immutable/nodes/{10.Cp4iNxKd.js → 10.BdrqBgeF.js} +1 -1
  131. package/web/app/immutable/nodes/{14.CF3zC6g8.js → 14.DMwnrSCT.js} +1 -1
  132. package/web/app/immutable/nodes/{18.BwvMMQAS.js → 18.-WSN77ch.js} +2 -2
  133. package/web/app/immutable/nodes/{2.CAkxTHTY.js → 2.guxMA4od.js} +4 -4
  134. package/web/app/immutable/nodes/{3.Cg7I2dou.js → 3.0mLDvvZX.js} +1 -1
  135. package/web/app/immutable/nodes/{4.Dtpwe7YD.js → 4.C3jl9cd0.js} +1 -1
  136. package/web/app/immutable/nodes/{5.JEFKRNRo.js → 5.DNZ2mydt.js} +1 -1
  137. package/web/app/immutable/nodes/{6.C3za_Fhj.js → 6.BhCpj7WE.js} +1 -1
  138. package/web/app/immutable/nodes/{7.Cr9ThA7D.js → 7.Btgbvayk.js} +1 -1
  139. package/web/app/immutable/nodes/{8.BQ46rkhw.js → 8.BEZLI5FY.js} +4 -4
  140. package/web/app/immutable/nodes/{9.DGdMo6mc.js → 9.DOOOdUl6.js} +4 -4
  141. package/web/app/version.json +1 -1
  142. package/web/index.html +9 -9
  143. package/web/app/immutable/entry/start.DwBdczSm.js +0 -1
@@ -1,4 +1,4 @@
1
- import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./BsiP9jat.js";import{b as Xt,l as Yt}from"./DUPWbCtk.js";var St=(function(){var e=n(function(O,r,g,u){for(g=g||{},u=O.length;u--;g[O[u]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],h=[1,6],c=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],d=[1,26],w=[1,28],k=[1,29],P=[1,30],W=[1,31],F=[1,32],v=[1,33],z=[1,34],b=[1,35],T=[1,36],l=[1,37],I=[1,43],V=[1,42],X=[1,47],Y=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],C=[1,65],M=[26,28],_={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,g,u,x,S,o,lt){var p=o.length-1;switch(S){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:case 30:this.$=[o[p-2],...o[p]];break;case 21:case 31:this.$=[o[p]];break;case 22:this.$={value:Number(o[p-1]),label:o[p]};break;case 23:this.$={value:Number(o[p]),label:""};break;case 24:x.setXAxisTitle(o[p]);break;case 25:x.setXAxisTitle(o[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[p]);break;case 28:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 29:this.$=o[p-1];break;case 32:x.setYAxisTitle(o[p]);break;case 33:x.setYAxisTitle(o[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 39:this.$={text:o[p],type:"text"};break;case 40:this.$={text:o[p],type:"text"};break;case 41:this.$={text:o[p],type:"markdown"};break;case 42:this.$=o[p];break;case 43:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:a,37:h,38:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:a,37:h,38:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:a,37:h,38:c}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:39,13:38,24:I,29:V,30:f,31:40,32:41,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:45,15:44,29:X,30:f,35:46,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:49,17:48,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:52,17:51,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{20:[1,53]},{22:[1,54]},e(R,[2,18]),{1:[2,2]},e(R,[2,8]),e(R,[2,9]),e(H,[2,39],{41:55,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l}),e(H,[2,40]),e(H,[2,41]),e(A,[2,42]),e(A,[2,44]),e(A,[2,45]),e(A,[2,46]),e(A,[2,47]),e(A,[2,48]),e(A,[2,49]),e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(R,[2,10]),e(R,[2,24],{32:41,31:56,24:I,29:V}),e(R,[2,26]),e(R,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,11]),e(R,[2,32],{35:60,29:X}),e(R,[2,34]),{33:[1,61]},e(R,[2,12]),{17:62,24:Y},{25:63,27:64,29:C},e(R,[2,14]),{17:66,24:Y},e(R,[2,16]),e(R,[2,17]),e(A,[2,43]),e(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(R,[2,33]),{29:[1,70]},e(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(R,[2,15]),e(R,[2,28]),e(R,[2,29]),{11:59,30:f,34:74,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,35]),e(R,[2,19]),{25:75,27:64,29:C},e(M,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,g){if(g.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=g,u}},"parseError"),parse:n(function(r){var g=this,u=[0],x=[],S=[null],o=[],lt=this.table,p="",dt=0,zt=0,ui=2,Vt=1,di=o.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);D.setInput(r,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var At=D.yylloc;o.push(At);var xi=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(E){u.length=u.length-2*E,S.length=S.length-E,o.length=o.length-E}n(fi,"popStack");function Ot(){var E;return E=x.pop()||D.lex()||Vt,typeof E!="number"&&(E instanceof Array&&(x=E,E=x.pop()),E=g.symbols_[E]||E),E}n(Ot,"lex");for(var L,U,B,wt,j={},xt,N,Wt,ft;;){if(U=u[u.length-1],this.defaultActions[U]?B=this.defaultActions[U]:((L===null||typeof L>"u")&&(L=Ot()),B=lt[U]&&lt[U][L]),typeof B>"u"||!B.length||!B[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");D.showPosition?Ct="Parse error on line "+(dt+1)+`:
1
+ import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./BlT4teVV.js";import{b as Xt,l as Yt}from"./vYw2RcgV.js";var St=(function(){var e=n(function(O,r,g,u){for(g=g||{},u=O.length;u--;g[O[u]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],h=[1,6],c=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],d=[1,26],w=[1,28],k=[1,29],P=[1,30],W=[1,31],F=[1,32],v=[1,33],z=[1,34],b=[1,35],T=[1,36],l=[1,37],I=[1,43],V=[1,42],X=[1,47],Y=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],C=[1,65],M=[26,28],_={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,g,u,x,S,o,lt){var p=o.length-1;switch(S){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:case 30:this.$=[o[p-2],...o[p]];break;case 21:case 31:this.$=[o[p]];break;case 22:this.$={value:Number(o[p-1]),label:o[p]};break;case 23:this.$={value:Number(o[p]),label:""};break;case 24:x.setXAxisTitle(o[p]);break;case 25:x.setXAxisTitle(o[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[p]);break;case 28:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 29:this.$=o[p-1];break;case 32:x.setYAxisTitle(o[p]);break;case 33:x.setYAxisTitle(o[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 39:this.$={text:o[p],type:"text"};break;case 40:this.$={text:o[p],type:"text"};break;case 41:this.$={text:o[p],type:"markdown"};break;case 42:this.$=o[p];break;case 43:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:a,37:h,38:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:a,37:h,38:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:a,37:h,38:c}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:39,13:38,24:I,29:V,30:f,31:40,32:41,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:45,15:44,29:X,30:f,35:46,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:49,17:48,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:52,17:51,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{20:[1,53]},{22:[1,54]},e(R,[2,18]),{1:[2,2]},e(R,[2,8]),e(R,[2,9]),e(H,[2,39],{41:55,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l}),e(H,[2,40]),e(H,[2,41]),e(A,[2,42]),e(A,[2,44]),e(A,[2,45]),e(A,[2,46]),e(A,[2,47]),e(A,[2,48]),e(A,[2,49]),e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(R,[2,10]),e(R,[2,24],{32:41,31:56,24:I,29:V}),e(R,[2,26]),e(R,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,11]),e(R,[2,32],{35:60,29:X}),e(R,[2,34]),{33:[1,61]},e(R,[2,12]),{17:62,24:Y},{25:63,27:64,29:C},e(R,[2,14]),{17:66,24:Y},e(R,[2,16]),e(R,[2,17]),e(A,[2,43]),e(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(R,[2,33]),{29:[1,70]},e(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(R,[2,15]),e(R,[2,28]),e(R,[2,29]),{11:59,30:f,34:74,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,35]),e(R,[2,19]),{25:75,27:64,29:C},e(M,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,g){if(g.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=g,u}},"parseError"),parse:n(function(r){var g=this,u=[0],x=[],S=[null],o=[],lt=this.table,p="",dt=0,zt=0,ui=2,Vt=1,di=o.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);D.setInput(r,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var At=D.yylloc;o.push(At);var xi=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(E){u.length=u.length-2*E,S.length=S.length-E,o.length=o.length-E}n(fi,"popStack");function Ot(){var E;return E=x.pop()||D.lex()||Vt,typeof E!="number"&&(E instanceof Array&&(x=E,E=x.pop()),E=g.symbols_[E]||E),E}n(Ot,"lex");for(var L,U,B,wt,j={},xt,N,Wt,ft;;){if(U=u[u.length-1],this.defaultActions[U]?B=this.defaultActions[U]:((L===null||typeof L>"u")&&(L=Ot()),B=lt[U]&&lt[U][L]),typeof B>"u"||!B.length||!B[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");D.showPosition?Ct="Parse error on line "+(dt+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+ft.join(", ")+", got '"+(this.terminals_[L]||L)+"'":Ct="Parse error on line "+(dt+1)+": Unexpected "+(L==Vt?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(Ct,{text:D.match,token:this.terminals_[L]||L,line:D.yylineno,loc:At,expected:ft})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+L);switch(B[0]){case 1:u.push(L),S.push(D.yytext),o.push(D.yylloc),u.push(B[1]),L=null,zt=D.yyleng,p=D.yytext,dt=D.yylineno,At=D.yylloc;break;case 2:if(N=this.productions_[B[1]][1],j.$=S[S.length-N],j._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},xi&&(j._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),wt=this.performAction.apply(j,[p,zt,dt,$.yy,B[1],S,o].concat(di)),typeof wt<"u")return wt;N&&(u=u.slice(0,-1*N*2),S=S.slice(0,-1*N),o=o.slice(0,-1*N)),u.push(this.productions_[B[1]][0]),S.push(j.$),o.push(j._$),Wt=lt[u[u.length-2]][u[u.length-1]],u.push(Wt);break;case 3:return!0}}return!0},"parse")},rt=(function(){var O={EOF:1,parseError:n(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:n(function(r,g){return this.yy=g||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var g=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===x.length?this.yylloc.first_column:0)+x[x.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),g=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as ze}from"./Boxybwc5.js";import{s as Xe}from"./DWpvI-rO.js";import{b as m,W as Be,a_ as Je,V as Ze,aZ as et,U as tt,b0 as st,Y as it,X as Ne,ay as qe,r as rt,am as nt,aU as at,ab as lt,aG as ct,_ as ot,a1 as ht,aP as ut,bh as ft}from"./BsiP9jat.js";var Ce=(function(){var e=m(function($,i,n,o){for(n=n||{},o=$.length;o--;n[$[o]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],f=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],c=[1,22],S=[2,7],d=[1,26],_=[1,27],b=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],w=[1,24],D=[1,31],O=[1,32],M=[1,30],R=[1,39],g=[1,40],p=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ae=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ve=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],we=[1,74],De=[1,75],Oe=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:m(function(i,n,o,s,E,t,de){var l=t.length-1;switch(E){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:f},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:f},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:f},{1:[2,2]},{4:17,5:c,7:13,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:c,7:42,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:43,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:44,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:45,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:46,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:47,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:48,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:49,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:50,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(p,[2,17]),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),{30:60,33:62,75:P,89:R,90:g},{30:63,33:62,75:P,89:R,90:g},{30:64,33:62,75:P,89:R,90:g},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ae,[2,81]),e(Ae,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{62:77,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{30:78,33:62,75:P,89:R,90:g},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:R,90:g},{5:[1,95]},{30:96,33:62,75:P,89:R,90:g},{5:[1,97]},{30:98,33:62,75:P,89:R,90:g},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(p,[2,59],{76:U}),e(p,[2,64],{76:Me}),{33:103,75:[1,102],89:R,90:g},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(p,[2,57],{76:Me}),e(p,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:R,90:g},{33:120,89:R,90:g},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(T,[2,68]),e(p,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(p,[2,28]),{5:[1,127]},e(p,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(p,[2,47]),{5:[1,131]},e(p,[2,48]),e(p,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:R,90:g},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(p,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(p,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(p,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(p,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,44]),e(p,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:m(function(i,n){if(n.recoverable)this.trace(i);else{var o=new Error(i);throw o.hash=n,o}},"parseError"),parse:m(function(i){var n=this,o=[0],s=[],E=[null],t=[],de=this.table,l="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);y.setInput(i,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Ie=y.yylloc;t.push(Ie);var je=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(k){o.length=o.length-2*k,E.length=E.length-k,t.length=t.length-k}m(Ge,"popStack");function Ue(){var k;return k=s.pop()||y.lex()||Pe,typeof k!="number"&&(k instanceof Array&&(s=k,k=s.pop()),k=n.symbols_[k]||k),k}m(Ue,"lex");for(var I,z,N,ke,J={},ye,F,Ye,_e;;){if(z=o[o.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=Ue()),N=de[z]&&de[z][I]),typeof N>"u"||!N.length||!N[0]){var Te="";_e=[];for(ye in de[z])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");y.showPosition?Te="Parse error on line "+(ge+1)+`:
1
+ import{g as ze}from"./CQGCQvNO.js";import{s as Xe}from"./BkihpvKL.js";import{b as m,W as Be,a_ as Je,V as Ze,aZ as et,U as tt,b0 as st,Y as it,X as Ne,ay as qe,r as rt,am as nt,aU as at,ab as lt,aG as ct,_ as ot,a1 as ht,aP as ut,bh as ft}from"./BlT4teVV.js";var Ce=(function(){var e=m(function($,i,n,o){for(n=n||{},o=$.length;o--;n[$[o]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],f=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],c=[1,22],S=[2,7],d=[1,26],_=[1,27],b=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],w=[1,24],D=[1,31],O=[1,32],M=[1,30],R=[1,39],g=[1,40],p=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ae=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ve=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],we=[1,74],De=[1,75],Oe=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:m(function(i,n,o,s,E,t,de){var l=t.length-1;switch(E){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:f},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:f},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:f},{1:[2,2]},{4:17,5:c,7:13,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:c,7:42,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:43,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:44,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:45,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:46,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:47,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:48,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:49,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:50,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(p,[2,17]),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),{30:60,33:62,75:P,89:R,90:g},{30:63,33:62,75:P,89:R,90:g},{30:64,33:62,75:P,89:R,90:g},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ae,[2,81]),e(Ae,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{62:77,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{30:78,33:62,75:P,89:R,90:g},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:R,90:g},{5:[1,95]},{30:96,33:62,75:P,89:R,90:g},{5:[1,97]},{30:98,33:62,75:P,89:R,90:g},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(p,[2,59],{76:U}),e(p,[2,64],{76:Me}),{33:103,75:[1,102],89:R,90:g},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(p,[2,57],{76:Me}),e(p,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:R,90:g},{33:120,89:R,90:g},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(T,[2,68]),e(p,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(p,[2,28]),{5:[1,127]},e(p,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(p,[2,47]),{5:[1,131]},e(p,[2,48]),e(p,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:R,90:g},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(p,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(p,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(p,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(p,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,44]),e(p,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:m(function(i,n){if(n.recoverable)this.trace(i);else{var o=new Error(i);throw o.hash=n,o}},"parseError"),parse:m(function(i){var n=this,o=[0],s=[],E=[null],t=[],de=this.table,l="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);y.setInput(i,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Ie=y.yylloc;t.push(Ie);var je=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(k){o.length=o.length-2*k,E.length=E.length-k,t.length=t.length-k}m(Ge,"popStack");function Ue(){var k;return k=s.pop()||y.lex()||Pe,typeof k!="number"&&(k instanceof Array&&(s=k,k=s.pop()),k=n.symbols_[k]||k),k}m(Ue,"lex");for(var I,z,N,ke,J={},ye,F,Ye,_e;;){if(z=o[o.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=Ue()),N=de[z]&&de[z][I]),typeof N>"u"||!N.length||!N[0]){var Te="";_e=[];for(ye in de[z])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");y.showPosition?Te="Parse error on line "+(ge+1)+`:
2
2
  `+y.showPosition()+`
3
3
  Expecting `+_e.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Te="Parse error on line "+(ge+1)+": Unexpected "+(I==Pe?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Te,{text:y.match,token:this.terminals_[I]||I,line:y.yylineno,loc:Ie,expected:_e})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+I);switch(N[0]){case 1:o.push(I),E.push(y.yytext),t.push(y.yylloc),o.push(N[1]),I=null,$e=y.yyleng,l=y.yytext,ge=y.yylineno,Ie=y.yylloc;break;case 2:if(F=this.productions_[N[1]][1],J.$=E[E.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},je&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),ke=this.performAction.apply(J,[l,$e,ge,G.yy,N[1],E,t].concat(We)),typeof ke<"u")return ke;F&&(o=o.slice(0,-1*F*2),E=E.slice(0,-1*F),t=t.slice(0,-1*F)),o.push(this.productions_[N[1]][0]),E.push(J.$),t.push(J._$),Ye=de[o[o.length-2]][o[o.length-1]],o.push(Ye);break;case 3:return!0}}return!0},"parse")},He=(function(){var $={EOF:1,parseError:m(function(n,o){if(this.yy.parser)this.yy.parser.parseError(n,o);else throw new Error(n)},"parseError"),setInput:m(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:m(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:m(function(i){var n=i.length,o=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===s.length?this.yylloc.first_column:0)+s[s.length-o.length].length-o[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(i){this.unput(this.match.slice(i))},"less"),pastInput:m(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -1 +1 @@
1
- var Ce=Object.defineProperty;var Pe=(e,t,r)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>Pe(e,typeof t!="symbol"?t+"":t,r);import{k as Ie,N as Te,T as Oe,d as Fe,l as Le,w as De}from"./Bv2KudWv.js";import"./DYhIMPy1.js";import{bo as a,_ as xe}from"./Y9-4hTF9.js";import"./cFbB-5Cu.js";import"./CrWhihJ_.js";import"./DOH10_LL.js";import{c as K}from"./ChTqQfQN.js";import"./DU9Ky5os.js";import{Iz as n,tW as Ne,nx as w,nw as v,m0 as We,vj as Be,vh as ie,h7 as Ve,h8 as Ge,c as Ue,Ic as He,a4 as qe,ye as O,yf as q,yc as je,yd as $e,bX as ze,bW as Ke,c9 as Qe,c8 as Ye,nz as R}from"./tU_ZJtMw.js";import{cG as Ze,cv as Xe,bv as Je,cj as Q,cL as et,cK as tt,cP as rt,c7 as st,cn as it,c9 as nt,cE as de,ax as at,bR as ot,cM as ct}from"./ClH0Gega.js";import{a as lt,i as dt}from"./DNWBkvFP.js";import{aK as ut,W as ue,bL as pt,m as ft,Q as gt,bY as Y,g as ht,X as mt,bZ as bt,c as St,aL as _t,bG as Z,ao as vt,a_ as At,$ as kt,aG as yt,bN as Et,_ as Mt,Y as wt,Z as Rt,bJ as Ct,x as Pt}from"./aos1n-nT.js";import{y as It}from"./5GYSXevc.js";import{y as T}from"./CEsW1euQ.js";import{i as V}from"./CpHzYkzi.js";import{n as Tt}from"./CO4uYULP.js";const Ot=Object.freeze(Object.defineProperty({__proto__:null,NOTIFY_DURATION:Te,TOAST_COUNTDOWN_CLASS:Oe,TOAST_COUNTDOWN_NO_HOVER_PAUSE_CLASS:Fe,notify:Ie,notifyMetadata:Le,withToastCountdown:De},Symbol.toStringTag,{value:"Module"})),Os=n.createSelector(e=>Ze.select(e)?.capabilities.gitlabCheckout===!0),Fs=n.createSelector(e=>e.gitlabAuth.host),Ls=n.createSelector(e=>e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host),Ds=n.createSelector(e=>Ne(e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host)??""),xs=n.createSelector(e=>e.gitlabAuth.isCancelling),Ns=n.createSelector(e=>e.gitlabAuth.cancelOutcome),Ws=n.createSelector(e=>e.gitlabAuth.isConfigured),Bs=n.createSelector(e=>e.gitlabAuth.isAuthenticating),Vs=n.createSelector(e=>e.gitlabAuth.deviceFlow),Gs=n.createSelector(e=>e.gitlabAuth.deviceGrantSupported),Us=n.createSelector(e=>e.gitlabAuth.user),Hs=n.createSelector(e=>e.gitlabAuth.error);n.createSelector(e=>e.gitlabAuth.method);const qs=n.createSelector(e=>e.gitlabAuth.statusReady===!0),E=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return a.specialists_builtin_prReviewer_name()},get description(){return a.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"ui-designer",icon:"ui-designer",get name(){return a.specialists_builtin_uiDesigner_name()},get description(){return a.specialists_builtin_uiDesigner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"vulnerability-scanner",icon:"pr-reviewer",get name(){return a.specialists_builtin_vulnerabilityScanner_name()},get description(){return a.specialists_builtin_vulnerabilityScanner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"developer",icon:"verifier",get name(){return a.specialists_builtin_developer_name()},get description(){return a.specialists_builtin_developer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"product-manager",icon:"coordinator",get name(){return a.specialists_builtin_productManager_name()},get description(){return a.specialists_builtin_productManager_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"maintenance-coordinator",icon:"ralph",get name(){return a.specialists_builtin_maintenanceCoordinator_name()},get description(){return a.specialists_builtin_maintenanceCoordinator_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"chief-of-staff",icon:"chief-of-staff",get name(){return a.specialists_builtin_chiefOfStaff_name()},get description(){return a.specialists_builtin_chiefOfStaff_description()},hidden:!0,defaultBehaviorPrompt:"",promptUnavailable:!0}],pe=new Set(["pr-reviewer"]),js="developer";function $s(e){return E.find(t=>t.id===e)}const Ft=n.createSelector(e=>e.githubAuth.mutationRequestId),Lt=n.createSelector(e=>e.githubAuth.callbacksCancelled),Dt=n.createSelector(e=>e.githubAuth.isDisconnecting),fe=n.createSelector(e=>e.githubAuth.isAuthenticated),xt=n.createSelector(e=>e.githubAuth.statusSettled===!0),Nt=n.createSelector(e=>e.githubAuth.requiresDaemonAuth),Wt=n.createSelector(e=>e.githubAuth.user),Bt=n.createSelector(e=>e.githubAuth.isAuthenticating),Vt=n.createSelector(e=>e.githubAuth.deviceFlow),Gt=n.createSelector(e=>e.githubAuth.error),zs=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:Lt,selectGitHubAuthDeviceFlow:Vt,selectGitHubAuthError:Gt,selectGitHubAuthIsAuthenticated:fe,selectGitHubAuthIsAuthenticating:Bt,selectGitHubAuthIsDisconnecting:Dt,selectGitHubAuthMutationRequestId:Ft,selectGitHubAuthRequiresDaemonAuth:Nt,selectGitHubAuthStatusSettled:xt,selectGitHubAuthUser:Wt},Symbol.toStringTag,{value:"Module"}));function f(e){return e??""}function Ut(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((i,o)=>f(i.provider)===f(s[o].provider)&&i.model===s[o].model&&i.hint===s[o].hint&&f(i.reasoningEffort)===f(s[o].reasoningEffort))}function ne(e,t){if(e.source!=="user"||!t?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const r=e.bundled;return r?f(e.name)===f(r.name)&&f(e.description)===f(r.description)&&f(e.behaviorPrompt)===f(r.behaviorPrompt)&&f(e.roleReminder)===f(r.roleReminder)&&f(e.reasoningEffort)===f(r.reasoningEffort)&&Ut(e.modelOptions,r.modelOptions):!1}const Ks=n.createSelector(e=>e.specialists.bundledSpecialists),Ht=n.createSelector(e=>e.specialists.fileSpecialists),Qs=n.createSelector(e=>w(Ht.select(e))),Ys=n.createSelector(e=>e.specialists.userOverrides);n.createSelector(e=>e.specialists.overridesLoaded);const Zs=n.createSelector(e=>e.specialists.customSpecialistsLoaded),Xs=n.createSelector(e=>e.specialists.fileSpecialistsLoaded),Js=n.createSelector(e=>e.specialists.bundledSpecialistsLoaded),ei=n.createSelector(e=>e.specialists.specialistsFolderPath),ti=n.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});n.createSelector(e=>e.specialists.providerModelOverrides);const G=n.createSelector((e,t)=>!(pe.has(t)&&!fe.select(e)));function qt(e,t){return t?e:e.filter(r=>!pe.has(r.id))}function jt(e,t){return qt(e,t).filter(r=>!r.hidden)}function ri(e,t){return jt(e,t).filter(r=>r.role!=="internal")}const A=n.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(l=>({...l,defaultModel:l.model,defaultBehaviorPrompt:l.behaviorPrompt??l.prompt??"",defaultAgentType:l.agentType}));const r=w(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,i=new Set,o=[];for(const l of r)!i.has(l.id)&&G.select(e,l.id)&&(i.add(l.id),o.push({id:l.id,name:l.name,description:l.description,codingAgent:l.codingAgent,defaultModel:l.model||void 0,defaultBehaviorPrompt:l.behaviorPrompt,roleReminder:l.roleReminder,source:l.source,importedFrom:l.importedFrom,unsupportedFields:l.unsupportedFields,requiredSkills:l.requiredSkills,missingSkills:l.missingSkills,hidden:l.hidden,resolvedModel:l.resolvedModel,resolvedProvider:l.resolvedProvider,modelOptions:l.modelOptions,reasoningEffort:l.reasoningEffort,role:l.role,teamAgents:l.teamAgents,icon:l.icon}));for(const l of s)!i.has(l.id)&&G.select(e,l.id)&&(i.add(l.id),o.push(l));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const l of E)!i.has(l.id)&&G.select(e,l.id)&&(i.add(l.id),o.push(l));const c=new Map;for(const l of E)c.has(l.id)||c.set(l.id,c.size);for(const l of s)c.has(l.id)||c.set(l.id,c.size);return o.sort((l,p)=>{const S=c.has(l.id),B=c.has(p.id);return S&&B?(c.get(l.id)??0)-(c.get(p.id)??0):S&&!B?-1:!S&&B?1:l.name.localeCompare(p.name)}),o}),si=n.createSelector(e=>{const t=A.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...E.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,i)=>+!r.has(s.id)-+!r.has(i.id)||s.id.localeCompare(i.id)),t[0]}),$t=n.createSelector((e,t)=>{const r=v(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(i=>i.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&w(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const i=E.find(o=>o.id===t);if(i)return{id:i.id,name:i.name,description:i.description,source:"builtin"}}return null}),ii=n.createSelector((e,t)=>$t.select(e,t)?.name??null),ni=n.createSelector((e,t,r)=>{const i=A.select(e,r).find(o=>o.id===t);return i?i.defaultModel?i.defaultModel:i.resolvedModel??"":""}),ai=n.createSelector((e,t,r)=>A.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),oi=n.createSelector((e,t,r)=>A.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),ci=n.createSelector((e,t,r)=>{const i=A.select(e,r).find(o=>o.id===t);return i?i.defaultBehaviorPrompt:""});function F(e,t){return t.some(r=>r.id===e)||E.some(r=>r.id===e)}const li=n.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&F(t,e.specialists.bundledSpecialists)}return F(t,e.specialists.bundledSpecialists)}),di=n.createSelector((e,t,r)=>r?!!X.select(e,t,r):!!v(e.specialists.fileSpecialists,t)),ui=n.createSelector((e,t,r)=>{if(r){const o=X.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:F(t,e.specialists.bundledSpecialists)&&!ne(o)}if(!F(t,e.specialists.bundledSpecialists))return!1;const i=v(e.specialists.fileSpecialists,t);return!i||i.source!=="user"?!1:!ne(i)}),X=n.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return v(e.specialists.fileSpecialists,t)}),pi=n.createSelector((e,t,r)=>{const s=X.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(i=>i.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(i=>i.id===t)?"Built-in":null}),fi=n.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=v(e.specialists.fileSpecialists,t);if(s)return s.filePath;const i=e.specialists.bundledSpecialists.find(o=>o.id===t);if(i&&"filePath"in i)return i.filePath}),gi=n.createSelector((e,t,r)=>{if(r){const i=A.select(e,r).find(l=>l.id===t),o=i?.codingAgent||i?.resolvedProvider;if(o)return Xe.select(e,o,r);const c=Je.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[c]?.available?c:""}const s=v(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:zt.select(e,t)}),zt=n.createSelector((e,t)=>{const s=A.select(e).find(i=>i.id===t);return s?.codingAgent?s.codingAgent:ut.select(e)?ue.select(e):""}),hi=n.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?w(r):[]}),mi=n.createSelector((e,t)=>e.specialists.creationByContext?.[t]??We),bi=n.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),U=K("Clipboard");async function Si(e){let t;if(lt())try{const r=await dt("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,U.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw U.error("Browser clipboard write failed",r,{electronError:t}),r}throw U.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const Kt=["connected","disconnected","unreachable","revoked","update-required"],M=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),u=e=>typeof e=="string"&&e.length>0,C=e=>typeof e=="string"&&e.length>0?e:void 0,ge=e=>Number.isSafeInteger(e)&&e>=0?e:0;function Qt(e){if(!M(e))return;const t=Array.isArray(e.providers)?e.providers.flatMap(s=>M(s)&&u(s.id)?[{id:s.id,...s.visible===!1?{visible:!1}:{},status:typeof s.status=="string"?s.status:"unknown",models:Array.isArray(s.models)?s.models.filter(i=>u(i)):[],...s.modelsStale===!0?{modelsStale:!0}:{}}]:[]):[],r=C(e.intentdVersion);return{...r?{intentdVersion:r}:{},providers:t}}function _i(e){if(!M(e)||!u(e.id)||!u(e.name)||!u(e.fingerprint)||!Kt.includes(e.state)||!Number.isInteger(e.port)||!u(e.addedAt))return null;const t=M(e.platform)&&u(e.platform.os)&&u(e.platform.arch)?{os:e.platform.os,arch:e.platform.arch}:void 0,r=Qt(e.capabilities),s=C(e.tcAddress),i=C(e.observedAt),o=C(e.lastConnectedAt),c=Be(e.cloud),l=Number.isInteger(e.nodeProtocol)&&e.nodeProtocol>=0?e.nodeProtocol:void 0;return{id:e.id,name:e.name,...t?{platform:t}:{},hosts:Array.isArray(e.hosts)?e.hosts.filter(p=>u(p)):[],port:e.port,...s?{tcAddress:s}:{},fingerprint:e.fingerprint,state:e.state,runningAgents:ge(e.runningAgents),...r?{capabilities:r}:{},...l!==void 0?{nodeProtocol:l}:{},...i?{observedAt:i}:{},addedAt:e.addedAt,...o?{lastConnectedAt:o}:{},...c?{cloud:c}:{}}}function vi(e){if(!M(e)||!u(e.credentialId)||!u(e.backendId)||!u(e.backendName)||!u(e.createdAt))return null;const t=C(e.lastUsedAt);return{credentialId:e.credentialId,backendId:e.backendId,backendName:e.backendName,createdAt:e.createdAt,...t?{lastUsedAt:t}:{},connected:e.connected===!0,runningAgents:ge(e.runningAgents)}}function Ai(e){const t=(typeof e=="string"?e:"").trim().toUpperCase();return t===""?null:t}function Yt(e){if(!M(e)||typeof e.name!="string")return null;const t=e.name;return e.kind==="local"?{kind:"local",name:t}:e.kind==="machine"&&u(e.nodeId)?{kind:"machine",nodeId:e.nodeId,name:t}:e.kind==="cloud"&&u(e.cloudMachineId)?{kind:"cloud",cloudMachineId:e.cloudMachineId,name:t}:null}function ki(e){if(!Array.isArray(e))return null;const t=[];for(const r of e){const s=Yt(r);if(!s)return null;t.push(s)}return t}function Zt(e){return e.kind==="local"?{kind:"local"}:e.kind==="machine"?{kind:"machine",nodeId:e.nodeId}:{kind:"cloud",cloudMachineId:e.cloudMachineId}}function I(e){return e.kind==="local"?"local":e.kind==="machine"?`machine:${e.nodeId}`:`cloud:${e.cloudMachineId}`}const Xt={macos:"macOS",linux:"Linux",windows:"Windows"},Jt={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function k(e,t){const r=[e&&(Xt[e]??e),t&&(Jt[t]??t)].filter(s=>!!s);return r.length?r.join(" "):null}function er(e){return e?.placement?.target==="remote"||T(e?.placement?.target)}const tr=new Set(["running","paused","resuming","pausing","stopping"]);function rr(e,t){if(e.placementError)return null;if(e.cloudStart)return"starting";if(!e.nodeId)return e.effectiveIsolation==="pending"?"starting":null;const r=t?.cloud?.state;return r&&tr.has(r)?r:e.effectiveIsolation==="pending"?"starting":null}function he(e,t){if(!e||!er(e))return null;const r=e.nodeId??e.placement?.nodeId??"",s=t&&t.id===r?t:null;if(T(e.placement?.target))return{nodeId:r,name:e.nodeName?.trim()||Ve(s?.cloud?.provider??Ge(e.placement?.cloudMachineId)),platform:k(s?.platform?.os,s?.platform?.arch),state:"ready",cloud:{state:rr(e,s)}};const i=k(e.placement?.os,e.placement?.arch)??k(s?.platform?.os,s?.platform?.arch),o=s?.state==="revoked"?"revoked":s?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:r,name:e.nodeName?.trim()||s?.name||a.remoteAgent_location_unknownMachine(),platform:i,state:o}}function yi(e,t){if(!e)return null;const r=t&&t.id===e?t:null;return{nodeId:e,name:r?.name||a.remoteAgent_location_unknownMachine(),platform:k(r?.platform?.os,r?.platform?.arch),state:r?.state==="revoked"?"revoked":r?.state==="unreachable"?"unreachable":"ready"}}function me(e){switch(e){case"starting":return a.cloudMachines_agent_starting();case"running":return a.cloudMachines_agent_running();case"paused":return a.cloudMachines_agent_paused();case"resuming":return a.cloudMachines_agent_resuming();case"pausing":return a.cloudMachines_agent_pausing();case"stopping":return a.cloudMachines_agent_stopping();default:return null}}function Ei(e){const t=me(e.cloud?.state);return t?a.cloudMachines_agent_chip({machine:e.name,state:t}):e.name}function Mi(e){if(e.cloud){const r=me(e.cloud.state),s=a.remoteAgent_location_tooltipNoPlatform({machine:e.name});return r?a.remoteAgent_location_tooltipWithState({location:s,state:r}):s}const t=e.platform?a.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):a.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_unreachable_label()});case"revoked":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_revoked_label()});default:return t}}function be(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"||e.cloudStart?"starting":e.setup?.state==="failed"?"setup-failed":null}function Se(e){if(!e.endsWith("}"))return null;for(let t=e.indexOf(" {");t>=0;t=e.indexOf(" {",t+1))try{const r=JSON.parse(e.slice(t+1));if(r&&typeof r=="object"&&typeof r.code=="string")return{message:e.slice(0,t).trim(),data:r}}catch{}return null}function sr(e,t){const r=e.detail??"",s=Se(r),i=e.code==="machine-update-required"||s?.data.code==="machine-update-required";if(i&&s?.data.reason==="prepared-checkout")return{updateRequired:i,message:a.remoteAgent_updateRequired_preparedCheckout({machine:t})};const o=ie(s?.data),c=o??(e.code?ie({code:e.code}):null);return c?{updateRequired:i,message:s?.message||r,cloud:c,cloudDetailKnown:!!o}:{updateRequired:i,message:s?.message||r}}function wi(e){if(!T(e?.placement?.target)||!e.placementError||e.status!==Ue.Error)return null;const t=sr(e.placementError,"");return t.cloud?t:null}const ir=["attachments-too-large-for-machine:","node-prompt-too-large:"],nr="remote-agent-unsupported:";function ae(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(e/1048576)}function Ri(e){const t=Se(e)?.message??e;for(const s of ir){const i=t.indexOf(s);if(i<0)continue;const o=t.slice(i+s.length).trim().replace(/^[a-z][\w]*(?:\.[\w]+)+:\s*/i,""),c=/come to (\d+) bytes\b.*?over its (\d+)-byte limit/.exec(o);return c?a.remoteAgent_attachmentsTooLargeSized_error({size:ae(Number(c[1])),limit:ae(Number(c[2]))}):o?a.remoteAgent_attachmentsTooLarge_error({detail:o}):a.remoteAgent_attachmentsTooLargeNoDetail_error()}const r=t.indexOf(nr);return r>=0&&/attachment/i.test(t.slice(r))?a.remoteAgent_attachmentsUnsupported_error():null}function Ci(e){return T(e?.placement?.target)&&be(e,he(e))==="starting"}function Pi(e,t){if(!T(e?.placement?.target))return!1;const r=he(e,t);return r?.cloud?.state==="resuming"&&be(e,r)===null}const m="",j="cloud:";function J(e){return`${j}${e}`}function N(e){return e?.startsWith(j)&&e.slice(j.length)||null}const Ii=J("e2b");function ar(e,t){return e?.find(r=>J(r.cloudMachineId)===t&&r.unavailableReason===null)}const or=new Set(["connected","disconnected"]);function cr(e){switch(e){case"unreachable":return a.remoteMachines_state_unreachable_label();case"revoked":return a.remoteMachines_state_revoked_label();case"update-required":return a.remoteMachines_state_updateRequired_label();default:return}}function ee(e){return or.has(e.state)}function lr({backendLabel:e,backendPlatform:t,machines:r,cloud:s,orchestrator:i=!1}){const o=[i?{id:m,label:a.remoteMachines_startOn_firstAvailable_label(),platform:null,disabled:!1,hint:a.remoteMachines_startOn_firstAvailable_hint()}:{id:m,label:e,platform:k(t?.os,t?.arch),disabled:!1},...r.map(c=>{const l=k(c.platform?.os,c.platform?.arch);return ee(c)?{id:c.id,label:c.name,platform:l,disabled:!1}:{id:c.id,label:c.name,platform:l,disabled:!0,reason:cr(c.state)}})];for(const c of s??[])o.push({id:J(c.cloudMachineId),label:c.label,platform:null,kind:"cloud",disabled:c.unavailableReason!==null,...c.unavailableReason?{reason:c.unavailableReason}:c.needsProfile?{hint:a.cloudMachines_startOn_hint()}:{}});return o}function Ti(e){return e.find(t=>t.id===m)?.label??""}function Oi(e,t,r){if(e!==m)return N(e)?void 0:e;if(r)return t.find(s=>s.id!==m&&s.kind!=="cloud"&&!s.disabled)?.id}function dr({remoteMachinesVisible:e,supported:t,machines:r,cloud:s}){return e&&t&&(r.some(ee)||(s??[]).some(i=>i.unavailableReason===null))}function ur(e,t,r){if(!e)return m;if(N(e))return ar(r,e)?e:m;const s=t.find(i=>i.id===e);return s&&ee(s)?s.id:m}function Fi(e,{cloudEntries:t=!1,providerOf:r}={}){const s=N(e);return s?t&&r?.(s)==="northflank"?{target:"cloud",checkout:"isolated",cloudMachineId:s}:t?{target:"e2b",checkout:"isolated",cloudMachineId:s}:{target:"e2b",checkout:"isolated"}:e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function Li({groups:e,providerRef:t,model:r}){const s=c=>c.options.filter(l=>!l.disabled),i=e.find(c=>c.key===t),o=i?s(i):[];if(r){const c=He(r).modelId;if(o.some(l=>l.value===c))return null}else if(o.length>0)return null;if(i&&o.length>0)return{providerId:i.key,modelId:o[0].value};for(const c of e){if(c.key==="default")continue;const l=s(c);if(l.length>0)return{providerId:c.key,modelId:l[0].value}}return null}function pr(e,t,r,s){const i=e.map(I),o=i.indexOf(t),c=i.indexOf(r);if(o<0||c<0||o===c)return null;let l=c+(s==="after"?1:0);if(o<l&&(l-=1),l===o)return null;const p=[...e],[S]=p.splice(o,1);return p.splice(l,0,S),p.map(Zt)}function Di(e,t,r){const s=e.findIndex(o=>I(o)===t),i=e[s+r];return s<0||!i?null:pr(e,t,I(i),r===-1?"before":"after")}function fr(e,t){if(e===m)return"local";const r=t==="cloud"?N(e):null;return I(r?{kind:"cloud",cloudMachineId:r}:{kind:"machine",nodeId:e})}function oe(e,t){const r=new Map(t.map((i,o)=>[I(i),o])),s=i=>r.get(fr(i.id,i.kind))??t.length;return e.map((i,o)=>({option:i,index:o})).sort((i,o)=>s(i.option)-s(o.option)||i.index-o.index).map(({option:i})=>i)}const gr=n.createSelector(e=>It.select(e)||Q.select(e)),te=n.createSelector(e=>gr.select(e)&&e.remoteMachines?.supported===!0),xi=n.createSelector(e=>te.select(e)&&pt.select(e)&&!Q.select(e)),_e=n.createSelector(e=>te.select(e)&&e.remoteMachines.machineOrder===!0&&e.remoteMachines.order!==null),ce=n.createSelector(e=>_e.select(e)?e.remoteMachines.order??[]:[]),Ni=n.createSelector(e=>e.remoteMachines.orderSaving!==null),re=n.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,r)=>t.name.localeCompare(r.name))),Wi=n.createSelector(e=>e.remoteMachines.localFingerprint),Bi=n.createSelector(e=>e.remoteMachines.pending),Vi=n.createSelector(e=>e.remoteMachines.failures),Gi=n.createSelector(e=>e.remoteMachines.executorBackends??[]),hr=n.createSelector((e,t)=>{if(t===qe)return a.layout_daemonStatus_localConnection_label();const r=v(e.connections.connections,t);return r?ft(r):t}),mr=n.createSelector(e=>hr.select(e,e.connections.windowBackendId)),Ui=n.createSelector((e,t)=>(t?e.remoteMachines.machines[t]??e.cloudMachines?.machines[t]:void 0)??null),Hi=n.createSelector((e,t)=>{const r=e.providerSettings?.profiles;return gt({catalogProfiles:rt.select(e,t),defaultRemoteIncompatibility:tt.select(e,t),defaultRemoteLaunch:et.select(e,t),profileDefaults:Object.values(r?.defaults??{}),profilesLoadStatus:r?.loadStatus??"idle"})}),qi=n.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),ve=n.createSelector(e=>dr({remoteMachinesVisible:te.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:re.select(e),cloud:Y(e)}));function br(e){const t=v(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const Sr=n.createSelector(e=>{const t=Q.select(e),r=lr({backendLabel:mr.select(e),backendPlatform:br(e),machines:re.select(e),cloud:Y(e),orchestrator:t});if(!_e.select(e))return r;if(!t)return oe(r,ce.select(e));const[s,...i]=r;return[s,...oe(i,ce.select(e))]}),ji=n.createSelector(e=>ve.select(e)?Sr.select(e):[]),$i=n.createSelector(e=>e.remoteMachines?.initialAgentPlacement===!0),zi=n.createSelector((e,t,r)=>ve.select(e)?ur(t,re.select(e),Ae(e,r)):m);function Ae(e,t){const r=Y(e);if(!r||!t)return r;const s=e.cloudMachines?.providers??{};return r.map(i=>{if(i.unavailableReason)return i;const o=ht(e,t,s[i.cloudMachineId]??null);return o?{...i,unavailableReason:o}:i})}const Ki=n.createSelector((e,t)=>Ae(e,t)),_r=K("WorkspaceValidation");async function Qi(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_repoPathRequired_error(),suggestion:a.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return vr(s)?kr(s):yr(s,t,r)}function vr(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function Ar(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const i of r){const o=t.match(i);if(o){const c=o[2].replace(/\.git$/,"");return c?{owner:o[1],repo:c}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const i=s[2].replace(/\.git$/,"");return i?{owner:s[1],repo:i}:null}return null}async function kr(e){return Ar(e)?{valid:!0,warning:a.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:a.workspace_validation_invalidGithubUrl_error(),suggestion:a.workspace_validation_invalidGithubUrl_suggestion()}}async function yr(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:a.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:a.workspace_validation_pathNotAbsolute_error(),suggestion:a.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await V("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const c=s.data;return c.exists?c.isDirectory?c.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c}:c.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c,warning:a.workspace_validation_insideParentRepo_warning({path:c.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:c}:t?c.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:a.workspace_repoSelector_notGitRepository_label(),directoryStatus:c}:{valid:!1,error:a.workspace_validation_notDirectory_error(),suggestion:a.workspace_validation_notDirectory_suggestion(),directoryStatus:c}:t?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExist_suggestion(),directoryStatus:c}}if(!(await V("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExistLegacy_suggestion()};const o=await V("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?a.workspace_repoSelector_notGitRepository_label():a.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:a.workspace_validation_nonGitInit_warning()}}catch(s){if(_r.warn("Could not validate path existence",s),!t)return{valid:!1,error:a.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Yi(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchPrefixInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:a.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:a.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:a.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Zi(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function Xi(e){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchNameInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:a.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:a.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchNameLock_error()}:{valid:!0}}function Ji(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:a.workspace_validation_promptTooLong_error(),suggestion:a.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function en(e){const t=e.toLowerCase();return t.includes("maxbuffer")?a.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?a.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?a.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?a.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?a.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?a.workspace_gitError_cloneAuth():a.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?a.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?a.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_readPermission():e:t.includes("permission denied")?a.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?a.workspace_gitError_notFound():t.includes("already exists")?a.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?a.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:a.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?a.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?a.workspace_gitError_diskSpace():e}const Er=["idle","exited"];function Mr(e){return e===void 0||!Er.includes(e)}function tn(e){return e.status==="restarting"?"restarting":Mr(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function wr(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const rn=n.createSelector(e=>e.voiceSettings.isLoading),sn=n.createSelector(e=>e.voiceSettings.available),nn=n.createSelector(e=>e.voiceSettings.provider),an=n.createSelector(e=>e.voiceSettings.engine),on=n.createSelector(e=>e.voiceSettings.osEngineAvailable),cn=n.createSelector(e=>e.voiceSettings.keyConfigured),ln=n.createSelector(e=>e.voiceSettings.vocabulary),dn=n.createSelector(e=>e.voiceSettings.openaiModel),un=n.createSelector(e=>e.voiceSettings.language),pn=n.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),fn=n.createSelector(e=>e.voiceSettings.inputDeviceId),gn=n.createSelector(e=>e.voiceSettings.inputDevices),hn=n.createSelector(e=>e.voiceSettings.busyProvider),mn=n.createSelector(e=>e.voiceSettings.error),bn=n.createSelector(e=>st.select(e)?"unavailable":wr(e.voiceSettings)),$="intent.voice.inputDevice";let z;function Rr(){if(z!==void 0)return z;try{const e=localStorage.getItem($);return typeof e=="string"&&e!==""?e:null}catch{return null}}function Sn(e){z=e;try{e===null?localStorage.removeItem($):localStorage.setItem($,e)}catch{}}let L=null;function _n(e){L=e}function vn(){const e=L;return L=null,e}function Cr(){L=null}const Pr=300,Ir=300;class Tr{constructor(t){d(this,"holdThresholdMs");d(this,"doublePressWindowMs");d(this,"onRecordStart");d(this,"onRecordStop");d(this,"currentState","idle");d(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??Pr,this.doublePressWindowMs=t.doublePressWindowMs??Ir,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let D=null;function An(e){D=e}function kn(){const e=D;return D=null,e}function Or(){D=null}const Fr=12e4,Lr=["audio/webm;codecs=opus","audio/webm"];function yn(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function Dr(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function xr(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Lr.find(e=>MediaRecorder.isTypeSupported(e))}class Nr{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"currentState","idle");d(this,"recorder",null);d(this,"stream",null);d(this,"chunks",[]);d(this,"startedAt",0);d(this,"maxTimer",null);d(this,"discardRequested",!1);d(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??Fr,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(Dr(this.deviceId))}catch(i){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(i),o?"discarded":"error"}if(this.discardRequested){for(const i of t.getTracks())i.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=xr(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=i=>{i.data&&i.data.size>0&&this.chunks.push(i.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=i=>this.handleRecorderError(i),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,i=this.cancelRequested;this.teardown(),!i&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Wr=300;function Br(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const Vr={stopReason:"manual",autoSend:!1};let h=null,_=null,y=0,P=null;const W=new Tr({onRecordStart:()=>{P&&Gr(P)},onRecordStop:e=>{ke(P,e)}});function En(){return h!==null}function Mn(){return h}function wn(e){P=e,y+=1,y===1&&W.keyDown()}function Rn(e){P=e,y!==0&&(y-=1,y===0&&W.keyUp())}function Gr(e){if(h!==null)return;Or(),Cr();const t=new Nr({deviceId:Rr(),onFinished:r=>{h===t&&(h=null);const s=_??{stopReason:"auto-stop",autoSend:!1},i=_!==null;if(_=null,e.dispatch(O()),i||W.reset(),r.durationMs<Wr){s.autoSend&&e.dispatch(q());return}e.dispatch(je({...r,stopReason:s.stopReason,autoSend:s.autoSend}))},onError:r=>{h===t&&(h=null),_=null,e.dispatch(O()),e.showHint(Br(r)?a.hardwareConsole_ptt_micDenied_message():a.hardwareConsole_ptt_recordingFailed_message())}});h=t,e.dispatch($e()),t.start().then(r=>{if(r!=="recording"&&(h===t&&(h=null),r==="discarded")){const s=_?.autoSend===!0;_=null,e.dispatch(O()),s&&e.dispatch(q())}})}function ke(e,t){const r=h;if(r===null){t.autoSend&&e?.dispatch(q());return}_=t,r.stop()}function Cn(){ke(null,Vr)}function Pn(e){W.reset(),y=0,_=null;const t=h;t!==null&&(h=null,t.cancel(),e.dispatch(O()))}const Ur=K("HardwareConsoleVoiceSetupToast"),Hr="hardware-console-voice-setup";let H=null;function qr(){return H||(H=xe(()=>Promise.resolve().then(()=>Ot),void 0,import.meta.url).then(e=>e.notify)),H}function jr(){Tt("/settings?tab=connections#voice").catch(e=>{Ur.error("Failed to open voice settings from setup toast",e)})}function $r(){return{label:a.hardwareConsole_voice_openSettings_label(),onClick:()=>jr()}}function In(){qr().then(e=>{e.error(a.hardwareConsole_voice_noKey_error(),{id:Hr,action:$r()})})}const Tn=n.createSelector(e=>e.externalEditors.selectedAction),zr=n.createSelector(e=>e.externalEditors.editors),Kr=n.createSelector(e=>{const t=w(zr.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(c=>[c.id,c])),i=r.flatMap(c=>{const l=s.get(c);return l?[l]:[]}),o=new Set(r);return[...i,...t.filter(({id:c})=>!o.has(c))]}),On=n.createSelector(e=>e.externalEditors.editorOrder??[]),Fn=n.createSelector(e=>e.externalEditors.loading),Ln=n.createSelector(e=>e.externalEditors.lastFetched),Qr=n.createSelector(e=>e.externalEditors.hiddenEditorIds),Dn=n.createSelector((e,t)=>{if(!(t?it.select(e,t):nt.select(e)))return[];const s=Qr.select(e);return Kr.select(e).filter(i=>i.installed&&!s.includes(i.id))});function xn(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let Yr=0;function Zr(e,t){const r=++Yr;return n.dispatch(Ke(e,t,r)),r}function Nn(e,t,r){n.dispatch(ze(e,t,r))}async function ye(e,t,r,s){const i=crypto.randomUUID(),o=s?.source??"control";try{return(await n.dispatch(Qe({requestId:i,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:de.select(n.state)},{...s,intent:s?.intent??Zr(e,t)}))).status==="success"}finally{n.dispatch(Ye(i,o))}}async function Wn(e,t,r,s,i){return ye(e,t,{kind:"effort",effort:r,previous:s},i)}async function Bn(e,t,r,s,i){return ye(e,t,{kind:"reconcile",current:r??null,levels:s},i)}const Xr=n.createSelector((e,t)=>w(e.agentModel.mutations).filter(r=>r.consumerId===t)),Vn=n.createSelector((e,t)=>Xr.select(e,t).some(r=>r.status==="pending")),Gn=n.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],i=at.select(e,t),o=mt.select(e,t),c=e.daemonHealth.stats?.protocolVersion,l=bt(c),p=l?St(s?.model,null,o):s?.model;return{session:s,providerId:i,levels:o,legacy:l,identity:JSON.stringify([p,i]),connection:de.select(e),canWrite:!!s&&s.workspaceId===r&&!ot.select(e,r)}});function Jr(e,t,r=!1){return e!=="auggie"||t===!0||r}const Un=n.createSelector(e=>_t.select(e)?null:Z.select(e)),es=n.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),b=n.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),Hn=n.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),qn=n.createSelector((e,t)=>!!b.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===es.select(e)),Ee=n.createSelector((e,t)=>t?b.select(e,t)?.catalog.providers??[]:ct.select(e)),Me=n.createSelector((e,t)=>{if(!t)return ue.select(e);const r=b.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),se=n.createSelector((e,t)=>{if(!t)return vt.select(e);const r=b.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),we=n.createSelector((e,t)=>{if(!t)return At.select(e);const r=se.select(e,t),s=Me.select(e,t),i=b.select(e,t)?.readiness??{};return Ee.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&i[o.id]?.available).map(o=>o.id)}),jn=n.createSelector((e,t)=>{const r=se.select(e,t),s=t?b.select(e,t)?.readiness??{}:Z.select(e);return Ee.select(e,t).filter(i=>Jr(i.id,s[i.id]?.available,r[i.id]===!0)).map(i=>i.id)}),$n=n.createSelector((e,t)=>t?we.select(e,t):kt.select(e)),zn=n.createSelector((e,t)=>A.select(e,t)),Kn=n.createSelector((e,t)=>t?!!b.select(e,t):yt.select(e)),Qn=n.createSelector((e,t)=>{if(!t)return Et.select(e);const r=b.select(e,t)?.settings??[],s=Me.select(e,t),i=r.find(l=>l.path==="model.providerDefaults")?.value,o=i&&typeof i=="object"?i[s]:void 0;if(typeof o=="string")return o;const c=r.find(l=>l.path==="model.default")?.value;return typeof c=="string"?c:""}),Yn=n.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):Mt.select(e)),Zn=n.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):wt.select(e)),Xn=n.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):Rt.select(e)),Jn=n.createSelector((e,t,r)=>{if(!r)return Ct.select(e,t);const s=se.select(e,r),i=b.select(e,r);return we.select(e,r).filter(o=>o!==t&&(s[o]||i?.catalog.providers.find(c=>c.id===o)?.canBeDisabled===!1)&&Pt(o,i?.readiness[o]?.authenticated))}),ea=n.createSelector((e,t)=>t?b.select(e,t)?.readiness??{}:Z.select(e)),ts={},ta=n.createSelector(e=>e.providerSettings?.profiles?.status??ts),ra=n.createSelector(e=>e.directoryPicker.listing),sa=n.createSelector(e=>e.directoryPicker.loading),ia=n.createSelector(e=>e.directoryPicker.error),na=n.createSelector(e=>e.directoryPicker.pathError),aa=n.createSelector(e=>e.directoryPicker.createError),le={},rs=n.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),oa=n.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(i=>i.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),ca=n.createSelector(e=>e.mcpSettings.loading),la=n.createSelector(e=>e.mcpSettings.error),da=n.createSelector(e=>e.mcpSettings.mutationError??null),ua=n.createSelector(e=>e.mcpSettings.enabled),ss=n.createSelector(e=>e.mcpSettings.disabledServers),is=n.createSelector(e=>e.mcpSettings.statusMap),ns=n.createSelector(e=>e.mcpSettings.toolsMap),as=n.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(i=>[i.id,R(i)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(i=>{const o=s.get(i.serverId);return o&&i.lastError?[[o,i.lastError]]:[]}))}),os=n.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??le:le),pa=n.createSelector((e,t)=>Object.keys(os.select(e,t))),fa=n.createSelector(e=>{const t=rs.select(e),r=is.select(e),s=ns.select(e),i=ss.select(e),o=as.select(e);return t.map(c=>{const l=R(c)in i,p=s[R(c)]||[];let S=r[R(c)]||"disconnected";return l&&(S="disabled"),{...c,disabled:l,status:S,tools:p,toolCount:p.length,errorMessage:o[R(c)]}})});n.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const ga=n.createSelector(e=>e.mcpSettings.lastImportedCount),ha=n.createSelector(e=>e.mcpSettings.advancedSaveStatus),ma=n.createSelector(e=>e.mcpSettings.advancedSaveError);function g(e){return{category:"settings",...e}}const x=[{id:"new-workspace",tab:"",label:"New workspace",route:"/workspace/new",category:"navigation",description:"Create-workspace flow."},g({id:"utility-default-model",tab:"providers",hashAliases:["utility-default-model","default-model","quickActions.defaultModel","backgroundAgents.defaultModel"],scrollSelector:"#utility-default-model",highlightSelector:'[data-highlight-id="utility-default-model"]',label:"Settings: Default model",route:"/settings?tab=providers#utility-default-model",description:"Default AI behavior model selection."}),g({id:"global-instructions",tab:"agent-behavior",hashAliases:["global-instructions","agents","specialists","all-agents"],scrollSelector:"#global-instructions",highlightSelector:'[data-highlight-id="global-instructions"]',label:"Settings: Agent Behavior",route:"/settings?tab=agent-behavior#global-instructions",description:"Global agent instructions and defaults."}),g({id:"create-specialist",tab:"specialists",hashAliases:["create-specialist"],scrollSelector:"#create-specialist",highlightSelector:'[data-highlight-id="create-specialist"]',label:"Settings: Create specialist",route:"/settings?tab=specialists&view=create-specialist#create-specialist",description:"Create-specialist entry point."}),g({id:"providers",tab:"providers",hashAliases:["providers"],scrollSelector:"#providers",highlightSelector:'[data-highlight-id="providers"]',label:"Settings: AI coding CLIs",route:"/settings?tab=providers#providers",description:"Provider/account selector settings."}),g({id:"integrations",tab:"connections",hashAliases:["integrations"],scrollSelector:"#integrations",highlightSelector:'[data-highlight-id="integrations"]',label:"Settings: Connections",route:"/settings?tab=connections#integrations",description:"Connected integrations settings."}),g({id:"devices",tab:"devices",hashAliases:["devices","machines"],scrollSelector:"#devices",highlightSelector:"#devices",label:"Settings: Machines",route:"/settings?tab=devices#devices",description:"Saved remote machine settings."}),g({id:"mobile",tab:"mobile",hashAliases:["mobile"],scrollSelector:"#mobile",highlightSelector:'[data-highlight-id="mobile"]',label:"Settings: Mobile",route:"/settings?tab=mobile#mobile",description:"Remote access and Intent Mobile pairing."}),g({id:"guest-sessions",tab:"collaboration",hashAliases:["collaboration","guest-sessions","sharing"],scrollSelector:"#collaboration",highlightSelector:"#collaboration",label:"Settings: Collaboration",route:"/settings?tab=collaboration#collaboration",description:"Host membership, workspace guests and joined hosts."}),g({id:"websocket-api",tab:"mobile",hashAliases:["websocket-api","remote-access"],scrollSelector:"#websocket-api",highlightSelector:'[data-highlight-id="websocket-api"]',label:"Settings: Remote Access",route:"/settings?tab=mobile#websocket-api",description:"Remote access (WebSocket API) settings."}),...[["voice","Voice Dictation","Voice dictation settings.","input"],["keyboard-shortcuts","Keyboard Shortcuts","Keyboard shortcuts reference.","input"],["mcp-servers","MCP Servers","MCP server configuration.","connections"],["plugins","Plugins","App-wide Agent Plugins.","connections"],["git-workspace","Git & Workspace","Git and workspace defaults.","setup"],["git","Git","Git defaults.","setup"],["shell","Shell","Shell and CLI optimization settings.","setup"],["workspace","Workspace","Workspace defaults.","setup"],["cli-optimization","CLI Optimization","RTK/CLI optimization settings.","setup"],["workspace-api","Tool Output & Retention","Tool output size and retention settings.","advanced"],["notifications","Notifications","Notification preferences.","app-behavior"],["updates","Updates","Application update preferences.","app-behavior"],["open-in","Open In","External editor/app launch preferences.","app-behavior"],["github-link-action","GitHub Links","GitHub issue and pull request link behavior.","app-behavior"],["agent-features","Agent Features","Agent feature settings.","agent-behavior"],["font-style","Font style","Font style settings.","display"],["language","Language","Application language settings.","display"],["labs","Labs","Experimental feature switches.","advanced"],["agent-backend","Agent Backend","Agent backend settings.","advanced"],["connection","Connection","Daemon connection details.","advanced"],["hardware","Hardware","Hardware integration settings.","advanced"],["developer","Developer","Development-only settings.","advanced"]].map(([e,t,r,s])=>g({id:e,tab:s,hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=${s}#${e}`,description:r})),g({id:"appearance",tab:"display",hashAliases:["appearance","theme"],scrollSelector:"#theme",highlightSelector:'[data-highlight-id="appearance"]',label:"Settings: Appearance",route:"/settings?tab=display#theme",description:"Theme mode controls."}),...[["color-theme","Color theme","Color theme selection."],["note-font","Notes font","Notes/spec font style."],["agent-chat-font","Agent chat font","Agent chat font style."],["code-font","Code font","Code editor and diff font."]].map(([e,t,r])=>g({id:e,tab:"display",hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=display#${e}`,description:r})),g({id:"general",tab:"advanced",hashAliases:["general","reset"],scrollSelector:"#reset",highlightSelector:'[data-highlight-id="general"]',label:"Settings: Advanced",route:"/settings?tab=advanced#reset",description:"Advanced settings and reset controls."}),{id:"workspace-card",tab:"",hashAliases:["workspace-card"],highlightSelector:'[data-highlight-id^="workspace-"]',label:"Workspace card",category:"workspace",description:"A workspace card on workspace list surfaces.",dynamic:!0,idPattern:"workspace-{workspaceId}"},{id:"specialist-entry",tab:"specialists",highlightSelector:'[data-highlight-id^="specialist-"]',label:"Specialist entry",route:"/settings?tab=specialists&specialist={specialistId}#specialist-{specialistId}",category:"specialist",description:"A specific specialist row in settings.",dynamic:!0,idPattern:"specialist-{specialistId}"}];function Re(e){const t=e.indexOf("#"),r=t>=0?e.slice(t+1):e;return decodeURIComponent(r.replace(/^#/,"")).trim()}function cs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ls(e,t){if(!t.match(/\{[^}]+\}/g)?.length)return e===t;const s=t.split(/\{[^}]+\}/g).map(cs).join("[^/]+");return new RegExp(`^${s}$`).test(e)}function ds(e){const t=Re(e);if(!t)return;const r=x.find(i=>i.id===t||i.hashAliases?.includes(t));if(r)return r;const s=x.find(i=>i.route&&i.dynamic&&i.idPattern&&ls(t,i.idPattern));return s?{...s,id:t}:void 0}function ba(){return x.map(e=>({...e,hashAliases:e.hashAliases?[...e.hashAliases]:void 0}))}function us(e){try{return new URL(e,"app://intent").pathname||"/"}catch{const t=e.indexOf("?"),r=e.indexOf("#");let s=e.length;return t>=0&&(s=Math.min(s,t)),r>=0&&(s=Math.min(s,r)),e.slice(0,s)||"/"}}const ps=new Set(x.flatMap(e=>e.route?[us(e.route)]:[])),fs=[/^\/workspace\/[^/]+$/,/^\/agent\/[^/]+$/];function Sa(e){if(typeof e!="string")return!1;const t=e.trim();if(!t)return!1;if(t.startsWith("intent://"))return!0;let r,s;try{const i=new URL(t,"app://intent");if(i.protocol!=="app:")return!1;r=i.pathname||"/",s=Re(i.hash)}catch{return!1}return ps.has(r)?s?!!ds(s):!0:fs.some(i=>i.test(r))}const _a=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.secretRequests","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],gs=[{path:"agentFeatures.backgroundHooks",label:()=>a.settings_agentFeatures_backgroundHooks_label(),description:()=>a.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>a.settings_agentFeatures_hostExec_label(),description:()=>a.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.scripts",label:()=>a.settings_agentFeatures_scripts_label(),description:()=>a.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>a.settings_agentFeatures_terminalAccess_label(),description:()=>a.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>a.settings_agentFeatures_browserAutomation_label(),description:()=>a.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>a.settings_agentFeatures_desktopControl_label(),description:()=>a.settings_agentFeatures_desktopControl_description(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>a.settings_agentFeatures_richChatBlocks_label(),description:()=>a.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>a.settings_agentFeatures_structuredQuestions_label(),description:()=>a.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>a.settings_agentFeatures_secretRequests_label(),description:()=>a.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.attentionRequests",label:()=>a.settings_agentFeatures_attentionRequests_label(),description:()=>a.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>a.settings_agentFeatures_stateSnapshot_label(),description:()=>a.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>a.settings_agentFeatures_prMonitor_label(),description:()=>a.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>a.settings_agentFeatures_taskGraph_label(),description:()=>a.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>a.settings_agentFeatures_peerAgents_label(),description:()=>a.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>a.settings_agentFeatures_mcpTools_label(),description:()=>a.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],va=Object.fromEntries(gs.map(e=>[e.path,e.defaultValue]));export{sr as $,zs as A,wn as B,Rn as C,js as D,Ot as E,gs as F,pe as G,Fi as H,Mr as I,Jr as J,En as K,xn as L,ne as M,Sa as N,yn as O,Rr as P,yi as Q,Li as R,E as S,I as T,k as U,Zr as V,pr as W,vi as X,Ar as Y,ki as Z,_i as _,va as a,Ds as a$,Bn as a0,Nn as a1,Ri as a2,wr as a3,ds as a4,ur as a5,Zi as a6,Sn as a7,Vn as a8,Xr as a9,na as aA,On as aB,ci as aC,gi as aD,ni as aE,zi as aF,bn as aG,Gi as aH,ai as aI,oi as aJ,Qs as aK,Xs as aL,X as aM,Lt as aN,Vt as aO,Gt as aP,fe as aQ,Bt as aR,Dt as aS,Ft as aT,Nt as aU,Wt as aV,Ns as aW,Vs as aX,Gs as aY,Hs as aZ,Fs as a_,Gn as aa,Ks as ab,Js as ac,hr as ad,$n as ae,Me as af,se as ag,jn as ah,we as ai,Ee as aj,Zn as ak,Xn as al,Yn as am,Jn as an,ea as ao,Kn as ap,Qn as aq,zn as ar,mr as as,Zs as at,qi as au,ti as av,aa as aw,ia as ax,ra as ay,sa as az,_a as b,cn as b$,Bs as b0,xs as b1,Ws as b2,Ls as b3,Us as b4,Os as b5,qs as b6,ui as b7,Qr as b8,$i as b9,Ui as bA,Vi as bB,Bi as bC,re as bD,gr as bE,te as bF,Hi as bG,xi as bH,Un as bI,$t as bJ,mi as bK,bi as bL,fi as bM,hi as bN,ii as bO,pi as bP,A as bQ,ei as bR,Ki as bS,ji as bT,Sr as bU,ve as bV,Ys as bW,hn as bX,an as bY,fn as bZ,gn as b_,Kr as ba,Dn as bb,Fn as bc,li as bd,di as be,Ln as bf,Wi as bg,ce as bh,Ni as bi,_e as bj,ma as bk,ha as bl,ss as bm,ua as bn,la as bo,as as bp,ga as bq,ca as br,da as bs,rs as bt,fa as bu,is as bv,ns as bw,Tn as bx,si as by,ta as bz,m as c,un as c0,dn as c1,on as c2,nn as c3,sn as c4,mn as c5,rn as c6,ln as c7,pn as c8,b as c9,es as ca,qn as cb,Hn as cc,pa as cd,oa as ce,_n as cf,An as cg,In as ch,Ti as ci,J as cj,N as ck,Oi as cl,Gr as cm,Di as cn,Cn as co,Xi as cp,Yi as cq,Ji as cr,Qi as cs,$r as ct,Si as cu,Ii as d,wi as e,Ci as f,Pi as g,Ei as h,he as i,Mi as j,be as k,Wn as l,Pn as m,Cr as n,Or as o,vn as p,kn as q,ri as r,jt as s,qt as t,Ai as u,Mn as v,ba as w,en as x,tn as y,$s as z};
1
+ var Ce=Object.defineProperty;var Pe=(e,t,r)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>Pe(e,typeof t!="symbol"?t+"":t,r);import{k as Ie,N as Te,T as Oe,d as Fe,l as Le,w as De}from"./Bv2KudWv.js";import"./DYhIMPy1.js";import{bo as a,_ as xe}from"./Y9-4hTF9.js";import"./cFbB-5Cu.js";import"./CrWhihJ_.js";import"./DOH10_LL.js";import{c as K}from"./ChTqQfQN.js";import"./DU9Ky5os.js";import{Iz as n,tW as Ne,nx as w,nw as v,m0 as We,vj as Be,vh as ie,h7 as Ve,h8 as Ge,c as Ue,Ic as He,a4 as qe,ye as O,yf as q,yc as je,yd as $e,bX as ze,bW as Ke,c9 as Qe,c8 as Ye,nz as R}from"./tU_ZJtMw.js";import{cG as Ze,cv as Xe,bv as Je,cj as Q,cL as et,cK as tt,cP as rt,c7 as st,cn as it,c9 as nt,cE as de,ax as at,bR as ot,cM as ct}from"./ClH0Gega.js";import{a as lt,i as dt}from"./DNWBkvFP.js";import{aK as ut,W as ue,bL as pt,m as ft,Q as gt,bY as Y,g as ht,X as mt,bZ as bt,c as St,aL as _t,bG as Z,ao as vt,a_ as At,$ as kt,aG as yt,bN as Et,_ as Mt,Y as wt,Z as Rt,bJ as Ct,x as Pt}from"./aos1n-nT.js";import{y as It}from"./5GYSXevc.js";import{y as T}from"./CEsW1euQ.js";import{i as V}from"./CpHzYkzi.js";import{n as Tt}from"./DYR-Lw2g.js";const Ot=Object.freeze(Object.defineProperty({__proto__:null,NOTIFY_DURATION:Te,TOAST_COUNTDOWN_CLASS:Oe,TOAST_COUNTDOWN_NO_HOVER_PAUSE_CLASS:Fe,notify:Ie,notifyMetadata:Le,withToastCountdown:De},Symbol.toStringTag,{value:"Module"})),Os=n.createSelector(e=>Ze.select(e)?.capabilities.gitlabCheckout===!0),Fs=n.createSelector(e=>e.gitlabAuth.host),Ls=n.createSelector(e=>e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host),Ds=n.createSelector(e=>Ne(e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host)??""),xs=n.createSelector(e=>e.gitlabAuth.isCancelling),Ns=n.createSelector(e=>e.gitlabAuth.cancelOutcome),Ws=n.createSelector(e=>e.gitlabAuth.isConfigured),Bs=n.createSelector(e=>e.gitlabAuth.isAuthenticating),Vs=n.createSelector(e=>e.gitlabAuth.deviceFlow),Gs=n.createSelector(e=>e.gitlabAuth.deviceGrantSupported),Us=n.createSelector(e=>e.gitlabAuth.user),Hs=n.createSelector(e=>e.gitlabAuth.error);n.createSelector(e=>e.gitlabAuth.method);const qs=n.createSelector(e=>e.gitlabAuth.statusReady===!0),E=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return a.specialists_builtin_prReviewer_name()},get description(){return a.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"ui-designer",icon:"ui-designer",get name(){return a.specialists_builtin_uiDesigner_name()},get description(){return a.specialists_builtin_uiDesigner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"vulnerability-scanner",icon:"pr-reviewer",get name(){return a.specialists_builtin_vulnerabilityScanner_name()},get description(){return a.specialists_builtin_vulnerabilityScanner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"developer",icon:"verifier",get name(){return a.specialists_builtin_developer_name()},get description(){return a.specialists_builtin_developer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"product-manager",icon:"coordinator",get name(){return a.specialists_builtin_productManager_name()},get description(){return a.specialists_builtin_productManager_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"maintenance-coordinator",icon:"ralph",get name(){return a.specialists_builtin_maintenanceCoordinator_name()},get description(){return a.specialists_builtin_maintenanceCoordinator_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"chief-of-staff",icon:"chief-of-staff",get name(){return a.specialists_builtin_chiefOfStaff_name()},get description(){return a.specialists_builtin_chiefOfStaff_description()},hidden:!0,defaultBehaviorPrompt:"",promptUnavailable:!0}],pe=new Set(["pr-reviewer"]),js="developer";function $s(e){return E.find(t=>t.id===e)}const Ft=n.createSelector(e=>e.githubAuth.mutationRequestId),Lt=n.createSelector(e=>e.githubAuth.callbacksCancelled),Dt=n.createSelector(e=>e.githubAuth.isDisconnecting),fe=n.createSelector(e=>e.githubAuth.isAuthenticated),xt=n.createSelector(e=>e.githubAuth.statusSettled===!0),Nt=n.createSelector(e=>e.githubAuth.requiresDaemonAuth),Wt=n.createSelector(e=>e.githubAuth.user),Bt=n.createSelector(e=>e.githubAuth.isAuthenticating),Vt=n.createSelector(e=>e.githubAuth.deviceFlow),Gt=n.createSelector(e=>e.githubAuth.error),zs=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:Lt,selectGitHubAuthDeviceFlow:Vt,selectGitHubAuthError:Gt,selectGitHubAuthIsAuthenticated:fe,selectGitHubAuthIsAuthenticating:Bt,selectGitHubAuthIsDisconnecting:Dt,selectGitHubAuthMutationRequestId:Ft,selectGitHubAuthRequiresDaemonAuth:Nt,selectGitHubAuthStatusSettled:xt,selectGitHubAuthUser:Wt},Symbol.toStringTag,{value:"Module"}));function f(e){return e??""}function Ut(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((i,o)=>f(i.provider)===f(s[o].provider)&&i.model===s[o].model&&i.hint===s[o].hint&&f(i.reasoningEffort)===f(s[o].reasoningEffort))}function ne(e,t){if(e.source!=="user"||!t?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const r=e.bundled;return r?f(e.name)===f(r.name)&&f(e.description)===f(r.description)&&f(e.behaviorPrompt)===f(r.behaviorPrompt)&&f(e.roleReminder)===f(r.roleReminder)&&f(e.reasoningEffort)===f(r.reasoningEffort)&&Ut(e.modelOptions,r.modelOptions):!1}const Ks=n.createSelector(e=>e.specialists.bundledSpecialists),Ht=n.createSelector(e=>e.specialists.fileSpecialists),Qs=n.createSelector(e=>w(Ht.select(e))),Ys=n.createSelector(e=>e.specialists.userOverrides);n.createSelector(e=>e.specialists.overridesLoaded);const Zs=n.createSelector(e=>e.specialists.customSpecialistsLoaded),Xs=n.createSelector(e=>e.specialists.fileSpecialistsLoaded),Js=n.createSelector(e=>e.specialists.bundledSpecialistsLoaded),ei=n.createSelector(e=>e.specialists.specialistsFolderPath),ti=n.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});n.createSelector(e=>e.specialists.providerModelOverrides);const G=n.createSelector((e,t)=>!(pe.has(t)&&!fe.select(e)));function qt(e,t){return t?e:e.filter(r=>!pe.has(r.id))}function jt(e,t){return qt(e,t).filter(r=>!r.hidden)}function ri(e,t){return jt(e,t).filter(r=>r.role!=="internal")}const A=n.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(l=>({...l,defaultModel:l.model,defaultBehaviorPrompt:l.behaviorPrompt??l.prompt??"",defaultAgentType:l.agentType}));const r=w(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,i=new Set,o=[];for(const l of r)!i.has(l.id)&&G.select(e,l.id)&&(i.add(l.id),o.push({id:l.id,name:l.name,description:l.description,codingAgent:l.codingAgent,defaultModel:l.model||void 0,defaultBehaviorPrompt:l.behaviorPrompt,roleReminder:l.roleReminder,source:l.source,importedFrom:l.importedFrom,unsupportedFields:l.unsupportedFields,requiredSkills:l.requiredSkills,missingSkills:l.missingSkills,hidden:l.hidden,resolvedModel:l.resolvedModel,resolvedProvider:l.resolvedProvider,modelOptions:l.modelOptions,reasoningEffort:l.reasoningEffort,role:l.role,teamAgents:l.teamAgents,icon:l.icon}));for(const l of s)!i.has(l.id)&&G.select(e,l.id)&&(i.add(l.id),o.push(l));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const l of E)!i.has(l.id)&&G.select(e,l.id)&&(i.add(l.id),o.push(l));const c=new Map;for(const l of E)c.has(l.id)||c.set(l.id,c.size);for(const l of s)c.has(l.id)||c.set(l.id,c.size);return o.sort((l,p)=>{const S=c.has(l.id),B=c.has(p.id);return S&&B?(c.get(l.id)??0)-(c.get(p.id)??0):S&&!B?-1:!S&&B?1:l.name.localeCompare(p.name)}),o}),si=n.createSelector(e=>{const t=A.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...E.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,i)=>+!r.has(s.id)-+!r.has(i.id)||s.id.localeCompare(i.id)),t[0]}),$t=n.createSelector((e,t)=>{const r=v(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(i=>i.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&w(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const i=E.find(o=>o.id===t);if(i)return{id:i.id,name:i.name,description:i.description,source:"builtin"}}return null}),ii=n.createSelector((e,t)=>$t.select(e,t)?.name??null),ni=n.createSelector((e,t,r)=>{const i=A.select(e,r).find(o=>o.id===t);return i?i.defaultModel?i.defaultModel:i.resolvedModel??"":""}),ai=n.createSelector((e,t,r)=>A.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),oi=n.createSelector((e,t,r)=>A.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),ci=n.createSelector((e,t,r)=>{const i=A.select(e,r).find(o=>o.id===t);return i?i.defaultBehaviorPrompt:""});function F(e,t){return t.some(r=>r.id===e)||E.some(r=>r.id===e)}const li=n.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&F(t,e.specialists.bundledSpecialists)}return F(t,e.specialists.bundledSpecialists)}),di=n.createSelector((e,t,r)=>r?!!X.select(e,t,r):!!v(e.specialists.fileSpecialists,t)),ui=n.createSelector((e,t,r)=>{if(r){const o=X.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:F(t,e.specialists.bundledSpecialists)&&!ne(o)}if(!F(t,e.specialists.bundledSpecialists))return!1;const i=v(e.specialists.fileSpecialists,t);return!i||i.source!=="user"?!1:!ne(i)}),X=n.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return v(e.specialists.fileSpecialists,t)}),pi=n.createSelector((e,t,r)=>{const s=X.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(i=>i.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(i=>i.id===t)?"Built-in":null}),fi=n.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=v(e.specialists.fileSpecialists,t);if(s)return s.filePath;const i=e.specialists.bundledSpecialists.find(o=>o.id===t);if(i&&"filePath"in i)return i.filePath}),gi=n.createSelector((e,t,r)=>{if(r){const i=A.select(e,r).find(l=>l.id===t),o=i?.codingAgent||i?.resolvedProvider;if(o)return Xe.select(e,o,r);const c=Je.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[c]?.available?c:""}const s=v(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:zt.select(e,t)}),zt=n.createSelector((e,t)=>{const s=A.select(e).find(i=>i.id===t);return s?.codingAgent?s.codingAgent:ut.select(e)?ue.select(e):""}),hi=n.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?w(r):[]}),mi=n.createSelector((e,t)=>e.specialists.creationByContext?.[t]??We),bi=n.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),U=K("Clipboard");async function Si(e){let t;if(lt())try{const r=await dt("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,U.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw U.error("Browser clipboard write failed",r,{electronError:t}),r}throw U.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const Kt=["connected","disconnected","unreachable","revoked","update-required"],M=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),u=e=>typeof e=="string"&&e.length>0,C=e=>typeof e=="string"&&e.length>0?e:void 0,ge=e=>Number.isSafeInteger(e)&&e>=0?e:0;function Qt(e){if(!M(e))return;const t=Array.isArray(e.providers)?e.providers.flatMap(s=>M(s)&&u(s.id)?[{id:s.id,...s.visible===!1?{visible:!1}:{},status:typeof s.status=="string"?s.status:"unknown",models:Array.isArray(s.models)?s.models.filter(i=>u(i)):[],...s.modelsStale===!0?{modelsStale:!0}:{}}]:[]):[],r=C(e.intentdVersion);return{...r?{intentdVersion:r}:{},providers:t}}function _i(e){if(!M(e)||!u(e.id)||!u(e.name)||!u(e.fingerprint)||!Kt.includes(e.state)||!Number.isInteger(e.port)||!u(e.addedAt))return null;const t=M(e.platform)&&u(e.platform.os)&&u(e.platform.arch)?{os:e.platform.os,arch:e.platform.arch}:void 0,r=Qt(e.capabilities),s=C(e.tcAddress),i=C(e.observedAt),o=C(e.lastConnectedAt),c=Be(e.cloud),l=Number.isInteger(e.nodeProtocol)&&e.nodeProtocol>=0?e.nodeProtocol:void 0;return{id:e.id,name:e.name,...t?{platform:t}:{},hosts:Array.isArray(e.hosts)?e.hosts.filter(p=>u(p)):[],port:e.port,...s?{tcAddress:s}:{},fingerprint:e.fingerprint,state:e.state,runningAgents:ge(e.runningAgents),...r?{capabilities:r}:{},...l!==void 0?{nodeProtocol:l}:{},...i?{observedAt:i}:{},addedAt:e.addedAt,...o?{lastConnectedAt:o}:{},...c?{cloud:c}:{}}}function vi(e){if(!M(e)||!u(e.credentialId)||!u(e.backendId)||!u(e.backendName)||!u(e.createdAt))return null;const t=C(e.lastUsedAt);return{credentialId:e.credentialId,backendId:e.backendId,backendName:e.backendName,createdAt:e.createdAt,...t?{lastUsedAt:t}:{},connected:e.connected===!0,runningAgents:ge(e.runningAgents)}}function Ai(e){const t=(typeof e=="string"?e:"").trim().toUpperCase();return t===""?null:t}function Yt(e){if(!M(e)||typeof e.name!="string")return null;const t=e.name;return e.kind==="local"?{kind:"local",name:t}:e.kind==="machine"&&u(e.nodeId)?{kind:"machine",nodeId:e.nodeId,name:t}:e.kind==="cloud"&&u(e.cloudMachineId)?{kind:"cloud",cloudMachineId:e.cloudMachineId,name:t}:null}function ki(e){if(!Array.isArray(e))return null;const t=[];for(const r of e){const s=Yt(r);if(!s)return null;t.push(s)}return t}function Zt(e){return e.kind==="local"?{kind:"local"}:e.kind==="machine"?{kind:"machine",nodeId:e.nodeId}:{kind:"cloud",cloudMachineId:e.cloudMachineId}}function I(e){return e.kind==="local"?"local":e.kind==="machine"?`machine:${e.nodeId}`:`cloud:${e.cloudMachineId}`}const Xt={macos:"macOS",linux:"Linux",windows:"Windows"},Jt={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function k(e,t){const r=[e&&(Xt[e]??e),t&&(Jt[t]??t)].filter(s=>!!s);return r.length?r.join(" "):null}function er(e){return e?.placement?.target==="remote"||T(e?.placement?.target)}const tr=new Set(["running","paused","resuming","pausing","stopping"]);function rr(e,t){if(e.placementError)return null;if(e.cloudStart)return"starting";if(!e.nodeId)return e.effectiveIsolation==="pending"?"starting":null;const r=t?.cloud?.state;return r&&tr.has(r)?r:e.effectiveIsolation==="pending"?"starting":null}function he(e,t){if(!e||!er(e))return null;const r=e.nodeId??e.placement?.nodeId??"",s=t&&t.id===r?t:null;if(T(e.placement?.target))return{nodeId:r,name:e.nodeName?.trim()||Ve(s?.cloud?.provider??Ge(e.placement?.cloudMachineId)),platform:k(s?.platform?.os,s?.platform?.arch),state:"ready",cloud:{state:rr(e,s)}};const i=k(e.placement?.os,e.placement?.arch)??k(s?.platform?.os,s?.platform?.arch),o=s?.state==="revoked"?"revoked":s?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:r,name:e.nodeName?.trim()||s?.name||a.remoteAgent_location_unknownMachine(),platform:i,state:o}}function yi(e,t){if(!e)return null;const r=t&&t.id===e?t:null;return{nodeId:e,name:r?.name||a.remoteAgent_location_unknownMachine(),platform:k(r?.platform?.os,r?.platform?.arch),state:r?.state==="revoked"?"revoked":r?.state==="unreachable"?"unreachable":"ready"}}function me(e){switch(e){case"starting":return a.cloudMachines_agent_starting();case"running":return a.cloudMachines_agent_running();case"paused":return a.cloudMachines_agent_paused();case"resuming":return a.cloudMachines_agent_resuming();case"pausing":return a.cloudMachines_agent_pausing();case"stopping":return a.cloudMachines_agent_stopping();default:return null}}function Ei(e){const t=me(e.cloud?.state);return t?a.cloudMachines_agent_chip({machine:e.name,state:t}):e.name}function Mi(e){if(e.cloud){const r=me(e.cloud.state),s=a.remoteAgent_location_tooltipNoPlatform({machine:e.name});return r?a.remoteAgent_location_tooltipWithState({location:s,state:r}):s}const t=e.platform?a.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):a.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_unreachable_label()});case"revoked":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_revoked_label()});default:return t}}function be(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"||e.cloudStart?"starting":e.setup?.state==="failed"?"setup-failed":null}function Se(e){if(!e.endsWith("}"))return null;for(let t=e.indexOf(" {");t>=0;t=e.indexOf(" {",t+1))try{const r=JSON.parse(e.slice(t+1));if(r&&typeof r=="object"&&typeof r.code=="string")return{message:e.slice(0,t).trim(),data:r}}catch{}return null}function sr(e,t){const r=e.detail??"",s=Se(r),i=e.code==="machine-update-required"||s?.data.code==="machine-update-required";if(i&&s?.data.reason==="prepared-checkout")return{updateRequired:i,message:a.remoteAgent_updateRequired_preparedCheckout({machine:t})};const o=ie(s?.data),c=o??(e.code?ie({code:e.code}):null);return c?{updateRequired:i,message:s?.message||r,cloud:c,cloudDetailKnown:!!o}:{updateRequired:i,message:s?.message||r}}function wi(e){if(!T(e?.placement?.target)||!e.placementError||e.status!==Ue.Error)return null;const t=sr(e.placementError,"");return t.cloud?t:null}const ir=["attachments-too-large-for-machine:","node-prompt-too-large:"],nr="remote-agent-unsupported:";function ae(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(e/1048576)}function Ri(e){const t=Se(e)?.message??e;for(const s of ir){const i=t.indexOf(s);if(i<0)continue;const o=t.slice(i+s.length).trim().replace(/^[a-z][\w]*(?:\.[\w]+)+:\s*/i,""),c=/come to (\d+) bytes\b.*?over its (\d+)-byte limit/.exec(o);return c?a.remoteAgent_attachmentsTooLargeSized_error({size:ae(Number(c[1])),limit:ae(Number(c[2]))}):o?a.remoteAgent_attachmentsTooLarge_error({detail:o}):a.remoteAgent_attachmentsTooLargeNoDetail_error()}const r=t.indexOf(nr);return r>=0&&/attachment/i.test(t.slice(r))?a.remoteAgent_attachmentsUnsupported_error():null}function Ci(e){return T(e?.placement?.target)&&be(e,he(e))==="starting"}function Pi(e,t){if(!T(e?.placement?.target))return!1;const r=he(e,t);return r?.cloud?.state==="resuming"&&be(e,r)===null}const m="",j="cloud:";function J(e){return`${j}${e}`}function N(e){return e?.startsWith(j)&&e.slice(j.length)||null}const Ii=J("e2b");function ar(e,t){return e?.find(r=>J(r.cloudMachineId)===t&&r.unavailableReason===null)}const or=new Set(["connected","disconnected"]);function cr(e){switch(e){case"unreachable":return a.remoteMachines_state_unreachable_label();case"revoked":return a.remoteMachines_state_revoked_label();case"update-required":return a.remoteMachines_state_updateRequired_label();default:return}}function ee(e){return or.has(e.state)}function lr({backendLabel:e,backendPlatform:t,machines:r,cloud:s,orchestrator:i=!1}){const o=[i?{id:m,label:a.remoteMachines_startOn_firstAvailable_label(),platform:null,disabled:!1,hint:a.remoteMachines_startOn_firstAvailable_hint()}:{id:m,label:e,platform:k(t?.os,t?.arch),disabled:!1},...r.map(c=>{const l=k(c.platform?.os,c.platform?.arch);return ee(c)?{id:c.id,label:c.name,platform:l,disabled:!1}:{id:c.id,label:c.name,platform:l,disabled:!0,reason:cr(c.state)}})];for(const c of s??[])o.push({id:J(c.cloudMachineId),label:c.label,platform:null,kind:"cloud",disabled:c.unavailableReason!==null,...c.unavailableReason?{reason:c.unavailableReason}:c.needsProfile?{hint:a.cloudMachines_startOn_hint()}:{}});return o}function Ti(e){return e.find(t=>t.id===m)?.label??""}function Oi(e,t,r){if(e!==m)return N(e)?void 0:e;if(r)return t.find(s=>s.id!==m&&s.kind!=="cloud"&&!s.disabled)?.id}function dr({remoteMachinesVisible:e,supported:t,machines:r,cloud:s}){return e&&t&&(r.some(ee)||(s??[]).some(i=>i.unavailableReason===null))}function ur(e,t,r){if(!e)return m;if(N(e))return ar(r,e)?e:m;const s=t.find(i=>i.id===e);return s&&ee(s)?s.id:m}function Fi(e,{cloudEntries:t=!1,providerOf:r}={}){const s=N(e);return s?t&&r?.(s)==="northflank"?{target:"cloud",checkout:"isolated",cloudMachineId:s}:t?{target:"e2b",checkout:"isolated",cloudMachineId:s}:{target:"e2b",checkout:"isolated"}:e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function Li({groups:e,providerRef:t,model:r}){const s=c=>c.options.filter(l=>!l.disabled),i=e.find(c=>c.key===t),o=i?s(i):[];if(r){const c=He(r).modelId;if(o.some(l=>l.value===c))return null}else if(o.length>0)return null;if(i&&o.length>0)return{providerId:i.key,modelId:o[0].value};for(const c of e){if(c.key==="default")continue;const l=s(c);if(l.length>0)return{providerId:c.key,modelId:l[0].value}}return null}function pr(e,t,r,s){const i=e.map(I),o=i.indexOf(t),c=i.indexOf(r);if(o<0||c<0||o===c)return null;let l=c+(s==="after"?1:0);if(o<l&&(l-=1),l===o)return null;const p=[...e],[S]=p.splice(o,1);return p.splice(l,0,S),p.map(Zt)}function Di(e,t,r){const s=e.findIndex(o=>I(o)===t),i=e[s+r];return s<0||!i?null:pr(e,t,I(i),r===-1?"before":"after")}function fr(e,t){if(e===m)return"local";const r=t==="cloud"?N(e):null;return I(r?{kind:"cloud",cloudMachineId:r}:{kind:"machine",nodeId:e})}function oe(e,t){const r=new Map(t.map((i,o)=>[I(i),o])),s=i=>r.get(fr(i.id,i.kind))??t.length;return e.map((i,o)=>({option:i,index:o})).sort((i,o)=>s(i.option)-s(o.option)||i.index-o.index).map(({option:i})=>i)}const gr=n.createSelector(e=>It.select(e)||Q.select(e)),te=n.createSelector(e=>gr.select(e)&&e.remoteMachines?.supported===!0),xi=n.createSelector(e=>te.select(e)&&pt.select(e)&&!Q.select(e)),_e=n.createSelector(e=>te.select(e)&&e.remoteMachines.machineOrder===!0&&e.remoteMachines.order!==null),ce=n.createSelector(e=>_e.select(e)?e.remoteMachines.order??[]:[]),Ni=n.createSelector(e=>e.remoteMachines.orderSaving!==null),re=n.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,r)=>t.name.localeCompare(r.name))),Wi=n.createSelector(e=>e.remoteMachines.localFingerprint),Bi=n.createSelector(e=>e.remoteMachines.pending),Vi=n.createSelector(e=>e.remoteMachines.failures),Gi=n.createSelector(e=>e.remoteMachines.executorBackends??[]),hr=n.createSelector((e,t)=>{if(t===qe)return a.layout_daemonStatus_localConnection_label();const r=v(e.connections.connections,t);return r?ft(r):t}),mr=n.createSelector(e=>hr.select(e,e.connections.windowBackendId)),Ui=n.createSelector((e,t)=>(t?e.remoteMachines.machines[t]??e.cloudMachines?.machines[t]:void 0)??null),Hi=n.createSelector((e,t)=>{const r=e.providerSettings?.profiles;return gt({catalogProfiles:rt.select(e,t),defaultRemoteIncompatibility:tt.select(e,t),defaultRemoteLaunch:et.select(e,t),profileDefaults:Object.values(r?.defaults??{}),profilesLoadStatus:r?.loadStatus??"idle"})}),qi=n.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),ve=n.createSelector(e=>dr({remoteMachinesVisible:te.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:re.select(e),cloud:Y(e)}));function br(e){const t=v(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const Sr=n.createSelector(e=>{const t=Q.select(e),r=lr({backendLabel:mr.select(e),backendPlatform:br(e),machines:re.select(e),cloud:Y(e),orchestrator:t});if(!_e.select(e))return r;if(!t)return oe(r,ce.select(e));const[s,...i]=r;return[s,...oe(i,ce.select(e))]}),ji=n.createSelector(e=>ve.select(e)?Sr.select(e):[]),$i=n.createSelector(e=>e.remoteMachines?.initialAgentPlacement===!0),zi=n.createSelector((e,t,r)=>ve.select(e)?ur(t,re.select(e),Ae(e,r)):m);function Ae(e,t){const r=Y(e);if(!r||!t)return r;const s=e.cloudMachines?.providers??{};return r.map(i=>{if(i.unavailableReason)return i;const o=ht(e,t,s[i.cloudMachineId]??null);return o?{...i,unavailableReason:o}:i})}const Ki=n.createSelector((e,t)=>Ae(e,t)),_r=K("WorkspaceValidation");async function Qi(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_repoPathRequired_error(),suggestion:a.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return vr(s)?kr(s):yr(s,t,r)}function vr(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function Ar(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const i of r){const o=t.match(i);if(o){const c=o[2].replace(/\.git$/,"");return c?{owner:o[1],repo:c}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const i=s[2].replace(/\.git$/,"");return i?{owner:s[1],repo:i}:null}return null}async function kr(e){return Ar(e)?{valid:!0,warning:a.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:a.workspace_validation_invalidGithubUrl_error(),suggestion:a.workspace_validation_invalidGithubUrl_suggestion()}}async function yr(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:a.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:a.workspace_validation_pathNotAbsolute_error(),suggestion:a.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await V("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const c=s.data;return c.exists?c.isDirectory?c.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c}:c.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c,warning:a.workspace_validation_insideParentRepo_warning({path:c.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:c}:t?c.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:a.workspace_repoSelector_notGitRepository_label(),directoryStatus:c}:{valid:!1,error:a.workspace_validation_notDirectory_error(),suggestion:a.workspace_validation_notDirectory_suggestion(),directoryStatus:c}:t?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExist_suggestion(),directoryStatus:c}}if(!(await V("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExistLegacy_suggestion()};const o=await V("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?a.workspace_repoSelector_notGitRepository_label():a.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:a.workspace_validation_nonGitInit_warning()}}catch(s){if(_r.warn("Could not validate path existence",s),!t)return{valid:!1,error:a.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Yi(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchPrefixInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:a.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:a.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:a.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Zi(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function Xi(e){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchNameInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:a.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:a.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchNameLock_error()}:{valid:!0}}function Ji(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:a.workspace_validation_promptTooLong_error(),suggestion:a.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function en(e){const t=e.toLowerCase();return t.includes("maxbuffer")?a.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?a.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?a.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?a.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?a.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?a.workspace_gitError_cloneAuth():a.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?a.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?a.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_readPermission():e:t.includes("permission denied")?a.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?a.workspace_gitError_notFound():t.includes("already exists")?a.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?a.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:a.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?a.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?a.workspace_gitError_diskSpace():e}const Er=["idle","exited"];function Mr(e){return e===void 0||!Er.includes(e)}function tn(e){return e.status==="restarting"?"restarting":Mr(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function wr(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const rn=n.createSelector(e=>e.voiceSettings.isLoading),sn=n.createSelector(e=>e.voiceSettings.available),nn=n.createSelector(e=>e.voiceSettings.provider),an=n.createSelector(e=>e.voiceSettings.engine),on=n.createSelector(e=>e.voiceSettings.osEngineAvailable),cn=n.createSelector(e=>e.voiceSettings.keyConfigured),ln=n.createSelector(e=>e.voiceSettings.vocabulary),dn=n.createSelector(e=>e.voiceSettings.openaiModel),un=n.createSelector(e=>e.voiceSettings.language),pn=n.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),fn=n.createSelector(e=>e.voiceSettings.inputDeviceId),gn=n.createSelector(e=>e.voiceSettings.inputDevices),hn=n.createSelector(e=>e.voiceSettings.busyProvider),mn=n.createSelector(e=>e.voiceSettings.error),bn=n.createSelector(e=>st.select(e)?"unavailable":wr(e.voiceSettings)),$="intent.voice.inputDevice";let z;function Rr(){if(z!==void 0)return z;try{const e=localStorage.getItem($);return typeof e=="string"&&e!==""?e:null}catch{return null}}function Sn(e){z=e;try{e===null?localStorage.removeItem($):localStorage.setItem($,e)}catch{}}let L=null;function _n(e){L=e}function vn(){const e=L;return L=null,e}function Cr(){L=null}const Pr=300,Ir=300;class Tr{constructor(t){d(this,"holdThresholdMs");d(this,"doublePressWindowMs");d(this,"onRecordStart");d(this,"onRecordStop");d(this,"currentState","idle");d(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??Pr,this.doublePressWindowMs=t.doublePressWindowMs??Ir,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let D=null;function An(e){D=e}function kn(){const e=D;return D=null,e}function Or(){D=null}const Fr=12e4,Lr=["audio/webm;codecs=opus","audio/webm"];function yn(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function Dr(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function xr(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Lr.find(e=>MediaRecorder.isTypeSupported(e))}class Nr{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"currentState","idle");d(this,"recorder",null);d(this,"stream",null);d(this,"chunks",[]);d(this,"startedAt",0);d(this,"maxTimer",null);d(this,"discardRequested",!1);d(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??Fr,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(Dr(this.deviceId))}catch(i){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(i),o?"discarded":"error"}if(this.discardRequested){for(const i of t.getTracks())i.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=xr(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=i=>{i.data&&i.data.size>0&&this.chunks.push(i.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=i=>this.handleRecorderError(i),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,i=this.cancelRequested;this.teardown(),!i&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Wr=300;function Br(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const Vr={stopReason:"manual",autoSend:!1};let h=null,_=null,y=0,P=null;const W=new Tr({onRecordStart:()=>{P&&Gr(P)},onRecordStop:e=>{ke(P,e)}});function En(){return h!==null}function Mn(){return h}function wn(e){P=e,y+=1,y===1&&W.keyDown()}function Rn(e){P=e,y!==0&&(y-=1,y===0&&W.keyUp())}function Gr(e){if(h!==null)return;Or(),Cr();const t=new Nr({deviceId:Rr(),onFinished:r=>{h===t&&(h=null);const s=_??{stopReason:"auto-stop",autoSend:!1},i=_!==null;if(_=null,e.dispatch(O()),i||W.reset(),r.durationMs<Wr){s.autoSend&&e.dispatch(q());return}e.dispatch(je({...r,stopReason:s.stopReason,autoSend:s.autoSend}))},onError:r=>{h===t&&(h=null),_=null,e.dispatch(O()),e.showHint(Br(r)?a.hardwareConsole_ptt_micDenied_message():a.hardwareConsole_ptt_recordingFailed_message())}});h=t,e.dispatch($e()),t.start().then(r=>{if(r!=="recording"&&(h===t&&(h=null),r==="discarded")){const s=_?.autoSend===!0;_=null,e.dispatch(O()),s&&e.dispatch(q())}})}function ke(e,t){const r=h;if(r===null){t.autoSend&&e?.dispatch(q());return}_=t,r.stop()}function Cn(){ke(null,Vr)}function Pn(e){W.reset(),y=0,_=null;const t=h;t!==null&&(h=null,t.cancel(),e.dispatch(O()))}const Ur=K("HardwareConsoleVoiceSetupToast"),Hr="hardware-console-voice-setup";let H=null;function qr(){return H||(H=xe(()=>Promise.resolve().then(()=>Ot),void 0,import.meta.url).then(e=>e.notify)),H}function jr(){Tt("/settings?tab=connections#voice").catch(e=>{Ur.error("Failed to open voice settings from setup toast",e)})}function $r(){return{label:a.hardwareConsole_voice_openSettings_label(),onClick:()=>jr()}}function In(){qr().then(e=>{e.error(a.hardwareConsole_voice_noKey_error(),{id:Hr,action:$r()})})}const Tn=n.createSelector(e=>e.externalEditors.selectedAction),zr=n.createSelector(e=>e.externalEditors.editors),Kr=n.createSelector(e=>{const t=w(zr.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(c=>[c.id,c])),i=r.flatMap(c=>{const l=s.get(c);return l?[l]:[]}),o=new Set(r);return[...i,...t.filter(({id:c})=>!o.has(c))]}),On=n.createSelector(e=>e.externalEditors.editorOrder??[]),Fn=n.createSelector(e=>e.externalEditors.loading),Ln=n.createSelector(e=>e.externalEditors.lastFetched),Qr=n.createSelector(e=>e.externalEditors.hiddenEditorIds),Dn=n.createSelector((e,t)=>{if(!(t?it.select(e,t):nt.select(e)))return[];const s=Qr.select(e);return Kr.select(e).filter(i=>i.installed&&!s.includes(i.id))});function xn(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let Yr=0;function Zr(e,t){const r=++Yr;return n.dispatch(Ke(e,t,r)),r}function Nn(e,t,r){n.dispatch(ze(e,t,r))}async function ye(e,t,r,s){const i=crypto.randomUUID(),o=s?.source??"control";try{return(await n.dispatch(Qe({requestId:i,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:de.select(n.state)},{...s,intent:s?.intent??Zr(e,t)}))).status==="success"}finally{n.dispatch(Ye(i,o))}}async function Wn(e,t,r,s,i){return ye(e,t,{kind:"effort",effort:r,previous:s},i)}async function Bn(e,t,r,s,i){return ye(e,t,{kind:"reconcile",current:r??null,levels:s},i)}const Xr=n.createSelector((e,t)=>w(e.agentModel.mutations).filter(r=>r.consumerId===t)),Vn=n.createSelector((e,t)=>Xr.select(e,t).some(r=>r.status==="pending")),Gn=n.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],i=at.select(e,t),o=mt.select(e,t),c=e.daemonHealth.stats?.protocolVersion,l=bt(c),p=l?St(s?.model,null,o):s?.model;return{session:s,providerId:i,levels:o,legacy:l,identity:JSON.stringify([p,i]),connection:de.select(e),canWrite:!!s&&s.workspaceId===r&&!ot.select(e,r)}});function Jr(e,t,r=!1){return e!=="auggie"||t===!0||r}const Un=n.createSelector(e=>_t.select(e)?null:Z.select(e)),es=n.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),b=n.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),Hn=n.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),qn=n.createSelector((e,t)=>!!b.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===es.select(e)),Ee=n.createSelector((e,t)=>t?b.select(e,t)?.catalog.providers??[]:ct.select(e)),Me=n.createSelector((e,t)=>{if(!t)return ue.select(e);const r=b.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),se=n.createSelector((e,t)=>{if(!t)return vt.select(e);const r=b.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),we=n.createSelector((e,t)=>{if(!t)return At.select(e);const r=se.select(e,t),s=Me.select(e,t),i=b.select(e,t)?.readiness??{};return Ee.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&i[o.id]?.available).map(o=>o.id)}),jn=n.createSelector((e,t)=>{const r=se.select(e,t),s=t?b.select(e,t)?.readiness??{}:Z.select(e);return Ee.select(e,t).filter(i=>Jr(i.id,s[i.id]?.available,r[i.id]===!0)).map(i=>i.id)}),$n=n.createSelector((e,t)=>t?we.select(e,t):kt.select(e)),zn=n.createSelector((e,t)=>A.select(e,t)),Kn=n.createSelector((e,t)=>t?!!b.select(e,t):yt.select(e)),Qn=n.createSelector((e,t)=>{if(!t)return Et.select(e);const r=b.select(e,t)?.settings??[],s=Me.select(e,t),i=r.find(l=>l.path==="model.providerDefaults")?.value,o=i&&typeof i=="object"?i[s]:void 0;if(typeof o=="string")return o;const c=r.find(l=>l.path==="model.default")?.value;return typeof c=="string"?c:""}),Yn=n.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):Mt.select(e)),Zn=n.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):wt.select(e)),Xn=n.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):Rt.select(e)),Jn=n.createSelector((e,t,r)=>{if(!r)return Ct.select(e,t);const s=se.select(e,r),i=b.select(e,r);return we.select(e,r).filter(o=>o!==t&&(s[o]||i?.catalog.providers.find(c=>c.id===o)?.canBeDisabled===!1)&&Pt(o,i?.readiness[o]?.authenticated))}),ea=n.createSelector((e,t)=>t?b.select(e,t)?.readiness??{}:Z.select(e)),ts={},ta=n.createSelector(e=>e.providerSettings?.profiles?.status??ts),ra=n.createSelector(e=>e.directoryPicker.listing),sa=n.createSelector(e=>e.directoryPicker.loading),ia=n.createSelector(e=>e.directoryPicker.error),na=n.createSelector(e=>e.directoryPicker.pathError),aa=n.createSelector(e=>e.directoryPicker.createError),le={},rs=n.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),oa=n.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(i=>i.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),ca=n.createSelector(e=>e.mcpSettings.loading),la=n.createSelector(e=>e.mcpSettings.error),da=n.createSelector(e=>e.mcpSettings.mutationError??null),ua=n.createSelector(e=>e.mcpSettings.enabled),ss=n.createSelector(e=>e.mcpSettings.disabledServers),is=n.createSelector(e=>e.mcpSettings.statusMap),ns=n.createSelector(e=>e.mcpSettings.toolsMap),as=n.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(i=>[i.id,R(i)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(i=>{const o=s.get(i.serverId);return o&&i.lastError?[[o,i.lastError]]:[]}))}),os=n.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??le:le),pa=n.createSelector((e,t)=>Object.keys(os.select(e,t))),fa=n.createSelector(e=>{const t=rs.select(e),r=is.select(e),s=ns.select(e),i=ss.select(e),o=as.select(e);return t.map(c=>{const l=R(c)in i,p=s[R(c)]||[];let S=r[R(c)]||"disconnected";return l&&(S="disabled"),{...c,disabled:l,status:S,tools:p,toolCount:p.length,errorMessage:o[R(c)]}})});n.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const ga=n.createSelector(e=>e.mcpSettings.lastImportedCount),ha=n.createSelector(e=>e.mcpSettings.advancedSaveStatus),ma=n.createSelector(e=>e.mcpSettings.advancedSaveError);function g(e){return{category:"settings",...e}}const x=[{id:"new-workspace",tab:"",label:"New workspace",route:"/workspace/new",category:"navigation",description:"Create-workspace flow."},g({id:"utility-default-model",tab:"providers",hashAliases:["utility-default-model","default-model","quickActions.defaultModel","backgroundAgents.defaultModel"],scrollSelector:"#utility-default-model",highlightSelector:'[data-highlight-id="utility-default-model"]',label:"Settings: Default model",route:"/settings?tab=providers#utility-default-model",description:"Default AI behavior model selection."}),g({id:"global-instructions",tab:"agent-behavior",hashAliases:["global-instructions","agents","specialists","all-agents"],scrollSelector:"#global-instructions",highlightSelector:'[data-highlight-id="global-instructions"]',label:"Settings: Agent Behavior",route:"/settings?tab=agent-behavior#global-instructions",description:"Global agent instructions and defaults."}),g({id:"create-specialist",tab:"specialists",hashAliases:["create-specialist"],scrollSelector:"#create-specialist",highlightSelector:'[data-highlight-id="create-specialist"]',label:"Settings: Create specialist",route:"/settings?tab=specialists&view=create-specialist#create-specialist",description:"Create-specialist entry point."}),g({id:"providers",tab:"providers",hashAliases:["providers"],scrollSelector:"#providers",highlightSelector:'[data-highlight-id="providers"]',label:"Settings: AI coding CLIs",route:"/settings?tab=providers#providers",description:"Provider/account selector settings."}),g({id:"integrations",tab:"connections",hashAliases:["integrations"],scrollSelector:"#integrations",highlightSelector:'[data-highlight-id="integrations"]',label:"Settings: Connections",route:"/settings?tab=connections#integrations",description:"Connected integrations settings."}),g({id:"devices",tab:"devices",hashAliases:["devices","machines"],scrollSelector:"#devices",highlightSelector:"#devices",label:"Settings: Machines",route:"/settings?tab=devices#devices",description:"Saved remote machine settings."}),g({id:"mobile",tab:"mobile",hashAliases:["mobile"],scrollSelector:"#mobile",highlightSelector:'[data-highlight-id="mobile"]',label:"Settings: Mobile",route:"/settings?tab=mobile#mobile",description:"Remote access and Intent Mobile pairing."}),g({id:"guest-sessions",tab:"collaboration",hashAliases:["collaboration","guest-sessions","sharing"],scrollSelector:"#collaboration",highlightSelector:"#collaboration",label:"Settings: Collaboration",route:"/settings?tab=collaboration#collaboration",description:"Host membership, workspace guests and joined hosts."}),g({id:"websocket-api",tab:"mobile",hashAliases:["websocket-api","remote-access"],scrollSelector:"#websocket-api",highlightSelector:'[data-highlight-id="websocket-api"]',label:"Settings: Remote Access",route:"/settings?tab=mobile#websocket-api",description:"Remote access (WebSocket API) settings."}),...[["voice","Voice Dictation","Voice dictation settings.","input"],["keyboard-shortcuts","Keyboard Shortcuts","Keyboard shortcuts reference.","input"],["mcp-servers","MCP Servers","MCP server configuration.","connections"],["plugins","Plugins","App-wide Agent Plugins.","connections"],["git-workspace","Git & Workspace","Git and workspace defaults.","setup"],["git","Git","Git defaults.","setup"],["shell","Shell","Shell and CLI optimization settings.","setup"],["workspace","Workspace","Workspace defaults.","setup"],["cli-optimization","CLI Optimization","RTK/CLI optimization settings.","setup"],["workspace-api","Tool Output & Retention","Tool output size and retention settings.","advanced"],["notifications","Notifications","Notification preferences.","app-behavior"],["updates","Updates","Application update preferences.","app-behavior"],["open-in","Open In","External editor/app launch preferences.","app-behavior"],["github-link-action","GitHub Links","GitHub issue and pull request link behavior.","app-behavior"],["agent-features","Agent Features","Agent feature settings.","agent-behavior"],["font-style","Font style","Font style settings.","display"],["language","Language","Application language settings.","display"],["labs","Labs","Experimental feature switches.","advanced"],["agent-backend","Agent Backend","Agent backend settings.","advanced"],["connection","Connection","Daemon connection details.","advanced"],["hardware","Hardware","Hardware integration settings.","advanced"],["developer","Developer","Development-only settings.","advanced"]].map(([e,t,r,s])=>g({id:e,tab:s,hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=${s}#${e}`,description:r})),g({id:"appearance",tab:"display",hashAliases:["appearance","theme"],scrollSelector:"#theme",highlightSelector:'[data-highlight-id="appearance"]',label:"Settings: Appearance",route:"/settings?tab=display#theme",description:"Theme mode controls."}),...[["color-theme","Color theme","Color theme selection."],["note-font","Notes font","Notes/spec font style."],["agent-chat-font","Agent chat font","Agent chat font style."],["code-font","Code font","Code editor and diff font."]].map(([e,t,r])=>g({id:e,tab:"display",hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=display#${e}`,description:r})),g({id:"general",tab:"advanced",hashAliases:["general","reset"],scrollSelector:"#reset",highlightSelector:'[data-highlight-id="general"]',label:"Settings: Advanced",route:"/settings?tab=advanced#reset",description:"Advanced settings and reset controls."}),{id:"workspace-card",tab:"",hashAliases:["workspace-card"],highlightSelector:'[data-highlight-id^="workspace-"]',label:"Workspace card",category:"workspace",description:"A workspace card on workspace list surfaces.",dynamic:!0,idPattern:"workspace-{workspaceId}"},{id:"specialist-entry",tab:"specialists",highlightSelector:'[data-highlight-id^="specialist-"]',label:"Specialist entry",route:"/settings?tab=specialists&specialist={specialistId}#specialist-{specialistId}",category:"specialist",description:"A specific specialist row in settings.",dynamic:!0,idPattern:"specialist-{specialistId}"}];function Re(e){const t=e.indexOf("#"),r=t>=0?e.slice(t+1):e;return decodeURIComponent(r.replace(/^#/,"")).trim()}function cs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ls(e,t){if(!t.match(/\{[^}]+\}/g)?.length)return e===t;const s=t.split(/\{[^}]+\}/g).map(cs).join("[^/]+");return new RegExp(`^${s}$`).test(e)}function ds(e){const t=Re(e);if(!t)return;const r=x.find(i=>i.id===t||i.hashAliases?.includes(t));if(r)return r;const s=x.find(i=>i.route&&i.dynamic&&i.idPattern&&ls(t,i.idPattern));return s?{...s,id:t}:void 0}function ba(){return x.map(e=>({...e,hashAliases:e.hashAliases?[...e.hashAliases]:void 0}))}function us(e){try{return new URL(e,"app://intent").pathname||"/"}catch{const t=e.indexOf("?"),r=e.indexOf("#");let s=e.length;return t>=0&&(s=Math.min(s,t)),r>=0&&(s=Math.min(s,r)),e.slice(0,s)||"/"}}const ps=new Set(x.flatMap(e=>e.route?[us(e.route)]:[])),fs=[/^\/workspace\/[^/]+$/,/^\/agent\/[^/]+$/];function Sa(e){if(typeof e!="string")return!1;const t=e.trim();if(!t)return!1;if(t.startsWith("intent://"))return!0;let r,s;try{const i=new URL(t,"app://intent");if(i.protocol!=="app:")return!1;r=i.pathname||"/",s=Re(i.hash)}catch{return!1}return ps.has(r)?s?!!ds(s):!0:fs.some(i=>i.test(r))}const _a=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.secretRequests","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],gs=[{path:"agentFeatures.backgroundHooks",label:()=>a.settings_agentFeatures_backgroundHooks_label(),description:()=>a.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>a.settings_agentFeatures_hostExec_label(),description:()=>a.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.scripts",label:()=>a.settings_agentFeatures_scripts_label(),description:()=>a.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>a.settings_agentFeatures_terminalAccess_label(),description:()=>a.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>a.settings_agentFeatures_browserAutomation_label(),description:()=>a.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>a.settings_agentFeatures_desktopControl_label(),description:()=>a.settings_agentFeatures_desktopControl_description(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>a.settings_agentFeatures_richChatBlocks_label(),description:()=>a.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>a.settings_agentFeatures_structuredQuestions_label(),description:()=>a.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>a.settings_agentFeatures_secretRequests_label(),description:()=>a.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.attentionRequests",label:()=>a.settings_agentFeatures_attentionRequests_label(),description:()=>a.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>a.settings_agentFeatures_stateSnapshot_label(),description:()=>a.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>a.settings_agentFeatures_prMonitor_label(),description:()=>a.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>a.settings_agentFeatures_taskGraph_label(),description:()=>a.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>a.settings_agentFeatures_peerAgents_label(),description:()=>a.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>a.settings_agentFeatures_mcpTools_label(),description:()=>a.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],va=Object.fromEntries(gs.map(e=>[e.path,e.defaultValue]));export{sr as $,zs as A,wn as B,Rn as C,js as D,Ot as E,gs as F,pe as G,Fi as H,Mr as I,Jr as J,En as K,xn as L,ne as M,Sa as N,yn as O,Rr as P,yi as Q,Li as R,E as S,I as T,k as U,Zr as V,pr as W,vi as X,Ar as Y,ki as Z,_i as _,va as a,Ds as a$,Bn as a0,Nn as a1,Ri as a2,wr as a3,ds as a4,ur as a5,Zi as a6,Sn as a7,Vn as a8,Xr as a9,na as aA,On as aB,ci as aC,gi as aD,ni as aE,zi as aF,bn as aG,Gi as aH,ai as aI,oi as aJ,Qs as aK,Xs as aL,X as aM,Lt as aN,Vt as aO,Gt as aP,fe as aQ,Bt as aR,Dt as aS,Ft as aT,Nt as aU,Wt as aV,Ns as aW,Vs as aX,Gs as aY,Hs as aZ,Fs as a_,Gn as aa,Ks as ab,Js as ac,hr as ad,$n as ae,Me as af,se as ag,jn as ah,we as ai,Ee as aj,Zn as ak,Xn as al,Yn as am,Jn as an,ea as ao,Kn as ap,Qn as aq,zn as ar,mr as as,Zs as at,qi as au,ti as av,aa as aw,ia as ax,ra as ay,sa as az,_a as b,cn as b$,Bs as b0,xs as b1,Ws as b2,Ls as b3,Us as b4,Os as b5,qs as b6,ui as b7,Qr as b8,$i as b9,Ui as bA,Vi as bB,Bi as bC,re as bD,gr as bE,te as bF,Hi as bG,xi as bH,Un as bI,$t as bJ,mi as bK,bi as bL,fi as bM,hi as bN,ii as bO,pi as bP,A as bQ,ei as bR,Ki as bS,ji as bT,Sr as bU,ve as bV,Ys as bW,hn as bX,an as bY,fn as bZ,gn as b_,Kr as ba,Dn as bb,Fn as bc,li as bd,di as be,Ln as bf,Wi as bg,ce as bh,Ni as bi,_e as bj,ma as bk,ha as bl,ss as bm,ua as bn,la as bo,as as bp,ga as bq,ca as br,da as bs,rs as bt,fa as bu,is as bv,ns as bw,Tn as bx,si as by,ta as bz,m as c,un as c0,dn as c1,on as c2,nn as c3,sn as c4,mn as c5,rn as c6,ln as c7,pn as c8,b as c9,es as ca,qn as cb,Hn as cc,pa as cd,oa as ce,_n as cf,An as cg,In as ch,Ti as ci,J as cj,N as ck,Oi as cl,Gr as cm,Di as cn,Cn as co,Xi as cp,Yi as cq,Ji as cr,Qi as cs,$r as ct,Si as cu,Ii as d,wi as e,Ci as f,Pi as g,Ei as h,he as i,Mi as j,be as k,Wn as l,Pn as m,Cr as n,Or as o,vn as p,kn as q,ri as r,jt as s,qt as t,Ai as u,Mn as v,ba as w,en as x,tn as y,$s as z};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CkkCr6dG.js","/app/immutable/chunks/Bv2KudWv.js","/app/immutable/chunks/CEsW1euQ.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/Y9-4hTF9.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/BL2lJmRT.js","/app/immutable/chunks/cFbB-5Cu.js","/app/immutable/chunks/CrWhihJ_.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/q6hitSEG.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/BZQDFgmp.js","/app/immutable/chunks/DOH10_LL.js","/app/immutable/chunks/CIpI7Qrh.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/CPKMQWOs.js","/app/immutable/chunks/C6vwP-ay.js","/app/immutable/chunks/BLgIfeYS.js","/app/immutable/chunks/DU9Ky5os.js","/app/immutable/chunks/tU_ZJtMw.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CO4a0yRH.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/Mc93eSxl.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/MGrNDwzT.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/DLIkH-mx.js","/app/immutable/chunks/CpHzYkzi.js","/app/immutable/chunks/aQy6qVNs.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/D-l6NLYy.js","/app/immutable/chunks/ClH0Gega.js","/app/immutable/chunks/5GYSXevc.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CO4uYULP.js","/app/immutable/chunks/ChcJLcLm.js"])))=>i.map(i=>d[i]);
2
- import{bo as h,_ as x}from"./Y9-4hTF9.js";import{g as f,Iz as a,da as P,GX as S,yz as q,F7 as N,vc as R,qx as W,uM as H,KD as U}from"./tU_ZJtMw.js";import{d as I}from"./DLIkH-mx.js";import{E as D}from"./DOH10_LL.js";import{parseIntentLink as V}from"./Byq91_c-.js";import{k as y}from"./Bv2KudWv.js";import"./DYhIMPy1.js";import"./cFbB-5Cu.js";import"./CrWhihJ_.js";import"./ChTqQfQN.js";import"./DU9Ky5os.js";import{I as j,q as C,H as L}from"./ddhULx4L.js";import{dr as B}from"./ClH0Gega.js";import{p as M,o as z,h as K}from"./DZHzDies.js";const p="assistant-content",$=a.createSelector(t=>{const r=M.select(t),s=z.select(t),e=K.select(t).find(i=>i.agentId===s)??r.find(i=>i.isActive)??r.find(i=>i.messageCount>0)??r[0];return P(e?.agentId??null)}),O=new Map;function G(t,r=!1){const s=O.get(t)??{explicit:0,background:0},e={explicit:s.explicit+(r?0:1),background:s.background+(r?1:0)};return O.set(t,e),r?e:{explicit:e.explicit}}function m(t,r){const s=O.get(t);return s!==void 0&&r.explicit===s.explicit&&(r.background===void 0||r.background===s.background)}async function X(t){a.dispatch(R(t)),L.select(a.state,t).restoreStatus==="pending"&&await new Promise(r=>{const s=L.withStore(a)(t).subscribe(e=>{e.restoreStatus!=="pending"&&(r(),queueMicrotask(()=>s()))})})}function _(t,r,s){const e=L.select(a.state,s);if(!e.panels[p]||Object.keys(e.panels).some(i=>i!==p)){const i=e.panels[p],d=Object.values(e.panels).flatMap(n=>n.tabs.filter(o=>o.type!=="agent"||o.workspaceId!==f)),c=d.some(n=>n.id===i?.activeTabId)?i?.activeTabId??null:d.at(-1)?.id??null;a.dispatch(W(s,{root:{type:"panel",panelId:p},panels:{[p]:{id:p,tabs:d,activeTabId:c}},focusedPanelId:e.focusedPanelId===p?p:null,hiddenTabs:C.select(a.state,s)}))}a.dispatch(H(s,t,p,void 0,!0,void 0,!1,r.background||r.preserveFocus,void 0,r.background))}async function de(t,r={}){try{return await J(t,r)}catch(s){return y.error(h.ui_linkHandler_notFound_title(),{description:s instanceof Error?s.message:String(s)}),!0}}async function J(t,r){const s=/^intent:\/\/local\/([^/?#]+)\/agent\/([^/?#]+)$/.exec(t),e=t.startsWith("intent://")?V(t):null,i=e?.valid&&e.type==="workspace"?[t,e.resourceId]:/^\/workspace\/([^/?#]+)\/?$/.exec(t),d=/^https?:\/\//.test(t)&&!D(t);if(!i&&!s&&!d&&!(e?.valid&&["file","message","note","task"].includes(e.type))||i&&[f,"new"].includes(i[1]))return!1;const c=M.select(a.state),n=r.agentId?P(r.agentId):r.background?c.length===1?P(c[0].agentId):null:r.layoutId??$.select(a.state);if(!n)return!0;const o=G(n,r.background);if(await X(n),!m(n,o))return!0;if(i){const u=i[1],g=await I.workspaces.get(u);return m(n,o)?g?(a.dispatch(S(g)),_({type:"workspace",title:g.title,workspaceId:u,closable:!0},r,n),!0):(y.error(h.workspace_loader_notFound_title()),!0):!0}if(s)return T(s[1],s[2],r,n,o);if(d){const{resolveBrowserLinkForOpen:u}=await x(async()=>{const{resolveBrowserLinkForOpen:v}=await import("./CkkCr6dG.js").then(w=>w.b);return{resolveBrowserLinkForOpen:v}},__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]),import.meta.url),g=await u(t);return m(n,o)&&_({type:"browser",title:new URL(t).hostname,browserUrl:g.url,browserRequestedUrl:g.requestedUrl,workspaceId:f,closable:!0},r,n),!0}if(!e?.valid)return!1;const b=e.workspaceId??f;if(e.type==="file"){const u=await I.workspaces.get(b);return m(n,o)?u?(a.dispatch(S(u)),_({type:"file",title:e.resourceId.split("/").at(-1)??e.resourceId,filePath:e.resourceId,workspaceId:b,closable:!0,data:{line:e.line,filePathIsLiteral:!0}},r,n),!0):(y.error(h.workspace_loader_notFound_title()),!0):!0}if(e.type==="message"&&e.agentId)return T(b,e.agentId,r,n,o,e.resourceId);if(e.type!=="note"&&e.type!=="task")return!1;const l=e.workspaceId??f,[k,A]=await Promise.all([a.dispatch(q(l,e.resourceId)),Promise.resolve(B.select(a.state,l)??I.workspaces.get(l)).catch(()=>null)]);if(!m(n,o))return!0;if(!k||String(k.workspaceId)!==l)return y.error(h.ui_linkHandler_notFound_title(),{description:h.ui_linkHandler_noteNotFound_error({noteId:e.resourceId,workspaceId:l})}),!0;A&&String(A.id)===l&&a.dispatch(S(A));const E=Object.entries(j.select(a.state)).some(([u,g])=>{const v=w=>w.type==="note"&&w.noteId===String(k.id)&&(w.workspaceId??u)===l;return Object.values(g.panels).some(w=>w.tabs.some(v))||C.select(a.state,u).some(v)}),F=a.state.transientUi.byWorkspaceId[l]?.noteViewModeByNoteId[String(k.id)];return!E&&(!r.background||F===void 0)&&a.dispatch(N(l,String(k.id),"editor")),_({type:"note",title:k.title,noteId:String(k.id),workspaceId:l,closable:!0},r,n),!0}async function T(t,r,s,e,i,d){const c=await I.agents.get(r,t===f?void 0:t);t===f&&c&&(t=String(c.workspaceId));const n=t===f?null:await I.workspaces.get(t);if(!m(e,i))return!0;if(!n&&t!==f||!c||String(c.workspaceId)!==t)return y.error(h.ui_linkHandler_notFound_title()),!0;if(n&&a.dispatch(S(n)),a.dispatch(U(c)),_({type:"agent",title:c.name??r,agentId:r,workspaceId:t,closable:!0},s,e),d&&!s.background){const{openMessage:o}=await x(async()=>{const{openMessage:b}=await import("./MGrNDwzT.js");return{openMessage:b}},__vite__mapDeps([31,32,33,34,4,5,21,22,23,24,3,8,25,15,2,13,14,7,9,16,35,36,37,38,39,27,17,6,12,40,19,41,42,43]),import.meta.url);o({workspaceId:t,agentId:r,messageId:d,contentAlreadyOpen:!0})}return!0}export{p as ASSISTANT_CONTENT_PANEL_ID,$ as selectAssistantPanelLayoutId,de as showAssistantContent};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CkkCr6dG.js","/app/immutable/chunks/Bv2KudWv.js","/app/immutable/chunks/CEsW1euQ.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/Y9-4hTF9.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/BL2lJmRT.js","/app/immutable/chunks/cFbB-5Cu.js","/app/immutable/chunks/CrWhihJ_.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/q6hitSEG.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/BZQDFgmp.js","/app/immutable/chunks/DOH10_LL.js","/app/immutable/chunks/CIpI7Qrh.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/CPKMQWOs.js","/app/immutable/chunks/C6vwP-ay.js","/app/immutable/chunks/BLgIfeYS.js","/app/immutable/chunks/DU9Ky5os.js","/app/immutable/chunks/tU_ZJtMw.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CO4a0yRH.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/Mc93eSxl.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/CyIRNhfo.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/DLIkH-mx.js","/app/immutable/chunks/CpHzYkzi.js","/app/immutable/chunks/aQy6qVNs.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/D-l6NLYy.js","/app/immutable/chunks/ClH0Gega.js","/app/immutable/chunks/5GYSXevc.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/DYR-Lw2g.js","/app/immutable/chunks/B_zHVi1K.js"])))=>i.map(i=>d[i]);
2
+ import{bo as h,_ as x}from"./Y9-4hTF9.js";import{g as f,Iz as a,da as P,GX as S,yz as q,F7 as N,vc as R,qx as W,uM as H,KD as U}from"./tU_ZJtMw.js";import{d as I}from"./DLIkH-mx.js";import{E as D}from"./DOH10_LL.js";import{parseIntentLink as V}from"./BFM5w46H.js";import{k as y}from"./Bv2KudWv.js";import"./DYhIMPy1.js";import"./cFbB-5Cu.js";import"./CrWhihJ_.js";import"./ChTqQfQN.js";import"./DU9Ky5os.js";import{I as j,q as C,H as L}from"./ddhULx4L.js";import{dr as B}from"./ClH0Gega.js";import{p as M,o as z,h as K}from"./DZHzDies.js";const p="assistant-content",$=a.createSelector(t=>{const r=M.select(t),s=z.select(t),e=K.select(t).find(i=>i.agentId===s)??r.find(i=>i.isActive)??r.find(i=>i.messageCount>0)??r[0];return P(e?.agentId??null)}),O=new Map;function G(t,r=!1){const s=O.get(t)??{explicit:0,background:0},e={explicit:s.explicit+(r?0:1),background:s.background+(r?1:0)};return O.set(t,e),r?e:{explicit:e.explicit}}function m(t,r){const s=O.get(t);return s!==void 0&&r.explicit===s.explicit&&(r.background===void 0||r.background===s.background)}async function X(t){a.dispatch(R(t)),L.select(a.state,t).restoreStatus==="pending"&&await new Promise(r=>{const s=L.withStore(a)(t).subscribe(e=>{e.restoreStatus!=="pending"&&(r(),queueMicrotask(()=>s()))})})}function _(t,r,s){const e=L.select(a.state,s);if(!e.panels[p]||Object.keys(e.panels).some(i=>i!==p)){const i=e.panels[p],d=Object.values(e.panels).flatMap(n=>n.tabs.filter(o=>o.type!=="agent"||o.workspaceId!==f)),c=d.some(n=>n.id===i?.activeTabId)?i?.activeTabId??null:d.at(-1)?.id??null;a.dispatch(W(s,{root:{type:"panel",panelId:p},panels:{[p]:{id:p,tabs:d,activeTabId:c}},focusedPanelId:e.focusedPanelId===p?p:null,hiddenTabs:C.select(a.state,s)}))}a.dispatch(H(s,t,p,void 0,!0,void 0,!1,r.background||r.preserveFocus,void 0,r.background))}async function de(t,r={}){try{return await J(t,r)}catch(s){return y.error(h.ui_linkHandler_notFound_title(),{description:s instanceof Error?s.message:String(s)}),!0}}async function J(t,r){const s=/^intent:\/\/local\/([^/?#]+)\/agent\/([^/?#]+)$/.exec(t),e=t.startsWith("intent://")?V(t):null,i=e?.valid&&e.type==="workspace"?[t,e.resourceId]:/^\/workspace\/([^/?#]+)\/?$/.exec(t),d=/^https?:\/\//.test(t)&&!D(t);if(!i&&!s&&!d&&!(e?.valid&&["file","message","note","task"].includes(e.type))||i&&[f,"new"].includes(i[1]))return!1;const c=M.select(a.state),n=r.agentId?P(r.agentId):r.background?c.length===1?P(c[0].agentId):null:r.layoutId??$.select(a.state);if(!n)return!0;const o=G(n,r.background);if(await X(n),!m(n,o))return!0;if(i){const u=i[1],g=await I.workspaces.get(u);return m(n,o)?g?(a.dispatch(S(g)),_({type:"workspace",title:g.title,workspaceId:u,closable:!0},r,n),!0):(y.error(h.workspace_loader_notFound_title()),!0):!0}if(s)return T(s[1],s[2],r,n,o);if(d){const{resolveBrowserLinkForOpen:u}=await x(async()=>{const{resolveBrowserLinkForOpen:v}=await import("./CkkCr6dG.js").then(w=>w.b);return{resolveBrowserLinkForOpen:v}},__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]),import.meta.url),g=await u(t);return m(n,o)&&_({type:"browser",title:new URL(t).hostname,browserUrl:g.url,browserRequestedUrl:g.requestedUrl,workspaceId:f,closable:!0},r,n),!0}if(!e?.valid)return!1;const b=e.workspaceId??f;if(e.type==="file"){const u=await I.workspaces.get(b);return m(n,o)?u?(a.dispatch(S(u)),_({type:"file",title:e.resourceId.split("/").at(-1)??e.resourceId,filePath:e.resourceId,workspaceId:b,closable:!0,data:{line:e.line,filePathIsLiteral:!0}},r,n),!0):(y.error(h.workspace_loader_notFound_title()),!0):!0}if(e.type==="message"&&e.agentId)return T(b,e.agentId,r,n,o,e.resourceId);if(e.type!=="note"&&e.type!=="task")return!1;const l=e.workspaceId??f,[k,A]=await Promise.all([a.dispatch(q(l,e.resourceId)),Promise.resolve(B.select(a.state,l)??I.workspaces.get(l)).catch(()=>null)]);if(!m(n,o))return!0;if(!k||String(k.workspaceId)!==l)return y.error(h.ui_linkHandler_notFound_title(),{description:h.ui_linkHandler_noteNotFound_error({noteId:e.resourceId,workspaceId:l})}),!0;A&&String(A.id)===l&&a.dispatch(S(A));const E=Object.entries(j.select(a.state)).some(([u,g])=>{const v=w=>w.type==="note"&&w.noteId===String(k.id)&&(w.workspaceId??u)===l;return Object.values(g.panels).some(w=>w.tabs.some(v))||C.select(a.state,u).some(v)}),F=a.state.transientUi.byWorkspaceId[l]?.noteViewModeByNoteId[String(k.id)];return!E&&(!r.background||F===void 0)&&a.dispatch(N(l,String(k.id),"editor")),_({type:"note",title:k.title,noteId:String(k.id),workspaceId:l,closable:!0},r,n),!0}async function T(t,r,s,e,i,d){const c=await I.agents.get(r,t===f?void 0:t);t===f&&c&&(t=String(c.workspaceId));const n=t===f?null:await I.workspaces.get(t);if(!m(e,i))return!0;if(!n&&t!==f||!c||String(c.workspaceId)!==t)return y.error(h.ui_linkHandler_notFound_title()),!0;if(n&&a.dispatch(S(n)),a.dispatch(U(c)),_({type:"agent",title:c.name??r,agentId:r,workspaceId:t,closable:!0},s,e),d&&!s.background){const{openMessage:o}=await x(async()=>{const{openMessage:b}=await import("./CyIRNhfo.js");return{openMessage:b}},__vite__mapDeps([31,32,33,34,4,5,21,22,23,24,3,8,25,15,2,13,14,7,9,16,35,36,37,38,39,27,17,6,12,40,19,41,42,43]),import.meta.url);o({workspaceId:t,agentId:r,messageId:d,contentAlreadyOpen:!0})}return!0}export{p as ASSISTANT_CONTENT_PANEL_ID,$ as selectAssistantPanelLayoutId,de as showAssistantContent};
@@ -1,4 +1,4 @@
1
- import{g as k1}from"./B8suWc52.js";import{g as E1}from"./Boxybwc5.js";import{s as C1}from"./DWpvI-rO.js";import{b as k,a$ as t1,ay as oe,X as Ce,a1 as S1,aP as x1,bh as Gt,a_ as T1,aZ as D1,b0 as _1,V as v1,U as F1,Y as V1,z as I1,ax as s1,J as i1,as as L1,$ as Rt,aW as Ot,r as B1,N as M1,am as y1,aU as w1,ab as N1,x as R1,aT as O1,p as P1}from"./BsiP9jat.js";import{c as G1}from"./CZHXOPAK.js";import{aP as U1}from"./Pmmb3VR-.js";var tt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},j1=new Set([tt.SHAPE_UNSUPPORTED,tt.SHAPE_REMOVED,tt.CONTAINMENT_VIOLATION]);new Set(Object.values(tt).filter(s=>!j1.has(s)));var z1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["lean_right","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),W1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),K1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),$e="roundedRect";function et(s){return s&&(z1.get(s)??s)}k(et,"resolveShapeAlias");function r1(s,i){for(const n of s)if(!n.isGroup){if((!n.shape||n.shape==="squareRect"||n.shape==="rect")&&(n.shape=$e),W1.has(n.shape)){const r=`shape "${n.shape}" was removed in v0.8.1, using "${$e}"`;i?.emitError?i.emitError("SHAPE_REMOVED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e;continue}if(!K1.has(n.shape)){const r=`shape "${n.shape}" is not supported, using "${$e}"`;i?.emitWarning?i.emitWarning("SHAPE_UNSUPPORTED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e}}}k(r1,"normaliseNodeShapes");var Lt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),a1=Lt.size,o1=k(s=>`af-kind-${s}`,"kindClass"),H1=[...Lt.keys()],u1=k(s=>Math.max(1,s-a1),"containerSlotCount"),l1=k((s,i)=>{const n=a1+s%u1(i);return i>0?n%i:n},"containerSlot");function c1(s,i,n){const r=Ce().themeVariables?.borderColorArray,u=Array.isArray(r)?r.length:0;let l=n.size;for(const c of s??[]){if(c.isGroup||c.shape==="collapsedGroup"){const h=n.get(String(c.id))??l++;c.colorIndex=l1(h,u);continue}const a=i(String(c.id));a&&Lt.has(a)&&(c.cssClasses=`${c.cssClasses??""} ${o1(a)}`.replace(/\s+/g," ").trim())}}k(c1,"assignColorSlots");var n1="agentflow-",Pt=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),Y1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),q1={flow:"flowGroup"};function It(s){if(Array.isArray(s))return s.map(n=>It(n));if(s===null||typeof s!="object")return s;const i={};for(const n of Object.keys(s))n==="__proto__"||n==="constructor"||n==="prototype"||(i[n]=It(s[n]));return i}k(It,"stripPrototypeKeys");function d1(s){let i=!1,n=!1,r=0,u;const l=[];for(const c of s.split(`
1
+ import{g as k1}from"./BZXx4oAF.js";import{g as E1}from"./CQGCQvNO.js";import{s as C1}from"./BkihpvKL.js";import{b as k,a$ as t1,ay as oe,X as Ce,a1 as S1,aP as x1,bh as Gt,a_ as T1,aZ as D1,b0 as _1,V as v1,U as F1,Y as V1,z as I1,ax as s1,J as i1,as as L1,$ as Rt,aW as Ot,r as B1,N as M1,am as y1,aU as w1,ab as N1,x as R1,aT as O1,p as P1}from"./BlT4teVV.js";import{c as G1}from"./CQdlmcpA.js";import{aP as U1}from"./Cj2RYqvI.js";var tt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},j1=new Set([tt.SHAPE_UNSUPPORTED,tt.SHAPE_REMOVED,tt.CONTAINMENT_VIOLATION]);new Set(Object.values(tt).filter(s=>!j1.has(s)));var z1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["lean_right","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),W1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),K1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),$e="roundedRect";function et(s){return s&&(z1.get(s)??s)}k(et,"resolveShapeAlias");function r1(s,i){for(const n of s)if(!n.isGroup){if((!n.shape||n.shape==="squareRect"||n.shape==="rect")&&(n.shape=$e),W1.has(n.shape)){const r=`shape "${n.shape}" was removed in v0.8.1, using "${$e}"`;i?.emitError?i.emitError("SHAPE_REMOVED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e;continue}if(!K1.has(n.shape)){const r=`shape "${n.shape}" is not supported, using "${$e}"`;i?.emitWarning?i.emitWarning("SHAPE_UNSUPPORTED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e}}}k(r1,"normaliseNodeShapes");var Lt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),a1=Lt.size,o1=k(s=>`af-kind-${s}`,"kindClass"),H1=[...Lt.keys()],u1=k(s=>Math.max(1,s-a1),"containerSlotCount"),l1=k((s,i)=>{const n=a1+s%u1(i);return i>0?n%i:n},"containerSlot");function c1(s,i,n){const r=Ce().themeVariables?.borderColorArray,u=Array.isArray(r)?r.length:0;let l=n.size;for(const c of s??[]){if(c.isGroup||c.shape==="collapsedGroup"){const h=n.get(String(c.id))??l++;c.colorIndex=l1(h,u);continue}const a=i(String(c.id));a&&Lt.has(a)&&(c.cssClasses=`${c.cssClasses??""} ${o1(a)}`.replace(/\s+/g," ").trim())}}k(c1,"assignColorSlots");var n1="agentflow-",Pt=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),Y1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),q1={flow:"flowGroup"};function It(s){if(Array.isArray(s))return s.map(n=>It(n));if(s===null||typeof s!="object")return s;const i={};for(const n of Object.keys(s))n==="__proto__"||n==="constructor"||n==="prototype"||(i[n]=It(s[n]));return i}k(It,"stripPrototypeKeys");function d1(s){let i=!1,n=!1,r=0,u;const l=[];for(const c of s.split(`
2
2
  `)){if(u!==void 0){const p=c.length-c.trimStart().length;if(c.trim()===""||p>u){l.push(c);continue}u=void 0}let a=-1;for(let p=0;p<c.length;p++){const A=c[p];if(n)A==="\\"?p++:A==='"'&&(n=!1);else if(i)A==="'"&&(i=!1);else if(A==='"')n=!0;else if(A==="'")i=!0;else if(A==="#"&&(p===0||c[p-1]===" "||c[p-1]===" ")){a=p;break}else A==="["||A==="{"?r++:(A==="]"||A==="}")&&(r=Math.max(0,r-1))}if(i||n||r>0){l.push(c);continue}const h=a>=0?c.slice(0,a):c,g=a>=0?c.slice(a):"";if(/:\s*[>|][\d+-]*\s*$/.test(h)){u=c.length-c.trimStart().length,l.push(c);continue}l.push(h.replace(/,([\t ]*)$/,"$1")+g)}return l.join(`
3
3
  `)}k(d1,"stripLineTrailingCommas");var Ze,X1=(Ze=class{constructor(){this.vertexCounter=0,this.config=Ce(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=T1,this.setAccDescription=D1,this.setDiagramTitle=_1,this.getAccTitle=v1,this.getAccDescription=F1,this.getDiagramTitle=V1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return I1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,r,u,l,c,a={},h,g){if(!i||i.trim().length===0)return;let p;if(h!==void 0){let m;h.includes(`
4
4
  `)?m=h+`