@intent-hq/web 2.341.1 → 2.341.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{BWJDe8j7.js → 2T1-hN6X.js} +1 -1
- package/web/app/immutable/chunks/{BIPzkS2w.js → 54JK2dhu.js} +1 -1
- package/web/app/immutable/chunks/{lttzdtAd.js → 76adCxuK.js} +1 -1
- package/web/app/immutable/chunks/{Bjar6XLk.js → B-hHJECm.js} +1 -1
- package/web/app/immutable/chunks/{6zbXr_io.js → B-tsz9_7.js} +1 -1
- package/web/app/immutable/chunks/{r6BQ8kUW.js → B25ZGiq_.js} +1 -1
- package/web/app/immutable/chunks/{MfgLK08j.js → B2xn6k89.js} +1 -1
- package/web/app/immutable/chunks/{BkYxjZBQ.js → B47VX2Iz.js} +1 -1
- package/web/app/immutable/chunks/{DBQ6sG-N.js → B9iMH0o9.js} +1 -1
- package/web/app/immutable/chunks/{DD7CIwZr.js → BBY8ZkRW.js} +1 -1
- package/web/app/immutable/chunks/{DiYuqE5C.js → BCcHqi29.js} +3 -3
- package/web/app/immutable/chunks/{EfHzTgiE.js → BCjE6qea.js} +1 -1
- package/web/app/immutable/chunks/{bnlzpH0C.js → BCrxos2w.js} +1 -1
- package/web/app/immutable/chunks/{CSvoOaiI.js → BHBZ-FuT.js} +1 -1
- package/web/app/immutable/chunks/{T5dXiqec.js → BMlXfa1V.js} +1 -1
- package/web/app/immutable/chunks/{Fvq5uW61.js → BQxXUVuI.js} +1 -1
- package/web/app/immutable/chunks/{OuBvt1Dn.js → BRxxsIiu.js} +1 -1
- package/web/app/immutable/chunks/{7_ObPjVE.js → BSkLIrxe.js} +1 -1
- package/web/app/immutable/chunks/{CqlFtspL.js → BXYZt_z7.js} +1 -1
- package/web/app/immutable/chunks/{Deqxq6ha.js → B_l8hqmB.js} +1 -1
- package/web/app/immutable/chunks/{C2E3PLRc.js → B_qM2KXq.js} +1 -1
- package/web/app/immutable/chunks/{xCO9YQv5.js → Ba30yw2z.js} +1 -1
- package/web/app/immutable/chunks/{CGy2WPjn.js → BbjrS_gZ.js} +2 -2
- package/web/app/immutable/chunks/{CR6ZEzLI.js → BcFi6_4b.js} +1 -1
- package/web/app/immutable/chunks/{5yPZRZCV.js → Be14EhuN.js} +2 -2
- package/web/app/immutable/chunks/{BGhDRH6N.js → BeGaLSif.js} +1 -1
- package/web/app/immutable/chunks/{D9MlL8EE.js → Bm8ue3vD.js} +1 -1
- package/web/app/immutable/chunks/{CJER3CRY.js → BmrtciWO.js} +4 -4
- package/web/app/immutable/chunks/{CgEYFTw0.js → BnMslkdQ.js} +1 -1
- package/web/app/immutable/chunks/{LMfwm5GA.js → BsKnk4mK.js} +1 -1
- package/web/app/immutable/chunks/{BREnKX07.js → BurWh7sU.js} +1 -1
- package/web/app/immutable/chunks/{B5NUCtAB.js → BwH7MvyM.js} +1 -1
- package/web/app/immutable/chunks/{D7N7IHMl.js → Byu0LAJ9.js} +1 -1
- package/web/app/immutable/chunks/{CNaYNOfE.js → C0RyaDkI.js} +4 -4
- package/web/app/immutable/chunks/{lI90GCpH.js → C2g2bI5I.js} +1 -1
- package/web/app/immutable/chunks/{DAbJJ8Qj.js → C4b5bStH.js} +1 -1
- package/web/app/immutable/chunks/{dV6zU05r.js → C51fkH3h.js} +1 -1
- package/web/app/immutable/chunks/{uowR4Emm.js → C5Adi8IR.js} +2 -2
- package/web/app/immutable/chunks/{B8IG1OPH.js → CAz7XTKT.js} +1 -1
- package/web/app/immutable/chunks/{CdRr34Ch.js → CCaL_IJk.js} +1 -1
- package/web/app/immutable/chunks/{Dci3uR78.js → CDiEfEmo.js} +4 -4
- package/web/app/immutable/chunks/{B5MLgCrX.js → CEHZunWB.js} +1 -1
- package/web/app/immutable/chunks/{CccM2Igh.js → CFWmH1IG.js} +2 -2
- package/web/app/immutable/chunks/{DvcprnFO.js → CFbBmrwX.js} +1 -1
- package/web/app/immutable/chunks/{CW_delv_.js → CFxIvfBO.js} +1 -1
- package/web/app/immutable/chunks/{BXCSmyo3.js → CIMn79Wy.js} +1 -1
- package/web/app/immutable/chunks/{DeLswjKZ.js → CIftGvP3.js} +1 -1
- package/web/app/immutable/chunks/{DMoEVjOP.js → CJeE1pqF.js} +1 -1
- package/web/app/immutable/chunks/{K_GlKbLA.js → CNLEkESE.js} +1 -1
- package/web/app/immutable/chunks/{8NIig13l.js → CNt46_Sl.js} +4 -4
- package/web/app/immutable/chunks/{C8jV_1kH.js → CQV_RN2j.js} +1 -1
- package/web/app/immutable/chunks/{DHuOtKKG.js → CQZewidW.js} +1 -1
- package/web/app/immutable/chunks/{YEOg1jH9.js → CQqORW76.js} +1 -1
- package/web/app/immutable/chunks/{C0I9IFl7.js → CXC1Kqgk.js} +1 -1
- package/web/app/immutable/chunks/{BE3wyntg.js → CaGPXrgT.js} +1 -1
- package/web/app/immutable/chunks/{F0n5o6xT.js → CaMTqbZT.js} +1 -1
- package/web/app/immutable/chunks/{DXfvYvEU.js → CdP89xtd.js} +3 -3
- package/web/app/immutable/chunks/{iLL2N6eh.js → CjKSn5xs.js} +1 -1
- package/web/app/immutable/chunks/{BLu2Qjcz.js → CksGbYpD.js} +1 -1
- package/web/app/immutable/chunks/{DBOfY2BB.js → CmNcEfpC.js} +1 -1
- package/web/app/immutable/chunks/{usONbtdT.js → CpdAcB0D.js} +1 -1
- package/web/app/immutable/chunks/{CN5NPyij.js → CqIbZaud.js} +12 -12
- package/web/app/immutable/chunks/{v_6l3PxL.js → CsB5fvC6.js} +1 -1
- package/web/app/immutable/chunks/{CU_igNrp.js → CsC_AG5b.js} +1 -1
- package/web/app/immutable/chunks/{DMUjpYuS.js → CvF0K_Ij.js} +2 -2
- package/web/app/immutable/chunks/{BVpTbT83.js → D-uXrjxi.js} +1 -1
- package/web/app/immutable/chunks/{BLm6M8a7.js → D19pVBSM.js} +1 -1
- package/web/app/immutable/chunks/{jbubRayo.js → D5smEMy9.js} +1 -1
- package/web/app/immutable/chunks/{CSHEsMmc.js → D6G81XFr.js} +1 -1
- package/web/app/immutable/chunks/{CD2HYrCH.js → D6Mh_gko.js} +2 -2
- package/web/app/immutable/chunks/{DfkAksH6.js → D6zRpkz7.js} +1 -1
- package/web/app/immutable/chunks/{RqvE5pv9.js → D89PDrKh.js} +1 -1
- package/web/app/immutable/chunks/{Byde94fq.js → D8rhNp1j.js} +1 -1
- package/web/app/immutable/chunks/{CJE64TCE.js → DE54-T81.js} +1 -1
- package/web/app/immutable/chunks/{BG9XZ9or.js → DEDP3IGZ.js} +1 -1
- package/web/app/immutable/chunks/{CLgmUgBt.js → DF4C0Dva.js} +1 -1
- package/web/app/immutable/chunks/{CUME4y3G.js → DH8Uc9s3.js} +1 -1
- package/web/app/immutable/chunks/{B9e3ZGxo.js → DJifjb7s.js} +1 -1
- package/web/app/immutable/chunks/{CNMeJ__-.js → DLBfhzR4.js} +1 -1
- package/web/app/immutable/chunks/{C3vxynMw.js → DLuy_DUP.js} +3 -3
- package/web/app/immutable/chunks/{qRPKZipv.js → DMXRduRh.js} +2 -2
- package/web/app/immutable/chunks/{CLjbCWr-.js → DMjUT-kd.js} +1 -1
- package/web/app/immutable/chunks/{CErUs68q.js → DO9IuOvj.js} +1 -1
- package/web/app/immutable/chunks/{DsudoUwx.js → DQtBgy-t.js} +1 -1
- package/web/app/immutable/chunks/{DJz5fNHR.js → DSHD3GC1.js} +1 -1
- package/web/app/immutable/chunks/{BPpJ5XOM.js → DUPPDYfv.js} +1 -1
- package/web/app/immutable/chunks/{DFq5nrYO.js → DXDxXMKV.js} +1 -1
- package/web/app/immutable/chunks/{BaF_QH3L.js → DZqwrxF-.js} +1 -1
- package/web/app/immutable/chunks/{lo23QH6G.js → D_DOc2Os.js} +3 -3
- package/web/app/immutable/chunks/{yB960NCO.js → DcZV24g_.js} +1 -1
- package/web/app/immutable/chunks/{DtePJIwh.js → De8Fjgdl.js} +1 -1
- package/web/app/immutable/chunks/{BymNHpPR.js → DiKsWs5V.js} +1 -1
- package/web/app/immutable/chunks/{LY8itt27.js → DkAKkRDD.js} +1 -1
- package/web/app/immutable/chunks/{DC8-G6L8.js → DmM51QPi.js} +1 -1
- package/web/app/immutable/chunks/{ClbTB6Xj.js → Dodo2pdu.js} +1 -1
- package/web/app/immutable/chunks/{DzptM7_X.js → Doe50cOo.js} +1 -1
- package/web/app/immutable/chunks/{Cz81LY0L.js → DwoQ7vO-.js} +1 -1
- package/web/app/immutable/chunks/{DDBIVnjY.js → DyFh_EM3.js} +2 -2
- package/web/app/immutable/chunks/{BLnYhmvu.js → EyMXQJpg.js} +1 -1
- package/web/app/immutable/chunks/{CQnMf1_x.js → GCzoJnmz.js} +1 -1
- package/web/app/immutable/chunks/{PxK7Tpi1.js → ICUZD0Gc.js} +1 -1
- package/web/app/immutable/chunks/{CWIKgED9.js → J5SvV2uT.js} +1 -1
- package/web/app/immutable/chunks/{D25Siso6.js → LGHhTW5P.js} +1 -1
- package/web/app/immutable/chunks/{D_80WZ_T.js → NLEcMOSe.js} +1 -1
- package/web/app/immutable/chunks/{BvqQKgIh.js → NVLznFEf.js} +1 -1
- package/web/app/immutable/chunks/{Cm09y9xR.js → O8dU7rmr.js} +1 -1
- package/web/app/immutable/chunks/{BkOZFMFh.js → OIWVe_6Z.js} +1 -1
- package/web/app/immutable/chunks/{BVWMj_DH.js → OyVkiUcF.js} +1 -1
- package/web/app/immutable/chunks/{CzTA_X57.js → RrLZdzQw.js} +1 -1
- package/web/app/immutable/chunks/{DS9x31Ck.js → Wz8IKtd9.js} +1 -1
- package/web/app/immutable/chunks/{CqO_vGSb.js → XLkjpXJr.js} +1 -1
- package/web/app/immutable/chunks/{C33ol_Co.js → XyeZJ2nm.js} +1 -1
- package/web/app/immutable/chunks/{CPYAlnby.js → Y2e8rmSY.js} +1 -1
- package/web/app/immutable/chunks/{CblXzMHl.js → b_q_dt23.js} +1 -1
- package/web/app/immutable/chunks/{eLTYtu4L.js → f9JL4iHQ.js} +3 -3
- package/web/app/immutable/chunks/{DXZHhaz3.js → gsh3yl_n.js} +1 -1
- package/web/app/immutable/chunks/{OUEUfGbN.js → huniSIS2.js} +2 -2
- package/web/app/immutable/chunks/{96Ve7GDU.js → kqlckYxf.js} +1 -1
- package/web/app/immutable/chunks/{sl7qUXdR.js → lpr2a93v.js} +1 -1
- package/web/app/immutable/chunks/{kFQYnC_s.js → ojLoa0iy.js} +1 -1
- package/web/app/immutable/chunks/{YRHmTfBP.js → r0TRQO14.js} +1 -1
- package/web/app/immutable/chunks/{1BA0jf6v.js → rq5Cam6x.js} +1 -1
- package/web/app/immutable/chunks/{BhdaCqy0.js → vL5AniQ9.js} +1 -1
- package/web/app/immutable/entry/{app.Bw3-3P2q.js → app.B9Q-1x3Z.js} +2 -2
- package/web/app/immutable/entry/start.DVV9vWYa.js +1 -0
- package/web/app/immutable/nodes/{0.CmLft-QF.js → 0.Bs4PkCil.js} +1 -1
- package/web/app/immutable/nodes/{1.CqB7---n.js → 1.Yv7aaFvS.js} +1 -1
- package/web/app/immutable/nodes/{10.BtG5pQwg.js → 10.Ci3UaLkO.js} +1 -1
- package/web/app/immutable/nodes/{14.BSVXjSpi.js → 14.0pTaJEhl.js} +1 -1
- package/web/app/immutable/nodes/{17.Bh5ugvjO.js → 17.C4yIKoV3.js} +2 -2
- package/web/app/immutable/nodes/{2.CZ34mXRg.js → 2.CKWF11kM.js} +4 -4
- package/web/app/immutable/nodes/{3.BSXruCL4.js → 3.DU2FnI7u.js} +1 -1
- package/web/app/immutable/nodes/{4.H1psgKQ4.js → 4.BQRlURPi.js} +1 -1
- package/web/app/immutable/nodes/{5.CSAkx37t.js → 5.C0kRsqFa.js} +1 -1
- package/web/app/immutable/nodes/{6.C2NzRpeE.js → 6.meo8GLA8.js} +1 -1
- package/web/app/immutable/nodes/{7.DX2-aZdI.js → 7.BELSSAGn.js} +1 -1
- package/web/app/immutable/nodes/{8.BUULI5of.js → 8.BiXCtzxx.js} +4 -4
- package/web/app/immutable/nodes/{9.QGJ-fCb7.js → 9.CUlXD5Il.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.icYYR8ly.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as Ie}from"./Deqxq6ha.js";import{aZ as Me,U as Be,V as Ve,a_ as Ye,b as d,X as Ot,ay as de,B as Fe,h as Ue,al as je,o as Nt,b5 as ze,aV as me,aW as Jt,bi as We,z as te,n as pe}from"./8NIig13l.js";var jt=(function(){var t=d(function(_t,m,x,E){for(x=x||{},E=_t.length;E--;x[_t[E]]=m);return x},"o"),e=[1,24],a=[1,25],i=[1,26],u=[1,27],r=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],p=[1,68],g=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],X=[1,35],q=[1,36],H=[1,37],Q=[1,38],K=[1,39],G=[1,40],Z=[1,41],J=[1,42],$=[1,43],tt=[1,44],et=[1,45],nt=[1,46],st=[1,47],at=[1,48],rt=[1,50],it=[1,51],ot=[1,52],lt=[1,53],ct=[1,54],ut=[1,55],ht=[1,56],dt=[1,57],pt=[1,58],ft=[1,59],yt=[1,60],kt=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Pt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],T=[1,83],k=[1,84],C=[1,85],R=[12,14,42],oe=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],xt=[12,33],qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(m,x,E,_,D,o,Dt){var f=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[f-3]);break;case 19:_.setTitle(o[f].substring(6)),this.$=o[f].substring(6);break;case 20:_.setAccDescription(o[f].substring(15)),this.$=o[f].substring(15);break;case 21:this.$=o[f].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[f].trim(),_.setAccDescription(this.$);break;case 28:o[f].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 29:o[f].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 30:_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 31:o[f].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[f]),this.$=o[f];break;case 32:_.addDeploymentNode("node",...o[f]),this.$=o[f];break;case 33:_.addDeploymentNode("nodeL",...o[f]),this.$=o[f];break;case 34:_.addDeploymentNode("nodeR",...o[f]),this.$=o[f];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[f]),this.$=o[f];break;case 40:_.addPersonOrSystem("external_person",...o[f]),this.$=o[f];break;case 41:_.addPersonOrSystem("system",...o[f]),this.$=o[f];break;case 42:_.addPersonOrSystem("system_db",...o[f]),this.$=o[f];break;case 43:_.addPersonOrSystem("system_queue",...o[f]),this.$=o[f];break;case 44:_.addPersonOrSystem("external_system",...o[f]),this.$=o[f];break;case 45:_.addPersonOrSystem("external_system_db",...o[f]),this.$=o[f];break;case 46:_.addPersonOrSystem("external_system_queue",...o[f]),this.$=o[f];break;case 47:_.addContainer("container",...o[f]),this.$=o[f];break;case 48:_.addContainer("container_db",...o[f]),this.$=o[f];break;case 49:_.addContainer("container_queue",...o[f]),this.$=o[f];break;case 50:_.addContainer("external_container",...o[f]),this.$=o[f];break;case 51:_.addContainer("external_container_db",...o[f]),this.$=o[f];break;case 52:_.addContainer("external_container_queue",...o[f]),this.$=o[f];break;case 53:_.addComponent("component",...o[f]),this.$=o[f];break;case 54:_.addComponent("component_db",...o[f]),this.$=o[f];break;case 55:_.addComponent("component_queue",...o[f]),this.$=o[f];break;case 56:_.addComponent("external_component",...o[f]),this.$=o[f];break;case 57:_.addComponent("external_component_db",...o[f]),this.$=o[f];break;case 58:_.addComponent("external_component_queue",...o[f]),this.$=o[f];break;case 60:_.addRel("rel",...o[f]),this.$=o[f];break;case 61:_.addRel("birel",...o[f]),this.$=o[f];break;case 62:_.addRel("rel_u",...o[f]),this.$=o[f];break;case 63:_.addRel("rel_d",...o[f]),this.$=o[f];break;case 64:_.addRel("rel_l",...o[f]),this.$=o[f];break;case 65:_.addRel("rel_r",...o[f]),this.$=o[f];break;case 66:_.addRel("rel_b",...o[f]),this.$=o[f];break;case 67:o[f].splice(0,1),_.addRel("rel",...o[f]),this.$=o[f];break;case 68:_.updateElStyle("update_el_style",...o[f]),this.$=o[f];break;case 69:_.updateRelStyle("update_rel_style",...o[f]),this.$=o[f];break;case 70:_.updateLayoutConfig("update_layout_config",...o[f]),this.$=o[f];break;case 71:this.$=[o[f]];break;case 72:o[f].unshift(o[f-1]),this.$=o[f];break;case 73:case 75:this.$=o[f].trim();break;case 74:let vt={};vt[o[f-1].trim()]=o[f].trim(),this.$=vt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:70,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:71,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:72,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:73,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:p,41:g,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(kt,[2,14]),t(Xt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Pt,[2,19]),t(Pt,[2,20]),{25:[1,78]},{27:[1,79]},t(Pt,[2,23]),{35:80,75:81,76:S,77:T,79:k,80:C},{35:86,75:81,76:S,77:T,79:k,80:C},{35:87,75:81,76:S,77:T,79:k,80:C},{35:88,75:81,76:S,77:T,79:k,80:C},{35:89,75:81,76:S,77:T,79:k,80:C},{35:90,75:81,76:S,77:T,79:k,80:C},{35:91,75:81,76:S,77:T,79:k,80:C},{35:92,75:81,76:S,77:T,79:k,80:C},{35:93,75:81,76:S,77:T,79:k,80:C},{35:94,75:81,76:S,77:T,79:k,80:C},{35:95,75:81,76:S,77:T,79:k,80:C},{35:96,75:81,76:S,77:T,79:k,80:C},{35:97,75:81,76:S,77:T,79:k,80:C},{35:98,75:81,76:S,77:T,79:k,80:C},{35:99,75:81,76:S,77:T,79:k,80:C},{35:100,75:81,76:S,77:T,79:k,80:C},{35:101,75:81,76:S,77:T,79:k,80:C},{35:102,75:81,76:S,77:T,79:k,80:C},{35:103,75:81,76:S,77:T,79:k,80:C},{35:104,75:81,76:S,77:T,79:k,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:T,79:k,80:C},{35:106,75:81,76:S,77:T,79:k,80:C},{35:107,75:81,76:S,77:T,79:k,80:C},{35:108,75:81,76:S,77:T,79:k,80:C},{35:109,75:81,76:S,77:T,79:k,80:C},{35:110,75:81,76:S,77:T,79:k,80:C},{35:111,75:81,76:S,77:T,79:k,80:C},{35:112,75:81,76:S,77:T,79:k,80:C},{35:113,75:81,76:S,77:T,79:k,80:C},{35:114,75:81,76:S,77:T,79:k,80:C},{35:115,75:81,76:S,77:T,79:k,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:T,79:k,80:C},{35:120,75:81,76:S,77:T,79:k,80:C},{35:121,75:81,76:S,77:T,79:k,80:C},{35:122,75:81,76:S,77:T,79:k,80:C},{35:123,75:81,76:S,77:T,79:k,80:C},{35:124,75:81,76:S,77:T,79:k,80:C},{35:125,75:81,76:S,77:T,79:k,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(Xt,[2,17],{21:22,19:130,22:e,23:a,24:i,26:u,28:r}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:i,26:u,28:r,34:n,36:l,37:s,38:h,39:y,40:p,41:g,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(Pt,[2,21]),t(Pt,[2,22]),t(R,[2,39]),t(oe,[2,71],{75:81,35:132,76:S,77:T,79:k,80:C}),t(Bt,[2,73]),{78:[1,133]},t(Bt,[2,75]),t(Bt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(xt,[2,28]),t(xt,[2,29]),t(xt,[2,30]),t(xt,[2,31]),t(xt,[2,32]),t(xt,[2,33]),t(xt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Xt,[2,18]),t(kt,[2,38]),t(oe,[2,72]),t(Bt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(qt,[2,25]),t(qt,[2,26],{12:[1,138]}),t(qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(m,x){if(x.recoverable)this.trace(m);else{var E=new Error(m);throw E.hash=x,E}},"parseError"),parse:d(function(m){var x=this,E=[0],_=[],D=[null],o=[],Dt=this.table,f="",vt=0,le=0,De=2,ce=1,Ne=o.slice.call(arguments,1),A=Object.create(this.lexer),Et={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(Et.yy[Qt]=this.yy[Qt]);A.setInput(m,Et.yy),Et.yy.lexer=A,Et.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Kt=A.yylloc;o.push(Kt);var Ae=A.options&&A.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(Le,"popStack");function ue(){var B;return B=_.pop()||A.lex()||ce,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(ue,"lex");for(var M,St,V,Gt,Ct={},Yt,z,he,Ft;;){if(St=E[E.length-1],this.defaultActions[St]?V=this.defaultActions[St]:((M===null||typeof M>"u")&&(M=ue()),V=Dt[St]&&Dt[St][M]),typeof V>"u"||!V.length||!V[0]){var Zt="";Ft=[];for(Yt in Dt[St])this.terminals_[Yt]&&Yt>De&&Ft.push("'"+this.terminals_[Yt]+"'");A.showPosition?Zt="Parse error on line "+(vt+1)+`:
|
|
1
|
+
import{e as Ie}from"./B_l8hqmB.js";import{aZ as Me,U as Be,V as Ve,a_ as Ye,b as d,X as Ot,ay as de,B as Fe,h as Ue,al as je,o as Nt,b5 as ze,aV as me,aW as Jt,bi as We,z as te,n as pe}from"./CNt46_Sl.js";var jt=(function(){var t=d(function(_t,m,x,E){for(x=x||{},E=_t.length;E--;x[_t[E]]=m);return x},"o"),e=[1,24],a=[1,25],i=[1,26],u=[1,27],r=[1,28],n=[1,63],l=[1,64],s=[1,65],h=[1,66],y=[1,67],p=[1,68],g=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],I=[1,34],X=[1,35],q=[1,36],H=[1,37],Q=[1,38],K=[1,39],G=[1,40],Z=[1,41],J=[1,42],$=[1,43],tt=[1,44],et=[1,45],nt=[1,46],st=[1,47],at=[1,48],rt=[1,50],it=[1,51],ot=[1,52],lt=[1,53],ct=[1,54],ut=[1,55],ht=[1,56],dt=[1,57],pt=[1,58],ft=[1,59],yt=[1,60],kt=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Pt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],S=[1,82],T=[1,83],k=[1,84],C=[1,85],R=[12,14,42],oe=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],xt=[12,33],qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:d(function(m,x,E,_,D,o,Dt){var f=o.length-1;switch(D){case 3:_.setDirection("TB");break;case 4:_.setDirection("BT");break;case 5:_.setDirection("RL");break;case 6:_.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:_.setC4Type(o[f-3]);break;case 19:_.setTitle(o[f].substring(6)),this.$=o[f].substring(6);break;case 20:_.setAccDescription(o[f].substring(15)),this.$=o[f].substring(15);break;case 21:this.$=o[f].trim(),_.setTitle(this.$);break;case 22:case 23:this.$=o[f].trim(),_.setAccDescription(this.$);break;case 28:o[f].splice(2,0,"ENTERPRISE"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 29:o[f].splice(2,0,"SYSTEM"),_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 30:_.addPersonOrSystemBoundary(...o[f]),this.$=o[f];break;case 31:o[f].splice(2,0,"CONTAINER"),_.addContainerBoundary(...o[f]),this.$=o[f];break;case 32:_.addDeploymentNode("node",...o[f]),this.$=o[f];break;case 33:_.addDeploymentNode("nodeL",...o[f]),this.$=o[f];break;case 34:_.addDeploymentNode("nodeR",...o[f]),this.$=o[f];break;case 35:_.popBoundaryParseStack();break;case 39:_.addPersonOrSystem("person",...o[f]),this.$=o[f];break;case 40:_.addPersonOrSystem("external_person",...o[f]),this.$=o[f];break;case 41:_.addPersonOrSystem("system",...o[f]),this.$=o[f];break;case 42:_.addPersonOrSystem("system_db",...o[f]),this.$=o[f];break;case 43:_.addPersonOrSystem("system_queue",...o[f]),this.$=o[f];break;case 44:_.addPersonOrSystem("external_system",...o[f]),this.$=o[f];break;case 45:_.addPersonOrSystem("external_system_db",...o[f]),this.$=o[f];break;case 46:_.addPersonOrSystem("external_system_queue",...o[f]),this.$=o[f];break;case 47:_.addContainer("container",...o[f]),this.$=o[f];break;case 48:_.addContainer("container_db",...o[f]),this.$=o[f];break;case 49:_.addContainer("container_queue",...o[f]),this.$=o[f];break;case 50:_.addContainer("external_container",...o[f]),this.$=o[f];break;case 51:_.addContainer("external_container_db",...o[f]),this.$=o[f];break;case 52:_.addContainer("external_container_queue",...o[f]),this.$=o[f];break;case 53:_.addComponent("component",...o[f]),this.$=o[f];break;case 54:_.addComponent("component_db",...o[f]),this.$=o[f];break;case 55:_.addComponent("component_queue",...o[f]),this.$=o[f];break;case 56:_.addComponent("external_component",...o[f]),this.$=o[f];break;case 57:_.addComponent("external_component_db",...o[f]),this.$=o[f];break;case 58:_.addComponent("external_component_queue",...o[f]),this.$=o[f];break;case 60:_.addRel("rel",...o[f]),this.$=o[f];break;case 61:_.addRel("birel",...o[f]),this.$=o[f];break;case 62:_.addRel("rel_u",...o[f]),this.$=o[f];break;case 63:_.addRel("rel_d",...o[f]),this.$=o[f];break;case 64:_.addRel("rel_l",...o[f]),this.$=o[f];break;case 65:_.addRel("rel_r",...o[f]),this.$=o[f];break;case 66:_.addRel("rel_b",...o[f]),this.$=o[f];break;case 67:o[f].splice(0,1),_.addRel("rel",...o[f]),this.$=o[f];break;case 68:_.updateElStyle("update_el_style",...o[f]),this.$=o[f];break;case 69:_.updateRelStyle("update_rel_style",...o[f]),this.$=o[f];break;case 70:_.updateLayoutConfig("update_layout_config",...o[f]),this.$=o[f];break;case 71:this.$=[o[f]];break;case 72:o[f].unshift(o[f-1]),this.$=o[f];break;case 73:case 75:this.$=o[f].trim();break;case 74:let vt={};vt[o[f-1].trim()]=o[f].trim(),this.$=vt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:70,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:71,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:72,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{13:73,19:20,20:21,21:22,22:e,23:a,24:i,26:u,28:r,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{14:[1,74]},t(kt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:s,38:h,39:y,40:p,41:g,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(kt,[2,14]),t(Xt,[2,16],{12:[1,76]}),t(kt,[2,36],{12:[1,77]}),t(Pt,[2,19]),t(Pt,[2,20]),{25:[1,78]},{27:[1,79]},t(Pt,[2,23]),{35:80,75:81,76:S,77:T,79:k,80:C},{35:86,75:81,76:S,77:T,79:k,80:C},{35:87,75:81,76:S,77:T,79:k,80:C},{35:88,75:81,76:S,77:T,79:k,80:C},{35:89,75:81,76:S,77:T,79:k,80:C},{35:90,75:81,76:S,77:T,79:k,80:C},{35:91,75:81,76:S,77:T,79:k,80:C},{35:92,75:81,76:S,77:T,79:k,80:C},{35:93,75:81,76:S,77:T,79:k,80:C},{35:94,75:81,76:S,77:T,79:k,80:C},{35:95,75:81,76:S,77:T,79:k,80:C},{35:96,75:81,76:S,77:T,79:k,80:C},{35:97,75:81,76:S,77:T,79:k,80:C},{35:98,75:81,76:S,77:T,79:k,80:C},{35:99,75:81,76:S,77:T,79:k,80:C},{35:100,75:81,76:S,77:T,79:k,80:C},{35:101,75:81,76:S,77:T,79:k,80:C},{35:102,75:81,76:S,77:T,79:k,80:C},{35:103,75:81,76:S,77:T,79:k,80:C},{35:104,75:81,76:S,77:T,79:k,80:C},t(R,[2,59]),{35:105,75:81,76:S,77:T,79:k,80:C},{35:106,75:81,76:S,77:T,79:k,80:C},{35:107,75:81,76:S,77:T,79:k,80:C},{35:108,75:81,76:S,77:T,79:k,80:C},{35:109,75:81,76:S,77:T,79:k,80:C},{35:110,75:81,76:S,77:T,79:k,80:C},{35:111,75:81,76:S,77:T,79:k,80:C},{35:112,75:81,76:S,77:T,79:k,80:C},{35:113,75:81,76:S,77:T,79:k,80:C},{35:114,75:81,76:S,77:T,79:k,80:C},{35:115,75:81,76:S,77:T,79:k,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:s,38:h,39:y,40:p,41:g,43:23,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:T,79:k,80:C},{35:120,75:81,76:S,77:T,79:k,80:C},{35:121,75:81,76:S,77:T,79:k,80:C},{35:122,75:81,76:S,77:T,79:k,80:C},{35:123,75:81,76:S,77:T,79:k,80:C},{35:124,75:81,76:S,77:T,79:k,80:C},{35:125,75:81,76:S,77:T,79:k,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(kt,[2,15]),t(Xt,[2,17],{21:22,19:130,22:e,23:a,24:i,26:u,28:r}),t(kt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:i,26:u,28:r,34:n,36:l,37:s,38:h,39:y,40:p,41:g,44:v,45:w,46:N,47:O,48:P,49:I,50:X,51:q,52:H,53:Q,54:K,55:G,56:Z,57:J,58:$,59:tt,60:et,61:nt,62:st,63:at,64:rt,65:it,66:ot,67:lt,68:ct,69:ut,70:ht,71:dt,72:pt,73:ft,74:yt}),t(Pt,[2,21]),t(Pt,[2,22]),t(R,[2,39]),t(oe,[2,71],{75:81,35:132,76:S,77:T,79:k,80:C}),t(Bt,[2,73]),{78:[1,133]},t(Bt,[2,75]),t(Bt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(xt,[2,28]),t(xt,[2,29]),t(xt,[2,30]),t(xt,[2,31]),t(xt,[2,32]),t(xt,[2,33]),t(xt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Xt,[2,18]),t(kt,[2,38]),t(oe,[2,72]),t(Bt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(qt,[2,25]),t(qt,[2,26],{12:[1,138]}),t(qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:d(function(m,x){if(x.recoverable)this.trace(m);else{var E=new Error(m);throw E.hash=x,E}},"parseError"),parse:d(function(m){var x=this,E=[0],_=[],D=[null],o=[],Dt=this.table,f="",vt=0,le=0,De=2,ce=1,Ne=o.slice.call(arguments,1),A=Object.create(this.lexer),Et={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(Et.yy[Qt]=this.yy[Qt]);A.setInput(m,Et.yy),Et.yy.lexer=A,Et.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Kt=A.yylloc;o.push(Kt);var Ae=A.options&&A.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(B){E.length=E.length-2*B,D.length=D.length-B,o.length=o.length-B}d(Le,"popStack");function ue(){var B;return B=_.pop()||A.lex()||ce,typeof B!="number"&&(B instanceof Array&&(_=B,B=_.pop()),B=x.symbols_[B]||B),B}d(ue,"lex");for(var M,St,V,Gt,Ct={},Yt,z,he,Ft;;){if(St=E[E.length-1],this.defaultActions[St]?V=this.defaultActions[St]:((M===null||typeof M>"u")&&(M=ue()),V=Dt[St]&&Dt[St][M]),typeof V>"u"||!V.length||!V[0]){var Zt="";Ft=[];for(Yt in Dt[St])this.terminals_[Yt]&&Yt>De&&Ft.push("'"+this.terminals_[Yt]+"'");A.showPosition?Zt="Parse error on line "+(vt+1)+`:
|
|
2
2
|
`+A.showPosition()+`
|
|
3
3
|
Expecting `+Ft.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Zt="Parse error on line "+(vt+1)+": Unexpected "+(M==ce?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Zt,{text:A.match,token:this.terminals_[M]||M,line:A.yylineno,loc:Kt,expected:Ft})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+St+", token: "+M);switch(V[0]){case 1:E.push(M),D.push(A.yytext),o.push(A.yylloc),E.push(V[1]),M=null,le=A.yyleng,f=A.yytext,vt=A.yylineno,Kt=A.yylloc;break;case 2:if(z=this.productions_[V[1]][1],Ct.$=D[D.length-z],Ct._$={first_line:o[o.length-(z||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(z||1)].first_column,last_column:o[o.length-1].last_column},Ae&&(Ct._$.range=[o[o.length-(z||1)].range[0],o[o.length-1].range[1]]),Gt=this.performAction.apply(Ct,[f,le,vt,Et.yy,V[1],D,o].concat(Ne)),typeof Gt<"u")return Gt;z&&(E=E.slice(0,-1*z*2),D=D.slice(0,-1*z),o=o.slice(0,-1*z)),E.push(this.productions_[V[1]][0]),D.push(Ct.$),o.push(Ct._$),he=Dt[E[E.length-2]][E[E.length-1]],E.push(he);break;case 3:return!0}}return!0},"parse")},Pe=(function(){var _t={EOF:1,parseError:d(function(x,E){if(this.yy.parser)this.yy.parser.parseError(x,E);else throw new Error(x)},"parseError"),setInput:d(function(m,x){return this.yy=x||this.yy||{},this._input=m,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:d(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var x=m.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:d(function(m){var x=m.length,E=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var _=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),E.length-1&&(this.yylineno-=E.length-1);var D=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:E?(E.length===_.length?this.yylloc.first_column:0)+_[_.length-E.length].length-E[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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:d(function(m){this.unput(this.match.slice(m))},"less"),pastInput:d(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var m=this.pastInput(),x=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,r as m,d as a}from"./
|
|
1
|
+
import{g as l,r as m,d as a}from"./kqlckYxf.js";import{p}from"./BQxXUVuI.js";import{b as t,ay as o}from"./CNt46_Sl.js";import{M as u,b as c}from"./ltO9jYXn.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=y(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),y=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),v=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(v(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},$={parser:b,db:a,renderer:m,styles:l};export{$ as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ie}from"./
|
|
1
|
+
import{g as ie}from"./lpr2a93v.js";import{s as re}from"./CaGPXrgT.js";import{b as p,ay as b,X as $,a1 as ae,aP as ne,bh as oe,V as le,a_ as ce,U as he,aZ as de,b0 as ue,Y as fe,T as pe,z as j,r as Se,aW as vt,am as ge,aU as ye,ab as me,aG as Te}from"./CNt46_Sl.js";import{c as Ee}from"./B_l8hqmB.js";import{aP as _e}from"./CNLEkESE.js";var At=(function(){var t=p(function(V,o,f,n){for(f=f||{},n=V.length;n--;f[V[n]]=o);return f},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],c=[1,9],h=[1,11],u=[1,16],l=[1,17],m=[1,18],y=[1,19],_=[1,33],L=[1,20],R=[1,21],D=[1,22],S=[1,23],w=[1,24],C=[1,26],F=[1,27],I=[1,28],P=[1,29],v=[1,30],z=[1,31],at=[1,32],nt=[1,35],ot=[1,36],lt=[1,37],ct=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ht=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(o,f,n,T,E,i,B){var d=i.length-1;switch(E){case 3:return T.setRootDoc(i[d]),i[d];case 4:this.$=[];break;case 5:i[d]!="nl"&&(i[d-1].push(i[d]),this.$=i[d-1]);break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:const Q=i[d-1];Q.description=T.trimColon(i[d]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:const Tt=T.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var G=i[d],X=i[d-2].trim();if(i[d].match(":")){var ut=i[d].split(":");G=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:R,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:R,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:_,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ht,[2,44],{58:[1,56]}),t(ht,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:_,57:K},t(g,[2,17]),t(It,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,72],22:y,24:_,25:L,26:R,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ht,[2,46]),t(ht,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,81],22:y,24:_,25:L,26:R,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(o,f){if(f.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=f,n}},"parseError"),parse:p(function(o){var f=this,n=[0],T=[],E=[null],i=[],B=this.table,d="",G=0,X=0,ut=2,Q=1,Tt=i.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;i.push(_t);var ee=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(N){n.length=n.length-2*N,E.length=E.length-N,i.length=i.length-N}p(se,"popStack");function Nt(){var N;return N=T.pop()||k.lex()||Q,typeof N!="number"&&(N instanceof Array&&(T=N,N=T.pop()),N=f.symbols_[N]||N),N}p(Nt,"lex");for(var x,U,O,bt,J={},ft,Y,Rt,pt;;){if(U=n[n.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((x===null||typeof x>"u")&&(x=Nt()),O=B[U]&&B[U][x]),typeof O>"u"||!O.length||!O[0]){var kt="";pt=[];for(ft in B[U])this.terminals_[ft]&&ft>ut&&pt.push("'"+this.terminals_[ft]+"'");k.showPosition?kt="Parse error on line "+(G+1)+`:
|
|
2
2
|
`+k.showPosition()+`
|
|
3
3
|
Expecting `+pt.join(", ")+", got '"+(this.terminals_[x]||x)+"'":kt="Parse error on line "+(G+1)+": Unexpected "+(x==Q?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(kt,{text:k.match,token:this.terminals_[x]||x,line:k.yylineno,loc:_t,expected:pt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+x);switch(O[0]){case 1:n.push(x),E.push(k.yytext),i.push(k.yylloc),n.push(O[1]),x=null,X=k.yyleng,d=k.yytext,G=k.yylineno,_t=k.yylloc;break;case 2:if(Y=this.productions_[O[1]][1],J.$=E[E.length-Y],J._$={first_line:i[i.length-(Y||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(Y||1)].first_column,last_column:i[i.length-1].last_column},ee&&(J._$.range=[i[i.length-(Y||1)].range[0],i[i.length-1].range[1]]),bt=this.performAction.apply(J,[d,X,G,W.yy,O[1],E,i].concat(Tt)),typeof bt<"u")return bt;Y&&(n=n.slice(0,-1*Y*2),E=E.slice(0,-1*Y),i=i.slice(0,-1*Y)),n.push(this.productions_[O[1]][0]),E.push(J.$),i.push(J._$),Rt=B[n[n.length-2]][n[n.length-1]],n.push(Rt);break;case 3:return!0}}return!0},"parse")},te=(function(){var V={EOF:1,parseError:p(function(f,n){if(this.yy.parser)this.yy.parser.parseError(f,n);else throw new Error(f)},"parseError"),setInput:p(function(o,f){return this.yy=f||this.yy||{},this._input=o,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:p(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:p(function(o){var f=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var T=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),n.length-1&&(this.yylineno-=n.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:n?(n.length===T.length?this.yylloc.first_column:0)+T[T.length-n.length].length-n[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(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:p(function(o){this.unput(this.match.slice(o))},"less"),pastInput:p(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var o=this.pastInput(),f=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ix as s,nx as m}from"./DNqM68dO.js";import{bT as l,aO as p}from"./VZEkDWIM.js";import{bQ as k}from"./
|
|
1
|
+
import{Ix as s,nx as m}from"./DNqM68dO.js";import{bT as l,aO as p}from"./VZEkDWIM.js";import{bQ as k}from"./NVLznFEf.js";import{al as w,u as H,v as u}from"./BurWh7sU.js";const n=new WeakMap,W=s.createSelector((e,o)=>{const t=m(e.workspace.workspaces,o),c=t?.home;if(!c)return null;const r=n.get(c);if(r)return r;const a=w(t);return a&&n.set(c,a),a}),M=s.createSelector((e,o)=>H(m(e.workspace.workspaces,o),!l.select(e,o))),b=s.createSelector((e,o)=>e.workspaceHome.waiting[o]===!0),y=s.createSelector(e=>e.workspaceHome.dialogWorkspaceId),h=s.createSelector(e=>e.workspaceHome.moveStatus==="submitting"),x=s.createSelector(e=>e.workspaceHome.moveFailure),g=[],i=new Map,A=s.createSelector((e,o)=>{if(!o)return g;const t=u({agents:p.select(e,o),machineRows:k.select(e)}),c=JSON.stringify(t),r=i.get(o);return r?.key===c?r.options:(i.set(o,{key:c,options:t}),t)});export{b as a,y as b,x as c,A as d,h as e,W as f,M as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as S}from"./BdWqymET.js";import{aE as g}from"./DYhIMPy1.js";import{g as c}from"./
|
|
1
|
+
import{a as S}from"./BdWqymET.js";import{aE as g}from"./DYhIMPy1.js";import{g as c}from"./Be14EhuN.js";import{p as l}from"./CQqORW76.js";import{d as I}from"./B0Z-1lwJ.js";import{dC as f}from"./VZEkDWIM.js";import{Bx as u,g as y,Ix as o,gS as A,v1 as m,v2 as N,v4 as b}from"./DNqM68dO.js";import{g as W,n as h}from"./BgLcfABG.js";import{S as D,a as R,n as E}from"./BbjrS_gZ.js";import{n as O,o as v}from"./DUPPDYfv.js";const k="intent:onboarding-skip:v1";function P(e){return u.getItem(h(k,e))==="1"}function re(e){P(e)||u.setItem(h(k,e),"1")}function _(e){return e.connections?.hasReceivedList===!0&&P(W(e))}function F(e,a){return e.some(t=>t.id!==y&&t.id!==a&&t.status!=="Archived"&&t.status!=="Deleted")}function j(e,a,t=!1){return t||F(e,a)?"/":"/workspace/new"}function d(e,a){return j(f.select(e),a,_(e))}const se=Object.freeze(Object.defineProperty({__proto__:null,resolveWindowEmptyDestination:d},Symbol.toStringTag,{value:"Module"})),r=new S("WorkspaceNavigation");async function L(e){r.info(`[navigateToAgent] Navigating to agent: ${e}`);const t=g(l).params.id;if(!t){r.error("[navigateToAgent] No workspace ID found in current page params");return}const n=new URL(window.location.href);n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","agent"),n.searchParams.set("selectedAgent",e),n.searchParams.delete("selectedTerminal"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"agent",e))}async function C(e){r.info(`[navigateToTerminal] Navigating to terminal: ${e}`);const t=g(l).params.id;if(!t){r.error("[navigateToTerminal] No workspace ID found in current page params");return}const n=new URL(window.location.href),i=n.searchParams.get("drawerOpen")==="1",s=n.searchParams.get("drawerType")==="terminal";(!i||!s)&&n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","terminal"),n.searchParams.set("selectedTerminal",e),n.searchParams.delete("selectedAgent"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"terminal",e))}function $(e){return!e||!(e instanceof Element)?void 0:e.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}async function p(e,a){r.info(`[navigateToNote] Navigating to note: ${e}`,a);const t=g(l),n=a?.workspaceId??t.params.id;if(!n){r.error("[navigateToNote] No workspace ID found in current page params");return}o.dispatch(b(n,e,{openInAdjacentPanel:a?.openInAdjacentPanel??!1,openInNewAdjacentPanel:a?.openInNewAdjacentPanel??!1,sourcePanelId:a?.sourcePanelId}))}async function U(e,a,t){r.info(`[navigateToFile] Navigating to file: ${e}${a?` (line ${a})`:""}`,t);const i=g(l).params.id;if(!i){r.error("[navigateToFile] No workspace ID found in current page params");return}o.dispatch(N(i,e,{line:a,openInAdjacentPanel:t?.openInAdjacentPanel??!1,sourcePanelId:t?.sourcePanelId}))}async function B(){r.info("[navigateToSpec] Navigating to workspace spec"),await p("spec")}async function M(){r.info("[closeDrawer] Closing drawer");const a=g(l).params.id;if(!a){r.error("[closeDrawer] No workspace ID found in current page params");return}const t=new URL(window.location.href);t.searchParams.set("drawerOpen","0"),t.searchParams.delete("selectedAgent"),t.searchParams.delete("selectedTerminal"),await c(t.toString(),{replaceState:!0}),o.dispatch(A(a))}async function K(){r.info("[clearMainContent] Clearing main content");const e=new URL(window.location.href);e.searchParams.set("mainContentType","empty"),e.searchParams.delete("selectedNoteId"),e.searchParams.delete("selectedFile"),e.searchParams.delete("line"),await c(e.toString(),{replaceState:!1})}async function G(e,a,t){r.info("[navigateToTask] Navigating to task",{noteId:e,taskPosition:a,taskText:t}),await p(e);const n=()=>{I("scroll-to-task",{noteId:e,taskPosition:a,taskText:t},{bubbles:!0}),r.debug("[navigateToTask] Dispatched scroll-to-task event",{noteId:e,taskPosition:a})},i=[100,300,600];for(const s of i)setTimeout(n,s)}async function H(e){r.info("[navigateToSettings] Navigating to settings",e);const a=new URL("/settings",window.location.origin),t=window.location.pathname.match(/^\/workspace\/([^/]+)/)?.[1],n=t==="new"?void 0:t,i=e?.workspaceId??n;if(e?.tab&&a.searchParams.set("tab",e.tab),e?.specialist&&a.searchParams.set("specialist",e.specialist),e?.view&&a.searchParams.set("view",e.view),i&&a.searchParams.set("workspaceId",i),e?.hash&&(a.hash=e.hash),typeof window<"u"&&window.location.pathname==="/settings"){if(e?.tab||e?.specialist||e?.view||e?.workspaceId){const s=new URL(window.location.href);e?.tab&&s.searchParams.set("tab",e.tab),e?.specialist&&s.searchParams.set("specialist",e.specialist),e?.view&&s.searchParams.set("view",e.view),e?.workspaceId&&s.searchParams.set("workspaceId",e.workspaceId),e?.hash&&(s.hash=e.hash),await c(s.toString(),{replaceState:!0});return}if(e?.hash){const s=`#${e.hash}`;window.location.hash===s&&(window.location.hash=""),window.location.hash=s;return}return}await E(a.pathname+a.search+a.hash)}function T(){const e=typeof sessionStorage>"u"?null:sessionStorage.getItem(D);if(e&&e!=="/"&&!R(e))return e;const a=w();return a?`/workspace/${a.id}`:d(o.state)}async function x(){const e=T();r.info("[navigateBackFromSettings] Navigating back to:",e),await O(e)}function w(e){return f.select(o.state).find(a=>a.id!==e&&a.status!=="Archived"&&a.status!=="Deleted")}async function z(){const e=w();if(e){r.info("[navigateToFirstWorkspace] Showing workspace:",e.id),await v(e.id);return}const a=d(o.state);r.info("[navigateToFirstWorkspace] Navigating to:",a),await c(a)}async function Y(e){const a=w(e);if(a){r.info("[navigateAfterWorkspaceRemoval] Showing workspace:",a.id),await v(a.id);return}const t=d(o.state,e);r.info("[navigateAfterWorkspaceRemoval] Navigating to:",t),await c(t)}const ie=Object.freeze(Object.defineProperty({__proto__:null,clearMainContent:K,closeDrawer:M,findSourcePanelId:$,getSettingsPreviousPath:T,navigateAfterWorkspaceRemoval:Y,navigateBackFromSettings:x,navigateToAgent:L,navigateToFile:U,navigateToFirstWorkspace:z,navigateToNote:p,navigateToSettings:H,navigateToSpec:B,navigateToTask:G,navigateToTerminal:C},Symbol.toStringTag,{value:"Module"}));export{U as a,z as b,p as c,H as d,G as e,$ as f,d as g,ie as h,_ as i,x as n,re as r,se as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as h}from"./
|
|
1
|
+
import{J as h}from"./CNLEkESE.js";import{c as v}from"./ChTqQfQN.js";import{bt as d}from"./CR_t_AVn.js";const g=v("AttachmentImageUrl");function y(n,t){const r=t.split("/").filter(e=>e.length>0).map(e=>encodeURIComponent(e)).join("/");return`workspace-file://${n}/${r}`}const u=new Map,a=new Map;let f=0,m=!1;function p(){m||(m=!0,d(()=>{f+=1,u.clear(),a.clear()}))}function A(n,t){u.delete(`${n}/${t}`)}function F(n,t,r){p();let e=!1,i=!1,o=!1;async function l(){if(!e){if(i){o=!0;return}i=!0;try{const c=await $(n,t);e||r(c)}finally{i=!1,o&&(o=!1,l())}}}const s=d(()=>{l()});return l(),{imageFailed(){e||(A(n,t),r(null))},dispose(){e=!0,s()}}}function $(n,t){p();const r=f,e=`${n}/${t}`,i=u.get(e);if(i)return Promise.resolve(i);const o=a.get(e);if(o)return o;const l=(async()=>{try{const s=await h({attachmentId:t,workspaceId:n});if(r!==f)return null;if(!s.exists)return g.warn("Attachment file missing on disk",{attachmentId:t}),null;const c=y(n,s.path);return u.set(e,c),c}catch(s){return g.warn("Failed to resolve attachment image",{attachmentId:t,error:s}),null}finally{r===f&&a.delete(e)}})();return a.set(e,l),l}export{A as e,F as o,$ as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as s}from"./
|
|
1
|
+
import{b as s}from"./CNt46_Sl.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BV3MrUXO.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/O1QHAURn.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/DNqM68dO.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BUzdsYyD.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BBDxUL80.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CovkQMd0.js","/app/immutable/chunks/CR_t_AVn.js","/app/immutable/chunks/CAyg2ijY.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/C2mPABxH.js","/app/immutable/chunks/4kJJ0Qm4.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/Csj7SEat.js","/app/immutable/chunks/DRjQ_WEk.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/BgLcfABG.js","/app/immutable/chunks/Vn5GukrK.js","/app/immutable/chunks/Dft5EuPN.js","/app/immutable/chunks/Cj9Y0QG4.js","/app/immutable/chunks/c_SIieWD.js","/app/immutable/chunks/DBU5w_eB.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/xEfOpOba.js","/app/immutable/chunks/DqOSeb3n.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/
|
|
2
|
-
import{Ix as a,nI as I,ny as g,nx as k,m3 as Z,qs as Q,i7 as ee,vg as Fe,jA as He,CY as $e,uN as Be,nP as ve,m6 as te,q2 as Ve,m5 as ze,lK as Ke,aM as le,lU as Je,l_ as Ye,Fv as Xe,CW as Ze,zi as Qe,nN as et,m8 as tt}from"./DNqM68dO.js";import{b as st,p as rt,F as nt,z as at}from"./BVs4aETe.js";import{aX as V,aT as se,cD as v,cG as ue,co as ot,dr as M,aU as ct,cE as it,dl as lt,o as de,O as ut,dn as dt,c3 as pt,ak as mt,au as ht,ad as ft,bC as St,cA as gt,cY as yt,cm as bt,bD as kt}from"./VZEkDWIM.js";import{x as wt}from"./DrbtWgvN.js";import{ah as It,cN as _t,aX as vt,av as Ct,p as At}from"./K_GlKbLA.js";import{g as Et}from"./BV3MrUXO.js";import{bp as p,_ as q}from"./O1QHAURn.js";import{i as w}from"./RoOfSbrC.js";import{I as Rt}from"./CovkQMd0.js";import{L as P}from"./C1dHaq0T.js";import{aj as Tt,k as Pt,h as O,ac as Ot,q as Wt}from"./BREnKX07.js";import{c as Nt}from"./ChTqQfQN.js";import{w as xt}from"./xEfOpOba.js";import{r as x}from"./uXuxG9cN.js";import{aN as Mt,O as Lt,R as Dt,x as Ut}from"./BvqQKgIh.js";import{bs as pe,bt as me,ax as Ce}from"./CR_t_AVn.js";import{d as jt,o as he,l as fe,s as Se}from"./CIyUrgF0.js";const nr=a.createSelector(e=>e.workspaceShare.open),ar=a.createSelector(e=>e.workspaceShare.workspaceId),or=a.createSelector(e=>{const{open:t,workspaceId:s,session:r}=e.workspaceShare;return t&&s?{workspaceId:s,session:r}:null}),re=a.createSelector(e=>{const{open:t,workspaceId:s,withheld:r}=e.workspaceShare;return!t||!s||r||I(e.workspaceShare,s).inviteWithheld?!1:V.select(e,s)}),cr=a.createSelector(e=>e.workspaceShare.createRequest),ir=a.createSelector(e=>e.workspaceShare.mutationGeneration),lr=a.createSelector(e=>e.workspaceShare.workspaceTitle),ur=a.createSelector(e=>g(e.workspaceShare.members)),dr=a.createSelector((e,t)=>k(e.workspaceShare.members,t)!==void 0),pr=a.createSelector(e=>e.workspaceShare.open&&e.workspaceShare.workspaceId&&!e.workspaceShare.withheld&&!I(e.workspaceShare,e.workspaceShare.workspaceId).inviteWithheld?g(e.workspaceShare.invites).filter(t=>t.workspaceId===e.workspaceShare.workspaceId):[]),mr=a.createSelector(e=>{const{principals:t,members:s}=e.workspaceShare;return g(t).filter(r=>!k(s,r.principalId)&&(r.hostRole===void 0||r.hostRole==="guest"))}),hr=a.createSelector(e=>e.workspaceShare.guestCount),fr=a.createSelector(e=>e.workspaceShare.guestLimit),Sr=a.createSelector(e=>e.workspaceShare.loadStatus==="loading"),gr=a.createSelector(e=>e.workspaceShare.loadError),yr=a.createSelector(e=>e.workspaceShare.creating),br=a.createSelector(e=>e.workspaceShare.createError),kr=a.createSelector(e=>e.workspaceShare.createdLink),wr=a.createSelector(e=>e.workspaceShare.revokingInviteId),Ir=a.createSelector(e=>e.workspaceShare.removingPrincipalId),_r=a.createSelector(e=>e.workspaceShare.addingPrincipalId),vr=a.createSelector(e=>e.workspaceShare.actionError),Cr=a.createSelector((e,t)=>I(e.workspaceShare,t).loadStatus!=="idle"),Ar=a.createSelector((e,t)=>t?g(I(e.workspaceShare,t).members):[]),Er=a.createSelector((e,t)=>!!t&&!I(e.workspaceShare,t).withheld&&V.select(e,t));a.createSelector((e,t)=>!!t&&I(e.workspaceShare,t).withheld);const Rr=a.createSelector((e,t)=>t?I(e.workspaceShare,t).removingPrincipalId:null);a.createSelector((e,t)=>t?I(e.workspaceShare,t).removeError:null);const Tr=a.createSelector(e=>e.workspaceShare.integrationAuth),Pr=a.createSelector(e=>e.workspaceShare.ownerForgeMissing),z=a.createSelector(e=>re.select(e)&&se.select(e)&&e.workspaceShare.sharingContext!==null&&e.workspaceShare.sharingContext===v.select(e)),Gt=a.createSelector(e=>z.select(e)?e.workspaceShare.sharingEnabled:null),Or=a.createSelector(e=>z.select(e)&&e.workspaceShare.sharingChecking),qt=a.createSelector(e=>z.select(e)&&e.workspaceShare.sharingEnabling),Ft=a.createSelector(e=>z.select(e)?e.workspaceShare.sharingError:null),Wr=a.createSelector(e=>{if(!re.select(e))return!1;const t=e.workspaceShare;return!t.integrationAuthLoaded||se.select(e)&&Gt.select(e)===null&&Ft.select(e)===null&&!qt.select(e)?!0:g(t.members).length===0&&(t.loadStatus==="idle"||t.loadStatus==="loading")}),Nr=a.createSelector(e=>re.select(e)&&!!e.workspaceShare.workspaceId&&(se.select(e)||(ge.select(e)?ge.select(e)===ue.select(e)?.principal.id:ot.select(e,e.workspaceShare.workspaceId)))&&ue.select(e)?.capabilities.workspaceGuestRoles===!0),xr=a.createSelector(e=>e.workspaceShare.pendingRolePrincipalIds),Mr=a.createSelector(e=>e.workspaceShare.roleErrors),ge=a.createSelector(e=>{const t=e.workspaceShare.workspaceId;return t?M.select(e,t)?.ownerPrincipalId??null:null}),Ht=a.createSelector(e=>{const t=v.select(e),s=st.select(e);return{context:t,workspaceIds:t?s.filter(r=>V.select(e,r)):[]}}),Lr=a.createSelector((e,t)=>{const s=I(e.workspaceShare,t);return{context:s.inviteContext,generation:s.inviteGeneration,withheld:s.inviteWithheld}}),$t=[],Bt=a.createSelector((e,t)=>{const s=v.select(e),r=I(e.workspaceShare,t);if(!s||r.inviteContext!==s||r.inviteWithheld||!V.select(e,t))return $t;const n=e.presence?.context===s?e.presence.members[t]:void 0,o=new Set(n?g(n).flatMap(i=>i.identity?[JSON.stringify([i.identity.provider,i.identity.host.toLowerCase(),i.identity.externalUserId])]:[]):[]),c=new Set;return g(e.workspaceShare.invites).filter(i=>{if(i.workspaceId!==t||!i.pinLogin?.trim()||i.revokedAt||i.redeemedAt&&!i.reusable||!(Date.parse(i.expiresAt)>r.inviteReceivedAt))return!1;const l=i.pinIdentity??(i.pinGithubUserId!==void 0?{provider:"github",host:"github.com",externalUserId:String(i.pinGithubUserId)}:null);if(n&&i.redeemedByPrincipalId&&k(n,i.redeemedByPrincipalId))return!1;if(!l)return!0;const m=JSON.stringify([l.provider,l.host.toLowerCase(),l.externalUserId]);return o.has(m)||c.has(m)?!1:(c.add(m),!0)})}),Dr=a.createSelector(e=>{const s=Ht.select(e).workspaceIds.flatMap(r=>Bt.select(e,r).map(n=>Date.parse(n.expiresAt)));return s.length?Math.min(...s):null});function Ur(e){return Object.entries(e).some(([t,s])=>s.available&&wt(t,s.authenticated))}const jr=a.createSelector(e=>e.hostRequirements.git),Gr=a.createSelector(e=>e.hostRequirements.node),qr=a.createSelector(e=>e.hostRequirements.gh),Fr=a.createSelector(e=>e.hostRequirements.checking),Hr=a.createSelector(e=>e.hostRequirements.hasCheckedOnce);function Ae(e){const t=e.gitlabAuth?.statusFailed===!0;return It({labsEnabled:e.userPreferences?.labsPlainFolderWorkspacesEnabled===!0,protocolVersion:e.daemonHealth?.stats?.protocolVersion,githubConnected:e.githubAuth?.isAuthenticated===!0,githubSettled:e.githubAuth?.statusSettled===!0,githubFailed:e.githubAuth?.statusFailed===!0,gitlabConnected:e.gitlabAuth?.isConfigured===!0,gitlabSettled:e.gitlabAuth?.statusReady===!0||t,gitlabFailed:t})}const $r=a.createSelector(Ae),Br=a.createSelector(e=>e.hostRequirements.node.ok&&(e.hostRequirements.git.available||Ae(e))),Vr=a.createSelector(e=>{const t=e.hostRequirements.providerCli;return t?{context:t.context,warnings:g(t.warnings)}:void 0}),zr="22.0.0";function Vt(e){return e.length>15?`${e.slice(0,15)}…`:e}function H(e){return e.name?.trim()||Vt(e.clientId)}function Kr(e){const{eligibleClients:t,ownClientId:s,driving:r,pinnedClientId:n}=e,o=t.find(l=>l.clientId===s&&l.connected),c=r!==null&&!r.connected,i=!r||r.clientId===s;return{mode:c?"offline":i?"here":"elsewhere",hostName:r?H(r):o?H(o):"",canSwitchHere:!!(o&&n!==s)}}const Jr=a.createSelector(e=>e?.browserClients?.ownClientId??null),Yr=a.createSelector(e=>e?.browserClients?.ownClientIdConfirmed===!0);a.createSelector(e=>g(e.browserClients.liveClients));const Xr=a.createSelector((e,t)=>t?e?.browserClients?.byWorkspaceId[t]?.liveClientsLoaded??!1:e?.browserClients?.liveClientsLoaded??!1);a.createSelector((e,t)=>k(e.browserClients.liveClients,t));const Zr=a.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).browserClient),Qr=a.createSelector((e,t)=>{const s=e?.browserClients?.byWorkspaceId[t];return s?.pinnedClientId!==void 0||s?.browserClient!=null});function X(e){const t=e.prettyHostname??e.hostname??e.name;return{clientId:e.clientId,...t!==void 0?{name:t}:{},connected:!0}}const en=a.createSelector((e,t)=>{const s=e?.browserClients??Q,r=s.byWorkspaceId[t]?.liveClients??ee(),n=g(r).filter(y=>y.capabilities.browserExec===!0).map(X),o=(s.byWorkspaceId[t]??Z).browserClient,c=s.byWorkspaceId[t],i=c?.pinnedClientId!==void 0?c.pinnedClientId:o?.source==="workspace"?o.clientId:null,l=i===null?Et(o):void 0;let m=null;if(o?.resolved){const y=k(r,o.resolved.clientId);m=y?X(y):{...o.resolved,connected:!0}}else o?.source==="workspace"?m={clientId:o.clientId,connected:!1}:l&&(m={clientId:l.clientId,connected:!1});return{eligibleClients:n,ownClientId:s.ownClientId??"",routedVia:o?.source==="default"?l?.via:void 0,driving:m,pinnedClientId:i}}),tn=a.createSelector((e,t)=>{const s=e?.browserClients??Q;if(!s.ownClientId||!s.ownClientIdConfirmed)return!1;const r=s.byWorkspaceId[t]?.liveClients??ee(),n=k(r,s.ownClientId);return n!==void 0&&n.capabilities.browserExec!==!0}),sn=a.createSelector((e,t,s)=>{const r=e?.browserClients??Q,n=s?r.byWorkspaceId[s]?.liveClients??ee():r.liveClients,o=s?r.byWorkspaceId[s]?.liveClientsLoaded:r.liveClientsLoaded,c=k(n,t);return c?{name:H(X(c)),connected:!0}:{name:H({clientId:t}),connected:!o}}),rn=a.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).tabsRevision),nn=a.createSelector(e=>Object.entries(e.browserClients?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),N=new Map;function an(e,t){return N.set(e,t),()=>{N.get(e)===t&&N.delete(e)}}async function on(e){const t=N.get(e);return t?t():null}function cn(e){N.delete(e)}const Ee="From repo config",ln="repo-config";function un(e,t){return t==="repo-config"?p.workspace_setupScriptEditor_fromRepoConfig_name():t==="custom"?p.workspace_setupScriptEditor_custom_name():e}function Re(e){if(!e||typeof e!="object"||Array.isArray(e))return{setupScript:null};const t=e.setupScript;return{setupScript:typeof t=="string"&&t.trim().length>0?t:null}}function zt(e){let t;try{t=JSON.parse(e)}catch{return null}return Re(t).setupScript}async function dn(e){if(!e)return null;try{const t=await w(Rt.SETUP_SCRIPTS.READ_REPO_CONFIG,{repoPath:e}),s=t?.success?t.data?.content:null;return typeof s=="string"?zt(s):null}catch{return null}}async function pn(e,t,s){if(!e||!t)return null;try{const{appClient:r}=await q(async()=>{const{appClient:o}=await import("./BV3MrUXO.js").then(c=>c.p);return{appClient:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url),n=await r.integrations.githubRepoConfig(e,t,s);return Re(n.config).setupScript}catch{return null}}function mn(e){const t=e.setupScript.trim();return t?e.setupScriptNameSource==="repo-config"&&e.setupScriptName===Ee&&e.repoConfigScriptRepo===e.repoPath&&t===(e.repoConfigScript??"").trim()?void 0:t:e.explicitChoice?"cd .":void 0}function hn(e){const{repoConfigScript:t,lastUsed:s,genericTemplate:r}=e;return t?{content:t,name:Ee,source:"repo-config"}:s?{content:s.content,name:s.nameSource==="repo-config"?"Custom":s.name,source:s.nameSource==="repo-config"?"custom":s.nameSource??"named"}:r?{content:r.content,name:r.name,source:"named"}:{content:"",name:"Custom",source:"custom"}}const Te="setup-scripts:last-used-by-repo",Pe="setup-scripts:recent-by-repo",$=20,Oe=10,Kt=["repo-config","custom","named"];function ne(e,t){return t?`${e}\0${t}`:e}function We(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return typeof t.name=="string"&&typeof t.content=="string"&&t.content.trim().length>0&&typeof t.usedAt=="string"&&(t.nameSource===void 0||Kt.includes(t.nameSource))}function B(){try{const e=localStorage.getItem(Te);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,n]of Object.entries(t))r&&We(n)&&(s[r]=n);return s}catch{return{}}}function Ne(){try{const e=localStorage.getItem(Pe);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,n]of Object.entries(t)){if(!r||!Array.isArray(n))continue;const o=n.filter(We);o.length>0&&(s[r]=o)}return s}catch{return{}}}function Jt(e,t){return e.name===t.name&&(e.nameSource??"named")===(t.nameSource??"named")&&e.content.trim()===t.content.trim()}function xe(e){return[...e].sort((t,s)=>s.usedAt.localeCompare(t.usedAt))}function Me(e){const t=[];for(const s of e)t.some(r=>Jt(r,s))||t.push(s);return t}function fn(e,t){if(!e)return[];const s=ne(e,t),r=Ne()[s]??[],n=B()[s];return Me(xe(n?[...r,n]:r)).slice(0,Oe).map(c=>({name:c.name,content:c.content,nameSource:c.nameSource??"named",usedAt:c.usedAt}))}function Yt(e,t,s){try{const r=Ne(),n=r[e]??(s?[s]:[]);r[e]=Me([t,...xe(n)]).slice(0,Oe);const o=Object.entries(r);o.length>$&&(o.sort(([,c],[,i])=>i[0].usedAt.localeCompare(c[0].usedAt)),o.length=$),localStorage.setItem(Pe,JSON.stringify(Object.fromEntries(o)))}catch{}}function Sn(e,t){if(!e)return;const s=B()[ne(e,t)];return s?{name:s.name,content:s.content,nameSource:s.nameSource??"named"}:void 0}function gn(e,t,s){const r=t.content.trim();if(!e||!r)return;const n=ne(e,s),o={name:t.name,content:r,usedAt:new Date().toISOString(),nameSource:t.nameSource??"named"};Yt(n,o,B()[n]);try{const c=B();c[n]=o;const i=Object.entries(c);i.length>$&&(i.sort(([,l],[,m])=>m.usedAt.localeCompare(l.usedAt)),i.length=$),localStorage.setItem(Te,JSON.stringify(Object.fromEntries(i)))}catch{}}const Xt={async isAuthenticated(e){try{return await w(P.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async getAuthState(e=!1,t){try{return await w(P.GET_AUTH_STATE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return{isAuthenticated:!1,requiresDaemonAuth:!0}}},async getStatus(e){try{return await w(P.GET_STATUS,...e===void 0?[]:[{workspaceId:e}])}catch{return{isConfigured:!1,oauthUrl:""}}},async fetchMyIssues(e="assigned",t){return(await this.fetchMyIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async fetchMyIssuesPage(e="assigned",t){try{return await w(P.FETCH_MY_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async searchIssuesPage(e,t){try{return await w(P.SEARCH_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}}},yn=Object.freeze(Object.defineProperty({__proto__:null,linearAuthClient:Xt},Symbol.toStringTag,{value:"Module"})),_={IS_AUTHENTICATED:"sentry-auth:is-authenticated",SAVE_CONFIG:"sentry-auth:save-config",GET_AUTH_STATE:"sentry-auth:get-auth-state",LOGOUT:"sentry-auth:logout",FETCH_PROJECTS:"sentry-auth:fetch-projects",FETCH_ISSUES:"sentry-auth:fetch-issues",SEARCH_ISSUES:"sentry-auth:search-issues",GET_ISSUE:"sentry-auth:get-issue"},Zt={async isAuthenticated(e){try{return await w(_.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async saveConfig(e,t){return await w(_.SAVE_CONFIG,{organization:e,apiToken:t})},async getAuthState(e){try{return await w(_.GET_AUTH_STATE,...e===void 0?[]:[{workspaceId:e}])}catch{return{isAuthenticated:!1}}},async logout(){await w(_.LOGOUT)},async fetchProjects(e){try{return await w(_.FETCH_PROJECTS,...e===void 0?[]:[{workspaceId:e}])}catch{return[]}},async fetchIssues(e){return(await this.fetchIssuesPage(e)).issues},async fetchIssuesPage(e){try{return await w(_.FETCH_ISSUES,e)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t)).issues},async searchIssuesPage(e,t,s){try{return await w(_.SEARCH_ISSUES,{query:e,project:t,...s})}catch{return{issues:[],nextToken:null}}},async getIssue(e,t){try{return await w(_.GET_ISSUE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return null}}},bn=Object.freeze(Object.defineProperty({__proto__:null,sentryAuthClient:Zt},Symbol.toStringTag,{value:"Module"})),ae=a.createSelector(e=>{const t=v.select(e);return!t||!ct.select(e)?null:JSON.stringify([t,e.hostExecution.generation,e.repositoryCheckout.authorityGeneration,e.gitlabAuth.host,e.gitlabAuth.instanceBaseUrl,e.gitlabAuth.statusReady,e.gitlabAuth.isConfigured,e.gitlabAuth.user])}),K=a.createSelector((e,t)=>k(e.repositoryCheckout.forms,t)??null),kn=a.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.projects):[]}),wn=a.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.branches):[]}),Qt=a.createSelector((e,t)=>{const s=K.select(e,t);return!s||s.status!=="ready"||s.admission!==ae.select(e)||!s.capture||!s.project||!s.branch?null:{checkoutId:s.capture.checkoutId,revision:s.capture.revision,projectPath:s.project.projectPath,branch:s.branch.name,commitSha:s.branch.commitSha,mode:s.mode}}),In=a.createSelector((e,t)=>{const s=Qt.select(e,t);return!!s&&(s.mode==="direct"||K.select(e,t)?.warmStatus==="ready")}),_n="__new-workspace__",vn="__initializer__",Cn="compact-workspace-initializer-state-prompt",An="onboarding-prompt",U=20*1024*1024,ye=Nt("NewWorkspaceDraft");function En(e,t){if(e.length>U)return ye.warn("Draft text exceeds the size guard; skipping persistence",{textLength:e.length,limit:U}),null;const s=Tt(t);if(s.length===0)return{text:e};const r=[];let n=e.length+2,o=0;for(const c of s){const i=JSON.stringify(c).length+1;if(n+i>U){o+=1;continue}r.push(c),n+=i}return o>0&&ye.warn("Draft attachments exceed the size guard; persisting the ones that fit",{limit:U,attachmentCount:s.length,droppedCount:o}),r.length>0?{text:e,attachments:r}:{text:e}}const es="host.providerAuthStatus";function ts(e={}){const t={};return e.workspaceId&&(t.workspaceId=e.workspaceId),typeof e.providerId=="string"&&e.providerId.length>0&&(t.providerId=e.providerId),typeof e.force=="boolean"&&(t.force=e.force),t}function ss(e,t){const s=t.toLowerCase(),r=e.toLowerCase();return s.startsWith(r)?/^(['’]s\s+organization)?$/.test(s.slice(r.length)):!1}function rs(e){const{email:t,orgName:s}=e??{};return t&&s?ss(t,s)?t:`${t} · ${s}`:t||s||void 0}function ns(e){const t={};for(const s of e?.providers??[]){const r={authenticated:s.authenticated??void 0},n=rs(s.identity);n!==void 0&&(r.authDetails=n),s.identity?.email&&(r.email=s.identity.email),t[s.id]=r}return t}const as=6e4,E=new Map,j=new Map,A=new Map;let F=0,Le=0;const os=e=>JSON.stringify([it.select(a.state),Le,e.workspaceId??null,e.providerId??"*"]);function cs(e){if(e.method!=="events.event"||!e.params)return;const t=e.params,r=(t.event&&typeof t.event=="object"?t.event:t).type;return typeof r=="string"?r:void 0}function J(e){if(F+=1,e)for(const t of E.keys()){const[,,,s]=JSON.parse(t);(s===e||s==="*")&&E.delete(t)}else E.clear()}typeof pe=="function"&&pe(e=>{["provider:auth-changed","host:execution-context-changed"].includes(cs(e)??"")&&J()});typeof me=="function"&&me(()=>{Le+=1,J()});function is(e={}){const t=os(e);if(e.force)J(e.providerId);else{const o=E.get(t);if(o&&o.expiresAt>Date.now())return Promise.resolve(o.verdicts);o&&E.delete(t)}const s=j.get(t);if(!e.force&&s?.generation===F)return s.promise;if(s){const o=A.get(t);if(o)return o.force||=e.force===!0,o.promise;let c;const i=s.promise.catch(()=>({})).then(()=>(A.get(t)===c&&A.delete(t),is({...e,force:c.force}))).finally(()=>{A.get(t)===c&&A.delete(t)});return c={force:e.force===!0,promise:i},A.set(t,c),i}const r=F,n=Ce(es,ts(e)).then(ns).then(o=>(r===F&&E.set(t,{verdicts:o,expiresAt:Date.now()+as}),o)).finally(()=>{j.get(t)?.promise===n&&j.delete(t)});return j.set(t,{generation:r,promise:n}),n}function Rn(e,t=e,s="default",r,n){if(!xt.select(a.state))return;const o=n??rt.select(a.state,t)??nt.select(a.state,t)[0];if(!o)return;const c=at.select(a.state,t,o),i={type:"discussion",title:r??(s==="new"?p.workspace_discussion_new_title():p.workspace_discussion_title()),workspaceId:e,closable:!0,data:{conversationId:s}},l=c?.tabs.find(m=>Fe(m,i));s==="new"&&a.dispatch(He(e)),a.dispatch(l?$e(t,l.id,o):Be(t,i,o,void 0,!0,void 0,!0))}function Tn(e,t){return e.name?.trim()?e.name.trim():e.kind==="workspace"?e.id&&e.id!=="default"?p.workspace_discussion_conversation_title():p.workspace_discussion_title():e.participants.filter(r=>r.principalId!==t).map(r=>r.displayName||r.login||p.workspace_discussion_unknownAuthor_label()).join(", ")||p.workspace_discussion_group_title()}const ls=a.createSelector((e,t,s)=>{const r=ve(e.repositoryContext,t);return s!==null&&r.binding===s?r:null});a.createSelector((e,t,s)=>{const r=ls.select(e,t.workspaceId,s);return r?.status==="ready"?k(r.roots,x(t))?.context:void 0});const Pn=a.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission)return null;const s=ve(e.repositoryContext,t.workspaceId),r=s.ownership;return!r||r.demandId!==t.demandId||r.admission!==t.admission||r.request.workspaceId!==t.workspaceId?null:{status:s.status,scope:s.scope,revision:s.revision,roots:s.status==="ready"?g(s.roots).map(n=>n.context):[],unavailableReason:s.unavailableReason}}),On=a.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission)return null;const s=e.repositoryContext.selectionEdits,r=s?k(s,t.editId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&x(r.owner.root)===x(t.root)?r:null}),Wn=a.createSelector((e,t)=>{const s=e.repositoryContext.selectionEdits;return!!s&&g(s).some(r=>r.owner.root.workspaceId===t&&r.owner.admission===v.select(e)&&(r.status==="capturing"||r.status==="pending"&&(!r.observation||r.observation.attempt?.status==="pending")))}),Nn=a.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission||t.hostContext===null||lt.select(e,t.root.workspaceId)!==t.hostContext)return null;const s=e.repositoryContext.nativeReviewAttempts,r=s?k(s,t.attemptId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&r.owner.hostContext===t.hostContext&&x(r.owner.root)===x(t.root)?r:null}),xn=a.createSelector((e,t)=>e.repositoryContext.nativeReviewAttempts?k(e.repositoryContext.nativeReviewAttempts,t):void 0),us=["venv",".venv","virtualenv","node_modules","google-cloud-sdk","__pycache__",".pytest_cache",".mypy_cache",".ruff_cache",".tox",".nox"];function ds(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function ps(e){const t=new Set(us);return ds(e).some(s=>t.has(s))}const ms=new Set(["lastActivity","statusMessage","statusImageAssetId"]),hs=new Set([".git",".playwright-cli",".svelte-kit",".vite",".turbo",".cache",".parcel-cache",".next",".nuxt",".output","build","coverage","dist","playwright-report","target","test-results"]);function fs(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function Ss(e){if(!e.type.startsWith("file:"))return null;const t=e.data,s=t?.relativePath??t?.path??t?.filePath;return typeof s=="string"&&s.length>0?s:null}function gs(e){const t=Ss(e);return!t||ps(t)?!1:!fs(t).some(s=>hs.has(s))}function ys(e){if(e.type==="workspace:displayStatus-changed")return!0;if(e.type!=="workspace:updated")return!1;const t=e.data;if(!t?.changes||typeof t.changes!="object"||Array.isArray(t.changes))return!1;const s=Object.keys(t.changes).filter(r=>r!=="workspaceId");return s.length>0&&s.every(r=>ms.has(r))}function h(e){return typeof e=="string"?e.trim():""}function R(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function be(e){const t=R(e.data),s=h(t.agentId)||h(e.sessionId),r=h(t.messageId);return s&&r?JSON.stringify([s,r]):""}function bs(e){const t=R(e.data),s={workspaceId:e.workspaceId,closable:!0},r=n=>n?{...s,type:"note",noteId:n,title:h(t.title)||h(t.noteTitle)||p.layout_tabTypes_note_title()}:null;switch(e.type){case"note:created":case"note:updated":case"comment:added":case"comment:resolved":return r(h(t.noteId));case"task:status-changed":return r(h(t.noteId)||h(t.linkedNoteId));case"spec:updated":case"goal:updated":return r("spec");case"agent:created":case"agent:renamed":case"agent:restored":case"agent:updated":case"agent:message":case"agent:user-message:sent":{const n=h(t.agentId)||h(e.sessionId);return n?{...s,type:"agent",agentId:n,title:h(t.agentName)||p.layout_tabTypes_agent_title()}:null}case"file:changed":{const n=h(t.path)||h(t.relativePath);return n&&t.action!=="delete"?{...s,type:"file",filePath:n,title:n.split(/[\\/]/).pop()||n}:null}case"git:commit":{const n=h(t.commit),o=h(t.gitRootId);return n?{...s,type:"changes",title:p.layout_tabTypes_changes_title(),data:{commitHash:n,...o?{gitRootId:o}:{}}}:null}default:return null}}function ke(e,t){const s=R(e.data),r=Object.fromEntries(Object.entries(s).filter(([,c])=>typeof c=="string")),n=c=>t?p.workspace_peopleActivity_actorAction_label({name:t,action:c}):c;switch(e.type){case"note:created":case"note:updated":case"note:deleted":case"spec:updated":case"goal:updated":return O({...e,actor:{...e.actor,name:t},data:r});case"agent:created":case"agent:renamed":case"agent:deleted":case"agent:restored":case"git:commit":case"git:push":case"git:pull":case"git:branch":case"git:merge":return n(O({...e,actor:{...e.actor,name:void 0},data:r}));case"agent:updated":return h(s.modelId)||s.completionReportCleared===!0?n(O({...e,actor:{...e.actor,name:void 0},data:s})):null;case"file:changed":return gs(e)?O({...e,actor:{...e.actor,name:t},data:{path:h(s.path)||h(s.relativePath),action:h(s.action)}}):null;case"comment:added":return t?p.events_activity_authorCommented_label({author:t}):p.workspace_peopleActivity_commented_label();case"comment:resolved":return s.resolved===!1?n(p.events_activity_reopenedCommentThread_label()):s.resolved===!0?n(p.events_activity_resolvedCommentThread_label()):null;case"agent:message":case"agent:user-message:sent":{const c=h(s.agentName)||h(s.toAgentName);return n(c?p.workspace_peopleActivity_messagedAgent_label({agent:c}):p.workspace_peopleActivity_sentMessage_label())}case"task:status-changed":return n(O({...e,actor:{...e.actor,name:void 0},data:{taskName:h(s.taskName)||h(s.noteTitle),newStatus:h(s.newStatus)||h(s.status)}}));case"workspace:created":return n(p.events_activity_createdWorkspace_label());case"workspace:updated":{if(ys(e))return null;const c=R(s.changes);if(Object.keys(c).filter(l=>l!=="workspaceId").length===0)return null;const i=h(c.title);return n(i?p.events_activity_renamedWorkspaceTo_label({title:i}):p.events_activity_updatedWorkspace_label())}default:return null}}function W(e,t){const s=h(e);return s===t||/^(user|you|system|unknown|anonymous|local user)$/i.test(s)?"":s}function ks(e,t,s,r){const n=new Map(s.map(u=>[u.principalId,u])),o=new Map;for(const u of t){if(u.workspaceId!==e||u.type!=="agent:last-message")continue;const d=R(u.data),f=de({role:d.role==="user"?"user":"system",author:d.author,metadata:d.metadata}),S=be(u);if(!f||!S||typeof d.lastUserMessage!="string")continue;const b=Pt({id:h(d.messageId),role:"user",timestamp:u.timestamp,contentBlocks:[{type:"text",text:d.lastUserMessage}],author:f,metadata:d.metadata},r);b&&o.set(S,b)}const c=new Set,i=new Set,l=[];let m=0;for(const u of t){if(u.workspaceId!==e||!h(u.id)||c.has(u.id))continue;const d=Date.parse(u.timestamp);if(!Number.isFinite(d)){m++;continue}const f=R(u.data),S=u.type==="agent:message",b=S?de({role:f.role==="user"?"user":"system",author:f.author,metadata:f.metadata}):null;if(S?!b:u.actor?.type!=="user"){S&&f.role==="user"&&u.actor?.type==="user"&&ut(f.metadata)&&l.push({row:null,timestamp:d,segment:m});continue}const qe=S?h(f.messageId):"",T=S?be(u):"";if(T&&i.has(T))continue;const C=h(u.actor?.id),Y=C?n.get(C):void 0,L=b?W(b.displayName,b.principalId??"")||W(b.login,b.principalId??""):W(u.actor.name,C)||W(Y?.displayName,C)||W(Y?.login,C),ce=ke(u,"");if(!ce)continue;if(!L){l.push({row:null,timestamp:d,segment:m});continue}const D=S?o.get(T)??null:null,ie=D?p.workspace_peopleActivity_actorAction_label({name:L,action:D}):ke(u,L);ie&&(c.add(u.id),T&&i.add(T),l.push({timestamp:d,segment:m,row:{id:u.id,name:L,principalId:b?h(b.principalId)||null:C||null,avatarUrl:b?b.avatarUrl:Y?.avatarUrl??null,label:ie,actionLabel:D??ce,continuation:!1,timestamp:u.timestamp,destination:bs(u),messageId:qe||null,messagePreview:D}}))}l.sort((u,d)=>d.timestamp-u.timestamp);const y=[];for(const[u,d]of l.entries()){if(!d.row)continue;const f=l[u-1],S=f?f.timestamp-d.timestamp:NaN;d.row.continuation=!!(d.row.principalId&&f?.row?.principalId===d.row.principalId&&f.segment===d.segment&&Number.isFinite(S)&&S>=0&&S<=15*6e4),y.push(d.row)}return y}const Mn=a.createSelector(e=>e.workspaceEvents.subscriptionAttempt),Ln=a.createSelector(e=>e.workspaceEvents.subscriptionGeneration),ws=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).events),Dn=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).nextToken),Un=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]?.peopleRequestId??null)!==null),jn=a.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleError??null),Gn=a.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleInitialized??!1),De=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).peopleStreams),qn=a.createSelector((e,t)=>Object.values(De.select(e,t)).every(s=>s.initialized&&s.nextToken===null)),Fn=a.createSelector((e,t,s)=>{const r=ws.select(e,t),o=ks(t,r,_t.select(e,t),M.select(e,t)?.ownerPrincipalId)[s-1]?.timestamp,c=De.select(e,t);return["user","message"].filter(i=>{const l=c[i];if(!l.initialized)return!0;if(l.nextToken===null)return!1;const m=r.find(y=>y.id===l.oldestEventId)?.timestamp;return!o||!m||!(Date.parse(m)<=Date.parse(o))})}),Hn=a.createSelector((e,t)=>{const s=[],r=new Set,n=new Set,o=c=>{const i=c.block.attachmentId??c.id;if(!r.has(i)){if(!c.block.attachmentId&&c.block.data&&!c.block.dataTruncated){const l=`${c.block.mimeType}/${c.block.data}`;if(n.has(l))return;n.add(l)}r.add(i),s.push(c)}};for(const[c,i]of Object.entries(Ot.select(e,t)))for(const l of g(i))l.imageData&&l.imageMimeType?o({id:`draft/${c}/${l.id}`,name:l.label,block:{type:"image",data:l.imageData,mimeType:l.imageMimeType}}):l.type==="file"&&(l.attachmentId||l.placementStatus)&&o({id:`draft/${c}/${l.id}`,name:l.label,placementStatus:l.placementStatus,block:{type:l.attachmentMimeType?.startsWith("image/")?"image":"file",attachmentId:l.attachmentId,mimeType:l.attachmentMimeType,fileName:l.label,size:l.attachmentSize}});for(const c of dt.select(e,t)){const i=pt.select(e,c),l=[...mt.select(e,c),...ht.select(e,c)];for(const m of l)if(m.role==="user")for(const[y,u]of(m.contentBlocks??[]).entries()){if(u.type!=="image"&&!Wt(u))continue;const d=u.id?i?.[Ve(m.id,u.id)]:void 0,f=d?.status==="loaded"?d.block:u;o({id:`${c}/${m.id}/${u.id??y}`,name:f.fileName,block:f,agentId:c,messageId:m.id,hydration:d})}}return s}),Is=a.createSelector((e,t)=>e.context.byWorkspaceId[t]??ze),_s=a.createSelector((e,t)=>g(Is.select(e,t).items)),$n=a.createSelector((e,t)=>_s.select(e,t).filter(s=>!s.parentNoteId)),Bn=a.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedAgentIds??Ue),Vn=a.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedFilePaths??Ue),Ue={},zn=a.createSelector((e,t,s)=>{const r=e.gitWrite.byWorkspaceId[t]?.operations;return r?k(r,s):void 0}),je=a.createSelector((e,t)=>{const s=e.gitWrite.byWorkspaceId[t]?.operations;return s?g(s):[]}),Kn=a.createSelector((e,t)=>je.select(e,t).some(s=>s.status==="queued"||s.status==="running")),Jn=a.createSelector((e,t)=>je.select(e,t).filter(s=>s.operation.kind==="partialCommit"&&(s.status==="queued"||s.status==="running")));function we(e){return e.title||`PR #${e.number}`}const oe=a.createSelector((e,t)=>{const s=e.gitRoots?.byWorkspaceId?.[t];return s?g(s.gitRoots):[]});function vs(e){return{key:"primary",isPrimary:!0,path:e.worktreePath??e.path,branch:e.branch,repoOwner:e.repositoryOwner,repoName:e.repositoryName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests}}function Cs(e){return{key:e.id,isPrimary:!1,path:e.path,branch:e.branch,repoOwner:e.repoOwner,repoName:e.repoName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests,gitRoot:e}}const Yn=a.createSelector((e,t)=>{const s=M.select(e,t),r=oe.select(e,t).map(Cs);return s?[vs(s),...r]:r}),Xn=a.createSelector((e,t)=>oe.select(e,t).length>0),Zn=a.createSelector(e=>Object.entries(e.gitRoots?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),As=a.createSelector((e,t,s)=>k((e.acceptWorkflow.byWorkspaceId[t]??Ke).operations,s)),Qn=a.createSelector((e,t,s)=>As.select(e,t,s)?.status==="running"),ea=a.createSelector((e,t)=>e.acceptWorkflow.byWorkspaceId[t]?.mergeDrawerOpen??!1),ta=a.createSelector((e,t)=>{const s=ft.select(e,t)?.hasRemote??!1,r=M.select(e,t)?.pullRequests?.some(n=>n.status===le.Open||n.status===le.Draft)??!1;return{squash:!1,viaPR:s&&r,pushAfter:s,...e.acceptWorkflow.byWorkspaceId[t]?.mergeOptions}}),sa=a.createSelector(e=>Object.keys(e.acceptWorkflow.byWorkspaceId).filter(t=>e.acceptWorkflow.byWorkspaceId[t].observerRequested)),ra=a.createSelector((e,t)=>{const s=M.select(e,t),r=St.select(e,t),n=gt.select(e,t),o=s?.repositoryOwner&&s.repositoryName?`${s.repositoryOwner}/${s.repositoryName}`:void 0,c=vt(Ct(s?.pullRequests,s?.activePullRequest,(i,l)=>At(i,s?.repositoryOwner,s?.repositoryName,l),we,o),yt.select(e,t),o,oe.select(e,t),we).own;return{visible:(e.acceptWorkflow.byWorkspaceId[t]?.consumerCount??0)>0,ready:kt.select(e,t),owner:!bt.select(e,t),authenticated:Mt.select(e),pushedCount:r.filter(i=>i.isPushed).length,hasRemote:n.hasRemote,clearReset:n.hasResetToTrunk&&c.some(i=>i.status!=="merged"),clearMerge:!!(n.mergeHeadSha&&r[0]?.hash&&n.mergeHeadSha!==r[0].hash)}}),na=a.createSelector((e,t,s)=>e.bgExecutor?.byWorkspaceId[t]?.executors[s]??Je),Es=a.createSelector((e,t)=>e.prWorkflow.byWorkspaceId[t]??Ye);a.createSelector((e,t,s)=>Es.select(e,t).operations[s]);const aa=a.createSelector(e=>Object.keys(e.noteReadTracking.unreadNoteIds)),oa=a.createSelector(e=>e.noteReadTracking.readRecords),Rs="host.providerTestPrompt",Ts=jt("ok",[he({ok:fe(!0)}).passthrough(),he({ok:fe(!1),reason:Se().min(1),message:Se()}).passthrough()]),Ps=3e5;async function ca(e){const t=await Ce(Rs,{providerId:e.providerId,...e.model?{model:e.model}:{}},{timeoutMs:Ps}),s=Ts.parse(t);return(s.ok||s.reason==="auth-required")&&J(e.providerId),s}const Os=-1,Ws=/^remote-script-lost:\s*/,Ns=["idle","starting","running","restarting","exited"],Ie=e=>!!e&&typeof e=="object"&&!Array.isArray(e),_e=e=>typeof e=="string"&&e.trim().length>0;function xs(e){return Ie(e)&&_e(e.remoteAgentId)&&_e(e.nodeId)&&Ie(e.runtime)&&Ns.includes(e.runtime.status)}function ia(e){return Array.isArray(e.machineRuns)?e.machineRuns.filter(xs):[]}function la(e,t,s){const r=Lt(e.nodeId,s)??{nodeId:e.nodeId,name:p.remoteAgent_location_unknownMachine(),platform:null,state:"ready"};if(s&&s.id===e.nodeId)return r;const n=t?.nodeId===e.nodeId?t:null;return{...r,name:n?.nodeName?.trim()||r.name,platform:Dt(n?.placement?.os,n?.placement?.arch)}}function Ms(e){return e.status==="exited"&&e.exitCode===Os}function Ls(e){const t=e.error?.trim().replace(Ws,"").trim();switch(t){case"the machine disconnected":return p.scripts_remote_lostDisconnected_label();case"the machine was removed":return p.scripts_remote_lostRemoved_label();case"the agent was deleted":return p.scripts_remote_lostAgentDeleted_label();case"the agent was stopped for good":return p.scripts_remote_lostAgentStopped_label();default:return t||p.scripts_remote_lostReason_fallback()}}function ua(e){if(Ms(e))return{kind:"lost",label:p.scripts_remote_lost_tooltip({reason:Ls(e)})};const t=Ut(e);switch(t){case"running":return{kind:t,label:p.terminal_quakeOverlay_status_running()};case"restarting":return{kind:t,label:p.workspace_devScripts_restarting_label()};case"idle":return{kind:t,label:p.terminal_quakeOverlay_status_idle()};case"succeeded":return{kind:t,label:p.terminal_quakeOverlay_status_exitedZero()};case"failed":return{kind:t,label:p.terminal_quakeOverlay_status_errorCode({code:e.exitCode??1})};case"stopped":return{kind:t,label:p.terminal_quakeOverlay_status_stoppedSignal({signal:(e.exitCode??128)-128})};default:return{kind:t,label:p.terminal_quakeOverlay_status_exited()}}}const G=e=>typeof e=="string"&&e.length>0,Ds=/\bremote-script-agent-ending:/;function da(e){return!!e&&Ds.test(e)}function pa(e){if(!e||typeof e!="object")return null;const t=e.data;if(!t||typeof t!="object")return null;const s=t,r=e instanceof Error&&e.message?{message:e.message}:{};return s.code==="machine-update-required"?{success:!1,code:"machine-update-required",update:s.update==="backend"?"backend":"machine",...G(s.machineVersion)?{machineVersion:s.machineVersion}:{},...G(s.backendVersion)?{backendVersion:s.backendVersion}:{},...r}:s.code==="machine-unreachable"?{success:!1,code:"machine-unreachable",attempts:Array.isArray(s.attempts)?s.attempts.flatMap(o=>{const c=o??{};return G(c.route)&&G(c.error)?[{route:c.route,error:c.error}]:[]}):[],...r}:null}function ma(e){const s=e.filter(n=>n.runtime.status==="running"&&n.runtime.detectedUrl?.trim()).sort((n,o)=>(o.runtime.startedAt??"").localeCompare(n.runtime.startedAt??""))[0],r=s?.runtime.detectedUrl?.trim();return!s||!r?null:{scriptId:s.id,name:s.name,url:r}}const Us={status:"idle",error:null},js=a.createSelector((e,t)=>e.workspaceLifecycle.loadByWorkspaceId[t]??Us);a.createSelector((e,t)=>js.select(e,t).error);const ha=a.createSelector((e,t)=>k(e.workspace.workspaces,t)??e.workspace.pendingCreations[t]),Ge=a.createSelector((e,t)=>e.workspaceLifecycle.sessionPhaseByWorkspaceId[t]),Gs=e=>e==="hydrated"||e==="live",fa=a.createSelector((e,t)=>{const s=Ge.select(e,t);return s==="hydrated"||s==="live"}),Sa=a.createSelector(e=>{const t=e.workspaceLifecycle.sessionPhaseByWorkspaceId;return Object.keys(t).filter(s=>Gs(t[s]))}),ga=a.createSelector((e,t)=>Ge.select(e,t)==="live");function ya(e){const{selectedProviderId:t,activeProviderId:s,recommitActive:r,dispatch:n}=e;if(t&&!(!r&&t===s))return n(Xe({providerId:t,enabled:!0})),n(Ze(t)),n(Qe()),t}function ba(e){const t=[];for(const s of e){let r={};if(s.metadata)try{r=JSON.parse(s.metadata)}catch{}const n=[];if(n.push(`[${s.identifier}] ${s.title}`),s.url&&n.push(`URL: ${s.url}`),s.description&&n.push(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BV3MrUXO.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/O1QHAURn.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/DNqM68dO.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BUzdsYyD.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BBDxUL80.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CovkQMd0.js","/app/immutable/chunks/CR_t_AVn.js","/app/immutable/chunks/CAyg2ijY.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/C2mPABxH.js","/app/immutable/chunks/4kJJ0Qm4.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/Csj7SEat.js","/app/immutable/chunks/DRjQ_WEk.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/BgLcfABG.js","/app/immutable/chunks/Vn5GukrK.js","/app/immutable/chunks/Dft5EuPN.js","/app/immutable/chunks/Cj9Y0QG4.js","/app/immutable/chunks/c_SIieWD.js","/app/immutable/chunks/DBU5w_eB.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/xEfOpOba.js","/app/immutable/chunks/DqOSeb3n.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/CsC_AG5b.js","/app/immutable/chunks/NVLznFEf.js","/app/immutable/chunks/B6kyqBFl.js","/app/immutable/chunks/BkT9o_nd.js","/app/immutable/chunks/B1mZq3ve.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/B0f-om7y.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/VZEkDWIM.js","/app/immutable/chunks/RoOfSbrC.js","/app/immutable/chunks/DrbtWgvN.js","/app/immutable/chunks/BVs4aETe.js","/app/immutable/chunks/BbjrS_gZ.js","/app/immutable/chunks/D89PDrKh.js","/app/immutable/chunks/BurWh7sU.js","/app/immutable/chunks/CNLEkESE.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Ix as a,nI as I,ny as g,nx as k,m3 as Z,qs as Q,i7 as ee,vg as Fe,jA as He,CY as $e,uN as Be,nP as ve,m6 as te,q2 as Ve,m5 as ze,lK as Ke,aM as le,lU as Je,l_ as Ye,Fv as Xe,CW as Ze,zi as Qe,nN as et,m8 as tt}from"./DNqM68dO.js";import{b as st,p as rt,F as nt,z as at}from"./BVs4aETe.js";import{aX as V,aT as se,cD as v,cG as ue,co as ot,dr as M,aU as ct,cE as it,dl as lt,o as de,O as ut,dn as dt,c3 as pt,ak as mt,au as ht,ad as ft,bC as St,cA as gt,cY as yt,cm as bt,bD as kt}from"./VZEkDWIM.js";import{x as wt}from"./DrbtWgvN.js";import{ah as It,cN as _t,aX as vt,av as Ct,p as At}from"./CNLEkESE.js";import{g as Et}from"./BV3MrUXO.js";import{bp as p,_ as q}from"./O1QHAURn.js";import{i as w}from"./RoOfSbrC.js";import{I as Rt}from"./CovkQMd0.js";import{L as P}from"./C1dHaq0T.js";import{aj as Tt,k as Pt,h as O,ac as Ot,q as Wt}from"./BurWh7sU.js";import{c as Nt}from"./ChTqQfQN.js";import{w as xt}from"./xEfOpOba.js";import{r as x}from"./uXuxG9cN.js";import{aN as Mt,O as Lt,R as Dt,x as Ut}from"./NVLznFEf.js";import{bs as pe,bt as me,ax as Ce}from"./CR_t_AVn.js";import{d as jt,o as he,l as fe,s as Se}from"./CIyUrgF0.js";const nr=a.createSelector(e=>e.workspaceShare.open),ar=a.createSelector(e=>e.workspaceShare.workspaceId),or=a.createSelector(e=>{const{open:t,workspaceId:s,session:r}=e.workspaceShare;return t&&s?{workspaceId:s,session:r}:null}),re=a.createSelector(e=>{const{open:t,workspaceId:s,withheld:r}=e.workspaceShare;return!t||!s||r||I(e.workspaceShare,s).inviteWithheld?!1:V.select(e,s)}),cr=a.createSelector(e=>e.workspaceShare.createRequest),ir=a.createSelector(e=>e.workspaceShare.mutationGeneration),lr=a.createSelector(e=>e.workspaceShare.workspaceTitle),ur=a.createSelector(e=>g(e.workspaceShare.members)),dr=a.createSelector((e,t)=>k(e.workspaceShare.members,t)!==void 0),pr=a.createSelector(e=>e.workspaceShare.open&&e.workspaceShare.workspaceId&&!e.workspaceShare.withheld&&!I(e.workspaceShare,e.workspaceShare.workspaceId).inviteWithheld?g(e.workspaceShare.invites).filter(t=>t.workspaceId===e.workspaceShare.workspaceId):[]),mr=a.createSelector(e=>{const{principals:t,members:s}=e.workspaceShare;return g(t).filter(r=>!k(s,r.principalId)&&(r.hostRole===void 0||r.hostRole==="guest"))}),hr=a.createSelector(e=>e.workspaceShare.guestCount),fr=a.createSelector(e=>e.workspaceShare.guestLimit),Sr=a.createSelector(e=>e.workspaceShare.loadStatus==="loading"),gr=a.createSelector(e=>e.workspaceShare.loadError),yr=a.createSelector(e=>e.workspaceShare.creating),br=a.createSelector(e=>e.workspaceShare.createError),kr=a.createSelector(e=>e.workspaceShare.createdLink),wr=a.createSelector(e=>e.workspaceShare.revokingInviteId),Ir=a.createSelector(e=>e.workspaceShare.removingPrincipalId),_r=a.createSelector(e=>e.workspaceShare.addingPrincipalId),vr=a.createSelector(e=>e.workspaceShare.actionError),Cr=a.createSelector((e,t)=>I(e.workspaceShare,t).loadStatus!=="idle"),Ar=a.createSelector((e,t)=>t?g(I(e.workspaceShare,t).members):[]),Er=a.createSelector((e,t)=>!!t&&!I(e.workspaceShare,t).withheld&&V.select(e,t));a.createSelector((e,t)=>!!t&&I(e.workspaceShare,t).withheld);const Rr=a.createSelector((e,t)=>t?I(e.workspaceShare,t).removingPrincipalId:null);a.createSelector((e,t)=>t?I(e.workspaceShare,t).removeError:null);const Tr=a.createSelector(e=>e.workspaceShare.integrationAuth),Pr=a.createSelector(e=>e.workspaceShare.ownerForgeMissing),z=a.createSelector(e=>re.select(e)&&se.select(e)&&e.workspaceShare.sharingContext!==null&&e.workspaceShare.sharingContext===v.select(e)),Gt=a.createSelector(e=>z.select(e)?e.workspaceShare.sharingEnabled:null),Or=a.createSelector(e=>z.select(e)&&e.workspaceShare.sharingChecking),qt=a.createSelector(e=>z.select(e)&&e.workspaceShare.sharingEnabling),Ft=a.createSelector(e=>z.select(e)?e.workspaceShare.sharingError:null),Wr=a.createSelector(e=>{if(!re.select(e))return!1;const t=e.workspaceShare;return!t.integrationAuthLoaded||se.select(e)&&Gt.select(e)===null&&Ft.select(e)===null&&!qt.select(e)?!0:g(t.members).length===0&&(t.loadStatus==="idle"||t.loadStatus==="loading")}),Nr=a.createSelector(e=>re.select(e)&&!!e.workspaceShare.workspaceId&&(se.select(e)||(ge.select(e)?ge.select(e)===ue.select(e)?.principal.id:ot.select(e,e.workspaceShare.workspaceId)))&&ue.select(e)?.capabilities.workspaceGuestRoles===!0),xr=a.createSelector(e=>e.workspaceShare.pendingRolePrincipalIds),Mr=a.createSelector(e=>e.workspaceShare.roleErrors),ge=a.createSelector(e=>{const t=e.workspaceShare.workspaceId;return t?M.select(e,t)?.ownerPrincipalId??null:null}),Ht=a.createSelector(e=>{const t=v.select(e),s=st.select(e);return{context:t,workspaceIds:t?s.filter(r=>V.select(e,r)):[]}}),Lr=a.createSelector((e,t)=>{const s=I(e.workspaceShare,t);return{context:s.inviteContext,generation:s.inviteGeneration,withheld:s.inviteWithheld}}),$t=[],Bt=a.createSelector((e,t)=>{const s=v.select(e),r=I(e.workspaceShare,t);if(!s||r.inviteContext!==s||r.inviteWithheld||!V.select(e,t))return $t;const n=e.presence?.context===s?e.presence.members[t]:void 0,o=new Set(n?g(n).flatMap(i=>i.identity?[JSON.stringify([i.identity.provider,i.identity.host.toLowerCase(),i.identity.externalUserId])]:[]):[]),c=new Set;return g(e.workspaceShare.invites).filter(i=>{if(i.workspaceId!==t||!i.pinLogin?.trim()||i.revokedAt||i.redeemedAt&&!i.reusable||!(Date.parse(i.expiresAt)>r.inviteReceivedAt))return!1;const l=i.pinIdentity??(i.pinGithubUserId!==void 0?{provider:"github",host:"github.com",externalUserId:String(i.pinGithubUserId)}:null);if(n&&i.redeemedByPrincipalId&&k(n,i.redeemedByPrincipalId))return!1;if(!l)return!0;const m=JSON.stringify([l.provider,l.host.toLowerCase(),l.externalUserId]);return o.has(m)||c.has(m)?!1:(c.add(m),!0)})}),Dr=a.createSelector(e=>{const s=Ht.select(e).workspaceIds.flatMap(r=>Bt.select(e,r).map(n=>Date.parse(n.expiresAt)));return s.length?Math.min(...s):null});function Ur(e){return Object.entries(e).some(([t,s])=>s.available&&wt(t,s.authenticated))}const jr=a.createSelector(e=>e.hostRequirements.git),Gr=a.createSelector(e=>e.hostRequirements.node),qr=a.createSelector(e=>e.hostRequirements.gh),Fr=a.createSelector(e=>e.hostRequirements.checking),Hr=a.createSelector(e=>e.hostRequirements.hasCheckedOnce);function Ae(e){const t=e.gitlabAuth?.statusFailed===!0;return It({labsEnabled:e.userPreferences?.labsPlainFolderWorkspacesEnabled===!0,protocolVersion:e.daemonHealth?.stats?.protocolVersion,githubConnected:e.githubAuth?.isAuthenticated===!0,githubSettled:e.githubAuth?.statusSettled===!0,githubFailed:e.githubAuth?.statusFailed===!0,gitlabConnected:e.gitlabAuth?.isConfigured===!0,gitlabSettled:e.gitlabAuth?.statusReady===!0||t,gitlabFailed:t})}const $r=a.createSelector(Ae),Br=a.createSelector(e=>e.hostRequirements.node.ok&&(e.hostRequirements.git.available||Ae(e))),Vr=a.createSelector(e=>{const t=e.hostRequirements.providerCli;return t?{context:t.context,warnings:g(t.warnings)}:void 0}),zr="22.0.0";function Vt(e){return e.length>15?`${e.slice(0,15)}…`:e}function H(e){return e.name?.trim()||Vt(e.clientId)}function Kr(e){const{eligibleClients:t,ownClientId:s,driving:r,pinnedClientId:n}=e,o=t.find(l=>l.clientId===s&&l.connected),c=r!==null&&!r.connected,i=!r||r.clientId===s;return{mode:c?"offline":i?"here":"elsewhere",hostName:r?H(r):o?H(o):"",canSwitchHere:!!(o&&n!==s)}}const Jr=a.createSelector(e=>e?.browserClients?.ownClientId??null),Yr=a.createSelector(e=>e?.browserClients?.ownClientIdConfirmed===!0);a.createSelector(e=>g(e.browserClients.liveClients));const Xr=a.createSelector((e,t)=>t?e?.browserClients?.byWorkspaceId[t]?.liveClientsLoaded??!1:e?.browserClients?.liveClientsLoaded??!1);a.createSelector((e,t)=>k(e.browserClients.liveClients,t));const Zr=a.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).browserClient),Qr=a.createSelector((e,t)=>{const s=e?.browserClients?.byWorkspaceId[t];return s?.pinnedClientId!==void 0||s?.browserClient!=null});function X(e){const t=e.prettyHostname??e.hostname??e.name;return{clientId:e.clientId,...t!==void 0?{name:t}:{},connected:!0}}const en=a.createSelector((e,t)=>{const s=e?.browserClients??Q,r=s.byWorkspaceId[t]?.liveClients??ee(),n=g(r).filter(y=>y.capabilities.browserExec===!0).map(X),o=(s.byWorkspaceId[t]??Z).browserClient,c=s.byWorkspaceId[t],i=c?.pinnedClientId!==void 0?c.pinnedClientId:o?.source==="workspace"?o.clientId:null,l=i===null?Et(o):void 0;let m=null;if(o?.resolved){const y=k(r,o.resolved.clientId);m=y?X(y):{...o.resolved,connected:!0}}else o?.source==="workspace"?m={clientId:o.clientId,connected:!1}:l&&(m={clientId:l.clientId,connected:!1});return{eligibleClients:n,ownClientId:s.ownClientId??"",routedVia:o?.source==="default"?l?.via:void 0,driving:m,pinnedClientId:i}}),tn=a.createSelector((e,t)=>{const s=e?.browserClients??Q;if(!s.ownClientId||!s.ownClientIdConfirmed)return!1;const r=s.byWorkspaceId[t]?.liveClients??ee(),n=k(r,s.ownClientId);return n!==void 0&&n.capabilities.browserExec!==!0}),sn=a.createSelector((e,t,s)=>{const r=e?.browserClients??Q,n=s?r.byWorkspaceId[s]?.liveClients??ee():r.liveClients,o=s?r.byWorkspaceId[s]?.liveClientsLoaded:r.liveClientsLoaded,c=k(n,t);return c?{name:H(X(c)),connected:!0}:{name:H({clientId:t}),connected:!o}}),rn=a.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).tabsRevision),nn=a.createSelector(e=>Object.entries(e.browserClients?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),N=new Map;function an(e,t){return N.set(e,t),()=>{N.get(e)===t&&N.delete(e)}}async function on(e){const t=N.get(e);return t?t():null}function cn(e){N.delete(e)}const Ee="From repo config",ln="repo-config";function un(e,t){return t==="repo-config"?p.workspace_setupScriptEditor_fromRepoConfig_name():t==="custom"?p.workspace_setupScriptEditor_custom_name():e}function Re(e){if(!e||typeof e!="object"||Array.isArray(e))return{setupScript:null};const t=e.setupScript;return{setupScript:typeof t=="string"&&t.trim().length>0?t:null}}function zt(e){let t;try{t=JSON.parse(e)}catch{return null}return Re(t).setupScript}async function dn(e){if(!e)return null;try{const t=await w(Rt.SETUP_SCRIPTS.READ_REPO_CONFIG,{repoPath:e}),s=t?.success?t.data?.content:null;return typeof s=="string"?zt(s):null}catch{return null}}async function pn(e,t,s){if(!e||!t)return null;try{const{appClient:r}=await q(async()=>{const{appClient:o}=await import("./BV3MrUXO.js").then(c=>c.p);return{appClient:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url),n=await r.integrations.githubRepoConfig(e,t,s);return Re(n.config).setupScript}catch{return null}}function mn(e){const t=e.setupScript.trim();return t?e.setupScriptNameSource==="repo-config"&&e.setupScriptName===Ee&&e.repoConfigScriptRepo===e.repoPath&&t===(e.repoConfigScript??"").trim()?void 0:t:e.explicitChoice?"cd .":void 0}function hn(e){const{repoConfigScript:t,lastUsed:s,genericTemplate:r}=e;return t?{content:t,name:Ee,source:"repo-config"}:s?{content:s.content,name:s.nameSource==="repo-config"?"Custom":s.name,source:s.nameSource==="repo-config"?"custom":s.nameSource??"named"}:r?{content:r.content,name:r.name,source:"named"}:{content:"",name:"Custom",source:"custom"}}const Te="setup-scripts:last-used-by-repo",Pe="setup-scripts:recent-by-repo",$=20,Oe=10,Kt=["repo-config","custom","named"];function ne(e,t){return t?`${e}\0${t}`:e}function We(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return typeof t.name=="string"&&typeof t.content=="string"&&t.content.trim().length>0&&typeof t.usedAt=="string"&&(t.nameSource===void 0||Kt.includes(t.nameSource))}function B(){try{const e=localStorage.getItem(Te);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,n]of Object.entries(t))r&&We(n)&&(s[r]=n);return s}catch{return{}}}function Ne(){try{const e=localStorage.getItem(Pe);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,n]of Object.entries(t)){if(!r||!Array.isArray(n))continue;const o=n.filter(We);o.length>0&&(s[r]=o)}return s}catch{return{}}}function Jt(e,t){return e.name===t.name&&(e.nameSource??"named")===(t.nameSource??"named")&&e.content.trim()===t.content.trim()}function xe(e){return[...e].sort((t,s)=>s.usedAt.localeCompare(t.usedAt))}function Me(e){const t=[];for(const s of e)t.some(r=>Jt(r,s))||t.push(s);return t}function fn(e,t){if(!e)return[];const s=ne(e,t),r=Ne()[s]??[],n=B()[s];return Me(xe(n?[...r,n]:r)).slice(0,Oe).map(c=>({name:c.name,content:c.content,nameSource:c.nameSource??"named",usedAt:c.usedAt}))}function Yt(e,t,s){try{const r=Ne(),n=r[e]??(s?[s]:[]);r[e]=Me([t,...xe(n)]).slice(0,Oe);const o=Object.entries(r);o.length>$&&(o.sort(([,c],[,i])=>i[0].usedAt.localeCompare(c[0].usedAt)),o.length=$),localStorage.setItem(Pe,JSON.stringify(Object.fromEntries(o)))}catch{}}function Sn(e,t){if(!e)return;const s=B()[ne(e,t)];return s?{name:s.name,content:s.content,nameSource:s.nameSource??"named"}:void 0}function gn(e,t,s){const r=t.content.trim();if(!e||!r)return;const n=ne(e,s),o={name:t.name,content:r,usedAt:new Date().toISOString(),nameSource:t.nameSource??"named"};Yt(n,o,B()[n]);try{const c=B();c[n]=o;const i=Object.entries(c);i.length>$&&(i.sort(([,l],[,m])=>m.usedAt.localeCompare(l.usedAt)),i.length=$),localStorage.setItem(Te,JSON.stringify(Object.fromEntries(i)))}catch{}}const Xt={async isAuthenticated(e){try{return await w(P.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async getAuthState(e=!1,t){try{return await w(P.GET_AUTH_STATE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return{isAuthenticated:!1,requiresDaemonAuth:!0}}},async getStatus(e){try{return await w(P.GET_STATUS,...e===void 0?[]:[{workspaceId:e}])}catch{return{isConfigured:!1,oauthUrl:""}}},async fetchMyIssues(e="assigned",t){return(await this.fetchMyIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async fetchMyIssuesPage(e="assigned",t){try{return await w(P.FETCH_MY_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async searchIssuesPage(e,t){try{return await w(P.SEARCH_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}}},yn=Object.freeze(Object.defineProperty({__proto__:null,linearAuthClient:Xt},Symbol.toStringTag,{value:"Module"})),_={IS_AUTHENTICATED:"sentry-auth:is-authenticated",SAVE_CONFIG:"sentry-auth:save-config",GET_AUTH_STATE:"sentry-auth:get-auth-state",LOGOUT:"sentry-auth:logout",FETCH_PROJECTS:"sentry-auth:fetch-projects",FETCH_ISSUES:"sentry-auth:fetch-issues",SEARCH_ISSUES:"sentry-auth:search-issues",GET_ISSUE:"sentry-auth:get-issue"},Zt={async isAuthenticated(e){try{return await w(_.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async saveConfig(e,t){return await w(_.SAVE_CONFIG,{organization:e,apiToken:t})},async getAuthState(e){try{return await w(_.GET_AUTH_STATE,...e===void 0?[]:[{workspaceId:e}])}catch{return{isAuthenticated:!1}}},async logout(){await w(_.LOGOUT)},async fetchProjects(e){try{return await w(_.FETCH_PROJECTS,...e===void 0?[]:[{workspaceId:e}])}catch{return[]}},async fetchIssues(e){return(await this.fetchIssuesPage(e)).issues},async fetchIssuesPage(e){try{return await w(_.FETCH_ISSUES,e)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t)).issues},async searchIssuesPage(e,t,s){try{return await w(_.SEARCH_ISSUES,{query:e,project:t,...s})}catch{return{issues:[],nextToken:null}}},async getIssue(e,t){try{return await w(_.GET_ISSUE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return null}}},bn=Object.freeze(Object.defineProperty({__proto__:null,sentryAuthClient:Zt},Symbol.toStringTag,{value:"Module"})),ae=a.createSelector(e=>{const t=v.select(e);return!t||!ct.select(e)?null:JSON.stringify([t,e.hostExecution.generation,e.repositoryCheckout.authorityGeneration,e.gitlabAuth.host,e.gitlabAuth.instanceBaseUrl,e.gitlabAuth.statusReady,e.gitlabAuth.isConfigured,e.gitlabAuth.user])}),K=a.createSelector((e,t)=>k(e.repositoryCheckout.forms,t)??null),kn=a.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.projects):[]}),wn=a.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.branches):[]}),Qt=a.createSelector((e,t)=>{const s=K.select(e,t);return!s||s.status!=="ready"||s.admission!==ae.select(e)||!s.capture||!s.project||!s.branch?null:{checkoutId:s.capture.checkoutId,revision:s.capture.revision,projectPath:s.project.projectPath,branch:s.branch.name,commitSha:s.branch.commitSha,mode:s.mode}}),In=a.createSelector((e,t)=>{const s=Qt.select(e,t);return!!s&&(s.mode==="direct"||K.select(e,t)?.warmStatus==="ready")}),_n="__new-workspace__",vn="__initializer__",Cn="compact-workspace-initializer-state-prompt",An="onboarding-prompt",U=20*1024*1024,ye=Nt("NewWorkspaceDraft");function En(e,t){if(e.length>U)return ye.warn("Draft text exceeds the size guard; skipping persistence",{textLength:e.length,limit:U}),null;const s=Tt(t);if(s.length===0)return{text:e};const r=[];let n=e.length+2,o=0;for(const c of s){const i=JSON.stringify(c).length+1;if(n+i>U){o+=1;continue}r.push(c),n+=i}return o>0&&ye.warn("Draft attachments exceed the size guard; persisting the ones that fit",{limit:U,attachmentCount:s.length,droppedCount:o}),r.length>0?{text:e,attachments:r}:{text:e}}const es="host.providerAuthStatus";function ts(e={}){const t={};return e.workspaceId&&(t.workspaceId=e.workspaceId),typeof e.providerId=="string"&&e.providerId.length>0&&(t.providerId=e.providerId),typeof e.force=="boolean"&&(t.force=e.force),t}function ss(e,t){const s=t.toLowerCase(),r=e.toLowerCase();return s.startsWith(r)?/^(['’]s\s+organization)?$/.test(s.slice(r.length)):!1}function rs(e){const{email:t,orgName:s}=e??{};return t&&s?ss(t,s)?t:`${t} · ${s}`:t||s||void 0}function ns(e){const t={};for(const s of e?.providers??[]){const r={authenticated:s.authenticated??void 0},n=rs(s.identity);n!==void 0&&(r.authDetails=n),s.identity?.email&&(r.email=s.identity.email),t[s.id]=r}return t}const as=6e4,E=new Map,j=new Map,A=new Map;let F=0,Le=0;const os=e=>JSON.stringify([it.select(a.state),Le,e.workspaceId??null,e.providerId??"*"]);function cs(e){if(e.method!=="events.event"||!e.params)return;const t=e.params,r=(t.event&&typeof t.event=="object"?t.event:t).type;return typeof r=="string"?r:void 0}function J(e){if(F+=1,e)for(const t of E.keys()){const[,,,s]=JSON.parse(t);(s===e||s==="*")&&E.delete(t)}else E.clear()}typeof pe=="function"&&pe(e=>{["provider:auth-changed","host:execution-context-changed"].includes(cs(e)??"")&&J()});typeof me=="function"&&me(()=>{Le+=1,J()});function is(e={}){const t=os(e);if(e.force)J(e.providerId);else{const o=E.get(t);if(o&&o.expiresAt>Date.now())return Promise.resolve(o.verdicts);o&&E.delete(t)}const s=j.get(t);if(!e.force&&s?.generation===F)return s.promise;if(s){const o=A.get(t);if(o)return o.force||=e.force===!0,o.promise;let c;const i=s.promise.catch(()=>({})).then(()=>(A.get(t)===c&&A.delete(t),is({...e,force:c.force}))).finally(()=>{A.get(t)===c&&A.delete(t)});return c={force:e.force===!0,promise:i},A.set(t,c),i}const r=F,n=Ce(es,ts(e)).then(ns).then(o=>(r===F&&E.set(t,{verdicts:o,expiresAt:Date.now()+as}),o)).finally(()=>{j.get(t)?.promise===n&&j.delete(t)});return j.set(t,{generation:r,promise:n}),n}function Rn(e,t=e,s="default",r,n){if(!xt.select(a.state))return;const o=n??rt.select(a.state,t)??nt.select(a.state,t)[0];if(!o)return;const c=at.select(a.state,t,o),i={type:"discussion",title:r??(s==="new"?p.workspace_discussion_new_title():p.workspace_discussion_title()),workspaceId:e,closable:!0,data:{conversationId:s}},l=c?.tabs.find(m=>Fe(m,i));s==="new"&&a.dispatch(He(e)),a.dispatch(l?$e(t,l.id,o):Be(t,i,o,void 0,!0,void 0,!0))}function Tn(e,t){return e.name?.trim()?e.name.trim():e.kind==="workspace"?e.id&&e.id!=="default"?p.workspace_discussion_conversation_title():p.workspace_discussion_title():e.participants.filter(r=>r.principalId!==t).map(r=>r.displayName||r.login||p.workspace_discussion_unknownAuthor_label()).join(", ")||p.workspace_discussion_group_title()}const ls=a.createSelector((e,t,s)=>{const r=ve(e.repositoryContext,t);return s!==null&&r.binding===s?r:null});a.createSelector((e,t,s)=>{const r=ls.select(e,t.workspaceId,s);return r?.status==="ready"?k(r.roots,x(t))?.context:void 0});const Pn=a.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission)return null;const s=ve(e.repositoryContext,t.workspaceId),r=s.ownership;return!r||r.demandId!==t.demandId||r.admission!==t.admission||r.request.workspaceId!==t.workspaceId?null:{status:s.status,scope:s.scope,revision:s.revision,roots:s.status==="ready"?g(s.roots).map(n=>n.context):[],unavailableReason:s.unavailableReason}}),On=a.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission)return null;const s=e.repositoryContext.selectionEdits,r=s?k(s,t.editId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&x(r.owner.root)===x(t.root)?r:null}),Wn=a.createSelector((e,t)=>{const s=e.repositoryContext.selectionEdits;return!!s&&g(s).some(r=>r.owner.root.workspaceId===t&&r.owner.admission===v.select(e)&&(r.status==="capturing"||r.status==="pending"&&(!r.observation||r.observation.attempt?.status==="pending")))}),Nn=a.createSelector((e,t)=>{if(t.admission===null||v.select(e)!==t.admission||t.hostContext===null||lt.select(e,t.root.workspaceId)!==t.hostContext)return null;const s=e.repositoryContext.nativeReviewAttempts,r=s?k(s,t.attemptId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&r.owner.hostContext===t.hostContext&&x(r.owner.root)===x(t.root)?r:null}),xn=a.createSelector((e,t)=>e.repositoryContext.nativeReviewAttempts?k(e.repositoryContext.nativeReviewAttempts,t):void 0),us=["venv",".venv","virtualenv","node_modules","google-cloud-sdk","__pycache__",".pytest_cache",".mypy_cache",".ruff_cache",".tox",".nox"];function ds(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function ps(e){const t=new Set(us);return ds(e).some(s=>t.has(s))}const ms=new Set(["lastActivity","statusMessage","statusImageAssetId"]),hs=new Set([".git",".playwright-cli",".svelte-kit",".vite",".turbo",".cache",".parcel-cache",".next",".nuxt",".output","build","coverage","dist","playwright-report","target","test-results"]);function fs(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function Ss(e){if(!e.type.startsWith("file:"))return null;const t=e.data,s=t?.relativePath??t?.path??t?.filePath;return typeof s=="string"&&s.length>0?s:null}function gs(e){const t=Ss(e);return!t||ps(t)?!1:!fs(t).some(s=>hs.has(s))}function ys(e){if(e.type==="workspace:displayStatus-changed")return!0;if(e.type!=="workspace:updated")return!1;const t=e.data;if(!t?.changes||typeof t.changes!="object"||Array.isArray(t.changes))return!1;const s=Object.keys(t.changes).filter(r=>r!=="workspaceId");return s.length>0&&s.every(r=>ms.has(r))}function h(e){return typeof e=="string"?e.trim():""}function R(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function be(e){const t=R(e.data),s=h(t.agentId)||h(e.sessionId),r=h(t.messageId);return s&&r?JSON.stringify([s,r]):""}function bs(e){const t=R(e.data),s={workspaceId:e.workspaceId,closable:!0},r=n=>n?{...s,type:"note",noteId:n,title:h(t.title)||h(t.noteTitle)||p.layout_tabTypes_note_title()}:null;switch(e.type){case"note:created":case"note:updated":case"comment:added":case"comment:resolved":return r(h(t.noteId));case"task:status-changed":return r(h(t.noteId)||h(t.linkedNoteId));case"spec:updated":case"goal:updated":return r("spec");case"agent:created":case"agent:renamed":case"agent:restored":case"agent:updated":case"agent:message":case"agent:user-message:sent":{const n=h(t.agentId)||h(e.sessionId);return n?{...s,type:"agent",agentId:n,title:h(t.agentName)||p.layout_tabTypes_agent_title()}:null}case"file:changed":{const n=h(t.path)||h(t.relativePath);return n&&t.action!=="delete"?{...s,type:"file",filePath:n,title:n.split(/[\\/]/).pop()||n}:null}case"git:commit":{const n=h(t.commit),o=h(t.gitRootId);return n?{...s,type:"changes",title:p.layout_tabTypes_changes_title(),data:{commitHash:n,...o?{gitRootId:o}:{}}}:null}default:return null}}function ke(e,t){const s=R(e.data),r=Object.fromEntries(Object.entries(s).filter(([,c])=>typeof c=="string")),n=c=>t?p.workspace_peopleActivity_actorAction_label({name:t,action:c}):c;switch(e.type){case"note:created":case"note:updated":case"note:deleted":case"spec:updated":case"goal:updated":return O({...e,actor:{...e.actor,name:t},data:r});case"agent:created":case"agent:renamed":case"agent:deleted":case"agent:restored":case"git:commit":case"git:push":case"git:pull":case"git:branch":case"git:merge":return n(O({...e,actor:{...e.actor,name:void 0},data:r}));case"agent:updated":return h(s.modelId)||s.completionReportCleared===!0?n(O({...e,actor:{...e.actor,name:void 0},data:s})):null;case"file:changed":return gs(e)?O({...e,actor:{...e.actor,name:t},data:{path:h(s.path)||h(s.relativePath),action:h(s.action)}}):null;case"comment:added":return t?p.events_activity_authorCommented_label({author:t}):p.workspace_peopleActivity_commented_label();case"comment:resolved":return s.resolved===!1?n(p.events_activity_reopenedCommentThread_label()):s.resolved===!0?n(p.events_activity_resolvedCommentThread_label()):null;case"agent:message":case"agent:user-message:sent":{const c=h(s.agentName)||h(s.toAgentName);return n(c?p.workspace_peopleActivity_messagedAgent_label({agent:c}):p.workspace_peopleActivity_sentMessage_label())}case"task:status-changed":return n(O({...e,actor:{...e.actor,name:void 0},data:{taskName:h(s.taskName)||h(s.noteTitle),newStatus:h(s.newStatus)||h(s.status)}}));case"workspace:created":return n(p.events_activity_createdWorkspace_label());case"workspace:updated":{if(ys(e))return null;const c=R(s.changes);if(Object.keys(c).filter(l=>l!=="workspaceId").length===0)return null;const i=h(c.title);return n(i?p.events_activity_renamedWorkspaceTo_label({title:i}):p.events_activity_updatedWorkspace_label())}default:return null}}function W(e,t){const s=h(e);return s===t||/^(user|you|system|unknown|anonymous|local user)$/i.test(s)?"":s}function ks(e,t,s,r){const n=new Map(s.map(u=>[u.principalId,u])),o=new Map;for(const u of t){if(u.workspaceId!==e||u.type!=="agent:last-message")continue;const d=R(u.data),f=de({role:d.role==="user"?"user":"system",author:d.author,metadata:d.metadata}),S=be(u);if(!f||!S||typeof d.lastUserMessage!="string")continue;const b=Pt({id:h(d.messageId),role:"user",timestamp:u.timestamp,contentBlocks:[{type:"text",text:d.lastUserMessage}],author:f,metadata:d.metadata},r);b&&o.set(S,b)}const c=new Set,i=new Set,l=[];let m=0;for(const u of t){if(u.workspaceId!==e||!h(u.id)||c.has(u.id))continue;const d=Date.parse(u.timestamp);if(!Number.isFinite(d)){m++;continue}const f=R(u.data),S=u.type==="agent:message",b=S?de({role:f.role==="user"?"user":"system",author:f.author,metadata:f.metadata}):null;if(S?!b:u.actor?.type!=="user"){S&&f.role==="user"&&u.actor?.type==="user"&&ut(f.metadata)&&l.push({row:null,timestamp:d,segment:m});continue}const qe=S?h(f.messageId):"",T=S?be(u):"";if(T&&i.has(T))continue;const C=h(u.actor?.id),Y=C?n.get(C):void 0,L=b?W(b.displayName,b.principalId??"")||W(b.login,b.principalId??""):W(u.actor.name,C)||W(Y?.displayName,C)||W(Y?.login,C),ce=ke(u,"");if(!ce)continue;if(!L){l.push({row:null,timestamp:d,segment:m});continue}const D=S?o.get(T)??null:null,ie=D?p.workspace_peopleActivity_actorAction_label({name:L,action:D}):ke(u,L);ie&&(c.add(u.id),T&&i.add(T),l.push({timestamp:d,segment:m,row:{id:u.id,name:L,principalId:b?h(b.principalId)||null:C||null,avatarUrl:b?b.avatarUrl:Y?.avatarUrl??null,label:ie,actionLabel:D??ce,continuation:!1,timestamp:u.timestamp,destination:bs(u),messageId:qe||null,messagePreview:D}}))}l.sort((u,d)=>d.timestamp-u.timestamp);const y=[];for(const[u,d]of l.entries()){if(!d.row)continue;const f=l[u-1],S=f?f.timestamp-d.timestamp:NaN;d.row.continuation=!!(d.row.principalId&&f?.row?.principalId===d.row.principalId&&f.segment===d.segment&&Number.isFinite(S)&&S>=0&&S<=15*6e4),y.push(d.row)}return y}const Mn=a.createSelector(e=>e.workspaceEvents.subscriptionAttempt),Ln=a.createSelector(e=>e.workspaceEvents.subscriptionGeneration),ws=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).events),Dn=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).nextToken),Un=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]?.peopleRequestId??null)!==null),jn=a.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleError??null),Gn=a.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleInitialized??!1),De=a.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).peopleStreams),qn=a.createSelector((e,t)=>Object.values(De.select(e,t)).every(s=>s.initialized&&s.nextToken===null)),Fn=a.createSelector((e,t,s)=>{const r=ws.select(e,t),o=ks(t,r,_t.select(e,t),M.select(e,t)?.ownerPrincipalId)[s-1]?.timestamp,c=De.select(e,t);return["user","message"].filter(i=>{const l=c[i];if(!l.initialized)return!0;if(l.nextToken===null)return!1;const m=r.find(y=>y.id===l.oldestEventId)?.timestamp;return!o||!m||!(Date.parse(m)<=Date.parse(o))})}),Hn=a.createSelector((e,t)=>{const s=[],r=new Set,n=new Set,o=c=>{const i=c.block.attachmentId??c.id;if(!r.has(i)){if(!c.block.attachmentId&&c.block.data&&!c.block.dataTruncated){const l=`${c.block.mimeType}/${c.block.data}`;if(n.has(l))return;n.add(l)}r.add(i),s.push(c)}};for(const[c,i]of Object.entries(Ot.select(e,t)))for(const l of g(i))l.imageData&&l.imageMimeType?o({id:`draft/${c}/${l.id}`,name:l.label,block:{type:"image",data:l.imageData,mimeType:l.imageMimeType}}):l.type==="file"&&(l.attachmentId||l.placementStatus)&&o({id:`draft/${c}/${l.id}`,name:l.label,placementStatus:l.placementStatus,block:{type:l.attachmentMimeType?.startsWith("image/")?"image":"file",attachmentId:l.attachmentId,mimeType:l.attachmentMimeType,fileName:l.label,size:l.attachmentSize}});for(const c of dt.select(e,t)){const i=pt.select(e,c),l=[...mt.select(e,c),...ht.select(e,c)];for(const m of l)if(m.role==="user")for(const[y,u]of(m.contentBlocks??[]).entries()){if(u.type!=="image"&&!Wt(u))continue;const d=u.id?i?.[Ve(m.id,u.id)]:void 0,f=d?.status==="loaded"?d.block:u;o({id:`${c}/${m.id}/${u.id??y}`,name:f.fileName,block:f,agentId:c,messageId:m.id,hydration:d})}}return s}),Is=a.createSelector((e,t)=>e.context.byWorkspaceId[t]??ze),_s=a.createSelector((e,t)=>g(Is.select(e,t).items)),$n=a.createSelector((e,t)=>_s.select(e,t).filter(s=>!s.parentNoteId)),Bn=a.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedAgentIds??Ue),Vn=a.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedFilePaths??Ue),Ue={},zn=a.createSelector((e,t,s)=>{const r=e.gitWrite.byWorkspaceId[t]?.operations;return r?k(r,s):void 0}),je=a.createSelector((e,t)=>{const s=e.gitWrite.byWorkspaceId[t]?.operations;return s?g(s):[]}),Kn=a.createSelector((e,t)=>je.select(e,t).some(s=>s.status==="queued"||s.status==="running")),Jn=a.createSelector((e,t)=>je.select(e,t).filter(s=>s.operation.kind==="partialCommit"&&(s.status==="queued"||s.status==="running")));function we(e){return e.title||`PR #${e.number}`}const oe=a.createSelector((e,t)=>{const s=e.gitRoots?.byWorkspaceId?.[t];return s?g(s.gitRoots):[]});function vs(e){return{key:"primary",isPrimary:!0,path:e.worktreePath??e.path,branch:e.branch,repoOwner:e.repositoryOwner,repoName:e.repositoryName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests}}function Cs(e){return{key:e.id,isPrimary:!1,path:e.path,branch:e.branch,repoOwner:e.repoOwner,repoName:e.repoName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests,gitRoot:e}}const Yn=a.createSelector((e,t)=>{const s=M.select(e,t),r=oe.select(e,t).map(Cs);return s?[vs(s),...r]:r}),Xn=a.createSelector((e,t)=>oe.select(e,t).length>0),Zn=a.createSelector(e=>Object.entries(e.gitRoots?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),As=a.createSelector((e,t,s)=>k((e.acceptWorkflow.byWorkspaceId[t]??Ke).operations,s)),Qn=a.createSelector((e,t,s)=>As.select(e,t,s)?.status==="running"),ea=a.createSelector((e,t)=>e.acceptWorkflow.byWorkspaceId[t]?.mergeDrawerOpen??!1),ta=a.createSelector((e,t)=>{const s=ft.select(e,t)?.hasRemote??!1,r=M.select(e,t)?.pullRequests?.some(n=>n.status===le.Open||n.status===le.Draft)??!1;return{squash:!1,viaPR:s&&r,pushAfter:s,...e.acceptWorkflow.byWorkspaceId[t]?.mergeOptions}}),sa=a.createSelector(e=>Object.keys(e.acceptWorkflow.byWorkspaceId).filter(t=>e.acceptWorkflow.byWorkspaceId[t].observerRequested)),ra=a.createSelector((e,t)=>{const s=M.select(e,t),r=St.select(e,t),n=gt.select(e,t),o=s?.repositoryOwner&&s.repositoryName?`${s.repositoryOwner}/${s.repositoryName}`:void 0,c=vt(Ct(s?.pullRequests,s?.activePullRequest,(i,l)=>At(i,s?.repositoryOwner,s?.repositoryName,l),we,o),yt.select(e,t),o,oe.select(e,t),we).own;return{visible:(e.acceptWorkflow.byWorkspaceId[t]?.consumerCount??0)>0,ready:kt.select(e,t),owner:!bt.select(e,t),authenticated:Mt.select(e),pushedCount:r.filter(i=>i.isPushed).length,hasRemote:n.hasRemote,clearReset:n.hasResetToTrunk&&c.some(i=>i.status!=="merged"),clearMerge:!!(n.mergeHeadSha&&r[0]?.hash&&n.mergeHeadSha!==r[0].hash)}}),na=a.createSelector((e,t,s)=>e.bgExecutor?.byWorkspaceId[t]?.executors[s]??Je),Es=a.createSelector((e,t)=>e.prWorkflow.byWorkspaceId[t]??Ye);a.createSelector((e,t,s)=>Es.select(e,t).operations[s]);const aa=a.createSelector(e=>Object.keys(e.noteReadTracking.unreadNoteIds)),oa=a.createSelector(e=>e.noteReadTracking.readRecords),Rs="host.providerTestPrompt",Ts=jt("ok",[he({ok:fe(!0)}).passthrough(),he({ok:fe(!1),reason:Se().min(1),message:Se()}).passthrough()]),Ps=3e5;async function ca(e){const t=await Ce(Rs,{providerId:e.providerId,...e.model?{model:e.model}:{}},{timeoutMs:Ps}),s=Ts.parse(t);return(s.ok||s.reason==="auth-required")&&J(e.providerId),s}const Os=-1,Ws=/^remote-script-lost:\s*/,Ns=["idle","starting","running","restarting","exited"],Ie=e=>!!e&&typeof e=="object"&&!Array.isArray(e),_e=e=>typeof e=="string"&&e.trim().length>0;function xs(e){return Ie(e)&&_e(e.remoteAgentId)&&_e(e.nodeId)&&Ie(e.runtime)&&Ns.includes(e.runtime.status)}function ia(e){return Array.isArray(e.machineRuns)?e.machineRuns.filter(xs):[]}function la(e,t,s){const r=Lt(e.nodeId,s)??{nodeId:e.nodeId,name:p.remoteAgent_location_unknownMachine(),platform:null,state:"ready"};if(s&&s.id===e.nodeId)return r;const n=t?.nodeId===e.nodeId?t:null;return{...r,name:n?.nodeName?.trim()||r.name,platform:Dt(n?.placement?.os,n?.placement?.arch)}}function Ms(e){return e.status==="exited"&&e.exitCode===Os}function Ls(e){const t=e.error?.trim().replace(Ws,"").trim();switch(t){case"the machine disconnected":return p.scripts_remote_lostDisconnected_label();case"the machine was removed":return p.scripts_remote_lostRemoved_label();case"the agent was deleted":return p.scripts_remote_lostAgentDeleted_label();case"the agent was stopped for good":return p.scripts_remote_lostAgentStopped_label();default:return t||p.scripts_remote_lostReason_fallback()}}function ua(e){if(Ms(e))return{kind:"lost",label:p.scripts_remote_lost_tooltip({reason:Ls(e)})};const t=Ut(e);switch(t){case"running":return{kind:t,label:p.terminal_quakeOverlay_status_running()};case"restarting":return{kind:t,label:p.workspace_devScripts_restarting_label()};case"idle":return{kind:t,label:p.terminal_quakeOverlay_status_idle()};case"succeeded":return{kind:t,label:p.terminal_quakeOverlay_status_exitedZero()};case"failed":return{kind:t,label:p.terminal_quakeOverlay_status_errorCode({code:e.exitCode??1})};case"stopped":return{kind:t,label:p.terminal_quakeOverlay_status_stoppedSignal({signal:(e.exitCode??128)-128})};default:return{kind:t,label:p.terminal_quakeOverlay_status_exited()}}}const G=e=>typeof e=="string"&&e.length>0,Ds=/\bremote-script-agent-ending:/;function da(e){return!!e&&Ds.test(e)}function pa(e){if(!e||typeof e!="object")return null;const t=e.data;if(!t||typeof t!="object")return null;const s=t,r=e instanceof Error&&e.message?{message:e.message}:{};return s.code==="machine-update-required"?{success:!1,code:"machine-update-required",update:s.update==="backend"?"backend":"machine",...G(s.machineVersion)?{machineVersion:s.machineVersion}:{},...G(s.backendVersion)?{backendVersion:s.backendVersion}:{},...r}:s.code==="machine-unreachable"?{success:!1,code:"machine-unreachable",attempts:Array.isArray(s.attempts)?s.attempts.flatMap(o=>{const c=o??{};return G(c.route)&&G(c.error)?[{route:c.route,error:c.error}]:[]}):[],...r}:null}function ma(e){const s=e.filter(n=>n.runtime.status==="running"&&n.runtime.detectedUrl?.trim()).sort((n,o)=>(o.runtime.startedAt??"").localeCompare(n.runtime.startedAt??""))[0],r=s?.runtime.detectedUrl?.trim();return!s||!r?null:{scriptId:s.id,name:s.name,url:r}}const Us={status:"idle",error:null},js=a.createSelector((e,t)=>e.workspaceLifecycle.loadByWorkspaceId[t]??Us);a.createSelector((e,t)=>js.select(e,t).error);const ha=a.createSelector((e,t)=>k(e.workspace.workspaces,t)??e.workspace.pendingCreations[t]),Ge=a.createSelector((e,t)=>e.workspaceLifecycle.sessionPhaseByWorkspaceId[t]),Gs=e=>e==="hydrated"||e==="live",fa=a.createSelector((e,t)=>{const s=Ge.select(e,t);return s==="hydrated"||s==="live"}),Sa=a.createSelector(e=>{const t=e.workspaceLifecycle.sessionPhaseByWorkspaceId;return Object.keys(t).filter(s=>Gs(t[s]))}),ga=a.createSelector((e,t)=>Ge.select(e,t)==="live");function ya(e){const{selectedProviderId:t,activeProviderId:s,recommitActive:r,dispatch:n}=e;if(t&&!(!r&&t===s))return n(Xe({providerId:t,enabled:!0})),n(Ze(t)),n(Qe()),t}function ba(e){const t=[];for(const s of e){let r={};if(s.metadata)try{r=JSON.parse(s.metadata)}catch{}const n=[];if(n.push(`[${s.identifier}] ${s.title}`),s.url&&n.push(`URL: ${s.url}`),s.description&&n.push(`
|
|
3
3
|
Description:
|
|
4
4
|
${s.description}`),r.state&&n.push(`Status: ${r.state}`),r.teamName&&n.push(`Team: ${r.teamName}`),r.priority!==void 0){const o=["No priority","Urgent","High","Medium","Low"];n.push(`Priority: ${o[r.priority]||r.priority}`)}r.assignee&&n.push(`Assignee: ${r.assignee}`),t.push({type:s.itemType||"unknown",provider:s.provider,identifier:s.identifier,title:s.title,url:s.url,content:n.join(`
|
|
5
|
-
`),metadata:r})}return t}function ka(e){const t=[];for(const s of e){if(s.type!=="file")continue;let r=s.meta?.fullPath||s.meta?.path||"";if(!r&&s.id?.startsWith("file-")){const n=s.id.slice(5);(n.startsWith("/")||/^[A-Za-z]:/.test(n))&&(r=n)}if(!r&&s.uri)if(s.uri.startsWith("devspace://file/"))try{r=decodeURIComponent(s.uri.slice(16))}catch{}else s.uri.startsWith("file:")&&(r=s.uri.slice(5));r||(r=s.label||s.meta?.name||""),t.push({type:"file",path:r,title:s.label})}return t}async function wa(e,t){const s=[];for(const r of e){if(r.type==="terminal")try{const{terminalManager:n}=await q(async()=>{const{terminalManager:l}=await import("./Vn5GukrK.js").then(m=>m.c);return{terminalManager:l}},__vite__mapDeps([25,3,2,20,21,12,8,0,1,4,5,6,7,9,10,11,13,14,15,16,17,18,19,22,23,24,26,27,28,29,30,31,32,33,34]),import.meta.url),o=r.meta?.workspaceId||"",c=r.id??"",i=await n.getBufferContent(c,o);i&&s.push({type:"terminal",content:i,title:r.label,metadata:{terminalName:r.label,terminalId:c}})}catch(n){t?.warn("[OnboardingContext] Failed to read terminal buffer:",n)}if(r.type==="script")try{const{selectScriptById:n,selectScriptRuntime:o}=await q(async()=>{const{selectScriptById:S,selectScriptRuntime:b}=await import("./
|
|
5
|
+
`),metadata:r})}return t}function ka(e){const t=[];for(const s of e){if(s.type!=="file")continue;let r=s.meta?.fullPath||s.meta?.path||"";if(!r&&s.id?.startsWith("file-")){const n=s.id.slice(5);(n.startsWith("/")||/^[A-Za-z]:/.test(n))&&(r=n)}if(!r&&s.uri)if(s.uri.startsWith("devspace://file/"))try{r=decodeURIComponent(s.uri.slice(16))}catch{}else s.uri.startsWith("file:")&&(r=s.uri.slice(5));r||(r=s.label||s.meta?.name||""),t.push({type:"file",path:r,title:s.label})}return t}async function wa(e,t){const s=[];for(const r of e){if(r.type==="terminal")try{const{terminalManager:n}=await q(async()=>{const{terminalManager:l}=await import("./Vn5GukrK.js").then(m=>m.c);return{terminalManager:l}},__vite__mapDeps([25,3,2,20,21,12,8,0,1,4,5,6,7,9,10,11,13,14,15,16,17,18,19,22,23,24,26,27,28,29,30,31,32,33,34]),import.meta.url),o=r.meta?.workspaceId||"",c=r.id??"",i=await n.getBufferContent(c,o);i&&s.push({type:"terminal",content:i,title:r.label,metadata:{terminalName:r.label,terminalId:c}})}catch(n){t?.warn("[OnboardingContext] Failed to read terminal buffer:",n)}if(r.type==="script")try{const{selectScriptById:n,selectScriptRuntime:o}=await q(async()=>{const{selectScriptById:S,selectScriptRuntime:b}=await import("./CsC_AG5b.js");return{selectScriptById:S,selectScriptRuntime:b}},__vite__mapDeps([35,4,5,3,6,7,8,9,2,10,11,12,36,37,14,15,13,16,17,18,19,38,39,40,41,42,43,44,45,23,32,46,21,20,47,48,24,1,49]),import.meta.url),{readScriptContextOutputLines:c}=await q(async()=>{const{readScriptContextOutputLines:S}=await import("./D89PDrKh.js");return{readScriptContextOutputLines:S}},__vite__mapDeps([50,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,51,45,41,32,38,52,36,37,39,40,42,43,44,46,47,48,49,35]),import.meta.url),i=r.meta?.workspaceId||"",l=r.id??"",m=a.state,y=await c(m,i,l),u=n.select(m,i,l),d=o.select(m,i,l);let f=`Script: ${u?.name||r.label}
|
|
6
6
|
`;if(f+=`Command: ${u?.command||"unknown"}
|
|
7
7
|
`,f+=`Status: ${d.status}`,d.exitCode!==null&&d.exitCode!==void 0&&(f+=` (exit code: ${d.exitCode})`),f+=`
|
|
8
8
|
`,d.detectedUrl&&(f+=`URL: ${d.detectedUrl}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{_ as Z}from"./O1QHAURn.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./8NIig13l.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./bnlzpH0C.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BCrxos2w.js","/app/immutable/chunks/CNt46_Sl.js","/app/immutable/chunks/O1QHAURn.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/CNLEkESE.js","/app/immutable/chunks/VZEkDWIM.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/DNqM68dO.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BUzdsYyD.js","/app/immutable/chunks/BBDxUL80.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CovkQMd0.js","/app/immutable/chunks/B0f-om7y.js","/app/immutable/chunks/C2mPABxH.js","/app/immutable/chunks/CAyg2ijY.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CR_t_AVn.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/4kJJ0Qm4.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/xEfOpOba.js","/app/immutable/chunks/BkT9o_nd.js","/app/immutable/chunks/NVLznFEf.js","/app/immutable/chunks/B6kyqBFl.js","/app/immutable/chunks/B1mZq3ve.js","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/RoOfSbrC.js","/app/immutable/chunks/Csj7SEat.js","/app/immutable/chunks/DrbtWgvN.js","/app/immutable/chunks/BVs4aETe.js","/app/immutable/chunks/BgLcfABG.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/BbjrS_gZ.js","/app/immutable/chunks/BV3MrUXO.js","/app/immutable/chunks/DRjQ_WEk.js","/app/immutable/chunks/CvF0K_Ij.js","/app/immutable/chunks/haHmm526.js","/app/immutable/chunks/BV0i7JjW.js","/app/immutable/chunks/BH3LKWph.js","/app/immutable/chunks/DV9nY0bt.js","/app/immutable/chunks/CWDPeeaf.js","/app/immutable/chunks/BgCTNfXj.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/CqO6BKca.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BsieX9dN.js","/app/immutable/assets/observe-overflow.CbDLK6fN.css","/app/immutable/chunks/BViMgwIT.js","/app/immutable/chunks/DEEBY1o3.js","/app/immutable/chunks/CQkmEJ54.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/BeP4UORy.js","/app/immutable/chunks/CerLhVOI.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/DwupWOJr.js","/app/immutable/chunks/Drd3_KgI.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/DH8Uc9s3.js","/app/immutable/chunks/Be14EhuN.js","/app/immutable/chunks/CQqORW76.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/DUPPDYfv.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css","/app/immutable/chunks/CDiEfEmo.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/lkH5RFQO.js","/app/immutable/chunks/DlwwHsb5.js","/app/immutable/assets/AttachmentPreview.BCSCCZGm.css","/app/immutable/chunks/BmrtciWO.js","/app/immutable/chunks/D_DOc2Os.js","/app/immutable/chunks/B9iMH0o9.js","/app/immutable/assets/accessibility.CP-rioAF.css","/app/immutable/assets/DiagramPresentation.Bfi3xHm0.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as Z}from"./O1QHAURn.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./CNt46_Sl.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./BCrxos2w.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as pt,br as y,a_ as q,bz as bt,bt as Pt,b as Ct,bp as vt,bv as h}from"./O1QHAURn.js";import{bs as $t,ca as E,aD as n,c9 as i,a7 as J,ay as _,W as w,bn as kt,bS as St,aA as B,aB as yt}from"./DYhIMPy1.js";import{G as _t}from"./CovkQMd0.js";import{c as wt}from"./C2mPABxH.js";import{b7 as Bt}from"./
|
|
1
|
+
import{t as pt,br as y,a_ as q,bz as bt,bt as Pt,b as Ct,bp as vt,bv as h}from"./O1QHAURn.js";import{bs as $t,ca as E,aD as n,c9 as i,a7 as J,ay as _,W as w,bn as kt,bS as St,aA as B,aB as yt}from"./DYhIMPy1.js";import{G as _t}from"./CovkQMd0.js";import{c as wt}from"./C2mPABxH.js";import{b7 as Bt}from"./CDiEfEmo.js";import{Ix as u,eu as It,ev as Wt,J2 as Rt,Jj as Ut,J7 as Tt,uS as Dt,o2 as V}from"./DNqM68dO.js";import{g as At}from"./DfN8_dcw.js";import{bA as Ft,bC as Ht,dr as xt}from"./VZEkDWIM.js";import{C as f}from"./DypB-Dwi.js";import"./XyeZJ2nm.js";import"./CAyg2ijY.js";import"./BBDxUL80.js";import{bc as Mt}from"./B0f-om7y.js";import"./CR_t_AVn.js";import"./CvF0K_Ij.js";import{T as Nt}from"./B2xn6k89.js";import"./BgCTNfXj.js";import{M as Lt}from"./C64Iv2ib.js";import{V as qt}from"./CyQ_uOB0.js";import{O as Et}from"./vL5AniQ9.js";import{bR as Jt,bL as Vt,b6 as Gt}from"./CNLEkESE.js";import{i as Kt}from"./H2jLkRRS.js";var Ot=yt("<!> <!>",1);function jt(I,p){if(new.target)return pt({component:jt,...I});$t(p,!0);const W=()=>h(et,"$workspace",m),P=()=>h(Y,"$ftChanges$",m),G=()=>h(Z,"$ftCommits$",m),R=()=>h(Q,"$foldUnchanged",m),U=()=>h(z,"$lineWrapping",m),T=()=>h(X,"$diffSideBySide",m),[m,K]=Pt(),O=t=>{qt(t,{embedded:!0,get foldEnabled(){return R()},onToggleFold:()=>u.dispatch(Tt()),get wrapEnabled(){return U()},onToggleWrap:()=>u.dispatch(Ut()),get splitEnabled(){return T()},onToggleSplit:()=>u.dispatch(Rt())})},j=t=>{var e=Ot(),r=_(e);{let l=i(()=>vt.layout_diffHeader_goToFile_tooltip());wt(r,()=>Lt,(S,ht)=>{ht(S,{get icon(){return Mt},get label(){return n(l)},onclick:zt=>ft()})})}var s=St(r,2);{var d=l=>{Et(l,{get filePath(){return n($)},get workspaceId(){return o()},isDirectory:!1,embedded:!0,get workspaceFolderPath(){return n(v)}})};q(s,l=>{n($)&&l(d)})}w(t,e)},z=Jt(),Q=Vt(),X=Gt();let a=y(p,"tab",7),o=y(p,"workspaceId",7),b=y(p,"isActive",7);const C=Bt(()=>o()),Y=Ft(C),Z=Ht(C),tt=new Set([f.Committed,f.Pushed,f.PullRequest,f.Merged,f.Trunk]),D=At(),et=xt(C),nt=i(()=>W()?.worktreePath||W()?.repositoryPath||void 0);E(()=>{const t=o();if(!(!b()||!t||n(c)))return u.dispatch(It(t,"all")),()=>u.dispatch(Wt(t,"all"))});const c=i(()=>a().data?.gitRootId),A=i(()=>a().data?.gitRootPath),v=i(()=>n(A)||n(nt)),$=i(()=>a().diffPath&&n(v)?Kt(a().diffPath)?a().diffPath:`${n(v)}/${a().diffPath}`:null);function F(t,e){return!!(t.file===e||t.relativePath===e||t.relativePath&&e.endsWith("/"+t.relativePath)||t.file&&e.endsWith("/"+t.file)||t.relativePath&&t.relativePath.endsWith("/"+e)||t.file&&t.file.endsWith("/"+e))}function H(t){return!t||n(c)?null:P().find(e=>F(e,t)&&(e.stage==="staged"||e.stage==="unstaged"))??null}function at(t){if(!t||n(c))return null;let e=null,r=-1/0;for(const s of P()){if(!F(s,t)||!tt.has(s.stage)||!s.commitHash)continue;const d=s.attribution?.timestamp??0;d>=r&&(e=s,r=d)}return e}function it(t,e){return!!(t===e||e.endsWith("/"+t)||t.endsWith("/"+e))}function rt(t){if(!t||n(c))return null;for(const e of G())if(e?.hash&&e.files?.some(r=>r?.path&&it(r.path,t)))return{id:`diff-${t}-${e.hash}`,file:t,relativePath:t,status:"modified",stage:f.Committed,commitHash:e.hash,stats:{additions:0,deletions:0},attribution:{timestamp:e.timestamp??Date.now()}};return null}const x=i(()=>a().diffPath?H(a().diffPath):null),st=i(()=>{if(!a().diffPath)return 0;const t=H(a().diffPath),e=P().length;if(t){const r=t.stage==="staged"?1:t.stage==="unstaged"?2:3,s=(t.stats?.additions||0)+(t.stats?.deletions||0),d=t.attribution?.timestamp?t.attribution.timestamp%1e5:0;return r*1e6+s*1e3+d+e}return e}),g=i(()=>a().data?.change),M=i(()=>a().data?.branchBaseRef),N=i(()=>a().data?.branchBaseCommitSha),ot=i(()=>!!(n(M)||n(N))),k=i(()=>{if(n(g)?.commitHash)return n(g);if(n(x))return n(x);if(n(ot)&&n(g))return n(g);const t=at(a().diffPath??null);if(t)return t;const e=rt(a().diffPath??null);return e||(n(g)?n(g):{id:`diff-${a().diffPath}`,file:a().diffPath||"",relativePath:a().diffPath||"",status:"modified",stage:f.Unstaged,stats:{additions:0,deletions:0},attribution:{timestamp:Date.now()}})});function ft(t){if(!a().diffPath)return;const r={type:"file",title:a().diffPath.split("/").pop()||a().diffPath,closable:!0,filePath:n($)||a().diffPath,workspaceId:o()};u.dispatch(Dt(o(),r))}E(()=>{!D||!b()||D.registerActions({display:O,actions:j})});function dt(t,e){u.dispatch(V(o(),crypto.randomUUID(),{kind:"stageHunk",filePath:t,hunkPatch:e,source:"diff"}))}function ut(t,e){u.dispatch(V(o(),crypto.randomUUID(),{kind:"unstageHunk",filePath:t,hunkPatch:e,source:"diff"}))}var ct={get tab(){return a()},set tab(t){a(t),B()},get workspaceId(){return o()},set workspaceId(t){o(t),B()},get isActive(){return b()},set isActive(t){b(t),B()},$set:bt,$on:(t,e)=>Ct(p,t,e)},L=J(),lt=_(L);{var mt=t=>{var e=J(),r=_(e);_t(r,()=>a().diffPath,s=>{{let d=i(()=>T()?"split":"unified"),l=i(()=>!n(c)&&n(k).stage===f.Unstaged?dt:void 0),S=i(()=>!n(c)&&n(k).stage===f.Staged?ut:void 0);Nt(s,{get active(){return b()},get change(){return n(k)},get workspaceId(){return o()},get viewMode(){return n(d)},get foldUnchanged(){return R()},get lineWrapping(){return U()},get refreshKey(){return n(st)},get branchBaseRef(){return n(M)},get branchBaseCommitSha(){return n(N)},get gitRootId(){return n(c)},get gitRootPath(){return n(A)},get onStageHunk(){return n(l)},get onUnstageHunk(){return n(S)}})}}),w(t,e)};q(lt,t=>{a().diffPath&&t(mt)})}w(I,L);var gt=kt(ct);return K(),gt}export{jt as default};
|