@intent-hq/web 2.310.3 → 2.310.4
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/{lqs_HYEw.js → 1JT3Hvwn.js} +1 -1
- package/web/app/immutable/chunks/{Bpofk5Ge.js → 3XXjzHG3.js} +1 -1
- package/web/app/immutable/chunks/{BhWJ-mUa.js → 5lKAUCkv.js} +1 -1
- package/web/app/immutable/chunks/{C72YfPmr.js → 5mT5QCH0.js} +2 -2
- package/web/app/immutable/chunks/{WaYTk5P-.js → 9Pt4_UCK.js} +1 -1
- package/web/app/immutable/chunks/{DpbPS--w.js → AdEBgfMz.js} +1 -1
- package/web/app/immutable/chunks/{C87YV7yB.js → B-BihkPv.js} +4 -4
- package/web/app/immutable/chunks/{Dr9n9KYD.js → B31DSOXx.js} +1 -1
- package/web/app/immutable/chunks/{FTZaXc8b.js → B6i2HXcd.js} +1 -1
- package/web/app/immutable/chunks/{PR2rc_KV.js → B72MiU4f.js} +2 -2
- package/web/app/immutable/chunks/{_GDZ01fB.js → B7hiL__h.js} +1 -1
- package/web/app/immutable/chunks/{jU5_8m_P.js → B939T8ee.js} +1 -1
- package/web/app/immutable/chunks/{h6Xb9K7f.js → BAFIBxJn.js} +1 -1
- package/web/app/immutable/chunks/{D5gGhPeB.js → BHfh0Z1C.js} +1 -1
- package/web/app/immutable/chunks/{DICP2Iar.js → BI8wduE-.js} +1 -1
- package/web/app/immutable/chunks/{CUMlGGeg.js → BIU8-rPj.js} +1 -1
- package/web/app/immutable/chunks/{B7s4-XTz.js → BIiORJal.js} +4 -4
- package/web/app/immutable/chunks/{C_tu278J.js → BJKiZYvw.js} +1 -1
- package/web/app/immutable/chunks/{oEWQ7BWN.js → BNFZ_TXS.js} +1 -1
- package/web/app/immutable/chunks/{DWqMBuHP.js → BNXdIr_O.js} +1 -1
- package/web/app/immutable/chunks/{CcUMYVEM.js → BNsTgNha.js} +1 -1
- package/web/app/immutable/chunks/{DAmyup4Q.js → BPO8n77e.js} +2 -2
- package/web/app/immutable/chunks/{DLTK7s08.js → BR2WgFAY.js} +1 -1
- package/web/app/immutable/chunks/{BI_SwxaN.js → BRD3o4b9.js} +1 -1
- package/web/app/immutable/chunks/{YqBgboHy.js → BTjbZv4v.js} +1 -1
- package/web/app/immutable/chunks/{Dx4xDmS-.js → BVaDxTbw.js} +1 -1
- package/web/app/immutable/chunks/{kHJUvxPR.js → BXYHRMR5.js} +1 -1
- package/web/app/immutable/chunks/{B1s3oEqm.js → BZC0V7Vm.js} +2 -2
- package/web/app/immutable/chunks/{ry72TFIz.js → BZCsjPbo.js} +2 -2
- package/web/app/immutable/chunks/{X-Frg4xt.js → BdmhOhOr.js} +1 -1
- package/web/app/immutable/chunks/{BrV7vQ-C.js → BhEmEnro.js} +1 -1
- package/web/app/immutable/chunks/{CeijcUhC.js → BlOiaItm.js} +1 -1
- package/web/app/immutable/chunks/{Bhw4MKUW.js → BoADm99c.js} +1 -1
- package/web/app/immutable/chunks/{xPs_63iv.js → BqgH4F9Q.js} +1 -1
- package/web/app/immutable/chunks/{BHnD9zfx.js → BrrIbgjH.js} +1 -1
- package/web/app/immutable/chunks/{CPi1vTiT.js → BttTHeg3.js} +2 -2
- package/web/app/immutable/chunks/{NHQiGgbv.js → BwF5HhIs.js} +1 -1
- package/web/app/immutable/chunks/{ibC6Wlul.js → Bx1ulVFG.js} +1 -1
- package/web/app/immutable/chunks/{BYxB_o2p.js → BxV9jjnn.js} +1 -1
- package/web/app/immutable/chunks/{Dj7a19mR.js → C1CC06Ey.js} +1 -1
- package/web/app/immutable/chunks/{Q48HTbqK.js → C501DddF.js} +1 -1
- package/web/app/immutable/chunks/{wh3Y68il.js → C5AqVWW_.js} +1 -1
- package/web/app/immutable/chunks/{DR30pTuY.js → C5G0q6V9.js} +3 -3
- package/web/app/immutable/chunks/{CrdTEIp7.js → C5egmBj1.js} +1 -1
- package/web/app/immutable/chunks/{fyjA8lOg.js → C6Gqnk62.js} +1 -1
- package/web/app/immutable/chunks/{DAhqFWJw.js → C8qwdo8h.js} +1 -1
- package/web/app/immutable/chunks/{D2ffSQ9J.js → CAiJGbLo.js} +1 -1
- package/web/app/immutable/chunks/{DH-0T9oO.js → CF7FcFf9.js} +1 -1
- package/web/app/immutable/chunks/{CnIb6mve.js → CGnNcckt.js} +1 -1
- package/web/app/immutable/chunks/{B2JLNOy6.js → CHJhHJ8c.js} +1 -1
- package/web/app/immutable/chunks/{Bd0N6Q84.js → CK49eRBK.js} +1 -1
- package/web/app/immutable/chunks/{DhDem5lD.js → CMbRA5qt.js} +1 -1
- package/web/app/immutable/chunks/{BDPXN-l5.js → CNC6BMwU.js} +1 -1
- package/web/app/immutable/chunks/{DHf042m3.js → CPIehcPz.js} +1 -1
- package/web/app/immutable/chunks/{OEEtadht.js → CR2tijk0.js} +1 -1
- package/web/app/immutable/chunks/{D5XrjD_m.js → CR_mHSu4.js} +1 -1
- package/web/app/immutable/chunks/{DStbB4cJ.js → CSxLglEe.js} +1 -1
- package/web/app/immutable/chunks/{Cstq9SM5.js → CUzjOAua.js} +1 -1
- package/web/app/immutable/chunks/{BENBNSN7.js → CVH8gLyV.js} +1 -1
- package/web/app/immutable/chunks/{BakMVsPT.js → CVmHwhPc.js} +2 -2
- package/web/app/immutable/chunks/{bBO0iA4_.js → CYjqtZFX.js} +1 -1
- package/web/app/immutable/chunks/{Ci2_N-bK.js → CYpaiDaV.js} +1 -1
- package/web/app/immutable/chunks/{D7ePuUtq.js → CaBSUvc-.js} +1 -1
- package/web/app/immutable/chunks/{D2ojbL4J.js → CkwlIwj7.js} +1 -1
- package/web/app/immutable/chunks/{7xAw-BT0.js → CmaYPN9s.js} +1 -1
- package/web/app/immutable/chunks/{C3nOF7W6.js → CmqlgQan.js} +1 -1
- package/web/app/immutable/chunks/{CuzanJ4G.js → CoW30tTg.js} +1 -1
- package/web/app/immutable/chunks/{lG67Zx5D.js → CqR3T6Kd.js} +3 -3
- package/web/app/immutable/chunks/{DJ4er0zy.js → CrR4jweF.js} +1 -1
- package/web/app/immutable/chunks/{CQI-dvtu.js → CrWQjKj_.js} +3 -3
- package/web/app/immutable/chunks/{BGcL9rs9.js → CroKe-wc.js} +1 -1
- package/web/app/immutable/chunks/{YDWB9C4j.js → CsQkh7b3.js} +1 -1
- package/web/app/immutable/chunks/{CTaTQq2B.js → CvCSRZBy.js} +1 -1
- package/web/app/immutable/chunks/{BUlPMLws.js → CvOoeN0T.js} +1 -1
- package/web/app/immutable/chunks/{Ccfa6x-j.js → CxJcdmSd.js} +1 -1
- package/web/app/immutable/chunks/{DV_gHrZ4.js → D-0ZUYIk.js} +1 -1
- package/web/app/immutable/chunks/{Bn-4GS40.js → D-4XO7pN.js} +2 -2
- package/web/app/immutable/chunks/{CHFvnHJS.js → D4qyaNt3.js} +1 -1
- package/web/app/immutable/chunks/{iX-41BqF.js → D4z4ooVN.js} +1 -1
- package/web/app/immutable/chunks/{CVyfvlNb.js → DAg5pMRd.js} +1 -1
- package/web/app/immutable/chunks/{BmpVZmDT.js → DCuJDyNf.js} +1 -1
- package/web/app/immutable/chunks/{ap51LBWo.js → DI608D-i.js} +1 -1
- package/web/app/immutable/chunks/{EF47gh5F.js → DIiJKmmV.js} +1 -1
- package/web/app/immutable/chunks/{B53WwE3a.js → DJ1cdtAZ.js} +1 -1
- package/web/app/immutable/chunks/{DxBZwGJl.js → DKr5x03c.js} +1 -1
- package/web/app/immutable/chunks/{cMysCMc_.js → DL-yibpy.js} +1 -1
- package/web/app/immutable/chunks/{CK1qXB1I.js → DNlvdlMF.js} +1 -1
- package/web/app/immutable/chunks/{D9RktmhG.js → DPXd3fU6.js} +1 -1
- package/web/app/immutable/chunks/{Sd4DhpzB.js → DR0NE2_C.js} +1 -1
- package/web/app/immutable/chunks/{lh2cjQS1.js → DTCRTrPV.js} +1 -1
- package/web/app/immutable/chunks/{CiPifYNB.js → DTj6_2dz.js} +1 -1
- package/web/app/immutable/chunks/{BfZK-g4H.js → DXMKw2so.js} +1 -1
- package/web/app/immutable/chunks/{ClKsLSpN.js → DYZ36vW7.js} +1 -1
- package/web/app/immutable/chunks/{aloh9OcN.js → DeYZGX2s.js} +1 -1
- package/web/app/immutable/chunks/{lb9Uy5lM.js → Df6f-k6w.js} +1 -1
- package/web/app/immutable/chunks/{BRvgBsbx.js → Dgaq6o9Y.js} +1 -1
- package/web/app/immutable/chunks/{2rlMb19F.js → Dkq5Coq_.js} +1 -1
- package/web/app/immutable/chunks/{DM80xiYc.js → DmX5G2mi.js} +1 -1
- package/web/app/immutable/chunks/{BpXeqZkK.js → Dmhbab3K.js} +6 -6
- package/web/app/immutable/chunks/{C-1nTNwc.js → Dp1Yxyun.js} +1 -1
- package/web/app/immutable/chunks/{BP6OqM9o.js → DrZyb3e_.js} +1 -1
- package/web/app/immutable/chunks/{BFXzH5IE.js → DsgnOGWk.js} +1 -1
- package/web/app/immutable/chunks/{DPWD_Z0m.js → DxdqGRL1.js} +1 -1
- package/web/app/immutable/chunks/{CEXJj_TX.js → DzUxh_ps.js} +1 -1
- package/web/app/immutable/chunks/{Cl430GWg.js → ENpFvA2b.js} +5 -5
- package/web/app/immutable/chunks/{D3lH_sy-.js → F27tZ3Lo.js} +1 -1
- package/web/app/immutable/chunks/{B_mbXOka.js → IeOyBdV1.js} +1 -1
- package/web/app/immutable/chunks/{dpdLM1Cx.js → NtwUb2T_.js} +1 -1
- package/web/app/immutable/chunks/{ryFwnMjp.js → PtwmLAp4.js} +1 -1
- package/web/app/immutable/chunks/{B7VncZW5.js → WU_Tlex0.js} +1 -1
- package/web/app/immutable/chunks/{DqPGIq9m.js → _e7d73p6.js} +1 -1
- package/web/app/immutable/chunks/{BMMFveB2.js → ckbdI_sO.js} +6 -6
- package/web/app/immutable/chunks/{D9zTmP-H.js → eVx-WSd7.js} +1 -1
- package/web/app/immutable/chunks/{CLEySo6k.js → flwRPGfq.js} +1 -1
- package/web/app/immutable/chunks/{CNxOtEoC.js → iCXhZwLL.js} +1 -1
- package/web/app/immutable/chunks/{Dn1Hge9W.js → iU779rtf.js} +1 -1
- package/web/app/immutable/chunks/{CSiG9Hvp.js → lH4z0y-c.js} +1 -1
- package/web/app/immutable/chunks/{uOEty9O6.js → nRjRQ-e8.js} +1 -1
- package/web/app/immutable/chunks/{BfPWAh77.js → p-l1WyaF.js} +1 -1
- package/web/app/immutable/chunks/{DPjuFI2m.js → r8JiSeiY.js} +1 -1
- package/web/app/immutable/chunks/{Cd_IIsl2.js → uI2-sxxt.js} +1 -1
- package/web/app/immutable/chunks/{D-QdqmeZ.js → uK-hZG4d.js} +1 -1
- package/web/app/immutable/chunks/{6Z5k9P1U.js → v3BNQvm3.js} +4 -4
- package/web/app/immutable/chunks/{BSel_zEu.js → v5CNLLlH.js} +1 -1
- package/web/app/immutable/chunks/{D0gJOzJU.js → wUteoXUE.js} +1 -1
- package/web/app/immutable/chunks/{CCDTjxXZ.js → x5DAOZ-l.js} +1 -1
- package/web/app/immutable/entry/{app.np0VAfbg.js → app.9TYubmA2.js} +2 -2
- package/web/app/immutable/entry/start.DzrqTCos.js +1 -0
- package/web/app/immutable/nodes/{0.DoZAnEaT.js → 0.CwEPgBsQ.js} +1 -1
- package/web/app/immutable/nodes/{1.BfLNDde5.js → 1.DWK38N4h.js} +1 -1
- package/web/app/immutable/nodes/{10.WVRhKQHR.js → 10.DaUeIEdW.js} +1 -1
- package/web/app/immutable/nodes/{14.BGrxllXE.js → 14.2lmprMDP.js} +1 -1
- package/web/app/immutable/nodes/{16.CkZkKSWx.js → 16.COW42S3C.js} +2 -2
- package/web/app/immutable/nodes/{2.COM3w17g.js → 2.SI3oSw-U.js} +3 -3
- package/web/app/immutable/nodes/{3.BhRx3b1m.js → 3.BdAb9qv8.js} +1 -1
- package/web/app/immutable/nodes/{4.C02hhSi-.js → 4.BPPplmHC.js} +1 -1
- package/web/app/immutable/nodes/{5.Dgt2hWD3.js → 5.mnYZAvZj.js} +1 -1
- package/web/app/immutable/nodes/{6.KyP4WP5g.js → 6.DokpGs5-.js} +1 -1
- package/web/app/immutable/nodes/{7.BxnoAMeX.js → 7.7huKB9rr.js} +1 -1
- package/web/app/immutable/nodes/{8.CnlHpTsC.js → 8.Oo8AlOBc.js} +2 -2
- package/web/app/immutable/nodes/{9.CJ1_wepy.js → 9.DkJDLBQi.js} +1 -1
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.BGCfjmAX.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as _t,bq as _,a_ as D,by as mt,bs as gt,b as vt,bo as x,bu as be,bt as Te}from"./7rNOGHzs.js";import{bs as ht,cd as yt,ca as wt,bk as xt,a7 as N,ay as m,W as r,bn as kt,aA as g,aD as t,bS as z,a5 as _e,bH as Le,bA as me,b_ as M,aB as E,c9 as o,bf as It,bl as oe,bO as ae,bV as Ct}from"./B8o4lNgr.js";import{k as $t,h as Pt,s as Be,c as At}from"./DmsDslNo.js";import{s as Me}from"./CQ4a5a4v.js";import{c as S}from"./CiENRH6A.js";import{cF as Et,bl as Ot,aK as Ft,F as ne,aX as Tt,aL as Lt,bm as Bt,a7 as qe,av as Dt}from"./CFejQM6t.js";import{W as Nt,T as zt,G as St,C as Rt,X as Ht,J as Wt,V as Mt}from"./CuLyvgLV.js";import{f as ge}from"./Bgegixo2.js";import{i as qt}from"./B1s3oEqm.js";import{n as Vt,R as Gt,r as jt,q as Kt,p as Xt,o as Ve}from"./DSjRkndX.js";import{n as ve}from"./lfJ8pseq.js";import{c as Jt}from"./ChTqQfQN.js";import"./D-cnPaTJ.js";import{Hq as Ge,mq as Ut,Ef as Yt}from"./CRwmdgt6.js";import{v as Qt}from"./DCaHy20k.js";import{i as J}from"./BkBdyRjM.js";import{bn as Zt,b4 as er,b2 as tr}from"./C_tu278J.js";import{ck as rr}from"./KQTrHxko.js";import{t as or}from"./H2jLkRRS.js";const ar={cursor:Rt,ghostty:St,terminal:zt,warp:Nt},nr={vscode:Mt,jetbrains:Wt,xcode:Ht};function sr(O){return ar[O.id]??nr[O.handlerType]??null}function je(O){return O==="terminal"?Et:O==="finder"?Ot:Ft}const ir="shrink-0 text-muted-foreground hover:text-foreground focus-visible:text-foreground [&_svg]:size-4",De="finder",lr={id:De,name:"Finder",shortLabel:"Finder",appName:"Finder",category:"finder",handlerType:"finder",installed:!0,priority:0};function cr(O,s=[]){const se=new Set(s),U=O.filter(({installed:Y,id:ye})=>Y&&!se.has(ye));return U.some(({id:Y})=>Y===De)||se.has(De)?U:[...U,lr]}var dr=E('<img alt="" class="size-4"/>'),ur=E('<kbd class="type-caption ml-4 text-muted-foreground" aria-hidden="true"> </kbd>'),pr=E('<span class="min-w-0 flex-1 truncate"> </span> <!>',1),fr=E("<span> </span>"),he=E("<!> <!>",1),br=E("<span><!></span>"),_r=E('<img class="w-4 h-4"/>'),mr=E('<!> <span class="text-muted-foreground"> </span>',1),gr=E('<div class="inline-flex items-stretch rounded-md border border-border" data-open-combo-control=""><!> <!></div>'),vr=E('<div class="type-caption px-2 py-1.5 text-subtle"> </div>'),hr=E('<div class="w-60 max-w-full"><!> <!> <!></div>'),yr=E("<div><!></div>");function wr(O,s){if(new.target)return _t({component:wr,...O});ht(s,!0);const se=()=>be(Je,"$installedEditors$",ie),U=()=>be(Ue,"$hiddenEditorIds$",ie),Y=()=>be(Ye,"$isWorkspaceHostLocal$",ie),ye=()=>be(Xe,"$openAction",ie),[ie,Ke]=gt(),le=(e,d=It)=>{var u=N(),p=m(u);S(p,()=>Gt,(te,G)=>{G(te,{get value(){return t(v).id},children:(F,B)=>{var I=N(),T=m(I);Pt(T,17,d,C=>C.id,(C,c)=>{var j=N(),h=m(j);{const $=a=>{var i=N(),y=m(i);{var H=l=>{var A=dr();M(()=>Be(A,"src",`data:image/png;base64,${t(c).iconBase64??""}`)),r(l,A)},b=l=>{const A=o(()=>t(c).icon);var W=N(),L=m(W);S(L,()=>t(A),(K,re)=>{re(K,{size:16})}),r(l,W)},P=l=>{{let A=o(()=>t(c).faIcon??je(t(c).category));ne(l,{get icon(){return t(A)},class:"size-4 text-muted-foreground"})}};D(y,l=>{t(c).iconBase64?l(H):t(c).icon?l(b,1):l(P,-1)})}r(a,i)};let n=o(()=>!k());S(h,()=>Vt,(a,i)=>{i(a,{get value(){return t(c).id},closeOnSelect:!0,get disabled(){return t(n)},onSelect:()=>tt(t(c).id),get textValue(){return t(c).label},leading:$,children:(y,H)=>{var b=pr(),P=m(b),l=oe(P,!0),A=z(P,2);{var W=L=>{var K=ur(),re=oe(K,!0);M(()=>ae(re,t(c).shortcut)),r(L,K)};D(A,L=>{t(c).shortcut&&L(W)})}M(()=>ae(l,t(c).label)),r(y,b)},$$slots:{leading:!0,default:!0}})})}r(C,j)}),r(F,I)},$$slots:{default:!0}})}),r(e,u)},Ne=Jt("OpenComboButton");let k=_(s,"filePath",7),ce=_(s,"workspaceId",7,""),de=_(s,"isDirectory",7,!0),we=_(s,"workspaceFolderPath",7),xe=_(s,"class",7,""),ue=_(s,"headerText",7),ke=_(s,"usePortal",7,!0),Ie=_(s,"side",7,"bottom"),q=_(s,"variant",7,"default"),Q=_(s,"branchName",7),Ce=_(s,"compact",7,!1),$e=_(s,"embedded",7,!1),Z=_(s,"inline",7,!1),V=_(s,"iconOnly",7,!1),R=_(s,"children",7,void 0);const ze=o(()=>q()==="sidebar"?"bg-sidebar hover:bg-sidebar/80":"bg-background hover:bg-muted"),Pe=yt(ce());wt(()=>{Pe.set(ce())});const Xe=Zt(),Je=er(Pe),Ue=tr(),Ye=rr(Pe);let ee=Ct(!1);xt(()=>{Ge.dispatch(Ut())});function Qe(e){return{id:e.id,label:e.name,shortLabel:e.shortLabel,icon:sr(e),shortcut:e.shortcut,handlerType:e.handlerType,appName:e.appName,category:e.category,iconBase64:e.iconBase64}}const Ze=Qt("externalEditors");let f=o(()=>{const e=se(),d=cr(e,U()).map(Qe),u={id:"other",label:x.ui_openCombo_other_label(),shortLabel:x.ui_openCombo_other_label(),icon:null,faIcon:Bt,handlerType:"generic"},p=[{id:"copy",label:x.ui_openCombo_copyPath_label(),shortLabel:x.ui_openCombo_copy_shortLabel(),icon:null,faIcon:Tt},...Q()?[{id:"copy-branch",label:x.ui_openCombo_copyBranch_label(),shortLabel:x.ui_openCombo_copyBranch_shortLabel(),icon:null,faIcon:Lt}]:[]];return!Ze||!Y()?p:[...d,u,...p]});const pe=o(()=>t(f).some(e=>e.id!=="copy"&&e.id!=="copy-branch")),fe=o(()=>t(f).filter(e=>e.id!=="copy"&&e.id!=="copy-branch")),Se=o(()=>t(f).filter(e=>e.id==="copy"||e.id==="copy-branch")),v=o(()=>t(pe)?t(f).find(e=>e.id===ye())||t(f)[0]:t(f).find(e=>e.id==="copy")||t(f)[0]),Ae=o(()=>t(pe)?x.ui_openCombo_openIn_tooltip({name:t(v).label}):t(v).label);function Ee(){if(de())return k();const e=we()||k().substring(0,k().lastIndexOf("/"));return e?{folder:e,file:k()}:k()}async function Oe(e){if(!k())return;const d=de()?k():k().substring(0,k().lastIndexOf("/"));try{if(e==="copy"){await navigator.clipboard.writeText(or(k())),ve.success(x.ui_openCombo_pathCopied_label());return}if(e==="copy-branch"){Q()&&(await navigator.clipboard.writeText(Q()),ve.success(x.ui_openCombo_branchCopied_label()));return}if(e==="other"){const p=await J("external-editors:open-with-other",{path:d});p?.success?Le(ee,!1):p?.error&&p.error!=="No application selected"&&ve.error(p.error);return}const u=t(f).find(p=>p.id===e);if(!u){Ne.warn(`Unknown action: ${e}`);return}switch(u.handlerType){case"finder":await J("shell:showItemInFolder",{path:d});break;case"vscode":await J("vscode:open",Ee());break;case"jetbrains":await J("jetbrains:open",Ee());break;case"xcode":await J("xcode:open",Ee());break;case"generic":default:{await J("external-editors:open",{editorId:u.id,path:d});break}}}catch(u){Ne.error(`Failed to execute action ${e}:`,u),ve.error(u instanceof Error?u.message:x.ui_openCombo_openFailed_error({name:e}))}}function Fe(e){e.stopPropagation(),Oe(t(v).id)}function et(e){e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),e.stopPropagation(),Oe(t(v).id))}function Re(e){e.stopPropagation()}function tt(e){Ge.dispatch(Yt(e)),Oe(e),Le(ee,!1)}var rt={get filePath(){return k()},set filePath(e){k(e),g()},get workspaceId(){return ce()},set workspaceId(e=""){ce(e),g()},get isDirectory(){return de()},set isDirectory(e=!0){de(e),g()},get workspaceFolderPath(){return we()},set workspaceFolderPath(e){we(e),g()},get class(){return xe()},set class(e=""){xe(e),g()},get headerText(){return ue()},set headerText(e){ue(e),g()},get usePortal(){return ke()},set usePortal(e=!0){ke(e),g()},get side(){return Ie()},set side(e="bottom"){Ie(e),g()},get variant(){return q()},set variant(e="default"){q(e),g()},get branchName(){return Q()},set branchName(e){Q(e),g()},get compact(){return Ce()},set compact(e=!1){Ce(e),g()},get embedded(){return $e()},set embedded(e=!1){$e(e),g()},get inline(){return Z()},set inline(e=!1){Z(e),g()},get iconOnly(){return V()},set iconOnly(e=!1){V(e),g()},get children(){return R()},set children(e=void 0){R(e),g()},$set:mt,$on:(e,d)=>vt(s,e,d)},He=N(),ot=m(He);{var at=e=>{var d=he(),u=m(d);{var p=G=>{var F=he(),B=m(F);S(B,()=>Xt,(T,C)=>{C(T,{children:(c,j)=>{var h=he(),$=m(h);S($,()=>jt,(a,i)=>{i(a,{get icon(){return qe},children:(y,H)=>{var b=fr(),P=oe(b,!0);M(l=>ae(P,l),[()=>x.ui_openCombo_openInApp_tooltip()]),r(y,b)},$$slots:{default:!0}})});var n=z($,2);S(n,()=>Kt,(a,i)=>{i(a,{class:"w-60",children:(y,H)=>{le(y,()=>t(fe))},$$slots:{default:!0}})}),r(c,h)},$$slots:{default:!0}})});var I=z(B,2);S(I,()=>Ve,(T,C)=>{C(T,{})}),r(G,F)};D(u,G=>{t(fe).length&&G(p)})}var te=z(u,2);le(te,()=>t(Se)),r(e,d)},nt=e=>{var d=yr(),u=_e(d);{const p=(F,B)=>{let I=()=>(B?.()).props;var T=N(),C=m(T);{var c=n=>{var a=br();At(a,()=>({role:"button",tabindex:"0",onclick:t(f).length>1?void 0:Fe,onkeydown:t(f).length>1?void 0:et,...t(f).length>1?I():{},class:"cursor-pointer break-words rounded-sm text-inherit underline decoration-muted-foreground/20 underline-offset-2 hover:decoration-current focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:t(Ae)}));var i=_e(a);Me(i,R),me(a),r(n,a)},j=n=>{{let a=o(()=>t(f).length>1?void 0:Fe),i=o(()=>V()&&q()!=="sidebar"?"plain":"ghost"),y=o(()=>V()?q()==="sidebar"?"icon-compact":"icon-sm":void 0),H=o(()=>V()&&q()==="sidebar"&&t(ee)),b=o(()=>!V()),P=o(()=>V()?q()==="sidebar"?ir:"cursor-pointer text-muted-foreground hover:text-foreground focus-visible:text-foreground":"cursor-pointer");ge(n,Te({type:"button",get onclick(){return t(a)}},()=>t(f).length>1?I():{},{get variant(){return t(i)},get size(){return t(y)},get active(){return t(H)},get wrapContent(){return t(b)},get class(){return t(P)},get title(){return t(Ae)},children:(l,A)=>{var W=N(),L=m(W);Me(L,R),r(l,W)},$$slots:{default:!0}}))}},h=n=>{{let a=o(()=>x.ui_openCombo_openInApp_tooltip());ge(n,Te(I,{variant:"ghost-light",size:"icon-xs",get tooltip(){return t(a)},tooltipSide:"bottom",children:(i,y)=>{ne(i,{get icon(){return qe},size:"xs"})},$$slots:{default:!0}}))}},$=n=>{var a=gr(),i=_e(a);{let b=o(()=>t(f).length>1?"rounded-r-none":""),P=o(()=>t(ze)),l=o(()=>t(pe)?t(Ae):void 0);ge(i,{type:"button",variant:"ghost",size:"sm",get class(){return`gap-1.5 px-2 ${t(b)??""} ${t(P)??""}`},onpointerdown:Re,onkeydown:Re,onclick:Fe,get title(){return t(l)},children:(A,W)=>{var L=mr(),K=m(L);{var re=w=>{var X=_r();M(()=>{Be(X,"src",`data:image/png;base64,${t(v).iconBase64??""}`),Be(X,"alt",t(v).label)}),r(w,X)},it=w=>{const X=o(()=>t(v).icon);var We=N(),pt=m(We);S(pt,()=>t(X),(ft,bt)=>{bt(ft,{size:14})}),r(w,We)},lt=w=>{ne(w,{get icon(){return t(v).faIcon},class:"w-3.5 h-3.5 opacity-60"})},ct=w=>{{let X=o(()=>je(t(v).category));ne(w,{get icon(){return t(X)},class:"w-3.5 h-3.5 opacity-60"})}};D(K,w=>{t(v).iconBase64?w(re):t(v).icon?w(it,1):t(v).faIcon?w(lt,2):w(ct,-1)})}var dt=z(K,2),ut=oe(dt,!0);M(w=>ae(ut,w),[()=>t(pe)?x.ui_openCombo_open_label():t(v).label]),r(A,L)},$$slots:{default:!0}})}var y=z(i,2);{var H=b=>{{let P=o(()=>x.ui_openCombo_openInApp_tooltip());ge(b,Te(I,{type:"button",variant:"ghost",size:"icon-sm",get"aria-label"(){return t(P)},get class(){return`rounded-l-none border-l border-border ${t(ze)??""}`},children:(l,A)=>{ne(l,{get icon(){return Dt},class:"size-3! text-muted-foreground"})},$$slots:{default:!0}}))}};D(y,b=>{t(f).length>1&&b(H)})}me(a),r(n,a)};D(C,n=>{Z()&&R()?n(c):R()?n(j,1):Ce()?n(h,2):n($,-1)})}r(F,T)},te=F=>{var B=hr(),I=_e(B);{var T=h=>{var $=vr(),n=oe($,!0);M(()=>ae(n,ue())),r(h,$)};D(I,h=>{ue()&&h(T)})}var C=z(I,2);{var c=h=>{var $=he(),n=m($);le(n,()=>t(fe));var a=z(n,2);S(a,()=>Ve,(i,y)=>{y(i,{})}),r(h,$)};D(C,h=>{t(fe).length&&h(c)})}var j=z(C,2);le(j,()=>t(Se)),me(B),r(F,B)};let G=o(()=>Z()&&R()?"contents!":"");qt(u,{align:"end",get portal(){return ke()},get side(){return Ie()},get class(){return t(G)},get open(){return t(ee)},set open(F){Le(ee,F,!0)},trigger:p,content:te,$$slots:{trigger:!0,content:!0}})}me(d),M(()=>$t(d,1,`${Z()&&R()?"contents":"inline-flex items-center"} ${xe()??""}`)),r(e,d)};D(ot,e=>{$e()?e(at):e(nt,-1)})}r(O,He);var st=kt(rt);return Ke(),st}export{wr as O,sr as a,je as r,ir as s};
|
|
1
|
+
import{t as _t,bq as _,a_ as D,by as mt,bs as gt,b as vt,bo as x,bu as be,bt as Te}from"./7rNOGHzs.js";import{bs as ht,cd as yt,ca as wt,bk as xt,a7 as N,ay as m,W as r,bn as kt,aA as g,aD as t,bS as z,a5 as _e,bH as Le,bA as me,b_ as M,aB as E,c9 as o,bf as It,bl as oe,bO as ae,bV as Ct}from"./B8o4lNgr.js";import{k as $t,h as Pt,s as Be,c as At}from"./DmsDslNo.js";import{s as Me}from"./CQ4a5a4v.js";import{c as S}from"./CiENRH6A.js";import{cF as Et,bl as Ot,aK as Ft,F as ne,aX as Tt,aL as Lt,bm as Bt,a7 as qe,av as Dt}from"./CFejQM6t.js";import{W as Nt,T as zt,G as St,C as Rt,X as Ht,J as Wt,V as Mt}from"./CuLyvgLV.js";import{f as ge}from"./Bgegixo2.js";import{i as qt}from"./BZC0V7Vm.js";import{n as Vt,R as Gt,r as jt,q as Kt,p as Xt,o as Ve}from"./DSjRkndX.js";import{n as ve}from"./lfJ8pseq.js";import{c as Jt}from"./ChTqQfQN.js";import"./D-cnPaTJ.js";import{Hq as Ge,mq as Ut,Ef as Yt}from"./CRwmdgt6.js";import{v as Qt}from"./DCaHy20k.js";import{i as J}from"./BkBdyRjM.js";import{bn as Zt,b4 as er,b2 as tr}from"./BJKiZYvw.js";import{ck as rr}from"./KQTrHxko.js";import{t as or}from"./H2jLkRRS.js";const ar={cursor:Rt,ghostty:St,terminal:zt,warp:Nt},nr={vscode:Mt,jetbrains:Wt,xcode:Ht};function sr(O){return ar[O.id]??nr[O.handlerType]??null}function je(O){return O==="terminal"?Et:O==="finder"?Ot:Ft}const ir="shrink-0 text-muted-foreground hover:text-foreground focus-visible:text-foreground [&_svg]:size-4",De="finder",lr={id:De,name:"Finder",shortLabel:"Finder",appName:"Finder",category:"finder",handlerType:"finder",installed:!0,priority:0};function cr(O,s=[]){const se=new Set(s),U=O.filter(({installed:Y,id:ye})=>Y&&!se.has(ye));return U.some(({id:Y})=>Y===De)||se.has(De)?U:[...U,lr]}var dr=E('<img alt="" class="size-4"/>'),ur=E('<kbd class="type-caption ml-4 text-muted-foreground" aria-hidden="true"> </kbd>'),pr=E('<span class="min-w-0 flex-1 truncate"> </span> <!>',1),fr=E("<span> </span>"),he=E("<!> <!>",1),br=E("<span><!></span>"),_r=E('<img class="w-4 h-4"/>'),mr=E('<!> <span class="text-muted-foreground"> </span>',1),gr=E('<div class="inline-flex items-stretch rounded-md border border-border" data-open-combo-control=""><!> <!></div>'),vr=E('<div class="type-caption px-2 py-1.5 text-subtle"> </div>'),hr=E('<div class="w-60 max-w-full"><!> <!> <!></div>'),yr=E("<div><!></div>");function wr(O,s){if(new.target)return _t({component:wr,...O});ht(s,!0);const se=()=>be(Je,"$installedEditors$",ie),U=()=>be(Ue,"$hiddenEditorIds$",ie),Y=()=>be(Ye,"$isWorkspaceHostLocal$",ie),ye=()=>be(Xe,"$openAction",ie),[ie,Ke]=gt(),le=(e,d=It)=>{var u=N(),p=m(u);S(p,()=>Gt,(te,G)=>{G(te,{get value(){return t(v).id},children:(F,B)=>{var I=N(),T=m(I);Pt(T,17,d,C=>C.id,(C,c)=>{var j=N(),h=m(j);{const $=a=>{var i=N(),y=m(i);{var H=l=>{var A=dr();M(()=>Be(A,"src",`data:image/png;base64,${t(c).iconBase64??""}`)),r(l,A)},b=l=>{const A=o(()=>t(c).icon);var W=N(),L=m(W);S(L,()=>t(A),(K,re)=>{re(K,{size:16})}),r(l,W)},P=l=>{{let A=o(()=>t(c).faIcon??je(t(c).category));ne(l,{get icon(){return t(A)},class:"size-4 text-muted-foreground"})}};D(y,l=>{t(c).iconBase64?l(H):t(c).icon?l(b,1):l(P,-1)})}r(a,i)};let n=o(()=>!k());S(h,()=>Vt,(a,i)=>{i(a,{get value(){return t(c).id},closeOnSelect:!0,get disabled(){return t(n)},onSelect:()=>tt(t(c).id),get textValue(){return t(c).label},leading:$,children:(y,H)=>{var b=pr(),P=m(b),l=oe(P,!0),A=z(P,2);{var W=L=>{var K=ur(),re=oe(K,!0);M(()=>ae(re,t(c).shortcut)),r(L,K)};D(A,L=>{t(c).shortcut&&L(W)})}M(()=>ae(l,t(c).label)),r(y,b)},$$slots:{leading:!0,default:!0}})})}r(C,j)}),r(F,I)},$$slots:{default:!0}})}),r(e,u)},Ne=Jt("OpenComboButton");let k=_(s,"filePath",7),ce=_(s,"workspaceId",7,""),de=_(s,"isDirectory",7,!0),we=_(s,"workspaceFolderPath",7),xe=_(s,"class",7,""),ue=_(s,"headerText",7),ke=_(s,"usePortal",7,!0),Ie=_(s,"side",7,"bottom"),q=_(s,"variant",7,"default"),Q=_(s,"branchName",7),Ce=_(s,"compact",7,!1),$e=_(s,"embedded",7,!1),Z=_(s,"inline",7,!1),V=_(s,"iconOnly",7,!1),R=_(s,"children",7,void 0);const ze=o(()=>q()==="sidebar"?"bg-sidebar hover:bg-sidebar/80":"bg-background hover:bg-muted"),Pe=yt(ce());wt(()=>{Pe.set(ce())});const Xe=Zt(),Je=er(Pe),Ue=tr(),Ye=rr(Pe);let ee=Ct(!1);xt(()=>{Ge.dispatch(Ut())});function Qe(e){return{id:e.id,label:e.name,shortLabel:e.shortLabel,icon:sr(e),shortcut:e.shortcut,handlerType:e.handlerType,appName:e.appName,category:e.category,iconBase64:e.iconBase64}}const Ze=Qt("externalEditors");let f=o(()=>{const e=se(),d=cr(e,U()).map(Qe),u={id:"other",label:x.ui_openCombo_other_label(),shortLabel:x.ui_openCombo_other_label(),icon:null,faIcon:Bt,handlerType:"generic"},p=[{id:"copy",label:x.ui_openCombo_copyPath_label(),shortLabel:x.ui_openCombo_copy_shortLabel(),icon:null,faIcon:Tt},...Q()?[{id:"copy-branch",label:x.ui_openCombo_copyBranch_label(),shortLabel:x.ui_openCombo_copyBranch_shortLabel(),icon:null,faIcon:Lt}]:[]];return!Ze||!Y()?p:[...d,u,...p]});const pe=o(()=>t(f).some(e=>e.id!=="copy"&&e.id!=="copy-branch")),fe=o(()=>t(f).filter(e=>e.id!=="copy"&&e.id!=="copy-branch")),Se=o(()=>t(f).filter(e=>e.id==="copy"||e.id==="copy-branch")),v=o(()=>t(pe)?t(f).find(e=>e.id===ye())||t(f)[0]:t(f).find(e=>e.id==="copy")||t(f)[0]),Ae=o(()=>t(pe)?x.ui_openCombo_openIn_tooltip({name:t(v).label}):t(v).label);function Ee(){if(de())return k();const e=we()||k().substring(0,k().lastIndexOf("/"));return e?{folder:e,file:k()}:k()}async function Oe(e){if(!k())return;const d=de()?k():k().substring(0,k().lastIndexOf("/"));try{if(e==="copy"){await navigator.clipboard.writeText(or(k())),ve.success(x.ui_openCombo_pathCopied_label());return}if(e==="copy-branch"){Q()&&(await navigator.clipboard.writeText(Q()),ve.success(x.ui_openCombo_branchCopied_label()));return}if(e==="other"){const p=await J("external-editors:open-with-other",{path:d});p?.success?Le(ee,!1):p?.error&&p.error!=="No application selected"&&ve.error(p.error);return}const u=t(f).find(p=>p.id===e);if(!u){Ne.warn(`Unknown action: ${e}`);return}switch(u.handlerType){case"finder":await J("shell:showItemInFolder",{path:d});break;case"vscode":await J("vscode:open",Ee());break;case"jetbrains":await J("jetbrains:open",Ee());break;case"xcode":await J("xcode:open",Ee());break;case"generic":default:{await J("external-editors:open",{editorId:u.id,path:d});break}}}catch(u){Ne.error(`Failed to execute action ${e}:`,u),ve.error(u instanceof Error?u.message:x.ui_openCombo_openFailed_error({name:e}))}}function Fe(e){e.stopPropagation(),Oe(t(v).id)}function et(e){e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),e.stopPropagation(),Oe(t(v).id))}function Re(e){e.stopPropagation()}function tt(e){Ge.dispatch(Yt(e)),Oe(e),Le(ee,!1)}var rt={get filePath(){return k()},set filePath(e){k(e),g()},get workspaceId(){return ce()},set workspaceId(e=""){ce(e),g()},get isDirectory(){return de()},set isDirectory(e=!0){de(e),g()},get workspaceFolderPath(){return we()},set workspaceFolderPath(e){we(e),g()},get class(){return xe()},set class(e=""){xe(e),g()},get headerText(){return ue()},set headerText(e){ue(e),g()},get usePortal(){return ke()},set usePortal(e=!0){ke(e),g()},get side(){return Ie()},set side(e="bottom"){Ie(e),g()},get variant(){return q()},set variant(e="default"){q(e),g()},get branchName(){return Q()},set branchName(e){Q(e),g()},get compact(){return Ce()},set compact(e=!1){Ce(e),g()},get embedded(){return $e()},set embedded(e=!1){$e(e),g()},get inline(){return Z()},set inline(e=!1){Z(e),g()},get iconOnly(){return V()},set iconOnly(e=!1){V(e),g()},get children(){return R()},set children(e=void 0){R(e),g()},$set:mt,$on:(e,d)=>vt(s,e,d)},He=N(),ot=m(He);{var at=e=>{var d=he(),u=m(d);{var p=G=>{var F=he(),B=m(F);S(B,()=>Xt,(T,C)=>{C(T,{children:(c,j)=>{var h=he(),$=m(h);S($,()=>jt,(a,i)=>{i(a,{get icon(){return qe},children:(y,H)=>{var b=fr(),P=oe(b,!0);M(l=>ae(P,l),[()=>x.ui_openCombo_openInApp_tooltip()]),r(y,b)},$$slots:{default:!0}})});var n=z($,2);S(n,()=>Kt,(a,i)=>{i(a,{class:"w-60",children:(y,H)=>{le(y,()=>t(fe))},$$slots:{default:!0}})}),r(c,h)},$$slots:{default:!0}})});var I=z(B,2);S(I,()=>Ve,(T,C)=>{C(T,{})}),r(G,F)};D(u,G=>{t(fe).length&&G(p)})}var te=z(u,2);le(te,()=>t(Se)),r(e,d)},nt=e=>{var d=yr(),u=_e(d);{const p=(F,B)=>{let I=()=>(B?.()).props;var T=N(),C=m(T);{var c=n=>{var a=br();At(a,()=>({role:"button",tabindex:"0",onclick:t(f).length>1?void 0:Fe,onkeydown:t(f).length>1?void 0:et,...t(f).length>1?I():{},class:"cursor-pointer break-words rounded-sm text-inherit underline decoration-muted-foreground/20 underline-offset-2 hover:decoration-current focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:t(Ae)}));var i=_e(a);Me(i,R),me(a),r(n,a)},j=n=>{{let a=o(()=>t(f).length>1?void 0:Fe),i=o(()=>V()&&q()!=="sidebar"?"plain":"ghost"),y=o(()=>V()?q()==="sidebar"?"icon-compact":"icon-sm":void 0),H=o(()=>V()&&q()==="sidebar"&&t(ee)),b=o(()=>!V()),P=o(()=>V()?q()==="sidebar"?ir:"cursor-pointer text-muted-foreground hover:text-foreground focus-visible:text-foreground":"cursor-pointer");ge(n,Te({type:"button",get onclick(){return t(a)}},()=>t(f).length>1?I():{},{get variant(){return t(i)},get size(){return t(y)},get active(){return t(H)},get wrapContent(){return t(b)},get class(){return t(P)},get title(){return t(Ae)},children:(l,A)=>{var W=N(),L=m(W);Me(L,R),r(l,W)},$$slots:{default:!0}}))}},h=n=>{{let a=o(()=>x.ui_openCombo_openInApp_tooltip());ge(n,Te(I,{variant:"ghost-light",size:"icon-xs",get tooltip(){return t(a)},tooltipSide:"bottom",children:(i,y)=>{ne(i,{get icon(){return qe},size:"xs"})},$$slots:{default:!0}}))}},$=n=>{var a=gr(),i=_e(a);{let b=o(()=>t(f).length>1?"rounded-r-none":""),P=o(()=>t(ze)),l=o(()=>t(pe)?t(Ae):void 0);ge(i,{type:"button",variant:"ghost",size:"sm",get class(){return`gap-1.5 px-2 ${t(b)??""} ${t(P)??""}`},onpointerdown:Re,onkeydown:Re,onclick:Fe,get title(){return t(l)},children:(A,W)=>{var L=mr(),K=m(L);{var re=w=>{var X=_r();M(()=>{Be(X,"src",`data:image/png;base64,${t(v).iconBase64??""}`),Be(X,"alt",t(v).label)}),r(w,X)},it=w=>{const X=o(()=>t(v).icon);var We=N(),pt=m(We);S(pt,()=>t(X),(ft,bt)=>{bt(ft,{size:14})}),r(w,We)},lt=w=>{ne(w,{get icon(){return t(v).faIcon},class:"w-3.5 h-3.5 opacity-60"})},ct=w=>{{let X=o(()=>je(t(v).category));ne(w,{get icon(){return t(X)},class:"w-3.5 h-3.5 opacity-60"})}};D(K,w=>{t(v).iconBase64?w(re):t(v).icon?w(it,1):t(v).faIcon?w(lt,2):w(ct,-1)})}var dt=z(K,2),ut=oe(dt,!0);M(w=>ae(ut,w),[()=>t(pe)?x.ui_openCombo_open_label():t(v).label]),r(A,L)},$$slots:{default:!0}})}var y=z(i,2);{var H=b=>{{let P=o(()=>x.ui_openCombo_openInApp_tooltip());ge(b,Te(I,{type:"button",variant:"ghost",size:"icon-sm",get"aria-label"(){return t(P)},get class(){return`rounded-l-none border-l border-border ${t(ze)??""}`},children:(l,A)=>{ne(l,{get icon(){return Dt},class:"size-3! text-muted-foreground"})},$$slots:{default:!0}}))}};D(y,b=>{t(f).length>1&&b(H)})}me(a),r(n,a)};D(C,n=>{Z()&&R()?n(c):R()?n(j,1):Ce()?n(h,2):n($,-1)})}r(F,T)},te=F=>{var B=hr(),I=_e(B);{var T=h=>{var $=vr(),n=oe($,!0);M(()=>ae(n,ue())),r(h,$)};D(I,h=>{ue()&&h(T)})}var C=z(I,2);{var c=h=>{var $=he(),n=m($);le(n,()=>t(fe));var a=z(n,2);S(a,()=>Ve,(i,y)=>{y(i,{})}),r(h,$)};D(C,h=>{t(fe).length&&h(c)})}var j=z(C,2);le(j,()=>t(Se)),me(B),r(F,B)};let G=o(()=>Z()&&R()?"contents!":"");qt(u,{align:"end",get portal(){return ke()},get side(){return Ie()},get class(){return t(G)},get open(){return t(ee)},set open(F){Le(ee,F,!0)},trigger:p,content:te,$$slots:{trigger:!0,content:!0}})}me(d),M(()=>$t(d,1,`${Z()&&R()?"contents":"inline-flex items-center"} ${xe()??""}`)),r(e,d)};D(ot,e=>{$e()?e(at):e(nt,-1)})}r(O,He);var st=kt(rt);return Ke(),st}export{wr as O,sr as a,je as r,ir as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as Ut,bq as R,bo as u,a_ as W,by as Ot,b as Rt}from"./7rNOGHzs.js";import{bs as Gt,bV as K,br as rt,bk as er,bj as tr,bH as r,a5 as c,aD as e,bS as n,bl as y,bA as l,b_ as g,bO as m,W as o,bn as Mt,aA as G,c9 as z,be as Ve,b$ as Be,aB as b,c5 as mt,ca as ft,a7 as Fe,ay as F,ai as rr,aj as ar,bf as sr}from"./B8o4lNgr.js";import{I as or,k as Ue,d as gt,h as Xe,s as nr}from"./DmsDslNo.js";import{c as Ee}from"./CiENRH6A.js";import{H as Oe,C as Ze,h as $t}from"./DzMmhJrp.js";import{b as xt}from"./D2g8BuR1.js";import{F as Te,cM as ir,at as lr,cF as bt,cW as Pt,c9 as cr}from"./CFejQM6t.js";import{f as we}from"./Bgegixo2.js";import{M as dr}from"./Ck-Ax5yG.js";import{t as nt}from"./B7s4-XTz.js";import{e as pr,a0 as _e}from"./B1s3oEqm.js";import{e as Ct,f as Et,d as Tt,P as At}from"./lfJ8pseq.js";import{C as ht}from"./KbdMwrlk.js";import{c as ur}from"./ChTqQfQN.js";import"./CQ4a5a4v.js";import{y as vr}from"./yAjP_kdp.js";import{Hq as _r}from"./CRwmdgt6.js";import{dx as mr}from"./KQTrHxko.js";import{S as et,k as fr,a as jt}from"./C87YV7yB.js";import{R as qe,c as it,m as gr,bF as tt}from"./lG67Zx5D.js";import"./C_tu278J.js";var xr=b('<div class="w-2 h-2 bg-green-500 rounded-full animate-pulse"></div>'),br=b('<div class="text-sm text-danger bg-danger-background/10 rounded-md p-3"> </div>'),hr=b('<div class="flex items-center gap-2 text-subtle"><!> <span class="text-sm"> </span></div>'),yr=b('<div class="p-4 max-h-60 overflow-y-auto overscroll-contain"><!></div>'),Sr=b('<div class="p-3 bg-muted/30"><div class="flex items-center justify-between mb-2"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span></div> <!></div> <p class="text-xs text-subtle mb-2"> </p> <div class="h-32 rounded border border-border overflow-hidden"><!></div></div>'),wr=b('<div class="flex flex-col bg-background border border-border rounded-lg overflow-hidden"><div class="flex items-center justify-between px-3 py-2 border-b border-border bg-muted/30"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span> <!></div> <div class="flex items-center gap-1"><!></div></div> <!> <!></div>');function yt(He,P){if(new.target)return Ut({component:yt,...He});Gt(P,!0);const at=ur("SetupScriptAgent");let Ae=R(P,"repoPath",7),Re=R(P,"onScriptGenerated",7),Ge=R(P,"onClose",7),Me=K(rt(crypto.randomUUID())),U=K(!1),ae=K(null),me=!1,ie=K(null);er(()=>{me=!0,C()}),tr(()=>{me=!1});async function le(){try{const v=mr.select(_r.state).find(E=>E.repositoryPath===Ae()||E.path===Ae()||E.worktreePath===Ae());return v?String(v.id):null}catch{return null}}async function C(){r(U,!0),r(ae,null),r(ie,null);try{const s=await le();if(!me)return;if(!s){r(ae,u.workspace_setupScriptAgent_noWorkspace_error(),!0),r(U,!1);return}const v=await vr.setupScripts.generate(s);if(!me)return;if(!v||!v.script){r(ae,u.workspace_setupScriptAgent_generateFailed_error(),!0),r(U,!1);return}r(ie,{name:v.projectType?u.workspace_setupScriptAgent_projectTypeSetup_label({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedSetup_label(),description:v.projectType?u.workspace_setupScriptAgent_generatedForProject_description({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedFromAnalysis_description(),content:v.script},!0),r(U,!1)}catch(s){if(at.error("Failed to generate setup script",s),!me)return;r(ae,s instanceof Error?s.message:u.workspace_setupScriptAgent_generateFailed_error(),!0),r(U,!1)}}function fe(s){Re()?.(s)}var ge={get repoPath(){return Ae()},set repoPath(s){Ae(s),G()},get onScriptGenerated(){return Re()},set onScriptGenerated(s){Re(s),G()},get onClose(){return Ge()},set onClose(s){Ge(s),G()},$set:Ot,$on:(s,v)=>Rt(P,s,v)},ce=wr(),xe=c(ce),be=c(xe),De=c(be);pr(De,{variant:"standard",get agentId(){return e(Me)}});var Le=n(De,2),je=y(Le,!0),he=n(Le,2);{var de=s=>{var v=xr();o(s,v)};W(he,s=>{e(U)&&s(de)})}l(be);var J=n(be,2),ke=c(J);{let s=z(()=>u.workspace_setupScriptAgent_close_ariaLabel());we(ke,{variant:"ghost-light",size:"icon-sm",iconOnly:!0,get"aria-label"(){return e(s)},get onclick(){return Ge()},children:(v,E)=>{Te(v,{get icon(){return ir}})},$$slots:{default:!0}})}l(J),l(xe);var $e=n(xe,2);{var Ie=s=>{var v=yr(),E=c(v);{var q=B=>{var M=br(),Q=y(M,!0);g(()=>m(Q,e(ae))),o(B,M)},se=B=>{var M=hr(),Q=c(M);or(Q,{size:16,class:"text-primary"});var ye=n(Q,2),ze=y(ye,!0);l(M),g(Se=>m(ze,Se),[()=>u.workspace_setupScriptAgent_analyzing_label()]),o(B,M)};W(E,B=>{e(ae)?B(q):B(se,-1)})}l(v),o(s,v)};W($e,s=>{(e(ae)||e(U))&&s(Ie)})}var Ye=n($e,2);{var pe=s=>{var v=Sr(),E=c(v),q=c(E),se=c(q);Te(se,{get icon(){return lr},class:"text-green-500"});var B=n(se,2),M=y(B,!0);l(q);var Q=n(q,2);we(Q,{variant:"primary",size:"sm",onclick:()=>fe(e(ie)),class:"h-7",children:(Pe,st)=>{Ve();var Je=Be();g(ct=>m(Je,ct),[()=>u.workspace_setupScriptAgent_createScript_label()]),o(Pe,Je)},$$slots:{default:!0}}),l(E);var ye=n(E,2),ze=y(ye,!0),Se=n(ye,2),lt=c(Se);ht(lt,{get value(){return e(ie).content},language:"shell",readOnly:!0,lineNumbers:!1}),l(Se),l(v),g(()=>{m(M,e(ie).name),m(ze,e(ie).description)}),o(s,v)};W(Ye,s=>{e(ie)&&!e(U)&&s(pe)})}return l(ce),g(s=>m(je,s),[()=>u.workspace_setupScriptAgent_title()]),o(He,ce),Mt(ge)}var kr=b('<span class="block truncate"> </span>'),$r=b("<div></div>"),Pr=b('<div role="group"></div> <div class="mt-2 border-t border-border pt-2"><!></div> <!> <div class="mt-2 border-t border-border pt-2"><!> <!></div>',1),Cr=b('<code class="type-caption text-muted-foreground"> </code>'),Er=b('<p> </p> <code class="type-caption"> </code>',1),It=b("<!> <!>",1),Tr=b('<div class="mt-2 flex flex-wrap gap-2 px-2"></div>'),Ar=b('<div class="h-44 min-w-0 overflow-hidden rounded-(--radius-medium) border border-border bg-background py-2"><!></div> <div class="mt-2 px-1"><!> <!></div>',1),jr=b('<div class="mb-2 flex items-center justify-between gap-3 px-2"><div class="min-w-0"><h3> </h3> <p class="type-caption truncate text-muted-foreground"> </p></div> <!></div> <!>',1),Ke=b("<div><!></div>"),Ir=b("<!> ",1),Nt=b('<div class="min-w-0 w-full"><span class="text-sm"> </span> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Ft=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>'),Nr=b('<span class="type-caption px-1.5 py-0.5 rounded-full bg-primary/10 text-primary font-medium shrink-0"> </span>'),Fr=b('<div class="min-w-0 w-full"><div class="flex flex-wrap items-center gap-x-2 gap-y-1"><span class="text-sm"> </span> <!></div> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Ur=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <p class="text-xs text-subtle px-2 mb-2"> </p> <!></div> <!> <!> <div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>',1),Or=b('<code class="type-caption px-1.5 py-0.5 rounded bg-background/80 text-muted-foreground font-mono cursor-pointer hover:bg-background hover:text-foreground transition-colors"> </code>'),Rr=b('<p class="text-xs"> </p> <p class="mt-1 text-xs text-muted-foreground"> <code class="type-caption"> </code></p>',1),Gr=b('<div class="flex flex-wrap items-center gap-x-3 gap-y-1.5 px-3 py-1.5 bg-muted/30 shrink-0"><span class="type-caption font-medium text-muted-foreground shrink-0"> </span> <div class="flex flex-wrap gap-1.5"></div></div> <div class="flex-1 min-h-0 min-w-0 overflow-hidden py-3 bg-background"><!></div>',1),Mr=b('<div class="flex min-h-0 min-w-0 flex-col overflow-y-auto"><!></div> <div class="flex min-h-0 min-w-0 flex-col"><!></div>',1),Dr=b('<div class="flex flex-col min-h-0 min-w-0 overflow-y-auto p-2 md:pr-4"><!></div> <div class="flex flex-col min-w-0 min-h-0"><!></div>',1),Lr=b('<!> <span class="text-sm font-normal text-subtle"> </span> <span class="text-subtle font-normal"> </span>',1),zr=b('<div class="mt-1 pl-7 space-y-3"><!></div>'),Wr=b('<div class="space-y-3"><!></div>'),qr=b("<div><!> <!></div> <!>",1);function Kr(He,P){if(new.target)return Ut({component:Kr,...He});Gt(P,!0);const at=(t,a=sr)=>{{const w=_=>{Te(_,{get icon(){return bt},get class(){return _e.icon}})},j=_=>{var i=kr(),f=y(i,!0);g(()=>m(f,a().name)),o(_,i)},T=_=>{{let i=z(()=>e(st)===a().id?"checked":"empty");dr(_,{get state(){return e(i)}})}};let h=z(()=>e(st)===a().id),$=z(()=>e(st)===a().id);nt(t,{get selected(){return e(h)},get"aria-pressed"(){return e($)},get"data-setup-source"(){return a().id},get class(){return _e.row},onclick:()=>a().id==="custom"?Dt():Se(a().id),leading:w,title:j,trailing:T,$$slots:{leading:!0,title:!0,trailing:!0}})}},Ae=t=>{var a=Ke(),w=c(a);{var j=h=>{var $=Pr(),_=F($);Xe(_,21,()=>e(Je),I=>I.id,(I,O)=>{at(I,()=>e(O))}),l(_);var i=n(_,2),f=c(i);nt(f,{get"aria-expanded"(){return e($e)},get class(){return _e.row},onclick:()=>r($e,!e($e)),leading:S=>{Te(S,{get icon(){return cr},get class(){return _e.icon}})},title:S=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptEditor_templates_label()]),o(S,d)},$$slots:{leading:!0,title:!0}}),l(i);var x=n(i,2);{var k=I=>{var O=$r();Xe(O,21,()=>e(ct),S=>S.id,(S,d)=>{at(S,()=>({id:`template-${e(d).id}`,name:e(d).name}))}),l(O),Oe(3,O,()=>Ze,()=>({tier:"moderate"})),o(I,O)};W(x,I=>{e($e)&&I(k)})}var D=n(x,2),ue=c(D);nt(ue,{get class(){return _e.row},onclick:()=>r(ke,!0),leading:S=>{Te(S,{get icon(){return bt},get class(){return _e.icon}})},title:S=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptPicker_edit_label()]),o(S,d)},$$slots:{leading:!0,title:!0}});var ve=n(ue,2);{const I=d=>{Te(d,{get icon(){return Pt},get class(){return _e.icon}})},O=d=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(d,p)};let S=z(()=>!U());nt(ve,{get class(){return _e.row},get disabled(){return e(S)},onclick:()=>{r(ke,!0),r(J,!0)},leading:I,title:O,$$slots:{leading:!0,title:!0}})}l(D),g(I=>nr(_,"aria-label",I),[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(h,$)},T=h=>{var $=jr(),_=F($),i=c(_),f=c(i),x=y(f,!0),k=n(f,2),D=y(k,!0);l(i);var ue=n(i,2);we(ue,{variant:"ghost",size:"sm",onclick:()=>{r(ke,!1),r(J,!1)},children:(S,d)=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptPicker_choose_label()]),o(S,p)},$$slots:{default:!0}}),l(_);var ve=n(_,2);{var I=S=>{yt(S,{get repoPath(){return U()},onScriptGenerated:Lt,onClose:()=>r(J,!1)})},O=S=>{var d=Ar(),p=F(d),N=c(p);xt(ht(N,{language:"shell",lineNumbers:!1,get lineWrapping(){return e(ye)},get value(){return C()},set value(A){C(A)}}),A=>r(pe,A,!0),()=>e(pe)),l(p);var X=n(p,2),H=c(X);we(H,{variant:"ghost",size:"sm",get active(){return e(Ie)},get"aria-expanded"(){return e(Ie)},onclick:()=>r(Ie,!e(Ie)),children:(A,oe)=>{Ve();var L=Be();g(ee=>m(L,ee),[()=>u.workspace_setupScriptEditor_variables_label()]),o(A,L)},$$slots:{default:!0}});var V=n(H,2);{var Z=A=>{var oe=Fe(),L=F(oe);Ee(L,()=>At,(ee,te)=>{te(ee,{delayDuration:100,children:(ne,Ce)=>{var Y=Tr();Xe(Y,21,()=>jt,re=>re.name,(re,Ne)=>{var We=Fe(),pt=F(We);Ee(pt,()=>Ct,(Vt,Bt)=>{Bt(Vt,{children:(Ht,Vr)=>{var wt=It(),kt=F(wt);Ee(kt,()=>Et,(ut,vt)=>{vt(ut,{children:(_t,Jt)=>{var Qe=Cr(),ot=y(Qe);g(()=>m(ot,`$${e(Ne).name??""}`)),o(_t,Qe)},$$slots:{default:!0}})});var Yt=n(kt,2);Ee(Yt,()=>Tt,(ut,vt)=>{vt(ut,{side:"top",class:"max-w-xs",children:(_t,Jt)=>{var Qe=Er(),ot=F(Qe),Qt=y(ot,!0),Xt=n(ot,2),Zt=y(Xt,!0);g(()=>{m(Qt,e(Ne).description),m(Zt,e(Ne).example)}),o(_t,Qe)},$$slots:{default:!0}})}),o(Ht,wt)},$$slots:{default:!0}})}),o(re,We)}),l(Y),o(ne,Y)},$$slots:{default:!0}})}),o(A,oe)};W(V,A=>{e(Ie)&&A(Z)})}l(X),o(S,d)};W(ve,S=>{e(J)&&U()?S(I):S(O,-1)})}g(S=>{Ue(f,1,gt(_e.title),"svelte-1yy464i"),m(x,S),m(D,e(ze))},[()=>u.workspace_setupScriptPicker_commands_label()]),o(h,$)};W(w,h=>{e(ke)?h(T,-1):h(j)})}l(a),xt(a,h=>r(Ye,h),()=>e(Ye)),g(()=>Ue(a,1,`${_e.rows} min-w-0`,"svelte-1yy464i")),o(t,a)},Re=t=>{var a=Ur(),w=F(a),j=c(w),T=y(j,!0),h=n(j,2),$=y(h,!0),_=n(h,2);{var i=d=>{var p=Ke(),N=c(p);yt(N,{get repoPath(){return U()},onScriptGenerated:X=>{r(se,!0),r(s,""),C(X.content),r(E,X.name,!0),r(v,!0),de()?.(C()),r(J,!1),requestAnimationFrame(()=>e(pe)?.focus())},onClose:()=>r(J,!1)}),l(p),Oe(3,p,()=>Ze,()=>({tier:"moderate"})),o(d,p)},f=d=>{{let p=z(()=>!U());we(d,{variant:"ghost",size:"sm",class:"w-full justify-start text-subtle",onclick:()=>r(J,!0),get disabled(){return e(p)},children:(N,X)=>{var H=Ir(),V=F(H);Te(V,{get icon(){return Pt},class:"mr-1.5"});var Z=n(V);g(A=>m(Z,` ${A??""}`),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(N,H)},$$slots:{default:!0}})}};W(_,d=>{e(J)&&U()?d(i):d(f,-1)})}l(w);var x=n(w,2);{var k=d=>{var p=Ft(),N=c(p),X=y(N,!0),H=n(N,2);{let V=z(()=>e(s)===qe),Z=z(()=>e(s)===qe);we(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>Se(qe),children:(A,oe)=>{var L=Nt(),ee=c(L),te=y(ee,!0),ne=n(ee,2),Ce=y(ne,!0);l(L),g((Y,re)=>{m(te,Y),m(Ce,re)},[()=>tt(it,"repo-config"),()=>u.workspace_setupScriptEditor_repoConfig_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_repoConfig_label()]),o(d,p)};W(x,d=>{le()&&d(k)})}var D=n(x,2);{var ue=d=>{var p=Ft(),N=c(p),X=y(N,!0),H=n(N,2);{let V=z(()=>e(s)===B),Z=z(()=>e(s)===B);we(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>Se(B),children:(A,oe)=>{var L=Nt(),ee=c(L),te=y(ee,!0),ne=n(ee,2),Ce=y(ne,!0);l(L),g((Y,re)=>{m(te,Y),m(Ce,re)},[()=>tt(e(M).name,e(M).nameSource),()=>u.workspace_setupScriptEditor_lastUsed_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_lastUsed_label()]),o(d,p)};W(D,d=>{e(M)&&d(ue)})}var ve=n(D,2),I=c(ve),O=y(I,!0),S=n(I,2);Xe(S,17,()=>et,d=>d.id,(d,p)=>{{let N=z(()=>e(s)===`template-${e(p).id}`),X=z(()=>e(s)===`template-${e(p).id}`);we(d,{variant:"ghost",truncateLabel:!1,get active(){return e(N)},get"aria-pressed"(){return e(X)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>Se(`template-${e(p).id}`),children:(H,V)=>{var Z=Fr(),A=c(Z),oe=c(A),L=y(oe,!0),ee=n(oe,2);{var te=Y=>{var re=Nr(),Ne=y(re,!0);g(We=>m(Ne,We),[()=>u.workspace_setupScriptEditor_recommended_label()]),o(Y,re)};W(ee,Y=>{e(p).projectType===ie()&&Y(te)})}l(A);var ne=n(A,2),Ce=y(ne,!0);l(Z),g(()=>{m(L,e(p).name),m(Ce,e(p).description)}),o(H,Z)},$$slots:{default:!0}})}}),l(ve),g((d,p,N)=>{m(T,d),m($,p),m(O,N)},[()=>u.workspace_setupScriptEditor_generate_label(),()=>u.workspace_setupScriptEditor_generate_description(),()=>u.workspace_setupScriptEditor_templates_label()]),o(t,a)},Ge=t=>{var a=Gr(),w=F(a),j=c(w),T=y(j,!0),h=n(j,2);Xe(h,21,()=>jt,i=>i.name,(i,f)=>{var x=Fe(),k=F(x);Ee(k,()=>At,(D,ue)=>{ue(D,{delayDuration:100,children:(ve,I)=>{var O=Fe(),S=F(O);Ee(S,()=>Ct,(d,p)=>{p(d,{delayDuration:100,children:(N,X)=>{var H=It(),V=F(H);Ee(V,()=>Et,(A,oe)=>{oe(A,{children:(L,ee)=>{var te=Or(),ne=y(te);g(()=>m(ne,`$${e(f).name??""}`)),o(L,te)},$$slots:{default:!0}})});var Z=n(V,2);Ee(Z,()=>Tt,(A,oe)=>{oe(A,{side:"bottom",class:"max-w-xs z-[200]",children:(L,ee)=>{var te=Rr(),ne=F(te),Ce=y(ne,!0),Y=n(ne,2),re=c(Y),Ne=n(re),We=y(Ne,!0);l(Y),g(pt=>{m(Ce,e(f).description),m(re,`${pt??""} `),m(We,e(f).example)},[()=>u.workspace_setupScriptEditor_example_before()]),o(L,te)},$$slots:{default:!0}})}),o(N,H)},$$slots:{default:!0}})}),o(ve,O)},$$slots:{default:!0}})}),o(i,x)}),l(h),l(w);var $=n(w,2),_=c($);xt(ht(_,{language:"shell",lineNumbers:!0,get lineWrapping(){return e(ye)},get value(){return C()},set value(i){C(i)}}),i=>r(pe,i,!0),()=>e(pe)),l($),g(i=>m(T,i),[()=>u.workspace_setupScriptEditor_variables_label()]),ar("keydown",$,i=>{i.altKey&&i.key==="z"&&(i.preventDefault(),r(ye,!e(ye)))}),o(t,a)},Me=t=>{var a=Ke(),w=c(a);{var j=h=>{var $=Mr(),_=F($),i=c(_);Re(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),Oe(1,_,()=>$t,()=>({tier:"moderate",axis:"x",distance:-8})),Oe(1,f,()=>$t,()=>({tier:"moderate",axis:"x"})),o(h,$)},T=h=>{var $=Dr(),_=F($),i=c(_);Re(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),o(h,$)};W(w,h=>{he()==="workspace"?h(j):h(T,-1)})}l(a),g(()=>Ue(a,1,gt(he()==="workspace"?"setup-workspace-layout":"grid flex-1 min-h-0 min-w-0 grid-cols-1 grid-rows-[minmax(0,1fr)_minmax(0,2fr)] md:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] md:grid-rows-1"),"svelte-1yy464i")),o(t,a)};let U=R(P,"repoPath",7,""),ae=R(P,"repositoryKey",7),me=R(P,"githubUrl",7,null),ie=R(P,"projectType",7,void 0),le=R(P,"repoConfigScript",7,null),C=R(P,"value",15,""),fe=R(P,"expanded",15,!1),ge=R(P,"scriptName",31,()=>rt(u.workspace_setupScriptEditor_custom_name())),ce=R(P,"scriptNameSource",15,"named"),xe=R(P,"isCustomScript",15,!1),be=R(P,"compact",7,!1),De=R(P,"triggerClass",7,""),Le=R(P,"contentOnly",7,!1),je=R(P,"contentClass",7,""),he=R(P,"presentation",7,"editor"),de=R(P,"onchange",7),J=K(!1),ke=K(rt(mt(()=>xe()))),$e=K(!1),Ie=K(!1),Ye=K(void 0),pe=K(void 0),s=K(""),v=K(!1),E=K(rt(ge())),q=K(rt(ce())),se=K(!1);const B="last-used",M=z(()=>{const t=ae()??U(),a=t?gr(t,me()):void 0;return a?.nameSource==="repo-config"?{...a,name:"Custom",nameSource:"custom"}:a}),Q=z(()=>{const t=new Map;return le()&&t.set(qe,{content:le(),label:it,source:"repo-config"}),e(M)&&t.set(B,{content:e(M).content,label:e(M).name,source:e(M).nameSource}),et.forEach(a=>{t.set(`template-${a.id}`,{content:fr(a),label:a.name,source:"named"})}),t});let ye=K(!0);const ze=z(()=>{if(e(v))return tt(e(E),e(q));if(!e(s))return u.workspace_setupScriptEditor_custom_name();const t=e(Q).get(e(s));return t?tt(t.label,t.source):u.workspace_setupScriptEditor_custom_name()});function Se(t){r(s,t,!0),r(v,!1),r(se,!0);const a=e(Q).get(t);a&&(C(a.content),r(E,a.label,!0),r(q,a.source,!0),de()?.(C())),he()==="picker"?(r(ke,!1),r($e,!1),requestAnimationFrame(()=>e(Ye)?.querySelector("[data-setup-source][aria-pressed=true]")?.focus())):requestAnimationFrame(()=>e(pe)?.focus())}function lt(t){if(e(s)&&e(s)!=="none"){const a=e(Q).get(e(s));a&&r(v,t!==a.content)}else t&&r(v,!0)}const Pe=(()=>{const t=et.find(a=>a.id==="generic");return t?`template-${t.id}`:""})(),st=z(()=>e(v)||!e(s)?"custom":e(s)),Je=z(()=>{const t=[];le()&&t.push({id:qe,name:tt(it,"repo-config")}),e(M)&&t.push({id:B,name:u.workspace_setupScriptEditor_lastUsed_label()});for(const a of et){const w=`template-${a.id}`;(w===Pe||w===e(s))&&t.push({id:w,name:a.name})}return t.push({id:"custom",name:u.workspace_setupScriptPicker_custom_label()}),t}),ct=z(()=>et.filter(t=>!e(Je).some(a=>a.id===`template-${t.id}`)));function Dt(){r(s,""),r(v,!0),r(E,"Custom"),r(q,"custom"),r(J,!1),r(ke,!0),requestAnimationFrame(()=>e(pe)?.focus())}function Lt(t){r(se,!0),r(s,""),C(t.content),r(E,t.name,!0),r(q,"named"),r(v,!0),de()?.(C()),r(J,!1),requestAnimationFrame(()=>e(pe)?.focus())}let dt=K(null);ft(()=>{const t=ae()??U();if(t===e(dt))return;const a=e(dt)===null&&(xe()||C().trim().length>0);if(r(dt,t,!0),a){mt(()=>{let T=!1;const h=C().trim();for(const[$,_]of e(Q).entries())if(h===_.content.trim()&&_.source===ce()&&_.label===ge()){r(s,$,!0),r(E,_.label,!0),r(q,_.source,!0),r(v,!1),T=!0;break}T||(r(v,!0),e(E)||(r(E,ge()||u.workspace_setupScriptEditor_custom_name(),!0),r(q,ge()?ce():"named",!0))),r(se,!0)});return}const w=!!le(),j=e(M);if(mt(()=>{if(r(v,!1),r(se,!0),w)r(s,qe,!0),r(E,it,!0),r(q,"repo-config");else if(j)r(s,B),r(E,j.name,!0),r(q,j.nameSource,!0);else if(Pe){r(s,Pe,!0);const T=e(Q).get(Pe);r(E,T?.label||u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}else r(E,u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}),w&&le())C(le()),de()?.(C());else if(j)C(j.content),de()?.(C());else if(Pe){const T=e(Q).get(Pe);T&&(C(T.content),de()?.(C()))}}),ft(()=>{if(e(se)){r(se,!1);return}C()!==void 0&<(C())}),ft(()=>{ge(e(E)),ce(e(q)),xe(e(v))});var zt={get repoPath(){return U()},set repoPath(t=""){U(t),G()},get repositoryKey(){return ae()},set repositoryKey(t){ae(t),G()},get githubUrl(){return me()},set githubUrl(t=null){me(t),G()},get projectType(){return ie()},set projectType(t=void 0){ie(t),G()},get repoConfigScript(){return le()},set repoConfigScript(t=null){le(t),G()},get value(){return C()},set value(t=""){C(t),G()},get expanded(){return fe()},set expanded(t=!1){fe(t),G()},get scriptName(){return ge()},set scriptName(t=u.workspace_setupScriptEditor_custom_name()){ge(t),G()},get scriptNameSource(){return ce()},set scriptNameSource(t="named"){ce(t),G()},get isCustomScript(){return xe()},set isCustomScript(t=!1){xe(t),G()},get compact(){return be()},set compact(t=!1){be(t),G()},get triggerClass(){return De()},set triggerClass(t=""){De(t),G()},get contentOnly(){return Le()},set contentOnly(t=!1){Le(t),G()},get contentClass(){return je()},set contentClass(t=""){je(t),G()},get presentation(){return he()},set presentation(t="editor"){he(t),G()},get onchange(){return de()},set onchange(t){de(t),G()},$set:Ot,$on:(t,a)=>Rt(P,t,a)},St=Fe(),Wt=F(St);{var qt=t=>{var a=Fe(),w=F(a);{var j=T=>{var h=Fe(),$=F(h);{var _=x=>{var k=Ke(),D=c(k);Ae(D),l(k),g(()=>Ue(k,1,`${je()??""} min-w-0`,"svelte-1yy464i")),o(x,k)},i=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Ue(k,1,`${je()??""} flex min-h-0 min-w-0 flex-1 flex-col`,"svelte-1yy464i")),o(x,k)},f=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Ue(k,1,`${je()??""} flex flex-col gap-3 flex-1 min-h-0 min-w-0`,"svelte-1yy464i")),Oe(3,k,()=>Ze,()=>({tier:"moderate"})),o(x,k)};W($,x=>{he()==="picker"?x(_):he()==="workspace"?x(i,1):x(f,-1)})}o(T,h)};W(w,T=>{fe()&&T(j)})}o(t,a)},Kt=t=>{var a=qr(),w=F(a),j=c(w);we(j,{variant:"ghost",size:"sm",get class(){return`whitespace-nowrap hover:text-inherit! ${De()??""}`},onclick:()=>fe(!fe()),children:(i,f)=>{var x=Lr(),k=F(x);Te(k,{get icon(){return bt},size:"xs"});var D=n(k,2),ue=y(D,!0),ve=n(D,2),I=y(ve,!0);g(O=>{m(ue,O),m(I,e(ze))},[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(i,x)},$$slots:{default:!0}});var T=n(j,2);{var h=i=>{var f=zr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W(T,i=>{fe()&&!be()&&i(h)})}l(w);var $=n(w,2);{var _=i=>{var f=Wr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W($,i=>{fe()&&be()&&i(_)})}g(()=>Ue(w,1,gt(be()?"":"w-full"))),o(t,a)};W(Wt,t=>{Le()?t(qt):t(Kt,-1)})}return o(He,St),Mt(zt)}rr(["keydown"]);export{Kr as default};
|
|
1
|
+
import{t as Ut,bq as R,bo as u,a_ as W,by as Ot,b as Rt}from"./7rNOGHzs.js";import{bs as Gt,bV as K,br as rt,bk as er,bj as tr,bH as r,a5 as c,aD as e,bS as n,bl as y,bA as l,b_ as g,bO as m,W as o,bn as Mt,aA as G,c9 as z,be as Ve,b$ as Be,aB as b,c5 as mt,ca as ft,a7 as Fe,ay as F,ai as rr,aj as ar,bf as sr}from"./B8o4lNgr.js";import{I as or,k as Ue,d as gt,h as Xe,s as nr}from"./DmsDslNo.js";import{c as Ee}from"./CiENRH6A.js";import{H as Oe,C as Ze,h as $t}from"./DzMmhJrp.js";import{b as xt}from"./D2g8BuR1.js";import{F as Te,cM as ir,at as lr,cF as bt,cW as Pt,c9 as cr}from"./CFejQM6t.js";import{f as we}from"./Bgegixo2.js";import{M as dr}from"./Ck-Ax5yG.js";import{t as nt}from"./BIiORJal.js";import{e as pr,a0 as _e}from"./BZC0V7Vm.js";import{e as Ct,f as Et,d as Tt,P as At}from"./lfJ8pseq.js";import{C as ht}from"./KbdMwrlk.js";import{c as ur}from"./ChTqQfQN.js";import"./CQ4a5a4v.js";import{y as vr}from"./yAjP_kdp.js";import{Hq as _r}from"./CRwmdgt6.js";import{dx as mr}from"./KQTrHxko.js";import{S as et,k as fr,a as jt}from"./B-BihkPv.js";import{R as qe,c as it,m as gr,bF as tt}from"./CqR3T6Kd.js";import"./BJKiZYvw.js";var xr=b('<div class="w-2 h-2 bg-green-500 rounded-full animate-pulse"></div>'),br=b('<div class="text-sm text-danger bg-danger-background/10 rounded-md p-3"> </div>'),hr=b('<div class="flex items-center gap-2 text-subtle"><!> <span class="text-sm"> </span></div>'),yr=b('<div class="p-4 max-h-60 overflow-y-auto overscroll-contain"><!></div>'),Sr=b('<div class="p-3 bg-muted/30"><div class="flex items-center justify-between mb-2"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span></div> <!></div> <p class="text-xs text-subtle mb-2"> </p> <div class="h-32 rounded border border-border overflow-hidden"><!></div></div>'),wr=b('<div class="flex flex-col bg-background border border-border rounded-lg overflow-hidden"><div class="flex items-center justify-between px-3 py-2 border-b border-border bg-muted/30"><div class="flex items-center gap-2"><!> <span class="text-sm font-medium"> </span> <!></div> <div class="flex items-center gap-1"><!></div></div> <!> <!></div>');function yt(He,P){if(new.target)return Ut({component:yt,...He});Gt(P,!0);const at=ur("SetupScriptAgent");let Ae=R(P,"repoPath",7),Re=R(P,"onScriptGenerated",7),Ge=R(P,"onClose",7),Me=K(rt(crypto.randomUUID())),U=K(!1),ae=K(null),me=!1,ie=K(null);er(()=>{me=!0,C()}),tr(()=>{me=!1});async function le(){try{const v=mr.select(_r.state).find(E=>E.repositoryPath===Ae()||E.path===Ae()||E.worktreePath===Ae());return v?String(v.id):null}catch{return null}}async function C(){r(U,!0),r(ae,null),r(ie,null);try{const s=await le();if(!me)return;if(!s){r(ae,u.workspace_setupScriptAgent_noWorkspace_error(),!0),r(U,!1);return}const v=await vr.setupScripts.generate(s);if(!me)return;if(!v||!v.script){r(ae,u.workspace_setupScriptAgent_generateFailed_error(),!0),r(U,!1);return}r(ie,{name:v.projectType?u.workspace_setupScriptAgent_projectTypeSetup_label({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedSetup_label(),description:v.projectType?u.workspace_setupScriptAgent_generatedForProject_description({projectType:v.projectType}):u.workspace_setupScriptAgent_generatedFromAnalysis_description(),content:v.script},!0),r(U,!1)}catch(s){if(at.error("Failed to generate setup script",s),!me)return;r(ae,s instanceof Error?s.message:u.workspace_setupScriptAgent_generateFailed_error(),!0),r(U,!1)}}function fe(s){Re()?.(s)}var ge={get repoPath(){return Ae()},set repoPath(s){Ae(s),G()},get onScriptGenerated(){return Re()},set onScriptGenerated(s){Re(s),G()},get onClose(){return Ge()},set onClose(s){Ge(s),G()},$set:Ot,$on:(s,v)=>Rt(P,s,v)},ce=wr(),xe=c(ce),be=c(xe),De=c(be);pr(De,{variant:"standard",get agentId(){return e(Me)}});var Le=n(De,2),je=y(Le,!0),he=n(Le,2);{var de=s=>{var v=xr();o(s,v)};W(he,s=>{e(U)&&s(de)})}l(be);var J=n(be,2),ke=c(J);{let s=z(()=>u.workspace_setupScriptAgent_close_ariaLabel());we(ke,{variant:"ghost-light",size:"icon-sm",iconOnly:!0,get"aria-label"(){return e(s)},get onclick(){return Ge()},children:(v,E)=>{Te(v,{get icon(){return ir}})},$$slots:{default:!0}})}l(J),l(xe);var $e=n(xe,2);{var Ie=s=>{var v=yr(),E=c(v);{var q=B=>{var M=br(),Q=y(M,!0);g(()=>m(Q,e(ae))),o(B,M)},se=B=>{var M=hr(),Q=c(M);or(Q,{size:16,class:"text-primary"});var ye=n(Q,2),ze=y(ye,!0);l(M),g(Se=>m(ze,Se),[()=>u.workspace_setupScriptAgent_analyzing_label()]),o(B,M)};W(E,B=>{e(ae)?B(q):B(se,-1)})}l(v),o(s,v)};W($e,s=>{(e(ae)||e(U))&&s(Ie)})}var Ye=n($e,2);{var pe=s=>{var v=Sr(),E=c(v),q=c(E),se=c(q);Te(se,{get icon(){return lr},class:"text-green-500"});var B=n(se,2),M=y(B,!0);l(q);var Q=n(q,2);we(Q,{variant:"primary",size:"sm",onclick:()=>fe(e(ie)),class:"h-7",children:(Pe,st)=>{Ve();var Je=Be();g(ct=>m(Je,ct),[()=>u.workspace_setupScriptAgent_createScript_label()]),o(Pe,Je)},$$slots:{default:!0}}),l(E);var ye=n(E,2),ze=y(ye,!0),Se=n(ye,2),lt=c(Se);ht(lt,{get value(){return e(ie).content},language:"shell",readOnly:!0,lineNumbers:!1}),l(Se),l(v),g(()=>{m(M,e(ie).name),m(ze,e(ie).description)}),o(s,v)};W(Ye,s=>{e(ie)&&!e(U)&&s(pe)})}return l(ce),g(s=>m(je,s),[()=>u.workspace_setupScriptAgent_title()]),o(He,ce),Mt(ge)}var kr=b('<span class="block truncate"> </span>'),$r=b("<div></div>"),Pr=b('<div role="group"></div> <div class="mt-2 border-t border-border pt-2"><!></div> <!> <div class="mt-2 border-t border-border pt-2"><!> <!></div>',1),Cr=b('<code class="type-caption text-muted-foreground"> </code>'),Er=b('<p> </p> <code class="type-caption"> </code>',1),It=b("<!> <!>",1),Tr=b('<div class="mt-2 flex flex-wrap gap-2 px-2"></div>'),Ar=b('<div class="h-44 min-w-0 overflow-hidden rounded-(--radius-medium) border border-border bg-background py-2"><!></div> <div class="mt-2 px-1"><!> <!></div>',1),jr=b('<div class="mb-2 flex items-center justify-between gap-3 px-2"><div class="min-w-0"><h3> </h3> <p class="type-caption truncate text-muted-foreground"> </p></div> <!></div> <!>',1),Ke=b("<div><!></div>"),Ir=b("<!> ",1),Nt=b('<div class="min-w-0 w-full"><span class="text-sm"> </span> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Ft=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>'),Nr=b('<span class="type-caption px-1.5 py-0.5 rounded-full bg-primary/10 text-primary font-medium shrink-0"> </span>'),Fr=b('<div class="min-w-0 w-full"><div class="flex flex-wrap items-center gap-x-2 gap-y-1"><span class="text-sm"> </span> <!></div> <p class="text-xs text-subtle mt-0.5"> </p></div>'),Ur=b('<div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <p class="text-xs text-subtle px-2 mb-2"> </p> <!></div> <!> <!> <div class="mb-4"><h4 class="type-caption font-medium text-muted-foreground mb-1.5 px-2"> </h4> <!></div>',1),Or=b('<code class="type-caption px-1.5 py-0.5 rounded bg-background/80 text-muted-foreground font-mono cursor-pointer hover:bg-background hover:text-foreground transition-colors"> </code>'),Rr=b('<p class="text-xs"> </p> <p class="mt-1 text-xs text-muted-foreground"> <code class="type-caption"> </code></p>',1),Gr=b('<div class="flex flex-wrap items-center gap-x-3 gap-y-1.5 px-3 py-1.5 bg-muted/30 shrink-0"><span class="type-caption font-medium text-muted-foreground shrink-0"> </span> <div class="flex flex-wrap gap-1.5"></div></div> <div class="flex-1 min-h-0 min-w-0 overflow-hidden py-3 bg-background"><!></div>',1),Mr=b('<div class="flex min-h-0 min-w-0 flex-col overflow-y-auto"><!></div> <div class="flex min-h-0 min-w-0 flex-col"><!></div>',1),Dr=b('<div class="flex flex-col min-h-0 min-w-0 overflow-y-auto p-2 md:pr-4"><!></div> <div class="flex flex-col min-w-0 min-h-0"><!></div>',1),Lr=b('<!> <span class="text-sm font-normal text-subtle"> </span> <span class="text-subtle font-normal"> </span>',1),zr=b('<div class="mt-1 pl-7 space-y-3"><!></div>'),Wr=b('<div class="space-y-3"><!></div>'),qr=b("<div><!> <!></div> <!>",1);function Kr(He,P){if(new.target)return Ut({component:Kr,...He});Gt(P,!0);const at=(t,a=sr)=>{{const w=_=>{Te(_,{get icon(){return bt},get class(){return _e.icon}})},j=_=>{var i=kr(),f=y(i,!0);g(()=>m(f,a().name)),o(_,i)},T=_=>{{let i=z(()=>e(st)===a().id?"checked":"empty");dr(_,{get state(){return e(i)}})}};let h=z(()=>e(st)===a().id),$=z(()=>e(st)===a().id);nt(t,{get selected(){return e(h)},get"aria-pressed"(){return e($)},get"data-setup-source"(){return a().id},get class(){return _e.row},onclick:()=>a().id==="custom"?Dt():Se(a().id),leading:w,title:j,trailing:T,$$slots:{leading:!0,title:!0,trailing:!0}})}},Ae=t=>{var a=Ke(),w=c(a);{var j=h=>{var $=Pr(),_=F($);Xe(_,21,()=>e(Je),I=>I.id,(I,O)=>{at(I,()=>e(O))}),l(_);var i=n(_,2),f=c(i);nt(f,{get"aria-expanded"(){return e($e)},get class(){return _e.row},onclick:()=>r($e,!e($e)),leading:S=>{Te(S,{get icon(){return cr},get class(){return _e.icon}})},title:S=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptEditor_templates_label()]),o(S,d)},$$slots:{leading:!0,title:!0}}),l(i);var x=n(i,2);{var k=I=>{var O=$r();Xe(O,21,()=>e(ct),S=>S.id,(S,d)=>{at(S,()=>({id:`template-${e(d).id}`,name:e(d).name}))}),l(O),Oe(3,O,()=>Ze,()=>({tier:"moderate"})),o(I,O)};W(x,I=>{e($e)&&I(k)})}var D=n(x,2),ue=c(D);nt(ue,{get class(){return _e.row},onclick:()=>r(ke,!0),leading:S=>{Te(S,{get icon(){return bt},get class(){return _e.icon}})},title:S=>{Ve();var d=Be();g(p=>m(d,p),[()=>u.workspace_setupScriptPicker_edit_label()]),o(S,d)},$$slots:{leading:!0,title:!0}});var ve=n(ue,2);{const I=d=>{Te(d,{get icon(){return Pt},get class(){return _e.icon}})},O=d=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(d,p)};let S=z(()=>!U());nt(ve,{get class(){return _e.row},get disabled(){return e(S)},onclick:()=>{r(ke,!0),r(J,!0)},leading:I,title:O,$$slots:{leading:!0,title:!0}})}l(D),g(I=>nr(_,"aria-label",I),[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(h,$)},T=h=>{var $=jr(),_=F($),i=c(_),f=c(i),x=y(f,!0),k=n(f,2),D=y(k,!0);l(i);var ue=n(i,2);we(ue,{variant:"ghost",size:"sm",onclick:()=>{r(ke,!1),r(J,!1)},children:(S,d)=>{Ve();var p=Be();g(N=>m(p,N),[()=>u.workspace_setupScriptPicker_choose_label()]),o(S,p)},$$slots:{default:!0}}),l(_);var ve=n(_,2);{var I=S=>{yt(S,{get repoPath(){return U()},onScriptGenerated:Lt,onClose:()=>r(J,!1)})},O=S=>{var d=Ar(),p=F(d),N=c(p);xt(ht(N,{language:"shell",lineNumbers:!1,get lineWrapping(){return e(ye)},get value(){return C()},set value(A){C(A)}}),A=>r(pe,A,!0),()=>e(pe)),l(p);var X=n(p,2),H=c(X);we(H,{variant:"ghost",size:"sm",get active(){return e(Ie)},get"aria-expanded"(){return e(Ie)},onclick:()=>r(Ie,!e(Ie)),children:(A,oe)=>{Ve();var L=Be();g(ee=>m(L,ee),[()=>u.workspace_setupScriptEditor_variables_label()]),o(A,L)},$$slots:{default:!0}});var V=n(H,2);{var Z=A=>{var oe=Fe(),L=F(oe);Ee(L,()=>At,(ee,te)=>{te(ee,{delayDuration:100,children:(ne,Ce)=>{var Y=Tr();Xe(Y,21,()=>jt,re=>re.name,(re,Ne)=>{var We=Fe(),pt=F(We);Ee(pt,()=>Ct,(Vt,Bt)=>{Bt(Vt,{children:(Ht,Vr)=>{var wt=It(),kt=F(wt);Ee(kt,()=>Et,(ut,vt)=>{vt(ut,{children:(_t,Jt)=>{var Qe=Cr(),ot=y(Qe);g(()=>m(ot,`$${e(Ne).name??""}`)),o(_t,Qe)},$$slots:{default:!0}})});var Yt=n(kt,2);Ee(Yt,()=>Tt,(ut,vt)=>{vt(ut,{side:"top",class:"max-w-xs",children:(_t,Jt)=>{var Qe=Er(),ot=F(Qe),Qt=y(ot,!0),Xt=n(ot,2),Zt=y(Xt,!0);g(()=>{m(Qt,e(Ne).description),m(Zt,e(Ne).example)}),o(_t,Qe)},$$slots:{default:!0}})}),o(Ht,wt)},$$slots:{default:!0}})}),o(re,We)}),l(Y),o(ne,Y)},$$slots:{default:!0}})}),o(A,oe)};W(V,A=>{e(Ie)&&A(Z)})}l(X),o(S,d)};W(ve,S=>{e(J)&&U()?S(I):S(O,-1)})}g(S=>{Ue(f,1,gt(_e.title),"svelte-1yy464i"),m(x,S),m(D,e(ze))},[()=>u.workspace_setupScriptPicker_commands_label()]),o(h,$)};W(w,h=>{e(ke)?h(T,-1):h(j)})}l(a),xt(a,h=>r(Ye,h),()=>e(Ye)),g(()=>Ue(a,1,`${_e.rows} min-w-0`,"svelte-1yy464i")),o(t,a)},Re=t=>{var a=Ur(),w=F(a),j=c(w),T=y(j,!0),h=n(j,2),$=y(h,!0),_=n(h,2);{var i=d=>{var p=Ke(),N=c(p);yt(N,{get repoPath(){return U()},onScriptGenerated:X=>{r(se,!0),r(s,""),C(X.content),r(E,X.name,!0),r(v,!0),de()?.(C()),r(J,!1),requestAnimationFrame(()=>e(pe)?.focus())},onClose:()=>r(J,!1)}),l(p),Oe(3,p,()=>Ze,()=>({tier:"moderate"})),o(d,p)},f=d=>{{let p=z(()=>!U());we(d,{variant:"ghost",size:"sm",class:"w-full justify-start text-subtle",onclick:()=>r(J,!0),get disabled(){return e(p)},children:(N,X)=>{var H=Ir(),V=F(H);Te(V,{get icon(){return Pt},class:"mr-1.5"});var Z=n(V);g(A=>m(Z,` ${A??""}`),[()=>u.workspace_setupScriptEditor_autoGenerate_label()]),o(N,H)},$$slots:{default:!0}})}};W(_,d=>{e(J)&&U()?d(i):d(f,-1)})}l(w);var x=n(w,2);{var k=d=>{var p=Ft(),N=c(p),X=y(N,!0),H=n(N,2);{let V=z(()=>e(s)===qe),Z=z(()=>e(s)===qe);we(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>Se(qe),children:(A,oe)=>{var L=Nt(),ee=c(L),te=y(ee,!0),ne=n(ee,2),Ce=y(ne,!0);l(L),g((Y,re)=>{m(te,Y),m(Ce,re)},[()=>tt(it,"repo-config"),()=>u.workspace_setupScriptEditor_repoConfig_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_repoConfig_label()]),o(d,p)};W(x,d=>{le()&&d(k)})}var D=n(x,2);{var ue=d=>{var p=Ft(),N=c(p),X=y(N,!0),H=n(N,2);{let V=z(()=>e(s)===B),Z=z(()=>e(s)===B);we(H,{variant:"ghost",truncateLabel:!1,get active(){return e(V)},get"aria-pressed"(){return e(Z)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>Se(B),children:(A,oe)=>{var L=Nt(),ee=c(L),te=y(ee,!0),ne=n(ee,2),Ce=y(ne,!0);l(L),g((Y,re)=>{m(te,Y),m(Ce,re)},[()=>tt(e(M).name,e(M).nameSource),()=>u.workspace_setupScriptEditor_lastUsed_description()]),o(A,L)},$$slots:{default:!0}})}l(p),g(V=>m(X,V),[()=>u.workspace_setupScriptEditor_lastUsed_label()]),o(d,p)};W(D,d=>{e(M)&&d(ue)})}var ve=n(D,2),I=c(ve),O=y(I,!0),S=n(I,2);Xe(S,17,()=>et,d=>d.id,(d,p)=>{{let N=z(()=>e(s)===`template-${e(p).id}`),X=z(()=>e(s)===`template-${e(p).id}`);we(d,{variant:"ghost",truncateLabel:!1,get active(){return e(N)},get"aria-pressed"(){return e(X)},class:"w-full h-auto justify-start whitespace-normal text-left px-2 py-1.5",onclick:()=>Se(`template-${e(p).id}`),children:(H,V)=>{var Z=Fr(),A=c(Z),oe=c(A),L=y(oe,!0),ee=n(oe,2);{var te=Y=>{var re=Nr(),Ne=y(re,!0);g(We=>m(Ne,We),[()=>u.workspace_setupScriptEditor_recommended_label()]),o(Y,re)};W(ee,Y=>{e(p).projectType===ie()&&Y(te)})}l(A);var ne=n(A,2),Ce=y(ne,!0);l(Z),g(()=>{m(L,e(p).name),m(Ce,e(p).description)}),o(H,Z)},$$slots:{default:!0}})}}),l(ve),g((d,p,N)=>{m(T,d),m($,p),m(O,N)},[()=>u.workspace_setupScriptEditor_generate_label(),()=>u.workspace_setupScriptEditor_generate_description(),()=>u.workspace_setupScriptEditor_templates_label()]),o(t,a)},Ge=t=>{var a=Gr(),w=F(a),j=c(w),T=y(j,!0),h=n(j,2);Xe(h,21,()=>jt,i=>i.name,(i,f)=>{var x=Fe(),k=F(x);Ee(k,()=>At,(D,ue)=>{ue(D,{delayDuration:100,children:(ve,I)=>{var O=Fe(),S=F(O);Ee(S,()=>Ct,(d,p)=>{p(d,{delayDuration:100,children:(N,X)=>{var H=It(),V=F(H);Ee(V,()=>Et,(A,oe)=>{oe(A,{children:(L,ee)=>{var te=Or(),ne=y(te);g(()=>m(ne,`$${e(f).name??""}`)),o(L,te)},$$slots:{default:!0}})});var Z=n(V,2);Ee(Z,()=>Tt,(A,oe)=>{oe(A,{side:"bottom",class:"max-w-xs z-[200]",children:(L,ee)=>{var te=Rr(),ne=F(te),Ce=y(ne,!0),Y=n(ne,2),re=c(Y),Ne=n(re),We=y(Ne,!0);l(Y),g(pt=>{m(Ce,e(f).description),m(re,`${pt??""} `),m(We,e(f).example)},[()=>u.workspace_setupScriptEditor_example_before()]),o(L,te)},$$slots:{default:!0}})}),o(N,H)},$$slots:{default:!0}})}),o(ve,O)},$$slots:{default:!0}})}),o(i,x)}),l(h),l(w);var $=n(w,2),_=c($);xt(ht(_,{language:"shell",lineNumbers:!0,get lineWrapping(){return e(ye)},get value(){return C()},set value(i){C(i)}}),i=>r(pe,i,!0),()=>e(pe)),l($),g(i=>m(T,i),[()=>u.workspace_setupScriptEditor_variables_label()]),ar("keydown",$,i=>{i.altKey&&i.key==="z"&&(i.preventDefault(),r(ye,!e(ye)))}),o(t,a)},Me=t=>{var a=Ke(),w=c(a);{var j=h=>{var $=Mr(),_=F($),i=c(_);Re(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),Oe(1,_,()=>$t,()=>({tier:"moderate",axis:"x",distance:-8})),Oe(1,f,()=>$t,()=>({tier:"moderate",axis:"x"})),o(h,$)},T=h=>{var $=Dr(),_=F($),i=c(_);Re(i),l(_);var f=n(_,2),x=c(f);Ge(x),l(f),o(h,$)};W(w,h=>{he()==="workspace"?h(j):h(T,-1)})}l(a),g(()=>Ue(a,1,gt(he()==="workspace"?"setup-workspace-layout":"grid flex-1 min-h-0 min-w-0 grid-cols-1 grid-rows-[minmax(0,1fr)_minmax(0,2fr)] md:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] md:grid-rows-1"),"svelte-1yy464i")),o(t,a)};let U=R(P,"repoPath",7,""),ae=R(P,"repositoryKey",7),me=R(P,"githubUrl",7,null),ie=R(P,"projectType",7,void 0),le=R(P,"repoConfigScript",7,null),C=R(P,"value",15,""),fe=R(P,"expanded",15,!1),ge=R(P,"scriptName",31,()=>rt(u.workspace_setupScriptEditor_custom_name())),ce=R(P,"scriptNameSource",15,"named"),xe=R(P,"isCustomScript",15,!1),be=R(P,"compact",7,!1),De=R(P,"triggerClass",7,""),Le=R(P,"contentOnly",7,!1),je=R(P,"contentClass",7,""),he=R(P,"presentation",7,"editor"),de=R(P,"onchange",7),J=K(!1),ke=K(rt(mt(()=>xe()))),$e=K(!1),Ie=K(!1),Ye=K(void 0),pe=K(void 0),s=K(""),v=K(!1),E=K(rt(ge())),q=K(rt(ce())),se=K(!1);const B="last-used",M=z(()=>{const t=ae()??U(),a=t?gr(t,me()):void 0;return a?.nameSource==="repo-config"?{...a,name:"Custom",nameSource:"custom"}:a}),Q=z(()=>{const t=new Map;return le()&&t.set(qe,{content:le(),label:it,source:"repo-config"}),e(M)&&t.set(B,{content:e(M).content,label:e(M).name,source:e(M).nameSource}),et.forEach(a=>{t.set(`template-${a.id}`,{content:fr(a),label:a.name,source:"named"})}),t});let ye=K(!0);const ze=z(()=>{if(e(v))return tt(e(E),e(q));if(!e(s))return u.workspace_setupScriptEditor_custom_name();const t=e(Q).get(e(s));return t?tt(t.label,t.source):u.workspace_setupScriptEditor_custom_name()});function Se(t){r(s,t,!0),r(v,!1),r(se,!0);const a=e(Q).get(t);a&&(C(a.content),r(E,a.label,!0),r(q,a.source,!0),de()?.(C())),he()==="picker"?(r(ke,!1),r($e,!1),requestAnimationFrame(()=>e(Ye)?.querySelector("[data-setup-source][aria-pressed=true]")?.focus())):requestAnimationFrame(()=>e(pe)?.focus())}function lt(t){if(e(s)&&e(s)!=="none"){const a=e(Q).get(e(s));a&&r(v,t!==a.content)}else t&&r(v,!0)}const Pe=(()=>{const t=et.find(a=>a.id==="generic");return t?`template-${t.id}`:""})(),st=z(()=>e(v)||!e(s)?"custom":e(s)),Je=z(()=>{const t=[];le()&&t.push({id:qe,name:tt(it,"repo-config")}),e(M)&&t.push({id:B,name:u.workspace_setupScriptEditor_lastUsed_label()});for(const a of et){const w=`template-${a.id}`;(w===Pe||w===e(s))&&t.push({id:w,name:a.name})}return t.push({id:"custom",name:u.workspace_setupScriptPicker_custom_label()}),t}),ct=z(()=>et.filter(t=>!e(Je).some(a=>a.id===`template-${t.id}`)));function Dt(){r(s,""),r(v,!0),r(E,"Custom"),r(q,"custom"),r(J,!1),r(ke,!0),requestAnimationFrame(()=>e(pe)?.focus())}function Lt(t){r(se,!0),r(s,""),C(t.content),r(E,t.name,!0),r(q,"named"),r(v,!0),de()?.(C()),r(J,!1),requestAnimationFrame(()=>e(pe)?.focus())}let dt=K(null);ft(()=>{const t=ae()??U();if(t===e(dt))return;const a=e(dt)===null&&(xe()||C().trim().length>0);if(r(dt,t,!0),a){mt(()=>{let T=!1;const h=C().trim();for(const[$,_]of e(Q).entries())if(h===_.content.trim()&&_.source===ce()&&_.label===ge()){r(s,$,!0),r(E,_.label,!0),r(q,_.source,!0),r(v,!1),T=!0;break}T||(r(v,!0),e(E)||(r(E,ge()||u.workspace_setupScriptEditor_custom_name(),!0),r(q,ge()?ce():"named",!0))),r(se,!0)});return}const w=!!le(),j=e(M);if(mt(()=>{if(r(v,!1),r(se,!0),w)r(s,qe,!0),r(E,it,!0),r(q,"repo-config");else if(j)r(s,B),r(E,j.name,!0),r(q,j.nameSource,!0);else if(Pe){r(s,Pe,!0);const T=e(Q).get(Pe);r(E,T?.label||u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}else r(E,u.workspace_setupScriptEditor_custom_name(),!0),r(q,"named")}),w&&le())C(le()),de()?.(C());else if(j)C(j.content),de()?.(C());else if(Pe){const T=e(Q).get(Pe);T&&(C(T.content),de()?.(C()))}}),ft(()=>{if(e(se)){r(se,!1);return}C()!==void 0&<(C())}),ft(()=>{ge(e(E)),ce(e(q)),xe(e(v))});var zt={get repoPath(){return U()},set repoPath(t=""){U(t),G()},get repositoryKey(){return ae()},set repositoryKey(t){ae(t),G()},get githubUrl(){return me()},set githubUrl(t=null){me(t),G()},get projectType(){return ie()},set projectType(t=void 0){ie(t),G()},get repoConfigScript(){return le()},set repoConfigScript(t=null){le(t),G()},get value(){return C()},set value(t=""){C(t),G()},get expanded(){return fe()},set expanded(t=!1){fe(t),G()},get scriptName(){return ge()},set scriptName(t=u.workspace_setupScriptEditor_custom_name()){ge(t),G()},get scriptNameSource(){return ce()},set scriptNameSource(t="named"){ce(t),G()},get isCustomScript(){return xe()},set isCustomScript(t=!1){xe(t),G()},get compact(){return be()},set compact(t=!1){be(t),G()},get triggerClass(){return De()},set triggerClass(t=""){De(t),G()},get contentOnly(){return Le()},set contentOnly(t=!1){Le(t),G()},get contentClass(){return je()},set contentClass(t=""){je(t),G()},get presentation(){return he()},set presentation(t="editor"){he(t),G()},get onchange(){return de()},set onchange(t){de(t),G()},$set:Ot,$on:(t,a)=>Rt(P,t,a)},St=Fe(),Wt=F(St);{var qt=t=>{var a=Fe(),w=F(a);{var j=T=>{var h=Fe(),$=F(h);{var _=x=>{var k=Ke(),D=c(k);Ae(D),l(k),g(()=>Ue(k,1,`${je()??""} min-w-0`,"svelte-1yy464i")),o(x,k)},i=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Ue(k,1,`${je()??""} flex min-h-0 min-w-0 flex-1 flex-col`,"svelte-1yy464i")),o(x,k)},f=x=>{var k=Ke(),D=c(k);Me(D),l(k),g(()=>Ue(k,1,`${je()??""} flex flex-col gap-3 flex-1 min-h-0 min-w-0`,"svelte-1yy464i")),Oe(3,k,()=>Ze,()=>({tier:"moderate"})),o(x,k)};W($,x=>{he()==="picker"?x(_):he()==="workspace"?x(i,1):x(f,-1)})}o(T,h)};W(w,T=>{fe()&&T(j)})}o(t,a)},Kt=t=>{var a=qr(),w=F(a),j=c(w);we(j,{variant:"ghost",size:"sm",get class(){return`whitespace-nowrap hover:text-inherit! ${De()??""}`},onclick:()=>fe(!fe()),children:(i,f)=>{var x=Lr(),k=F(x);Te(k,{get icon(){return bt},size:"xs"});var D=n(k,2),ue=y(D,!0),ve=n(D,2),I=y(ve,!0);g(O=>{m(ue,O),m(I,e(ze))},[()=>u.workspace_setupScriptEditor_setupScript_label()]),o(i,x)},$$slots:{default:!0}});var T=n(j,2);{var h=i=>{var f=zr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W(T,i=>{fe()&&!be()&&i(h)})}l(w);var $=n(w,2);{var _=i=>{var f=Wr(),x=c(f);Me(x),l(f),Oe(3,f,()=>Ze,()=>({tier:"moderate"})),o(i,f)};W($,i=>{fe()&&be()&&i(_)})}g(()=>Ue(w,1,gt(be()?"":"w-full"))),o(t,a)};W(Wt,t=>{Le()?t(qt):t(Kt,-1)})}return o(He,St),Mt(zt)}rr(["keydown"]);export{Kr as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Fe}from"./CnIb6mve.js";import{aE as Me,ag as xe,aG as Ke,bx as We,bw as Ye,bz as Ve,by as Ue,bt as Ge,br as He,bk as Xe,b3 as je,aX as qe,aW as Je,aO as Ze,av as Qe,au as $e,aw as et,a3 as tt,a2 as st,T as rt,p as it,S as at,i as nt,j as ot,g as ct,c as u,a7 as P,bc as H,as as lt,aS as ut,I as ht,aN as y,w as gt,aB as dt,ba as pt,an as ft,E as bt,b9 as St,u as xt,a8 as Le,aq as Lt,ar as mt,b0 as yt,G as wt,ae as Et,at as me,bq as kt,b1 as _t}from"./Cl430GWg.js";import{G as Dt}from"./-xK_vQQs.js";function Tt(e){return Array.isArray(e)}function Nt(e){if(Me(e))return e;const a=xe(e);if(!It(e))return{};if(Tt(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(Ke(e)){const s=e,c=s.constructor;return new c(s.buffer,s.byteOffset,s.length)}if(a==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(a==="[object DataView]"){const s=e,c=s.buffer,g=s.byteOffset,t=s.byteLength,h=new ArrayBuffer(t),x=new Uint8Array(c,g,t);return new Uint8Array(h).set(x),new DataView(h)}if(a==="[object Boolean]"||a==="[object Number]"||a==="[object String]"){const s=e.constructor,c=new s(e.valueOf());return a==="[object String]"?vt(c,e):se(c,e),c}if(a==="[object Date]")return new Date(Number(e));if(a==="[object RegExp]"){const s=e,c=new RegExp(s.source,s.flags);return c.lastIndex=s.lastIndex,c}if(a==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(a==="[object Map]"){const s=e,c=new Map;return s.forEach((g,t)=>{c.set(t,g)}),c}if(a==="[object Set]"){const s=e,c=new Set;return s.forEach(g=>{c.add(g)}),c}if(a==="[object Arguments]"){const s=e,c={};return se(c,s),c.length=s.length,c[Symbol.iterator]=s[Symbol.iterator],c}const o={};return Ct(o,e),se(o,e),Ot(o,e),o}function It(e){switch(xe(e)){case ct:case ot:case nt:case at:case it:case rt:case st:case tt:case et:case $e:case Qe:case Ze:case Je:case qe:case je:case Xe:case He:case Ge:case Ue:case Ve:case Ye:case We:return!0;default:return!1}}function se(e,a){for(const o in a)Object.hasOwn(a,o)&&(e[o]=a[o])}function Ot(e,a){const o=Object.getOwnPropertySymbols(a);for(let s=0;s<o.length;s++){const c=o[s];Object.prototype.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}}function vt(e,a){const o=a.valueOf().length;for(const s in a)Object.hasOwn(a,s)&&(Number.isNaN(Number(s))||Number(s)>=o)&&(e[s]=a[s])}function Ct(e,a){const o=Object.getPrototypeOf(a);o!==null&&typeof a.constructor=="function"&&Object.setPrototypeOf(e,o)}var ie=(function(){var e=u(function(v,d,i,l){for(i=i||{},l=v.length;l--;i[v[l]]=d);return i},"o"),a=[1,15],o=[1,7],s=[1,13],c=[1,14],g=[1,19],t=[1,16],h=[1,17],x=[1,18],L=[8,30],b=[8,10,21,28,29,30,31,39,43,46],f=[1,23],m=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],S=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],k={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(d,i,l,p,E,r,K){var n=r.length-1;switch(E){case 4:p.getLogger().debug("Rule: separator (NL) ");break;case 5:p.getLogger().debug("Rule: separator (Space) ");break;case 6:p.getLogger().debug("Rule: separator (EOF) ");break;case 7:p.getLogger().debug("Rule: hierarchy: ",r[n-1]),p.setHierarchy(r[n-1]);break;case 8:p.getLogger().debug("Stop NL ");break;case 9:p.getLogger().debug("Stop EOF ");break;case 10:p.getLogger().debug("Stop NL2 ");break;case 11:p.getLogger().debug("Stop EOF2 ");break;case 12:p.getLogger().debug("Rule: statement: ",r[n]),typeof r[n].length=="number"?this.$=r[n]:this.$=[r[n]];break;case 13:p.getLogger().debug("Rule: statement #2: ",r[n-1]),this.$=[r[n-1]].concat(r[n]);break;case 14:p.getLogger().debug("Rule: link: ",r[n],d),this.$={edgeTypeStr:r[n],label:""};break;case 15:p.getLogger().debug("Rule: LABEL link: ",r[n-3],r[n-1],r[n]),this.$={edgeTypeStr:r[n],label:r[n-1]};break;case 18:const F=parseInt(r[n]),Y=p.generateId();this.$={id:Y,type:"space",label:"",width:F,children:[]};break;case 23:p.getLogger().debug("Rule: (nodeStatement link node) ",r[n-2],r[n-1],r[n]," typestr: ",r[n-1].edgeTypeStr);const J=p.edgeStrToEdgeData(r[n-1].edgeTypeStr),V=p.edgeStrToEdgeStartData(r[n-1].edgeTypeStr),Z=p.edgeStrToThickness(r[n-1].edgeTypeStr),D=p.edgeStrToPattern(r[n-1].edgeTypeStr);this.$=[{id:r[n-2].id,label:r[n-2].label,type:r[n-2].type,directions:r[n-2].directions},{id:r[n-2].id+"-"+r[n].id,start:r[n-2].id,end:r[n].id,label:r[n-1].label,type:"edge",thickness:Z,pattern:D,directions:r[n].directions,arrowTypeEnd:J,arrowTypeStart:V},{id:r[n].id,label:r[n].label,type:p.typeStr2Type(r[n].typeStr),directions:r[n].directions}];break;case 24:p.getLogger().debug("Rule: nodeStatement (abc88 node size) ",r[n-1],r[n]),this.$={id:r[n-1].id,label:r[n-1].label,type:p.typeStr2Type(r[n-1].typeStr),directions:r[n-1].directions,widthInColumns:parseInt(r[n],10)};break;case 25:p.getLogger().debug("Rule: nodeStatement (node) ",r[n]),this.$={id:r[n].id,label:r[n].label,type:p.typeStr2Type(r[n].typeStr),directions:r[n].directions,widthInColumns:1};break;case 26:p.getLogger().debug("APA123",this?this:"na"),p.getLogger().debug("COLUMNS: ",r[n]),this.$={type:"column-setting",columns:r[n]==="auto"?-1:parseInt(r[n])};break;case 27:p.getLogger().debug("Rule: id-block statement : ",r[n-2],r[n-1]),p.generateId(),this.$={...r[n-2],type:"composite",children:r[n-1]};break;case 28:p.getLogger().debug("Rule: blockStatement : ",r[n-2],r[n-1],r[n]);const z=p.generateId();this.$={id:z,type:"composite",label:"",children:r[n-1]};break;case 29:p.getLogger().debug("Rule: node (NODE_ID separator): ",r[n]),this.$={id:r[n]};break;case 30:p.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",r[n-1],r[n]),this.$={id:r[n-1],label:r[n].label,typeStr:r[n].typeStr,directions:r[n].directions};break;case 31:p.getLogger().debug("Rule: dirList: ",r[n]),this.$=[r[n]];break;case 32:p.getLogger().debug("Rule: dirList: ",r[n-1],r[n]),this.$=[r[n-1]].concat(r[n]);break;case 33:p.getLogger().debug("Rule: nodeShapeNLabel: ",r[n-2],r[n-1],r[n]),this.$={typeStr:r[n-2]+r[n],label:r[n-1]};break;case 34:p.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",r[n-3],r[n-2]," #3:",r[n-1],r[n]),this.$={typeStr:r[n-3]+r[n],label:r[n-2],directions:r[n-1]};break;case 35:case 36:this.$={type:"classDef",id:r[n-1].trim(),css:r[n].trim()};break;case 37:this.$={type:"applyClass",id:r[n-1].trim(),styleClass:r[n].trim()};break;case 38:this.$={type:"applyStyles",id:r[n-1].trim(),stylesStr:r[n].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:a,11:3,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:s,29:c,31:g,39:t,43:h,46:x},{8:[1,20]},e(L,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:a,21:o,28:s,29:c,31:g,39:t,43:h,46:x}),e(b,[2,16],{14:22,15:f,16:m}),e(b,[2,17]),e(b,[2,18]),e(b,[2,19]),e(b,[2,20]),e(b,[2,21]),e(b,[2,22]),e(w,[2,25],{27:[1,25]}),e(b,[2,26]),{19:26,26:12,31:g},{10:a,11:27,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:s,29:c,31:g,39:t,43:h,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(S,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(L,[2,13]),{26:35,31:g},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:a,11:37,13:4,14:22,15:f,16:m,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:s,29:c,31:g,39:t,43:h,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(b,[2,28]),e(b,[2,35]),e(b,[2,36]),e(b,[2,37]),e(b,[2,38]),{36:[1,47]},{33:48,34:_},{15:[1,50]},e(b,[2,27]),e(S,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(S,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(d,i){if(i.recoverable)this.trace(d);else{var l=new Error(d);throw l.hash=i,l}},"parseError"),parse:u(function(d){var i=this,l=[0],p=[],E=[null],r=[],K=this.table,n="",F=0,Y=0,J=2,V=1,Z=r.slice.call(arguments,1),D=Object.create(this.lexer),z={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(z.yy[Q]=this.yy[Q]);D.setInput(d,z.yy),z.yy.lexer=D,z.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var $=D.yylloc;r.push($);var Re=D.options&&D.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pe(I){l.length=l.length-2*I,E.length=E.length-I,r.length=r.length-I}u(Pe,"popStack");function de(){var I;return I=p.pop()||D.lex()||V,typeof I!="number"&&(I instanceof Array&&(p=I,I=p.pop()),I=i.symbols_[I]||I),I}u(de,"lex");for(var N,R,C,ee,M={},U,B,pe,G;;){if(R=l[l.length-1],this.defaultActions[R]?C=this.defaultActions[R]:((N===null||typeof N>"u")&&(N=de()),C=K[R]&&K[R][N]),typeof C>"u"||!C.length||!C[0]){var te="";G=[];for(U in K[R])this.terminals_[U]&&U>J&&G.push("'"+this.terminals_[U]+"'");D.showPosition?te="Parse error on line "+(F+1)+`:
|
|
1
|
+
import{g as Fe}from"./CGnNcckt.js";import{aE as Me,ag as xe,aG as Ke,bx as We,bw as Ye,bz as Ve,by as Ue,bt as Ge,br as He,bk as Xe,b3 as je,aX as qe,aW as Je,aO as Ze,av as Qe,au as $e,aw as et,a3 as tt,a2 as st,T as rt,p as it,S as at,i as nt,j as ot,g as ct,c as u,a7 as P,bc as H,as as lt,aS as ut,I as ht,aN as y,w as gt,aB as dt,ba as pt,an as ft,E as bt,b9 as St,u as xt,a8 as Le,aq as Lt,ar as mt,b0 as yt,G as wt,ae as Et,at as me,bq as kt,b1 as _t}from"./ENpFvA2b.js";import{G as Dt}from"./-xK_vQQs.js";function Tt(e){return Array.isArray(e)}function Nt(e){if(Me(e))return e;const a=xe(e);if(!It(e))return{};if(Tt(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(Ke(e)){const s=e,c=s.constructor;return new c(s.buffer,s.byteOffset,s.length)}if(a==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(a==="[object DataView]"){const s=e,c=s.buffer,g=s.byteOffset,t=s.byteLength,h=new ArrayBuffer(t),x=new Uint8Array(c,g,t);return new Uint8Array(h).set(x),new DataView(h)}if(a==="[object Boolean]"||a==="[object Number]"||a==="[object String]"){const s=e.constructor,c=new s(e.valueOf());return a==="[object String]"?vt(c,e):se(c,e),c}if(a==="[object Date]")return new Date(Number(e));if(a==="[object RegExp]"){const s=e,c=new RegExp(s.source,s.flags);return c.lastIndex=s.lastIndex,c}if(a==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(a==="[object Map]"){const s=e,c=new Map;return s.forEach((g,t)=>{c.set(t,g)}),c}if(a==="[object Set]"){const s=e,c=new Set;return s.forEach(g=>{c.add(g)}),c}if(a==="[object Arguments]"){const s=e,c={};return se(c,s),c.length=s.length,c[Symbol.iterator]=s[Symbol.iterator],c}const o={};return Ct(o,e),se(o,e),Ot(o,e),o}function It(e){switch(xe(e)){case ct:case ot:case nt:case at:case it:case rt:case st:case tt:case et:case $e:case Qe:case Ze:case Je:case qe:case je:case Xe:case He:case Ge:case Ue:case Ve:case Ye:case We:return!0;default:return!1}}function se(e,a){for(const o in a)Object.hasOwn(a,o)&&(e[o]=a[o])}function Ot(e,a){const o=Object.getOwnPropertySymbols(a);for(let s=0;s<o.length;s++){const c=o[s];Object.prototype.propertyIsEnumerable.call(a,c)&&(e[c]=a[c])}}function vt(e,a){const o=a.valueOf().length;for(const s in a)Object.hasOwn(a,s)&&(Number.isNaN(Number(s))||Number(s)>=o)&&(e[s]=a[s])}function Ct(e,a){const o=Object.getPrototypeOf(a);o!==null&&typeof a.constructor=="function"&&Object.setPrototypeOf(e,o)}var ie=(function(){var e=u(function(v,d,i,l){for(i=i||{},l=v.length;l--;i[v[l]]=d);return i},"o"),a=[1,15],o=[1,7],s=[1,13],c=[1,14],g=[1,19],t=[1,16],h=[1,17],x=[1,18],L=[8,30],b=[8,10,21,28,29,30,31,39,43,46],f=[1,23],m=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],S=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],k={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(d,i,l,p,E,r,K){var n=r.length-1;switch(E){case 4:p.getLogger().debug("Rule: separator (NL) ");break;case 5:p.getLogger().debug("Rule: separator (Space) ");break;case 6:p.getLogger().debug("Rule: separator (EOF) ");break;case 7:p.getLogger().debug("Rule: hierarchy: ",r[n-1]),p.setHierarchy(r[n-1]);break;case 8:p.getLogger().debug("Stop NL ");break;case 9:p.getLogger().debug("Stop EOF ");break;case 10:p.getLogger().debug("Stop NL2 ");break;case 11:p.getLogger().debug("Stop EOF2 ");break;case 12:p.getLogger().debug("Rule: statement: ",r[n]),typeof r[n].length=="number"?this.$=r[n]:this.$=[r[n]];break;case 13:p.getLogger().debug("Rule: statement #2: ",r[n-1]),this.$=[r[n-1]].concat(r[n]);break;case 14:p.getLogger().debug("Rule: link: ",r[n],d),this.$={edgeTypeStr:r[n],label:""};break;case 15:p.getLogger().debug("Rule: LABEL link: ",r[n-3],r[n-1],r[n]),this.$={edgeTypeStr:r[n],label:r[n-1]};break;case 18:const F=parseInt(r[n]),Y=p.generateId();this.$={id:Y,type:"space",label:"",width:F,children:[]};break;case 23:p.getLogger().debug("Rule: (nodeStatement link node) ",r[n-2],r[n-1],r[n]," typestr: ",r[n-1].edgeTypeStr);const J=p.edgeStrToEdgeData(r[n-1].edgeTypeStr),V=p.edgeStrToEdgeStartData(r[n-1].edgeTypeStr),Z=p.edgeStrToThickness(r[n-1].edgeTypeStr),D=p.edgeStrToPattern(r[n-1].edgeTypeStr);this.$=[{id:r[n-2].id,label:r[n-2].label,type:r[n-2].type,directions:r[n-2].directions},{id:r[n-2].id+"-"+r[n].id,start:r[n-2].id,end:r[n].id,label:r[n-1].label,type:"edge",thickness:Z,pattern:D,directions:r[n].directions,arrowTypeEnd:J,arrowTypeStart:V},{id:r[n].id,label:r[n].label,type:p.typeStr2Type(r[n].typeStr),directions:r[n].directions}];break;case 24:p.getLogger().debug("Rule: nodeStatement (abc88 node size) ",r[n-1],r[n]),this.$={id:r[n-1].id,label:r[n-1].label,type:p.typeStr2Type(r[n-1].typeStr),directions:r[n-1].directions,widthInColumns:parseInt(r[n],10)};break;case 25:p.getLogger().debug("Rule: nodeStatement (node) ",r[n]),this.$={id:r[n].id,label:r[n].label,type:p.typeStr2Type(r[n].typeStr),directions:r[n].directions,widthInColumns:1};break;case 26:p.getLogger().debug("APA123",this?this:"na"),p.getLogger().debug("COLUMNS: ",r[n]),this.$={type:"column-setting",columns:r[n]==="auto"?-1:parseInt(r[n])};break;case 27:p.getLogger().debug("Rule: id-block statement : ",r[n-2],r[n-1]),p.generateId(),this.$={...r[n-2],type:"composite",children:r[n-1]};break;case 28:p.getLogger().debug("Rule: blockStatement : ",r[n-2],r[n-1],r[n]);const z=p.generateId();this.$={id:z,type:"composite",label:"",children:r[n-1]};break;case 29:p.getLogger().debug("Rule: node (NODE_ID separator): ",r[n]),this.$={id:r[n]};break;case 30:p.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",r[n-1],r[n]),this.$={id:r[n-1],label:r[n].label,typeStr:r[n].typeStr,directions:r[n].directions};break;case 31:p.getLogger().debug("Rule: dirList: ",r[n]),this.$=[r[n]];break;case 32:p.getLogger().debug("Rule: dirList: ",r[n-1],r[n]),this.$=[r[n-1]].concat(r[n]);break;case 33:p.getLogger().debug("Rule: nodeShapeNLabel: ",r[n-2],r[n-1],r[n]),this.$={typeStr:r[n-2]+r[n],label:r[n-1]};break;case 34:p.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",r[n-3],r[n-2]," #3:",r[n-1],r[n]),this.$={typeStr:r[n-3]+r[n],label:r[n-2],directions:r[n-1]};break;case 35:case 36:this.$={type:"classDef",id:r[n-1].trim(),css:r[n].trim()};break;case 37:this.$={type:"applyClass",id:r[n-1].trim(),styleClass:r[n].trim()};break;case 38:this.$={type:"applyStyles",id:r[n-1].trim(),stylesStr:r[n].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:a,11:3,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:s,29:c,31:g,39:t,43:h,46:x},{8:[1,20]},e(L,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:a,21:o,28:s,29:c,31:g,39:t,43:h,46:x}),e(b,[2,16],{14:22,15:f,16:m}),e(b,[2,17]),e(b,[2,18]),e(b,[2,19]),e(b,[2,20]),e(b,[2,21]),e(b,[2,22]),e(w,[2,25],{27:[1,25]}),e(b,[2,26]),{19:26,26:12,31:g},{10:a,11:27,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:s,29:c,31:g,39:t,43:h,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(S,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(L,[2,13]),{26:35,31:g},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:a,11:37,13:4,14:22,15:f,16:m,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:s,29:c,31:g,39:t,43:h,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(b,[2,28]),e(b,[2,35]),e(b,[2,36]),e(b,[2,37]),e(b,[2,38]),{36:[1,47]},{33:48,34:_},{15:[1,50]},e(b,[2,27]),e(S,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(S,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(d,i){if(i.recoverable)this.trace(d);else{var l=new Error(d);throw l.hash=i,l}},"parseError"),parse:u(function(d){var i=this,l=[0],p=[],E=[null],r=[],K=this.table,n="",F=0,Y=0,J=2,V=1,Z=r.slice.call(arguments,1),D=Object.create(this.lexer),z={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(z.yy[Q]=this.yy[Q]);D.setInput(d,z.yy),z.yy.lexer=D,z.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var $=D.yylloc;r.push($);var Re=D.options&&D.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pe(I){l.length=l.length-2*I,E.length=E.length-I,r.length=r.length-I}u(Pe,"popStack");function de(){var I;return I=p.pop()||D.lex()||V,typeof I!="number"&&(I instanceof Array&&(p=I,I=p.pop()),I=i.symbols_[I]||I),I}u(de,"lex");for(var N,R,C,ee,M={},U,B,pe,G;;){if(R=l[l.length-1],this.defaultActions[R]?C=this.defaultActions[R]:((N===null||typeof N>"u")&&(N=de()),C=K[R]&&K[R][N]),typeof C>"u"||!C.length||!C[0]){var te="";G=[];for(U in K[R])this.terminals_[U]&&U>J&&G.push("'"+this.terminals_[U]+"'");D.showPosition?te="Parse error on line "+(F+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+G.join(", ")+", got '"+(this.terminals_[N]||N)+"'":te="Parse error on line "+(F+1)+": Unexpected "+(N==V?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(te,{text:D.match,token:this.terminals_[N]||N,line:D.yylineno,loc:$,expected:G})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+N);switch(C[0]){case 1:l.push(N),E.push(D.yytext),r.push(D.yylloc),l.push(C[1]),N=null,Y=D.yyleng,n=D.yytext,F=D.yylineno,$=D.yylloc;break;case 2:if(B=this.productions_[C[1]][1],M.$=E[E.length-B],M._$={first_line:r[r.length-(B||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(B||1)].first_column,last_column:r[r.length-1].last_column},Re&&(M._$.range=[r[r.length-(B||1)].range[0],r[r.length-1].range[1]]),ee=this.performAction.apply(M,[n,Y,F,z.yy,C[1],E,r].concat(Z)),typeof ee<"u")return ee;B&&(l=l.slice(0,-1*B*2),E=E.slice(0,-1*B),r=r.slice(0,-1*B)),l.push(this.productions_[C[1]][0]),E.push(M.$),r.push(M._$),pe=K[l[l.length-2]][l[l.length-1]],l.push(pe);break;case 3:return!0}}return!0},"parse")},T=(function(){var v={EOF:1,parseError:u(function(i,l){if(this.yy.parser)this.yy.parser.parseError(i,l);else throw new Error(i)},"parseError"),setInput:u(function(d,i){return this.yy=i||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var i=d.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:u(function(d){var i=d.length,l=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(d){this.unput(this.match.slice(d))},"less"),pastInput:u(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var d=this.pastInput(),i=new Array(d.length+1).join("-");return d+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as s}from"./B8o4lNgr.js";import{d as r}from"./
|
|
1
|
+
import{ao as s}from"./B8o4lNgr.js";import{d as r}from"./Dmhbab3K.js";const t=()=>{const e=r;return{page:{subscribe:e.page.subscribe},navigating:{subscribe:e.navigating.subscribe},updated:e.updated}},c={subscribe(e){return(s?o("page"):t().page).subscribe(e)}};function o(e){try{return t()[e]}catch{throw new Error(`Cannot subscribe to '${e}' store on the server outside of a Svelte component, as it is bound to the current request via component context. This prevents state from leaking between users.For more information, see https://svelte.dev/docs/kit/state-management#avoid-shared-state-on-the-server`)}}export{c as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as F,bq as L,bo as H,a_ as B,by as G,bs as dt,b as J,bu as nt}from"./7rNOGHzs.js";import{bs as K,cd as lt,ca as z,c5 as ct,a5 as T,be as D,b$ as M,b_ as x,bO as _,W as l,bH as U,aD as e,bS as C,bA as q,bn as N,bV as it,aA as R,c9 as u,aB as b,bl as S,ay as pt}from"./B8o4lNgr.js";import{C as ut}from"./
|
|
1
|
+
import{t as F,bq as L,bo as H,a_ as B,by as G,bs as dt,b as J,bu as nt}from"./7rNOGHzs.js";import{bs as K,cd as lt,ca as z,c5 as ct,a5 as T,be as D,b$ as M,b_ as x,bO as _,W as l,bH as U,aD as e,bS as C,bA as q,bn as N,bV as it,aA as R,c9 as u,aB as b,bl as S,ay as pt}from"./B8o4lNgr.js";import{C as ut}from"./Dkq5Coq_.js";import{f as V}from"./Bgegixo2.js";import{k as bt}from"./Dkz23CVV.js";import{Hq as W,dw as vt,du as kt,dx as _t}from"./CRwmdgt6.js";var gt=b('<p class="p-2 text-xs text-subtle" data-testid="hook-script-content-too-large"> </p>'),ft=b('<div class="min-h-0 min-w-0 flex-1 overflow-auto" data-testid="hook-script-content-script"><!></div>'),mt=b('<span class="text-xs font-medium text-danger"> </span> <pre class="whitespace-pre-wrap break-all rounded bg-danger-background/10 p-2 font-mono text-xs text-danger"> </pre>',1),xt=b('<pre class="whitespace-pre-wrap break-all rounded bg-muted/40 p-2 font-mono text-xs text-subtle"> </pre>'),ht=b('<p class="text-xs text-subtle"> </p>'),wt=b('<div class="flex min-h-0 min-w-0 flex-1 flex-col gap-2 overflow-auto" data-testid="hook-script-content-logs"><!> <!></div>'),It=b('<div class="flex h-full min-h-0 min-w-0 flex-col gap-3 overflow-hidden" data-testid="hook-script-content"><div class="flex shrink-0 border-b border-border" role="tablist"><!> <!></div> <!></div>');function Q(h,c){if(new.target)return F({component:Q,...h});K(c,!0);const g=()=>nt($,"$hooks$",w),[w,E]=dt();let s=L(c,"workspaceId",7),I=L(c,"hookId",7);const d=lt(s());z(()=>d.set(s()));const $=bt(d),v=u(()=>g().find(t=>t.hookId===I()));z(()=>{if(!s())return;const t=s();return ct(()=>{W.dispatch(vt(t)),W.dispatch(kt(t))}),()=>W.dispatch(_t(t))});let k=it("script");var X={get workspaceId(){return s()},set workspaceId(t){s(t),R()},get hookId(){return I()},set hookId(t){I(t),R()},$set:G,$on:(t,r)=>J(c,t,r)},A=It(),O=T(A),j=T(O);{let t=u(()=>e(k)==="script"),r=u(()=>e(k)==="script"?"border-primary-ink text-primary-ink":"border-transparent text-subtle");V(j,{variant:"ghost",role:"tab",get"aria-selected"(){return e(t)},get class(){return`border-b-2 px-3 py-1.5 text-sm ${e(r)??""}`},onclick:()=>U(k,"script"),children:(p,y)=>{D();var i=M();x(a=>_(i,a),[()=>H.chat_backgroundHooks_modal_scriptTab_label()]),l(p,i)},$$slots:{default:!0}})}var Y=C(j,2);{let t=u(()=>e(k)==="logs"),r=u(()=>e(k)==="logs"?"border-primary-ink text-primary-ink":"border-transparent text-subtle");V(Y,{variant:"ghost",role:"tab",get"aria-selected"(){return e(t)},get class(){return`border-b-2 px-3 py-1.5 text-sm ${e(r)??""}`},onclick:()=>U(k,"logs"),children:(p,y)=>{D();var i=M();x(a=>_(i,a),[()=>H.chat_backgroundHooks_modal_logsTab_label()]),l(p,i)},$$slots:{default:!0}})}q(O);var Z=C(O,2);{var tt=t=>{var r=ft(),p=T(r);{var y=a=>{var f=gt(),o=S(f,!0);x(n=>_(o,n),[()=>H.chat_backgroundHooks_modal_codeTooLarge_description({size:(e(v).codeBytes??0).toLocaleString()})]),l(a,f)},i=a=>{{let f=u(()=>e(v)?.code??"");ut(a,{get code(){return e(f)},language:"javascript",noMargin:!0})}};B(p,a=>{e(v)?.codeOmitted?a(y):a(i,-1)})}q(r),l(t,r)},et=t=>{var r=wt(),p=T(r);{var y=o=>{var n=mt(),m=pt(n),P=S(m,!0),at=C(m,2),ot=S(at,!0);x(st=>{_(P,st),_(ot,e(v).lastError)},[()=>H.chat_backgroundHooks_modal_lastError_label()]),l(o,n)};B(p,o=>{e(v)?.lastError&&o(y)})}var i=C(p,2);{var a=o=>{var n=xt(),m=S(n,!0);x(()=>_(m,e(v).lastLogs)),l(o,n)},f=o=>{var n=ht(),m=S(n,!0);x(P=>_(m,P),[()=>H.chat_backgroundHooks_modal_noLogs_description()]),l(o,n)};B(i,o=>{e(v)?.lastLogs?o(a):o(f,-1)})}q(r),l(t,r)};B(Z,t=>{e(k)==="script"?t(tt):t(et,-1)})}q(A),l(h,A);var rt=N(X);return E(),rt}var $t=b('<div class="h-full min-h-0 min-w-0 max-w-full overflow-hidden p-4" data-testid="hook-script-panel"><!></div>');function yt(h,c){if(new.target)return F({component:yt,...h});K(c,!0);let g=L(c,"tab",7),w=L(c,"workspaceId",7);var E={get tab(){return g()},set tab(d){g(d),R()},get workspaceId(){return w()},set workspaceId(d){w(d),R()},$set:G,$on:(d,$)=>J(c,d,$)},s=$t(),I=T(s);{let d=u(()=>g().workspaceId??w()),$=u(()=>g().hookId??"");Q(I,{get workspaceId(){return e(d)},get hookId(){return e($)}})}return q(s),l(h,s),N(E)}export{yt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as T,bq as r,a_ as W,by as $,bs as q,b as x,bu as B}from"./7rNOGHzs.js";import{bs as C,cd as H,ca as S,a7 as m,ay as f,W as b,bn as D,aA as o}from"./B8o4lNgr.js";import{E}from"./DCaHy20k.js";import{a as J}from"./
|
|
1
|
+
import{t as T,bq as r,a_ as W,by as $,bs as q,b as x,bu as B}from"./7rNOGHzs.js";import{bs as C,cd as H,ca as S,a7 as m,ay as f,W as b,bn as D,aA as o}from"./B8o4lNgr.js";import{E}from"./DCaHy20k.js";import{a as J}from"./BTjbZv4v.js";import{dl as L}from"./KQTrHxko.js";import{Hq as j,gJ as z}from"./CRwmdgt6.js";function F(i,a){if(new.target)return T({component:F,...i});C(a,!0);const d=()=>B(g,"$workspace$",k),[k,_]=q();let c=r(a,"tab",7),t=r(a,"workspaceId",7),n=r(a,"layoutId",7),p=r(a,"isActive",7);const l=H(t());S(()=>l.set(t()));const g=L(l);var v={get tab(){return c()},set tab(e){c(e),o()},get workspaceId(){return t()},set workspaceId(e){t(e),o()},get layoutId(){return n()},set layoutId(e){n(e),o()},get isActive(){return p()},set isActive(e){p(e),o()},$set:$,$on:(e,s)=>x(a,e,s)},u=m(),w=f(u);{var y=e=>{var s=m(),A=f(s);E(A,t,h=>{J(h,{get workspace(){return d()},showBackToList:!1,onclose:()=>j.dispatch(z(n()??t(),c().id))})}),b(e,s)};W(w,e=>{p()&&d()&&e(y)})}b(i,u);var I=D(v);return _(),I}export{F as default};
|