@intent-hq/web 2.389.1 → 2.390.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{DaQPP3_d.js → -Zg6rfog.js} +1 -1
- package/web/app/immutable/chunks/{BOyjfrDv.js → 2kr9sl0a.js} +1 -1
- package/web/app/immutable/chunks/{BRKRnHX6.js → 5Rw929MQ.js} +1 -1
- package/web/app/immutable/chunks/{Bb98JhKr.js → 6zHrL7ht.js} +1 -1
- package/web/app/immutable/chunks/{Ch6a7ELM.js → 7MNwLg3l.js} +1 -1
- package/web/app/immutable/chunks/{DZiUi6tE.js → 8NmvrAbf.js} +1 -1
- package/web/app/immutable/chunks/{DiBpIS7p.js → B1cYD5sf.js} +1 -1
- package/web/app/immutable/chunks/{CbGsjkOn.js → B6c2kL4w.js} +2 -2
- package/web/app/immutable/chunks/{J2YvrN12.js → B75YmuDW.js} +3 -3
- package/web/app/immutable/chunks/{pe4pVEc5.js → BABPbAn1.js} +1 -1
- package/web/app/immutable/chunks/{PX_tznAF.js → BAwfT99s.js} +1 -1
- package/web/app/immutable/chunks/{ClbQbaTd.js → BBRFTdr4.js} +1 -1
- package/web/app/immutable/chunks/{B7zssCpp.js → BD_S4uTD.js} +1 -1
- package/web/app/immutable/chunks/{BvZOajsk.js → BEhUDDmK.js} +1 -1
- package/web/app/immutable/chunks/{-MOfUnWK.js → BI8cL-JN.js} +1 -1
- package/web/app/immutable/chunks/{Rtit513z.js → BIjxJZ5i.js} +1 -1
- package/web/app/immutable/chunks/{B_EaOuZ7.js → BIkp_Hmt.js} +1 -1
- package/web/app/immutable/chunks/{DnhCnCMz.js → BKKERvpk.js} +1 -1
- package/web/app/immutable/chunks/{D78ptBES.js → BLg51chm.js} +3 -3
- package/web/app/immutable/chunks/{rdKijoRw.js → BPXITtd5.js} +1 -1
- package/web/app/immutable/chunks/{CJ7X12Bw.js → BR96U9Wd.js} +1 -1
- package/web/app/immutable/chunks/{BaH6sH1s.js → BTEHnOFb.js} +1 -1
- package/web/app/immutable/chunks/{BjDM3rxu.js → BX0V9vST.js} +2 -2
- package/web/app/immutable/chunks/{D-19S-7Z.js → BYxTMRdy.js} +1 -1
- package/web/app/immutable/chunks/{Dgc0jIMe.js → Bc1BuSIT.js} +1 -1
- package/web/app/immutable/chunks/{DNnyE4a4.js → BcEFHs1M.js} +1 -1
- package/web/app/immutable/chunks/{CUeJC-BW.js → BgL-Z3DM.js} +1 -1
- package/web/app/immutable/chunks/{BkqNdsh1.js → BgnV10Sc.js} +2 -2
- package/web/app/immutable/chunks/{JZ-O0OQl.js → Bi8MRKMx.js} +1 -1
- package/web/app/immutable/chunks/{DXY_Cr2S.js → Bizymm2G.js} +1 -1
- package/web/app/immutable/chunks/{-iNNNnZP.js → BjuRA2LN.js} +1 -1
- package/web/app/immutable/chunks/{cTFeOFQC.js → Bm6N2soI.js} +4 -4
- package/web/app/immutable/chunks/{BvDFX1mj.js → BnknS-C6.js} +1 -1
- package/web/app/immutable/chunks/{DA_7jaWc.js → BotNUGl4.js} +3 -3
- package/web/app/immutable/chunks/{BjVkuF0t.js → BpQNd38A.js} +1 -1
- package/web/app/immutable/chunks/{DIvSo5Nm.js → Bq4K4JBr.js} +1 -1
- package/web/app/immutable/chunks/{CY1uQ_EK.js → Br0totzy.js} +1 -1
- package/web/app/immutable/chunks/{DjbX62Cx.js → BrtJC6OX.js} +1 -1
- package/web/app/immutable/chunks/{D5WcE_P_.js → Bs_2q1R8.js} +1 -1
- package/web/app/immutable/chunks/{D915og2m.js → Bs_TRDLE.js} +1 -1
- package/web/app/immutable/chunks/{DJ_B6Tb0.js → BsouhNTN.js} +1 -1
- package/web/app/immutable/chunks/{r3TSpOm2.js → Bttnblj5.js} +1 -1
- package/web/app/immutable/chunks/{DlWizs9I.js → Bwe7RKw-.js} +1 -1
- package/web/app/immutable/chunks/{yqU168vt.js → BxQzAB5H.js} +1 -1
- package/web/app/immutable/chunks/{BSXmccL1.js → ByGh65n0.js} +7 -7
- package/web/app/immutable/chunks/{1biRkLeO.js → C-llZXnj.js} +1 -1
- package/web/app/immutable/chunks/{DPhH7vBg.js → C3WhRTo5.js} +1 -1
- package/web/app/immutable/chunks/{DAoh5LIP.js → C3s2I-px.js} +1 -1
- package/web/app/immutable/chunks/{iTNhB2TC.js → C4u2zmyj.js} +1 -1
- package/web/app/immutable/chunks/{DMomDPVD.js → C6dmVB1C.js} +4 -4
- package/web/app/immutable/chunks/{IvX_QTkj.js → C7KJ2WWY.js} +1 -1
- package/web/app/immutable/chunks/{B2_6AX8w.js → C8LWodzW.js} +2 -2
- package/web/app/immutable/chunks/{OIB4u9ZA.js → C8ukaQ4v.js} +1 -1
- package/web/app/immutable/chunks/{C5YfJpVq.js → C97rJdwd.js} +2 -2
- package/web/app/immutable/chunks/{BPcs9j0t.js → CAUT4r9n.js} +1 -1
- package/web/app/immutable/chunks/{RWuDgH63.js → CCdFHP5T.js} +1 -1
- package/web/app/immutable/chunks/{BqCpnQY_.js → CRPm4Pj6.js} +1 -1
- package/web/app/immutable/chunks/{DYcuijJl.js → CSEXx_lD.js} +1 -1
- package/web/app/immutable/chunks/{BouO3S3L.js → CZtfaUbt.js} +1 -1
- package/web/app/immutable/chunks/{fKOcHw3K.js → C_O50F5M.js} +1 -1
- package/web/app/immutable/chunks/{sPwEr0L4.js → CaTfcRGE.js} +2 -2
- package/web/app/immutable/chunks/{DRD4T4u0.js → Cb0GBy9I.js} +2 -2
- package/web/app/immutable/chunks/{rEuNpCjM.js → CebXSmXo.js} +1 -1
- package/web/app/immutable/chunks/{B_QbDMuF.js → CfXgD_Pw.js} +1 -1
- package/web/app/immutable/chunks/{BUo-3nO7.js → CgrukgLv.js} +1 -1
- package/web/app/immutable/chunks/{tqn1yslZ.js → CjGXnvXd.js} +6 -6
- package/web/app/immutable/chunks/{2TDNGwi2.js → Cjn3mkT-.js} +1 -1
- package/web/app/immutable/chunks/{CmR2cnYT.js → CmfAV5b9.js} +1 -1
- package/web/app/immutable/chunks/{C1_cc_jh.js → CnpTi_2q.js} +2 -2
- package/web/app/immutable/chunks/{D6m95MWL.js → CovKrpBE.js} +1 -1
- package/web/app/immutable/chunks/{Cekr5Jry.js → Cp0zjovM.js} +1 -1
- package/web/app/immutable/chunks/{Cu11OjbU.js → CqCb3N-V.js} +4 -4
- package/web/app/immutable/chunks/{BPmcj0VV.js → Cqrn6Iuw.js} +1 -1
- package/web/app/immutable/chunks/{BNu0Ucwh.js → CsJwP4fg.js} +1 -1
- package/web/app/immutable/chunks/{CUsiQpqx.js → CyzdJWF0.js} +1 -1
- package/web/app/immutable/chunks/{CHaC_gXH.js → CzEoKeV2.js} +3 -3
- package/web/app/immutable/chunks/{lskgWJFV.js → D-9KNtuV.js} +1 -1
- package/web/app/immutable/chunks/{lei6Hlse.js → D-osFWh4.js} +1 -1
- package/web/app/immutable/chunks/{kzuAnGps.js → D06KyCnD.js} +1 -1
- package/web/app/immutable/chunks/{BfnPC1r8.js → D09F61W3.js} +1 -1
- package/web/app/immutable/chunks/{CKxZ8tlS.js → D4xriAny.js} +1 -1
- package/web/app/immutable/chunks/{EAuFbzCr.js → D5Jqamkx.js} +1 -1
- package/web/app/immutable/chunks/{UsyUyHOM.js → D69-2bhh.js} +1 -1
- package/web/app/immutable/chunks/{CnNk48uP.js → D7TF3ktW.js} +1 -1
- package/web/app/immutable/chunks/{CeaP52uL.js → D9ejVVI8.js} +1 -1
- package/web/app/immutable/chunks/{CVtmf86l.js → D9vbo-CC.js} +3 -3
- package/web/app/immutable/chunks/{j5mPVG9_.js → DAHeBTvv.js} +1 -1
- package/web/app/immutable/chunks/{CTflyKHO.js → DFOcWzwz.js} +1 -1
- package/web/app/immutable/chunks/{Cs6KI4dy.js → DGdVv1yv.js} +1 -1
- package/web/app/immutable/chunks/{D3R31YXQ.js → DJwakuJL.js} +1 -1
- package/web/app/immutable/chunks/{CG1puMxA.js → DOy5PC7K.js} +1 -1
- package/web/app/immutable/chunks/{CoGKQKFb.js → DPqjG1Qz.js} +1 -1
- package/web/app/immutable/chunks/{D1CvgUga.js → DQTlXZTK.js} +1 -1
- package/web/app/immutable/chunks/{MzHad0-m.js → DR942Ajh.js} +1 -1
- package/web/app/immutable/chunks/{56loFVfQ.js → DVx4z2O_.js} +1 -1
- package/web/app/immutable/chunks/{CbwlFeZe.js → DWP4pi_Q.js} +1 -1
- package/web/app/immutable/chunks/{Cj89j1C-.js → DXLbZrSI.js} +1 -1
- package/web/app/immutable/chunks/{CTFqJlwB.js → DZ-x-eWR.js} +1 -1
- package/web/app/immutable/chunks/{BdrLG-E0.js → DZ6KouyB.js} +1 -1
- package/web/app/immutable/chunks/{Dz-zX_Ts.js → DZaRsTHz.js} +1 -1
- package/web/app/immutable/chunks/{ChXsVZci.js → DhZ3_JXX.js} +1 -1
- package/web/app/immutable/chunks/{BiZ5HCfj.js → Dn2kTCYW.js} +1 -1
- package/web/app/immutable/chunks/{CyDuWtxr.js → Dnkb7G58.js} +1 -1
- package/web/app/immutable/chunks/{Dm9VEl_l.js → DpkDQyZQ.js} +1 -1
- package/web/app/immutable/chunks/{C9Sx9tb_.js → Dv1h77Vp.js} +1 -1
- package/web/app/immutable/chunks/{CpQ2QLnc.js → DvhzK-4t.js} +1 -1
- package/web/app/immutable/chunks/{B8rKVMLL.js → DyLaiVzG.js} +1 -1
- package/web/app/immutable/chunks/{Bc1CpNLz.js → Dzy45J4U.js} +1 -1
- package/web/app/immutable/chunks/{CcDyBqhb.js → E1ou7S5Q.js} +2 -2
- package/web/app/immutable/chunks/{DQVuWRan.js → Gz_O-dMq.js} +1 -1
- package/web/app/immutable/chunks/{C4wGdw9l.js → HlKQh-jr.js} +1 -1
- package/web/app/immutable/chunks/{BqXtiIKZ.js → J2joGn0l.js} +1 -1
- package/web/app/immutable/chunks/{CQlYR8ss.js → Klbdavqn.js} +1 -1
- package/web/app/immutable/chunks/{X6hYTxgn.js → PslMlnNq.js} +1 -1
- package/web/app/immutable/chunks/{B-tK7hOH.js → Qe8C2Z8H.js} +1 -1
- package/web/app/immutable/chunks/{B7-Rf8Ja.js → RhUR09AA.js} +1 -1
- package/web/app/immutable/chunks/{DLnFsCgA.js → Ve-0_aGT.js} +3 -3
- package/web/app/immutable/chunks/{DWt5yjbU.js → WbzVOnzB.js} +2 -2
- package/web/app/immutable/chunks/{DAwK7LKd.js → XwUFesej.js} +1 -1
- package/web/app/immutable/chunks/{BbrUifYV.js → Y3Xkuhtt.js} +1 -1
- package/web/app/immutable/chunks/{B3FnJcLx.js → YmRtKLCw.js} +1 -1
- package/web/app/immutable/chunks/{OtJAfUmG.js → ggXs_b9y.js} +1 -1
- package/web/app/immutable/chunks/{Db4jRBl0.js → j1QbeoGS.js} +1 -1
- package/web/app/immutable/chunks/{UZYqZZXR.js → nBmxMCff.js} +1 -1
- package/web/app/immutable/chunks/{DSjchUEk.js → prVatUwz.js} +1 -1
- package/web/app/immutable/chunks/{cmil589m.js → sLmWN1ks.js} +1 -1
- package/web/app/immutable/chunks/{lzi3tV-r.js → vCzBOtB7.js} +1 -1
- package/web/app/immutable/entry/{app.CD-KpBFY.js → app.Ck7KNM4b.js} +2 -2
- package/web/app/immutable/entry/start.DjIjqTgP.js +1 -0
- package/web/app/immutable/nodes/{0.BTKBksQU.js → 0.BL1rQnVQ.js} +1 -1
- package/web/app/immutable/nodes/{1.CDH50XYo.js → 1.BLzCq48F.js} +1 -1
- package/web/app/immutable/nodes/{10.BSK1ezgF.js → 10.CQRco_pp.js} +1 -1
- package/web/app/immutable/nodes/{11.BkTyY8lh.js → 11.CqlkrbW8.js} +1 -1
- package/web/app/immutable/nodes/{15.CRngZgh2.js → 15.Bl9Ro66C.js} +1 -1
- package/web/app/immutable/nodes/{19.CI9f3oHV.js → 19.CeE6vjuX.js} +2 -2
- package/web/app/immutable/nodes/{2.BPIXyW9K.js → 2.DjFjqnV0.js} +1 -1
- package/web/app/immutable/nodes/{3.CjIzds8z.js → 3.BCbxJGeq.js} +1 -1
- package/web/app/immutable/nodes/{4.BzXxqxag.js → 4.CL0JqE8n.js} +1 -1
- package/web/app/immutable/nodes/{5.B54vgJ_P.js → 5.hD1YagZR.js} +1 -1
- package/web/app/immutable/nodes/{6.plJT8OLe.js → 6.776DAlfQ.js} +1 -1
- package/web/app/immutable/nodes/{7.DSDH5hqz.js → 7.5BWaKbyF.js} +1 -1
- package/web/app/immutable/nodes/{8.B7U72PdE.js → 8.C_V2pSbF.js} +1 -1
- package/web/app/immutable/nodes/{9.BY44vZ0i.js → 9.CBuIBgSj.js} +2 -2
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.BtJunRGi.js +0 -1
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as i}from"./
|
|
1
|
+
import{b as i}from"./CqCb3N-V.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as Qe,bo as h,bw as Ye,b as $e,bq as nt,bm as w,bs as Ve}from"./CLAmm_T1.js";import{bo as st,bs as et,a7 as J,ay as y,aD as e,bS as L,W as c,a5 as Pe,bA as De,bH as V,bl as _e,b_ as oe,bO as de,bn as tt,bf as je,bV as Ee,aA as v,c9 as k,aB as U,be as it,b$ as lt,bj as dt,cd as ct,ca as He,bk as ut}from"./3SdAC2_C.js";import{i as G}from"./CL3a4Hm1.js";import{JH as Je,ni as pt,vh as ft}from"./B9vHutcJ.js";import{aM as ht}from"./Rtit513z.js";import{cB as vt}from"./C2UL5Ler.js";import{c as gt}from"./ChTqQfQN.js";import{i as Le,t as Ue}from"./H2jLkRRS.js";import{w as _t}from"./Bqd7fdCF.js";import{d as mt}from"./B0Z-1lwJ.js";import{F as Re,aw as bt,ax as wt,cV as Xe,aZ as qe,bg as kt,ao as yt,an as At,cS as Ge}from"./DPttSllj.js";import{m as K,w as Ft}from"./96V4v2iI.js";import{s as Ne,f as xe,c as Wt}from"./CcJmuwXr.js";import{t as Ct}from"./BwNrQXlF.js";import{w as xt}from"./TB9r2XJy.js";import"./BbYWP3Ow.js";import{i as M}from"./BFgvMDua.js";import{g as It,e as Te}from"./B1CKzIA2.js";import{c as Z}from"./BwH4Bvte.js";import{a as Pt,r as Dt}from"./Cekr5Jry.js";import{f as Mt,aa as Et}from"./nxtepGjE.js";import{t as Be}from"./DAsc1V4f.js";import{h as Ke,k as Ot,j as St,R as Rt,i as Nt,g as Tt,c as Bt,e as zt}from"./Dd-LQrG1.js";import{M as Vt}from"./BtmHyUSg.js";import{m as ze}from"./hkJYqn41.js";var jt=U('<img alt="" class="size-4"/>'),Ht=U('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Jt=U("<span> </span>"),Lt=U('<span data-menu-action-detail=""> </span>'),Ut=U('<span aria-hidden="true"><!></span>'),Ze=U("<!> <!> <!>",1),Xt=U('<div class="my-1 h-px bg-border" role="separator"></div>'),Me=U("<!> <!>",1),qt=U('<!> <p data-menu-action-note=""> </p>',1),Gt=U('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Kt=U('<p data-menu-action-note=""> </p>'),Zt=U('<div class="pl-4"><!> <!></div>'),Qt=U('<span class="sr-only"> </span>');function me(be,d){const we=st();if(new.target)return Qe({component:me,...be});et(d,!0);const Ie=(p,r=je)=>{var O=J(),S=y(O);{var j=W=>{const x=k(()=>Pt(r().editor));var H=J(),m=y(H);{var f=s=>{var i=jt();oe(()=>Ne(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=J(),b=y(i);Z(b,()=>e(x),(T,ae)=>{ae(T,{size:16})}),c(s,i)},N=s=>{{let i=k(()=>Dt(r().editor.category));Re(s,{get icon(){return e(i)},size:16})}};M(m,s=>{r().editor.iconBase64?s(f):e(x)?s(o,1):s(N,-1)})}c(W,H)},R=W=>{var x=J(),H=y(x);Ct(H,()=>r().iconSnippet),c(W,x)},q=W=>{{let x=k(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Re(W,{get icon(){return r().icon},get weight(){return X()},size:16,get class(){return e(x)}})}};M(S,W=>{r().editor?W(j):r().iconSnippet?W(R,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=je)=>{var O=Ze(),S=y(O);{var j=m=>{var f=Ht(),o=Pe(f),N=_e(o,!0);Te(o,(b,T)=>Be?.(b,T),()=>r().label);var s=L(o,2),i=_e(s,!0);De(f),oe(()=>{de(N,r().label),de(i,r().disabledReason)}),c(m,f)},R=m=>{var f=Jt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().label),oe(()=>{xe(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};M(S,m=>{r().disabledReason?m(j):m(R,-1)})}var q=L(S,2);{var W=m=>{var f=Lt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().detail),oe(()=>{xe(f,1,`ml-4 min-w-0 truncate ${(r().detailTone==="danger"?"text-danger":ze)??""}`),de(o,r().detail)}),c(m,f)};M(q,m=>{r().detail&&m(W)})}var x=L(q,2);{var H=m=>{var f=Ut(),o=Pe(f);Et(o,{children:(N,s)=>{it();var i=lt();oe(b=>de(i,b),[()=>xt(r().shortcut)]),c(N,i)},$$slots:{default:!0}}),De(f),oe(()=>xe(f,1,Wt(E()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};M(x,m=>{r().shortcut&&m(H)})}c(p,O)};let ke=h(d,"actions",7),E=h(d,"menu",7),X=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Ee(null);function Q(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return ke()},set actions(p){ke(p),v()},get menu(){return E()},set menu(p){E(p),v()},get iconWeight(){return X()},set iconWeight(p){X(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ye,$on:(p,r)=>$e(d,p,r)},se=J(),ie=y(se);return It(ie,17,ke,p=>p.id,(p,r)=>{const O=i=>{Ie(i,()=>e(r))},S=k(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),j=k(()=>e(r).disabled||e(r).disabledReason!==void 0),R=k(()=>e(r).disabledReason?`${we}-${e(r).id}-reason`:void 0);var q=Ze(),W=y(q);{var x=i=>{var b=J(),T=y(b);{var ae=a=>{var n=J(),g=y(n);Z(g,()=>Ke,(C,P)=>{P(C,{})}),c(a,n)},ue=a=>{var n=Xt();c(a,n)};M(T,a=>{E()?a(ae):a(ue,-1)})}c(i,b)};M(W,i=>{e(r).dividerBefore&&i(x)})}var H=L(W,2);{var m=i=>{var b=J(),T=y(b);{var ae=g=>{var C=J(),P=y(C);Z(P,()=>Nt,(I,D)=>{D(I,{children:(B,Y)=>{var $=Me(),pe=y($);{let te=k(()=>e(S)?O:void 0);Z(pe,()=>Ot,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=L(pe,2);{let te=k(()=>e(r).note?`${we}-${e(r).id}-note`:void 0);Z(ee,()=>St,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=Me(),l=y(t);{var _=re=>{var Ae=Me(),Fe=y(Ae);{let Ce=k(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Z(Fe,()=>Rt,(ge,Se)=>{Se(ge,{get value(){return e(Ce)},get"aria-label"(){return e(r).label},children:(rt,$t)=>{{let at=k(()=>e(r).submenu.filter(ot=>ot.checked!==void 0));me(rt,{get actions(){return e(at)},selection:"single",get menu(){return E()},get iconWeight(){return X()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var We=L(Fe,2);{let Ce=k(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(We,{get actions(){return e(Ce)},get menu(){return E()},get iconWeight(){return X()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return X()},get onClose(){return u()}})};M(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=L(l,2);{var Oe=re=>{var Ae=qt(),Fe=y(Ae);Z(Fe,()=>Ke,(ge,Se)=>{Se(ge,{})});var We=L(Fe,2),Ce=_e(We,!0);oe(()=>{Ne(We,"id",`${we}-${e(r).id}-note`),xe(We,1,`type-caption px-2 py-1 ${ze}`),de(Ce,e(r).note)}),c(re,Ae)};M(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,C)},ue=g=>{var C=J(),P=y(C);{let I=k(()=>e(S)?O:void 0);Z(P,()=>Tt,(D,B)=>{B(D,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:(Y,$)=>{ne(Y,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},a=g=>{var C=J(),P=y(C);{let I=k(()=>e(S)?O:void 0);Z(P,()=>Bt,(D,B)=>{B(D,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:(Y,$)=>{ne(Y,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},n=g=>{var C=J(),P=y(C);{let I=k(()=>e(S)?O:void 0),D=k(()=>e(r).variant==="destructive");Z(P,()=>zt,(B,Y)=>{Y(B,{get leading(){return e(I)},get destructive(){return e(D)},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,C)};M(T,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return X()},get onClose(){return u()}})},o=i=>{var b=Me(),T=y(b);{let a=k(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=k(()=>e(r).submenu?e(F)===e(r).id:void 0);Mt(T,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?V(F,e(F)===e(r).id?null:e(r).id,!0):Q(e(r)),children:(g,C)=>{var P=Gt(),I=y(P),D=Pe(I);Ie(D,()=>e(r)),De(I);var B=L(I,2);ne(B,()=>e(r));var Y=L(B,2);{var $=ee=>{{let te=k(()=>e(F)===e(r).id?bt:wt);Re(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=J(),fe=y(te);{let he=k(()=>e(r).checked?"checked":"empty");Z(fe,()=>Vt,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};M(Y,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=L(T,2);{var ue=a=>{var n=Zt(),g=Pe(n);me(g,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return X()},get onClose(){return u()}});var C=L(g,2);{var P=I=>{var D=Kt(),B=_e(D,!0);oe(()=>{xe(D,1,`type-caption px-2 py-1 ${ze}`),de(B,e(r).note)}),c(I,D)};M(C,I=>{e(r).note&&I(P)})}De(n),c(a,n)};M(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};M(H,i=>{E()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var N=L(H,2);{var s=i=>{var b=Qt(),T=_e(b,!0);oe(()=>{Ne(b,"id",e(R)),de(T,e(r).disabledReason)}),c(i,b)};M(N,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),tt(ce)}function Yt(be,d){if(new.target)return Qe({component:Yt,...be});et(d,!0);const we=()=>Ve(T,"$installedEditors$",ne),Ie=()=>Ve(ue,"$isWorkspaceHostLocal$",ne),[ne,ke]=nt();let E=h(d,"layout",7,"list"),X=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Q=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),S=h(d,"showPathCopy",7,!0),j=h(d,"showFileNameCopy",7,!1),R=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),x=h(d,"isWorkspaceRoot",7,!1),H=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=gt("WorkspaceActionsMenu");let N=!1;dt(()=>{N=!0});function s(){N||p()?.()}const i=_t("externalEditors"),b=ct(A());He(()=>{b.set(A())});const T=ht(b),ae=k(we),ue=vt(b);let a=Ee(""),n=Ee(""),g=Ee(!1);ut(()=>{Je.dispatch(pt())}),He(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");x()?V(a,le,!0):Le(u())?V(a,u().replace(/\\/g,"/"),!0):V(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),V(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else V(a,u()),V(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else V(a,u()),V(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{V(a,u()),V(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(V(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function C(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!x()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Je.dispatch(ft(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function D(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await C();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:w.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||w.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openOtherFailed_error())}}async function Y(){if(e(a))try{await navigator.clipboard.writeText(Ue(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Le(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(Ue(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Q()&&(Q()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){V(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(w.ui_workspaceActions_deletedFile_label({name:t}),Ft({duration:15e3,action:{label:w.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),mt("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(w.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(w.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||w.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(w.ui_workspaceActions_deleteFileFailed_error())}finally{V(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=k(()=>{const t=[];R()&&(i&&Ie()&&t.push({id:"open-in",label:w.ui_openCombo_openInApp_tooltip(),icon:Xe,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:w.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{D(_)}})),{id:"choose-app",label:w.ui_workspaceActions_chooseApp_label(),icon:Xe,onClick:()=>{B()}}]}),S()&&t.push({id:"copy-absolute-path",label:w.ui_workspaceActions_copyAbsolutePath_label(),icon:qe,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Y()}}),S()&&!x()&&t.push({id:"copy-relative-path",label:w.ui_workspaceActions_copyRelativePath_label(),icon:qe,disabled:!u(),onClick:()=>{$()}}),j()&&!F()&&t.push({id:"copy-file-name",label:w.ui_workspaceActions_copyFileName_label(),icon:kt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(H())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?w.ui_workspaceActions_unarchiveSpace_label():w.ui_workspaceActions_archiveSpace_label(),icon:ie()?yt:At,dividerBefore:t.length>0,onClick:fe}),r()&&Q()&&t.push({id:"delete-workspace",label:w.ui_workspaceActions_deleteSpace_label(),icon:Ge,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:w.ui_workspaceActions_deleteFile_label(),icon:Ge,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return E()},set layout(t="list"){E(t),v()},get iconWeight(){return X()},set iconWeight(t){X(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Q()},set onDelete(t=void 0){Q(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return S()},set showPathCopy(t=!0){S(t),v()},get showFileNameCopy(){return j()},set showFileNameCopy(t=!1){j(t),v()},get showFileActions(){return R()},set showFileActions(t=!0){R(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return x()},set isWorkspaceRoot(t=!1){x(t),v()},get additionalActions(){return H()},set additionalActions(t=[]){H(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ye,$on:(t,l)=>$e(d,t,l)};{let t=k(()=>E()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return X()}})}var ye=tt(ve);return ke(),ye}export{Yt as default};
|
|
1
|
+
import{t as Qe,bo as h,bw as Ye,b as $e,bq as nt,bm as w,bs as Ve}from"./CLAmm_T1.js";import{bo as st,bs as et,a7 as J,ay as y,aD as e,bS as L,W as c,a5 as Pe,bA as De,bH as V,bl as _e,b_ as oe,bO as de,bn as tt,bf as je,bV as Ee,aA as v,c9 as k,aB as U,be as it,b$ as lt,bj as dt,cd as ct,ca as He,bk as ut}from"./3SdAC2_C.js";import{i as G}from"./CL3a4Hm1.js";import{JH as Je,ni as pt,vh as ft}from"./B9vHutcJ.js";import{aM as ht}from"./BIjxJZ5i.js";import{cB as vt}from"./C2UL5Ler.js";import{c as gt}from"./ChTqQfQN.js";import{i as Le,t as Ue}from"./H2jLkRRS.js";import{w as _t}from"./Bqd7fdCF.js";import{d as mt}from"./B0Z-1lwJ.js";import{F as Re,aw as bt,ax as wt,cV as Xe,aZ as qe,bg as kt,ao as yt,an as At,cS as Ge}from"./DPttSllj.js";import{m as K,w as Ft}from"./96V4v2iI.js";import{s as Ne,f as xe,c as Wt}from"./CcJmuwXr.js";import{t as Ct}from"./BwNrQXlF.js";import{w as xt}from"./TB9r2XJy.js";import"./BbYWP3Ow.js";import{i as M}from"./BFgvMDua.js";import{g as It,e as Te}from"./B1CKzIA2.js";import{c as Z}from"./BwH4Bvte.js";import{a as Pt,r as Dt}from"./Cp0zjovM.js";import{f as Mt,aa as Et}from"./nxtepGjE.js";import{t as Be}from"./DAsc1V4f.js";import{h as Ke,k as Ot,j as St,R as Rt,i as Nt,g as Tt,c as Bt,e as zt}from"./Dd-LQrG1.js";import{M as Vt}from"./BtmHyUSg.js";import{m as ze}from"./hkJYqn41.js";var jt=U('<img alt="" class="size-4"/>'),Ht=U('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Jt=U("<span> </span>"),Lt=U('<span data-menu-action-detail=""> </span>'),Ut=U('<span aria-hidden="true"><!></span>'),Ze=U("<!> <!> <!>",1),Xt=U('<div class="my-1 h-px bg-border" role="separator"></div>'),Me=U("<!> <!>",1),qt=U('<!> <p data-menu-action-note=""> </p>',1),Gt=U('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Kt=U('<p data-menu-action-note=""> </p>'),Zt=U('<div class="pl-4"><!> <!></div>'),Qt=U('<span class="sr-only"> </span>');function me(be,d){const we=st();if(new.target)return Qe({component:me,...be});et(d,!0);const Ie=(p,r=je)=>{var O=J(),S=y(O);{var j=W=>{const x=k(()=>Pt(r().editor));var H=J(),m=y(H);{var f=s=>{var i=jt();oe(()=>Ne(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=J(),b=y(i);Z(b,()=>e(x),(T,ae)=>{ae(T,{size:16})}),c(s,i)},N=s=>{{let i=k(()=>Dt(r().editor.category));Re(s,{get icon(){return e(i)},size:16})}};M(m,s=>{r().editor.iconBase64?s(f):e(x)?s(o,1):s(N,-1)})}c(W,H)},R=W=>{var x=J(),H=y(x);Ct(H,()=>r().iconSnippet),c(W,x)},q=W=>{{let x=k(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Re(W,{get icon(){return r().icon},get weight(){return X()},size:16,get class(){return e(x)}})}};M(S,W=>{r().editor?W(j):r().iconSnippet?W(R,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=je)=>{var O=Ze(),S=y(O);{var j=m=>{var f=Ht(),o=Pe(f),N=_e(o,!0);Te(o,(b,T)=>Be?.(b,T),()=>r().label);var s=L(o,2),i=_e(s,!0);De(f),oe(()=>{de(N,r().label),de(i,r().disabledReason)}),c(m,f)},R=m=>{var f=Jt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().label),oe(()=>{xe(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};M(S,m=>{r().disabledReason?m(j):m(R,-1)})}var q=L(S,2);{var W=m=>{var f=Lt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().detail),oe(()=>{xe(f,1,`ml-4 min-w-0 truncate ${(r().detailTone==="danger"?"text-danger":ze)??""}`),de(o,r().detail)}),c(m,f)};M(q,m=>{r().detail&&m(W)})}var x=L(q,2);{var H=m=>{var f=Ut(),o=Pe(f);Et(o,{children:(N,s)=>{it();var i=lt();oe(b=>de(i,b),[()=>xt(r().shortcut)]),c(N,i)},$$slots:{default:!0}}),De(f),oe(()=>xe(f,1,Wt(E()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};M(x,m=>{r().shortcut&&m(H)})}c(p,O)};let ke=h(d,"actions",7),E=h(d,"menu",7),X=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Ee(null);function Q(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return ke()},set actions(p){ke(p),v()},get menu(){return E()},set menu(p){E(p),v()},get iconWeight(){return X()},set iconWeight(p){X(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ye,$on:(p,r)=>$e(d,p,r)},se=J(),ie=y(se);return It(ie,17,ke,p=>p.id,(p,r)=>{const O=i=>{Ie(i,()=>e(r))},S=k(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),j=k(()=>e(r).disabled||e(r).disabledReason!==void 0),R=k(()=>e(r).disabledReason?`${we}-${e(r).id}-reason`:void 0);var q=Ze(),W=y(q);{var x=i=>{var b=J(),T=y(b);{var ae=a=>{var n=J(),g=y(n);Z(g,()=>Ke,(C,P)=>{P(C,{})}),c(a,n)},ue=a=>{var n=Xt();c(a,n)};M(T,a=>{E()?a(ae):a(ue,-1)})}c(i,b)};M(W,i=>{e(r).dividerBefore&&i(x)})}var H=L(W,2);{var m=i=>{var b=J(),T=y(b);{var ae=g=>{var C=J(),P=y(C);Z(P,()=>Nt,(I,D)=>{D(I,{children:(B,Y)=>{var $=Me(),pe=y($);{let te=k(()=>e(S)?O:void 0);Z(pe,()=>Ot,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=L(pe,2);{let te=k(()=>e(r).note?`${we}-${e(r).id}-note`:void 0);Z(ee,()=>St,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=Me(),l=y(t);{var _=re=>{var Ae=Me(),Fe=y(Ae);{let Ce=k(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Z(Fe,()=>Rt,(ge,Se)=>{Se(ge,{get value(){return e(Ce)},get"aria-label"(){return e(r).label},children:(rt,$t)=>{{let at=k(()=>e(r).submenu.filter(ot=>ot.checked!==void 0));me(rt,{get actions(){return e(at)},selection:"single",get menu(){return E()},get iconWeight(){return X()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var We=L(Fe,2);{let Ce=k(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(We,{get actions(){return e(Ce)},get menu(){return E()},get iconWeight(){return X()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return X()},get onClose(){return u()}})};M(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=L(l,2);{var Oe=re=>{var Ae=qt(),Fe=y(Ae);Z(Fe,()=>Ke,(ge,Se)=>{Se(ge,{})});var We=L(Fe,2),Ce=_e(We,!0);oe(()=>{Ne(We,"id",`${we}-${e(r).id}-note`),xe(We,1,`type-caption px-2 py-1 ${ze}`),de(Ce,e(r).note)}),c(re,Ae)};M(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,C)},ue=g=>{var C=J(),P=y(C);{let I=k(()=>e(S)?O:void 0);Z(P,()=>Tt,(D,B)=>{B(D,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:(Y,$)=>{ne(Y,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},a=g=>{var C=J(),P=y(C);{let I=k(()=>e(S)?O:void 0);Z(P,()=>Bt,(D,B)=>{B(D,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:(Y,$)=>{ne(Y,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},n=g=>{var C=J(),P=y(C);{let I=k(()=>e(S)?O:void 0),D=k(()=>e(r).variant==="destructive");Z(P,()=>zt,(B,Y)=>{Y(B,{get leading(){return e(I)},get destructive(){return e(D)},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,C)};M(T,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return X()},get onClose(){return u()}})},o=i=>{var b=Me(),T=y(b);{let a=k(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=k(()=>e(r).submenu?e(F)===e(r).id:void 0);Mt(T,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?V(F,e(F)===e(r).id?null:e(r).id,!0):Q(e(r)),children:(g,C)=>{var P=Gt(),I=y(P),D=Pe(I);Ie(D,()=>e(r)),De(I);var B=L(I,2);ne(B,()=>e(r));var Y=L(B,2);{var $=ee=>{{let te=k(()=>e(F)===e(r).id?bt:wt);Re(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=J(),fe=y(te);{let he=k(()=>e(r).checked?"checked":"empty");Z(fe,()=>Vt,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};M(Y,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=L(T,2);{var ue=a=>{var n=Zt(),g=Pe(n);me(g,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return X()},get onClose(){return u()}});var C=L(g,2);{var P=I=>{var D=Kt(),B=_e(D,!0);oe(()=>{xe(D,1,`type-caption px-2 py-1 ${ze}`),de(B,e(r).note)}),c(I,D)};M(C,I=>{e(r).note&&I(P)})}De(n),c(a,n)};M(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};M(H,i=>{E()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var N=L(H,2);{var s=i=>{var b=Qt(),T=_e(b,!0);oe(()=>{Ne(b,"id",e(R)),de(T,e(r).disabledReason)}),c(i,b)};M(N,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),tt(ce)}function Yt(be,d){if(new.target)return Qe({component:Yt,...be});et(d,!0);const we=()=>Ve(T,"$installedEditors$",ne),Ie=()=>Ve(ue,"$isWorkspaceHostLocal$",ne),[ne,ke]=nt();let E=h(d,"layout",7,"list"),X=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Q=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),S=h(d,"showPathCopy",7,!0),j=h(d,"showFileNameCopy",7,!1),R=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),x=h(d,"isWorkspaceRoot",7,!1),H=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=gt("WorkspaceActionsMenu");let N=!1;dt(()=>{N=!0});function s(){N||p()?.()}const i=_t("externalEditors"),b=ct(A());He(()=>{b.set(A())});const T=ht(b),ae=k(we),ue=vt(b);let a=Ee(""),n=Ee(""),g=Ee(!1);ut(()=>{Je.dispatch(pt())}),He(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");x()?V(a,le,!0):Le(u())?V(a,u().replace(/\\/g,"/"),!0):V(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),V(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else V(a,u()),V(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else V(a,u()),V(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{V(a,u()),V(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(V(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function C(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!x()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Je.dispatch(ft(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function D(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await C();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:w.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||w.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openOtherFailed_error())}}async function Y(){if(e(a))try{await navigator.clipboard.writeText(Ue(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Le(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(Ue(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Q()&&(Q()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){V(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(w.ui_workspaceActions_deletedFile_label({name:t}),Ft({duration:15e3,action:{label:w.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),mt("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(w.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(w.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||w.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(w.ui_workspaceActions_deleteFileFailed_error())}finally{V(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=k(()=>{const t=[];R()&&(i&&Ie()&&t.push({id:"open-in",label:w.ui_openCombo_openInApp_tooltip(),icon:Xe,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:w.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{D(_)}})),{id:"choose-app",label:w.ui_workspaceActions_chooseApp_label(),icon:Xe,onClick:()=>{B()}}]}),S()&&t.push({id:"copy-absolute-path",label:w.ui_workspaceActions_copyAbsolutePath_label(),icon:qe,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Y()}}),S()&&!x()&&t.push({id:"copy-relative-path",label:w.ui_workspaceActions_copyRelativePath_label(),icon:qe,disabled:!u(),onClick:()=>{$()}}),j()&&!F()&&t.push({id:"copy-file-name",label:w.ui_workspaceActions_copyFileName_label(),icon:kt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(H())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?w.ui_workspaceActions_unarchiveSpace_label():w.ui_workspaceActions_archiveSpace_label(),icon:ie()?yt:At,dividerBefore:t.length>0,onClick:fe}),r()&&Q()&&t.push({id:"delete-workspace",label:w.ui_workspaceActions_deleteSpace_label(),icon:Ge,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:w.ui_workspaceActions_deleteFile_label(),icon:Ge,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return E()},set layout(t="list"){E(t),v()},get iconWeight(){return X()},set iconWeight(t){X(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Q()},set onDelete(t=void 0){Q(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return S()},set showPathCopy(t=!0){S(t),v()},get showFileNameCopy(){return j()},set showFileNameCopy(t=!1){j(t),v()},get showFileActions(){return R()},set showFileActions(t=!0){R(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return x()},set isWorkspaceRoot(t=!1){x(t),v()},get additionalActions(){return H()},set additionalActions(t=[]){H(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ye,$on:(t,l)=>$e(d,t,l)};{let t=k(()=>E()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return X()}})}var ye=tt(ve);return ke(),ye}export{Yt as default};
|
|
@@ -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"./Bwe7RKw-.js";import{p}from"./-Zg6rfog.js";import{b as t,ay as o}from"./CqCb3N-V.js";import{M as u,b as c}from"./nIshZjK_.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{k as qa,s as fa}from"./
|
|
1
|
+
import{k as qa,s as fa}from"./DWP4pi_Q.js";import{p as ma,g as Ct,I as Wa,X as Qa,e as En}from"./B1CKzIA2.js";import{aB as Ga,cX as Ka,A as Va,a_ as xn,bZ as Xa,v as Ya}from"./Klbdavqn.js";import{bm as c,t as Pt,bo as w,bw as Tt,b as Rt,bq as qn,bs as Re,br as Ja}from"./CLAmm_T1.js";import{bo as Wn,bs as Ot,a5 as O,bl as U,bS as b,bA as $,b_ as x,aD as e,W as l,ay as H,a7 as Oe,bO as L,bn as Lt,c9 as u,aA as k,aB as _,ca as ze,bH as h,b$ as Qt,bV as le,cd as Mt,br as va,be as un,c5 as Za,bi as Nn,bj as er,bf as hn,am as ta,ax as na,ai as tr,aj as nr,c0 as ar}from"./3SdAC2_C.js";import{i as M}from"./BFgvMDua.js";import{t as _a}from"./BwNrQXlF.js";import{e as rr}from"./Drl447ub.js";import{s as q,g as en,f as ve,b as sr}from"./CcJmuwXr.js";import{a as or,n as ha}from"./CfNIzRu8.js";import{r as ir,o as lr,A as aa,L as dr}from"./C8LWodzW.js";import{t as Dn}from"./DAsc1V4f.js";import{R as ra}from"./96V4v2iI.js";import{I as ba}from"./DaWmj23r.js";import"./C4jSaPCg.js";import{aO as wn,cN as ur,ax as cr,aM as pr,cH as gr,cI as fr,as as mr,au as vr,aC as _r,aI as hr,s as br,O as wr,e9 as kr,X as xr,cy as yr,c4 as $r}from"./C2UL5Ler.js";import{JH as J,cq as zn,co as wa,cr as kn,rw as Ar,E3 as Sr,fV as ka,E8 as Ir,bF as Cr,Ae as Pr,mP as sa,us as Tr,cu as Rr,v1 as oa,nM as Or,DP as Lr,E6 as Er,cc as Nr}from"./B9vHutcJ.js";import{A as Dr,b as Mr}from"./BhCMc9G0.js";import{y as Fr}from"./Bqd7fdCF.js";import{l as zr}from"./Dqi2LMpO.js";import{f as ia}from"./D09F61W3.js";import{h as Br,g as jr}from"./DfheqyY9.js";import{o as Hr,S as Ur}from"./D9vbo-CC.js";import"./CEE0831H.js";import{ae as qr,ah as Wr,f as Mn,a1 as Qr}from"./nxtepGjE.js";import{h as Gr,F as la}from"./TB9r2XJy.js";import"./CgrVbtN0.js";import{C as Kr,k as Vr,j as Xr,i as Yr}from"./Dd-LQrG1.js";import{L as Jr}from"./tCg_s90g.js";import{c as de}from"./BwH4Bvte.js";import{c as Bn,b as da,d as jn,a as Hn,A as xa}from"./prVatUwz.js";import{l as Wt,b as Zr}from"./Cu5e4npY.js";import{F as es,bb as ts}from"./BIjxJZ5i.js";import{D as ns}from"./D4d1iyeR.js";import{b as as}from"./CVWwz1Ss.js";import{T as rs}from"./DMrzeQEi.js";import"./DZzwt3PA.js";import{cl as ya,cP as ss,cO as os,bR as is,M as ls,F as yn,b5 as ds,au as us,aK as cs,aG as ps,cT as gs,be as fs,aA as ms,aL as vs,b1 as _s,ah as ua,a8 as hs,c6 as bs,ag as ws,cF as ks,an as xs,cS as ys,aD as $s}from"./DPttSllj.js";import{b as As}from"./Dn334wJv.js";import"./hkJYqn41.js";import{S as bn}from"./vj8NdGWd.js";import{E as Ss}from"./BpMXdC4H.js";import"./DtzJzV-4.js";import{f as Is}from"./Rzyk45bZ.js";import{P as Cs}from"./DxyD9o0t.js";import{b as Ps,P as Ts}from"./BksTLNI4.js";import{h as Rs,H as Os,g as Ls}from"./BzWT_wQw.js";const Es=80,Ns=10,Ds=new Ga(Ka,{renderer:{html({text:a}){return Va(a)},image({tokens:a}){return this.parser.parseInline(a)}}});function Qn(a){const n=document.createElement("template");n.innerHTML=Ds.parseInline(a,{async:!1});for(const o of n.content.querySelectorAll("br"))o.replaceWith(" ");return(n.content.textContent??"").replace(/\s+/g," ").trim()}function Ft(a){return a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`+([^`]*?)`+/g,"$1").replace(/<[^>]+>/g,"").replace(/\\([\\`*_[\]{}()#+\-.!>])/g,"$1").replace(/[*~]/g,"").replace(/(^|[^A-Za-z0-9])_+/g,"$1").replace(/_+([^A-Za-z0-9]|$)/g,"$1").replace(/\s+/g," ").trim()}function Un(a,n){return a.slice(n).replace(/^(?:[ \t]*(?:\r\n|\n|\r))+/,"")}function Sn(a,n){return!n||n.length>Es||n.split(/\s+/).length>Ns||/[.!?;]$/.test(n)?!1:!/^[ \t]*(?:[-+*][ \t]+|\d+[.)][ \t]+|>|```|~~~|\|)/.test(a)}function tl(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const i=Ft(o[1]);return Sn(o[0],i)?i:null}function Gn(a,n=!1,o=!0){const i=a.match(/^(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",r=a.slice(i.length).match(/^\*\*([^\r\n]+)\*\*[ \t]*(?:(?:\r\n|\n|\r)|$)/);if(!r)return null;if(n){const v=r[1],f=v.match(/\\+$/)?.[0].length??0;if(v!==v.trim()||v.includes("**")||v.startsWith("*")||v.endsWith("*")||f%2!==0)return null}const p=Ft(r[1]);return Sn(r[0],p)?{title:n&&o?Qn(r[1]):p,body:Un(a,i.length+r[0].length)}:null}function ca(a){const n=[];let o=a;for(;o.trim();){const i=Kn(o,!0),d=i.heading?{body:i.body}:Gn(o,!0,!1);if(!d)return null;n.push(o.slice(0,o.length-d.body.length)),o=d.body}return n.length?n:null}function nl(a){const n=[];let o=a;for(;o.trim();){const i=Kn(o,!0,Qn),d=i.heading?{title:i.heading,body:i.body}:Gn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function al(a){const n=Fs(a),o=[];let i=a;for(n.heading&&(o.push({title:n.heading,body:""}),i=n.body);i;){const d=Gn(i);if(!d||d.body.length>=i.length)break;o.push({title:d.title,body:""}),i=d.body}if(o.length===0){const d=a.trim(),r=Ft(d);return!d.includes(`
|
|
2
2
|
`)&&Sn(d,r)?[{title:r,body:""}]:d?[{title:null,body:d}]:[]}return o[o.length-1].body=i.trim(),o}function Ms(a){const n=a.replace(/^ {0,3}/,"");return!/^(?:\s|>|`{3}|~{3}|(?:[-+*]|\d+[.)])(?:[ \t]|$)|#{1,6}(?:[ \t]|$)|<|\[[^\]]*\]:)/.test(n)&&!/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})$/.test(n)}function Kn(a,n=!1,o=Ft){const i=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",d=a.slice(i.length);if(n&&/^(?: {4}| {0,3}\t)/.test(d))return{heading:null,body:a};const r=d.match(/^[ \t]{0,3}#{1,6}[ \t]+([^\r\n]*?)(?:[ \t]+#+)?[ \t]*(?:\r\n|\n|\r|$)/);if(r&&Ft(r[1]))return{heading:o(r[1]),body:Un(a,i.length+r[0].length)};const p=d.match(/^([^\r\n]+)(?:\r\n|\n|\r)([ \t]{0,3})(?:=+|-+)[ \t]*(?:\r\n|\n|\r|$)/);return p&&(!n||Ms(p[1])&&!p[2].includes(" "))&&Ft(p[1])?{heading:o(p[1]),body:Un(a,i.length+p[0].length)}:{heading:null,body:a}}function Fs(a,{preserveInlineText:n=!1}={}){const o=n?Qn:Ft,i=Kn(a,!1,o);if(i.heading)return i;const d=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",p=a.slice(d.length).match(/^([^\r\n]+)(?:\r\n|\n|\r)(?:[ \t]*(?:\r\n|\n|\r))+/);if(p){const v=Ft(p[1]),f=a.slice(d.length+p[0].length);if(f.trim()&&Sn(p[1],v))return{heading:o(p[1]),body:f}}return{heading:null,body:a}}const Gt="[--operational-row-inline-padding:var(--chat-operational-row-inline-padding,0.5rem)] [--operational-leading-slot-size:1.25rem] [--operational-leading-half-slot-size:0.625rem] [--operational-leading-gap:var(--chat-operational-leading-gap,0.5rem)]",rl="type-body font-family-child font-normal text-muted-foreground",sl=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,ol=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1.5`,il=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1`,ll=`${Gt} relative min-w-0 max-w-full`,dl=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,ul=`${Gt} operational-group-child-row ml-2 min-w-0 w-[calc(100%-0.5rem)] max-w-[calc(100%-0.5rem)]`,cl="pt-6",pl="text-muted-foreground",gl="text-muted-foreground",$a="font-normal text-muted-foreground",fl="tool-call-container group relative block w-full min-w-0 max-w-full overflow-hidden type-body font-family-child font-normal text-muted-foreground",ml="h-[16px]! w-[16px]! shrink-0",vl=`${Gt} relative grid h-7 w-full min-w-0 max-w-full grid-cols-[var(--operational-leading-slot-size)_minmax(0,1fr)_auto] items-center gap-[var(--operational-leading-gap)] overflow-hidden rounded-md px-[var(--operational-row-inline-padding)] type-body transition-colors duration-[var(--motion-fast)] motion-reduce:transition-none`,_l=`a11y-ignore pointer-events-none flex size-[var(--operational-leading-slot-size)] min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center [&_svg]:size-[16px]! ${$a}`,hl=`type-body block min-w-0 max-w-full truncate overflow-hidden text-ellipsis whitespace-nowrap border-0 bg-transparent p-0 text-left ${$a}`,bl="type-body flex min-w-0 shrink-0 items-center gap-1 whitespace-nowrap",wl="h-[16px]! w-[16px]! shrink-0 opacity-60 transition-transform duration-[var(--motion-fast)] motion-reduce:transition-none";function kl(a){return qa(a,{axis:"y",duration:ma()?0:150})}function cn(a){return a.type==="thinking"||a.type==="tool_use"||a.type==="content_group"}function xl(a){const n=a?.[0];return!n||cn(n)?"":"pt-4"}function yl(a,n,o=()=>!0){const i=a[n];if(!i||!o(i)||!cn(i))return!1;let d=n-1;for(;d>=0&&!o(a[d]);)d-=1;return d>=0&&cn(a[d])}function $l(a,n,o=()=>!0,i=!1){const d=a[n];if(!d||!o(d))return"";let r=n-1;for(;r>=0&&!o(a[r]);)r-=1;if(r<0)return"";const p=a[r];if(p.type==="thinking"&&d.type==="thinking")return i||ca(p.text??p.content??"")!==null&&ca(d.text??d.content??"")!==null?"":"pt-14";const v=cn(p),f=cn(d);return v&&f?"":p.type==="thinking"&&!f?"pt-6":v||f?"pt-4":"pt-1"}const Al="shrink-0 whitespace-nowrap text-ui text-subtle focus-visible:outline-none focus-visible:text-foreground";function zs(a){if(a?.status==="halted")return c.agent_node_halted_label();if(a?.status==="resuming")return c.agent_node_resuming_label();if(a?.placement?.target==="remote"||Fr(a?.placement?.target)){if(a.placementError)return c.remoteAgent_status_failed();if(a.cloudStart)return c.remoteAgent_status_starting();if(a.effectiveIsolation==="pending")return a.setup?.state==="pending"?c.remoteAgent_status_preparingCheckout():a.setup?.state==="running"?c.remoteAgent_status_runningSetup():c.remoteAgent_status_starting()}if(a?.placement&&a.effectiveIsolation==="pending")return c.agent_node_provisioning_label()}var Bs=_('<span class="owner-fill block h-full svelte-sxf8s9"></span>'),js=_('<span class="shrink-0 text-xs text-muted-foreground"> </span>'),Hs=_('<span class="flex items-center gap-2"><span class="group-key size-1.5 shrink-0 rounded-full svelte-sxf8s9"></span> <span class="min-w-0 flex-1"> </span> <!> <span> </span></span>'),Us=_('<dd class="col-span-2 pl-[1.125rem] text-xs text-muted-foreground wrap-anywhere"> </dd>'),qs=_(`<div class="grid grid-cols-[1fr_auto] items-baseline gap-x-3 py-0.5 text-sm"><dt class="relative min-w-0 pl-[1.125rem] wrap-anywhere before:absolute before:top-2 before:left-0 before:size-1 before:rounded-full before:bg-muted-foreground before:content-['']"> </dt> <dd> </dd> <!></div>`),Ws=_('<dl class="ml-3.5 text-foreground"></dl>'),Fn=_("<!> <!>",1),Qs=_('<span class="flex items-center gap-2"><span class="min-w-0 flex-1"> </span> <span class="shrink-0 tabular-nums text-muted-foreground"> </span></span>'),Gs=_('<div class="min-w-0"><dt class="truncate text-sm text-foreground"> </dt> <dd class="text-xs text-muted-foreground wrap-anywhere"> </dd></div>'),Ks=_('<dl class="ml-3.5 flex flex-col gap-2"></dl>'),Vs=_('<section class="min-w-0" data-testid="prompt-breakdown"><div class="mb-3 flex items-baseline justify-between gap-3"><h3 class="text-sm font-medium"> </h3> <span class="shrink-0 text-sm tabular-nums text-muted-foreground"> </span></div> <div class="owner-strip mb-2 flex h-1.5 w-full overflow-hidden svelte-sxf8s9" role="img"></div> <!></section>');function Aa(a,n){const o=Wn();if(new.target)return Pt({component:Aa,...a});Ot(n,!0);let i=w(n,"breakdown",7);const d="type-body font-normal text-foreground data-[state=open]:font-normal";function r(T){return Zr(T,{maximumFractionDigits:T<1e4?1:0})}function p(T){return T==="native"?c.agent_contextBreakdown_owner_native_label():T==="intent"?c.agent_contextBreakdown_owner_intent_label():c.agent_contextBreakdown_owner_user_label()}const v=u(()=>i().owners.map(T=>c.agent_contextBreakdown_ownerShare_label({owner:p(T.owner),tokens:r(T.estTokens)})).join(", "));var f={get breakdown(){return i()},set breakdown(T){i(T),k()},$set:Tt,$on:(T,m)=>Rt(n,T,m)},S=Vs(),y=O(S),g=O(y),N=U(g,!0),F=b(g,2),Ce=U(F,!0);$(y);var D=b(y,2);Ct(D,21,()=>i().owners,T=>T.owner,(T,m)=>{var me=Bs();let ue;x(()=>{q(me,"data-owner",e(m).owner),ue=en(me,"",ue,{"flex-grow":e(m).share})}),l(T,me)}),$(D);var P=b(D,2);return de(P,()=>xa,(T,m)=>{m(T,{type:"multiple",children:(me,ue)=>{var R=Fn(),_e=H(R);Ct(_e,17,()=>i().groups,pe=>pe.kind,(pe,K)=>{var W=Oe(),ne=H(W);de(ne,()=>Bn,(ge,Fe)=>{Fe(ge,{get value(){return e(K).kind},get"data-prompt-group"(){return e(K).kind},children:(ot,G)=>{var I=Fn(),ae=H(I);de(ae,()=>da,(he,E)=>{E(he,{level:4,children:(Le,Y)=>{var Q=Oe(),Z=H(Q);de(Z,()=>jn,(V,oe)=>{oe(V,{inset:!1,class:d,children:(ee,Ee)=>{var be=Hs(),je=O(be),et=b(je,2),ut=U(et,!0),tt=b(et,2);{var at=ct=>{var Et=js(),yt=U(Et,!0);x(X=>L(yt,X),[()=>c.agent_contextBreakdown_notCounted_label()]),l(ct,Et)};M(tt,ct=>{e(K).kind==="native"&&ct(at)})}var Ne=b(tt,2),Kt=U(Ne,!0);$(be),x((ct,Et)=>{q(je,"data-kind",e(K).kind),L(ut,ct),ve(Ne,1,`shrink-0 tabular-nums ${e(K).kind==="native"?"text-muted-foreground":""}`),L(Kt,Et)},[()=>p(e(K).kind),()=>r(e(K).estTokens)]),l(ee,be)},$$slots:{default:!0}})}),l(Le,Q)},$$slots:{default:!0}})});var Be=b(ae,2);de(Be,()=>Hn,(he,E)=>{E(he,{inset:!1,children:(Le,Y)=>{var Q=Ws();Ct(Q,21,()=>e(K).rows,Z=>Z.key,(Z,V)=>{var oe=qs(),ee=O(oe),Ee=U(ee,!0),be=b(ee,2),je=U(be,!0),et=b(be,2);{var ut=tt=>{var at=Us(),Ne=U(at,!0);x(()=>L(Ne,e(V).hint)),l(tt,at)};M(et,tt=>{e(V).hint&&tt(ut)})}$(oe),x(tt=>{L(Ee,e(V).label),ve(be,1,`tabular-nums ${e(V).counted?"":"text-muted-foreground"}`),L(je,tt)},[()=>r(e(V).estTokens)]),l(Z,oe)}),$(Q),l(Le,Q)},$$slots:{default:!0}})}),l(ot,I)},$$slots:{default:!0}})}),l(pe,W)});var ce=b(_e,2);{var xe=pe=>{var K=Oe(),W=H(K);de(W,()=>Bn,(ne,ge)=>{ge(ne,{value:"hidden-skills",class:"mt-1",children:(Fe,ot)=>{var G=Fn(),I=H(G);de(I,()=>da,(Be,he)=>{he(Be,{level:4,children:(E,Le)=>{var Y=Oe(),Q=H(Y);de(Q,()=>jn,(Z,V)=>{V(Z,{inset:!1,class:d,children:(oe,ee)=>{var Ee=Qs(),be=O(Ee),je=U(be,!0),et=b(be,2),ut=U(et,!0);$(Ee),x((tt,at)=>{L(je,tt),L(ut,at)},[()=>c.agent_contextBreakdown_hiddenSkills_title(),()=>Wt(i().hiddenSkills.length)]),l(oe,Ee)},$$slots:{default:!0}})}),l(E,Y)},$$slots:{default:!0}})});var ae=b(I,2);de(ae,()=>Hn,(Be,he)=>{he(Be,{inset:!1,children:(E,Le)=>{var Y=Ks();Ct(Y,21,()=>i().hiddenSkills,Q=>Q.name,(Q,Z)=>{var V=Gs(),oe=O(V),ee=U(oe,!0),Ee=b(oe,2),be=U(Ee,!0);$(V),x(je=>{L(ee,e(Z).name),L(be,je)},[()=>[e(Z).detail,e(Z).fix].filter(Boolean).join(" · ")]),l(Q,V)}),$(Y),l(E,Y)},$$slots:{default:!0}})}),l(Fe,G)},$$slots:{default:!0}})}),l(pe,K)};M(ce,pe=>{i().hiddenSkills.length>0&&pe(xe)})}l(me,R)},$$slots:{default:!0}})}),$(S),x((T,m)=>{q(S,"aria-labelledby",`${o}-title`),q(g,"id",`${o}-title`),L(N,T),L(Ce,m),q(D,"aria-label",e(v))},[()=>c.agent_contextBreakdown_title(),()=>c.agent_contextBreakdown_tokens_label({tokens:r(i().estTokens)})]),l(a,S),Lt(f)}const Xs=["intent","user"],Ys=["systemPrompt","toolDescription","provider"],Js=["native","user","intent"],$n=a=>typeof a=="object"&&a!==null&&!Array.isArray(a),An=a=>typeof a=="number"&&Number.isFinite(a)&&a>=0,Zs=a=>a==="intent"||a==="user";function eo(a,n){if(!$n(a))return null;const{id:o,label:i,owner:d,location:r,chars:p,estTokens:v,controlHint:f}=a;if(typeof o!="string"||typeof i!="string"||!Zs(d)||typeof r!="string"||!Ys.includes(r)||!An(p)||!An(v))return null;const S=$n(f)&&typeof f.text=="string"&&f.text;return{key:`${n}:${o}`,id:o,label:i,owner:d,chars:p,estTokens:v,counted:r!=="provider",...S?{hint:S}:{}}}function to(a){if(!$n(a))return null;const{name:n,reason:o,detail:i,fix:d}=a;return[n,o,i,d].some(r=>typeof r!="string")?null:{name:n,reason:o,detail:i,fix:d}}function no(a){if(!$n(a)||a.available!==!0)return null;const{totalChars:n,estTokens:o,sections:i,hiddenSkills:d}=a;if(!An(n)||!An(o)||!Array.isArray(i)||!Array.isArray(d))return null;const r=i.map(eo).filter(f=>f!==null).sort((f,S)=>S.chars-f.chars),p=Xs.map(f=>{const S=r.filter(g=>g.counted&&g.owner===f),y=S.reduce((g,N)=>g+N.chars,0);return{owner:f,chars:y,estTokens:S.reduce((g,N)=>g+N.estTokens,0),share:n>0?y/n:0}}).filter(f=>f.chars>0),v=Js.map(f=>{const S=r.filter(y=>f==="native"?!y.counted:y.counted&&y.owner===f);return{kind:f,chars:S.reduce((y,g)=>y+g.chars,0),estTokens:S.reduce((y,g)=>y+g.estTokens,0),rows:S}}).filter(f=>f.rows.length>0);return{totalChars:n,estTokens:o,rows:r,groups:v,owners:p,hiddenSkills:d.map(to).filter(f=>f!==null)}}async function ao(a){try{const n=await Gr("agent.getSession",{agentId:a});return no(n?.session?.promptBreakdown)}catch{return null}}const pa=es.map(a=>({key:a.path.replace(/^agentFeatures\./,""),label:a.label,description:a.description}));function ro(a){const n=a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").toLowerCase().trim();return n.charAt(0).toUpperCase()+n.slice(1)}function so(a){const n=a??{},o=pa.map(r=>({key:r.key,label:r.label(),description:r.description(),enabled:n[r.key]===!0,known:!0})),i=new Set(pa.map(r=>r.key)),d=[];for(const[r,p]of Object.entries(n))i.has(r)||d.push({key:r,label:ro(r),description:null,enabled:p===!0,known:!1});return d.sort((r,p)=>r.label.localeCompare(p.label)),o.concat(d)}var oo=_('<div class="mb-6 border-b border-border pb-6"><!></div>'),io=_("<span> </span>"),lo=_('<!> <span class="sr-only"> </span>',1),uo=_('<div role="listitem" class="text-xs text-subtle" aria-hidden="true">—</div>'),co=_('<section class="min-w-0"><h4 class="text-sm font-medium mb-3"> </h4> <div role="list" class="space-y-2"></div></section>'),po=_('<div class="@container"><!> <section><h3 class="text-sm font-medium"> </h3> <p class="mb-4 mt-1 text-sm text-muted-foreground"> </p> <div class="grid grid-cols-1 gap-6 @min-[28rem]:grid-cols-2" data-testid="harness-features-list"></div></section></div>');function Sa(a,n){const o=Wn();if(new.target)return Pt({component:Sa,...a});Ot(n,!0);let i=w(n,"open",15,!1),d=w(n,"static",7,!1),r=w(n,"version",7),p=w(n,"features",7,null),v=w(n,"agentId",7),f=w(n,"breakdown",7),S=le(null);const y=u(()=>f()===void 0&&!!v());ze(()=>{if(!i()||!e(y)||!v())return;const D=v();let P=!0;return ao(D).then(T=>{P&&h(S,{agentId:D,view:T},!0)}),()=>{P=!1}});const g=u(()=>f()!==void 0?f():e(y)&&e(S)&&e(S).agentId===v()?e(S).view:null),N=u(()=>so(p())),F=u(()=>[{enabled:!0,label:c.chat_shared_valueOn_label(),rows:e(N).filter(D=>D.enabled)},{enabled:!1,label:c.chat_shared_valueOff_label(),rows:e(N).filter(D=>!D.enabled)}]);var Ce={get open(){return i()},set open(D=!1){i(D),k()},get static(){return d()},set static(D=!1){d(D),k()},get version(){return r()},set version(D){r(D),k()},get features(){return p()},set features(D=null){p(D),k()},get agentId(){return v()},set agentId(D){v(D),k()},get breakdown(){return f()},set breakdown(D){f(D),k()},$set:Tt,$on:(D,P)=>Rt(n,D,P)};{let D=u(()=>c.chat_harnessFeaturesModal_title({version:r()}));Kr(a,{get static(){return d()},get title(){return e(D)},size:"wide",get open(){return i()},set open(P){i(P)},children:(P,T)=>{var m=po(),me=O(m);{var ue=W=>{var ne=oo(),ge=O(ne);Aa(ge,{get breakdown(){return e(g)}}),$(ne),l(W,ne)};M(me,W=>{e(g)&&W(ue)})}var R=b(me,2),_e=O(R),ce=U(_e,!0),xe=b(_e,2),pe=U(xe,!0),K=b(xe,2);Ct(K,21,()=>e(F),W=>W.enabled,(W,ne)=>{var ge=co(),Fe=O(ge),ot=U(Fe,!0),G=b(Fe,2);Ct(G,21,()=>e(ne).rows,I=>I.key,(I,ae)=>{Jr(I,{role:"listitem",class:"min-h-0 px-0 py-0 [&_.truncate]:whitespace-normal","data-testid":"harness-feature-state",get"data-feature"(){return e(ae).key},get"data-enabled"(){return e(ae).enabled},title:he=>{var E=Oe(),Le=H(E);{var Y=Z=>{var V=lo(),oe=H(V);qr(oe,{get content(){return e(ae).description},side:"top",size:"sm",children:(be,je)=>{var et=io(),ut=U(et,!0);x(()=>L(ut,e(ae).label)),l(be,et)},$$slots:{default:!0}});var ee=b(oe,2),Ee=U(ee,!0);x(()=>L(Ee,e(ae).description)),l(Z,V)},Q=Z=>{var V=Qt();x(()=>L(V,e(ae).label)),l(Z,V)};M(Le,Z=>{e(ae).description?Z(Y):Z(Q,-1)})}l(he,E)},$$slots:{title:!0}})},I=>{var ae=uo();l(I,ae)}),$(G),$(ge),x(()=>{q(ge,"aria-label",e(ne).label),L(ot,e(ne).label)}),l(W,ge)}),$(K),$(R),$(m),x((W,ne)=>{q(R,"aria-labelledby",`${o}-capabilities`),q(_e,"id",`${o}-capabilities`),L(ce,W),L(pe,ne)},[()=>c.chat_harnessFeaturesModal_capabilities_title(),()=>c.chat_harnessFeaturesModal_description()]),l(P,m)},$$slots:{default:!0}})}return Lt(Ce)}var go=_('<p role="alert" class="type-body text-danger"> </p>');function Ia(a,n){if(new.target)return Pt({component:Ia,...a});Ot(n,!0);const o=()=>Re(g,"$outcome$",i),[i,d]=qn();let r=w(n,"open",15,!1),p=w(n,"agentName",7),v=w(n,"workspaceId",7),f=w(n,"agentId",7);const S=crypto.randomUUID(),y=Mt(""),g=xn(y,S),N=u(()=>o()?.workspaceId===v()&&o().agentId===f()?o():void 0),F=u(()=>e(N)?.status==="pending"),Ce=u(()=>e(N)?.status==="failed"?e(N).error:"");ze(()=>{const m=v();return f(),y.set(m),()=>J.dispatch(zn(m,S))}),ze(()=>{e(N)?.status==="succeeded"&&(r(!1),J.dispatch(wa(v(),S,e(N).requestId)))});function D(){const m=xn.select(J.state,v(),S);m?.agentId===f()&&m.status==="pending"||J.dispatch(kn(v(),S,crypto.randomUUID(),f(),{kind:"retire"}))}var P={get open(){return r()},set open(m=!1){r(m),k()},get agentName(){return p()},set agentName(m){p(m),k()},get workspaceId(){return v()},set workspaceId(m){v(m),k()},get agentId(){return f()},set agentId(m){f(m),k()},$set:Tt,$on:(m,me)=>Rt(n,m,me)};{const m=ce=>{var xe=Oe(),pe=H(xe);{var K=W=>{var ne=go(),ge=U(ne,!0);x(()=>L(ge,e(Ce))),l(W,ne)};M(pe,W=>{e(Ce)&&W(K)})}l(ce,xe)};let me=u(()=>c.modals_retireAgent_title()),ue=u(()=>c.modals_retireAgent_description({name:p()})),R=u(()=>c.modals_retireAgent_confirm_label()),_e=u(()=>c.modals_bulkActionConfirm_cancel_label());ns(a,{get title(){return e(me)},get description(){return e(ue)},get confirmLabel(){return e(R)},get cancelLabel(){return e(_e)},focusSubmit:!1,focusCancel:!0,get busy(){return e(F)},onConfirm:D,get open(){return r()},set open(ce){r(ce)},details:m,$$slots:{details:!0}})}var T=Lt(P);return d(),T}function fo({agentName:a,specialist:n}){const o=n?`{ topLevel: true, specialist: ${JSON.stringify(n)} }`:"{ topLevel: true }",i=n?`and keep the same specialist (${JSON.stringify(n)})`:"and, if you were created with a specialist, pass that exact same `specialist` value in the options";return`Please replace yourself with a fresh top-level agent and run a gradual, coordinated hand-off:
|
|
3
3
|
|
|
4
4
|
1. Create your replacement now: call \`ws.agent.create(${JSON.stringify(a)}, kickoffMessage, ${o})\`. The first argument must be your EXACT current name (${JSON.stringify(a)}) ${i}. Write the kickoff message as a thorough context hand-off: the overall goal, the current state of the work, key notes and files, decisions already made, and open threads.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as Jt,bo as v,bm as F,bw as Xt,bs as Ye,bq as Zt,b as Qt}from"./CLAmm_T1.js";import{bs as en,c5 as Je,ca as xe,aD as t,bH as H,a5 as A,bA as I,W as L,bn as tn,c9 as d,bV as ae,cd as pt,c6 as nn,aA as m,bS as O,b_ as j,bl as Xe,bO as J,aB as T,b$ as Pe,be as sn,a7 as an,ay as Ze}from"./3SdAC2_C.js";import{i as me}from"./BFgvMDua.js";import{g as on,i as rn}from"./B1CKzIA2.js";import{f as ln}from"./CcJmuwXr.js";import{f as cn}from"./BPQFiQQc.js";import{k as dn}from"./ByyFoG6W.js";import{JH as Se,ol as fn,Ad as un,sI as bt,on as hn,ad as kt}from"./B9vHutcJ.js";import{b$ as gn,dI as vn}from"./C2UL5Ler.js";import{c as mn}from"./ChTqQfQN.js";import{c as Lt,h as He,D as pn}from"./
|
|
1
|
+
import{t as Jt,bo as v,bm as F,bw as Xt,bs as Ye,bq as Zt,b as Qt}from"./CLAmm_T1.js";import{bs as en,c5 as Je,ca as xe,aD as t,bH as H,a5 as A,bA as I,W as L,bn as tn,c9 as d,bV as ae,cd as pt,c6 as nn,aA as m,bS as O,b_ as j,bl as Xe,bO as J,aB as T,b$ as Pe,be as sn,a7 as an,ay as Ze}from"./3SdAC2_C.js";import{i as me}from"./BFgvMDua.js";import{g as on,i as rn}from"./B1CKzIA2.js";import{f as ln}from"./CcJmuwXr.js";import{f as cn}from"./BPQFiQQc.js";import{k as dn}from"./ByyFoG6W.js";import{JH as Se,ol as fn,Ad as un,sI as bt,on as hn,ad as kt}from"./B9vHutcJ.js";import{b$ as gn,dI as vn}from"./C2UL5Ler.js";import{c as mn}from"./ChTqQfQN.js";import{c as Lt,h as He,D as pn}from"./C8ukaQ4v.js";import{F as wt,ba as _t}from"./DPttSllj.js";import{f as Qe}from"./nxtepGjE.js";import"./TB9r2XJy.js";import{S as Ie}from"./Dd-LQrG1.js";import{l as bn}from"./Cu5e4npY.js";import{g as kn}from"./BrMDTgLg.js";function wn(q,c,oe,Re=1){const We=Lt(q,c,oe,"","",{context:3}),re=new Set,pe=new Set,X=_n(Re)-1,De=We.split(`
|
|
2
2
|
`);let s=0,R=0,le=!1;for(const $ of De)if($.startsWith("@@")){le=!0;const Z=$.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);Z&&(R=parseInt(Z[1],10),s=parseInt(Z[2],10))}else le&&($.startsWith("+")?(re.add(s+X),s++):$.startsWith("-")?(pe.add(R+X),R++):$.startsWith(" ")&&(s++,R++));return{additions:re,deletions:pe}}function _n(q){return Number.isFinite(q)&&q>1?Math.floor(q):1}var Ln=T("<div><!> <!></div>"),Cn=T('<div class="diff-skeleton svelte-1f4chm"><div class="diff-skeleton-header svelte-1f4chm"><!> <!></div> <div class="diff-skeleton-content svelte-1f4chm"></div></div>'),yn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-danger text-sm ml-2"> </span></div>'),xn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-subtle text-sm ml-2"> </span></div>'),Pn=T('<div class="empty-state svelte-1f4chm"><span class="text-subtle text-sm"><!></span></div>'),Sn=T('<span class="icon">+</span> ',1),Hn=T('<span class="icon">−</span> ',1),In=T('<div class="selection-action-bar svelte-1f4chm"><span class="selection-info"> </span> <!> <!></div>'),Rn=T('<div class="diff-wrapper svelte-1f4chm"><!> <div class="diff-content svelte-1f4chm"><!></div></div>'),Wn=T('<div class="tracked-change-diff-viewer svelte-1f4chm"><!></div>');function Dn(q,c){if(new.target)return Jt({component:Dn,...q});en(c,!0);const oe=()=>Ye(yt,"$read$",re),Re=()=>Ye(It,"$workspace$",re),We=()=>Ye(Rt,"$workingTreeFileContentStore",re),[re,pe]=Zt(),X=mn("TrackedChangeDiffViewer"),De=2*1024*1024;let s=v(c,"change",7),R=v(c,"active",7,!0),le=v(c,"workspaceId",7),$=v(c,"viewMode",7,"unified"),Z=v(c,"showHeader",7,!1),Ne=v(c,"foldUnchanged",7,!0),Ae=v(c,"lineWrapping",7,!1),M=v(c,"onStageHunk",7),U=v(c,"onUnstageHunk",7),et=v(c,"onOpenCommit",7),Me=v(c,"refreshKey",7),Ue=v(c,"branchBaseRef",7),Ee=v(c,"branchBaseCommitSha",7),ge=v(c,"useProvidedContent",7,!1),ce=v(c,"allowHeadReads",7,!0),Fe=v(c,"canReadHeadFiles",7),W=v(c,"lineOffset",7,1),tt=v(c,"lineStageIndicators",7),Oe=v(c,"annotations",23,()=>[]),Te=v(c,"renderAnnotation",7),$e=v(c,"virtualizer",7),G=v(c,"gitRootId",7,void 0),be=v(c,"gitRootPath",7,void 0);const de=Je(()=>le())??kn()?.workspaceId??"",Ct=Math.random().toString(36).substring(2,8),Be=`tracked-diff:${crypto.randomUUID()}`,yt=gn(de,Be),Q=d(()=>oe()?.result?.kind==="trackedDiff"?oe().result:void 0),ke=d(()=>oe()?.loading??!0),nt=d(()=>oe()?.error??null),ze=d(()=>(t(Q)?.oldContent.length??0)+(t(Q)?.newContent.length??0)>De),B=d(()=>t(ze)?"":t(Q)?.oldContent??""),V=d(()=>t(ze)?"":t(Q)?.newContent??""),ee=d(()=>ct(s()?.relativePath||s()?.file||"")),it=d(()=>t(Q)?.chunk?.chunks.length?Ut(t(Q).chunk,t(ee)):""),xt=d(()=>!t(B)&&!t(V)&&!t(it)),Pt=d(()=>!!s()?.gitlink||!!t(Q)?.gitlink),st=d(()=>W()>1?`
|
|
3
3
|
`.repeat(W()-1):""),St=d(()=>t(st)+t(B)),Ht=d(()=>t(st)+t(V));let w=ae(null),Ke=ae(null),we=null,_e=ae(!1);const It=vn(de),at=pt(void 0),ot=pt(""),Rt=dn(ot,at),rt=d(Re),te=d(()=>be()||t(rt)?.worktreePath||t(rt)?.repositoryPath||""),Le=d(()=>s()?.relativePath||s()?.file||"file"),Wt=d(()=>Mt(t(Le)));let Ce=ae(null),lt=ae("");function ct(e){if(!e.startsWith("/")||!t(te))return e;const i=t(te).endsWith("/")?t(te).slice(0,-1):t(te);if(e.startsWith(i+"/"))return e.slice(i.length+1);if(e.startsWith(i)){const a=e.slice(i.length);return a.startsWith("/")?a.slice(1):a}return e}function Dt(e){return e?e.startsWith("/")?e:t(te)?`${t(te)}/${e}`:null:null}const dt=d(()=>W()>1),Nt=d(()=>t(dt)?`${t(Le)}:${He(t(B))}:off${W()}`:void 0),At=d(()=>t(dt)?`${t(Le)}:${He(t(V))}:off${W()}`:void 0);function Mt(e){const i=e.split(".").pop()?.toLowerCase();return i?{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rs:"rust",go:"go",rb:"ruby",java:"java",kt:"kotlin",swift:"swift",cs:"csharp",cpp:"cpp",c:"c",h:"c",hpp:"cpp",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",md:"markdown",html:"html",css:"css",scss:"scss",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",svelte:"svelte",vue:"vue"}[i]:void 0}function Ut(e,i){const a=`a/${i}`,o=`b/${i}`,u=[`diff --git ${a} ${o}`,`--- ${a}`,`+++ ${o}`];for(const r of e.chunks){u.push(`@@ -${r.oldStart},${r.oldLines} +${r.newStart},${r.newLines} @@`);for(const h of r.lines){const l=h.type===kt.Addition?"+":h.type===kt.Deletion?"-":" ",g=h.content.endsWith(`
|
|
4
4
|
`)?h.content.slice(0,-1):h.content;u.push(`${l}${g}`)}}return u.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as t,s as r}from"./
|
|
1
|
+
import{c as t,s as r}from"./BEhUDDmK.js";import{b as a}from"./CqCb3N-V.js";var s=a(e=>`${r(e)}
|
|
2
2
|
.swimlane.cluster:not([data-color-id]) rect {
|
|
3
3
|
stroke: ${e.clusterBorder} !important;
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DICr2Lvd.js","/app/immutable/chunks/lwn02icp.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as r}from"./CLAmm_T1.js";import{bn as L}from"./
|
|
2
|
+
import{_ as r}from"./CLAmm_T1.js";import{bn as L}from"./Bm6N2soI.js";function u(t){const m=[],p=new Set;for(const e of D(t.themes)){const i=s(e)?e.getThemes():[e];for(const o of i){if(p.has(o.name))throw new Error(`Theme collection already contains theme "${o.name}"`);p.add(o.name),m.push(o)}}const _=Object.freeze([...m]),l=Object.freeze(_.filter(e=>e.colorScheme==="light")),d=Object.freeze(_.filter(e=>e.colorScheme==="dark")),n=new Map(_.map(e=>[e.name,e])),I=Object.freeze(_.map(e=>e.name)),P=Object.freeze(l.map(e=>e.name)),R=Object.freeze(d.map(e=>e.name));function E(e){if(e==null)return _;const{colorScheme:i,collection:o}=e;return o==null?i==="light"?l:i==="dark"?d:_:_.filter(a=>a.collection!==o?!1:i==null||a.colorScheme===i)}return{getTheme(e){return n.get(e)},getThemes(e){return E(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme==="light"?P:e?.colorScheme==="dark"?R:I:E(e).map(i=>i.name)},hasTheme(e){return n.has(e)},orderBy(e){return u({themes:_.map((i,o)=>({descriptor:i,index:o})).sort((i,o)=>{const a=e(i.descriptor,o.descriptor);return a!==0?a:i.index-o.index}).map(i=>i.descriptor)})},pick(e){const i=[],o=new Set;for(const a of e){if(o.has(a))throw new Error(`Theme collection pick already includes theme "${a}"`);o.add(a);const h=n.get(a);if(h==null)throw new Error(`Theme collection does not contain theme "${a}"`);i.push(h)}return u({themes:i})},registerInto(e){for(const i of _)e.registerThemeIfAbsent(i.name,i.load)}}}function D(t){return O(t)?[t]:t}function O(t){return s(t)||k(t)}function k(t){return typeof t.name=="string"&&typeof t.load=="function"}function s(t){return typeof t.getThemes=="function"}function T({name:t,load:m,colorScheme:p,collection:_,displayName:l}){return{name:t,colorScheme:p,collection:_,displayName:l,load:A(m)}}function A(t){return async()=>{const[m,{normalizeTheme:p}]=await Promise.all([t(),r(()=>import("./DICr2Lvd.js").then(_=>_.c),__vite__mapDeps([0,1]),import.meta.url)]);return p(L(m))}}const f="pierre",V=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],g=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],b=[...g,...V],S=new Set(g);function w(t){return S.has(t)?"light":"dark"}const y={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},z={"pierre-dark":()=>r(()=>import("./CyvmCCZW.js"),[],import.meta.url),"pierre-dark-soft":()=>r(()=>import("./BHGpRqa4.js"),[],import.meta.url),"pierre-dark-vibrant":()=>r(()=>import("./BWBVywrn.js"),[],import.meta.url),"pierre-dark-protanopia-deuteranopia":()=>r(()=>import("./Rgc0TwpF.js"),[],import.meta.url),"pierre-dark-tritanopia":()=>r(()=>import("./Beq2gCRQ.js"),[],import.meta.url),"pierre-light":()=>r(()=>import("./480U9XYS.js"),[],import.meta.url),"pierre-light-soft":()=>r(()=>import("./CVdyfjmI.js"),[],import.meta.url),"pierre-light-vibrant":()=>r(()=>import("./DdTDNdfJ.js"),[],import.meta.url),"pierre-light-protanopia-deuteranopia":()=>r(()=>import("./CaVOBURG.js"),[],import.meta.url),"pierre-light-tritanopia":()=>r(()=>import("./B4_gpKOM.js"),[],import.meta.url)};function H(t){return T({name:t,collection:f,colorScheme:w(t),displayName:y[t],load:z[t]})}const x=u({themes:b.map(t=>H(t))}),M="shiki",v=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],N=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],C=new Set(v);function K(t){return C.has(t)?"light":"dark"}const j={andromeeda:()=>r(()=>import("./C4gqWexZ.js"),[],import.meta.url),"aurora-x":()=>r(()=>import("./D-2ljcwZ.js"),[],import.meta.url),"ayu-dark":()=>r(()=>import("./DYE7WIF3.js"),[],import.meta.url),"ayu-light":()=>r(()=>import("./BA47KaF1.js"),[],import.meta.url),"ayu-mirage":()=>r(()=>import("./32ctXXKs.js"),[],import.meta.url),"catppuccin-frappe":()=>r(()=>import("./CZL1YF0i.js"),[],import.meta.url),"catppuccin-latte":()=>r(()=>import("./DH-8KZSZ.js"),[],import.meta.url),"catppuccin-macchiato":()=>r(()=>import("./B7yYVSCf.js"),[],import.meta.url),"catppuccin-mocha":()=>r(()=>import("./Ct7hS0mc.js"),[],import.meta.url),"dark-plus":()=>r(()=>import("./C3mMm8J8.js"),[],import.meta.url),dracula:()=>r(()=>import("./BzJJZx-M.js"),[],import.meta.url),"dracula-soft":()=>r(()=>import("./BXkSAIEj.js"),[],import.meta.url),"everforest-dark":()=>r(()=>import("./BgDCqdQA.js"),[],import.meta.url),"everforest-light":()=>r(()=>import("./C8M2exoo.js"),[],import.meta.url),"github-dark":()=>r(()=>import("./DHJKELXO.js"),[],import.meta.url),"github-dark-default":()=>r(()=>import("./Cuk6v7N8.js"),[],import.meta.url),"github-dark-dimmed":()=>r(()=>import("./DH5Ifo-i.js"),[],import.meta.url),"github-dark-high-contrast":()=>r(()=>import("./E3gJ1_iC.js"),[],import.meta.url),"github-light":()=>r(()=>import("./DAi9KRSo.js"),[],import.meta.url),"github-light-default":()=>r(()=>import("./D7oLnXFd.js"),[],import.meta.url),"github-light-high-contrast":()=>r(()=>import("./BfjtVDDH.js"),[],import.meta.url),"gruvbox-dark-hard":()=>r(()=>import("./CFHQjOhq.js"),[],import.meta.url),"gruvbox-dark-medium":()=>r(()=>import("./GsRaNv29.js"),[],import.meta.url),"gruvbox-dark-soft":()=>r(()=>import("./CVdnzihN.js"),[],import.meta.url),"gruvbox-light-hard":()=>r(()=>import("./CH1njM8p.js"),[],import.meta.url),"gruvbox-light-medium":()=>r(()=>import("./DRw_LuNl.js"),[],import.meta.url),"gruvbox-light-soft":()=>r(()=>import("./hJgmCMqR.js"),[],import.meta.url),horizon:()=>r(()=>import("./BUw7H-hv.js"),[],import.meta.url),"horizon-bright":()=>r(()=>import("./CUuTKBJd.js"),[],import.meta.url),houston:()=>r(()=>import("./DnULxvSX.js"),[],import.meta.url),"kanagawa-dragon":()=>r(()=>import("./BuwD2xS4.js"),[],import.meta.url),"kanagawa-lotus":()=>r(()=>import("./C3DzagqV.js"),[],import.meta.url),"kanagawa-wave":()=>r(()=>import("./DFGoQZhC.js"),[],import.meta.url),laserwave:()=>r(()=>import("./DUszq2jm.js"),[],import.meta.url),"light-plus":()=>r(()=>import("./B7mTdjB0.js"),[],import.meta.url),"material-theme":()=>r(()=>import("./D5KoaKCx.js"),[],import.meta.url),"material-theme-darker":()=>r(()=>import("./BfHTSMKl.js"),[],import.meta.url),"material-theme-lighter":()=>r(()=>import("./B0m2ddpp.js"),[],import.meta.url),"material-theme-ocean":()=>r(()=>import("./CyktbL80.js"),[],import.meta.url),"material-theme-palenight":()=>r(()=>import("./Csfq5Kiy.js"),[],import.meta.url),"min-dark":()=>r(()=>import("./CafNBF8u.js"),[],import.meta.url),"min-light":()=>r(()=>import("./CTRr51gU.js"),[],import.meta.url),monokai:()=>r(()=>import("./CR4piiQ-.js"),[],import.meta.url),"night-owl":()=>r(()=>import("./C39BiMTA.js"),[],import.meta.url),"night-owl-light":()=>r(()=>import("./CMTm3GFP.js"),[],import.meta.url),nord:()=>r(()=>import("./Ddv68eIx.js"),[],import.meta.url),"one-dark-pro":()=>r(()=>import("./CxGP3dtY.js"),[],import.meta.url),"one-light":()=>r(()=>import("./C3Wv6jpd.js"),[],import.meta.url),plastic:()=>r(()=>import("./3e1v2bzS.js"),[],import.meta.url),poimandres:()=>r(()=>import("./CS3Unz2-.js"),[],import.meta.url),red:()=>r(()=>import("./DMbB5_pp.js"),[],import.meta.url),"rose-pine":()=>r(()=>import("./5qJOZa0Y.js"),[],import.meta.url),"rose-pine-dawn":()=>r(()=>import("./zx0QlTCp.js"),[],import.meta.url),"rose-pine-moon":()=>r(()=>import("./C9pEdX9L.js"),[],import.meta.url),"slack-dark":()=>r(()=>import("./BthQWCQV.js"),[],import.meta.url),"slack-ochin":()=>r(()=>import("./DqwNpetd.js"),[],import.meta.url),"snazzy-light":()=>r(()=>import("./Bw305WKR.js"),[],import.meta.url),"solarized-dark":()=>r(()=>import("./UcubFVte.js"),[],import.meta.url),"solarized-light":()=>r(()=>import("./DCG28T6R.js"),[],import.meta.url),"synthwave-84":()=>r(()=>import("./CbfX1IO0.js"),[],import.meta.url),"tokyo-night":()=>r(()=>import("./hegEt444.js"),[],import.meta.url),vesper:()=>r(()=>import("./DRje8inN.js"),[],import.meta.url),"vitesse-black":()=>r(()=>import("./Bkuqu6BP.js"),[],import.meta.url),"vitesse-dark":()=>r(()=>import("./D0r3Knsf.js"),[],import.meta.url),"vitesse-light":()=>r(()=>import("./CVO1_9PV.js"),[],import.meta.url)};function c(t){return T({name:t,collection:M,colorScheme:K(t),load:j[t]})}const G=Object.freeze([...v.map(t=>c(t)),...N.map(t=>c(t))]),$=u({themes:G}),q=u({themes:[x,$]});export{T as createTheme,x as pierreThemes,$ as shikiThemes,q as themes};
|
|
@@ -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"./CLAmm_T1.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"./Cu11OjbU.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("./CTflyKHO.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]),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/DFOcWzwz.js","/app/immutable/chunks/CqCb3N-V.js","/app/immutable/chunks/CLAmm_T1.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/Klbdavqn.js","/app/immutable/chunks/C2UL5Ler.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/B9vHutcJ.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BBFoj-dS.js","/app/immutable/chunks/BwNrQXlF.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/_UjuBCOJ.js","/app/immutable/chunks/DPttSllj.js","/app/immutable/chunks/BwH4Bvte.js","/app/immutable/chunks/BFgvMDua.js","/app/immutable/chunks/CcJmuwXr.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/B1CKzIA2.js","/app/immutable/chunks/TB9r2XJy.js","/app/immutable/chunks/UTM5G-w-.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BGrimfDs.js","/app/immutable/chunks/Cu5e4npY.js","/app/immutable/chunks/BIjxJZ5i.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DQw0Iiac.js","/app/immutable/chunks/aZdb_rCN.js","/app/immutable/chunks/BPQFiQQc.js","/app/immutable/chunks/KnkAG0HD.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/WbzVOnzB.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/BbhtQrkZ.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/BKD7o1lQ.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/nxtepGjE.js","/app/immutable/chunks/CIbfGsF-.js","/app/immutable/chunks/Dnkb7G58.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/Dd-LQrG1.js","/app/immutable/chunks/D2YDfFKv.js","/app/immutable/chunks/DaWmj23r.js","/app/immutable/chunks/CfNIzRu8.js","/app/immutable/chunks/C4jSaPCg.js","/app/immutable/chunks/DtXgUHCj.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/hkJYqn41.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/CgrVbtN0.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/CEE0831H.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/BpMXdC4H.js","/app/immutable/chunks/DtzJzV-4.js","/app/immutable/chunks/BtmHyUSg.js","/app/immutable/chunks/BbYWP3Ow.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/96V4v2iI.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/assets/notify.DylRFR3N.css","/app/immutable/chunks/DpCic98X.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/BnV9CBUH.js","/app/immutable/chunks/E1ou7S5Q.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/Drl447ub.js","/app/immutable/chunks/CfQcMKZg.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as Z}from"./CLAmm_T1.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"./CqCb3N-V.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("./DFOcWzwz.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]),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};
|