@intent-hq/web 2.334.4 → 2.334.6
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/assets/0.DDO9e6AE.css +1 -0
- package/web/app/immutable/chunks/{B--DS5uB.js → 0FyVrvMr.js} +1 -1
- package/web/app/immutable/chunks/{DiQPrKdw.js → 0WwOrUwa.js} +1 -1
- package/web/app/immutable/chunks/{jQoVJUan.js → 62Ck3yAT.js} +4 -4
- package/web/app/immutable/chunks/{tCQts2qZ.js → 81XDh255.js} +1 -1
- package/web/app/immutable/chunks/{eydIaLOC.js → 8_ljbhiH.js} +1 -1
- package/web/app/immutable/chunks/{_UdqBB2L.js → B-tqV-du.js} +1 -1
- package/web/app/immutable/chunks/{D2mgiwW6.js → B0AQrNP8.js} +1 -1
- package/web/app/immutable/chunks/{CrrEv2rL.js → B2dH0oKn.js} +1 -1
- package/web/app/immutable/chunks/{ZQGx2tXF.js → BBCAmMgd.js} +1 -1
- package/web/app/immutable/chunks/{-TOEU8_A.js → BBSarno7.js} +1 -1
- package/web/app/immutable/chunks/{CuWBzd-F.js → BEtyTdg1.js} +1 -1
- package/web/app/immutable/chunks/{CY6nFc9b.js → BMxxonMM.js} +1 -1
- package/web/app/immutable/chunks/{BBQmqbzc.js → BN7oNeT4.js} +1 -1
- package/web/app/immutable/chunks/{uRN7AKow.js → BNE5EdJc.js} +1 -1
- package/web/app/immutable/chunks/{CsBjcw-w.js → BRhn0zzz.js} +1 -1
- package/web/app/immutable/chunks/{CxJbFBxw.js → BRq9XkNc.js} +1 -1
- package/web/app/immutable/chunks/{BwwEJ73s.js → BSj_w_6H.js} +1 -1
- package/web/app/immutable/chunks/{C7MBFDJp.js → BSt9DnIU.js} +1 -1
- package/web/app/immutable/chunks/{Ceq7cv95.js → BUfNF6yo.js} +1 -1
- package/web/app/immutable/chunks/{D81SHt2l.js → BVbFqMmm.js} +1 -1
- package/web/app/immutable/chunks/{bUGfWLiY.js → BWwaybhk.js} +1 -1
- package/web/app/immutable/chunks/{W61kh8fv.js → Ba_-F0B5.js} +6 -6
- package/web/app/immutable/chunks/{J08yAvVE.js → BcXaAxkW.js} +1 -1
- package/web/app/immutable/chunks/{Cz2XOG-L.js → Bd3NQ0dc.js} +1 -1
- package/web/app/immutable/chunks/{Bs3DdycY.js → Be-iTE3o.js} +1 -1
- package/web/app/immutable/chunks/{BrH3hKEJ.js → BerYJ_N3.js} +1 -1
- package/web/app/immutable/chunks/{znAltH1L.js → BgVKKIhh.js} +4 -4
- package/web/app/immutable/chunks/{Da5ikdTd.js → BhHLn-bI.js} +1 -1
- package/web/app/immutable/chunks/{PotN_tv7.js → BkmDnHK5.js} +1 -1
- package/web/app/immutable/chunks/{CBHhz236.js → BlAnjJrQ.js} +1 -1
- package/web/app/immutable/chunks/{C58MXMyI.js → Bm8uDgI4.js} +1 -1
- package/web/app/immutable/chunks/{DeRdhkHZ.js → BmVaEhYz.js} +1 -1
- package/web/app/immutable/chunks/{ms_dJmyn.js → BnEsz2KN.js} +1 -1
- package/web/app/immutable/chunks/{B8IlgGpJ.js → BnFz8cck.js} +2 -2
- package/web/app/immutable/chunks/{Iv4WzslT.js → BqZYZkSb.js} +1 -1
- package/web/app/immutable/chunks/{_sWyQxbQ.js → Bs4slzIC.js} +2 -2
- package/web/app/immutable/chunks/{D5JZ5TDM.js → Bte-s6hN.js} +3 -3
- package/web/app/immutable/chunks/{CGlMnf5q.js → Bugw0Y8f.js} +1 -1
- package/web/app/immutable/chunks/{DS8-U49C.js → BwWjWCx7.js} +1 -1
- package/web/app/immutable/chunks/{BvZf2Y4o.js → BxoQ-54W.js} +1 -1
- package/web/app/immutable/chunks/{BOWbyG8Q.js → C0n3GkXc.js} +1 -1
- package/web/app/immutable/chunks/{BxmfBtHG.js → C1v_uKxt.js} +1 -1
- package/web/app/immutable/chunks/{Do-q4-tL.js → C27VjfPV.js} +3 -3
- package/web/app/immutable/chunks/{Ba7P2HkQ.js → C43c9gOy.js} +1 -1
- package/web/app/immutable/chunks/{BcBl1qMn.js → C4HlRcUf.js} +2 -2
- package/web/app/immutable/chunks/{DDugF1XE.js → C4twHGiQ.js} +1 -1
- package/web/app/immutable/chunks/{BzP4gCLt.js → C6KILHrA.js} +1 -1
- package/web/app/immutable/chunks/{DistMkl2.js → C9HiWs7H.js} +4 -4
- package/web/app/immutable/chunks/{DIwBqoFo.js → CAnlGY8T.js} +1 -1
- package/web/app/immutable/chunks/{BCvW5fLL.js → CB_s16b4.js} +1 -1
- package/web/app/immutable/chunks/{CcOMWwsU.js → CF8VGN6V.js} +1 -1
- package/web/app/immutable/chunks/{BnsMMXeG.js → CFnSm94u.js} +1 -1
- package/web/app/immutable/chunks/{DHM67VRx.js → CJGmFcnd.js} +1 -1
- package/web/app/immutable/chunks/{BOE4Qfjf.js → CQdt2YW2.js} +1 -1
- package/web/app/immutable/chunks/{C4Yfp_TG.js → CRUpele6.js} +1 -1
- package/web/app/immutable/chunks/{CJsd_APB.js → CR_TLVSm.js} +1 -1
- package/web/app/immutable/chunks/{CSvJVg_I.js → CUIX5TSy.js} +4 -4
- package/web/app/immutable/chunks/{L9gWdMu_.js → CeVaI72E.js} +1 -1
- package/web/app/immutable/chunks/{BVA72xzt.js → Cf5QUyxQ.js} +1 -1
- package/web/app/immutable/chunks/{CJDCNDP4.js → CldWVpJx.js} +1 -1
- package/web/app/immutable/chunks/{UdI8St87.js → ClsZKLeX.js} +1 -1
- package/web/app/immutable/chunks/{-cH4Kg6N.js → ClyIJA-J.js} +3 -3
- package/web/app/immutable/chunks/{D613d4CE.js → Co9CQOEE.js} +1 -1
- package/web/app/immutable/chunks/{aS0Ledp-.js → CxKI5WLV.js} +1 -1
- package/web/app/immutable/chunks/{DUMFiDJG.js → CxN5ww35.js} +1 -1
- package/web/app/immutable/chunks/{C4-YEGNY.js → D-JiThfG.js} +1 -1
- package/web/app/immutable/chunks/{D9eQxumT.js → D2R9j_dh.js} +1 -1
- package/web/app/immutable/chunks/{BdpYl7Gv.js → D4KuwGYO.js} +1 -1
- package/web/app/immutable/chunks/{BB8HM8Ay.js → D4RvzmFV.js} +1 -1
- package/web/app/immutable/chunks/{ZBqfJekw.js → DAS5c34n.js} +1 -1
- package/web/app/immutable/chunks/{BI3Qf00U.js → DBNZp5Wp.js} +1 -1
- package/web/app/immutable/chunks/{CqpFmLF1.js → DCoF9aZO.js} +1 -1
- package/web/app/immutable/chunks/{B25gpTlR.js → DDzpiEuq.js} +1 -1
- package/web/app/immutable/chunks/DFIEz-U9.js +227 -0
- package/web/app/immutable/chunks/{BVVMn1l6.js → DFZXcT7x.js} +1 -1
- package/web/app/immutable/chunks/{B-Y3a_F8.js → DGCiv8do.js} +1 -1
- package/web/app/immutable/chunks/{DFWkFU6G.js → DGIH8Giy.js} +1 -1
- package/web/app/immutable/chunks/{by2sennB.js → DHZ6PxAq.js} +1 -1
- package/web/app/immutable/chunks/{BnZxq056.js → DHrUgmm5.js} +1 -1
- package/web/app/immutable/chunks/DIHTPxGm.js +408 -0
- package/web/app/immutable/chunks/{DanU7KQt.js → DIUwrF_K.js} +1 -1
- package/web/app/immutable/chunks/{Bfwh7fx_.js → DLHQbJV8.js} +1 -1
- package/web/app/immutable/chunks/{CFuCenWl.js → DLdcS_fn.js} +1 -1
- package/web/app/immutable/chunks/{BwxmdpQk.js → DMrPpGxC.js} +1 -1
- package/web/app/immutable/chunks/{DXA93DnF.js → DO-6xcR6.js} +1 -1
- package/web/app/immutable/chunks/{CYgoZYHa.js → DQ0dj2KX.js} +1 -1
- package/web/app/immutable/chunks/{CaEWxG5p.js → DV0bJEUk.js} +2 -2
- package/web/app/immutable/chunks/{_HObNlpG.js → DYa_4kRY.js} +1 -1
- package/web/app/immutable/chunks/{CSf8qtlt.js → D_pdm8Iu.js} +1 -1
- package/web/app/immutable/chunks/{CI3pmd4G.js → DaM3w2zL.js} +1 -1
- package/web/app/immutable/chunks/{C0fLKaB9.js → DblhKpGx.js} +1 -1
- package/web/app/immutable/chunks/{DPkE3Irc.js → Dgr_dd3s.js} +1 -1
- package/web/app/immutable/chunks/{C0IuX8Tw.js → Di8eJd7y.js} +1 -1
- package/web/app/immutable/chunks/{Dl2HfqsO.js → DjJMRMqK.js} +1 -1
- package/web/app/immutable/chunks/{BWJ-0D-2.js → Do1EoraG.js} +1 -1
- package/web/app/immutable/chunks/{cKtqmo72.js → Dq3t5TwZ.js} +3 -3
- package/web/app/immutable/chunks/{CXqkKZxQ.js → Dqj_x1iH.js} +1 -1
- package/web/app/immutable/chunks/{CtspFCnO.js → Dt0PtZRf.js} +1 -1
- package/web/app/immutable/chunks/{CqdcwUul.js → DwGXL-qt.js} +1 -1
- package/web/app/immutable/chunks/{BAJMpiJG.js → Dyka1Qt_.js} +2 -2
- package/web/app/immutable/chunks/{B2g0crjj.js → E9lFZacU.js} +1 -1
- package/web/app/immutable/chunks/{ClCRB_mv.js → FvsPOdWc.js} +1 -1
- package/web/app/immutable/chunks/{C6KqUwgB.js → G24AfB6y.js} +1 -1
- package/web/app/immutable/chunks/{DwovkWl8.js → H7Zvcn3V.js} +1 -1
- package/web/app/immutable/chunks/{C1wyQWdd.js → IlIt-f56.js} +1 -1
- package/web/app/immutable/chunks/{DZWmQz5X.js → LyXMg8Qe.js} +1 -1
- package/web/app/immutable/chunks/{MohDaz1W.js → QGl-Xn9g.js} +2 -2
- package/web/app/immutable/chunks/{Ced3NNcG.js → SuEehhCe.js} +1 -1
- package/web/app/immutable/chunks/{LF6JrNMn.js → UEEF_pji.js} +2 -2
- package/web/app/immutable/chunks/{BZGUu0nU.js → XTm8XS4k.js} +3 -3
- package/web/app/immutable/chunks/{D51IE5D2.js → YzN4RtUL.js} +1 -1
- package/web/app/immutable/chunks/{Bgmz76v7.js → fkBazoe-.js} +1 -1
- package/web/app/immutable/chunks/{BiWS3oN6.js → gZgaz0G2.js} +2 -2
- package/web/app/immutable/chunks/{D4jQS0eM.js → hODW-NKf.js} +1 -1
- package/web/app/immutable/chunks/{QiVjRpIE.js → i27DVf4h.js} +1 -1
- package/web/app/immutable/chunks/{DNc3c430.js → kNlqjW-C.js} +1 -1
- package/web/app/immutable/chunks/{D3LGlsX3.js → oLdtVgVq.js} +1 -1
- package/web/app/immutable/chunks/{DJbDjFTs.js → oUKZGyo6.js} +1 -1
- package/web/app/immutable/chunks/{G3hahPKG.js → qS-FFtmP.js} +1 -1
- package/web/app/immutable/chunks/{BvK0-XNr.js → seqIFXVs.js} +1 -1
- package/web/app/immutable/chunks/{rVFNKqUq.js → sylOMk5x.js} +1 -1
- package/web/app/immutable/chunks/{CGgST5OQ.js → xctgDwNB.js} +1 -1
- package/web/app/immutable/entry/{app.DVdz1aQK.js → app.DMK38pKj.js} +2 -2
- package/web/app/immutable/entry/start.DedWlol5.js +1 -0
- package/web/app/immutable/nodes/{0.1qBEgFWI.js → 0.ZjGfuQZ5.js} +1 -1
- package/web/app/immutable/nodes/{1.iJqMO56i.js → 1.CzSlxWDI.js} +1 -1
- package/web/app/immutable/nodes/{10.Dtdcvc6-.js → 10.CDcFOY3m.js} +1 -1
- package/web/app/immutable/nodes/{14.BRod9dtf.js → 14.442_Kmt_.js} +1 -1
- package/web/app/immutable/nodes/{17.B-vrsgfn.js → 17.Gp4mmeUX.js} +2 -2
- package/web/app/immutable/nodes/2.BWlNOzaY.js +13 -0
- package/web/app/immutable/nodes/{3.DGf0u_3o.js → 3.DwEqcKct.js} +1 -1
- package/web/app/immutable/nodes/{4.B1fIfTX2.js → 4.CLbC-SYM.js} +1 -1
- package/web/app/immutable/nodes/{5.CJgBMBBF.js → 5.Cb95bBtk.js} +1 -1
- package/web/app/immutable/nodes/{6.CUqou9xf.js → 6.K81lfiYe.js} +1 -1
- package/web/app/immutable/nodes/{7.DBynvHNx.js → 7.B8yYgNgD.js} +1 -1
- package/web/app/immutable/nodes/{8.BFuKMy6D.js → 8.CNNQksh_.js} +4 -4
- package/web/app/immutable/nodes/{9.CVLLynGu.js → 9.Cg_qHOdY.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +8 -8
- package/web/index.html +10 -10
- package/web/app/immutable/assets/0.CvWOFl38.css +0 -1
- package/web/app/immutable/chunks/BOSe_KRq.js +0 -227
- package/web/app/immutable/chunks/pBwXi0xp.js +0 -408
- package/web/app/immutable/entry/start.CP_dOJoI.js +0 -1
- package/web/app/immutable/nodes/2.BLWWZTlf.js +0 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var $l=Object.defineProperty;var Ol=(r,t,n)=>t in r?$l(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var kn=(r,t,n)=>Ol(r,typeof t!="symbol"?t+"":t,n);import{t as It,br as g,a_ as B,bz as St,b as Tt,bp as f,bt as Kn,bv as dr,bu as ql,bs as ha}from"./CEL6QztG.js";import{ai as aa,bs as Ct,ca as sr,aD as e,bH as j,ay as xe,bS as T,a7 as Rt,W as u,a5 as z,bA as R,bn as At,c9 as s,bV as we,aA as m,b_ as $,aj as Sr,aB as I,be as gr,b$ as Or,bO as J,bf as or,c0 as Cn,bl as oe,bj as jn,c6 as Dl,bo as za,br as Yr,am as Dn,ax as Bn,bk as as,aw as va,bz as ss,cb as ms,c5 as Ha,aC as xr,cd as _o,bv as Bl}from"./DYhIMPy1.js";import{n as Tr,u as te,v as ze,g as _n,s as ps,w as _a,j as kt,l as ar,p as Yn,I as Fl,i as ya,r as zl,o as eo,X as _i,q as Wl,S as Hl,C as Ul}from"./yn6WWSq8.js";import{I as Kt,F as qa,c as ea,j as jl,s as yi,p as to,y as Vl,u as Kl,t as $r,g as oa,B as ws,E as os,S as Gl}from"./wwtnRh6M.js";import{b as cn}from"./BaIAhI85.js";import{f as Xe,bj as Ql,am as ro,bt as Zl,bx as xs,bL as Jl}from"./Cd_8r4jJ.js";import"./BAnLxjCI.js";import"./Bsy-6OEk.js";import"./BYddvidz.js";import{s as Ln}from"./CiSnSGvU.js";import{F as jt,a0 as zs,bc as Tn,cE as no,aq as bi,aV as wi,aG as Xl,c3 as Yl,a2 as is,aJ as ed,cH as td,cG as rd,$ as vs,as as ao,I as yo,af as nd,bp as ad,aO as sd,aT as od,bE as id,ak as ld,cw as dd,ay as bo,aL as wo,bW as ks,aE as Ua,cQ as cd,c5 as ud,bj as fd,b as gd,cj as md,ac as pd,b6 as Is,cl as xa,cz as vd,a as hd}from"./DnKg2UsP.js";import{c as xi,A as _d,x as yd}from"./BCF9Fm7Q.js";import{b as Ss,V as xo}from"./C6zJgX6A.js";import{a as ki,b2 as Pr,A as Ga,al as Ii,s as bd,n as Si,d as wd,I as xd,R as kd,au as Id,$ as Sd}from"./znAltH1L.js";import{bW as Ti,j as Qa,a5 as Ws,ak as ls,F as Td,at as Za,aM as Cd,aP as ko}from"./G3hahPKG.js";import{t as ia,o as Ad}from"./WAMpa_Dp.js";import{c3 as Ja,aC as Da,cQ as Ci,cS as Vn,bU as hs,j as Md,cJ as Ai,cP as _s,cO as Mi,cM as Pi,g as Nn,aa as Pd,ab as Rd,ax as Ed,s as Nd,K as Ld,W as Io,v as Ri,dO as $d,at as Od,k as qd,u as Ts,a6 as Dd,n as Bd,O as Fd,o as zd,S as Wd,R as Hd,a0 as Ud,q as Ei,r as Ni,l as jd,cT as Vd,a4 as Kd,D as Gd,x as Qd,V as So}from"./Dml826jn.js";import{Ik as yt,oz as Zd,t5 as Xa,np as To,uT as Li,uV as $i,rl as Jd,xP as ds,ua as Oi,nk as qi,be as Ya,xQ as Xd,p$ as Yd,sC as ec,uM as Di,nj as tc,mq as rc,g as nc,yg as ac,yd as sc,yf as oc}from"./DYfeeu3f.js";import{a2 as ic,x as Cs,a0 as lc,O as As,V as dc,_ as cc,j as uc,o as ka,M as fa,p as fc,F as gc,u as mc,s as pc,L as Ms,J as vc,y as hc,K as _c,Z as Ma,Q as ja,N as Co,m as Ao,E as yc,c as Ps,B as Mo,z as bc,v as Po,H as Pa,P as wc,G as xc,i as kc,R as Ic,T as Sc,A as Tc,g as Cc,b as Ac,D as Mc,f as Pc,e as Rc,a as Ec,C as Nc,h as Lc,U as Bi,a3 as $c,t as Oc,k as qc,d as Ro}from"./-cH4Kg6N.js";import{i as Dc,e as Bc}from"./CcXckLs7.js";import{g as Rs}from"./BvFAWM27.js";import{M as Ia,C as Ra}from"./jQoVJUan.js";import{C as Eo}from"./DDugF1XE.js";import"./UdI8St87.js";import{P as Fc}from"./DXA93DnF.js";import"./DJuQfCSS.js";import{c as Fi}from"./ChTqQfQN.js";import{S as zc}from"./CqdcwUul.js";import{D as No,M as Wc}from"./DistMkl2.js";import{b as Hc,s as na,c as cs}from"./tCQts2qZ.js";import{O as es,y as Es,E as Ns,B as Ls,N as Uc,m as jc,l as Vc,d as us,C as Lo,f as Kc,e as Gc,g as Qc}from"./DZWmQz5X.js";import{a as zi,s as $o}from"./BsieX9dN.js";import{f as Zc}from"./BdWqymET.js";import{c as dn}from"./CV0Fs-12.js";import{P as Jc}from"./CGjjowC8.js";import{p as $s,o as Os,y as Oo,h as Xc}from"./D9eQxumT.js";import{R as Hs,C as ys,k as Yc,h as eu,g as tu,i as qo,P as ru}from"./Cn76YSbd.js";import"./D-Brs8OV.js";import{R as Do,x as Na,o as Wi}from"./MohDaz1W.js";import{B as nu}from"./CGSth7XF.js";import{o as Hi,r as au,e as su}from"./_HObNlpG.js";import{o as Ui}from"./BcBl1qMn.js";import{g as so}from"./DR_tn5Kl.js";import{a as ou,M as iu}from"./B5PFzC2T.js";import{c as Sa}from"./B4USm-wY.js";import{A as lu}from"./BVVMn1l6.js";import{f as du,d as cu}from"./BvK0-XNr.js";import{a8 as uu,N as fu,Y as gu,K as Bo,X as mu,v as pu}from"./cKtqmo72.js";import{a as vu}from"./CC7to1B5.js";import{G as hu}from"./CuEQVba7.js";import{S as _u}from"./1hAIZvxV.js";import{u as yu,a as bu,c as Fo,S as wu}from"./DfxQWSVU.js";import{T as Us}from"./DZo9MSm2.js";import"./q1Qi1tRJ.js";import{g as xu}from"./DXDNvQ8c.js";import{a as ku}from"./Dbpx98ZW.js";import{b as Iu}from"./CbM8k2mZ.js";import{b as zo}from"./p7znhYIU.js";import{g as Su,i as Tu,a as Cu}from"./66MF_whg.js";import{n as Wo,o as Ho,b as ma,s as Ta,_ as qs,e as Au}from"./CIyUrgF0.js";import{aW as Un,B as Mu}from"./50HPeG9s.js";import{y as Pu}from"./T4aQylmi.js";import{c as Ru}from"./W61kh8fv.js";function Eu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c}=t;if(typeof n!="string"||typeof a!="string"||!a||typeof o!="string"||!o||typeof i!="string"||!i||typeof d!="string"||!d||c!=="finished"&&c!=="ttl-expired"&&c!=="output-match"&&c!=="line-count")return null;const v=t.trigger;return{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c,...c==="output-match"&&typeof v?.matchedLine=="string"?{matchedLine:v.matchedLine}:{}}}function Nu(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function Lu(r,t,n,a=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const o=r.messageMetadata?.fromPrincipalId??r.author?.principalId,i=uu(r)&&r.author?.principalId!==null&&o===t;return{edit:i,remove:i||t===n||a,sendNow:(i||a)&&!ji(r)}}function Ca(r,t){if(t)return r.find(n=>n.editing&&n.editingMessageId?n.editingMessageId===t:n.id===t)}function ji(r){return Nu(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function Uo(r,t=Date.now()){const n=r.messageMetadata,a=n?.fromPrincipalId,o=n&&Object.hasOwn(n,"humanAuthor")&&!(typeof a=="string"&&a.length>0),i=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!i&&!o&&!ji(r)}const j_="pl-3.5! pr-2!";var $u=I('<span class="tile-remove-slot svelte-d8pwpf"><!></span>'),jo=I('<span class="attachment-status svelte-d8pwpf"> </span>'),Ou=I('<div class="file-image tile svelte-d8pwpf" data-kind="file"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),qu=I("<!><span> </span>",1),Du=I('<img alt="" draggable="false"/>'),Bu=I('<span class="summary svelte-d8pwpf" data-clip-summary=""> </span>'),Fu=I('<span class="clip svelte-d8pwpf"><span class="record-dot svelte-d8pwpf" aria-hidden="true"></span><span class="duration svelte-d8pwpf"> </span><!></span>'),zu=I('<div class="tile svelte-d8pwpf"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),Wu=I('<div class="attachment-row svelte-d8pwpf" role="group" data-dock-media-attachments=""></div>'),Hu=I("<!> <!> <!>",1),Uu=I('<img draggable="false" class="svelte-d8pwpf"/>'),ju=I('<video controls="" playsinline="" class="svelte-d8pwpf"></video>',2),Vu=I('<div class="media-viewer svelte-d8pwpf"><!></div>'),Ku=I("<!> <!>",1);function Gu(r,t){if(new.target)return It({component:Gu,...r});Ct(t,!0);const n=(O,ye=or,pe=or)=>{var A=$u(),ge=z(A);Xe(ge,{variant:"secondary",size:"icon-sm",class:"tile-action tile-remove",get disabled(){return i()},get"aria-label"(){return pe()},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return pe()},onclick:()=>q(ye()),children:(Te,Be)=>{Ss(Te,{glyph:"x"})},$$slots:{default:!0}}),R(A),u(O,A)};let a=g(t,"items",7),o=g(t,"labels",7),i=g(t,"disabled",7,!1),d=g(t,"onMarkUp",7),c=g(t,"onEdit",7),v=g(t,"onRemove",7),h=g(t,"onRetry",7),b=g(t,"onCopy",7),k=g(t,"onMenu",7);const N=O=>O.owner==="attachment"?2:{image:0,clip:1,file:2}[O.kind],Y=s(()=>[...a()].sort((O,ye)=>N(O)-N(ye)));let S=we(null),D=we(!1),ie=we(null),X=null;const M=s(()=>a().find(O=>O.id===e(ie)));sr(()=>{(!e(M)||e(M).kind==="image"&&!W(e(M)))&&j(D,!1)});function W(O){return O.kind==="image"&&O.status!=="placing"&&O.status!=="failed"&&O.url.trim().length>0}function E(O){return O.kind==="image"?o().image(O.markCount):O.kind==="clip"?O.summary?`${o().clip(O.duration)} ${O.summary}`:o().clip(O.duration):O.name}function ne(O,ye){if(!(i()||O.kind==="file"||O.kind==="image"&&!W(O)||O.kind==="clip"&&(!O.url||O.recording))){if((O.kind==="clip"||O.kind==="image")&&c()){c()(O.id);return}X=ye,j(ie,O.id,!0),j(D,!0)}}async function q(O){i()||(e(ie)===O&&j(D,!1),v()(O),await Cn(),(!document.activeElement||document.activeElement===document.body)&&e(S)?.querySelector("button:not(:disabled)")?.focus())}function F(O){const ye=a().find(pe=>pe.id===O);i()||!ye||!W(ye)||(j(D,!1),c()?c()(O):d()(O))}function ae(O,ye){O.key!=="Delete"||i()||(O.preventDefault(),O.stopPropagation(),q(ye))}function C(O){return O.status==="placing"||O.status==="failed"?!1:O.kind==="image"?!!O.file||W(O):O.kind==="clip"&&!O.recording&&!!O.url}function ee(O,ye){const pe=Ql()?O.metaKey:O.ctrlKey,A=O.key.toLowerCase();if(pe&&!O.shiftKey&&!O.altKey&&(A==="c"||A==="x")){if(!b()||!C(ye)||(O.preventDefault(),O.stopPropagation(),A==="x"&&i()))return;b()(ye.id,A==="x");return}ae(O,ye.id)}function le(O,ye){!k()||!C(ye)||(O.preventDefault(),k()(ye.id))}var me={get items(){return a()},set items(O){a(O),m()},get labels(){return o()},set labels(O){o(O),m()},get disabled(){return i()},set disabled(O=!1){i(O),m()},get onMarkUp(){return d()},set onMarkUp(O){d(O),m()},get onEdit(){return c()},set onEdit(O){c(O),m()},get onRemove(){return v()},set onRemove(O){v(O),m()},get onRetry(){return h()},set onRetry(O){h(O),m()},get onCopy(){return b()},set onCopy(O){b(O),m()},get onMenu(){return k()},set onMenu(O){k(O),m()},$set:St,$on:(O,ye)=>Tt(t,O,ye)},_e=Ku(),Re=xe(_e);{var Le=O=>{var ye=Wu();Tr(ye,21,()=>e(Y),pe=>pe.id,(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=P=>{var Q=Ou(),re=z(Q);{let G=s(()=>i()||e(A).status==="placing");ki(re,{get id(){return e(A).id},get name(){return e(A).file.name},get type(){return e(A).file.imageMimeType},get imageData(){return e(A).file.imageData},get imageMimeType(){return e(A).file.imageMimeType},variant:"thumbnail",thumbnailClass:"size-full",class:"size-full",get disabled(){return e(G)},get placementStatus(){return e(A).status},get placementError(){return e(A).error}})}var se=T(re,2);{var ce=G=>{var Ee=jo(),De=oe(Ee,!0);$(()=>{te(Ee,"data-failed",e(A).status==="failed"||void 0),te(Ee,"role",e(A).status==="failed"?"alert":"status"),te(Ee,"title",e(A).error),J(De,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(G,Ee)};B(se,G=>{e(A).status&&G(ce)})}var w=T(se,2),Se=z(w);{var Ae=G=>{Xe(G,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>h()?.(e(A).id),children:(Ee,De)=>{jt(Ee,{get icon(){return zs},size:16})},$$slots:{default:!0}})};B(Se,G=>{e(A).status==="failed"&&h()&&G(Ae)})}var L=T(Se,2);{let G=s(()=>f.chat_attachmentPreview_remove_ariaLabel({name:e(A).file.name}));n(L,()=>e(A).id,()=>e(G))}R(w),R(Q),$(()=>te(Q,"data-attachment-id",e(A).id)),Sr("keydown",Q,G=>ee(G,e(A))),Sr("contextmenu",Q,G=>le(G,e(A))),Kt(1,Q,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,Q,()=>ea,()=>({tier:"fast"})),u(P,Q)},Ce=P=>{const Q=s(()=>e(A).kind==="image"&&!W(e(A))&&e(A).status!=="failed");var re=zu(),se=z(re);{var ce=ve=>{Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile file",get"aria-label"(){return e(A).name},get disabled(){return i()},onkeydown:Oe=>ae(Oe,e(A).id),children:(Oe,U)=>{var ue=qu(),ot=xe(ue);jt(ot,{get icon(){return Tn},size:20});var xt=T(ot),mt=oe(xt,!0);$(()=>J(mt,e(A).name)),u(Oe,ue)},$$slots:{default:!0}})},w=ve=>{{let Oe=s(()=>E(e(A))),U=s(()=>i()||e(A).kind==="clip"&&(e(A).recording||!e(A).url));Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile",get"aria-label"(){return e(Oe)},get disabled(){return e(U)},onkeydown:ue=>ee(ue,e(A)),onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{var xt=Rt(),mt=xe(xt);{var Ft=je=>{var bt=Du();$(()=>te(bt,"src",e(A).url)),u(je,bt)},pt=je=>{var bt=Fu(),at=T(z(bt)),dt=oe(at,!0),$e=T(at);{var ft=K=>{var _=Bu(),he=oe(_,!0);$(()=>J(he,e(A).summary)),u(K,_)};B($e,K=>{e(A).summary&&K(ft)})}R(bt),$(()=>J(dt,e(A).duration)),u(je,bt)};B(mt,je=>{e(A).kind==="image"?je(Ft):je(pt,-1)})}u(ue,xt)},$$slots:{default:!0}})}},Se=s(()=>e(A).kind!=="image"||W(e(A)));B(se,ve=>{e(A).kind==="file"?ve(ce):e(Se)&&ve(w,1)})}var Ae=T(se,2);{var L=ve=>{var Oe=jo(),U=oe(Oe,!0);$(()=>{te(Oe,"data-failed",e(A).status==="failed"||void 0),te(Oe,"role",e(A).status==="failed"?"alert":"status"),te(Oe,"title",e(A).error),J(U,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(ve,Oe)};B(Ae,ve=>{(e(A).status||e(Q))&&ve(L)})}var G=T(Ae,2),Ee=z(G);{var De=ve=>{Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>h()?.(e(A).id),children:(Oe,U)=>{jt(Oe,{get icon(){return zs},size:16})},$$slots:{default:!0}})},Je=ve=>{{let Oe=s(()=>c()?o().edit:o().markUp),U=s(()=>c()?o().edit:o().markUp);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:()=>F(e(A).id),children:(ue,ot)=>{Ss(ue,{glyph:"pencil"})},$$slots:{default:!0}})}},Ge=s(()=>W(e(A))),Bt=ve=>{{let Oe=s(()=>c()?o().edit:o().play),U=s(()=>c()?o().edit:o().play);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{{let xt=s(()=>c()?"pencil":"play");Ss(ue,{get glyph(){return e(xt)}})}},$$slots:{default:!0}})}};B(Ee,ve=>{e(A).status==="failed"&&h()?ve(De):e(Ge)?ve(Je,1):e(A).kind==="clip"&&!e(A).recording&&e(A).url&&ve(Bt,2)})}var ke=T(Ee,2);n(ke,()=>e(A).id,()=>o().remove),R(G),R(re),$(()=>{te(re,"data-kind",e(A).kind),te(re,"data-attachment-id",e(A).id),te(re,"aria-busy",e(Q)||void 0)}),Sr("contextmenu",re,ve=>le(ve,e(A))),Kt(1,re,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,re,()=>ea,()=>({tier:"fast"})),u(P,re)};B(Te,P=>{e(A).kind==="image"&&e(A).file?P(Be):P(Ce,-1)})}u(pe,ge)}),R(ye),cn(ye,pe=>j(S,pe),()=>e(S)),$(()=>te(ye,"aria-label",o().attachments)),u(O,ye)};B(Re,O=>{e(Y).length&&O(Le)})}var Ke=T(Re,2);{const O=pe=>{var A=Rt(),ge=xe(A);{var Te=Be=>{var Ce=Hu(),P=xe(Ce);{var Q=w=>{Xe(w,{variant:"primary",get disabled(){return i()},onclick:()=>e(M)&&F(e(M).id),children:(Se,Ae)=>{gr();var L=Or();$(()=>J(L,o().markUp)),u(Se,L)},$$slots:{default:!0}})},re=s(()=>W(e(M)));B(P,w=>{e(re)&&w(Q)})}var se=T(P,2);Xe(se,{variant:"secondary",get disabled(){return i()},onclick:()=>e(M)&&q(e(M).id),children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().remove)),u(w,Ae)},$$slots:{default:!0}});var ce=T(se,2);Xe(ce,{variant:"ghost-light",onclick:()=>{j(D,!1)},children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().done)),u(w,Ae)},$$slots:{default:!0}}),u(Be,Ce)};B(ge,Be=>{e(M)&&e(M).kind!=="file"&&Be(Te)})}u(pe,A)};let ye=s(()=>e(M)?E(e(M)):o().attachments);xi(Ke,{get title(){return e(ye)},size:"wide",showCloseButton:!1,onCloseAutoFocus:pe=>{pe.preventDefault(),X?.isConnected?X.focus():e(S)?.querySelector("button:not(:disabled)")?.focus()},get open(){return e(D)},set open(pe){j(D,pe,!0)},footer:O,children:(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=Ce=>{var P=Vu(),Q=z(P);{var re=w=>{var Se=Uu();$(Ae=>{te(Se,"src",e(M).url),te(Se,"alt",Ae)},[()=>E(e(M))]),u(w,Se)},se=s(()=>e(M).kind==="image"&&W(e(M))),ce=w=>{var Se=ju();$(Ae=>{te(Se,"src",e(M).url),te(Se,"aria-label",Ae)},[()=>E(e(M))]),u(w,Se)};B(Q,w=>{e(se)?w(re):e(M).kind==="clip"&&e(M).url&&w(ce,1)})}R(P),u(Ce,P)};B(Te,Ce=>{e(M)&&e(M).kind!=="file"&&Ce(Be)})}u(pe,ge)},$$slots:{footer:!0,default:!0}})}return u(r,_e),At(me)}aa(["keydown","contextmenu"]);var Qu=I("<!> ",1),Zu=I('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function Vi(r,t){if(new.target)return It({component:Vi,...r});Ct(t,!0);let n=g(t,"name",7),a=g(t,"description",7),o=g(t,"content",7),i=g(t,"onUseScript",7),d=we(!1);function c(){navigator.clipboard.writeText(o()),j(d,!0),setTimeout(()=>{j(d,!1)},2e3)}function v(){i()?.({name:n(),description:a(),content:o()})}var h={get name(){return n()},set name(C){n(C),m()},get description(){return a()},set description(C){a(C),m()},get content(){return o()},set content(C){o(C),m()},get onUseScript(){return i()},set onUseScript(C){i(C),m()},$set:St,$on:(C,ee)=>Tt(t,C,ee)},b=Zu(),k=z(b),N=z(k),Y=z(N),S=z(Y);jt(S,{get icon(){return no},size:"sm"}),R(Y);var D=T(Y,2),ie=oe(D,!0);R(N);var X=T(N,2),M=z(X);Xe(M,{variant:"ghost-light",size:"sm",onclick:c,class:"h-7 px-2",children:(C,ee)=>{var le=Qu(),me=xe(le);{let Re=s(()=>e(d)?bi:wi);jt(me,{get icon(){return e(Re)},class:"mr-1"})}var _e=T(me);$(Re=>J(_e,` ${Re??""}`),[()=>e(d)?f.chat_shared_copied_label():f.chat_shared_copy_label()]),u(C,le)},$$slots:{default:!0}});var W=T(M,2);{var E=C=>{Xe(C,{variant:"ghost-light",size:"sm",onclick:v,class:"h-7 px-2",children:(ee,le)=>{gr();var me=Or();$(_e=>J(me,_e),[()=>f.chat_setupScriptCard_useScript_label()]),u(ee,me)},$$slots:{default:!0}})};B(W,C=>{i()&&C(E)})}R(X),R(k);var ne=T(k,2),q=oe(ne,!0),F=T(ne,2),ae=oe(F,!0);return R(b),$(()=>{J(ie,n()),J(q,a()),J(ae,o())}),u(r,b),At(h)}const wr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class Ju{constructor(){kn(this,"buffer","");kn(this,"currentToolName",null);kn(this,"currentToolId",null);kn(this,"lastToolId",null);kn(this,"currentToolParams",[]);kn(this,"currentToolResultContent",[]);kn(this,"inToolResult",!1);kn(this,"inCodeBlock",!1);kn(this,"codeBlockLanguage","");kn(this,"codeBlockContent","");kn(this,"characterBuffer","");kn(this,"inCharacterMode",!1);kn(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const o=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const c=this.currentToolResultContent.some(h=>h.startsWith("❌")||h.startsWith("Error:")),v=this.currentToolResultContent.map(h=>h.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
|
|
1
|
+
var $l=Object.defineProperty;var Ol=(r,t,n)=>t in r?$l(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var kn=(r,t,n)=>Ol(r,typeof t!="symbol"?t+"":t,n);import{t as It,br as g,a_ as B,bz as St,b as Tt,bp as f,bt as Kn,bv as dr,bu as ql,bs as ha}from"./CEL6QztG.js";import{ai as aa,bs as Ct,ca as sr,aD as e,bH as j,ay as xe,bS as T,a7 as Rt,W as u,a5 as z,bA as R,bn as At,c9 as s,bV as we,aA as m,b_ as $,aj as Sr,aB as I,be as gr,b$ as Or,bO as J,bf as or,c0 as Cn,bl as oe,bj as jn,c6 as Dl,bo as za,br as Yr,am as Dn,ax as Bn,bk as as,aw as va,bz as ss,cb as ms,c5 as Ha,aC as xr,cd as _o,bv as Bl}from"./DYhIMPy1.js";import{n as Tr,u as te,v as ze,g as _n,s as ps,w as _a,j as kt,l as ar,p as Yn,I as Fl,i as ya,r as zl,o as eo,X as _i,q as Wl,S as Hl,C as Ul}from"./yn6WWSq8.js";import{I as Kt,F as qa,c as ea,j as jl,s as yi,p as to,y as Vl,u as Kl,t as $r,g as oa,B as ws,E as os,S as Gl}from"./wwtnRh6M.js";import{b as cn}from"./BaIAhI85.js";import{f as Xe,bj as Ql,am as ro,bt as Zl,bx as xs,bL as Jl}from"./Cd_8r4jJ.js";import"./BAnLxjCI.js";import"./Bsy-6OEk.js";import"./BYddvidz.js";import{s as Ln}from"./CiSnSGvU.js";import{F as jt,a0 as zs,bc as Tn,cE as no,aq as bi,aV as wi,aG as Xl,c3 as Yl,a2 as is,aJ as ed,cH as td,cG as rd,$ as vs,as as ao,I as yo,af as nd,bp as ad,aO as sd,aT as od,bE as id,ak as ld,cw as dd,ay as bo,aL as wo,bW as ks,aE as Ua,cQ as cd,c5 as ud,bj as fd,b as gd,cj as md,ac as pd,b6 as Is,cl as xa,cz as vd,a as hd}from"./DnKg2UsP.js";import{c as xi,A as _d,x as yd}from"./BCF9Fm7Q.js";import{b as Ss,V as xo}from"./C6zJgX6A.js";import{a as ki,b2 as Pr,A as Ga,al as Ii,s as bd,n as Si,d as wd,I as xd,R as kd,au as Id,$ as Sd}from"./BgVKKIhh.js";import{bW as Ti,j as Qa,a5 as Ws,ak as ls,F as Td,at as Za,aM as Cd,aP as ko}from"./qS-FFtmP.js";import{t as ia,o as Ad}from"./WAMpa_Dp.js";import{c3 as Ja,aC as Da,cQ as Ci,cS as Vn,bU as hs,j as Md,cJ as Ai,cP as _s,cO as Mi,cM as Pi,g as Nn,aa as Pd,ab as Rd,ax as Ed,s as Nd,K as Ld,W as Io,v as Ri,dO as $d,at as Od,k as qd,u as Ts,a6 as Dd,n as Bd,O as Fd,o as zd,S as Wd,R as Hd,a0 as Ud,q as Ei,r as Ni,l as jd,cT as Vd,a4 as Kd,D as Gd,x as Qd,V as So}from"./Dml826jn.js";import{Ik as yt,oz as Zd,t5 as Xa,np as To,uT as Li,uV as $i,rl as Jd,xP as ds,ua as Oi,nk as qi,be as Ya,xQ as Xd,p$ as Yd,sC as ec,uM as Di,nj as tc,mq as rc,g as nc,yg as ac,yd as sc,yf as oc}from"./DYfeeu3f.js";import{a2 as ic,x as Cs,a0 as lc,O as As,V as dc,_ as cc,j as uc,o as ka,M as fa,p as fc,F as gc,u as mc,s as pc,L as Ms,J as vc,y as hc,K as _c,Z as Ma,Q as ja,N as Co,m as Ao,E as yc,c as Ps,B as Mo,z as bc,v as Po,H as Pa,P as wc,G as xc,i as kc,R as Ic,T as Sc,A as Tc,g as Cc,b as Ac,D as Mc,f as Pc,e as Rc,a as Ec,C as Nc,h as Lc,U as Bi,a3 as $c,t as Oc,k as qc,d as Ro}from"./ClyIJA-J.js";import{i as Dc,e as Bc}from"./CcXckLs7.js";import{g as Rs}from"./BvFAWM27.js";import{M as Ia,C as Ra}from"./62Ck3yAT.js";import{C as Eo}from"./C4twHGiQ.js";import"./ClsZKLeX.js";import{P as Fc}from"./DO-6xcR6.js";import"./DJuQfCSS.js";import{c as Fi}from"./ChTqQfQN.js";import{S as zc}from"./DwGXL-qt.js";import{D as No,M as Wc}from"./C9HiWs7H.js";import{b as Hc,s as na,c as cs}from"./81XDh255.js";import{O as es,y as Es,E as Ns,B as Ls,N as Uc,m as jc,l as Vc,d as us,C as Lo,f as Kc,e as Gc,g as Qc}from"./LyXMg8Qe.js";import{a as zi,s as $o}from"./BsieX9dN.js";import{f as Zc}from"./BdWqymET.js";import{c as dn}from"./CV0Fs-12.js";import{P as Jc}from"./CGjjowC8.js";import{p as $s,o as Os,y as Oo,h as Xc}from"./D2R9j_dh.js";import{R as Hs,C as ys,k as Yc,h as eu,g as tu,i as qo,P as ru}from"./Cn76YSbd.js";import"./D-Brs8OV.js";import{R as Do,x as Na,o as Wi}from"./QGl-Xn9g.js";import{B as nu}from"./CGSth7XF.js";import{o as Hi,r as au,e as su}from"./DYa_4kRY.js";import{o as Ui}from"./C4HlRcUf.js";import{g as so}from"./DR_tn5Kl.js";import{a as ou,M as iu}from"./B5PFzC2T.js";import{c as Sa}from"./B4USm-wY.js";import{A as lu}from"./DFZXcT7x.js";import{f as du,d as cu}from"./seqIFXVs.js";import{a8 as uu,N as fu,Y as gu,K as Bo,X as mu,v as pu}from"./Dq3t5TwZ.js";import{a as vu}from"./CC7to1B5.js";import{G as hu}from"./CuEQVba7.js";import{S as _u}from"./1hAIZvxV.js";import{u as yu,a as bu,c as Fo,S as wu}from"./DfxQWSVU.js";import{T as Us}from"./DZo9MSm2.js";import"./q1Qi1tRJ.js";import{g as xu}from"./DXDNvQ8c.js";import{a as ku}from"./Dbpx98ZW.js";import{b as Iu}from"./CbM8k2mZ.js";import{b as zo}from"./p7znhYIU.js";import{g as Su,i as Tu,a as Cu}from"./66MF_whg.js";import{n as Wo,o as Ho,b as ma,s as Ta,_ as qs,e as Au}from"./CIyUrgF0.js";import{aW as Un,B as Mu}from"./50HPeG9s.js";import{y as Pu}from"./T4aQylmi.js";import{c as Ru}from"./Ba_-F0B5.js";function Eu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c}=t;if(typeof n!="string"||typeof a!="string"||!a||typeof o!="string"||!o||typeof i!="string"||!i||typeof d!="string"||!d||c!=="finished"&&c!=="ttl-expired"&&c!=="output-match"&&c!=="line-count")return null;const v=t.trigger;return{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c,...c==="output-match"&&typeof v?.matchedLine=="string"?{matchedLine:v.matchedLine}:{}}}function Nu(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function Lu(r,t,n,a=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const o=r.messageMetadata?.fromPrincipalId??r.author?.principalId,i=uu(r)&&r.author?.principalId!==null&&o===t;return{edit:i,remove:i||t===n||a,sendNow:(i||a)&&!ji(r)}}function Ca(r,t){if(t)return r.find(n=>n.editing&&n.editingMessageId?n.editingMessageId===t:n.id===t)}function ji(r){return Nu(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function Uo(r,t=Date.now()){const n=r.messageMetadata,a=n?.fromPrincipalId,o=n&&Object.hasOwn(n,"humanAuthor")&&!(typeof a=="string"&&a.length>0),i=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!i&&!o&&!ji(r)}const j_="pl-3.5! pr-2!";var $u=I('<span class="tile-remove-slot svelte-d8pwpf"><!></span>'),jo=I('<span class="attachment-status svelte-d8pwpf"> </span>'),Ou=I('<div class="file-image tile svelte-d8pwpf" data-kind="file"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),qu=I("<!><span> </span>",1),Du=I('<img alt="" draggable="false"/>'),Bu=I('<span class="summary svelte-d8pwpf" data-clip-summary=""> </span>'),Fu=I('<span class="clip svelte-d8pwpf"><span class="record-dot svelte-d8pwpf" aria-hidden="true"></span><span class="duration svelte-d8pwpf"> </span><!></span>'),zu=I('<div class="tile svelte-d8pwpf"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),Wu=I('<div class="attachment-row svelte-d8pwpf" role="group" data-dock-media-attachments=""></div>'),Hu=I("<!> <!> <!>",1),Uu=I('<img draggable="false" class="svelte-d8pwpf"/>'),ju=I('<video controls="" playsinline="" class="svelte-d8pwpf"></video>',2),Vu=I('<div class="media-viewer svelte-d8pwpf"><!></div>'),Ku=I("<!> <!>",1);function Gu(r,t){if(new.target)return It({component:Gu,...r});Ct(t,!0);const n=(O,ye=or,pe=or)=>{var A=$u(),ge=z(A);Xe(ge,{variant:"secondary",size:"icon-sm",class:"tile-action tile-remove",get disabled(){return i()},get"aria-label"(){return pe()},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return pe()},onclick:()=>q(ye()),children:(Te,Be)=>{Ss(Te,{glyph:"x"})},$$slots:{default:!0}}),R(A),u(O,A)};let a=g(t,"items",7),o=g(t,"labels",7),i=g(t,"disabled",7,!1),d=g(t,"onMarkUp",7),c=g(t,"onEdit",7),v=g(t,"onRemove",7),h=g(t,"onRetry",7),b=g(t,"onCopy",7),k=g(t,"onMenu",7);const N=O=>O.owner==="attachment"?2:{image:0,clip:1,file:2}[O.kind],Y=s(()=>[...a()].sort((O,ye)=>N(O)-N(ye)));let S=we(null),D=we(!1),ie=we(null),X=null;const M=s(()=>a().find(O=>O.id===e(ie)));sr(()=>{(!e(M)||e(M).kind==="image"&&!W(e(M)))&&j(D,!1)});function W(O){return O.kind==="image"&&O.status!=="placing"&&O.status!=="failed"&&O.url.trim().length>0}function E(O){return O.kind==="image"?o().image(O.markCount):O.kind==="clip"?O.summary?`${o().clip(O.duration)} ${O.summary}`:o().clip(O.duration):O.name}function ne(O,ye){if(!(i()||O.kind==="file"||O.kind==="image"&&!W(O)||O.kind==="clip"&&(!O.url||O.recording))){if((O.kind==="clip"||O.kind==="image")&&c()){c()(O.id);return}X=ye,j(ie,O.id,!0),j(D,!0)}}async function q(O){i()||(e(ie)===O&&j(D,!1),v()(O),await Cn(),(!document.activeElement||document.activeElement===document.body)&&e(S)?.querySelector("button:not(:disabled)")?.focus())}function F(O){const ye=a().find(pe=>pe.id===O);i()||!ye||!W(ye)||(j(D,!1),c()?c()(O):d()(O))}function ae(O,ye){O.key!=="Delete"||i()||(O.preventDefault(),O.stopPropagation(),q(ye))}function C(O){return O.status==="placing"||O.status==="failed"?!1:O.kind==="image"?!!O.file||W(O):O.kind==="clip"&&!O.recording&&!!O.url}function ee(O,ye){const pe=Ql()?O.metaKey:O.ctrlKey,A=O.key.toLowerCase();if(pe&&!O.shiftKey&&!O.altKey&&(A==="c"||A==="x")){if(!b()||!C(ye)||(O.preventDefault(),O.stopPropagation(),A==="x"&&i()))return;b()(ye.id,A==="x");return}ae(O,ye.id)}function le(O,ye){!k()||!C(ye)||(O.preventDefault(),k()(ye.id))}var me={get items(){return a()},set items(O){a(O),m()},get labels(){return o()},set labels(O){o(O),m()},get disabled(){return i()},set disabled(O=!1){i(O),m()},get onMarkUp(){return d()},set onMarkUp(O){d(O),m()},get onEdit(){return c()},set onEdit(O){c(O),m()},get onRemove(){return v()},set onRemove(O){v(O),m()},get onRetry(){return h()},set onRetry(O){h(O),m()},get onCopy(){return b()},set onCopy(O){b(O),m()},get onMenu(){return k()},set onMenu(O){k(O),m()},$set:St,$on:(O,ye)=>Tt(t,O,ye)},_e=Ku(),Re=xe(_e);{var Le=O=>{var ye=Wu();Tr(ye,21,()=>e(Y),pe=>pe.id,(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=P=>{var Q=Ou(),re=z(Q);{let G=s(()=>i()||e(A).status==="placing");ki(re,{get id(){return e(A).id},get name(){return e(A).file.name},get type(){return e(A).file.imageMimeType},get imageData(){return e(A).file.imageData},get imageMimeType(){return e(A).file.imageMimeType},variant:"thumbnail",thumbnailClass:"size-full",class:"size-full",get disabled(){return e(G)},get placementStatus(){return e(A).status},get placementError(){return e(A).error}})}var se=T(re,2);{var ce=G=>{var Ee=jo(),De=oe(Ee,!0);$(()=>{te(Ee,"data-failed",e(A).status==="failed"||void 0),te(Ee,"role",e(A).status==="failed"?"alert":"status"),te(Ee,"title",e(A).error),J(De,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(G,Ee)};B(se,G=>{e(A).status&&G(ce)})}var w=T(se,2),Se=z(w);{var Ae=G=>{Xe(G,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>h()?.(e(A).id),children:(Ee,De)=>{jt(Ee,{get icon(){return zs},size:16})},$$slots:{default:!0}})};B(Se,G=>{e(A).status==="failed"&&h()&&G(Ae)})}var L=T(Se,2);{let G=s(()=>f.chat_attachmentPreview_remove_ariaLabel({name:e(A).file.name}));n(L,()=>e(A).id,()=>e(G))}R(w),R(Q),$(()=>te(Q,"data-attachment-id",e(A).id)),Sr("keydown",Q,G=>ee(G,e(A))),Sr("contextmenu",Q,G=>le(G,e(A))),Kt(1,Q,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,Q,()=>ea,()=>({tier:"fast"})),u(P,Q)},Ce=P=>{const Q=s(()=>e(A).kind==="image"&&!W(e(A))&&e(A).status!=="failed");var re=zu(),se=z(re);{var ce=ve=>{Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile file",get"aria-label"(){return e(A).name},get disabled(){return i()},onkeydown:Oe=>ae(Oe,e(A).id),children:(Oe,U)=>{var ue=qu(),ot=xe(ue);jt(ot,{get icon(){return Tn},size:20});var xt=T(ot),mt=oe(xt,!0);$(()=>J(mt,e(A).name)),u(Oe,ue)},$$slots:{default:!0}})},w=ve=>{{let Oe=s(()=>E(e(A))),U=s(()=>i()||e(A).kind==="clip"&&(e(A).recording||!e(A).url));Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile",get"aria-label"(){return e(Oe)},get disabled(){return e(U)},onkeydown:ue=>ee(ue,e(A)),onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{var xt=Rt(),mt=xe(xt);{var Ft=je=>{var bt=Du();$(()=>te(bt,"src",e(A).url)),u(je,bt)},pt=je=>{var bt=Fu(),at=T(z(bt)),dt=oe(at,!0),$e=T(at);{var ft=K=>{var _=Bu(),he=oe(_,!0);$(()=>J(he,e(A).summary)),u(K,_)};B($e,K=>{e(A).summary&&K(ft)})}R(bt),$(()=>J(dt,e(A).duration)),u(je,bt)};B(mt,je=>{e(A).kind==="image"?je(Ft):je(pt,-1)})}u(ue,xt)},$$slots:{default:!0}})}},Se=s(()=>e(A).kind!=="image"||W(e(A)));B(se,ve=>{e(A).kind==="file"?ve(ce):e(Se)&&ve(w,1)})}var Ae=T(se,2);{var L=ve=>{var Oe=jo(),U=oe(Oe,!0);$(()=>{te(Oe,"data-failed",e(A).status==="failed"||void 0),te(Oe,"role",e(A).status==="failed"?"alert":"status"),te(Oe,"title",e(A).error),J(U,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(ve,Oe)};B(Ae,ve=>{(e(A).status||e(Q))&&ve(L)})}var G=T(Ae,2),Ee=z(G);{var De=ve=>{Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>h()?.(e(A).id),children:(Oe,U)=>{jt(Oe,{get icon(){return zs},size:16})},$$slots:{default:!0}})},Je=ve=>{{let Oe=s(()=>c()?o().edit:o().markUp),U=s(()=>c()?o().edit:o().markUp);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:()=>F(e(A).id),children:(ue,ot)=>{Ss(ue,{glyph:"pencil"})},$$slots:{default:!0}})}},Ge=s(()=>W(e(A))),Bt=ve=>{{let Oe=s(()=>c()?o().edit:o().play),U=s(()=>c()?o().edit:o().play);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{{let xt=s(()=>c()?"pencil":"play");Ss(ue,{get glyph(){return e(xt)}})}},$$slots:{default:!0}})}};B(Ee,ve=>{e(A).status==="failed"&&h()?ve(De):e(Ge)?ve(Je,1):e(A).kind==="clip"&&!e(A).recording&&e(A).url&&ve(Bt,2)})}var ke=T(Ee,2);n(ke,()=>e(A).id,()=>o().remove),R(G),R(re),$(()=>{te(re,"data-kind",e(A).kind),te(re,"data-attachment-id",e(A).id),te(re,"aria-busy",e(Q)||void 0)}),Sr("contextmenu",re,ve=>le(ve,e(A))),Kt(1,re,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,re,()=>ea,()=>({tier:"fast"})),u(P,re)};B(Te,P=>{e(A).kind==="image"&&e(A).file?P(Be):P(Ce,-1)})}u(pe,ge)}),R(ye),cn(ye,pe=>j(S,pe),()=>e(S)),$(()=>te(ye,"aria-label",o().attachments)),u(O,ye)};B(Re,O=>{e(Y).length&&O(Le)})}var Ke=T(Re,2);{const O=pe=>{var A=Rt(),ge=xe(A);{var Te=Be=>{var Ce=Hu(),P=xe(Ce);{var Q=w=>{Xe(w,{variant:"primary",get disabled(){return i()},onclick:()=>e(M)&&F(e(M).id),children:(Se,Ae)=>{gr();var L=Or();$(()=>J(L,o().markUp)),u(Se,L)},$$slots:{default:!0}})},re=s(()=>W(e(M)));B(P,w=>{e(re)&&w(Q)})}var se=T(P,2);Xe(se,{variant:"secondary",get disabled(){return i()},onclick:()=>e(M)&&q(e(M).id),children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().remove)),u(w,Ae)},$$slots:{default:!0}});var ce=T(se,2);Xe(ce,{variant:"ghost-light",onclick:()=>{j(D,!1)},children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().done)),u(w,Ae)},$$slots:{default:!0}}),u(Be,Ce)};B(ge,Be=>{e(M)&&e(M).kind!=="file"&&Be(Te)})}u(pe,A)};let ye=s(()=>e(M)?E(e(M)):o().attachments);xi(Ke,{get title(){return e(ye)},size:"wide",showCloseButton:!1,onCloseAutoFocus:pe=>{pe.preventDefault(),X?.isConnected?X.focus():e(S)?.querySelector("button:not(:disabled)")?.focus()},get open(){return e(D)},set open(pe){j(D,pe,!0)},footer:O,children:(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=Ce=>{var P=Vu(),Q=z(P);{var re=w=>{var Se=Uu();$(Ae=>{te(Se,"src",e(M).url),te(Se,"alt",Ae)},[()=>E(e(M))]),u(w,Se)},se=s(()=>e(M).kind==="image"&&W(e(M))),ce=w=>{var Se=ju();$(Ae=>{te(Se,"src",e(M).url),te(Se,"aria-label",Ae)},[()=>E(e(M))]),u(w,Se)};B(Q,w=>{e(se)?w(re):e(M).kind==="clip"&&e(M).url&&w(ce,1)})}R(P),u(Ce,P)};B(Te,Ce=>{e(M)&&e(M).kind!=="file"&&Ce(Be)})}u(pe,ge)},$$slots:{footer:!0,default:!0}})}return u(r,_e),At(me)}aa(["keydown","contextmenu"]);var Qu=I("<!> ",1),Zu=I('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function Vi(r,t){if(new.target)return It({component:Vi,...r});Ct(t,!0);let n=g(t,"name",7),a=g(t,"description",7),o=g(t,"content",7),i=g(t,"onUseScript",7),d=we(!1);function c(){navigator.clipboard.writeText(o()),j(d,!0),setTimeout(()=>{j(d,!1)},2e3)}function v(){i()?.({name:n(),description:a(),content:o()})}var h={get name(){return n()},set name(C){n(C),m()},get description(){return a()},set description(C){a(C),m()},get content(){return o()},set content(C){o(C),m()},get onUseScript(){return i()},set onUseScript(C){i(C),m()},$set:St,$on:(C,ee)=>Tt(t,C,ee)},b=Zu(),k=z(b),N=z(k),Y=z(N),S=z(Y);jt(S,{get icon(){return no},size:"sm"}),R(Y);var D=T(Y,2),ie=oe(D,!0);R(N);var X=T(N,2),M=z(X);Xe(M,{variant:"ghost-light",size:"sm",onclick:c,class:"h-7 px-2",children:(C,ee)=>{var le=Qu(),me=xe(le);{let Re=s(()=>e(d)?bi:wi);jt(me,{get icon(){return e(Re)},class:"mr-1"})}var _e=T(me);$(Re=>J(_e,` ${Re??""}`),[()=>e(d)?f.chat_shared_copied_label():f.chat_shared_copy_label()]),u(C,le)},$$slots:{default:!0}});var W=T(M,2);{var E=C=>{Xe(C,{variant:"ghost-light",size:"sm",onclick:v,class:"h-7 px-2",children:(ee,le)=>{gr();var me=Or();$(_e=>J(me,_e),[()=>f.chat_setupScriptCard_useScript_label()]),u(ee,me)},$$slots:{default:!0}})};B(W,C=>{i()&&C(E)})}R(X),R(k);var ne=T(k,2),q=oe(ne,!0),F=T(ne,2),ae=oe(F,!0);return R(b),$(()=>{J(ie,n()),J(q,a()),J(ae,o())}),u(r,b),At(h)}const wr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class Ju{constructor(){kn(this,"buffer","");kn(this,"currentToolName",null);kn(this,"currentToolId",null);kn(this,"lastToolId",null);kn(this,"currentToolParams",[]);kn(this,"currentToolResultContent",[]);kn(this,"inToolResult",!1);kn(this,"inCodeBlock",!1);kn(this,"codeBlockLanguage","");kn(this,"codeBlockContent","");kn(this,"characterBuffer","");kn(this,"inCharacterMode",!1);kn(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const o=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const c=this.currentToolResultContent.some(h=>h.startsWith("❌")||h.startsWith("Error:")),v=this.currentToolResultContent.map(h=>h.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
|
|
2
2
|
`);o.push({type:"tool_result",content:v,metadata:{toolId:this.currentToolId,isError:c}}),this.lastToolId=this.currentToolId,this.currentToolId=null,this.inToolResult=!1,this.currentToolResultContent=[]}const i=t.indexOf("🤖"),d=t.substring(i+2);if(this.inCharacterMode=!0,this.characterBuffer="",d&&d.trim()&&d!==`
|
|
3
3
|
`){const c=d.replace(/^\n/,"");c&&(this.characterBuffer=c)}return o}if(this.inCharacterMode){if(t.trim()===""&&this.characterBuffer==="")return[];if(t.includes(`
|
|
4
4
|
`)&&this.characterBuffer.length>0){const o=t.substring(0,t.indexOf(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Ni}from"./
|
|
1
|
+
import{g as Ni}from"./BSt9DnIU.js";import{s as Ci}from"./BmVaEhYz.js";import{U as Zs,aZ as jt,V as Qs,a_ as Gt,Y as bi,b0 as vi,b as h,aU as je,ay as _i,X as en,a1 as xi,aP as Mi,bh as wi,aV as Ui,r as Pi,O as Di,am as Fi,W as Bi,ab as $i,aG as ji,aA as Gi,aW as Wi}from"./C9HiWs7H.js";function Wt(s){console&&console.error&&console.error(`Error: ${s}`)}function tn(s){console&&console.warn&&console.warn(`Warning: ${s}`)}function sn(s){const e=new Date().getTime(),t=s();return{time:new Date().getTime()-e,value:t}}function nn(s){function e(){}e.prototype=s;const t=new e;function n(){return typeof t.bar}return n(),n(),s}function Ki(s){return Vi(s)?s.LABEL:s.name}function Vi(s){return typeof s.LABEL=="string"&&s.LABEL!==""}class te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}}class K extends te{constructor(e){super([]),this.idx=1,Object.assign(this,ie(e))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class _e extends te{constructor(e){super(e.definition),this.orgText="",Object.assign(this,ie(e))}}class W extends te{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,ie(e))}}class G extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class se extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class ne extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class M extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class q extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class Z extends te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,ie(e))}}class k{constructor(e){this.idx=1,Object.assign(this,ie(e))}accept(e){e.visit(this)}}function zi(s){return s.map(at)}function at(s){function e(t){return t.map(at)}if(s instanceof K){const t={type:"NonTerminal",name:s.nonTerminalName,idx:s.idx};return typeof s.label=="string"&&(t.label=s.label),t}else{if(s instanceof W)return{type:"Alternative",definition:e(s.definition)};if(s instanceof G)return{type:"Option",idx:s.idx,definition:e(s.definition)};if(s instanceof se)return{type:"RepetitionMandatory",idx:s.idx,definition:e(s.definition)};if(s instanceof ne)return{type:"RepetitionMandatoryWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof q)return{type:"RepetitionWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof M)return{type:"Repetition",idx:s.idx,definition:e(s.definition)};if(s instanceof Z)return{type:"Alternation",idx:s.idx,definition:e(s.definition)};if(s instanceof k){const t={type:"Terminal",name:s.terminalType.name,label:Ki(s.terminalType),idx:s.idx};typeof s.label=="string"&&(t.terminalLabel=s.label);const n=s.terminalType.PATTERN;return s.terminalType.PATTERN&&(t.pattern=n instanceof RegExp?n.source:n),t}else{if(s instanceof _e)return{type:"Rule",name:s.name,orgText:s.orgText,definition:e(s.definition)};throw Error("non exhaustive match")}}}function ie(s){return Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0))}class xe{visit(e){const t=e;switch(t.constructor){case K:return this.visitNonTerminal(t);case W:return this.visitAlternative(t);case G:return this.visitOption(t);case se:return this.visitRepetitionMandatory(t);case ne:return this.visitRepetitionMandatoryWithSeparator(t);case q:return this.visitRepetitionWithSeparator(t);case M:return this.visitRepetition(t);case Z:return this.visitAlternation(t);case k:return this.visitTerminal(t);case _e:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Hi(s){return s instanceof W||s instanceof G||s instanceof M||s instanceof se||s instanceof ne||s instanceof q||s instanceof k||s instanceof _e}function Tt(s,e=[]){return s instanceof G||s instanceof M||s instanceof q?!0:s instanceof Z?s.definition.some(n=>Tt(n,e)):s instanceof K&&e.includes(s)?!1:s instanceof te?(s instanceof K&&e.push(s),s.definition.every(n=>Tt(n,e))):!1}function Xi(s){return s instanceof Z}function ee(s){if(s instanceof K)return"SUBRULE";if(s instanceof G)return"OPTION";if(s instanceof Z)return"OR";if(s instanceof se)return"AT_LEAST_ONE";if(s instanceof ne)return"AT_LEAST_ONE_SEP";if(s instanceof q)return"MANY_SEP";if(s instanceof M)return"MANY";if(s instanceof k)return"CONSUME";throw Error("non exhaustive match")}class kt{walk(e,t=[]){e.definition.forEach((n,i)=>{const a=e.definition.slice(i+1);if(n instanceof K)this.walkProdRef(n,a,t);else if(n instanceof k)this.walkTerminal(n,a,t);else if(n instanceof W)this.walkFlat(n,a,t);else if(n instanceof G)this.walkOption(n,a,t);else if(n instanceof se)this.walkAtLeastOne(n,a,t);else if(n instanceof ne)this.walkAtLeastOneSep(n,a,t);else if(n instanceof q)this.walkManySep(n,a,t);else if(n instanceof M)this.walkMany(n,a,t);else if(n instanceof Z)this.walkOr(n,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const i=t.concat(n);this.walk(e,i)}walkOption(e,t,n){const i=t.concat(n);this.walk(e,i)}walkAtLeastOne(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkAtLeastOneSep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkMany(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkManySep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkOr(e,t,n){const i=t.concat(n);e.definition.forEach(a=>{const r=new W({definition:[a]});this.walk(r,i)})}}function ys(s,e,t){return[new G({definition:[new k({terminalType:s.separator})].concat(s.definition)})].concat(e,t)}function Je(s){if(s instanceof K)return Je(s.referencedRule);if(s instanceof k)return qi(s);if(Hi(s))return Yi(s);if(Xi(s))return Ji(s);throw Error("non exhaustive match")}function Yi(s){let e=[];const t=s.definition;let n=0,i=t.length>n,a,r=!0;for(;i&&r;)a=t[n],r=Tt(a),e=e.concat(Je(a)),n=n+1,i=t.length>n;return[...new Set(e)]}function Ji(s){const e=s.definition.map(t=>Je(t));return[...new Set(e.flat())]}function qi(s){return[s.terminalType]}const an="_~IN~_";class Zi extends kt{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const i=ea(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),r=new W({definition:a}),l=Je(r);this.follows[i]=l}}function Qi(s){const e={};return s.forEach(t=>{const n=new Zi(t).startWalking();Object.assign(e,n)}),e}function ea(s,e){return s.name+e+an}function S(s){return s.charCodeAt(0)}function Pt(s,e){Array.isArray(s)?s.forEach(function(t){e.push(t)}):e.push(s)}function Fe(s,e){if(s[e]===!0)throw"duplicate flag "+e;s[e],s[e]=!0}function Se(s){if(s===void 0)throw Error("Internal Error - Should never get here!");return!0}function ta(){throw Error("Internal Error - Should never get here!")}function Rs(s){return s.type==="Character"}const gt=[];for(let s=S("0");s<=S("9");s++)gt.push(s);const At=[S("_")].concat(gt);for(let s=S("a");s<=S("z");s++)At.push(s);for(let s=S("A");s<=S("Z");s++)At.push(s);const Os=[S(" "),S("\f"),S(`
|
|
2
2
|
`),S("\r"),S(" "),S("\v"),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S("\u2028"),S("\u2029"),S(" "),S(" "),S(" "),S("\uFEFF")],sa=/[0-9a-fA-F]/,tt=/[0-9]/,na=/[1-9]/;class ia{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Fe(n,"global");break;case"i":Fe(n,"ignoreCase");break;case"m":Fe(n,"multiLine");break;case"u":Fe(n,"unicode");break;case"y":Fe(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Se(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return ta()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),t={atLeast:i,atMost:a}):t={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Se(t);break}if(!(e===!0&&t===void 0)&&Se(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Se(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[S(`
|
|
3
3
|
`),S("\r"),S("\u2028"),S("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=gt;break;case"D":e=gt,t=!0;break;case"s":e=Os;break;case"S":e=Os,t=!0;break;case"w":e=At;break;case"W":e=At,t=!0;break}if(Se(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=S("\f");break;case"n":e=S(`
|
|
4
4
|
`);break;case"r":e=S("\r");break;case"t":e=S(" ");break;case"v":e=S("\v");break}if(Se(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:S("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:S(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|