@dylanpiercey/work 0.0.48 → 0.0.49
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/dist/_B1U5NJd1.js +2 -0
- package/dist/{_CO83dVER.js → _Bi2N56tu.js} +60 -57
- package/dist/{_Hz_qlZE1.js → _DPQxTPYF.js} +58 -58
- package/dist/{_m3ryV1w6.js → _DdgmjMNU.js} +15 -15
- package/dist/index.mjs +3996 -3682
- package/dist/public/assets/{_B2fn4I8S2.js → _4zqifGZf2.js} +1 -1
- package/dist/public/assets/_4zqifGZf2.js.br +0 -0
- package/dist/public/assets/{_BbW3-3ve.js → _8D88iC2Y.js} +1 -1
- package/dist/public/assets/_8D88iC2Y.js.br +0 -0
- package/dist/public/assets/{_CHqTBuzz2.js → _B-7M0VuK2.js} +1 -1
- package/dist/public/assets/_B-7M0VuK2.js.br +0 -0
- package/dist/public/assets/{_BLjOZLxk.js → _B-XihPlt.js} +1 -1
- package/dist/public/assets/_B-XihPlt.js.br +0 -0
- package/dist/public/assets/{_DOpT45mO.js → _B01yJM_n.js} +1 -1
- package/dist/public/assets/_B01yJM_n.js.br +0 -0
- package/dist/public/assets/{_DHvVwuPu2.js → _B3dWhBsL2.js} +1 -1
- package/dist/public/assets/_B3dWhBsL2.js.br +0 -0
- package/dist/public/assets/{_Bg9mkw0u.js → _B6JLzfQk.js} +1 -1
- package/dist/public/assets/_B6JLzfQk.js.br +0 -0
- package/dist/public/assets/{_CObQoJCq.js → _B92xkQnk.js} +1 -1
- package/dist/public/assets/_B92xkQnk.js.br +0 -0
- package/dist/public/assets/{_h8qSl3Me.js → _B9STxcPh.js} +1 -1
- package/dist/public/assets/{_CQDBqJkT.js → _BH7cFvM5.js} +1 -1
- package/dist/public/assets/_BH7cFvM5.js.br +0 -0
- package/dist/public/assets/{_BeSgyXoy2.js → _BP2BHaYT2.js} +1 -1
- package/dist/public/assets/_BP2BHaYT2.js.br +0 -0
- package/dist/public/assets/{_DAfu0wMa.js → _BPmHfnJD.js} +1 -1
- package/dist/public/assets/_BPmHfnJD.js.br +0 -0
- package/dist/public/assets/{_BdbnwCKs2.js → _BRURAzLu2.js} +1 -1
- package/dist/public/assets/_BRURAzLu2.js.br +0 -0
- package/dist/public/assets/{_De7fhQUT.js → _BUhKc7uT.js} +1 -1
- package/dist/public/assets/_BUhKc7uT.js.br +0 -0
- package/dist/public/assets/{_1oYv4fmY2.js → _BX76n7oq2.js} +1 -1
- package/dist/public/assets/_BX76n7oq2.js.br +0 -0
- package/dist/public/assets/{_DBn74psf2.js → _BYn0odAU2.js} +1 -1
- package/dist/public/assets/{_Ced5468N2.js → _BZDb9Hzx2.js} +1 -1
- package/dist/public/assets/{_ClEKr0Tm2.js → _B_Wegq962.js} +1 -1
- package/dist/public/assets/_B_Wegq962.js.br +0 -0
- package/dist/public/assets/{_CASsRCtt.js → _Bb4a7oF1.js} +1 -1
- package/dist/public/assets/_Bb4a7oF1.js.br +0 -0
- package/dist/public/assets/{_B-MMW3nb2.js → _BhAegdMF2.js} +1 -1
- package/dist/public/assets/_BhAegdMF2.js.br +0 -0
- package/dist/public/assets/{_BbMkV19p2.js → _BlPl6sCu2.js} +1 -1
- package/dist/public/assets/_BlPl6sCu2.js.br +0 -0
- package/dist/public/assets/{_DLFnXIrG2.js → _BmEd20O42.js} +1 -1
- package/dist/public/assets/_BmEd20O42.js.br +0 -0
- package/dist/public/assets/{_B49r6O_E.js → _BpxZLi8K.js} +1 -1
- package/dist/public/assets/_BpxZLi8K.js.br +0 -0
- package/dist/public/assets/{_CtErcdf92.js → _BrNzM4EC2.js} +1 -1
- package/dist/public/assets/_BrNzM4EC2.js.br +0 -0
- package/dist/public/assets/{_Ez06j6Qv.js → _Bvgyberk.js} +1 -1
- package/dist/public/assets/_Bvgyberk.js.br +0 -0
- package/dist/public/assets/{_BFt-jSq-.js → _ByKU0Hfi.js} +1 -1
- package/dist/public/assets/_ByKU0Hfi.js.br +0 -0
- package/dist/public/assets/{_Bhnzfac_.js → _ByaG8bWs.js} +1 -1
- package/dist/public/assets/_ByaG8bWs.js.br +0 -0
- package/dist/public/assets/{_DgmBuYFG2.js → _BziqIADV2.js} +1 -1
- package/dist/public/assets/_BziqIADV2.js.br +0 -0
- package/dist/public/assets/{_1cz-l3Ka.js → _C2-Kd826.js} +1 -1
- package/dist/public/assets/_C2-Kd826.js.br +0 -0
- package/dist/public/assets/{_DBN8F3s1.js → _C2rSDO7f.js} +1 -1
- package/dist/public/assets/_C2rSDO7f.js.br +0 -0
- package/dist/public/assets/{_ByiODT9w.js → _C6jAYlE8.js} +1 -1
- package/dist/public/assets/_C6jAYlE8.js.br +0 -0
- package/dist/public/assets/{_cRLLpjIg.js → _C9E3fz2-.js} +1 -1
- package/dist/public/assets/_C9E3fz2-.js.br +0 -0
- package/dist/public/assets/{_yQJK428k.js → _C9hmrTBV.js} +1 -1
- package/dist/public/assets/_C9hmrTBV.js.br +0 -0
- package/dist/public/assets/{_DLK0WouR.js → _CMGqtmQt.js} +1 -1
- package/dist/public/assets/_CMGqtmQt.js.br +0 -0
- package/dist/public/assets/{_DFOnuGNp.js → _CNxYMMPa.js} +1 -1
- package/dist/public/assets/_CNxYMMPa.js.br +0 -0
- package/dist/public/assets/{_BRzL7uNP.js → _CRmHsbsL.js} +1 -1
- package/dist/public/assets/_CRmHsbsL.js.br +0 -0
- package/dist/public/assets/{_kv39JOeM.js → _CVQKEVHV.js} +1 -1
- package/dist/public/assets/_CVQKEVHV.js.br +0 -0
- package/dist/public/assets/{_BiEWaww7.js → _Cci4ZExC.js} +1 -1
- package/dist/public/assets/_Cci4ZExC.js.br +0 -0
- package/dist/public/assets/{_Bm-lmvlM.js → _CgnZDJPL.js} +1 -1
- package/dist/public/assets/_CgnZDJPL.js.br +0 -0
- package/dist/public/assets/{_BGyMoPGj2.js → _CkeutYnJ2.js} +1 -1
- package/dist/public/assets/_CkeutYnJ2.js.br +0 -0
- package/dist/public/assets/{_DKnLFVdw.js → _D0L-Bq8g.js} +1 -1
- package/dist/public/assets/_D0L-Bq8g.js.br +0 -0
- package/dist/public/assets/{_DLLEkkcM.js → _D48HGWNS.js} +5 -5
- package/dist/public/assets/_D48HGWNS.js.br +0 -0
- package/dist/public/assets/{_Dn4wMX5v.js → _D4J5RQqK.js} +1 -1
- package/dist/public/assets/_D4J5RQqK.js.br +0 -0
- package/dist/public/assets/{_Cf0wSsqE.js → _D6xeqZLn.js} +1 -1
- package/dist/public/assets/_D6xeqZLn.js.br +0 -0
- package/dist/public/assets/{_CIeZtXbg2.js → _D7TvcnuF2.js} +1 -1
- package/dist/public/assets/_D7TvcnuF2.js.br +0 -0
- package/dist/public/assets/{_Bpdzs0h4.js → _D99Y49OA.js} +1 -1
- package/dist/public/assets/_D99Y49OA.js.br +0 -0
- package/dist/public/assets/{_CUwAZxRw.js → _D9jhO9rQ.js} +1 -1
- package/dist/public/assets/_D9jhO9rQ.js.br +0 -0
- package/dist/public/assets/{_KjztUkjx.js → _DBzS4J_k.js} +1 -1
- package/dist/public/assets/_DBzS4J_k.js.br +0 -0
- package/dist/public/assets/{_CbMNS899.js → _DDsFYxIq.js} +1 -1
- package/dist/public/assets/_DDsFYxIq.js.br +0 -0
- package/dist/public/assets/{_o1of2_lP.js → _DIiEy_VP.js} +1 -1
- package/dist/public/assets/_DIiEy_VP.js.br +0 -0
- package/dist/public/assets/{_K6PNL3j4.js → _DImQNomk.js} +1 -1
- package/dist/public/assets/_DImQNomk.js.br +0 -0
- package/dist/public/assets/{_BhUM9ZCP.js → _DRRQXGKH.js} +1 -1
- package/dist/public/assets/_DRRQXGKH.js.br +0 -0
- package/dist/public/assets/{_DsJkMBKU2.js → _DZ0pRMJN2.js} +1 -1
- package/dist/public/assets/_DZ0pRMJN2.js.br +0 -0
- package/dist/public/assets/{_9yP8iK4t2.js → _DbkjWa7i2.js} +1 -1
- package/dist/public/assets/_DbkjWa7i2.js.br +0 -0
- package/dist/public/assets/{_I6H6F0ME.js → _DjKQr6mH.js} +1 -1
- package/dist/public/assets/_DjKQr6mH.js.br +0 -0
- package/dist/public/assets/{_CsNJf4g52.js → _Dji7sUrK2.js} +1 -1
- package/dist/public/assets/_Dji7sUrK2.js.br +0 -0
- package/dist/public/assets/{_CH4P29Yf2.js → _DkMIDB1P2.js} +1 -1
- package/dist/public/assets/_DkMIDB1P2.js.br +0 -0
- package/dist/public/assets/{_BqeAAcor.js → _DlC4k_XP.js} +1 -1
- package/dist/public/assets/_DlC4k_XP.js.br +0 -0
- package/dist/public/assets/{_DVPPxo4e2.js → _DljpB8742.js} +1 -1
- package/dist/public/assets/_DljpB8742.js.br +0 -0
- package/dist/public/assets/{_qoSWRJiT.js → _DlsPVtFC.js} +1 -1
- package/dist/public/assets/_DlsPVtFC.js.br +0 -0
- package/dist/public/assets/{_DT9Qs1il.js → _Dmw0DArq.js} +1 -1
- package/dist/public/assets/_Dmw0DArq.js.br +0 -0
- package/dist/public/assets/{_KVpYyL9A.js → _DyNwE1Gc.js} +1 -1
- package/dist/public/assets/_DyNwE1Gc.js.br +0 -0
- package/dist/public/assets/{_FCV34uHN.js → _F3u8qQ9y.js} +1 -1
- package/dist/public/assets/_F3u8qQ9y.js.br +0 -0
- package/dist/public/assets/{_8nx9Raqx2.js → _HH6t8aRM2.js} +1 -1
- package/dist/public/assets/_HH6t8aRM2.js.br +0 -0
- package/dist/public/assets/{_Bvwr3uff.js → _JYBrvu87.js} +1 -1
- package/dist/public/assets/_JYBrvu87.js.br +0 -0
- package/dist/public/assets/{_BBW7mJhZ.js → _Kzpu52En.js} +1 -1
- package/dist/public/assets/_Kzpu52En.js.br +0 -0
- package/dist/public/assets/{_Q6y5EfU1.js → _UWZzN8Rg.js} +1 -1
- package/dist/public/assets/_UWZzN8Rg.js.br +0 -0
- package/dist/public/assets/{_C4NK2Cq5.js → _YLPBpmu6.js} +1 -1
- package/dist/public/assets/_YLPBpmu6.js.br +0 -0
- package/dist/public/assets/{_BC2FBUbj.js → _f4yPg-i-.js} +1 -1
- package/dist/public/assets/_f4yPg-i-.js.br +0 -0
- package/dist/public/assets/{_3i592Qvz2.js → _lBeubFtN2.js} +1 -1
- package/dist/public/assets/_lBeubFtN2.js.br +0 -0
- package/dist/public/assets/{_BV-nVD9L2.js → _llnipctq2.js} +1 -1
- package/dist/public/assets/_llnipctq2.js.br +0 -0
- package/dist/public/assets/{_BPLnh5S4.js → _sBNm9tCS.js} +1 -1
- package/dist/public/assets/_sBNm9tCS.js.br +0 -0
- package/dist/public/assets/{_DjLQQUoq.js → _u3et6kdz.js} +1 -1
- package/dist/public/assets/_u3et6kdz.js.br +0 -0
- package/dist/public/assets/{_CUqlR7rP.js → _v4TxGuxE.js} +1 -1
- package/dist/public/assets/_v4TxGuxE.js.br +0 -0
- package/dist/public/assets/{_BPFJiBiE.js → _wvTh271a.js} +1 -1
- package/dist/public/assets/_wvTh271a.js.br +0 -0
- package/dist/public/assets/diff-view-CKEylX6w.css +1 -0
- package/dist/public/assets/diff-view-CKEylX6w.css.br +0 -0
- package/dist/public/assets/index-Bfh8nSee.js +85 -0
- package/dist/public/assets/index-Bfh8nSee.js.br +0 -0
- package/dist/public/assets/index-D41huIuZ.css +1 -0
- package/dist/public/assets/index-D41huIuZ.css.br +0 -0
- package/package.json +1 -1
- package/dist/_DjrRGy4k.js +0 -2
- package/dist/public/assets/_1cz-l3Ka.js.br +0 -0
- package/dist/public/assets/_1oYv4fmY2.js.br +0 -0
- package/dist/public/assets/_3i592Qvz2.js.br +0 -0
- package/dist/public/assets/_8nx9Raqx2.js.br +0 -0
- package/dist/public/assets/_9yP8iK4t2.js.br +0 -0
- package/dist/public/assets/_B-MMW3nb2.js.br +0 -0
- package/dist/public/assets/_B2fn4I8S2.js.br +0 -0
- package/dist/public/assets/_B49r6O_E.js.br +0 -0
- package/dist/public/assets/_BBW7mJhZ.js.br +0 -0
- package/dist/public/assets/_BC2FBUbj.js.br +0 -0
- package/dist/public/assets/_BFt-jSq-.js.br +0 -0
- package/dist/public/assets/_BGyMoPGj2.js.br +0 -0
- package/dist/public/assets/_BLjOZLxk.js.br +0 -0
- package/dist/public/assets/_BPFJiBiE.js.br +0 -0
- package/dist/public/assets/_BPLnh5S4.js.br +0 -0
- package/dist/public/assets/_BRzL7uNP.js.br +0 -0
- package/dist/public/assets/_BV-nVD9L2.js.br +0 -0
- package/dist/public/assets/_BbMkV19p2.js.br +0 -0
- package/dist/public/assets/_BbW3-3ve.js.br +0 -0
- package/dist/public/assets/_BdbnwCKs2.js.br +0 -0
- package/dist/public/assets/_BeSgyXoy2.js.br +0 -0
- package/dist/public/assets/_Bg9mkw0u.js.br +0 -0
- package/dist/public/assets/_BhUM9ZCP.js.br +0 -0
- package/dist/public/assets/_Bhnzfac_.js.br +0 -0
- package/dist/public/assets/_BiEWaww7.js.br +0 -0
- package/dist/public/assets/_Bm-lmvlM.js.br +0 -0
- package/dist/public/assets/_Bpdzs0h4.js.br +0 -0
- package/dist/public/assets/_BqeAAcor.js.br +0 -0
- package/dist/public/assets/_Bvwr3uff.js.br +0 -0
- package/dist/public/assets/_ByiODT9w.js.br +0 -0
- package/dist/public/assets/_C4NK2Cq5.js.br +0 -0
- package/dist/public/assets/_CASsRCtt.js.br +0 -0
- package/dist/public/assets/_CH4P29Yf2.js.br +0 -0
- package/dist/public/assets/_CHqTBuzz2.js.br +0 -0
- package/dist/public/assets/_CIeZtXbg2.js.br +0 -0
- package/dist/public/assets/_CObQoJCq.js.br +0 -0
- package/dist/public/assets/_CQDBqJkT.js.br +0 -0
- package/dist/public/assets/_CUqlR7rP.js.br +0 -0
- package/dist/public/assets/_CUwAZxRw.js.br +0 -0
- package/dist/public/assets/_CbMNS899.js.br +0 -0
- package/dist/public/assets/_Cf0wSsqE.js.br +0 -0
- package/dist/public/assets/_ClEKr0Tm2.js.br +0 -0
- package/dist/public/assets/_CsNJf4g52.js.br +0 -0
- package/dist/public/assets/_CtErcdf92.js.br +0 -0
- package/dist/public/assets/_DAfu0wMa.js.br +0 -0
- package/dist/public/assets/_DBN8F3s1.js.br +0 -0
- package/dist/public/assets/_DFOnuGNp.js.br +0 -0
- package/dist/public/assets/_DHvVwuPu2.js.br +0 -0
- package/dist/public/assets/_DKnLFVdw.js.br +0 -0
- package/dist/public/assets/_DLFnXIrG2.js.br +0 -0
- package/dist/public/assets/_DLK0WouR.js.br +0 -0
- package/dist/public/assets/_DLLEkkcM.js.br +0 -0
- package/dist/public/assets/_DOpT45mO.js.br +0 -0
- package/dist/public/assets/_DT9Qs1il.js.br +0 -0
- package/dist/public/assets/_DVPPxo4e2.js.br +0 -0
- package/dist/public/assets/_De7fhQUT.js.br +0 -0
- package/dist/public/assets/_DgmBuYFG2.js.br +0 -0
- package/dist/public/assets/_DjLQQUoq.js.br +0 -0
- package/dist/public/assets/_Dn4wMX5v.js.br +0 -0
- package/dist/public/assets/_DsJkMBKU2.js.br +0 -0
- package/dist/public/assets/_Ez06j6Qv.js.br +0 -0
- package/dist/public/assets/_FCV34uHN.js.br +0 -0
- package/dist/public/assets/_I6H6F0ME.js.br +0 -0
- package/dist/public/assets/_K6PNL3j4.js.br +0 -0
- package/dist/public/assets/_KVpYyL9A.js.br +0 -0
- package/dist/public/assets/_KjztUkjx.js.br +0 -0
- package/dist/public/assets/_Q6y5EfU1.js.br +0 -0
- package/dist/public/assets/_cRLLpjIg.js.br +0 -0
- package/dist/public/assets/_kv39JOeM.js.br +0 -0
- package/dist/public/assets/_o1of2_lP.js.br +0 -0
- package/dist/public/assets/_qoSWRJiT.js.br +0 -0
- package/dist/public/assets/_yQJK428k.js.br +0 -0
- package/dist/public/assets/diff-view-CQX-Ovnt.css +0 -1
- package/dist/public/assets/diff-view-CQX-Ovnt.css.br +0 -0
- package/dist/public/assets/index-DR0Bvd6u.css +0 -1
- package/dist/public/assets/index-DR0Bvd6u.css.br +0 -0
- package/dist/public/assets/index-fCEONff1.js +0 -85
- package/dist/public/assets/index-fCEONff1.js.br +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/
|
|
2
|
-
import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,T as b,U as x,V as S,W as C,X as w,Y as ee,Z as T,_ as te,_t as E,a as ne,at as D,b as re,bt as ie,c as ae,ct as oe,d as se,dt as O,et as ce,f as le,ft as k,g as ue,gt as A,h as de,ht as fe,i as pe,it as j,j as me,k as he,l as ge,lt as _e,m as ve,mt as ye,n as be,nt as xe,o as Se,ot as M,p as Ce,pt as N,q as we,r as Te,rt as Ee,s as De,st as Oe,t as P,tt as ke,u as Ae,ut as je,v as Me,vt as F,w as Ne,x as Pe,xt as I,y as Fe,yt as L,z as Ie}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_DRRQXGKH.js","assets/_wvTh271a.js","assets/_BPmHfnJD.js","assets/_C2rSDO7f.js","assets/_YLPBpmu6.js","assets/_C9hmrTBV.js","assets/_D9jhO9rQ.js","assets/_F3u8qQ9y.js","assets/_UWZzN8Rg.js","assets/_BpxZLi8K.js","assets/_CNxYMMPa.js","assets/_C2-Kd826.js","assets/_BXeXVLqQ.js","assets/_ByaG8bWs.js","assets/_BX76n7oq2.js","assets/_BZDb9Hzx2.js","assets/_B_Wegq962.js","assets/_CpYNKFv52.js","assets/_bTVj8UrX2.js","assets/_kIpfj7zU2.js","assets/_gzcpVVnB2.js","assets/_BrNzM4EC2.js","assets/_HH6t8aRM2.js","assets/_B3dWhBsL2.js","assets/_llnipctq2.js","assets/_DDsFYxIq.js","assets/_Dmw0DArq.js","assets/_JYBrvu87.js","assets/_DjKQr6mH.js","assets/_C9E3fz2-.js","assets/_CgnZDJPL.js","assets/_Bb4a7oF1.js","assets/_DImQNomk.js","assets/_C6jAYlE8.js","assets/_CMGqtmQt.js","assets/_D0L-Bq8g.js","assets/_8D88iC2Y.js","assets/_sBNm9tCS.js","assets/_DBzS4J_k.js","assets/_u3et6kdz.js","assets/_BaHq4SXp.js","assets/_BYOwaDjH.js","assets/_CQJs3lWb.js","assets/_CYNrtFtB.js","assets/_DmIc4jLQ.js","assets/_CY8IvGdO2.js","assets/_CBce3t8t2.js","assets/_DYvRD3hg2.js","assets/_Dl-2e7rI2.js","assets/_woXpYk--.js","assets/_BYn0odAU2.js","assets/_BziqIADV2.js","assets/_BhAegdMF2.js","assets/_DkMIDB1P2.js","assets/_D7TvcnuF2.js","assets/_4zqifGZf2.js","assets/_CkeutYnJ2.js","assets/_Dx-8-gkx.js","assets/_DLbMbJfH2.js","assets/_C8oCnwJJ2.js","assets/_BH7cFvM5.js","assets/_B-XihPlt.js","assets/_Cci4ZExC.js","assets/_v4TxGuxE.js","assets/_Bvgyberk.js","assets/_f4yPg-i-.js","assets/_Kzpu52En.js","assets/_B6JLzfQk.js","assets/_DlC4k_XP.js","assets/_B92xkQnk.js","assets/_DVTAwKKz.js","assets/_DyNwE1Gc.js","assets/_DWQbgPoS.js","assets/_DJMQeKeT.js","assets/_D99Y49OA.js","assets/_DZ0pRMJN2.js","assets/_BP2BHaYT2.js","assets/_DqKBuwfJ2.js","assets/_oqKa8noW.js","assets/_CnvKMtbv.js","assets/_IyjqRm3v.js","assets/_rLFTqkRN2.js","assets/_CacY0gHj2.js","assets/_B5eOa1yu.js","assets/_Dixweg8N.js","assets/_D1A_Heim2.js","assets/_O90oeIOV2.js","assets/_DljpB8742.js","assets/_DOwzaHZ02.js","assets/_B3gFvitq2.js","assets/_Cfkwpbl82.js","assets/_BiFt_7mu2.js","assets/_CMLA9XwU2.js","assets/_BmEd20O42.js","assets/_CRmHsbsL.js","assets/_CVQKEVHV.js","assets/_BUhKc7uT.js","assets/_D4J5RQqK.js","assets/_Bj61d0ZC2.js","assets/_ByKU0Hfi.js","assets/_BM315xPC.js","assets/_Cvrh5tZx2.js","assets/_B9STxcPh.js","assets/_DlsPVtFC.js","assets/_L8AbGenz.js","assets/_ByJddavk.js","assets/_DIiEy_VP.js","assets/_D6xeqZLn.js","assets/_B01yJM_n.js","assets/_BlPl6sCu2.js","assets/_B-7M0VuK2.js","assets/_DbkjWa7i2.js","assets/_lBeubFtN2.js","assets/_Dji7sUrK2.js","assets/_BRURAzLu2.js","assets/_B6D30XZt.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,T as b,U as x,V as S,W as C,X as w,Y as ee,Z as T,_ as te,_t as E,a as ne,at as D,b as re,bt as ie,c as ae,ct as oe,d as se,dt as O,et as ce,f as le,ft as k,g as ue,gt as A,h as de,ht as fe,i as pe,it as j,j as me,k as he,l as ge,lt as _e,m as ve,mt as ye,n as be,nt as xe,o as Se,ot as M,p as Ce,pt as N,q as we,r as Te,rt as Ee,s as De,st as Oe,t as P,tt as ke,u as Ae,ut as je,v as Me,vt as F,w as Ne,x as Pe,xt as I,y as Fe,yt as L,z as Ie}from"./index-Bfh8nSee.js";var Le=Object.defineProperty,Re=(e,t)=>{let n={};for(var r in e)Le(n,r,{get:e[r],enumerable:!0});return t||Le(n,Symbol.toStringTag,{value:`Module`}),n};function ze(e){return e.map(e=>{let t=e.pr?String(e.pr.number):`-`,n=e.pr&&(e.pr.headRefOid||e.head)||``,r=e.localHead||e.head||``;return`${e.worktree}#${t}:${n}:L${r}`}).sort().join(`\0`)}function Be(e){return e.repos.flatMap(e=>{let t=e.localHead||``;return e.prs.length?e.prs.map(n=>`${e.worktree}#${n.number}:${n.headRefOid||``}:L${t}`):[`${e.worktree}#-::L${t}`]}).sort().join(`\0`)}function Ve(e){let t=[],n=[];for(let r of e.trim().split(/\s+/).filter(Boolean)){let e=r.startsWith(`!`),i=e?r.slice(1):r;i&&(e?n:t).push(He(i))}return e=>!n.some(t=>t(e))&&t.every(t=>t(e))}function He(e){if(!/[*?]/.test(e))return t=>ue(e,t);let t=``;for(let n=0;n<e.length;n++){let r=e[n];r===`*`?e[n+1]===`*`?(t+=`.*`,n++):t+=`[^/]*`:t+=r===`?`?`[^/]`:r.replace(/[.+^${}()|[\]\\]/,`\\$&`)}try{let e=new RegExp(t,`i`);return t=>e.test(t)}catch{return t=>ue(e,t)}}var Ue=`search-mark`,We=`mark.${Ue}`,Ge=`mark.${Ue}{display:inline;background:#ffd24a;color:#1a1408;-webkit-text-fill-color:#1a1408;border-radius:3px;padding:0 2px}mark.${Ue} *,mark.${Ue} *::before,mark.${Ue} *::after{color:inherit!important;-webkit-text-fill-color:inherit!important;background:transparent!important}mark.${Ue}.active{background:#ffb000;box-shadow:0 0 0 1px #c98400}`,Ke={query:``,hit:null},qe=new Map;function Je(e,t){Ke.query=e,Ke.hit=t;for(let[e,t]of qe)lt(e,Ke.query,Ke.hit?.key===t?Ke.hit:null);t&&Xe(t)}function Ye(){Ke.hit&&Xe(Ke.hit)}function Xe(e,t=0){requestAnimationFrame(()=>{requestAnimationFrame(()=>{let n=!1;for(let[r,i]of qe)if(i===e.key&&(n=!0,$e(r,e)||t>=40))return;t>=40||(!n||t<12)&&setTimeout(()=>Xe(e,t+1),n?32:48)})})}function Ze(e,t,n){let r=e.getBoundingClientRect(),i=t.getBoundingClientRect();if(i.height===0&&i.width===0)return!1;if(n===`y`){let t=i.top-r.top+e.scrollTop-(r.height/2-i.height/2);return e.scrollTo({top:Math.max(0,t)}),!0}if(e.scrollWidth<=e.clientWidth+1)return!0;let a=Math.min(24,r.width/8);if(i.left>=r.left+a&&i.right<=r.right-a)return!0;let o=i.left-r.left+e.scrollLeft-(r.width/2-i.width/2),s=Math.max(0,e.scrollWidth-e.clientWidth);return e.scrollTo({left:Math.max(0,Math.min(o,s))}),!0}function Qe(e,t){let n=t.parentElement,r=e;for(;r&&r!==n;){if(r instanceof HTMLElement&&r.scrollWidth>r.clientWidth+1){let e=getComputedStyle(r).overflowX;if(e===`auto`||e===`scroll`)return r}let e=r.getRootNode(),t=r.parentElement??(e instanceof ShadowRoot?e.host:null);if(t===r)break;r=t}return null}function $e(e,t){let n=e.querySelector(`diffs-container`)?.shadowRoot;if(!n)return!1;let r=n.querySelector(`mark.search-mark.active`)??(()=>{if(t.line<1)return null;let e=[...n.querySelectorAll(`[data-line="${t.line}"]`)],r=t.side||`additions`;return e.find(e=>it(e)===r)??e[0]??null})();if(!r)return!1;let i=e.closest(`[data-diff-main]`);if(i){if(!Ze(i,r,`y`))return!1}else r.scrollIntoView({block:`center`,inline:`nearest`});let a=Qe(r,e);return a&&Ze(a,r,`x`),!0}function et(e,t){let n=t&&Ke.hit?.key===t?Ke.hit:null;lt(e,Ke.query,n),n&&Xe(n)}function tt(e,t){return qe.set(e,t),et(e,t),()=>{qe.delete(e)}}function nt(e){et(e,qe.get(e))}function rt(e){for(let t of[...e.querySelectorAll(We)]){let e=t.parentElement;t.replaceWith(...t.childNodes),e?.normalize()}}function it(e){let t=e.closest(`[data-code]`);return t?.hasAttribute(`data-deletions`)?`deletions`:t?.hasAttribute(`data-additions`)?`additions`:(e.getAttribute(`data-line-type`)||``).includes(`deletion`)?`deletions`:`additions`}function at(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=[];for(let e=t.nextNode();e;e=t.nextNode())e.parentElement?.closest(We)||n.push(e);return n}function ot(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=t[i].length;if(n<=r+a)return{node:e[i],offset:Math.min(a,Math.max(0,n-r))};r+=a}let i=e.at(-1);return i?{node:i,offset:t.at(-1)?.length??0}:null}function st(e,t,n,r,i){let a=ot(e,t,n),o=ot(e,t,r);if(!a||!o)return;let s=document.createRange();s.setStart(a.node,a.offset),s.setEnd(o.node,o.offset);let c=document.createElement(`mark`);c.className=i;try{c.append(s.extractContents()),s.insertNode(c)}catch{}}function ct(e,t,n,r){let i=at(e);if(!i.length)return;let a=i.map(e=>e.textContent??``),o=a.join(``),s=n?o:o.toLowerCase(),c=[];for(let e=s.indexOf(t);e!==-1;e=s.indexOf(t,e+t.length))c.push([e,e+t.length]);if(!c.length)return;let l=it(e),u=Number(e.getAttribute(`data-line`)),d=r&&r.line===u&&(r.side||`additions`)===l?`${Ue} active`:Ue;for(let e=c.length-1;e>=0;e--)st(i,a,c[e][0],c[e][1],d)}function lt(e,t,n){let r=[e],i=e.querySelector(`diffs-container`)?.shadowRoot;i&&r.push(i);let a=t.trim(),o=/[A-Z]/.test(a),s=a&&!o?a.toLowerCase():a;for(let e of r)if(rt(e),s)for(let t of e.querySelectorAll(`[data-code] [data-line]`))ct(t,s,o,n)}function ut(e){let t=e.replace(/^origin\//,``);return dt(t.includes(`/`)?t.slice(t.lastIndexOf(`/`)+1):t)}function dt(e){return e.replace(/-[a-z0-9]{1,6}$/i,``)||e}function ft(e,t){if(!t)return``;let n=e.replace(/^origin\//,``),r=t.replace(/^origin\//,``);return n.startsWith(`${r}-`)?n.slice(r.length+1):``}function pt(e){let t=dt(e);if(t.length<=20)return t;let n=t.split(`-`);return n.length>1?n[n.length-1]:t}function mt(e,t,n=``,r=``){let i=(e||`base`).replace(/^origin\//,``),a=(t||`HEAD`).replace(/^origin\//,``),o=(n||``).replace(/^origin\//,``),s=!!o&&(a===o||a.startsWith(`${o}-`));return{base:i,head:s?r||ut(o):pt(a),topic:s?ft(a,o):``,title:a===i?i:`${a} vs ${i}`}}function ht(e,t=``,n=``){let r=e.replace(/^origin\//,``);if(!r||r===`HEAD`)return r||`HEAD`;let i=t.replace(/^origin\//,``);if(i&&(r===i||r.startsWith(`${i}-`))){let e=n||ut(i),t=ft(r,i);return t?`${e} [${t}]`:e}return pt(r)}var gt=3;function _t(e,t){let n=new Map;for(let t of e)n.set(t.worktree,[...n.get(t.worktree)||[],t]);let r=[`Review feedback:`],i=0;for(let[e,a]of n){let n=(t||[]).find(t=>t.worktree===e);r.push(``),r.push(vt(e,n));for(let e of a){i++;let t=n?.files.find(t=>t.path===e.path),a=e.side===`deletions`?t?.old:t?.new,o=e.side===`deletions`?`Old`:`New`,s=e.line_start===e.line_end?`line ${e.line_start}`:`lines ${e.line_start}-${e.line_end}`;if(r.push(``),r.push(`${i}. **${e.path}** (${o} ${s})`),a!=null){let t=bt(a,e.line_start,e.line_end,e.side),n=xt(t);r.push(``),r.push(St(`${n}diff\n${t}\n${n}`))}r.push(``),r.push(St(e.text))}}return r.join(`
|
|
3
3
|
`)}function vt(e,t){if(!t?.head)return`${e}/`;let n=yt(t.head),r=yt(t.baseSha),i=t.pr?.headRefName||t.branch||`HEAD`;return`${e}/${t.pr?` #${t.pr.number}`:``} — \`${i}\` ${n} vs \`${t.base}\` ${r}`}function yt(e,t=12){return e.slice(0,t)}function bt(e,t,n,r){let i=e.split(`
|
|
4
4
|
`),a=Math.max(1,t-gt),o=Math.min(i.length,n+gt),s=r===`deletions`?`-`:`+`,c=[];for(let e=a;e<=o;e++){let r=e>=t&&e<=n?s:` `;c.push(`${r}${String(e).padStart(4)} | ${i[e-1]??``}`)}return c.join(`
|
|
5
5
|
`)}function xt(e){let t=3,n=/`+/g,r;for(;r=n.exec(e);)t=Math.max(t,r[0].length+1);return"`".repeat(t)}function St(e){return e.split(`
|
|
6
6
|
`).map(e=>e&&` ${e}`).join(`
|
|
7
|
-
`)}function Ct(e){let t={dirs:new Map,files:[]};for(let n of e){let e=n.path.split(`/`),r=e.pop(),i=t;for(let t of e){let e=i.dirs.get(t);e||(e={dirs:new Map,files:[]},i.dirs.set(t,e)),i=e}i.files.push({file:n,name:r})}let n=[],r=(e,t,i)=>{for(let[a,o]of[...e.dirs].sort(([e],[t])=>e.localeCompare(t))){let e=a,s=o;for(;s.dirs.size===1&&!s.files.length;){let[[t,n]]=s.dirs;e+=`/${t}`,s=n}let c=i?`${i}/${e}`:e;n.push({kind:`dir`,label:e,path:c,depth:t}),r(s,t+1,c)}for(let{file:r,name:i}of e.files)n.push({kind:`file`,file:r,name:i,depth:t})};return r(t,0,``),n}var wt=`
|
|
7
|
+
`)}function Ct(e){let t={dirs:new Map,files:[]};for(let n of e){let e=n.path.split(`/`),r=e.pop(),i=t;for(let t of e){let e=i.dirs.get(t);e||(e={dirs:new Map,files:[]},i.dirs.set(t,e)),i=e}i.files.push({file:n,name:r})}let n=[],r=(e,t,i)=>{for(let[a,o]of[...e.dirs].sort(([e],[t])=>e.localeCompare(t))){let e=a,s=o;for(;s.dirs.size===1&&!s.files.length;){let[[t,n]]=s.dirs;e+=`/${t}`,s=n}let c=i?`${i}/${e}`:e;n.push({kind:`dir`,label:e,path:c,depth:t}),r(s,t+1,c)}for(let{file:r,name:i}of e.files)n.push({kind:`file`,file:r,name:i,depth:t})};return r(t,0,``),n}var wt=`_eb _D`,Tt=`_ef _D`,Et=`_eI _q`,Dt=`_eK _p`,Ot=b,kt=(e=>`/${e}&`)(a);function At(e){r(e.a,`M15 6L9 12L15 18`)}var jt=(e,t)=>Ne(e.a,t),Mt=(e,t)=>y(e.a,t),Nt=`_e9 _e`,Pt=`<div><input type=search placeholder="Filter files…" aria-label="Filter files"></div>`,Ft=` D l`,It=E(18,t=>e(t,`b`,t.l,Qt(t))),Lt=M(11,It),Rt=E(10,e=>Lt(e,(e.j??e.h)||``)),zt=M(17,It),Bt=E(16,e=>zt(e,$t(e))),Vt=M(15,Bt),Ht=E(14,e=>Vt(e,en(e)),2),Ut=ye(7,e=>{Rt(e),Ht(e)}),Wt=E(6,e=>Ut(e,e.e,e.f)),Gt=M(4,Wt),Kt=M(5,Wt),qt=N(9,e=>{Rt(e),Ht(e)}),Jt=(e,t)=>Zt(e,t.timer),Yt=L(`j3`,e=>{ce(e,`b`),A(e.b,`keydown`,function(t){t.key===`Enter`&&e.p(),t.key===`Escape`&&e.l&&(t.preventDefault(),e.r(``))})});function Xt(e){T(e.a,`_e8`),T(e.b,Nt),qt(e,null),Jt(e,{timer:0}),Yt(e)}var Zt=M(13,e=>{Ht(e),Bt(e)});function Qt(e){return function(t){e.r(t)}}function $t(e){return t=>{if(e.n&&clearTimeout(e.n),!t){e.n=0,qt(e,null),Ut(e,``);return}qt(e,t),e.n=setTimeout(e.p,150)}}function en(e){return()=>{e.n&&=(clearTimeout(e.n),0);let t=e.j===null?e.h||``:e.j;qt(e,null),Ut(e,t)}}F(`j0`,Qt),F(`j2`,$t),F(`j1`,en);var tn=`<span><button type=button title="Copy comments as markdown"> </button><!></span>`,nn=` D D l%l`,rn=(e,t)=>w(e.a,`value`,t),an=E(7,e=>I(e.b,e.f||e.g)),on=M(5,an),sn=M(6,an),cn=(e,t)=>{rn(e,t[0]?.id),on(e,t[0]?.title),sn(e,t[0]?.agent)},ln=k(3,1,e=>{w(e.b,`disabled`,e._.k),I(e.c,e._.k?`Sending…`:`Send to`),w(e.d,`disabled`,e._.k)}),un=L(`g2`,e=>{A(e.b,`click`,function(){(async()=>{if(!(!e._.s||e._.k)){Sn(e._,!0);try{await e._.i(e._.s)}finally{Sn(e._,!1)}}})()}),xe(e,`d`)}),dn=e=>{ln._(e),fn._(e),mn._(e),T(e.a,`_fa`),T(e.b,`_fb`),T(e.d,`_fc`),un(e)},fn=k(3,1,e=>ke(e,`d`,e._.l,In(e))),pn=je(3,`<option> </option>`,` D `,0,cn),mn=k(3,1,e=>pn(e,[e._.m,`id`])),hn=E(2,e=>I(e.b,e._.k?`Sending…`:`Send to ${e._.q||e._.r}`),2),gn=k(3,0,e=>{w(e.a,`disabled`,e._.k),hn(e)}),_n=L(`g1`,e=>A(e.a,`click`,function(){(async()=>{if(!(!e._.s||e._.k)){Sn(e._,!0);try{await e._.i(e._.s)}finally{Sn(e._,!1)}}})()})),vn=e=>{gn._(e),yn._(e),bn._(e),T(e.a,[`_h`,`_i`]),_n(e)},yn=k(3,0,hn),bn=k(3,0,hn),xn=N(9,e=>I(e.c,e.j?`Copied ✓`:`Copy`)),Sn=N(10,e=>{gn(e),ln(e)}),Cn=M(18),wn=E(13,e=>Cn(e,e.m.some(t=>t.id===e.l)?e.l:e.m[0]?.id??null)),Tn=N(11,e=>{wn(e),fn(e)}),En=L(`g3`,e=>A(e.b,`click`,function(){(async()=>{await e.h()&&(xn(e,!0),setTimeout(()=>{xn(e,!1)},1500))})()}));function Dn(e){T(e.a,`_e_`),T(e.b,`_h`),xn(e,!1),Sn(e,!1),Tn(e,null),En(e)}var On=M(12,e=>{kn(e,e.m[0]?.title),An(e,e.m[0]?.agent),Mn(e,e.m.length),wn(e),mn(e)}),kn=M(16,yn),An=M(17,bn),jn=O(3,`<button type=button> </button>`,` D `,vn,`<span><button type=button> </button><select aria-label="Send comments to session"></select></span>`,` D D l `,dn),Mn=(e,t)=>jn(e,t===1?0:t?1:2),Nn=(e,t)=>On(e,t||[]),Pn=M(7),Fn=M(8);function In(e){return t=>{Tn(e._,t)}}F(`g0`,In);var Ln=`diffs-container`,Rn=/(?=^diff --git)/gm,zn=/(?<=\n)/,Bn=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Vn=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Hn=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Un=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Wn=`header-prefix`,Gn=`header-filename-suffix`,Kn=`header-metadata`,qn=`header-custom`,Jn={dark:`pierre-dark`,light:`pierre-light`},Yn=`data-theme-css`,Xn=`data-unsafe-css`,Zn=`data-diffs-scrollbar-measure`,Qn=`--diffs-scrollbar-gutter-measured`,$n=1e5,er=Object.freeze({fromStart:0,fromEnd:0}),tr={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},nr={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},rr=new Set,ir=null;function ar(e){rr.add(e),ir??=requestAnimationFrame(sr)}function or(e){rr.delete(e)&&rr.size===0&&ir!=null&&(cancelAnimationFrame(ir),ir=null)}function sr(e){let t=new Set(rr);rr.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}ir=rr.size>0?requestAnimationFrame(sr):null}function cr(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function lr(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function ur(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}var dr=new TextEncoder,fr=new TextDecoder(`utf-8`,{ignoreBOM:!0}),pr=/[\uD800-\uDFFF]/,mr=1024,hr=new Uint8Array(mr);function gr(){hr.length!==mr&&(hr=new Uint8Array(mr))}function R(e){if(e.length===0)return e;if(pr.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;hr.length<t&&(hr=new Uint8Array(t));let{written:n}=dr.encodeInto(e,hr);return fr.decode(hr.subarray(0,n))}function _r(e,t){return e-(t===0?0:1)}function vr(e,t){return _r(e,t)+t}var yr=4096,br=.5;function xr(e){for(let t of e.hunks){for(let n=0;n<t.hunkContent.length;n++){let r=t.hunkContent[n];if(r.type!==`change`)continue;let i=Cr(e,r);i!=null&&(t.hunkContent.splice(n,1,...i),n+=i.length-1)}Sr(t,e)}}function Sr(e,t){let{hunkContent:n}=e;for(let e=1;e<n.length;e++){let r=n[e],i=n[e-1];if(r.type!==`change`||r.additions>0&&r.deletions>0||i.type!==`context`)continue;let a=r.additions>0,o=a?t.additionLines:t.deletionLines,s=a?r.additionLineIndex:r.deletionLineIndex,c=a?r.additions:r.deletions,l=o[s]??``;if(l.trim()!==``)continue;let u=!0;for(let e=1;e<c;e++)if(o[s+e]!==l){u=!1;break}if(!u)continue;let d=0;for(;d<i.lines&&t.additionLines[i.additionLineIndex+i.lines-1-d]===l;)d++;if(d===0||e===1&&d===i.lines)continue;r.additionLineIndex-=d,r.deletionLineIndex-=d;let f=r.additionLineIndex+r.additions,p=r.deletionLineIndex+r.deletions,m=n[e+1];m?.type===`context`?(m.lines+=d,m.additionLineIndex=f,m.deletionLineIndex=p):n.splice(e+1,0,{type:`context`,lines:d,additionLineIndex:f,deletionLineIndex:p}),i.lines-=d,i.lines===0&&(n.splice(e-1,1),e--)}}function Cr(e,t){let{deletions:n,additions:r,deletionLineIndex:i,additionLineIndex:a}=t,o=Math.min(n,r),s=Math.abs(r-n);if(o===0||s===0||o*(s+1)>yr)return null;let c=[];for(let t=0;t<n;t++)c.push(Tr(e.deletionLines[i+t]??``));let l=[];for(let t=0;t<r;t++)l.push(Tr(e.additionLines[a+t]??``));let u=r>n,d=0,f=-1;for(let e=0;e<=s;e++){let t=0;for(let n=0;n<o;n++)t+=Er(c[n+(u?0:e)],l[n+(u?e:0)]);e===0?f=t+o*br:t>f&&(f=t,d=e)}if(d===0)return null;let p=[],m=(e,t,n,r)=>{(e>0||t>0)&&p.push({type:`change`,deletions:e,additions:t,deletionLineIndex:n,additionLineIndex:r})};return u?(m(0,d,i,a),m(o,o,i,a+d),m(0,r-o-d,i+o,a+d+o)):(m(d,0,i,a),m(o,o,i+d,a),m(n-o-d,0,i+d+o,a+o)),p}var wr=/\s+/g;function Tr(e){return e.replace(wr,``)}function Er(e,t){if(e===t)return 1;let n=Math.max(e.length,t.length),r=Math.min(e.length,t.length);if(r===0)return 0;let i=0;for(;i<r&&e[i]===t[i];)i++;let a=0;for(;a<r-i&&e[e.length-1-a]===t[t.length-1-a];)a++;return(i+a)/n}function Dr(e,t){try{return Or(e,t)}finally{gr()}}function Or(e,{cacheKey:t,isGitDiff:n=Rn.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=Ir(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=Ar(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=Nr(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?kr(i.contents):[],deletionLines:!l&&r!=null&&i!=null?kr(r.contents):[],cacheKey:Rr(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(Hn),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=R(r.trim()),n!==r&&(c.prevName=R(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?Vn:Bn):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=R(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=R(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=R(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=R(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=R(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=R(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(Un)??[];t!=null&&(c.prevObjectId=R(t)),n!=null&&(c.newObjectId=R(n)),r!=null&&(c.mode=R(r))}e.startsWith(`rename from `)&&(c.prevName=R(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=R(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
|
|
8
8
|
`||s[s.length-1]===`\r`||s[s.length-1]===`\r
|
|
9
9
|
`||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:Rr(p.hunkContext),hunkSpecs:R(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`)){if(a&&jr(t)&&!Mr(t))throw Error(`parsePatchContent: hunk has more lines than expected`);break}let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){if(a)throw Error(`parsePatchContent: invalid hunk line`);console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=zr(n);if(r===`addition`){if(a&&x>=b.additionCount)throw Error(`parsePatchContent: hunk has too many addition lines`);let e=Br(t);(g==null||g.type!==`change`)&&(g=Vr(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&c.additionLines.push(e),g.additions++,m++,_=`addition`}else if(r===`deletion`){if(a&&S>=b.deletionCount)throw Error(`parsePatchContent: hunk has too many deletion lines`);let e=Br(t);(g==null||g.type!==`change`)&&(g=Vr(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&c.deletionLines.push(e),g.deletions++,h++,_=`deletion`}else if(r===`context`){if(a&&(S>=b.deletionCount||x>=b.additionCount))throw Error(`parsePatchContent: hunk has too many context lines`);let e=Br(t);(g==null||g.type!==`context`)&&(g=Vr(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e)),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=ur(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=ur(c.deletionLines[e]))}}}if(a&&(x!==b.additionCount||S!==b.deletionCount))throw Error(`parsePatchContent: hunk line count mismatch`);b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(_r(b.additionStart,b.additionCount)-o,0),c.hunks.push(b),o=vr(b.additionStart,b.additionCount);for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(a&&l&&!n&&c.hunks.length===0)throw Error(`parsePatchContent: unified file has no hunks`);if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=vr(e.additionStart,e.additionCount),n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),xr(c),c}}function kr(e){let t=Ar(e);for(let e=0;e<t.length;e++)t[e]=R(t[e]);return t}function Ar(e){if(e.length===0)return[``];let t=[],n=0;for(;;){let r=e.indexOf(`
|
|
10
10
|
`,n);if(r===-1)break;t.push(e.slice(n,r+1)),n=r+1}return n<e.length&&t.push(e.slice(n)),t}function jr(e){let t=e[0];return t===`+`||t===`-`||t===` `}function Mr(e){if(!e.startsWith(`--`))return!1;for(let t=2;t<e.length;t++){let n=e[t];if(n!==` `&&n!==` `&&n!==`
|
|
@@ -31,7 +31,7 @@ import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J a
|
|
|
31
31
|
\f\r &>`.split(``),`\0
|
|
32
32
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
33
33
|
\f\r "&'<=>\``.split(``),`\0
|
|
34
|
-
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function _o(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=oa);let l=vo(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!lo(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!qa(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function vo(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=yo(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function yo(e,t,n){let r=na(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Aa(r.attribute,Object.assign({},e.settings.characterReferences,{subset:go.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?La:Ra)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Aa(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:go.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Ia(n,o)>Ia(n,e.alternative)&&(o=e.alternative),s=o+Aa(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?go.single:go.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var bo=[`<`,`&`];function xo(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Aa(e.value,Object.assign({},r.settings.characterReferences,{subset:bo}))}function So(e,t,n,r){return r.settings.allowDangerousHtml?e.value:xo(e,t,n,r)}function Co(e,t,n,r){return r.all(e)}var wo=ca(`type`,{invalid:To,unknown:Eo,handlers:{comment:Pa,doctype:Fa,element:_o,raw:So,root:Co,text:xo}});function To(e){throw Error("Expected node, not `"+e+"`")}function Eo(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Do={},Oo={},ko=[];function Ao(e,t){let n=t||Do,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:jo,all:Mo,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||ji,characterReferences:n.characterReferences||Oo,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?oa:aa,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function jo(e,t,n){return wo(e,t,n,this)}function Mo(e){let t=[],n=e&&e.children||ko,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var No=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),or(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||lr(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!r&&!i||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;(t!=null||n!=null||r!=null||a!=null||i!=null)&&(this.options.onGutterUtilityClick!=null&&Ai(e.composedPath())||(Qo(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e})))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(Qo(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(Qo(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){Qo(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();Qo(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);Qo(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=Ro(i)&&this.hoveredLine?.lineElement===i.lineElement;Lo(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),Lo(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Ro(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(Bo(i)&&p!=null){p(i);break}if(zo(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!Ro(i))break;Lo(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,Qo(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),Qo(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),Qo(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();Ai(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(ki(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=Ao(Oi());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);Io(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(Uo(t));if(Io(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(Io(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(Io(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Ai(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=Uo(e);if(t&&Ai(n))return;let r=Wo(e);return r==null?this.pathFromAnnotationSlot(e):Uo(r)}pathFromAnnotationSlot(e){let t=Ko(Go(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:Uo(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=qo(t)?t:qo(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}lr(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,ar(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{or(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!Yo(this.renderedSelectedLinesState,n),i=!Yo(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);Vo(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=Zo(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=Zo(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:Ho(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:Ho(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Xo(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Xo(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Po({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:Fo({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function Fo({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function Io(e){return e!=null&&`kind`in e&&e.kind===`line`}function Lo(e){return e!=null&&`kind`in e&&e.kind===`token`}function Ro(e){return Io(e)||Lo(e)}function zo(e){return`type`in e&&e.type===`line-info`}function Bo(e){return`kind`in e&&e.kind===`merge-conflict-action`}function Vo(e){return e===`current`||e===`incoming`||e===`both`}function Ho(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Uo(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function Wo(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function Go(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function Ko(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function qo(e){return e!=null&&typeof e.elementFromPoint==`function`}function Jo(e,t){return e===t||lr(e??void 0,t??void 0)}function Yo(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&Jo(e?.range??null,t.range)}function Xo(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function Zo(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function Qo(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return}console.log(...n)}var $o=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),ns(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?as(t):os(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:es(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:ts(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&rs(t,{codeWidthChanged:i,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function es(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function ts(e){return Math.max(Math.ceil(e),0)}function ns(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?rs(e,{codeWidthChanged:!0,numberWidthChanged:!0}):is(e))}function rs(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function is(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function as(e){e.codeElement.isConnected&&is(e)}function os(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}var ss=new Map,cs=new Map,ls=new Map,us=new Set;function ds(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!us.has(t))return!1;return!0}function fs(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(us.has(n.name))continue;let e=ss.get(n.name);e??(e=n,ss.set(n.name,e)),us.add(e.name),t.loadLanguageSync(e.data)}}function ps(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var ms=Object.defineProperty,hs=Object.getOwnPropertyDescriptor,gs=Object.getOwnPropertyNames,_s=Object.prototype.hasOwnProperty,vs=(e,t)=>{let n={};for(var r in e)ms(n,r,{get:e[r],enumerable:!0});return t||ms(n,Symbol.toStringTag,{value:`Module`}),n},ys=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=gs(t),a=0,o=i.length,s;a<o;a++)s=i[a],!_s.call(e,s)&&s!==n&&ms(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=hs(t,s))||r.enumerable});return e},bs=(e,t,n)=>(ys(e,t,`default`),n&&ys(n,t,`default`)),xs=[{id:`abap`,name:`ABAP`,import:(()=>P(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>P(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>P(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>P(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>P(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>P(()=>import(`./_BhUM9ZCP.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>P(()=>import(`./_C4NK2Cq5.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>P(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>P(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>P(()=>import(`./_CUwAZxRw.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>P(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>P(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>P(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>P(()=>import(`./_Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>P(()=>import(`./_DFOnuGNp.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>P(()=>import(`./_BWXHIvNe2.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>P(()=>import(`./_B7ZEbQpA2.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>P(()=>import(`./_qdxAdBWQ2.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>P(()=>import(`./_D-usSTwE2.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>P(()=>import(`./_DKpUyyne2.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>P(()=>import(`./_Ci_nEsc72.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>P(()=>import(`./_CUHmPFLl2.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>P(()=>import(`./_CYIUgYqB2.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>P(()=>import(`./_1oYv4fmY2.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>P(()=>import(`./_CpYNKFv52.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>P(()=>import(`./_8nx9Raqx2.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>P(()=>import(`./_D0apG41V2.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>P(()=>import(`./_CQ2zXKGN2.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>P(()=>import(`./_kIpfj7zU2.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>P(()=>import(`./_CtErcdf92.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>P(()=>import(`./_CtfBBspg2.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>P(()=>import(`./_DqKBuwfJ2.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>P(()=>import(`./_Bj61d0ZC2.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>P(()=>import(`./_DHvVwuPu2.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>P(()=>import(`./_C8r90Shi2.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>P(()=>import(`./_oeQT6MSM2.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>P(()=>import(`./_BV-nVD9L2.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>P(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>P(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>P(()=>import(`./_CbMNS899.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>P(()=>import(`./_I6H6F0ME.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>P(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>P(()=>import(`./_DBN8F3s1.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>P(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>P(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>P(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>P(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>P(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>P(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>P(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>P(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>P(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>P(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>P(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>P(()=>import(`./_Bm-lmvlM.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>P(()=>import(`./_CASsRCtt.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>P(()=>import(`./_K6PNL3j4.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>P(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>P(()=>import(`./_ByiODT9w.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>P(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>P(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>P(()=>import(`./_BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>P(()=>import(`./_C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>P(()=>import(`./_CQJs3lWb.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>P(()=>import(`./_CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>P(()=>import(`./_DmIc4jLQ.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>P(()=>import(`./_CY8IvGdO2.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>P(()=>import(`./_DYvRD3hg2.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>P(()=>import(`./_CBce3t8t2.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>P(()=>import(`./_CV2tkWYe2.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>P(()=>import(`./_DExj1W_82.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>P(()=>import(`./_Dl-2e7rI2.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>P(()=>import(`./_DBn74psf2.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>P(()=>import(`./_CSRkHgEL2.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>P(()=>import(`./_DgmBuYFG2.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>P(()=>import(`./_B-MMW3nb2.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>P(()=>import(`./_Bvwr3uff.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>P(()=>import(`./_ilITqXS62.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>P(()=>import(`./_7GGW24-e2.js`),[]))},{id:`go`,name:`Go`,import:(()=>P(()=>import(`./_rLFTqkRN2.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>P(()=>import(`./_BbW3-3ve.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>P(()=>import(`./_CacY0gHj2.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>P(()=>import(`./_CH4P29Yf2.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>P(()=>import(`./_DKnLFVdw.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>P(()=>import(`./_CIeZtXbg2.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>P(()=>import(`./_D8IpX4py2.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>P(()=>import(`./_C8oCnwJJ2.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>P(()=>import(`./_Dh228itO2.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>P(()=>import(`./_CxZEssPk2.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>P(()=>import(`./_Cvrh5tZx2.js`),[]))},{id:`html`,name:`HTML`,import:(()=>P(()=>import(`./_BPFJiBiE.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>P(()=>import(`./_Ced5468N2.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>P(()=>import(`./_B2fn4I8S2.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>P(()=>import(`./_BGyMoPGj2.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>P(()=>import(`./_DLbMbJfH2.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>P(()=>import(`./_CZbG8q4J2.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>P(()=>import(`./_DsUTQ-LC2.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>P(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>P(()=>import(`./_Q6y5EfU1.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>P(()=>import(`./_DAfu0wMa.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>P(()=>import(`./_CQDBqJkT.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>P(()=>import(`./_BLjOZLxk.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>P(()=>import(`./_B49r6O_E.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>P(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>P(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>P(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>P(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>P(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>P(()=>import(`./_BPLnh5S4.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>P(()=>import(`./_BiEWaww7.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>P(()=>import(`./_Ez06j6Qv.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65])))},{id:`kdl`,name:`KDL`,import:(()=>P(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>P(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>P(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>P(()=>import(`./_BBW7mJhZ.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>P(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>P(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>P(()=>import(`./_BqeAAcor.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>P(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>P(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>P(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>P(()=>import(`./_KjztUkjx.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>P(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>P(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>P(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>P(()=>import(`./_CObQoJCq.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>P(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>P(()=>import(`./_KVpYyL9A.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>P(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>P(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>P(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>P(()=>import(`./_CFuIV2fl.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>P(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>P(()=>import(`./_BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>P(()=>import(`./__X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>P(()=>import(`./_DWQbgPoS.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>P(()=>import(`./_DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>P(()=>import(`./_Bpdzs0h4.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>P(()=>import(`./_DsJkMBKU2.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>P(()=>import(`./_IvuFDN5E2.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>P(()=>import(`./_CjNLYCLg2.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>P(()=>import(`./_DHYfO66s2.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>P(()=>import(`./_D1A_Heim2.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>P(()=>import(`./_BsSzOQcm2.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>P(()=>import(`./_O90oeIOV2.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>P(()=>import(`./_B1RWQWA52.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>P(()=>import(`./_BUDT5pXO2.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>P(()=>import(`./_BeSgyXoy2.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93])))},{id:`pascal`,name:`Pascal`,import:(()=>P(()=>import(`./_4ZHwLPI52.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>P(()=>import(`./_BC2FBUbj.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>P(()=>import(`./_DVPPxo4e2.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>P(()=>import(`./_ot-7Btpt2.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>P(()=>import(`./_DGHpHOYJ2.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>P(()=>import(`./_BiJDBrnU2.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>P(()=>import(`./_C7UOKdEL2.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>P(()=>import(`./_BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>P(()=>import(`./_DNMTfnFr2.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>P(()=>import(`./_CCSX75yM2.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>P(()=>import(`./_DMgNhnYS2.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>P(()=>import(`./_iXnhIJG72.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>P(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>P(()=>import(`./_BRzL7uNP.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>P(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>P(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>P(()=>import(`./_gzcpVVnB2.js`),[]))},{id:`qml`,name:`QML`,import:(()=>P(()=>import(`./_kv39JOeM.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>P(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>P(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>P(()=>import(`./_CUqlR7rP.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>P(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>P(()=>import(`./_B3gFvitq2.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>P(()=>import(`./_De7fhQUT.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>P(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>P(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>P(()=>import(`./_DT9Qs1il.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>P(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>P(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>P(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>P(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>P(()=>import(`./_Dn4wMX5v.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>P(()=>import(`./_DLK0WouR.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>P(()=>import(`./_Cfkwpbl82.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>P(()=>import(`./_BFt-jSq-.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>P(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>P(()=>import(`./_BiFt_7mu2.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>P(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>P(()=>import(`./_yQJK428k.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>P(()=>import(`./_bTVj8UrX2.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>P(()=>import(`./_BM315xPC.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>P(()=>import(`./_cRLLpjIg.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>P(()=>import(`./_h8qSl3Me.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>P(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>P(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>P(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>P(()=>import(`./_qoSWRJiT.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>P(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>P(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>P(()=>import(`./_ClEKr0Tm2.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>P(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>P(()=>import(`./_o1of2_lP.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>P(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>P(()=>import(`./_Cf0wSsqE.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>P(()=>import(`./_DOpT45mO.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>P(()=>import(`./_CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>P(()=>import(`./_Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>P(()=>import(`./_BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>P(()=>import(`./_CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>P(()=>import(`./_DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>P(()=>import(`./_CZd0xW_V2.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>P(()=>import(`./_BbMkV19p2.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>P(()=>import(`./_DswuEJGm2.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>P(()=>import(`./_Bg9mkw0u.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>P(()=>import(`./_CcmNWLt02.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>P(()=>import(`./_CHqTBuzz2.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>P(()=>import(`./_sltzmVWM2.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>P(()=>import(`./_Bhnzfac_.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>P(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>P(()=>import(`./_9yP8iK4t2.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>P(()=>import(`./_1cz-l3Ka.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>P(()=>import(`./_BRdr0IET2.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>P(()=>import(`./_DI99ib-x2.js`),[]))},{id:`v`,name:`V`,import:(()=>P(()=>import(`./_DBj4K9d_2.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>P(()=>import(`./_zf12oZj62.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>P(()=>import(`./_DOwzaHZ02.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>P(()=>import(`./_B2gwz-sJ2.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>P(()=>import(`./_BroJfC0k2.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>P(()=>import(`./_DvXPmvsu2.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>P(()=>import(`./_3i592Qvz2.js`),__vite__mapDeps([112,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>P(()=>import(`./_CsNJf4g52.js`),__vite__mapDeps([113,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>P(()=>import(`./_BdbnwCKs2.js`),__vite__mapDeps([114,2,3,5,12,70,115])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>P(()=>import(`./_CgoNMtux2.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>P(()=>import(`./_ByWQv1Qj2.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>P(()=>import(`./_C8pVoKbM2.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>P(()=>import(`./_BsKzXJz42.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>P(()=>import(`./_ClFFjSW22.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>P(()=>import(`./_DdvCle-K2.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>P(()=>import(`./_DLL8P-h_2.js`),[]))},{id:`xml`,name:`XML`,import:(()=>P(()=>import(`./_FCV34uHN.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>P(()=>import(`./_DLFnXIrG2.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>P(()=>import(`./_DjLQQUoq.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>P(()=>import(`./_BnlCZFoB2.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>P(()=>import(`./_CMLA9XwU2.js`),[]))}],Ss=Object.fromEntries(xs.map(e=>[e.id,e.import])),Cs=Object.fromEntries(xs.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ws={...Ss,...Cs},Ts=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>P(()=>import(`./_vGVdxbeo2.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>P(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>P(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>P(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>P(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>P(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>P(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>P(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>P(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>P(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>P(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>P(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>P(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>P(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>P(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>P(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>P(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>P(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>P(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>P(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>P(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>P(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>P(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>P(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>P(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>P(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>P(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>P(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>P(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>P(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>P(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>P(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>P(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>P(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>P(()=>import(`./_DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>P(()=>import(`./_Bm3Qr25_2.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>P(()=>import(`./_2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>P(()=>import(`./_uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>P(()=>import(`./_CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>P(()=>import(`./_B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>P(()=>import(`./_BSWPekZh2.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>P(()=>import(`./_DDpmG2fV2.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>P(()=>import(`./_B_bV9PQ92.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>P(()=>import(`./_DhmEMT882.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>P(()=>import(`./_eJ-hLW7d2.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>P(()=>import(`./_Cb4Vim4T2.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>P(()=>import(`./_CLwyXe_n2.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>P(()=>import(`./_D7Lr4KcI2.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>P(()=>import(`./_DQwYfKfQ2.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>P(()=>import(`./_DRFjx7u42.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>P(()=>import(`./_DX1BQOs82.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>P(()=>import(`./_aMsaMD1D2.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>P(()=>import(`./_8PwUyIlP2.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>P(()=>import(`./_DO-qXg-I2.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>P(()=>import(`./_DnToyrRv2.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>P(()=>import(`./_B2OO5cIa2.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>P(()=>import(`./_4G7pJPwS2.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>P(()=>import(`./_UdsmMDCL2.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>P(()=>import(`./_C1IUL_tW2.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>P(()=>import(`./_nFMaYfgc2.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>P(()=>import(`./_oM2G3aXe2.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>P(()=>import(`./_DdrHHSXu2.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>P(()=>import(`./_fwtXNY1n2.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>P(()=>import(`./_BZCL-v6S2.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>P(()=>import(`./_VbXTXTou2.js`),[]))}].map(e=>[e.id,e.import])),Es=Re({createOnigurumaEngine:()=>Qs,getDefaultWasmLoader:()=>Zs,loadWasm:()=>Gs,setDefaultWasmLoader:()=>Xs}),Ds=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Os(){return 2147483648}function ks(){return typeof performance<`u`?performance.now():Date.now()}var As=(e,t)=>e+(t-e%t)%t;async function js(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Os();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,As(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:ks,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var Ms=Object.defineProperty,Ns=(e,t,n)=>t in e?Ms(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t,n)=>Ns(e,typeof t==`symbol`?t:t+``,n),q=null;function Ps(e){throw new Ds(e.UTF8ToString(e.getLastOnigError()))}var Fs=class e{constructor(t){K(this,`utf16Length`),K(this,`utf8Length`),K(this,`utf16Value`),K(this,`utf8Value`),K(this,`utf16OffsetToUtf8`),K(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Is=class e{constructor(t){if(K(this,`id`,++e.LAST_ID),K(this,`_onigBinding`),K(this,`content`),K(this,`utf16Length`),K(this,`utf8Length`),K(this,`utf16OffsetToUtf8`),K(this,`utf8OffsetToUtf16`),K(this,`ptr`),!q)throw new Ds(`Must invoke loadWasm first.`);this._onigBinding=q,this.content=t;let n=new Fs(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=q.omalloc(1e4),e._sharedPtrInUse=!0,q.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(q)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};K(Is,`LAST_ID`,0),K(Is,`_sharedPtr`,0),K(Is,`_sharedPtrInUse`,!1);var Ls=Is,Rs=class{constructor(e){if(K(this,`_onigBinding`),K(this,`_ptr`),!q)throw new Ds(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Fs(e[r]);t[r]=i.createString(q),n[r]=i.utf8Length}let r=q.omalloc(4*e.length);q.HEAPU32.set(t,r/4);let i=q.omalloc(4*e.length);q.HEAPU32.set(n,i/4);let a=q.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)q.ofree(t[n]);q.ofree(i),q.ofree(r),a===0&&Ps(q),this._onigBinding=q,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Ls(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function zs(e){return typeof e.instantiator==`function`}function Bs(e){return typeof e.default==`function`}function Vs(e){return e.data!==void 0}function Hs(e){return typeof Response<`u`&&e instanceof Response}function Us(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var Ws;function Gs(e){if(Ws)return Ws;async function t(){q=await js(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),zs(n)?n=await n.instantiator(t):Bs(n)?n=await n.default(t):(Vs(n)&&(n=n.data),Hs(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await qs(n)(t):await Js(n)(t):Us(n)||n instanceof WebAssembly.Module?n=await Ks(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Ks(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Ws=t(),Ws}function Ks(e){return t=>WebAssembly.instantiate(e,t)}function qs(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Js(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Ys;function Xs(e){Ys=e}function Zs(){return Ys}async function Qs(e){return e&&await Gs(e),{createScanner(e){return new Rs(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Ls(e)}}}var $s=vs({});bs($s,Es);var J=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function ec(e){return tc(e)}function tc(e){return Array.isArray(e)?nc(e):e instanceof RegExp?e:typeof e==`object`?rc(e):e}function nc(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=tc(e[n]);return t}function rc(e){let t={};for(let n in e)t[n]=tc(e[n]);return t}function ic(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function ac(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?ac(e.substring(0,e.length-1)):e.substr(~t+1)}var oc=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,sc=class{static hasCaptures(e){return e!==null&&(oc.lastIndex=0,oc.test(e))}static replaceCaptures(e,t,n){return e.replace(oc,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function cc(e,t){return e<t?-1:+(e>t)}function lc(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=cc(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function uc(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function dc(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var fc=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},pc=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(vc(e),t)}static createFromParsedTheme(e,t){return bc(e,t)}_cachedMatchRoot=new fc(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>hc(e.parent,t.parentScopes));return n?new _c(n.fontStyle,n.foreground,n.background):null}},mc=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function hc(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!gc(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function gc(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var _c=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function vc(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&uc(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&uc(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new yc(l,u,e,o,s,c)}}return n}var yc=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Y=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Y||{});function bc(e,t){e.sort((e,t)=>{let n=cc(e.scope,t.scope);return n!==0||(n=lc(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new xc(t),o=new _c(n,a.getId(r),a.getId(i)),s=new wc(new Cc(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new pc(a,o,s)}var xc=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Sc=Object.freeze([]),Cc=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Sc,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},wc=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Cc.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(lc(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Cc(e,t,n,r,i))}},Tc=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Dc(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Ec(e){return e}function Dc(e){return e}function Oc(e,t){let n=[],r=Ac(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(kc(i)){let e=[];do e.push(i),i=r.next();while(kc(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function kc(e){return!!e&&!!e.match(/[\w\.:]+/)}function Ac(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function jc(e){typeof e.dispose==`function`&&e.dispose()}var Mc=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Nc=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Pc=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Fc=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Mc(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Pc;for(let n of e)Ic(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Mc){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Ic(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Mc?Rc({baseGrammar:a,selfGrammar:i},r):Lc(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Mc(e))}function Lc(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];zc([r],t,n)}}function Rc(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&zc(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&zc(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function zc(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?ic({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&zc(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Gc(i);switch(a.kind){case 0:Rc({...t,selfGrammar:t.baseGrammar},n);break;case 1:Rc(t,n);break;case 2:Lc(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Lc(a.ruleName,i,n):Rc(i,n)}else a.kind===4?n.add(new Nc(a.scopeName,a.ruleName)):n.add(new Mc(a.scopeName))}}}var Bc=class{kind=0},Vc=class{kind=1},Hc=class{constructor(e){this.ruleName=e}kind=2},Uc=class{constructor(e){this.scopeName=e}kind=3},Wc=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Gc(e){if(e===`$base`)return new Bc;if(e===`$self`)return new Vc;let t=e.indexOf(`#`);return t===-1?new Uc(e):t===0?new Hc(e.substring(1)):new Wc(e.substring(0,t),e.substring(t+1))}var Kc=/\\(\d+)/,qc=/\\(\d+)/g,Jc=-1,Yc=-2;function Xc(e){return e}function Zc(e){return e}var Qc=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=sc.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=sc.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${ac(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:sc.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:sc.replaceCaptures(this._contentName,e,t)}},$c=class extends Qc{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},el=class extends Qc{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new al(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ol,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},tl=class extends Qc{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ol,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},nl=class extends Qc{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new al(i,this.id),this.beginCaptures=a,this._end=new al(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ol;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},rl=class extends Qc{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new al(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new al(o,Yc),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ol;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ol,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},il=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new $c(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new el(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=ic({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new tl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new rl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new nl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Gc(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof tl||e instanceof nl||e instanceof rl)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},al=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Kc.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return qc.lastIndex=0,this.source.replace(qc,(e,t)=>dc(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ol=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new sl(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new sl(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},sl=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
34
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function _o(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=oa);let l=vo(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!lo(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!qa(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function vo(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=yo(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function yo(e,t,n){let r=na(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Aa(r.attribute,Object.assign({},e.settings.characterReferences,{subset:go.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?La:Ra)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Aa(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:go.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Ia(n,o)>Ia(n,e.alternative)&&(o=e.alternative),s=o+Aa(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?go.single:go.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var bo=[`<`,`&`];function xo(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Aa(e.value,Object.assign({},r.settings.characterReferences,{subset:bo}))}function So(e,t,n,r){return r.settings.allowDangerousHtml?e.value:xo(e,t,n,r)}function Co(e,t,n,r){return r.all(e)}var wo=ca(`type`,{invalid:To,unknown:Eo,handlers:{comment:Pa,doctype:Fa,element:_o,raw:So,root:Co,text:xo}});function To(e){throw Error("Expected node, not `"+e+"`")}function Eo(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Do={},Oo={},ko=[];function Ao(e,t){let n=t||Do,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:jo,all:Mo,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||ji,characterReferences:n.characterReferences||Oo,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?oa:aa,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function jo(e,t,n){return wo(e,t,n,this)}function Mo(e){let t=[],n=e&&e.children||ko,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var No=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),or(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||lr(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!r&&!i||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;(t!=null||n!=null||r!=null||a!=null||i!=null)&&(this.options.onGutterUtilityClick!=null&&Ai(e.composedPath())||(Qo(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e})))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(Qo(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(Qo(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){Qo(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();Qo(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);Qo(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=Ro(i)&&this.hoveredLine?.lineElement===i.lineElement;Lo(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),Lo(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Ro(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(Bo(i)&&p!=null){p(i);break}if(zo(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!Ro(i))break;Lo(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,Qo(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),Qo(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),Qo(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();Ai(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(ki(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=Ao(Oi());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);Io(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(Uo(t));if(Io(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(Io(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(Io(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Ai(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=Uo(e);if(t&&Ai(n))return;let r=Wo(e);return r==null?this.pathFromAnnotationSlot(e):Uo(r)}pathFromAnnotationSlot(e){let t=Ko(Go(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:Uo(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=qo(t)?t:qo(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}lr(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,ar(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{or(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!Yo(this.renderedSelectedLinesState,n),i=!Yo(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);Vo(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=Zo(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=Zo(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:Ho(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:Ho(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Xo(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Xo(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Po({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:Fo({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function Fo({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function Io(e){return e!=null&&`kind`in e&&e.kind===`line`}function Lo(e){return e!=null&&`kind`in e&&e.kind===`token`}function Ro(e){return Io(e)||Lo(e)}function zo(e){return`type`in e&&e.type===`line-info`}function Bo(e){return`kind`in e&&e.kind===`merge-conflict-action`}function Vo(e){return e===`current`||e===`incoming`||e===`both`}function Ho(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Uo(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function Wo(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function Go(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function Ko(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function qo(e){return e!=null&&typeof e.elementFromPoint==`function`}function Jo(e,t){return e===t||lr(e??void 0,t??void 0)}function Yo(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&Jo(e?.range??null,t.range)}function Xo(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function Zo(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function Qo(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return}console.log(...n)}var $o=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),ns(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?as(t):os(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:es(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:ts(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&rs(t,{codeWidthChanged:i,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function es(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function ts(e){return Math.max(Math.ceil(e),0)}function ns(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?rs(e,{codeWidthChanged:!0,numberWidthChanged:!0}):is(e))}function rs(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function is(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function as(e){e.codeElement.isConnected&&is(e)}function os(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}var ss=new Map,cs=new Map,ls=new Map,us=new Set;function ds(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!us.has(t))return!1;return!0}function fs(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(us.has(n.name))continue;let e=ss.get(n.name);e??(e=n,ss.set(n.name,e)),us.add(e.name),t.loadLanguageSync(e.data)}}function ps(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var ms=Object.defineProperty,hs=Object.getOwnPropertyDescriptor,gs=Object.getOwnPropertyNames,_s=Object.prototype.hasOwnProperty,vs=(e,t)=>{let n={};for(var r in e)ms(n,r,{get:e[r],enumerable:!0});return t||ms(n,Symbol.toStringTag,{value:`Module`}),n},ys=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=gs(t),a=0,o=i.length,s;a<o;a++)s=i[a],!_s.call(e,s)&&s!==n&&ms(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=hs(t,s))||r.enumerable});return e},bs=(e,t,n)=>(ys(e,t,`default`),n&&ys(n,t,`default`)),xs=[{id:`abap`,name:`ABAP`,import:(()=>P(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>P(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>P(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>P(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>P(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>P(()=>import(`./_DRRQXGKH.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>P(()=>import(`./_YLPBpmu6.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>P(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>P(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>P(()=>import(`./_D9jhO9rQ.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>P(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>P(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>P(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>P(()=>import(`./_Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>P(()=>import(`./_CNxYMMPa.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>P(()=>import(`./_BWXHIvNe2.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>P(()=>import(`./_B7ZEbQpA2.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>P(()=>import(`./_qdxAdBWQ2.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>P(()=>import(`./_D-usSTwE2.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>P(()=>import(`./_DKpUyyne2.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>P(()=>import(`./_Ci_nEsc72.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>P(()=>import(`./_CUHmPFLl2.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>P(()=>import(`./_CYIUgYqB2.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>P(()=>import(`./_BX76n7oq2.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>P(()=>import(`./_CpYNKFv52.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>P(()=>import(`./_HH6t8aRM2.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>P(()=>import(`./_D0apG41V2.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>P(()=>import(`./_CQ2zXKGN2.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>P(()=>import(`./_kIpfj7zU2.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>P(()=>import(`./_BrNzM4EC2.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>P(()=>import(`./_CtfBBspg2.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>P(()=>import(`./_DqKBuwfJ2.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>P(()=>import(`./_Bj61d0ZC2.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>P(()=>import(`./_B3dWhBsL2.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>P(()=>import(`./_C8r90Shi2.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>P(()=>import(`./_oeQT6MSM2.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>P(()=>import(`./_llnipctq2.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>P(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>P(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>P(()=>import(`./_DDsFYxIq.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>P(()=>import(`./_DjKQr6mH.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>P(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>P(()=>import(`./_C2rSDO7f.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>P(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>P(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>P(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>P(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>P(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>P(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>P(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>P(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>P(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>P(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>P(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>P(()=>import(`./_CgnZDJPL.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>P(()=>import(`./_Bb4a7oF1.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>P(()=>import(`./_DImQNomk.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>P(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>P(()=>import(`./_C6jAYlE8.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>P(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>P(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>P(()=>import(`./_BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>P(()=>import(`./_C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>P(()=>import(`./_CQJs3lWb.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>P(()=>import(`./_CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>P(()=>import(`./_DmIc4jLQ.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>P(()=>import(`./_CY8IvGdO2.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>P(()=>import(`./_DYvRD3hg2.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>P(()=>import(`./_CBce3t8t2.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>P(()=>import(`./_CV2tkWYe2.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>P(()=>import(`./_DExj1W_82.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>P(()=>import(`./_Dl-2e7rI2.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>P(()=>import(`./_BYn0odAU2.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>P(()=>import(`./_CSRkHgEL2.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>P(()=>import(`./_BziqIADV2.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>P(()=>import(`./_BhAegdMF2.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>P(()=>import(`./_JYBrvu87.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>P(()=>import(`./_ilITqXS62.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>P(()=>import(`./_7GGW24-e2.js`),[]))},{id:`go`,name:`Go`,import:(()=>P(()=>import(`./_rLFTqkRN2.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>P(()=>import(`./_8D88iC2Y.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>P(()=>import(`./_CacY0gHj2.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>P(()=>import(`./_DkMIDB1P2.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>P(()=>import(`./_D0L-Bq8g.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>P(()=>import(`./_D7TvcnuF2.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>P(()=>import(`./_D8IpX4py2.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>P(()=>import(`./_C8oCnwJJ2.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>P(()=>import(`./_Dh228itO2.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>P(()=>import(`./_CxZEssPk2.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>P(()=>import(`./_Cvrh5tZx2.js`),[]))},{id:`html`,name:`HTML`,import:(()=>P(()=>import(`./_wvTh271a.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>P(()=>import(`./_BZDb9Hzx2.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>P(()=>import(`./_4zqifGZf2.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>P(()=>import(`./_CkeutYnJ2.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>P(()=>import(`./_DLbMbJfH2.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>P(()=>import(`./_CZbG8q4J2.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>P(()=>import(`./_DsUTQ-LC2.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>P(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>P(()=>import(`./_UWZzN8Rg.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>P(()=>import(`./_BPmHfnJD.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>P(()=>import(`./_BH7cFvM5.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>P(()=>import(`./_B-XihPlt.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>P(()=>import(`./_BpxZLi8K.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>P(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>P(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>P(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>P(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>P(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>P(()=>import(`./_sBNm9tCS.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>P(()=>import(`./_Cci4ZExC.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>P(()=>import(`./_Bvgyberk.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65])))},{id:`kdl`,name:`KDL`,import:(()=>P(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>P(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>P(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>P(()=>import(`./_Kzpu52En.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>P(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>P(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>P(()=>import(`./_DlC4k_XP.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>P(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>P(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>P(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>P(()=>import(`./_DBzS4J_k.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>P(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>P(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>P(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>P(()=>import(`./_B92xkQnk.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>P(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>P(()=>import(`./_DyNwE1Gc.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>P(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>P(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>P(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>P(()=>import(`./_CFuIV2fl.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>P(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>P(()=>import(`./_BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>P(()=>import(`./__X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>P(()=>import(`./_DWQbgPoS.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>P(()=>import(`./_DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>P(()=>import(`./_D99Y49OA.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>P(()=>import(`./_DZ0pRMJN2.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>P(()=>import(`./_IvuFDN5E2.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>P(()=>import(`./_CjNLYCLg2.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>P(()=>import(`./_DHYfO66s2.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>P(()=>import(`./_D1A_Heim2.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>P(()=>import(`./_BsSzOQcm2.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>P(()=>import(`./_O90oeIOV2.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>P(()=>import(`./_B1RWQWA52.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>P(()=>import(`./_BUDT5pXO2.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>P(()=>import(`./_BP2BHaYT2.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93])))},{id:`pascal`,name:`Pascal`,import:(()=>P(()=>import(`./_4ZHwLPI52.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>P(()=>import(`./_f4yPg-i-.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>P(()=>import(`./_DljpB8742.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>P(()=>import(`./_ot-7Btpt2.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>P(()=>import(`./_DGHpHOYJ2.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>P(()=>import(`./_BiJDBrnU2.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>P(()=>import(`./_C7UOKdEL2.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>P(()=>import(`./_BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>P(()=>import(`./_DNMTfnFr2.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>P(()=>import(`./_CCSX75yM2.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>P(()=>import(`./_DMgNhnYS2.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>P(()=>import(`./_iXnhIJG72.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>P(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>P(()=>import(`./_CRmHsbsL.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>P(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>P(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>P(()=>import(`./_gzcpVVnB2.js`),[]))},{id:`qml`,name:`QML`,import:(()=>P(()=>import(`./_CVQKEVHV.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>P(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>P(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>P(()=>import(`./_v4TxGuxE.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>P(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>P(()=>import(`./_B3gFvitq2.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>P(()=>import(`./_BUhKc7uT.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>P(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>P(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>P(()=>import(`./_Dmw0DArq.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>P(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>P(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>P(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>P(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>P(()=>import(`./_D4J5RQqK.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>P(()=>import(`./_CMGqtmQt.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>P(()=>import(`./_Cfkwpbl82.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>P(()=>import(`./_ByKU0Hfi.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>P(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>P(()=>import(`./_BiFt_7mu2.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>P(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>P(()=>import(`./_C9hmrTBV.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>P(()=>import(`./_bTVj8UrX2.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>P(()=>import(`./_BM315xPC.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>P(()=>import(`./_C9E3fz2-.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>P(()=>import(`./_B9STxcPh.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>P(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>P(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>P(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>P(()=>import(`./_DlsPVtFC.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>P(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>P(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>P(()=>import(`./_B_Wegq962.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>P(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>P(()=>import(`./_DIiEy_VP.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>P(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>P(()=>import(`./_D6xeqZLn.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>P(()=>import(`./_B01yJM_n.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>P(()=>import(`./_CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>P(()=>import(`./_Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>P(()=>import(`./_BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>P(()=>import(`./_CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>P(()=>import(`./_DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>P(()=>import(`./_CZd0xW_V2.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>P(()=>import(`./_BlPl6sCu2.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>P(()=>import(`./_DswuEJGm2.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>P(()=>import(`./_B6JLzfQk.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>P(()=>import(`./_CcmNWLt02.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>P(()=>import(`./_B-7M0VuK2.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>P(()=>import(`./_sltzmVWM2.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>P(()=>import(`./_ByaG8bWs.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>P(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>P(()=>import(`./_DbkjWa7i2.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>P(()=>import(`./_C2-Kd826.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>P(()=>import(`./_BRdr0IET2.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>P(()=>import(`./_DI99ib-x2.js`),[]))},{id:`v`,name:`V`,import:(()=>P(()=>import(`./_DBj4K9d_2.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>P(()=>import(`./_zf12oZj62.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>P(()=>import(`./_DOwzaHZ02.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>P(()=>import(`./_B2gwz-sJ2.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>P(()=>import(`./_BroJfC0k2.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>P(()=>import(`./_DvXPmvsu2.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>P(()=>import(`./_lBeubFtN2.js`),__vite__mapDeps([112,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>P(()=>import(`./_Dji7sUrK2.js`),__vite__mapDeps([113,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>P(()=>import(`./_BRURAzLu2.js`),__vite__mapDeps([114,2,3,5,12,70,115])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>P(()=>import(`./_CgoNMtux2.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>P(()=>import(`./_ByWQv1Qj2.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>P(()=>import(`./_C8pVoKbM2.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>P(()=>import(`./_BsKzXJz42.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>P(()=>import(`./_ClFFjSW22.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>P(()=>import(`./_DdvCle-K2.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>P(()=>import(`./_DLL8P-h_2.js`),[]))},{id:`xml`,name:`XML`,import:(()=>P(()=>import(`./_F3u8qQ9y.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>P(()=>import(`./_BmEd20O42.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>P(()=>import(`./_u3et6kdz.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>P(()=>import(`./_BnlCZFoB2.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>P(()=>import(`./_CMLA9XwU2.js`),[]))}],Ss=Object.fromEntries(xs.map(e=>[e.id,e.import])),Cs=Object.fromEntries(xs.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ws={...Ss,...Cs},Ts=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>P(()=>import(`./_vGVdxbeo2.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>P(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>P(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>P(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>P(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>P(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>P(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>P(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>P(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>P(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>P(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>P(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>P(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>P(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>P(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>P(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>P(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>P(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>P(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>P(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>P(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>P(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>P(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>P(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>P(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>P(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>P(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>P(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>P(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>P(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>P(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>P(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>P(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>P(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>P(()=>import(`./_DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>P(()=>import(`./_Bm3Qr25_2.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>P(()=>import(`./_2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>P(()=>import(`./_uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>P(()=>import(`./_CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>P(()=>import(`./_B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>P(()=>import(`./_BSWPekZh2.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>P(()=>import(`./_DDpmG2fV2.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>P(()=>import(`./_B_bV9PQ92.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>P(()=>import(`./_DhmEMT882.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>P(()=>import(`./_eJ-hLW7d2.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>P(()=>import(`./_Cb4Vim4T2.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>P(()=>import(`./_CLwyXe_n2.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>P(()=>import(`./_D7Lr4KcI2.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>P(()=>import(`./_DQwYfKfQ2.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>P(()=>import(`./_DRFjx7u42.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>P(()=>import(`./_DX1BQOs82.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>P(()=>import(`./_aMsaMD1D2.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>P(()=>import(`./_8PwUyIlP2.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>P(()=>import(`./_DO-qXg-I2.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>P(()=>import(`./_DnToyrRv2.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>P(()=>import(`./_B2OO5cIa2.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>P(()=>import(`./_4G7pJPwS2.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>P(()=>import(`./_UdsmMDCL2.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>P(()=>import(`./_C1IUL_tW2.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>P(()=>import(`./_nFMaYfgc2.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>P(()=>import(`./_oM2G3aXe2.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>P(()=>import(`./_DdrHHSXu2.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>P(()=>import(`./_fwtXNY1n2.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>P(()=>import(`./_BZCL-v6S2.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>P(()=>import(`./_VbXTXTou2.js`),[]))}].map(e=>[e.id,e.import])),Es=Re({createOnigurumaEngine:()=>Qs,getDefaultWasmLoader:()=>Zs,loadWasm:()=>Gs,setDefaultWasmLoader:()=>Xs}),Ds=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Os(){return 2147483648}function ks(){return typeof performance<`u`?performance.now():Date.now()}var As=(e,t)=>e+(t-e%t)%t;async function js(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Os();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,As(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:ks,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var Ms=Object.defineProperty,Ns=(e,t,n)=>t in e?Ms(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t,n)=>Ns(e,typeof t==`symbol`?t:t+``,n),q=null;function Ps(e){throw new Ds(e.UTF8ToString(e.getLastOnigError()))}var Fs=class e{constructor(t){K(this,`utf16Length`),K(this,`utf8Length`),K(this,`utf16Value`),K(this,`utf8Value`),K(this,`utf16OffsetToUtf8`),K(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Is=class e{constructor(t){if(K(this,`id`,++e.LAST_ID),K(this,`_onigBinding`),K(this,`content`),K(this,`utf16Length`),K(this,`utf8Length`),K(this,`utf16OffsetToUtf8`),K(this,`utf8OffsetToUtf16`),K(this,`ptr`),!q)throw new Ds(`Must invoke loadWasm first.`);this._onigBinding=q,this.content=t;let n=new Fs(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=q.omalloc(1e4),e._sharedPtrInUse=!0,q.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(q)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};K(Is,`LAST_ID`,0),K(Is,`_sharedPtr`,0),K(Is,`_sharedPtrInUse`,!1);var Ls=Is,Rs=class{constructor(e){if(K(this,`_onigBinding`),K(this,`_ptr`),!q)throw new Ds(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Fs(e[r]);t[r]=i.createString(q),n[r]=i.utf8Length}let r=q.omalloc(4*e.length);q.HEAPU32.set(t,r/4);let i=q.omalloc(4*e.length);q.HEAPU32.set(n,i/4);let a=q.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)q.ofree(t[n]);q.ofree(i),q.ofree(r),a===0&&Ps(q),this._onigBinding=q,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Ls(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function zs(e){return typeof e.instantiator==`function`}function Bs(e){return typeof e.default==`function`}function Vs(e){return e.data!==void 0}function Hs(e){return typeof Response<`u`&&e instanceof Response}function Us(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var Ws;function Gs(e){if(Ws)return Ws;async function t(){q=await js(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),zs(n)?n=await n.instantiator(t):Bs(n)?n=await n.default(t):(Vs(n)&&(n=n.data),Hs(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await qs(n)(t):await Js(n)(t):Us(n)||n instanceof WebAssembly.Module?n=await Ks(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Ks(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Ws=t(),Ws}function Ks(e){return t=>WebAssembly.instantiate(e,t)}function qs(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Js(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Ys;function Xs(e){Ys=e}function Zs(){return Ys}async function Qs(e){return e&&await Gs(e),{createScanner(e){return new Rs(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Ls(e)}}}var $s=vs({});bs($s,Es);var J=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function ec(e){return tc(e)}function tc(e){return Array.isArray(e)?nc(e):e instanceof RegExp?e:typeof e==`object`?rc(e):e}function nc(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=tc(e[n]);return t}function rc(e){let t={};for(let n in e)t[n]=tc(e[n]);return t}function ic(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function ac(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?ac(e.substring(0,e.length-1)):e.substr(~t+1)}var oc=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,sc=class{static hasCaptures(e){return e!==null&&(oc.lastIndex=0,oc.test(e))}static replaceCaptures(e,t,n){return e.replace(oc,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function cc(e,t){return e<t?-1:+(e>t)}function lc(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=cc(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function uc(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function dc(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var fc=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},pc=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(vc(e),t)}static createFromParsedTheme(e,t){return bc(e,t)}_cachedMatchRoot=new fc(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>hc(e.parent,t.parentScopes));return n?new _c(n.fontStyle,n.foreground,n.background):null}},mc=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function hc(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!gc(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function gc(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var _c=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function vc(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&uc(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&uc(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new yc(l,u,e,o,s,c)}}return n}var yc=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Y=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Y||{});function bc(e,t){e.sort((e,t)=>{let n=cc(e.scope,t.scope);return n!==0||(n=lc(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new xc(t),o=new _c(n,a.getId(r),a.getId(i)),s=new wc(new Cc(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new pc(a,o,s)}var xc=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Sc=Object.freeze([]),Cc=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Sc,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},wc=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Cc.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(lc(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Cc(e,t,n,r,i))}},Tc=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Dc(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Ec(e){return e}function Dc(e){return e}function Oc(e,t){let n=[],r=Ac(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(kc(i)){let e=[];do e.push(i),i=r.next();while(kc(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function kc(e){return!!e&&!!e.match(/[\w\.:]+/)}function Ac(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function jc(e){typeof e.dispose==`function`&&e.dispose()}var Mc=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Nc=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Pc=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Fc=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Mc(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Pc;for(let n of e)Ic(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Mc){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Ic(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Mc?Rc({baseGrammar:a,selfGrammar:i},r):Lc(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Mc(e))}function Lc(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];zc([r],t,n)}}function Rc(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&zc(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&zc(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function zc(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?ic({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&zc(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Gc(i);switch(a.kind){case 0:Rc({...t,selfGrammar:t.baseGrammar},n);break;case 1:Rc(t,n);break;case 2:Lc(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Lc(a.ruleName,i,n):Rc(i,n)}else a.kind===4?n.add(new Nc(a.scopeName,a.ruleName)):n.add(new Mc(a.scopeName))}}}var Bc=class{kind=0},Vc=class{kind=1},Hc=class{constructor(e){this.ruleName=e}kind=2},Uc=class{constructor(e){this.scopeName=e}kind=3},Wc=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Gc(e){if(e===`$base`)return new Bc;if(e===`$self`)return new Vc;let t=e.indexOf(`#`);return t===-1?new Uc(e):t===0?new Hc(e.substring(1)):new Wc(e.substring(0,t),e.substring(t+1))}var Kc=/\\(\d+)/,qc=/\\(\d+)/g,Jc=-1,Yc=-2;function Xc(e){return e}function Zc(e){return e}var Qc=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=sc.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=sc.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${ac(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:sc.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:sc.replaceCaptures(this._contentName,e,t)}},$c=class extends Qc{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},el=class extends Qc{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new al(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ol,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},tl=class extends Qc{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ol,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},nl=class extends Qc{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new al(i,this.id),this.beginCaptures=a,this._end=new al(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ol;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},rl=class extends Qc{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new al(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new al(o,Yc),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ol;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ol,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},il=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new $c(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new el(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=ic({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new tl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new rl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new nl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Gc(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof tl||e instanceof nl||e instanceof rl)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},al=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Kc.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return qc.lastIndex=0,this.source.replace(qc,(e,t)=>dc(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ol=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new sl(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new sl(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},sl=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
35
35
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},cl=class{constructor(e,t){this.languageId=e,this.tokenType=t}},ll=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new cl(e,8),this._embeddedLanguagesMatcher=new ul(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new cl(0,0);_getBasicScopeAttributes=new fc(e=>new cl(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ul=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>dc(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var dl=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function fl(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=pl(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new dl(i,!0);f()}return new dl(i,!1);function f(){let o=ml(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Jc){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),yl(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof nl){let r=o;yl(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof rl){let r=o;yl(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(yl(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function pl(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof rl&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=vl(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Yc){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),yl(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function ml(e,t,n,r,i,a){let o=hl(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=gl(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function hl(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=_l(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function gl(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=_l(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function _l(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function vl(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function yl(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));fl(e,p,n&&d.start===0,d.start,f,i,!1,0),jc(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new bl(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var bl=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function xl(e,t,n,r,i,a,o,s){return new Tl(e,t,n,r,i,a,o,s)}function Sl(e,t,n,r,i){let a=Oc(t,Cl),o=il.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Cl(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(wl(t[r],e))return n=r+1,!0;return!1})}function wl(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var Tl=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new ll(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=El(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Oc(e,Cl);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)Sl(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&Sl(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(Xc(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Zc(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=El(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=il.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Ol.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Tc.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Dl.createRootAndLookUpScopeName(a,r,this):Dl.createRoot(`unknown`,r),t=new Ol(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
36
36
|
`;let a=this.createOnigString(e),o=a.content.length,s=new Al(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=fl(this,a,i,0,t,s,!0,r);return jc(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function El(e,t){return e=ec(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Dl=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=mc.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new mc(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new mc(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Tc.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Ol=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Dl.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Zc(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Dl.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Xc(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Dl.fromExtension(r,n.contentNameScopesList))}},kl=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Oc(e,Cl).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Oc(e,Cl).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Al=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Tc.set(n,0,Ec(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Tc.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},jl=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,xl(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Ml=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new jl(pc.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(pc.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new kl(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Fc(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Nl=Ol.NULL;function Pl(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function Fl(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Il(e){return Array.isArray(e)?e:[e]}async function Ll(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Rl(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function zl(e){return e===`ansi`||Rl(e)}function Bl(e){return e===`none`}function Vl(e){return Bl(e)}var Hl=/(\r?\n)/g;function Ul(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Hl),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Wl={light:`#333333`,dark:`#bbbbbb`},Gl={light:`#fffffe`,dark:`#1e1e1e`},Kl=`__shiki_resolved`;function ql(e){if(e?.[Kl])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?Wl.light:Wl.dark,n||=t.type===`light`?Gl.light:Gl.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Kl,{enumerable:!1,writable:!1,value:!0}),t}async function Jl(e){return[...new Set((await Promise.all(e.filter(e=>!zl(e)).map(async e=>await Ll(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Yl(e){return(await Promise.all(e.map(async e=>Vl(e)?null:ql(await Ll(e))))).filter(e=>!!e)}function Xl(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new J(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Zl=class extends Ml{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=ql(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=pc.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Xl(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new J(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Ql=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},$l=0;function eu(e){$l+=1,e.warnings!==!1&&$l>=10&&$l%10==0&&console.warn(`[Shiki] ${$l} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new J("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(ql),i=new Zl(new Ql(e.engine,n),r,n,e.langAlias),a;function o(t){return Xl(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new J(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new J(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Jl(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Yl(e))}function g(){if(t)throw new J(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--$l)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function tu(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Yl(e.themes||[]),Jl(e.langs||[]),e.engine]);return eu({...e,themes:t,langs:n,engine:r})}var nu=new WeakMap;function ru(e,t){nu.set(e,t)}function iu(e){return nu.get(e)}var au=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(Il(n).map(e=>[e,Nl])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return ou(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ou(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function su(e,t){if(!(e instanceof au))throw new J(`Invalid grammar state`);return e.getInternalStack(t)}var cu=/,/,lu=/ /;function uu(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Rl(e.resolveLangAlias(n.lang||`text`))||Bl(r))return Ul(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new J(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new J(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return fu(t,o,i,a,n)}function du(...e){if(e.length===2)return iu(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Rl(i)||Bl(a))throw new J(`Plain language does not have grammar state`);if(i===`ansi`)throw new J(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new au(pu(n,c,o,s,r).stateStack,c.name,o.name)}function fu(e,t,n,r,i){let a=pu(e,t,n,r,i),o=new au(a.stateStack,t.name,n.name);return ru(a.tokens,o),a.tokens}function pu(e,t,n,r,i){let a=Pl(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=Ul(e),u=i.grammarState?su(i.grammarState,n.name)??Nl:i.grammarContextCode==null?Nl:pu(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=Fl(r[Tc.getForeground(s)],a),u=Tc.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=Tc.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(cu).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(lu))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?mu(t.scopes):hu(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function mu(e){return e.map(e=>({scopeName:e}))}function hu(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:vu(e,i,t.slice(0,r))}}return n}function gu(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function _u(e,t,n){if(!gu(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)gu(e[r],n[i])&&--r,--i;return r===-1}function vu(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(_u(e,t,n)){r.push(a);break}return r}function yu(e,t,n,r=uu){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:iu(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=bu(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new au(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&ru(s,c),s}function bu(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var xu=/\s+/g;function Su(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(xu)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(xu);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var Cu=/:?lang=["']([^"']+)["']/g,wu=/(?:```|~~~)([\w-]+)/g,Tu=/\\begin\{([\w-]+)\}/g,Eu=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,Du=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function Ou(e){let t=Ul(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function ku(e,t,n){let r=new Set;for(let t of e.matchAll(Cu)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(wu)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(Tu)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(Eu)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(Du.test(e)&&r.add(`yaml`),!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var Au=[`color`,`background-color`];function ju(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function Mu(e,t){let n=0,r=e.length;for(;n<r;){let i=n+(r-n>>1);e[i]<=t?n=i+1:r=i}return n}function Nu(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=e.offset+e.content.length,r=Mu(n,e.offset),i=r;for(;i<n.length&&n[i]<t;)i++;if(r===i)return e;let a=n.slice(r,i);for(let t=0;t<a.length;t++)a[t]-=e.offset;return ju(e,a)})):e}function Pu(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>Fu(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&Au.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new J('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||`inherit`,d=o[r][a]||`inherit`;c[a]=`light-dark(${u}, ${d})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s}else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function Fu(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&Y.Italic&&(t[`font-style`]=`italic`),e.fontStyle&Y.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&Y.Underline&&n.push(`underline`),e.fontStyle&Y.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function Iu(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function Lu(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=Ou(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new J(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new J(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new J(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));Ru(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return Nu(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new J(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=zu(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new J(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new J(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&Su(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function Ru(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new J(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new J(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function zu(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(zu).join(``):``}var Bu=[Lu()];function Vu(e){let t=Hu(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Bu]}function Hu(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Uu=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Wu={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Gu(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Ku(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function qu(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r)){if(r===0)t.push({type:`resetAll`});else if(r<=9)Wu[r]&&t.push({type:`setDecoration`,value:Wu[r]});else if(r<=29){let e=Wu[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Uu[r-30]}});else if(r===38){let n=Ku(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Uu[r-40]}});else if(r===48){let n=Ku(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Uu[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Uu[r-100+8]}})}}return t}function Ju(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Gu(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=qu(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Yu={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function Xu(e=Yu){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Uu.length;e++)r.push(t(Uu[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Zu=/#([0-9a-f]{3,8})/i,Qu=/var\((--[\w-]+-ansi-[\w-]+)\)/,$u={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function ed(e,t,n){let r=Pl(e,n),i=Ul(t),a=Xu(Object.fromEntries(Uu.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||$u[t]]}))),o=Ju();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=Fl(i,r),o=Fl(o,r),n.decorations.has(`dim`)&&(i=td(i));let s=Y.None;return n.decorations.has(`bold`)&&(s|=Y.Bold),n.decorations.has(`italic`)&&(s|=Y.Italic),n.decorations.has(`underline`)&&(s|=Y.Underline),n.decorations.has(`strikethrough`)&&(s|=Y.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function td(e){let t=e.match(Zu);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(Qu);return n?`var(${n[1]}-dim)`:e}function nd(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!Rl(r)&&!Bl(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return ed(r,t,n)}return uu(e,t,n)}function rd(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new J("`themes` option must not be empty");let p=yu(e,t,n,nd);if(c=iu(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new J(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>Pu(e,h,u,l,d))),c&&ru(a,c);let g=f.map(e=>Pl(e.theme,n));i=id(f,m,g,u,l,`fg`,d),r=id(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=Pl(n.theme,n);a=nd(e,t,n);let l=e.getTheme(n.theme);r=Fl(l.bg,s),i=Fl(l.fg,s),o=l.name,c=iu(a)}else throw new J("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function id(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=Fl(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new J('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Fl(t[r][a],n[r])||`inherit`}, ${Fl(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var ad=/^\s+$/,od=/^(\s*)(.*?)(\s*)$/;function sd(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>sd(e,t,n),codeToTokens:(t,n)=>rd(e,t,n)}){let i=t;for(let e of Vu(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=rd(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=ld(a):d===`never`&&(a=ud(a)),f&&(a=dd(a));let p={...r,get source(){return i}};for(let e of Vu(n))a=e.tokens?.call(p,a)||a;return cd(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function cd(e,t,n,r=iu(e)){let i=Vu(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:Su,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
37
37
|
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=Iu(a.htmlStyle||Fu(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&ru(m,r),m}function ld(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&Y.Underline||i.fontStyle&Y.Strikethrough));o&&ad.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function ud(e){return e.map(e=>e.flatMap(e=>{if(ad.test(e.content))return e;let t=e.content.match(od);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function dd(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=Iu(e.htmlStyle||Fu(e)),i=Iu(n.htmlStyle||Fu(n)),a=e.fontStyle&&(e.fontStyle&Y.Underline||e.fontStyle&Y.Strikethrough),o=n.fontStyle&&(n.fontStyle&Y.Underline||n.fontStyle&Y.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var fd=Ao;function pd(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>sd(e,t,n),codeToTokens:(t,n)=>rd(e,t,n)},i=fd(sd(e,t,n,r));for(let e of Vu(n))i=e.postprocess?.call(r,i,n)||i;return i}async function md(e){let t=await tu(e);return{getLastGrammarState:(...e)=>du(t,...e),codeToTokensBase:(e,n)=>nd(t,e,n),codeToTokensWithThemes:(e,n)=>yu(t,e,n),codeToTokens:(e,n)=>rd(t,e,n),codeToHast:(e,n)=>sd(t,e,n),codeToHtml:(e,n)=>pd(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function hd(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,zl(n))return[];let r=t[n];if(!r)throw new J(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(Vl(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new J(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await md({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function gd(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function _d(e,t){let n=gd(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var vd=hd({langs:ws,themes:Ts,engine:()=>(0,$s.createOnigurumaEngine)(P(()=>import(`./_BnjxR4X6.js`),[]))}),{codeToHtml:yd,codeToHast:bd,codeToTokens:xd,codeToTokensBase:Sd,codeToTokensWithThemes:Cd,getSingletonHighlighter:wd,getLastGrammarState:Td}=_d(vd,{guessEmbeddedLanguages:ku}),Ed=4294967295,Dd=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:Ed,end:Ed,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function Od(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function kd(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var Ad=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),X=String.raw;function jd(e,t){if(e==null)throw Error(t??`Value expected`);return e}var Md=X`\[\^?`,Nd=`c.? | C(?:-.?)?|${X`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${X`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${X`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${X`o\{[^\}]*\}?`}|${X`\d{1,3}`}`,Pd=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Fd=new RegExp(X`
|
|
@@ -1528,4 +1528,4 @@ XID_Start XIDS`.split(/\s/).map(e=>[np(e),e])),Jp=new Map([[`s`,Z(383)],[Z(383),
|
|
|
1528
1528
|
`))return`
|
|
1529
1529
|
`;if(t.endsWith(`\r`))return`\r`}return`
|
|
1530
1530
|
`}function ny(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function ry(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function iy(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function ay(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.lineCountKnown===t.lineCountKnown&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}async function oy(e,t=300){let n;try{await Promise.race([e(),new Promise(e=>{n=setTimeout(e,t)})])}finally{n!=null&&clearTimeout(n)}}function sy({oldFile:e,newFile:t},n){if(e!==void 0||t!==void 0){if(e===void 0||t===void 0)throw Error(`${n}: Pass null for an intentionally missing oldFile or newFile side`);if(e===null){if(t===null)throw Error(`${n}: You must pass oldFile, newFile, or both`);return{oldFile:e,newFile:t}}return{oldFile:e,newFile:t}}}function cy(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:$g(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,loadDiffFiles:e?.loadDiffFiles,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}function ly(e){return e.isPartial&&(e.type===`change`||e.type===`rename-changed`||e.type===`rename-pure`)}var uy=-1,dy=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++uy}`;type=`file-diff`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerFilenameSuffix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;pendingFiles;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(e={theme:Jn},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new $o,this.scrollSyncManager=new __,this.interactionManager=new No(`diff`,Po(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(e){return cy(e)}createHunksRenderer(e){return new Vv(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>{let n=this.fileDiffCache;if(n==null)return;let r=n.hunks.at(-1),i,a;hunkIterator:for(let o of n.hunks){let n=t===`deletions`?o.deletionStart:o.additionStart,s=t===`deletions`?o.deletionCount:o.additionCount,c=_r(n,s)+1,l=o.splitLineStart,u=o.unifiedLineStart;if(e<c){let t=c-e;i=Math.max(u-t,0),a=Math.max(l-t,0);break hunkIterator}if(e>=c+s){if(o===r){let t=e-(c+s);i=u+o.unifiedLineCount+t,a=l+o.splitLineCount+t;break hunkIterator}continue}for(let n of o.hunkContent)if(n.type===`context`){if(e<c+n.lines){let t=e-c;a=l+t,i=u+t;break hunkIterator}c+=n.lines,l+=n.lines,u+=n.lines}else{let r=t===`deletions`?n.deletions:n.additions;if(e<c+r){let r=e-c;i=u+(t===`additions`?n.deletions:0)+r,a=l+r;break hunkIterator}c+=r,l+=Math.max(n.deletions,n.additions),u+=n.deletions+n.additions}break hunkIterator}if(i!=null&&a!=null)return[i,a]};setOptions(e){e!=null&&(this.options=e,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(Po(this.options,typeof this.options.hunkSeparators==`function`||(this.options.hunkSeparators??`line-info`)===`line-info`||this.options.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!cr(this.appliedThemeCSS.theme,this.options.theme??Jn)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.lineStateRefreshPending?this.deferredSelectedLines=[e,t]:this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.lineStateRefreshPending?this.deferredEditorActiveLine=[e,t]:this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??`additions`})}flushDeferredLineState(){let{deferredEditorActiveLine:e,deferredSelectedLines:t}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,e!=null&&this.setEditorActiveLine(...e),t!=null&&this.interactionManager.setSelection(...t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t===`wrap`,columnVariables:this.shouldApplyColumnVariables(t)?`apply`:`measure`}),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(e){return typeof this.options.hunkSeparators==`function`||e===`scroll`&&(this.lineAnnotations.length>0||this.pre?.hasAttribute(`data-has-merge-conflict`)===!0)}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(e){this.codeUnified!=null&&(this.codeUnified.scrollLeft=e),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=e),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=e)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(e=!1){or(this.handleEditSessionRender),this.emitPostRender(!0),this.editor?.cleanUp(e),this.editor=void 0,this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.pendingFiles=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate({fileContainer:e,prerenderedHTML:t,preventEmit:n=!1,lineAnnotations:r,fileDiff:i,...a}){if(!this.enabled)throw Error(`FileDiff.hydrate: attempting to call hydrate after cleaned up`);if(this.fileContainer!=null)throw Error(`FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated`);let o=sy(a,`FileDiff.hydrate`),s=o?.oldFile,c=o?.newFile;this.hydrateElements(e,t),hy(this.pre,py({fileDiff:i,oldFile:s,newFile:c}),this.options.collapsed)||gy(this.headerElement,my({fileDiff:i,oldFile:s,newFile:c}),this.options.disableFileHeader)?this.render({...a,fileContainer:e,lineAnnotations:r,fileDiff:i,preventEmit:!0}):this.hydrationSetup({fileDiff:i,lineAnnotations:r,...o}),n||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),Xg(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)!(e instanceof HTMLElement)||e.tagName.toLowerCase()!==`code`||(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!==void 0&&n!==void 0?yi(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.loadFilesIfNecessary(),this.rerender()};loadFilesIfNecessary(){let{fileDiff:e,options:{loadDiffFiles:t}}=this;e==null||t==null||!ly(e)||this.pendingFiles?.fileDiff===e||(this.pendingFiles={fileDiff:e,promise:this.loadFilesForDiff(e,t)})}async loadFilesForDiff(e,t){try{let n=await t(e);if(!this.enabled||this.fileDiff!==e)return;await this.handleFilesLoaded(e,n)}catch(e){if(this.options.disableErrorHandling===!0)throw e;console.error(e)}finally{this.pendingFiles?.fileDiff===e&&(this.pendingFiles=void 0)}}async handleFilesLoaded(e,t){this.fileDiff!==e||!e.isPartial||(c_(`merge`,e,t),this.setHydratedState(t),await oy(()=>this.primeHighlightCache(e)),!(!this.enabled||this.fileDiff!==e)&&this.rerender())}setHydratedState(e){this.deletionFile=e.oldFile,this.additionFile=e.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:e,deferManagers:t=!1,forceRender:n=!1,preventEmit:r=!1,lineAnnotations:i,fileContainer:a,containerWrapper:o,renderRange:s,...c}){let l=sy(c,`FileDiff.render`),u=l?.oldFile,d=l?.newFile;if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);e!=null&&e.cacheKey===void 0&&(e.cacheKey=e.prevName==null?e.name:e.prevName+`:`+e.name),this.editor?.__postponeBgTokenizeToNextFrame();let{collapsed:f=!1,themeType:p=`system`,expandUnchanged:m=!1}=this.options,h=f?void 0:s,g=this.hasThemeChanged(),_=l!=null,v=_&&(!fy(u,this.deletionFile)||!fy(d,this.additionFile)),y=e!=null&&e!==this.fileDiff,b=i!=null&&(i.length>0||this.lineAnnotations.length>0)&&i!==this.lineAnnotations;if(!f&&Vh(h,this.renderRange)&&!n&&!b&&!g&&(e!=null&&e===this.fileDiff||e==null&&!v))return this.applyCachedThemeState(p);let x;e==null&&_&&(v||this.fileDiff==null)&&(x=yi(l.oldFile,l.newFile,this.options.parseDiffOptions));let{renderRange:S}=this;if(this.renderRange=h,_?(this.deletionFile=u,this.additionFile=d):e!=null&&(this.deletionFile=void 0,this.additionFile=void 0),e==null?x!=null&&(y=!0,this.fileDiff=x):this.fileDiff=e,y&&(this.cachedHeaderHTML=void 0),i!=null&&this.setLineAnnotations(i),this.fileDiff==null)return!1;this.fileDiff.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(Cv(this.fileDiff,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),m&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);let{disableErrorHandling:C=!1,disableFileHeader:w=!1}=this.options;if(w&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),a=this.getOrCreateFileContainer(a,o),this.applyCachedThemeState(p),f){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(this.fileDiff,nr);e!=null&&this.applyThemeState(a,e.themeStyles,p,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,a),this.renderSeparators([]),this.injectUnsafeCSS()}catch(e){if(C)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(a);if(!(this.canPartiallyRender(n,b,v||y||g)&&this.applyPartialRender({previousRenderRange:S,renderRange:h}))){let t=this.hunksRenderer.renderDiff(this.fileDiff,h);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(a,t.themeStyles,p,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,a),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData)}this.applyBuffers(e,h),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,t||this.flushManagers(),this.editor!=null&&this.syncRenderViewToEditor()}catch(e){if(C)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}get fileDiffCache(){return this.hunksRenderer.diffCache??this.fileDiff}syncRenderViewToEditor(){let e=this.editor,t=this.fileContainer,n=this.fileDiffCache,r=this.lineAnnotations,i=this.computeEditorRenderRange(this.renderRange);e!=null&&t!=null&&n!=null&&!n.isPartial&&this.hunksRenderer.initializeHighlighter().then(a=>{!this.enabled||this.editor!==e||this.fileContainer!==t||this.fileDiffCache!==n||e.__syncRenderView(a,t,n,r,i)})}computeEditorRenderRange(e){let t=this.fileDiffCache;if(e==null||t==null||T_(e))return e;let{diffStyle:n=`split`,expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a,o;return F_({diff:t,diffStyle:n,startingLine:e.startingLine,totalLines:e.totalLines,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({additionLine:e})=>{e!=null&&(a??=e.lineNumber,o=e.lineNumber)}}),a==null||o==null?{...e,startingLine:0,totalLines:0}:{...e,startingLine:a-1,totalLines:o-a+1}}attachEditor(e){if(this.type!==`file-diff`)throw Error(`FileDiff.attachEditor: cannot attach an editor to a "${this.type}" diff`);return this.editor?.cleanUp(),this.editor=e,this.hunksRenderer.beginEditSession(),this.fileDiff?.isPartial===!0&&this.loadFilesIfNecessary(),this.hunksRenderer.editorRenderReady()?this.syncRenderViewToEditor():this.rerender(),e=>{this.editor=void 0,e!==!0&&this.finishEditSession()}}finishEditSession(){this.hunksRenderer.endEditSession(),this.completeEditSession()}completeEditSession(){let e=this.fileDiffCache;if(e==null||e.editSessionDirty!==!0)return!1;let{collapsedContextThreshold:t=1}=this.options,n=xv(e,this.hunksRenderer.getExpandedHunksMap(),t);return Cv(e,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(Sv(e,n)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(e,t){this.hunksRenderer.applyDocumentChange(e);let n=this.hunksRenderer.diffCache;if(n!=null){let e=this.fileDiff?.cacheKey;e!=null&&n.cacheKey==null&&(n.cacheKey=e),this.fileDiff=n}t!==void 0&&t!==this.lineAnnotations&&(this.setLineAnnotations(t),this.hunksRenderer.setLineAnnotations(this.lineAnnotations),this.renderAnnotations()),this.rerender(),this.interactionManager.setSelectionDirty()}updateRenderCache(e,t,n={}){let{shouldRefreshDiffsView:r,lineCountChangeInFlight:i}=n;if(this.hunksRenderer.updateRenderCache(e,t,i)){this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender();return}r===!0&&(this.refreshViewTimeout!=null&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,this.options.diffStyle===`split`?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}isLineRenderable(e){let t=this.fileDiffCache;if(t==null)return!0;let{expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options;return N_({fileDiff:t,lineNumber:e,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r})}getNearestRenderableLine(e,t){let n=this.fileDiffCache;if(n==null)return e;let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options;return P_({fileDiff:n,lineNumber:e,direction:t,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i})}revealLine(e){let t=this.fileDiffCache,{expandUnchanged:n=!1,collapsedContextThreshold:r=1,expansionLineCount:i=100}=this.options;if(t==null||t.isPartial||n)return!1;let a=this.hunksRenderer.getExpandedHunksMap();for(let[n,o]of t.hunks.entries()){let[s,c]=O_(o);if(e<s){let c=k_({isPartial:t.isPartial,rangeSize:o.collapsedBefore,expandedHunks:a,hunkIndex:n,collapsedContextThreshold:r}),l=s-c.rangeSize;if(c.renderAll||e<l+c.fromStart||e>=s-c.fromEnd)return!1;let u=e-(l+c.fromStart)+1,d=s-c.fromEnd-e;return u<=d?this.expandHunk(n,`up`,u+i):this.expandHunk(n,`down`,d+i),!0}if(e<c)return!1}let o=M_({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:a,collapsedContextThreshold:r,errorPrefix:`FileDiff.revealLine`});if(o==null||o.renderAll)return!1;let s=t.hunks[t.hunks.length-1],[,c]=O_(s);return e<c+o.fromStart||e>=c+o.rangeSize?!1:(this.expandHunk(t.hunks.length,`up`,e-(c+o.fromStart)+1+i),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){ar(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}async primeHighlightCache(e=this.fileDiff){let{workerManager:t}=this;if(e==null||t==null||!t.isWorkingPool()||e.cacheKey==null||zv(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||await t.primeDiffHighlightCache(e).catch(e=>{console.error(e)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!ay(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(let[n,r]of this.lineAnnotations.entries()){let i=`${n}-${$h(r)}`,a=this.annotationCache.get(i);if(a==null||!iy(r,a.annotation)){a?.element.remove();let e=t(r);if(e==null)continue;a={element:Ig($h(r)),annotation:r},a.element.appendChild(e),this.fileContainer.appendChild(a.element),this.annotationCache.set(i,a)}e.delete(i)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=Lg();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return n!=null&&i&&this.editor?.__captureFocusForDOMReplacement(),i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:Qg(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):Qg(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=Mg;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{fileDiff:n}=this,r=this.cachedHeaderHTML??Ao(e);if(this.cachedHeaderHTML=r,r!==this.lastRenderedHeaderHTML){let e=document.createElement(`div`);e.innerHTML=r;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged||n==null)return;let{renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderFilenameSuffix:o,renderHeaderMetadata:s}=this.options;if(i!=null){let e=i(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,qn,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}let c=a?.(n)??void 0,l=o?.(n)??void 0,u=s?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,Wn,c),this.headerFilenameSuffix=this.upsertHeaderSlotElement(t,this.headerFilenameSuffix,Gn,l),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,Kn,u),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=Rg(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=Gg(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.options.theme??Jn,s=typeof o==`string`?o:{...o},c=Vg(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=t_({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:Kg(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=qg(this.themeCSSStyle.textContent??``,Vg(e)))}shouldGuardRebuildScroll(){return this.editor!=null&&i_()}applyHunksToDOM(e,t){this.shouldGuardRebuildScroll()?e_(e,()=>this.replaceCodeColumns(e,t)):this.replaceCodeColumns(e,t)}applyCodeColumnsInPlace(e,t,n){let r=this.getColumnPair(e);if(r==null)return!1;let i=_y(t[0]),a=_y(t[1]);return i==null||a==null?!1:(r.gutter.innerHTML=Ao(i),r.content.innerHTML=Ao(a),n!==this.lastRowCount&&(r.gutter.style.setProperty(`grid-row`,`span ${n}`),r.content.style.setProperty(`grid-row`,`span ${n}`)),!0)}replaceCodeColumns(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);this.editor?.__captureFocusForDOMReplacement(),s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=Yg({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeDeletions,c,t.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c)),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=Yg({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeAdditions,l,t.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l)),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=Yg({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeUnified,s,t.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s)),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({previousRenderRange:e,renderRange:t}){let{pre:n,codeUnified:r,codeAdditions:i,codeDeletions:a,options:{diffStyle:o=`split`}}=this;if(n==null||e==null||t==null||!Number.isFinite(e.totalLines)||!Number.isFinite(t.totalLines)||this.lastRowCount==null)return!1;let s=this.getCodeColumns(o,r,a,i);if(s==null)return!1;let c=e.startingLine,l=t.startingLine,u=c+e.totalLines,d=l+t.totalLines,f=Math.max(c,l),p=Math.min(u,d);if(p<=f)return!1;let m=Math.max(0,f-c),h=Math.max(0,u-p),g=this.trimColumns({columns:s,trimStart:m,trimEnd:h,previousStart:c,overlapStart:f,overlapEnd:p,diffStyle:o});if(g<0)throw Error(`FileDiff.applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<g)throw Error(`FileDiff.applyPartialRender: trimmed beyond DOM row count`);let _=this.lastRowCount-g,v=(e,t)=>{if(!(t<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:e,totalLines:t,bufferBefore:0,bufferAfter:0})},y=v(l,Math.max(f-l,0));if(y==null&&l<f)return!1;let b=v(p,Math.max(d-p,0));if(b==null&&d>p)return!1;let x=(e,t)=>{if(e!=null){if(o===`unified`&&!Array.isArray(s))this.insertPartialHTML(o,s,e,t);else if(o===`split`&&Array.isArray(s))this.insertPartialHTML(o,s,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);_+=e.rowCount}};return this.cleanupErrorWrapper(),x(y,`afterbegin`),x(b,`beforeend`),this.lastRowCount!==_&&(this.applyRowSpan(o,s,_),this.lastRowCount=_),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}refreshSplitDiffView(){if(this.options.diffStyle!==`split`)return;let e=this.hunksRenderer.renderDiff(this.fileDiff,this.renderRange);if(e==null)return;let t=this.getCodeColumns(`split`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(t))return;let n=(t,n)=>{if(n==null)return;let r=this.hunksRenderer.renderCodeAST(t,e),i=_y(r?.[0]),a=_y(r?.[1]);for(let[e,t]of[[n.gutter,i],[n.content,a]])if(t!=null&&e.childElementCount===t.length)for(let n=0;n<t.length;n++){let r=e.children[n],i=t[n].properties[`data-line-type`];i!=null&&r.dataset.lineType!==i&&(r.dataset.lineType=i)}};n(`deletions`,t[0]),n(`additions`,t[1])}refreshUnifiedDiffView(){if(this.options.diffStyle!==`unified`)return;let e=this.hunksRenderer.renderDiff(this.fileDiff,this.renderRange);if(e==null)return;let t=this.getCodeColumns(`unified`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(t==null||Array.isArray(t))return;let n=this.hunksRenderer.renderCodeAST(`unified`,e),r=_y(n?.[0]),i=_y(n?.[1]),a=()=>{for(let[e,n]of[[t.gutter,r],[t.content,i]])n!=null&&(e.innerHTML=Ao(n));e.rowCount!==this.lastRowCount&&(this.applyRowSpan(`unified`,t,e.rowCount),this.lastRowCount=e.rowCount)};this.shouldGuardRebuildScroll()?e_(this.pre,a):a(),this.renderSeparators(e.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=_y(t[0]),i=_y(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getColumnPair(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(!(!(t instanceof HTMLElement)||!(n instanceof HTMLElement)||t.dataset.gutter==null||n.dataset.content==null))return{gutter:t,content:n}}getCodeColumns(e,t,n,r){if(e===`unified`)return this.getColumnPair(t);{let e=this.getColumnPair(n),t=this.getColumnPair(r);return e!=null||t!=null?[e,t]:void 0}}updateBuffers(e){this.pre!=null&&this.applyBuffers(this.pre,e)}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l!==`unified`&&t!=null&&n!=null,totalLines:r,customProperties:i};Ng(u,this.appliedPreAttributes)||(Zg(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function fy(e,t){return e==null||t==null?e==null&&t==null:xi(e,t)}function py({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function my({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function hy(e,t,n=!1){return!n&&e==null&&t}function gy(e,t,n=!1){return e==null&&t&&!n}function _y(e){if(e!=null&&e.type===`element`)return e.children??[]}var vy=200,yy=40;function by(e,t){let n=t.trim();if(!n)return[];let r=/[A-Z]/.test(n),i=r?n:n.toLowerCase(),a=[];for(let t of e){if(a.length>=vy)break;let e=a.length,n=Sy(t.old,t.new),o=new Set;Cy(t,t.new,`additions`,i,r,o,a,n.additions),Cy(t,t.old,`deletions`,i,r,o,a,n.deletions),a.length===e&&xy(t.path,i,r)&&a.push({key:t.key,path:t.path,repo:t.repo,line:0,side:null,preview:t.path})}return a}function xy(e,t,n){let r=n?e:e.toLowerCase();if(!r.includes(t))return!1;let i=e.lastIndexOf(`/`),a=i>=0?e.slice(i+1):e,o=a.lastIndexOf(`.`);if(o<=0)return!0;let s=a.slice(o+1);if(!(n?s:s.toLowerCase()).includes(t))return!0;let c=e.length-s.length;for(let e=r.indexOf(t);e!==-1;e=r.indexOf(t,e+1))if(e<c)return!0;return!1}function Sy(e,t){let n=new Set,r=new Set;if(e==null&&t==null)return{additions:n,deletions:r};try{let i=yi(e==null?null:{name:`old`,contents:e},t==null?null:{name:`new`,contents:t});for(let e of i.hunks){for(let t=0;t<e.additionCount;t++)n.add(e.additionStart+t);for(let t=0;t<e.deletionCount;t++)r.add(e.deletionStart+t)}}catch{}return{additions:n,deletions:r}}function Cy(e,t,n,r,i,a,o,s){if(!t||o.length>=vy||!s.size)return;let c=0,l=t.split(`
|
|
1531
|
-
`);for(let t=0;t<l.length;t++){if(o.length>=vy||c>=yy)return;let u=t+1;if(!s.has(u))continue;let d=l[t],f=(i?d:d.toLowerCase()).indexOf(r);f<0||n===`deletions`&&a.has(d)||(n===`additions`&&a.add(d),c++,o.push({key:e.key,path:e.path,repo:e.repo,line:u,side:n,preview:wy(d,f,r.length)}))}}function wy(e,t,n){let r=Math.max(0,t-36),i=Math.min(e.length,t+n+36);return(r>0?`…`:``)+e.slice(r,i)+(i<e.length?`…`:``)}var Ty=`<div><input type=search enterkeyhint=search autocomplete=off placeholder="Find in diffs" aria-label="Find in diffs"><span> </span><button type=button title="Previous match">↑</button><button type=button title="Next match">↓</button><button type=button title="Close find">×</button></div>`,Ey=` D b D l b b l`,Dy=L(`f8`,e=>{e.a8=!!e.v,e.t&&(e.t.focus=e.am)}),Oy=E(49,Dy,3),ky=L(`f7`,e=>fe(e,{onMount:function(){let t=new AbortController;return document.addEventListener(`keydown`,t=>{if(!e.a8)return;if(t.key===`Escape`){if(document.querySelector(`dialog[open]`)||t.target instanceof HTMLTextAreaElement)return;t.preventDefault(),e.al();return}let n=t.metaKey||t.ctrlKey;(t.key===`F3`||n&&t.key.toLowerCase()===`g`)&&(t.preventDefault(),e.ak(t.shiftKey?-1:1))},{signal:t.signal}),e.ad=e.u,e.ae=!!e.v,e.v&&e.am(),{abort:t}},onUpdate:function(){e.u!==e.ad&&(e.ad=e.u,e.v&&e.am()),e.v&&!e.ae?(e.ae=!0,e.am()):!e.v&&e.ae&&(e.ae=!1,e.ab&&=(clearTimeout(e.ab),0),Je(``,null),Ky(e,{query:``,hit:null,keys:[]}))},onDestroy:function(){e.ab&&clearTimeout(e.ab),this.abort.abort(),Je(``,null),Ky(e,{query:``,hit:null,keys:[]})}})),Ay=E(50,ky,8),jy=E(32,e=>I(e.d,e.v&&(e.x||``).trim()?e.a2?`${e.a5+1}/${e.a2}`:`0/0`:``),3),My=E(29,e=>{w(e.e,`disabled`,!e.a2||!e.v),w(e.f,`disabled`,!e.a2||!e.v)}),Ny=ye(21,e=>{T(e.a,[`_eC`,!e.v&&`_eB`]),w(e.a,`aria-hidden`,e.v?`false`:`true`),w(e.b,`tabindex`,e.v?0:-1),w(e.e,`tabindex`,e.v?0:-1),w(e.f,`tabindex`,e.v?0:-1),w(e.g,`tabindex`,e.v?0:-1),Oy(e),Ay(e),jy(e),My(e)}),Py=E(11,e=>Ny(e,e.j,e.k)),Fy=M(9,Py),Iy=M(10,Py),Ly=(e,t)=>cb(e,t?.length),Ry=E(25,e=>Ly(e,by(e.s,e.x||``))),zy=M(46,Ay),By=E(43,e=>zy(e,vb(e)),4),Vy=E(45,t=>e(t,`b`,t.x||``,yb(t))),Hy=ye(23,e=>{Ry(e),By(e),Vy(e),jy(e)}),Uy=E(14,e=>Hy(e,e.m,e.n)),Wy=M(12,Uy),Gy=M(13,Uy),Ky=ye(14),qy=E(17,e=>Ky(e,e.p,e.q)),Jy=M(15,qy),Yy=M(16,qy),Xy=M(31,e=>{By(e),jy(e)}),Zy=E(30,e=>Xy(e,e.a2?Math.min(e.a0,e.a2-1):-1)),Qy=M(44,Vy),$y=E(42,e=>Qy(e,bb(e)),3),eb=M(41,e=>{$y(e),By(e)}),tb=E(35,e=>eb(e,xb(e)),2),nb=N(26,e=>{Zy(e),tb(e)}),rb=(e,t)=>fb(e,t.open),ib=(e,t)=>{pb(e,t.timer),mb(e,t.tick),hb(e,t.wasOpen)},ab=M(48,e=>{Oy(e),Ay(e)}),ob=L(`f6`,e=>{ce(e,`b`),A(e.b,`keydown`,function(t){if(e.v){if(t.key===`Escape`){t.preventDefault(),e.al();return}t.key===`Enter`&&(t.preventDefault(),e.ak(t.shiftKey?-1:1))}}),A(e.e,`mousedown`,function(e){e.preventDefault()}),A(e.e,`click`,function(){e.ak(-1)}),A(e.f,`mousedown`,function(e){e.preventDefault()}),A(e.f,`click`,function(){e.ak(1)}),A(e.g,`mousedown`,function(e){e.preventDefault()}),A(e.g,`click`,function(){e.al()})});function sb(e){T(e.b,ae),T(e.c,`_eF`),T(e.e,De),T(e.f,De),T(e.g,De),nb(e,0),rb(e,{open:!1}),ib(e,{timer:0,tick:0,wasOpen:!1}),ab(e,Sb(e)),ob(e)}var cb=M(28,e=>{Zy(e),jy(e),My(e)}),lb=M(18,e=>{Ry(e),tb(e),$y(e)}),ub=M(47,Ay),db=E(38,e=>ub(e,Cb(e))),fb=M(34,e=>{tb(e),$y(e),By(e),db(e),Oy(e),Ay(e)}),pb=M(37,e=>{$y(e),By(e),db(e),Ay(e)}),mb=M(39,Ay),hb=M(40,Ay),gb=M(19,Oy),_b=M(20,Ay);function vb(e){return t=>{e.a8&&(e.ab&&=(clearTimeout(e.ab),0),e.af(e.x||``,(e.a5<0?0:e.a5)+t))}}function yb(e){return function(t){e.ai(t)}}function bb(e){return t=>{e.a8&&(Hy(e,t),nb(e,0),Je(t,by(e.s,t)[0]??null),e.ab&&clearTimeout(e.ab),e.ab=setTimeout(()=>{e.ab=0,e.af(t,0)},80))}}function xb(e){return(t,n)=>{if(!e.a8)return;let r=by(e.s,t),i=[...new Set(r.map(e=>e.key))];if(!r.length){nb(e,0),Je(t,null),Ky(e,{query:t,hit:null,keys:i});return}nb(e,(n%r.length+r.length)%r.length);let a=r[e.a0];Je(t,a),Ky(e,{query:t,hit:a,keys:i})}}function Sb(e){return()=>{let t=e.b;t&&(t.focus(),t.select(),document.activeElement!==t&&setTimeout(()=>{t.focus(),t.select()},0))}}function Cb(e){return()=>{Ny(e,!1),e.a8=!1,e.ab&&=(clearTimeout(e.ab),0),Je(``,null),Ky(e,{query:``,hit:null,keys:[]})}}F(`f3`,vb),F(`f0`,yb),F(`f2`,bb),F(`f1`,xb),F(`f5`,Sb),F(`f4`,Cb);function wb(e,t){let n=null,r=()=>{if(!n||t.aborted)return;let i=e().closest(`[data-diff-main]`);if(i){let t=i.getBoundingClientRect(),r=0;if(n.y>=t.bottom-110?r=Math.max(4,Math.min(20,(n.y-(t.bottom-110))/3)):n.y<=t.top+110&&(r=-Math.max(4,Math.min(20,(t.top+110-n.y)/3))),r){i.scrollTop+=r;let a=e().getBoundingClientRect(),o=Math.max(t.top+12,a.top+48),s=Math.min(t.bottom-12,a.bottom-48),c=Math.max(o,Math.min(n.y,s));document.dispatchEvent(new PointerEvent(`pointermove`,{clientX:n.x,clientY:c,pointerId:n.pointerId,pointerType:`touch`,bubbles:!0,composed:!0}))}}requestAnimationFrame(r)};e().addEventListener(`pointerdown`,e=>{e.pointerType!==`mouse`&&e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute?.(`data-column-number`))&&(n={pointerId:e.pointerId,x:e.clientX,y:e.clientY},requestAnimationFrame(r))},{capture:!0,signal:t}),document.addEventListener(`pointermove`,e=>{n&&e.pointerId===n.pointerId&&e.isTrusted&&(n.x=e.clientX,n.y=e.clientY)},{capture:!0,passive:!0,signal:t});for(let e of[`pointerup`,`pointercancel`])document.addEventListener(e,e=>{n&&e.pointerId===n.pointerId&&(n=null)},{capture:!0,signal:t})}var Tb=`<div></div>`,Eb=`background:var(--panel);border-block:1px solid var(--border);padding:.5rem .75rem;font-family:system-ui,sans-serif;font-size:.85rem;display:flex;flex-direction:column;gap:.35rem;`,Db=`font:inherit;cursor:pointer;border:1px solid var(--border);border-radius:var(--radius);padding:.2rem .6rem;background:none;color:inherit;`,Ob=`font:inherit;cursor:pointer;border:1px solid var(--border);border-radius:var(--radius);padding:.2rem .6rem;background:none;color:inherit;background:var(--accent);color:light-dark(#fff,#10131f);border-color:transparent;`,kb=`font:inherit;max-width:8rem;border:1px solid var(--border);border-radius:var(--radius);padding:.2rem .35rem;background:inherit;color:inherit;`,Ab=new CSSStyleSheet;Ab.replaceSync(`:host { display: block; max-width: 100%; overflow-x: auto; } @media (pointer: coarse) { pre[data-diff] { touch-action: pan-x pan-y; } [data-column-number], [data-gutter-utility-slot] { touch-action: none !important; } }`+Ge);var jb=oe(`e0`,0),Mb=(e,t)=>T(e.a,[`_fc`,t]),Nb=L(`e1`,e=>fe(e,{file:e.e,comments:e.f,draft:e.g,sessions:e.h,onMount:function(){let t=()=>e.h||[],n=()=>{let e=t();if(e.length<=1)return null;let n=document.createElement(`select`);n.setAttribute(`aria-label`,`Send to session`),n.style.cssText=kb;for(let t of e){let e=document.createElement(`option`);e.value=t.id,e.textContent=t.title||t.agent,n.append(e)}return n},r=e=>e?.value||t()[0]?.id||null,i=(e,t,n)=>{for(let r of e)r.disabled=t,n&&r.dataset.role===`send`&&(r.textContent=t?`Sending…`:n)},a=a=>{if(!a)return;let o=document.createElement(`div`);o.style.cssText=Eb;let s=document.createElement(`p`);s.textContent=a.text,s.style.cssText=`margin:0;white-space:pre-wrap;`;let c=document.createElement(`div`);c.style.cssText=`display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;`;let l=document.createElement(`button`);l.type=`button`,l.textContent=`Remove`,l.style.cssText=`font:inherit;cursor:pointer;border:1px solid var(--border);border-radius:var(--radius);padding:.2rem .6rem;background:none;color:inherit;font-size:.75rem;opacity:.85;`,l.onclick=()=>e.i?.(a.id);let u=t().length>0&&!!e.j,d=document.createElement(`button`);d.type=`button`,d.dataset.role=`send`,d.textContent=`Send`,d.style.cssText=`font:inherit;cursor:pointer;border:1px solid var(--border);border-radius:var(--radius);padding:.2rem .6rem;background:none;color:inherit;background:var(--accent);color:light-dark(#fff,#10131f);border-color:transparent;font-size:.75rem;`,d.hidden=!u;let f=u?n():null;return f&&(f.style.fontSize=`.75rem`),d.onclick=()=>{(async()=>{let t=r(f);if(!(!t||d.disabled)){i([l,d],!0,`Send`);try{await e.j?.(a.id,t)}finally{i([l,d],!1,`Send`)}}})()},c.append(l),u&&(c.append(d),f&&c.append(f)),o.append(s,c),o},o=()=>{let a=document.createElement(`div`);a.style.cssText=Eb;let o=document.createElement(`textarea`);o.placeholder=`Leave a comment…`,o.rows=3,o.style.cssText=`font:inherit;width:100%;resize:vertical;border:1px solid var(--border);border-radius:var(--radius);padding:.4rem .5rem;background:inherit;color:inherit;`+(Ie()?`font-size:16px;`:``);let s=document.createElement(`button`);s.type=`button`,s.textContent=`Add`,s.style.cssText=Db;let c=document.createElement(`button`);c.type=`button`,c.dataset.role=`send`,c.textContent=`Send`,c.style.cssText=Ob;let l=document.createElement(`button`);l.type=`button`,l.textContent=`Cancel`,l.style.cssText=Db;let u=t().length>0&&!!e.k;c.hidden=!u;let d=u?n():null;s.onclick=()=>{o.value.trim()&&e.l?.(o.value)},c.onclick=()=>{(async()=>{let t=o.value.trim(),n=r(d);if(!(!t||!n||c.disabled)){i([s,c,l],!0,`Send`);try{await e.k?.(t,n)}finally{i([s,c,l],!1,`Send`)}}})()},l.onclick=()=>e.m?.(),o.onkeydown=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),u?c.onclick():s.onclick()),e.key===`Escape`&&l.onclick()};let f=document.createElement(`div`);f.style.cssText=`display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;`,f.append(s),u&&(f.append(c),d&&f.append(d)),f.append(l),a.append(o,f);let p=()=>o.scrollIntoView({block:`center`,behavior:`smooth`});return o.addEventListener(`focus`,()=>{let e=window.visualViewport;e&&(e.addEventListener(`resize`,p),o.addEventListener(`blur`,()=>e.removeEventListener(`resize`,p),{once:!0}))}),setTimeout(()=>{o.scrollIntoView({block:`center`,behavior:`instant`}),o.focus()},0),a},s=new Map,c,l={draft:!0},u,d=new dy({diffStyle:v()?`unified`:`split`,disableFileHeader:!0,enableLineSelection:!0,onLineSelectionEnd(t){if(!t)return;let n=t.endSide!=null&&t.endSide!==t.side;e.n?.({side:t.side,start:t.start,end:n?t.start:t.end})},renderAnnotation(e){let t=e.metadata||{};return t.draft?u??=o():a(t.comment)}}),f=()=>{let t=[],n=new Map;for(let r of e.f||[]){let e=s.get(r.id)||{comment:r};n.set(r.id,e),t.push({side:r.side,lineNumber:r.line_end,metadata:e})}return s=n,e.g&&(c!==e.g&&(c=e.g,l={draft:!0},u=void 0),t.push({side:e.g.side,lineNumber:e.g.end,metadata:l})),t},p=()=>{let t=e.a.querySelector(`diffs-container`)?.shadowRoot;t&&!t.adoptedStyleSheets.includes(Ab)&&(t.adoptedStyleSheets=[...t.adoptedStyleSheets,Ab])},m=()=>{if(e.e.old==null&&e.e.new==null){e.o?.(`could not read ${e.e.path}`);return}let t=d.render({containerWrapper:e.a,oldFile:e.e.old==null?null:{name:e.e.oldPath||e.e.path,contents:e.e.old},newFile:e.e.new==null?null:{name:e.e.path,contents:e.e.new},lineAnnotations:f()});Promise.resolve(t).then(()=>{p(),nt(e.a)}).catch(t=>e.o?.(`diff render: ${t}`))};m();let h=new AbortController;return Ie()&&wb(jb(e),h.signal),{instance:d,render:m,dragAbort:h,unregSearch:tt(e.a,e.e.key),shownFile:e.e,shownComments:e.f,shownDraft:e.g,shownSessions:e.h}},onUpdate:function(){this.shownDraft&&!this.draft&&this.instance.setSelectedLines(null),(this.file!==this.shownFile||this.comments!==this.shownComments||this.draft!==this.shownDraft||this.sessions!==this.shownSessions)&&(this.shownFile=this.file,this.shownComments=this.comments,this.shownDraft=this.draft,this.shownSessions=this.sessions,this.render())},onDestroy:function(){this.unregSearch(),this.dragAbort.abort(),this.instance.cleanUp?.()}})),Pb=E(15,Nb,10),Fb=M(4,Pb),Ib=M(5,Pb),Lb=M(6,Pb),Rb=M(7,Pb),zb=M(8,Pb),Bb=M(9,Pb),Vb=M(10,Pb),Hb=M(11,Pb),Ub=M(12,Pb),Wb=M(13,Pb),Gb=M(14,Pb),Kb=`<aside></aside>`,qb=e=>T(e.a,`_f1`),Jb=E(4,e=>{T(e.a,[`_fY`,{_fU:e._._._._.r.has(e._._.f(e._.e))}]),I(e.c,e._._._._.r.has(e._._.f(e._.e))?`▸`:`▾`)},2),Yb=D(21,Jb,e=>e._._._._),Xb=L(`h3`,e=>A(e.a,`click`,function(){let t=new Set(e._._._._.r);t.delete(e._._.f(e._.e))||t.add(e._._.f(e._.e)),iS(e._._._._,t)})),Zb=e=>{Yb(e),Qb(e),$b._(e),ex._(e),tx._(e),T(e.b,`_f2`),Xb(e)},Qb=D(10,Jb,e=>e._._),$b=k(0,0,e=>{w(e.a,`title`,e._.e),Jb(e)}),ex=k(0,0,e=>Ee(e.a,`padding-left:${.35+e._.f*.75}rem`)),tx=k(0,0,e=>I(e.d,e._.g)),nx=O(5,`<span>💬</span>`,` `,qb),rx=E(6,e=>nx(e,+!e._._._._.s.has(e._.j))),ix=D(22,rx,e=>e._._._._),ax=L(`h4`,e=>A(e.a,`click`,function(){e._._._._.m(e._.j)})),ox=e=>{ix(e),sx._(e),cx._(e),lx._(e),ux._(e),dx._(e),T(e.a,`_fZ`),T(e.b,`_f3`),T(e.d,`_f0`),ax(e)},sx=k(0,1,e=>Ee(e.a,`padding-left:${.5+e._.f*.75}rem`)),cx=k(0,1,e=>w(e.a,`title`,e._.i)),lx=k(0,1,rx),ux=k(0,1,e=>{w(e.b,`data-status`,e._.k),I(e.c,e._.k)}),dx=k(0,1,e=>I(e.e,e._.l)),fx=O(0,`<button type=button><span> </span><!>/</button>`,` D D l%`,Zb,`<button type=button><span> </span><span> </span><!></button>`,` D D l D l%`,ox),px=E(3,e=>fx(e,!e._.i(e.c)&&e.c?.kind===`dir`?0:!e._.i(e.c)&&e.c?.kind!==`dir`?1:2)),mx=_e(1,px),hx=mx,gx=M(2,e=>{vx(e,e.c?.path),yx(e,e.c?.depth),bx(e,e.c?.label),xx(e,e.c?.file?.path),Sx(e,e.c?.file?.key),Cx(e,e.c?.file?.status),wx(e,e.c?.name),px(e)}),_x=(e,t)=>gx(e,t[0]),vx=M(4,$b),yx=M(5,e=>{sx(e),ex(e)}),bx=M(6,tx),xx=M(8,cx),Sx=M(9,lx),Cx=M(10,ux),wx=M(11,dx),Tx=ie(3,0,2),Ex=E(9,e=>Tx(e,!e._._.n.has(e._.i))),Dx=D(19,Ex,e=>e._._),Ox=M(8,mx),kx=E(7,e=>Ox(e,fS(e)),2),Ax=M(6,kx),jx=e=>{Dx(e),Mx(e),Px._(e),Lx._(e),Ax(e,pS)},Mx=D(21,kx,e=>e._._),Nx=M(5,j(Qb)),Px=k(5,0,e=>{Nx(e,mS(e)),kx(e),Ex(e)}),Fx=je(1,`<!><!><!>`,`b%`,hx,_x),Ix=(e,t)=>Fx(e,[t,e=>e.kind===`dir`?`d:${e.path}`:e.file.key]),Lx=k(5,0,e=>Ix(e,Ct(e._.m))),Rx=E(9,e=>{T(e.b,[`_fX`,{_fU:e._.n.has(e.i)}]),I(e.d,e._.n.has(e.i)?`▸`:`▾`)}),zx=O(5,`<!><!><!><!><!><!>`,`b%b%b%b%`,jx),Bx=E(10,e=>zx(e,!e._.n.has(e.i)||e._.p.has(e.i)?0:1),2),Vx=_e(0,e=>{Rx(e),Bx(e)}),Hx=L(`h5`,e=>A(e.b,`click`,function(){let t=e.i,n=new Set(e._.n);n.delete(t)||(eS(e._,new Set([...e._.p,t])),n.add(t)),Xx(e._,n)})),Ux=e=>{Vx._(e),Wx._(e),T(e.a,`_fW`),T(e.c,`_f2`),Hx(e)},Wx=_e(0,Bx),Gx=M(8,e=>{Rx(e),Bx(e),Px(e)}),Kx=(e,t)=>I(e.e,t),qx=(e,t)=>{Gx(e,t[0]?.id),Kx(e,t[0]?.label),Jx(e,t[0]?.files)},Jx=M(12,Lx),Yx=j(Dx),Xx=ye(13,e=>{Vx(e),Yx(e)}),Zx=E(5,e=>Xx(e,e.d,e.e)),Qx=M(3,Zx),$x=M(4,Zx),eS=ye(15,Wx),tS=E(8,e=>eS(e,e.g,e.h)),nS=M(6,tS),rS=M(7,tS),iS=N(17,j(Mx,Yb));function aS(e){iS(e,new Set)}var oS=M(18,j(ix)),sS=(e,t)=>oS(e,t||new Set),cS=(e,t)=>T(e.a,[`_fV`,{_fU:t===!1}]),lS=je(0,`<div><button type=button><span> </span> </button><!></div>`,` D D D l l%`,Ux,qx),uS=(e,t)=>lS(e,[t,`id`]),dS=M(12);function fS(e){return t=>{let n=e.g(t);for(let r of e._._.r){let i=r.indexOf(`/`),a=r.slice(0,i),o=r.slice(i+1);if(a===e._.i&&(t.kind!==`dir`||t.path!==o)&&(n===o||n.startsWith(`${o}/`)))return!0}return!1}}function pS(e){return e.kind===`dir`?e.path:e.file.path.includes(`/`)?e.file.path.slice(0,e.file.path.lastIndexOf(`/`)):``}function mS(e){return t=>`${e._.i}/${t}`}F(`h2`,fS),F(`h1`,pS),F(`h0`,mS);var hS=`_fK _B`,gS=`<!><!><!>`,_S=O(5,`<span>💬</span>`),vS=E(9,e=>_S(e,+!e._._.o.has(e.i))),yS=D(18,vS,e=>e._._),bS=L(`d0`,e=>A(e.a,`click`,function(){MS(e._._,!1),e._._.l(e.i)})),xS=e=>{yS(e),T(e.a,[`_fR`,`_q`]),T(e.b,`_fT`),T(e.d,`_fS`),bS(e)},SS=(e,t)=>{w(e.b,`data-status`,t),I(e.c,t)},CS=M(8,e=>{w(e.d,`title`,e.i),I(e.e,e.i),vS(e)}),wS=je(8,`<button type=button><span> </span><span><bdi> </bdi></span><!></button>`,` D D l E m%`,xS,(e,t)=>{CS(e,t[0]?.key),SS(e,t[0]?.status)}),TS=k(0,0,e=>wS(e,[e._.i,`key`])),ES=L(`d1`,e=>{A(e.a,`click`,function(){MS(e._,!1)}),A(e.h,`click`,function(){MS(e._,!1)})}),DS=e=>{TS._(e),kS._(e),AS._(e),T(e.a,`_fM`),T(e.b,`_fN`),T(e.c,`_fO`),T(e.d,`_fL`),T(e.e,`_fP`),T(e.h,hS),T(e.i,`_fQ`),ES(e)},OS=E(9,e=>I(e.g,e._.j===e._.p?``:` / ${e._.p}`)),kS=k(0,0,e=>{I(e.f,e._.j),OS(e)}),AS=k(0,0,OS),jS=O(0,`<div></div><div role=dialog aria-label="Jump to file"><div><strong>Files</strong><span><!><!></span><button type=button title=Close aria-label=Close>×</button></div><div></div></div>`,` b D D b D%b%l l `,DS),MS=ye(12,e=>jS(e,+!e.m)),NS=E(5,e=>MS(e,e.d,e.e)),PS=M(3,NS),FS=M(4,NS),IS=M(14,j(yS)),LS=(e,t)=>IS(e,t||new Set),RS=M(15,AS),zS=E(10,e=>RS(e,e.h??e.j)),BS=M(7,zS),VS=M(9,e=>{zS(e),kS(e)}),HS=M(8,e=>{VS(e,e.i?.length),TS(e)}),US=M(11),WS=((e,t,n,r,i,a,o)=>`<div><div><div><div><!><div>${e}</div><div><h1>Review</h1><span><!><!></span></div><!></div><div><button>${t}</button><button title="Refresh diff">${n}</button><button title="Jump to file">Files (<!>)</button><div role=group aria-label="Review scope"><button type=button title="Committed changes only — base…tip, no working-tree edits">Committed</button><button type=button title="Include uncommitted and untracked files in the working tree">Working tree</button></div><button type=button> </button><div>${r}</div><button title="Find in the review (⌘/Ctrl+F)" aria-label="Find in the review">${i}</button></div></div><div data-diff-main><!><!><!><!><!><!><!><!></div></div>${a}${o}</div>`)(Pt,ve,re,Ty,ne,Kb,gS),GS=((e,t,n,r,i,a,o)=>` D D D D%b D/${e}&l D b D%b%m%l D D/${t}&l D/${n}&l Db%l D b l D l D/${r}&l D/${i}&n D%b%b%b%b%b%b%b%m/${a}&/${o}&l`)(Ft,de,Pe,Ey,Se,` b`,`b%c`),KS=e=>T(e.a,[`_ey`,`_eo`]),qS=e=>T(e.a,[`_ey`,`_eo`]),JS=e=>T(e.a,[`_ey`,`_eo`]),YS=k(6,0,e=>I(e.b,e._.w)),XS=e=>{YS._(e),T(e.a,`_l`)},ZS=k(8,0,e=>I(e.b,e._.p)),QS=e=>{ZS._(e),T(e.a,`_el`)},$S=k(12,0,e=>I(e.b,e._.a0)),eC=e=>{$S._(e),T(e.a,`_el`)},tC=D(27,e=>I(e.b,e._._._.i),e=>e._._._),nC=e=>{tC(e),rC(e),aC(e),oC(e),sC(e),cC(e),lC(e),T(e.a,[`_l`,`_n`]),T(e.c,`_p`)},rC=D(28,e=>w(e.a,`href`,`${e._._._.j}/files`),e=>e._._._),iC=E(4,e=>w(e.a,`title`,`${e._._._.k} — ${e._._._.l} ${e._._._.m} vs ${e._._._.n} ${e._._._.o}`),4),aC=D(29,e=>{I(e.d,e._._._.k),iC(e)},e=>e._._._),oC=D(30,iC,e=>e._._._),sC=D(31,iC,e=>e._._._),cC=D(32,iC,e=>e._._._),lC=D(33,iC,e=>e._._._),uC=D(34,e=>I(e.b,e._._._.p),e=>e._._._),dC=e=>{uC(e),T(e.a,Dt)},fC=D(27,e=>I(e.b,e._._._.i),e=>e._._._),pC=L(`i44`,e=>A(e.a,`click`,function(e){e.stopPropagation()})),mC=e=>{fC(e),hC(e),_C(e),vC(e),yC(e),bC(e),xC(e),T(e.a,[`_l`,`_n`]),T(e.c,Dt),pC(e)},hC=D(28,e=>w(e.a,`href`,`${e._._._.j}/files`),e=>e._._._),gC=E(4,e=>w(e.a,`title`,`${e._._._.k} — ${e._._._.l} ${e._._._.m} vs ${e._._._.n} ${e._._._.o}`),4),_C=D(29,e=>{I(e.d,e._._._.k),gC(e)},e=>e._._._),vC=D(30,gC,e=>e._._._),yC=D(31,gC,e=>e._._._),bC=D(32,gC,e=>e._._._),xC=D(33,gC,e=>e._._._),SC=E(10,e=>w(e.a,`title`,`origin/${e.h} ${e.i} · GitHub ${e.j}`),2),CC=M(7,SC),wC=M(8,e=>{I(e.c,yt(e.i)),SC(e)}),TC=M(9,e=>{I(e.d,yt(e.j)),SC(e)}),EC=(e,t)=>I(e.b,t>0?` · `:``),DC=(e,t)=>{CC(e,t[0]?.pr?.headRefName),TC(e,t[0]?.pr?.headRefOid),wC(e,t[0]?.head),EC(e,t[1])},OC=(e,t)=>I(e.a,t>0?` · `:``),kC=(e,t)=>I(e.b,t),AC=(e,t)=>I(e.c,t),jC=(e,t)=>{kC(e,t[0]?.worktree),AC(e,t[0]?.pr?.number),OC(e,t[1])},MC=e=>T(e.a,`_ew`),NC=e=>T(e.a,`_d5`),PC=je(1,`<!><!> #<!>`,`%b%c%`,0,jC),FC=je(2,`<span><!><!> → <!></span>`,` D%b%c%`,0,DC),IC=D(183,e=>{PC(e,[e._._.d0,`id`]),FC(e,[e._._.d0,`id`])},e=>e._._),LC=Oe(`i42`,`<span><!> — this view has a newer tip than the PR page.</span><span></span>`,` D%l `,e=>{IC(e),T(e.a,`_p`),T(e.c,[`_q`,`_dZ`])}),RC=k(10,0,e=>I(e.b,e._.ci)),zC=e=>{RC._(e),BC._(e),T(e.a,`_d3`),T(e.c,`_d4`)},BC=k(10,0,e=>I(e.d,e._.cj)),VC=k(36,0,e=>I(e.b,e._.ca.some(e=>e.pr)?`No file changes on these PRs.`:`No changes vs base.`)),HC=e=>{VC._(e),T(e.a,`_ew`)},UC=L(`i46`,e=>fe(e,{onMount:function(){e._._._._._._.bs(e.a,()=>{iT(e._,!0)})}})),WC=D(173,UC,e=>e._._._._._._),GC=e=>{WC(e),T(e.a,[`_eq`,`_eo`])},KC=D(165,e=>I(e.e,e._._.b2?`, plus uncommitted`:``),e=>e._._),qC=e=>{KC(e),JC(e),YC(e),XC(e),ZC(e)},JC=D(11,e=>I(e.a,yt(e._.h))),YC=D(12,e=>I(e.b,e._.i)),XC=D(13,e=>I(e.c,yt(e._.j))),ZC=D(14,e=>I(e.d,e._.k)),QC=Oe(`i43`,`this view is <!> (<!>). Local is <!> (<!><!>).`,`b%c%c%c%b%`,qC),$C=e=>{g(e.a),h(e.a,QC(e)),me(e.a,`info`),p(e.a,`inline`),i(e.a),t(e.a),m(e.a),he(e.a,{})},ew=E(6,e=>l(e.a,`${e.d} #${e.f}`)),tw=M(3,ew),nw=M(5,ew),rw=(e,t)=>{tw(e,t[0]?.worktree),nw(e,t[0]?.pr?.number),iw(e,t[0]?.pr?.headRefName),aw(e,t[0]?.head),ow(e,t[0]?.localHead),sw(e,t[0]?.branch)},iw=M(8,j(YC)),aw=M(7,j(JC)),ow=M(9,j(XC)),sw=M(10,j(ZC)),cw=D(165,e=>I(e.b,e._._.b2?` — showing uncommitted changes only`:``),e=>e._._),lw=e=>{cw(e),uw(e)},uw=D(7,e=>I(e.a,e._.g)),dw=Oe(`i39`,`already in <!><!>.`,`b%b%`,lw),fw=e=>{g(e.a),h(e.a,dw(e)),me(e.a,`info`),p(e.a,`inline`),i(e.a),t(e.a),m(e.a),he(e.a,{})},pw=E(5,e=>l(e.a,e.d?`${e.e} #${e.d.number}`:e.e)),mw=M(3,pw),hw=M(4,pw),gw=(e,t)=>{mw(e,t[0]?.pr),hw(e,t[0]?.worktree),_w(e,t[0]?.base)},_w=M(6,j(uw)),vw=D(165,e=>I(e.b,e._._.b2?` — showing uncommitted changes only`:``),e=>e._._),yw=e=>{vw(e),bw(e)},bw=D(5,e=>I(e.a,e._.e)),xw=Oe(`i38`,`<!><!>.`,`%b%`,yw),Sw=e=>{g(e.a),h(e.a,xw(e)),me(e.a,`warn`),p(e.a,`inline`),i(e.a),t(e.a),m(e.a),he(e.a,{})},Cw=(e,t)=>l(e.a,`${t}: base not found`),ww=(e,t)=>{Cw(e,t[0]?.worktree),Tw(e,t[0]?.base)},Tw=M(4,j(bw)),Ew=E(2,e=>I(e.b,e._.bc.trim()?`No matches in diffs.`:`No files match "${e._.b1}".`)),Dw=k(36,1,Ew),Ow=e=>{Dw._(e),kw._(e),T(e.a,`_ew`)},kw=k(36,1,Ew),Aw=D(163,e=>{w(e.a,`disabled`,e._._.az),I(e.b,e._._.az?`Reloading…`:`Reload`)},e=>e._._),jw=L(`i40`,e=>A(e.a,`click`,function(){e._._.c6()})),Mw=Oe(`i41`,`<button> </button>`,` D `,e=>{Aw(e),T(e.a,`_h`),jw(e)}),Nw=k(34,0,e=>m(e.a,HA(e))),Pw=e=>{Nw._(e),g(e.a),i(e.a,we({content:Mw(e)})),h(e.a,LC(e)),me(e.a,`info`),p(e.a,`inline`),l(e.a,`GitHub is behind`),t(e.a),he(e.a,{})},Fw=D(162,e=>I(e.a,e._._.ay),e=>e._._),Iw=Oe(`i37`,` `,` `,Fw),Lw=e=>{g(e.a),h(e.a,Iw(e)),m(e.a,UA(e)),i(e.a),t(e.a),me(e.a),p(e.a),l(e.a),he(e.a,{})},Rw=k(11,0,e=>{I(e.b,e._.aw),I(e.c,e._.aw===1?``:`s`)}),zw=e=>{Rw._(e),T(e.a,`_d6`)},Bw=D(157,e=>Rb(e.a,e._._._._._._.ar||[]),e=>e._._._._._._),Vw=e=>{Bw(e),Uw(e),Gw(e),Kw(e),Jw(e),Yw(e),Xw(e),Zw(e),Qw(e),e.a,Mb(e.a,`_eo`),Ub(e.a,GA(e)),Gb(e.a,WA(e))},Hw=E(1,e=>Lb(e.a,e._._._._._._.ax&&e._._._._._._.ax?.key===e._._.k?e._._._._._._.ax:null)),Uw=D(161,Hw,e=>e._._._._._._),Ww=E(2,e=>Hb(e.a,KA(e))),Gw=D(185,Ww,e=>e._._._._._._),Kw=D(186,e=>zb(e.a,qA(e)),e=>e._._._._._._),qw=E(3,e=>Vb(e.a,JA(e))),Jw=D(189,qw,e=>e._._._._._._),Yw=D(190,e=>Bb(e.a,YA(e)),e=>e._._._._._._),Xw=D(25,e=>{Fb(e.a,e._._.j),Ww(e),qw(e)},e=>e._._),Zw=D(26,e=>{Wb(e.a,XA(e)),Hw(e)},e=>e._._),Qw=D(27,e=>Ib(e.a,e._._.v),e=>e._._),$w=O(0,`<div></div>`,` `,GC,Tb,(e=>`/${e}&`)(` b`),Vw),eT=E(3,e=>$w(e,e.b||e.c?1:0)),tT=M(2,eT),nT=E(4,e=>tT(e,e._._._._._.bf===e._.k)),rT=D(167,nT,e=>e._._._._._),iT=N(1,eT),aT=e=>{rT(e),oT._(e),iT(e,!1)},oT=k(7,3,nT),sT=E(11,e=>T(e.a,[`_en`,e._._._._.bf===e.k&&`_dW`])),cT=E(14,e=>T(e.e,[`_ev`,e._._._._.bf===e.k&&e._._._._.bh<1&&`_dX`]),2),lT=D(167,e=>{sT(e),cT(e)},e=>e._._._._),uT=O(7,`<p>binary file</p>`,` `,JS,`<p>file too large to display</p>`,` `,qS,`<p>file could not be read</p>`,` `,KS,`<!><!><!>`,`b%`,aT),dT=E(24,e=>uT(e,e.r?0:e.s?1:e.t==null&&e.u==null?2:e.x?3:4),4),fT=N(23,e=>{_(e,`a`,e.x),dT(e)}),pT=L(`i47`,e=>A(e.a,`toggle`,function(t,n){if(fT(e,n.open),!n.open){let e=n.closest(`[data-diff-main]`);if(e){let t=n.getBoundingClientRect().top-e.getBoundingClientRect().top;t<0&&(e.scrollTop+=t)}}})),mT=e=>{lT(e),hT(e),_T(e),xT(e),T(e.b,`_ep`),T(e.c,`_eu`),fT(e,!0),pT(e)},hT=D(169,cT,e=>e._._._._),gT=E(12,e=>w(e.a,`hidden`,!e._._._._.cr.has(e.k))),_T=D(178,gT,e=>e._._._._),vT=j(Qw),yT=M(21,e=>{CT(e,e.v.length),vT(e)}),bT=E(13,e=>yT(e,e._._._._.cv.get(e.k)||[])),xT=D(181,bT,e=>e._._._._),ST=O(6,`<span>💬 <!></span>`,` Db%`,XS),CT=M(22,e=>{ST(e,+!e.w),YS(e)}),wT=j(Zw),TT=M(10,e=>{w(e.a,`data-key`,e.k),bT(e),sT(e),gT(e),cT(e),oT(e),wT(e)}),ET=(e,t)=>{w(e.c,`data-status`,t),I(e.d,t)},DT=(e,t)=>{w(e.e,`title`,t),I(e.f,t)},OT=M(17,dT),kT=M(18,dT),AT=M(19,dT),jT=M(20,dT),MT=(e,t)=>PT(e,t[0]),NT=j(Xw),PT=M(9,e=>{TT(e,e.j?.key),ET(e,e.j?.status),DT(e,e.j?.path),OT(e,e.j?.binary),kT(e,e.j?.tooLarge),AT(e,e.j?.old),jT(e,e.j?.new),NT(e)}),FT=ie(2,0),IT=E(3,e=>FT(e,e._._._.cc===1||!e._._._.bi.has(e._._.d)),2),LT=D(170,IT,e=>e._._._),RT=e=>{LT(e),zT(e),BT(e),HT(e),T(e.b,`_em`)},zT=D(175,IT,e=>e._._._),BT=D(24,IT,e=>e._._),VT=je(1,`<details><summary><span> </span><span><bdi> </bdi></span><!></summary><!></details>`,` D D D l E m%l%`,mT,MT),HT=D(38,e=>VT(e,[e._._.t,`key`]),e=>e._._),UT=E(3,e=>I(e.b,ht(e._._._.r,e._._._._.as||``,e._._._._.at||``)),2),WT=D(158,UT,e=>e._._._._),GT=e=>{WT(e),KT(e),JT(e),YT(e),T(e.a,`_l`)},KT=D(159,UT,e=>e._._._._),qT=E(2,e=>w(e.a,`title`,`checked out ${e._._._.r} ${e._._._.s}`)),JT=D(36,e=>{qT(e),UT(e)},e=>e._._._),YT=D(37,qT,e=>e._._._),XT=(e,t)=>{mE(e,t?.title),hE(e,t?.base),gE(e,t?.head),vE(e,t?.topic)},ZT=E(17,e=>XT(e,mt(e._._.q||e._._.n,e._._.l||e._._.r,e._._._.as||``,e._._._.at||``)),5),QT=D(158,ZT,e=>e._._._),$T=e=>{QT(e),eE(e),rE(e),iE(e),oE(e),sE(e),lE(e),uE(e),dE(e),fE(e),pE(e),T(e.a,`_eg`),T(e.c,`_eh`),T(e.d,`_ei`),T(e.f,`_ek`),T(e.g,`_ej`)},eE=D(159,ZT,e=>e._._._),tE=O(9,`<span>local <!></span>`,` Db%`,GT),nE=E(16,e=>tE(e,+!e._._._.cz.has(e._._.d))),rE=D(182,nE,e=>e._._._),iE=D(24,nE,e=>e._._),aE=O(1,`<a target=_blank rel=noopener>#<!></a><span> </span>`,` Db%l D `,nC),oE=D(25,e=>aE(e,+!e._._.g),e=>e._._),sE=D(30,ZT,e=>e._._),cE=E(12,e=>w(e.c,`title`,`${e.l} · ${e._._.m.slice(0,7)}…${e._._.o.slice(0,7)}`),2),lE=D(31,cE,e=>e._._),uE=D(32,ZT,e=>e._._),dE=D(33,cE,e=>e._._),fE=D(35,ZT,e=>e._._),pE=D(36,ZT,e=>e._._),mE=M(11,cE),hE=(e,t)=>I(e.e,t),gE=(e,t)=>I(e.h,t),_E=O(8,`<span> </span>`,` D `,QS),vE=M(15,e=>{_E(e,+!e.p),ZS(e)}),yE=E(3,e=>I(e.b,ht(e._._._.r,e._._._._.as||``,e._._._._.at||``)),2),bE=D(158,yE,e=>e._._._._),xE=e=>{bE(e),SE(e),wE(e),TE(e),T(e.a,`_l`)},SE=D(159,yE,e=>e._._._._),CE=E(2,e=>w(e.a,`title`,`checked out ${e._._._.r} ${e._._._.s}`)),wE=D(36,e=>{CE(e),yE(e)},e=>e._._._),TE=D(37,CE,e=>e._._._),EE=(e,t)=>{rD(e,t?.title),iD(e,t?.base),aD(e,t?.head),sD(e,t?.topic)},DE=E(31,e=>EE(e,mt(e._._.q||e._._.n,e._._.l||e._._.r,e._._._.as||``,e._._._.at||``)),5),OE=D(158,DE,e=>e._._._),kE=L(`i45`,e=>A(e.a,`click`,function(){let t=e._._.d;if(e._._._.bl.has(t)){let n=new Set(e._._._.bl);n.delete(t),Dk(e._._._,n),e._._._.bi.has(t)||wk(e._._._,new Set([...e._._._.bi,t]));return}if(e._._._.bi.has(t)){if(e._._._.bj.has(t)){let n=new Set(e._._._.bi);n.delete(t),wk(e._._._,n);return}Dk(e._._._,new Set([...e._._._.bl,t])),requestAnimationFrame(()=>{requestAnimationFrame(()=>{if(!e._._._.bl.has(t))return;let n=new Set(e._._._.bi);n.delete(t),wk(e._._._,n);let r=new Set(e._._._.bl);r.delete(t),Dk(e._._._,r)})})}else Ek(e._._._,new Set([...e._._._.bj,t])),wk(e._._._,new Set([...e._._._.bi,t]))})),AE=e=>{OE(e),jE(e),IE(e),zE(e),HE(e),UE(e),GE(e),KE(e),qE(e),YE(e),XE(e),ZE(e),QE(e),$E(e),tD(e),nD(e),T(e.d,Et),T(e.g,`_eh`),T(e.h,`_ei`),T(e.j,`_ek`),T(e.k,`_ej`),T(e.o,`_ee`),kE(e)},jE=D(159,DE,e=>e._._._),ME=E(18,e=>w(e.a,`title`,e.r?`Show ${e._._.x||e._._.u} files`:`Hide files`),2),NE=E(20,e=>T(e.b,[`_er`,!e.r&&`_es`,e.t&&`_et`])),PE=M(17,e=>{T(e.a,[`_eb`,e.r&&`_ec`]),w(e.a,`aria-expanded`,e.r?`false`:`true`),I(e.c,e.r?`▸`:`▾`),ME(e),NE(e)}),FE=E(27,e=>PE(e,e._._._.bi.has(e._._.d))),IE=D(170,FE,e=>e._._._),LE=M(19,e=>{w(e.a,`aria-busy`,e.t?`true`:`false`),NE(e)}),RE=E(28,e=>LE(e,e._._._.bl.has(e._._.d))),zE=D(172,RE,e=>e._._._),BE=O(13,`<span>local <!></span>`,` Db%`,xE),VE=E(29,e=>BE(e,+!e._._._.cz.has(e._._.d))),HE=D(182,VE,e=>e._._._),UE=D(24,e=>{FE(e),RE(e),VE(e)},e=>e._._),WE=O(5,`<a target=_blank rel=noopener>#<!></a><span> </span>`,` Db%l D `,mC,`<span> </span>`,` D `,dC),GE=D(25,e=>WE(e,+!e._._.g),e=>e._._),KE=D(26,e=>I(e.e,e._._.h),e=>e._._),qE=D(30,DE,e=>e._._),JE=E(23,e=>w(e.g,`title`,`${e.w} · ${e._._.m.slice(0,7)}…${e._._.o.slice(0,7)}`),2),YE=D(31,JE,e=>e._._),XE=D(32,DE,e=>e._._),ZE=D(33,JE,e=>e._._),QE=D(35,DE,e=>e._._),$E=D(36,DE,e=>e._._),eD=E(30,e=>{I(e.p,e._._.x||e._._.u),I(e.q,(e._._.x||e._._.u)===1?``:`s`)}),tD=D(39,e=>{ME(e),eD(e)},e=>e._._),nD=D(40,e=>{ME(e),eD(e)},e=>e._._),rD=M(22,JE),iD=(e,t)=>I(e.i,t),aD=(e,t)=>I(e.l,t),oD=O(12,`<span> </span>`,` D `,eC),sD=M(26,e=>{oD(e,+!e.a0),$S(e)}),cD=E(4,e=>w(e.a,`hidden`,!e._.x&&!e._.g&&e._._.bg!==e._.d),3),lD=D(168,cD,e=>e._._),uD=e=>{lD(e),pD(e),mD(e),gD(e),_D._(e),yD._(e),bD._(e),xD._(e),T(e.a,`_ea`)},dD=O(2,`<!><!><div></div><!><!>`,`b%b b%`,RT),fD=E(5,e=>dD(e,e._._.cc===1||!e._._.bi.has(e._.d)||e._._.bj.has(e._.d)?0:1),3),pD=D(170,fD,e=>e._._),mD=D(171,fD,e=>e._._),hD=O(1,`<button type=button><span aria-hidden=true> </span><span> </span><!><span><span> </span><span aria-hidden=true>vs</span><span> </span><!></span><!><span><!> file<!></span></button>`,` D D l D l%b D D l b D l%l%b D%c%`,AE,`<p><!><span><span> </span><span aria-hidden=true>vs</span><span> </span><!></span><!></p>`,` D%b D D l b D l%l%`,$T),gD=D(175,e=>{hD(e,e._._.cc>1?0:1),fD(e)},e=>e._._),_D=k(0,0,e=>{cD(e),fD(e)}),vD=E(3,e=>w(e.a,`data-pr`,e._.g?`${e._.h}/${e._.g.number}`:void 0)),yD=k(0,0,e=>{vD(e),cD(e)}),bD=k(0,0,vD),xD=k(0,0,cD),SD=j(HT),CD=M(19,e=>{ND(e,e.t.length),SD(e)}),wD=E(4,e=>CD(e,e._.cs.get(e.d)||[])),TD=_e(37,wD),ED=e=>{TD._(e),kD._(e)},DD=(e,t)=>LD(e,t.length),OD=E(5,e=>DD(e,e._.ct.get(e.d)||[])),kD=_e(37,OD),AD=O(0,`<section><!><!></section>`,` D%b%`,uD),jD=E(21,e=>AD(e,e.u||e.g?0:1)),MD=j(tD),ND=M(20,e=>{jD(e),MD(e)}),PD=j(UE,iE,BT),FD=M(3,e=>{wD(e),OD(e),_D(e),PD(e)}),ID=j(nD),LD=M(23,e=>{xD(e),ID(e)}),RD=j(GE,oE),zD=M(6,e=>{VD(e,e.g?.number),HD(e,e.g?.url),UD(e,e.g?.title),WD(e,e.g?.headRefName),GD(e,e.g?.baseRefName),jD(e),yD(e),RD(e)}),BD=(e,t)=>{FD(e,t[0]?.id),zD(e,t[0]?.pr),qD(e,t[0]?.worktree),JD(e,t[0]?.head),YD(e,t[0]?.base),XD(e,t[0]?.baseSha),ZD(e,t[0]?.full_name),QD(e,t[0]?.branch),$D(e,t[0]?.localHead)},VD=M(8,j(fC,tC)),HD=M(9,j(hC,rC)),UD=M(10,j(_C,aC)),WD=M(11,j(qE,sE,vC,oC)),GD=M(16,j(QE,fE)),KD=j(KE),qD=M(7,e=>{bD(e),KD(e)}),JD=M(12,j(YE,lE,yC,sC)),YD=M(13,j(XE,uE,bC,cC)),XD=M(14,j(ZE,dE,xC,lC)),ZD=M(15,j(uC)),QD=M(17,j($E,wE,pE,JT)),$D=M(18,j(TE,YT)),eO=k(12,0,e=>Nn(e.a,e._.ar)),tO=e=>{eO._(e),nO._(e),rO._(e),Dn(e.a)},nO=k(12,0,e=>Pn(e.a,e._.de)),rO=k(12,0,e=>Fn(e.a,e._.df)),iO=L(`i36`,e=>A(e.a,`click`,function(){e._.aq?.()})),aO=e=>{T(e.a,[wt,`_dP`]),At(e.b),jt(e.b,14),Mt(e.b),iO(e)},oO=(e,t)=>{kA(e,t?.additions),AA(e,t?.deletions)},sO=M(125,j(_T)),cO=(e,t)=>uS(e.ac,t),lO=E(128,e=>cO(e,e.ca.filter(t=>(e.ct.get(t.id)||[]).length).map(t=>({id:t.id,label:t.pr?`${t.worktree} #${t.pr.number}`:t.worktree,files:e.ct.get(t.id)||[]})))),uO=M(127,e=>{lO(e),kD(e)}),dO=E(122,e=>uO(e,new Map(e.ca.map(t=>[t.id,e.cn.filter(e=>e.repo===t.id)])))),fO=M(121,e=>{HS(e.ad,e.cn),jA(e,e.cn?.length),sO(e,new Set(e.cn.map(e=>e.key))),dO(e)}),pO=E(120,e=>fO(e,e.cl?e.cg.filter(t=>e.cl.has(t.key)||t.key===e.bf):e.cg),2),mO=M(114,e=>{lb(e.a0,e.cg),oO(e,(()=>{let t=0,n=0;for(let r of e.cg)t+=r.additions||0,n+=r.deletions||0;return{additions:t,deletions:n}})()),pO(e)}),hO=E(112,e=>mO(e,(()=>{let t=Ve(e.b1);return e.cd.filter(e=>t(e.key))})())),gO=M(111,e=>{EA(e,e.cd?.length),hO(e)}),_O=M(133,j(HE,rE)),vO=je(35,o,(e=>`/${e}&`)(f),$C,rw),yO=(e,t)=>{_O(e,new Set(t.map(e=>e.id))),vO(e,[t,`id`])},bO=je(32,o,(e=>`/${e}&`)(f),Sw,ww),xO=je(33,o,(e=>`/${e}&`)(f),fw,gw),SO=je(37,`<!><!><!>`,`b%`,ED,BD),CO=M(137,Nw),wO=E(135,e=>CO(e,ZA(e))),TO=j(IC),EO=M(134,e=>{NA(e,e.d0?.length),wO(e),TO(e)}),DO=E(109,e=>EO(e,e.ca.filter(t=>t.githubDrift&&!e.bm.has(t.id)))),OO=M(108,e=>{TA(e,e.ca.length),gO(e,e.ca.flatMap(e=>e.files.map(t=>({...t,repo:e.id,key:`${e.worktree}/${t.path}`})))),yO(e,e.ca.filter(e=>!!e.pr&&!!e.localHead&&(e.localHead!==e.head||e.branch!==e.pr.headRefName))),bO(e,[e.ca.filter(e=>e.baseMissing),`id`]),xO(e,[e.ca.filter(e=>e.contained&&e.files.length),`id`]),SO(e,[e.ca,`id`]),dO(e),lO(e),DO(e),VC(e)}),kO=M(149,rO),AO=E(146,e=>kO(e,QA(e)),4),jO=M(150,j(Jw)),MO=E(147,e=>jO(e,$A(e)),5),NO=M(151,j(Yw)),PO=E(145,e=>NO(e,ej(e)),3),FO=M(144,e=>{AO(e),MO(e),PO(e)}),IO=L(`i50`,e=>fe(e,{active:e.an,load:e.c0,onMount:function(){let t=new AbortController,n={abort:t,loaded:!1,wasActive:!1,lastPr:e.am||``,lastNonce:e.ao||0,start:()=>{this.active&&!n.loaded&&(n.loaded=!0,this.load())}};return n.wasActive=!!this.active,C().addEventListener(`review.changed`,t=>{n.loaded&&t.data?.workspaceId===e.al&&e.c5()},{signal:t.signal}),C().addEventListener(`status.changed`,t=>{if(!this.active||!n.loaded||e.az)return;let r=t.data,i=r&&r[e.al];if(!i)return;let a=Be(i);!a||!e.bv||a===e.bv||e.c8()},{signal:t.signal}),n.start(),n},onUpdate:function(){this.start(),this.active&&this.loaded&&!this.wasActive&&e.c6(),this.wasActive=!!this.active;let t=e.am||``,n=e.ao||0;this.loaded&&t&&n!==this.lastNonce?(this.lastNonce=n,this.lastPr=t,e.bt(t)):(this.lastPr=t,this.lastNonce=n)},onDestroy:function(){e.bw&&clearTimeout(e.bw),this.abort.abort()}})),LO=E(107,IO,11),RO=M(106,LO),zO=E(105,e=>RO(e,nj(e))),BO=M(104,e=>{zO(e),LO(e)}),VO=E(99,e=>BO(e,rj(e))),HO=M(98,e=>{VO(e),LO(e)}),UO=E(97,e=>HO(e,ij(e)),5),WO=M(91,e=>{UO(e),LO(e)}),GO=E(82,e=>WO(e,aj(e)),2),KO=M(126,TD),qO=e=>{KO(e,new Map(e.ca.map(t=>[t.id,e.cd.filter(e=>e.repo===t.id)])))},JO=M(148,nO),YO=E(143,e=>JO(e,oj(e)),2),XO=O(31,`<p>Loading diff…</p>`,` `,MC),ZO=E(62,e=>XO(e,!e.au&&e.az?0:1)),QO=O(36,`<p> </p>`,` D `,HC,`<p> </p>`,` D `,Ow),$O=E(124,e=>QO(e,e.au&&!e.cf?0:e.au&&!e.cp&&!e.be?1:2),3),ek=N(56,e=>{OO(e,e.au||[]),FO(e,tj(e)),GO(e),qO(e),YO(e),ZO(e),$O(e)}),tk=(e,t)=>{sS(e.ac,t),LS(e.ad,t)},nk=j(xT),rk=M(129,e=>{tk(e,new Set(e.cv.keys())),nk(e)}),ik=M(141,j(Kw)),ak=M(140,j(Gw)),ok=E(139,e=>ak(e,cj(e)),3),sk=N(57,e=>{Vk(e,e.av?.length),rk(e,(()=>{let t=new Map;for(let n of e.av){let e=`${n.worktree}/${n.path}`;t.set(e,[...t.get(e)||[],n])}return t})()),ik(e,sj(e)),ok(e),YO(e),AO(e),PO(e)}),ck=j(Uw),lk=N(59,e=>{ok(e),MO(e),ck(e)}),uk=O(30,o,(e=>`/${e}&`)(f),Lw),dk=j(Fw),fk=N(60,e=>{uk(e,+!e.ay),dk(e)}),pk=j(Aw),mk=N(61,e=>{w(e.q,`disabled`,e.az),te(e.r,e.az&&`_x`),w(e.v,`disabled`,e.az),w(e.w,`disabled`,e.az),w(e.x,`disabled`,e.az),LO(e),ZO(e),pk(e)}),hk=N(63,e=>{Gt(e.g,e.b1),hO(e),Dw(e)}),gk=j(vw,cw,KC),_k=N(64,e=>{T(e.v,[`_d9`,{_d8:!e.b2}]),w(e.v,`aria-pressed`,e.b2?`false`:`true`),T(e.w,[`_d9`,{_d8:e.b2}]),w(e.w,`aria-pressed`,e.b2?`true`:`false`),T(e.x,[`_d_`,{_d8:e.b2}]),w(e.x,`aria-pressed`,e.b2?`true`:`false`),w(e.x,`title`,e.b2?`Showing working tree — tap for committed only`:`Showing committed only — tap to include uncommitted`),I(e.y,e.b2?`Dirty`:`Clean`),UO(e),VO(e),gk(e)}),vk=N(65,e=>{T(e.o,[Tt,`_dK`,{_dJ:e.b3}]),w(e.o,`title`,e.b3?`Hide file tree`:`Show file tree`),cS(e.ac,e.b3)}),yk=N(66,e=>PS(e.ad,e.b4)),bk=M(119,pO),xk=e=>{bk(e,e.bc.trim()?new Set(e.bd):null)},Sk=N(73,e=>{nA(e,e.bb?.query),rA(e,e.bb?.keys),iA(e,e.bb?.hit),xk(e)}),Ck=j(pD,IE,LT),wk=N(80,e=>{Qx(e.ac,e.bi),GO(e),Ck(e)}),Tk=j(mD),Ek=N(81,e=>{nS(e.ac,e.bj),GO(e),Tk(e)}),Dk=N(83,j(zE)),Ok=N(84,e=>{DO(e),wO(e)}),kk=(e,t)=>{dA(e,t.cbs),fA(e,t.io),pA(e,t.root)},Ak=(e,t)=>{mA(e,t.sig),hA(e,t.timer)},jk=(e,t)=>gA(e,t.seq),Mk=(e,t)=>SA(e,t.busy),Nk=M(138,e=>{ok(e),MO(e)}),Pk=(e,t)=>{dS(e.ac,t),US(e.ad,t)},Fk=M(156,e=>Yy(e.a0,dj(e))),Ik=M(152,e=>{Pk(e,uj(e)),Fk(e,fj(e))}),Lk=L(`i48`,e=>{A(e.o,`click`,function(){vk(e,!e.b3),c(e.b3)}),A(e.q,`click`,function(){e.c6()}),A(e.s,`click`,function(){yk(e,!0)}),A(e.v,`click`,function(){e.b2&&(_k(e,!1),x(!1),e.c0(!1))}),A(e.w,`click`,function(){e.b2||(_k(e,!0),x(!0),e.c0(!0))}),A(e.x,`click`,function(){let t=!e.b2;_k(e,t),x(t),e.c0(t)}),A(e.a1,`click`,function(){e.dk()})});function Rk(e){T(e.a,`_dI`),T(e.b,`_dN`),T(e.d,`_d0`),T(e.f,`_d1`),Xt(e.g),Kt(e.g,vj(e)),T(e.h,`_dR`),T(e.i,`_dS`),T(e.j,`_d2`),T(e.n,`_dM`),Ce(e.p),le(e.p,14),se(e.p),T(e.q,[wt,`_dK`]),Fe(e.r),Me(e.r,14),T(e.s,`_ex`),T(e.u,`_d7`),sb(e.a0),Iy(e.a0,_j(e)),Wy(e.a0),Gy(e.a0),Jy(e.a0),T(e.a1,[wt,`_dT`,`_dK`]),pe(e.a2),Te(e.a2,14),be(e.a2),T(e.a3,`_dY`),aS(e.ac),$x(e.ac,gj(e)),rS(e.ac,hj(e)),FS(e.ad,mj(e)),ek(e,null),sk(e,[]),lk(e,null),fk(e,null),mk(e,!1),hk(e,``),_k(e,S()),vk(e,n()),yk(e,!1),Sk(e,{query:``,hit:null,keys:[]}),wk(e,new Set),Ek(e,new Set),Dk(e,new Set),Ok(e,new Set),kk(e,{io:null,root:null,cbs:null}),Ak(e,{sig:``,timer:0}),jk(e,{seq:0}),Mk(e,{busy:0}),Nk(e,lj),Ik(e,pj(e)),Lk(e)}var zk=O(11,`<span>·</span><!> comment<!>`,` b%c%`,zw),Bk=O(12,tn,(e=>`/${e}&`)(nn),tO),Vk=M(58,e=>{T(e.c,[`_dO`,{_dQ:e.aw>0}]),zk(e,+!e.aw),Bk(e,+!e.aw),Rw(e)}),Hk=ye(67,e=>{T(e.z,[`_dV`,{_dU:!e.b5}]),Fy(e.a0,e.b5),w(e.a1,`hidden`,e.b5)}),Uk=E(44,e=>Hk(e,e.ag,e.ah)),Wk=M(42,Uk),Gk=M(43,Uk),Kk=L(`i51`,e=>{e.aj!=null&&e.aj!==e.b7&&Qk(e,e.aj)}),qk=E(70,Kk),Jk=L(`i49`,e=>{e.an&&window.addEventListener(`keydown`,t=>{!(t.metaKey||t.ctrlKey)||t.altKey||t.shiftKey||t.key.toLowerCase()===`f`&&(t.target instanceof HTMLTextAreaElement||(t.preventDefault(),e.dk()))},{capture:!0,signal:u(e,0)})}),Yk=E(155,e=>{ee(e,0),Jk(e)}),Xk=M(154,Yk),Zk=E(72,e=>Xk(e,yj(e))),Qk=N(69,e=>{_b(e.a0,e.b7),qk(e),Zk(e)}),$k=M(45,e=>{Qk(e,e.aj||0),qk(e)}),eA=M(71,e=>{gb(e.a0,e.b9),Zk(e)}),tA=(e,t)=>eA(e,t||{focus:bj}),nA=M(74,kw),rA=M(75),iA=M(76,e=>{oA(e,e.be?.key),sA(e,e.be?.repo),cA(e,e.be?.line),$O(e)}),aA=j(lT,rT),oA=M(77,e=>{pO(e),aA(e)}),sA=M(78,j(lD)),cA=M(79,j(hT)),lA=M(90),uA=E(89,e=>lA(e,xj(e)),2),dA=M(86,uA),fA=M(87,uA),pA=M(88,uA),mA=M(93,e=>{UO(e),LO(e)}),hA=M(94,e=>{zO(e),LO(e)}),gA=M(96,UO),_A=M(142,YO),vA=M(103,LO),yA=E(102,e=>vA(e,Cj(e))),bA=M(47,e=>{_A(e,Sj(e)),UO(e),yA(e),LO(e),ok(e),AO(e),MO(e)}),xA=M(48,e=>{UO(e),LO(e)}),SA=M(101,e=>{yA(e),AO(e),MO(e),PO(e)}),CA=M(49,e=>{LO(e),Yk(e)}),wA=M(50,LO),TA=M(110,j(gD,zT)),EA=M(113,e=>{BS(e.ad,e.cf),$O(e)}),DA=O(10,`<span>+<!></span><span>−<!></span>`,` Db%l Db%`,zC,`<span>0</span>`,` `,NC),OA=E(118,e=>DA(e,e.ci||e.cj?0:1)),kA=M(116,e=>{OA(e),RC(e)}),AA=M(117,e=>{OA(e),BC(e)}),jA=M(123,e=>{I(e.t,e.cp),$O(e)}),MA=O(34,o,(e=>`/${e}&`)(f),Pw),NA=(e,t)=>MA(e,+!t),PA=M(51,e=>{AO(e),MO(e),PO(e)}),FA=O(4,(e=>`<button title="Back to terminal">${e}</button>`)(Ot),(e=>` D/${e}&l`)(kt),aO),IA=M(52,e=>FA(e,+!e.aq)),LA=(e,t)=>{Wk(e,t.findOpen),Gk(e,t.findOpenChange),$k(e,t.findTick),tA(e,t.findFocusRef),bA(e,t.workspaceId),xA(e,t.focusPr),CA(e,t.active),wA(e,t.focusNonce),PA(e,t.onSent),IA(e,t.onExit),zA(e,t.sessions),BA(e,t.workspaceBranch),VA(e,t.workspaceName)},RA=j(Bw),zA=M(53,e=>{eO(e),RA(e)}),BA=M(54,j(OE,bE,QT,WT)),VA=M(55,j(jE,SE,eE,KT));function HA(e){return function(){e._.d3()}}function UA(e){return function(){fk(e._,null)}}function WA(e){return function(t){fk(e._._._._._._,t)}}function GA(e){return function(){lk(e._._._._._._,null)}}function KA(e){return function(t){e._._._._._._.d6(e._._.j,t)}}function qA(e){return function(t){e._._._._._._.d7(t)}}function JA(e){return function(t,n){e._._._._._._.dg(e._._.j,t,n)}}function YA(e){return function(t,n){e._._._._._._.dh(t,n)}}function XA(e){return function(t){lk(e._._._._._._,{key:e._._.k,side:t.side||`additions`,start:Math.min(t.start,t.end),end:Math.max(t.start,t.end)})}}function ZA(e){return()=>{Ok(e,new Set([...e.bm,...e.d0.map(e=>e.id)]))}}function QA(e){return async t=>{let n=e.av;e.c3++;try{await e.da(n,t),e.ap?.(t),sk(e,[]),lk(e,null),await fetch(`/api/workspaces/${e.al}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`clear`})}).catch(()=>{})}catch(t){fk(e,String(t.message||t))}finally{e.c3--}}}function $A(e){return async(t,n,r)=>{let i=e.ax;if(!i)return;let a=n.trim();if(!a)return;let o={id:-1,workspace_id:e.al,worktree:e.d4(t.repo),path:t.path,side:i.side===`deletions`?`deletions`:`additions`,line_start:i.start,line_end:i.end,text:a,created_at:``};e.c3++;try{await e.da([o],r),e.ap?.(r),lk(e,null)}catch(t){fk(e,String(t.message||t))}finally{e.c3--}}}function ej(e){return async(t,n)=>{let r=e.av.find(e=>e.id===t);if(r){e.c3++;try{await e.da([r],n),e.ap?.(n),sk(e,e.av.filter(e=>e.id!==t)),await fetch(`/api/review-comments/${t}`,{method:`DELETE`}).catch(()=>{})}catch(t){fk(e,String(t.message||t))}finally{e.c3--}}}}function tj(e){return async(t,n)=>{t.length&&await s(`/api/sessions/${n}/send`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({text:`Please address this review feedback, then summarize what you changed.\n\n${_t(t,e.au)}`,...ge()||{}})})}}function nj(e){return()=>{e.bw&&clearTimeout(e.bw),e.bw=setTimeout(()=>{e.bw=0,e.c6()},250)}}function rj(e){return()=>(Ok(e,new Set),e.c0(e.b2,!0))}function ij(e){return async(t=e.b2,n=!1)=>{let r=++e.by;mk(e,!0),fk(e,null);try{let i=new URLSearchParams;t&&i.set(`uncommitted`,`1`),n&&i.set(`refresh`,`1`);let a=i.size?`?${i}`:``,[o,c]=await Promise.all([s(`/api/workspaces/${e.al}/diff${a}`),s(`/api/workspaces/${e.al}/review`)]);if(r!==e.by)return;ek(e,o),sk(e,c.comments||[]),e.bv=ze(o),e.am&&e.bt(e.am)}catch(t){if(r!==e.by)return;fk(e,String(t.message||t))}finally{r===e.by&&mk(e,!1)}}}function aj(e){return t=>{if(!t)return;let n=e.au||[],r=n.find(e=>e.pr&&`${e.worktree}/${e.pr.number}`===t),i=new Set(e.bj);for(let t of n)e.bi.has(t.id)||i.add(t.id);r&&i.add(r.id),Ek(e,i);let a=new Set;for(let e of n)(!r||e.id!==r.id)&&a.add(e.id);wk(e,a),Dk(e,new Set);let o=Date.now(),s=()=>{let n=e.a3,r=n?.querySelector(`[data-pr="${CSS.escape(t)}"]`);if(!n||!r){Date.now()-o<2500&&requestAnimationFrame(s);return}let i=r.getBoundingClientRect().top-n.getBoundingClientRect().top+n.scrollTop;n.scrollTo({top:Math.max(0,i-8)})};requestAnimationFrame(s)}}function oj(e){return async()=>await Ae(_t(e.av,e.au))?(await e.d8(),!0):(fk(e,`Copy failed — clipboard needs HTTPS on this browser.`),!1)}function sj(e){return async t=>{sk(e,e.av.filter(e=>e.id!==t)),await fetch(`/api/review-comments/${t}`,{method:`DELETE`})}}function cj(e){return async(t,n)=>{let r=e.ax;lk(e,null);try{let i=await s(`/api/workspaces/${e.al}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`comment`,worktree:e.d4(t.repo),path:t.path,side:r.side,line_start:r.start,line_end:r.end,text:n.trim()})});sk(e,e.av.concat(i))}catch(t){fk(e,String(t.message||t))}}}function lj(e){return e.includes(`#`)?e.split(`#`)[0]:e}function uj(e){return t=>{e.di(t)?.scrollIntoView({block:`start`})}}function dj(e){return function(t){e.dm(t)}}function fj(e){return t=>{if(Sk(e,t),!t.hit)return;let n=t.hit;setTimeout(()=>{let r=e.di(n.key);if(r){if(n.line<1){let t=e.a3;if(t){let e=r.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop;t.scrollTo({top:Math.max(0,e-8)})}else r.scrollIntoView({block:`start`});return}Je(t.query,n),Ye()}},0)}}function pj(e){return t=>{let n=e.a3?.querySelector(`details[data-key="${CSS.escape(t)}"]`);return n&&(n.open=!0),n}}function mj(e){return t=>{yk(e,t)}}function hj(e){return t=>{Ek(e,t)}}function gj(e){return t=>{wk(e,t)}}function _j(e){return t=>{Hk(e,t)}}function vj(e){return t=>{hk(e,t)}}function yj(e){return()=>{Hk(e,!0),Qk(e,e.b7+1),e.b9.focus()}}function bj(){}function xj(e){return(t,n)=>{e.bo??=new WeakMap,e.bo.set(t,n);let r=e.a3||null;(!e.bp||e.bq!==r)&&(e.bp?.disconnect(),e.bq=r,e.bp=new IntersectionObserver(t=>{for(let n of t)n.isIntersecting&&(e.bp.unobserve(n.target),e.bo.get(n.target)?.())},{root:r,rootMargin:`800px 0px`})),e.bp.observe(t),requestAnimationFrame(()=>{if(!t.isConnected)return;let r=e.a3,i=t.getBoundingClientRect(),a=r?r.getBoundingClientRect():{top:0,bottom:window.innerHeight};i.bottom>=a.top-800&&i.top<=a.bottom+800&&(e.bp?.unobserve(t),n())})}}function Sj(e){return async()=>{sk(e,[]),lk(e,null),await fetch(`/api/workspaces/${e.al}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`clear`})})}}function Cj(e){return async()=>{if(!e.c3)try{let t=await s(`/api/workspaces/${e.al}/review`);if(e.c3)return;sk(e,t.comments||[])}catch{}}}F(`i25`,HA),F(`i24`,UA),F(`i32`,WA),F(`i29`,GA),F(`i27`,KA),F(`i30`,qA),F(`i28`,JA),F(`i31`,YA),F(`i26`,XA),F(`i7`,ZA),F(`i14`,QA),F(`i15`,$A),F(`i16`,ej),F(`i12`,tj),F(`i6`,nj),F(`i5`,rj),F(`i3`,ij),F(`i2`,aj),F(`i13`,oj),F(`i10`,sj),F(`i9`,cj),F(`i8`,lj),F(`i18`,uj),F(`i23`,dj),F(`i20`,fj),F(`i17`,pj),F(`i35`,mj),F(`i34`,hj),F(`i33`,gj),F(`i22`,_j),F(`i21`,vj),F(`i19`,yj),F(`i0`,bj),F(`i1`,xj),F(`i11`,Sj),F(`i4`,Cj);var wj=d(`i`,WS,GS,Rk,LA);export{wj as default,Re as t};
|
|
1531
|
+
`);for(let t=0;t<l.length;t++){if(o.length>=vy||c>=yy)return;let u=t+1;if(!s.has(u))continue;let d=l[t],f=(i?d:d.toLowerCase()).indexOf(r);f<0||n===`deletions`&&a.has(d)||(n===`additions`&&a.add(d),c++,o.push({key:e.key,path:e.path,repo:e.repo,line:u,side:n,preview:wy(d,f,r.length)}))}}function wy(e,t,n){let r=Math.max(0,t-36),i=Math.min(e.length,t+n+36);return(r>0?`…`:``)+e.slice(r,i)+(i<e.length?`…`:``)}var Ty=`<div><input type=search enterkeyhint=search autocomplete=off placeholder="Find in diffs" aria-label="Find in diffs"><span> </span><button type=button title="Previous match">↑</button><button type=button title="Next match">↓</button><button type=button title="Close find">×</button></div>`,Ey=` D b D l b b l`,Dy=L(`f8`,e=>{e.a8=!!e.v,e.t&&(e.t.focus=e.am)}),Oy=E(49,Dy,3),ky=L(`f7`,e=>fe(e,{onMount:function(){let t=new AbortController;return document.addEventListener(`keydown`,t=>{if(!e.a8)return;if(t.key===`Escape`){if(document.querySelector(`dialog[open]`)||t.target instanceof HTMLTextAreaElement)return;t.preventDefault(),e.al();return}let n=t.metaKey||t.ctrlKey;(t.key===`F3`||n&&t.key.toLowerCase()===`g`)&&(t.preventDefault(),e.ak(t.shiftKey?-1:1))},{signal:t.signal}),e.ad=e.u,e.ae=!!e.v,e.v&&e.am(),{abort:t}},onUpdate:function(){e.u!==e.ad&&(e.ad=e.u,e.v&&e.am()),e.v&&!e.ae?(e.ae=!0,e.am()):!e.v&&e.ae&&(e.ae=!1,e.ab&&=(clearTimeout(e.ab),0),Je(``,null),Ky(e,{query:``,hit:null,keys:[]}))},onDestroy:function(){e.ab&&clearTimeout(e.ab),this.abort.abort(),Je(``,null),Ky(e,{query:``,hit:null,keys:[]})}})),Ay=E(50,ky,8),jy=E(32,e=>I(e.d,e.v&&(e.x||``).trim()?e.a2?`${e.a5+1}/${e.a2}`:`0/0`:``),3),My=E(29,e=>{w(e.e,`disabled`,!e.a2||!e.v),w(e.f,`disabled`,!e.a2||!e.v)}),Ny=ye(21,e=>{T(e.a,[`_fo`,!e.v&&`_fn`]),w(e.a,`aria-hidden`,e.v?`false`:`true`),w(e.b,`tabindex`,e.v?0:-1),w(e.e,`tabindex`,e.v?0:-1),w(e.f,`tabindex`,e.v?0:-1),w(e.g,`tabindex`,e.v?0:-1),Oy(e),Ay(e),jy(e),My(e)}),Py=E(11,e=>Ny(e,e.j,e.k)),Fy=M(9,Py),Iy=M(10,Py),Ly=(e,t)=>cb(e,t?.length),Ry=E(25,e=>Ly(e,by(e.s,e.x||``))),zy=M(46,Ay),By=E(43,e=>zy(e,vb(e)),4),Vy=E(45,t=>e(t,`b`,t.x||``,yb(t))),Hy=ye(23,e=>{Ry(e),By(e),Vy(e),jy(e)}),Uy=E(14,e=>Hy(e,e.m,e.n)),Wy=M(12,Uy),Gy=M(13,Uy),Ky=ye(14),qy=E(17,e=>Ky(e,e.p,e.q)),Jy=M(15,qy),Yy=M(16,qy),Xy=M(31,e=>{By(e),jy(e)}),Zy=E(30,e=>Xy(e,e.a2?Math.min(e.a0,e.a2-1):-1)),Qy=M(44,Vy),$y=E(42,e=>Qy(e,bb(e)),3),eb=M(41,e=>{$y(e),By(e)}),tb=E(35,e=>eb(e,xb(e)),2),nb=N(26,e=>{Zy(e),tb(e)}),rb=(e,t)=>fb(e,t.open),ib=(e,t)=>{pb(e,t.timer),mb(e,t.tick),hb(e,t.wasOpen)},ab=M(48,e=>{Oy(e),Ay(e)}),ob=L(`f6`,e=>{ce(e,`b`),A(e.b,`keydown`,function(t){if(e.v){if(t.key===`Escape`){t.preventDefault(),e.al();return}t.key===`Enter`&&(t.preventDefault(),e.ak(t.shiftKey?-1:1))}}),A(e.e,`mousedown`,function(e){e.preventDefault()}),A(e.e,`click`,function(){e.ak(-1)}),A(e.f,`mousedown`,function(e){e.preventDefault()}),A(e.f,`click`,function(){e.ak(1)}),A(e.g,`mousedown`,function(e){e.preventDefault()}),A(e.g,`click`,function(){e.al()})});function sb(e){T(e.b,ae),T(e.c,`_fr`),T(e.e,De),T(e.f,De),T(e.g,De),nb(e,0),rb(e,{open:!1}),ib(e,{timer:0,tick:0,wasOpen:!1}),ab(e,Sb(e)),ob(e)}var cb=M(28,e=>{Zy(e),jy(e),My(e)}),lb=M(18,e=>{Ry(e),tb(e),$y(e)}),ub=M(47,Ay),db=E(38,e=>ub(e,Cb(e))),fb=M(34,e=>{tb(e),$y(e),By(e),db(e),Oy(e),Ay(e)}),pb=M(37,e=>{$y(e),By(e),db(e),Ay(e)}),mb=M(39,Ay),hb=M(40,Ay),gb=M(19,Oy),_b=M(20,Ay);function vb(e){return t=>{e.a8&&(e.ab&&=(clearTimeout(e.ab),0),e.af(e.x||``,(e.a5<0?0:e.a5)+t))}}function yb(e){return function(t){e.ai(t)}}function bb(e){return t=>{e.a8&&(Hy(e,t),nb(e,0),Je(t,by(e.s,t)[0]??null),e.ab&&clearTimeout(e.ab),e.ab=setTimeout(()=>{e.ab=0,e.af(t,0)},80))}}function xb(e){return(t,n)=>{if(!e.a8)return;let r=by(e.s,t),i=[...new Set(r.map(e=>e.key))];if(!r.length){nb(e,0),Je(t,null),Ky(e,{query:t,hit:null,keys:i});return}nb(e,(n%r.length+r.length)%r.length);let a=r[e.a0];Je(t,a),Ky(e,{query:t,hit:a,keys:i})}}function Sb(e){return()=>{let t=e.b;t&&(t.focus(),t.select(),document.activeElement!==t&&setTimeout(()=>{t.focus(),t.select()},0))}}function Cb(e){return()=>{Ny(e,!1),e.a8=!1,e.ab&&=(clearTimeout(e.ab),0),Je(``,null),Ky(e,{query:``,hit:null,keys:[]})}}F(`f3`,vb),F(`f0`,yb),F(`f2`,bb),F(`f1`,xb),F(`f5`,Sb),F(`f4`,Cb);function wb(e,t){let n=null,r=()=>{if(!n||t.aborted)return;let i=e().closest(`[data-diff-main]`);if(i){let t=i.getBoundingClientRect(),r=0;if(n.y>=t.bottom-110?r=Math.max(4,Math.min(20,(n.y-(t.bottom-110))/3)):n.y<=t.top+110&&(r=-Math.max(4,Math.min(20,(t.top+110-n.y)/3))),r){i.scrollTop+=r;let a=e().getBoundingClientRect(),o=Math.max(t.top+12,a.top+48),s=Math.min(t.bottom-12,a.bottom-48),c=Math.max(o,Math.min(n.y,s));document.dispatchEvent(new PointerEvent(`pointermove`,{clientX:n.x,clientY:c,pointerId:n.pointerId,pointerType:`touch`,bubbles:!0,composed:!0}))}}requestAnimationFrame(r)};e().addEventListener(`pointerdown`,e=>{e.pointerType!==`mouse`&&e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute?.(`data-column-number`))&&(n={pointerId:e.pointerId,x:e.clientX,y:e.clientY},requestAnimationFrame(r))},{capture:!0,signal:t}),document.addEventListener(`pointermove`,e=>{n&&e.pointerId===n.pointerId&&e.isTrusted&&(n.x=e.clientX,n.y=e.clientY)},{capture:!0,passive:!0,signal:t});for(let e of[`pointerup`,`pointercancel`])document.addEventListener(e,e=>{n&&e.pointerId===n.pointerId&&(n=null)},{capture:!0,signal:t})}var Tb=`<div></div>`,Eb=`background:var(--panel);border-block:1px solid var(--border);padding:.5rem .75rem;font-family:system-ui,sans-serif;font-size:.85rem;display:flex;flex-direction:column;gap:.35rem;`,Db=`font:inherit;cursor:pointer;border:1px solid var(--border);border-radius:var(--radius);padding:.2rem .6rem;background:none;color:inherit;`,Ob=`font:inherit;cursor:pointer;border:1px solid var(--border);border-radius:var(--radius);padding:.2rem .6rem;background:none;color:inherit;background:var(--accent);color:light-dark(#fff,#10131f);border-color:transparent;`,kb=`font:inherit;max-width:8rem;border:1px solid var(--border);border-radius:var(--radius);padding:.2rem .35rem;background:inherit;color:inherit;`,Ab=new CSSStyleSheet;Ab.replaceSync(`:host { display: block; max-width: 100%; overflow-x: auto; } @media (pointer: coarse) { pre[data-diff] { touch-action: pan-x pan-y; } [data-column-number], [data-gutter-utility-slot] { touch-action: none !important; } }`+Ge);var jb=oe(`e0`,0),Mb=(e,t)=>T(e.a,[`_e7`,t]),Nb=L(`e1`,e=>fe(e,{file:e.e,comments:e.f,draft:e.g,sessions:e.h,onMount:function(){let t=()=>e.h||[],n=()=>{let e=t();if(e.length<=1)return null;let n=document.createElement(`select`);n.setAttribute(`aria-label`,`Send to session`),n.style.cssText=kb;for(let t of e){let e=document.createElement(`option`);e.value=t.id,e.textContent=t.title||t.agent,n.append(e)}return n},r=e=>e?.value||t()[0]?.id||null,i=(e,t,n)=>{for(let r of e)r.disabled=t,n&&r.dataset.role===`send`&&(r.textContent=t?`Sending…`:n)},a=a=>{if(!a)return;let o=document.createElement(`div`);o.style.cssText=Eb;let s=document.createElement(`p`);s.textContent=a.text,s.style.cssText=`margin:0;white-space:pre-wrap;`;let c=document.createElement(`div`);c.style.cssText=`display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;`;let l=document.createElement(`button`);l.type=`button`,l.textContent=`Remove`,l.style.cssText=`font:inherit;cursor:pointer;border:1px solid var(--border);border-radius:var(--radius);padding:.2rem .6rem;background:none;color:inherit;font-size:.75rem;opacity:.85;`,l.onclick=()=>e.i?.(a.id);let u=t().length>0&&!!e.j,d=document.createElement(`button`);d.type=`button`,d.dataset.role=`send`,d.textContent=`Send`,d.style.cssText=`font:inherit;cursor:pointer;border:1px solid var(--border);border-radius:var(--radius);padding:.2rem .6rem;background:none;color:inherit;background:var(--accent);color:light-dark(#fff,#10131f);border-color:transparent;font-size:.75rem;`,d.hidden=!u;let f=u?n():null;return f&&(f.style.fontSize=`.75rem`),d.onclick=()=>{(async()=>{let t=r(f);if(!(!t||d.disabled)){i([l,d],!0,`Send`);try{await e.j?.(a.id,t)}finally{i([l,d],!1,`Send`)}}})()},c.append(l),u&&(c.append(d),f&&c.append(f)),o.append(s,c),o},o=()=>{let a=document.createElement(`div`);a.style.cssText=Eb;let o=document.createElement(`textarea`);o.placeholder=`Leave a comment…`,o.rows=3,o.style.cssText=`font:inherit;width:100%;resize:vertical;border:1px solid var(--border);border-radius:var(--radius);padding:.4rem .5rem;background:inherit;color:inherit;`+(Ie()?`font-size:16px;`:``);let s=document.createElement(`button`);s.type=`button`,s.textContent=`Add`,s.style.cssText=Db;let c=document.createElement(`button`);c.type=`button`,c.dataset.role=`send`,c.textContent=`Send`,c.style.cssText=Ob;let l=document.createElement(`button`);l.type=`button`,l.textContent=`Cancel`,l.style.cssText=Db;let u=t().length>0&&!!e.k;c.hidden=!u;let d=u?n():null;s.onclick=()=>{o.value.trim()&&e.l?.(o.value)},c.onclick=()=>{(async()=>{let t=o.value.trim(),n=r(d);if(!(!t||!n||c.disabled)){i([s,c,l],!0,`Send`);try{await e.k?.(t,n)}finally{i([s,c,l],!1,`Send`)}}})()},l.onclick=()=>e.m?.(),o.onkeydown=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),u?c.onclick():s.onclick()),e.key===`Escape`&&l.onclick()};let f=document.createElement(`div`);f.style.cssText=`display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;`,f.append(s),u&&(f.append(c),d&&f.append(d)),f.append(l),a.append(o,f);let p=()=>o.scrollIntoView({block:`center`,behavior:`smooth`});return o.addEventListener(`focus`,()=>{let e=window.visualViewport;e&&(e.addEventListener(`resize`,p),o.addEventListener(`blur`,()=>e.removeEventListener(`resize`,p),{once:!0}))}),setTimeout(()=>{o.scrollIntoView({block:`center`,behavior:`instant`}),o.focus()},0),a},s=new Map,c,l={draft:!0},u,d=new dy({diffStyle:v()?`unified`:`split`,disableFileHeader:!0,enableLineSelection:!0,onLineSelectionEnd(t){if(!t)return;let n=t.endSide!=null&&t.endSide!==t.side;e.n?.({side:t.side,start:t.start,end:n?t.start:t.end})},renderAnnotation(e){let t=e.metadata||{};return t.draft?u??=o():a(t.comment)}}),f=()=>{let t=[],n=new Map;for(let r of e.f||[]){let e=s.get(r.id)||{comment:r};n.set(r.id,e),t.push({side:r.side,lineNumber:r.line_end,metadata:e})}return s=n,e.g&&(c!==e.g&&(c=e.g,l={draft:!0},u=void 0),t.push({side:e.g.side,lineNumber:e.g.end,metadata:l})),t},p=()=>{let t=e.a.querySelector(`diffs-container`)?.shadowRoot;t&&!t.adoptedStyleSheets.includes(Ab)&&(t.adoptedStyleSheets=[...t.adoptedStyleSheets,Ab])},m=()=>{if(e.e.old==null&&e.e.new==null){e.o?.(`could not read ${e.e.path}`);return}let t=d.render({containerWrapper:e.a,oldFile:e.e.old==null?null:{name:e.e.oldPath||e.e.path,contents:e.e.old},newFile:e.e.new==null?null:{name:e.e.path,contents:e.e.new},lineAnnotations:f()});Promise.resolve(t).then(()=>{p(),nt(e.a)}).catch(t=>e.o?.(`diff render: ${t}`))};m();let h=new AbortController;return Ie()&&wb(jb(e),h.signal),{instance:d,render:m,dragAbort:h,unregSearch:tt(e.a,e.e.key),shownFile:e.e,shownComments:e.f,shownDraft:e.g,shownSessions:e.h}},onUpdate:function(){this.shownDraft&&!this.draft&&this.instance.setSelectedLines(null),(this.file!==this.shownFile||this.comments!==this.shownComments||this.draft!==this.shownDraft||this.sessions!==this.shownSessions)&&(this.shownFile=this.file,this.shownComments=this.comments,this.shownDraft=this.draft,this.shownSessions=this.sessions,this.render())},onDestroy:function(){this.unregSearch(),this.dragAbort.abort(),this.instance.cleanUp?.()}})),Pb=E(15,Nb,10),Fb=M(4,Pb),Ib=M(5,Pb),Lb=M(6,Pb),Rb=M(7,Pb),zb=M(8,Pb),Bb=M(9,Pb),Vb=M(10,Pb),Hb=M(11,Pb),Ub=M(12,Pb),Wb=M(13,Pb),Gb=M(14,Pb),Kb=`<aside></aside>`,qb=e=>T(e.a,`_fJ`),Jb=E(4,e=>{T(e.a,[`_fG`,{_fC:e._._._._.r.has(e._._.f(e._.e))}]),I(e.c,e._._._._.r.has(e._._.f(e._.e))?`▸`:`▾`)},2),Yb=D(21,Jb,e=>e._._._._),Xb=L(`h3`,e=>A(e.a,`click`,function(){let t=new Set(e._._._._.r);t.delete(e._._.f(e._.e))||t.add(e._._.f(e._.e)),iS(e._._._._,t)})),Zb=e=>{Yb(e),Qb(e),$b._(e),ex._(e),tx._(e),T(e.b,`_fK`),Xb(e)},Qb=D(10,Jb,e=>e._._),$b=k(0,0,e=>{w(e.a,`title`,e._.e),Jb(e)}),ex=k(0,0,e=>Ee(e.a,`padding-left:${.35+e._.f*.75}rem`)),tx=k(0,0,e=>I(e.d,e._.g)),nx=O(5,`<span>💬</span>`,` `,qb),rx=E(6,e=>nx(e,+!e._._._._.s.has(e._.j))),ix=D(22,rx,e=>e._._._._),ax=L(`h4`,e=>A(e.a,`click`,function(){e._._._._.m(e._.j)})),ox=e=>{ix(e),sx._(e),cx._(e),lx._(e),ux._(e),dx._(e),T(e.a,`_fH`),T(e.b,`_fL`),T(e.d,`_fI`),ax(e)},sx=k(0,1,e=>Ee(e.a,`padding-left:${.5+e._.f*.75}rem`)),cx=k(0,1,e=>w(e.a,`title`,e._.i)),lx=k(0,1,rx),ux=k(0,1,e=>{w(e.b,`data-status`,e._.k),I(e.c,e._.k)}),dx=k(0,1,e=>I(e.e,e._.l)),fx=O(0,`<button type=button><span> </span><!>/</button>`,` D D l%`,Zb,`<button type=button><span> </span><span> </span><!></button>`,` D D l D l%`,ox),px=E(3,e=>fx(e,!e._.i(e.c)&&e.c?.kind===`dir`?0:!e._.i(e.c)&&e.c?.kind!==`dir`?1:2)),mx=_e(1,px),hx=mx,gx=M(2,e=>{vx(e,e.c?.path),yx(e,e.c?.depth),bx(e,e.c?.label),xx(e,e.c?.file?.path),Sx(e,e.c?.file?.key),Cx(e,e.c?.file?.status),wx(e,e.c?.name),px(e)}),_x=(e,t)=>gx(e,t[0]),vx=M(4,$b),yx=M(5,e=>{sx(e),ex(e)}),bx=M(6,tx),xx=M(8,cx),Sx=M(9,lx),Cx=M(10,ux),wx=M(11,dx),Tx=ie(3,0,2),Ex=E(9,e=>Tx(e,!e._._.n.has(e._.i))),Dx=D(19,Ex,e=>e._._),Ox=M(8,mx),kx=E(7,e=>Ox(e,fS(e)),2),Ax=M(6,kx),jx=e=>{Dx(e),Mx(e),Px._(e),Lx._(e),Ax(e,pS)},Mx=D(21,kx,e=>e._._),Nx=M(5,j(Qb)),Px=k(5,0,e=>{Nx(e,mS(e)),kx(e),Ex(e)}),Fx=je(1,`<!><!><!>`,`b%`,hx,_x),Ix=(e,t)=>Fx(e,[t,e=>e.kind===`dir`?`d:${e.path}`:e.file.key]),Lx=k(5,0,e=>Ix(e,Ct(e._.m))),Rx=E(9,e=>{T(e.b,[`_fF`,{_fC:e._.n.has(e.i)}]),I(e.d,e._.n.has(e.i)?`▸`:`▾`)}),zx=O(5,`<!><!><!><!><!><!>`,`b%b%b%b%`,jx),Bx=E(10,e=>zx(e,!e._.n.has(e.i)||e._.p.has(e.i)?0:1),2),Vx=_e(0,e=>{Rx(e),Bx(e)}),Hx=L(`h5`,e=>A(e.b,`click`,function(){let t=e.i,n=new Set(e._.n);n.delete(t)||(eS(e._,new Set([...e._.p,t])),n.add(t)),Xx(e._,n)})),Ux=e=>{Vx._(e),Wx._(e),T(e.a,`_fE`),T(e.c,`_fK`),Hx(e)},Wx=_e(0,Bx),Gx=M(8,e=>{Rx(e),Bx(e),Px(e)}),Kx=(e,t)=>I(e.e,t),qx=(e,t)=>{Gx(e,t[0]?.id),Kx(e,t[0]?.label),Jx(e,t[0]?.files)},Jx=M(12,Lx),Yx=j(Dx),Xx=ye(13,e=>{Vx(e),Yx(e)}),Zx=E(5,e=>Xx(e,e.d,e.e)),Qx=M(3,Zx),$x=M(4,Zx),eS=ye(15,Wx),tS=E(8,e=>eS(e,e.g,e.h)),nS=M(6,tS),rS=M(7,tS),iS=N(17,j(Mx,Yb));function aS(e){iS(e,new Set)}var oS=M(18,j(ix)),sS=(e,t)=>oS(e,t||new Set),cS=(e,t)=>T(e.a,[`_fD`,{_fC:t===!1}]),lS=je(0,`<div><button type=button><span> </span> </button><!></div>`,` D D D l l%`,Ux,qx),uS=(e,t)=>lS(e,[t,`id`]),dS=M(12);function fS(e){return t=>{let n=e.g(t);for(let r of e._._.r){let i=r.indexOf(`/`),a=r.slice(0,i),o=r.slice(i+1);if(a===e._.i&&(t.kind!==`dir`||t.path!==o)&&(n===o||n.startsWith(`${o}/`)))return!0}return!1}}function pS(e){return e.kind===`dir`?e.path:e.file.path.includes(`/`)?e.file.path.slice(0,e.file.path.lastIndexOf(`/`)):``}function mS(e){return t=>`${e._.i}/${t}`}F(`h2`,fS),F(`h1`,pS),F(`h0`,mS);var hS=`_fd _D`,gS=`<!><!><!>`,_S=O(5,`<span>💬</span>`),vS=E(9,e=>_S(e,+!e._._.o.has(e.i))),yS=D(18,vS,e=>e._._),bS=L(`d0`,e=>A(e.a,`click`,function(){MS(e._._,!1),e._._.l(e.i)})),xS=e=>{yS(e),T(e.a,[`_fk`,`_q`]),T(e.b,`_fm`),T(e.d,`_fl`),bS(e)},SS=(e,t)=>{w(e.b,`data-status`,t),I(e.c,t)},CS=M(8,e=>{w(e.d,`title`,e.i),I(e.e,e.i),vS(e)}),wS=je(8,`<button type=button><span> </span><span><bdi> </bdi></span><!></button>`,` D D l E m%`,xS,(e,t)=>{CS(e,t[0]?.key),SS(e,t[0]?.status)}),TS=k(0,0,e=>wS(e,[e._.i,`key`])),ES=L(`d1`,e=>{A(e.a,`click`,function(){MS(e._,!1)}),A(e.h,`click`,function(){MS(e._,!1)})}),DS=e=>{TS._(e),kS._(e),AS._(e),T(e.a,`_ff`),T(e.b,`_fg`),T(e.c,`_fh`),T(e.d,`_fe`),T(e.e,`_fi`),T(e.h,hS),T(e.i,`_fj`),ES(e)},OS=E(9,e=>I(e.g,e._.j===e._.p?``:` / ${e._.p}`)),kS=k(0,0,e=>{I(e.f,e._.j),OS(e)}),AS=k(0,0,OS),jS=O(0,`<div></div><div role=dialog aria-label="Jump to file"><div><strong>Files</strong><span><!><!></span><button type=button title=Close aria-label=Close>×</button></div><div></div></div>`,` b D D b D%b%l l `,DS),MS=ye(12,e=>jS(e,+!e.m)),NS=E(5,e=>MS(e,e.d,e.e)),PS=M(3,NS),FS=M(4,NS),IS=M(14,j(yS)),LS=(e,t)=>IS(e,t||new Set),RS=M(15,AS),zS=E(10,e=>RS(e,e.h??e.j)),BS=M(7,zS),VS=M(9,e=>{zS(e),kS(e)}),HS=M(8,e=>{VS(e,e.i?.length),TS(e)}),US=M(11),WS=((e,t,n,r,i,a,o)=>`<div><div><div><div><!><div>${e}</div><div><h1>Review</h1><span><!><!></span></div><!></div><div><button>${t}</button><button title="Refresh diff">${n}</button><button title="Jump to file">Files (<!>)</button><div role=group aria-label="Review scope"><button type=button title="Committed changes only — base…tip, no working-tree edits">Committed</button><button type=button title="Include uncommitted and untracked files in the working tree">Working tree</button></div><button type=button> </button><div>${r}</div><button title="Find in the review (⌘/Ctrl+F)" aria-label="Find in the review">${i}</button></div></div><div data-diff-main><!><!><!><!><!><!><!><!></div></div>${a}${o}</div>`)(Pt,ve,re,Ty,ne,Kb,gS),GS=((e,t,n,r,i,a,o)=>` D D D D%b D/${e}&l D b D%b%m%l D D/${t}&l D/${n}&l Db%l D b l D l D/${r}&l D/${i}&n D%b%b%b%b%b%b%b%m/${a}&/${o}&l`)(Ft,de,Pe,Ey,Se,` b`,`b%c`),KS=e=>T(e.a,[`_e3`,`_eT`]),qS=e=>T(e.a,[`_e3`,`_eT`]),JS=e=>T(e.a,[`_e3`,`_eT`]),YS=k(6,0,e=>I(e.b,e._.w)),XS=e=>{YS._(e),T(e.a,`_l`)},ZS=k(8,0,e=>I(e.b,e._.p)),QS=e=>{ZS._(e),T(e.a,`_eQ`)},$S=k(12,0,e=>I(e.b,e._.a0)),eC=e=>{$S._(e),T(e.a,`_eQ`)},tC=D(27,e=>I(e.b,e._._._.i),e=>e._._._),nC=e=>{tC(e),rC(e),aC(e),oC(e),sC(e),cC(e),lC(e),T(e.a,[`_l`,`_n`]),T(e.c,`_p`)},rC=D(28,e=>w(e.a,`href`,`${e._._._.j}/files`),e=>e._._._),iC=E(4,e=>w(e.a,`title`,`${e._._._.k} — ${e._._._.l} ${e._._._.m} vs ${e._._._.n} ${e._._._.o}`),4),aC=D(29,e=>{I(e.d,e._._._.k),iC(e)},e=>e._._._),oC=D(30,iC,e=>e._._._),sC=D(31,iC,e=>e._._._),cC=D(32,iC,e=>e._._._),lC=D(33,iC,e=>e._._._),uC=D(34,e=>I(e.b,e._._._.p),e=>e._._._),dC=e=>{uC(e),T(e.a,Dt)},fC=D(27,e=>I(e.b,e._._._.i),e=>e._._._),pC=L(`i44`,e=>A(e.a,`click`,function(e){e.stopPropagation()})),mC=e=>{fC(e),hC(e),_C(e),vC(e),yC(e),bC(e),xC(e),T(e.a,[`_l`,`_n`]),T(e.c,Dt),pC(e)},hC=D(28,e=>w(e.a,`href`,`${e._._._.j}/files`),e=>e._._._),gC=E(4,e=>w(e.a,`title`,`${e._._._.k} — ${e._._._.l} ${e._._._.m} vs ${e._._._.n} ${e._._._.o}`),4),_C=D(29,e=>{I(e.d,e._._._.k),gC(e)},e=>e._._._),vC=D(30,gC,e=>e._._._),yC=D(31,gC,e=>e._._._),bC=D(32,gC,e=>e._._._),xC=D(33,gC,e=>e._._._),SC=E(10,e=>w(e.a,`title`,`origin/${e.h} ${e.i} · GitHub ${e.j}`),2),CC=M(7,SC),wC=M(8,e=>{I(e.c,yt(e.i)),SC(e)}),TC=M(9,e=>{I(e.d,yt(e.j)),SC(e)}),EC=(e,t)=>I(e.b,t>0?` · `:``),DC=(e,t)=>{CC(e,t[0]?.pr?.headRefName),TC(e,t[0]?.pr?.headRefOid),wC(e,t[0]?.head),EC(e,t[1])},OC=(e,t)=>I(e.a,t>0?` · `:``),kC=(e,t)=>I(e.b,t),AC=(e,t)=>I(e.c,t),jC=(e,t)=>{kC(e,t[0]?.worktree),AC(e,t[0]?.pr?.number),OC(e,t[1])},MC=e=>T(e.a,`_e1`),NC=e=>T(e.a,`_ez`),PC=je(1,`<!><!> #<!>`,`%b%c%`,0,jC),FC=je(2,`<span><!><!> → <!></span>`,` D%b%c%`,0,DC),IC=D(183,e=>{PC(e,[e._._.d0,`id`]),FC(e,[e._._.d0,`id`])},e=>e._._),LC=Oe(`i42`,`<span><!> — this view has a newer tip than the PR page.</span><span></span>`,` D%l `,e=>{IC(e),T(e.a,`_p`),T(e.c,[`_q`,`_et`])}),RC=k(10,0,e=>I(e.b,e._.ci)),zC=e=>{RC._(e),BC._(e),T(e.a,`_ex`),T(e.c,`_ey`)},BC=k(10,0,e=>I(e.d,e._.cj)),VC=k(36,0,e=>I(e.b,e._.ca.some(e=>e.pr)?`No file changes on these PRs.`:`No changes vs base.`)),HC=e=>{VC._(e),T(e.a,`_e1`)},UC=L(`i46`,e=>fe(e,{onMount:function(){e._._._._._._.bs(e.a,()=>{iT(e._,!0)})}})),WC=D(173,UC,e=>e._._._._._._),GC=e=>{WC(e),T(e.a,[`_eV`,`_eT`])},KC=D(165,e=>I(e.e,e._._.b2?`, plus uncommitted`:``),e=>e._._),qC=e=>{KC(e),JC(e),YC(e),XC(e),ZC(e)},JC=D(11,e=>I(e.a,yt(e._.h))),YC=D(12,e=>I(e.b,e._.i)),XC=D(13,e=>I(e.c,yt(e._.j))),ZC=D(14,e=>I(e.d,e._.k)),QC=Oe(`i43`,`this view is <!> (<!>). Local is <!> (<!><!>).`,`b%c%c%c%b%`,qC),$C=e=>{g(e.a),h(e.a,QC(e)),me(e.a,`info`),p(e.a,`inline`),i(e.a),t(e.a),m(e.a),he(e.a,{})},ew=E(6,e=>l(e.a,`${e.d} #${e.f}`)),tw=M(3,ew),nw=M(5,ew),rw=(e,t)=>{tw(e,t[0]?.worktree),nw(e,t[0]?.pr?.number),iw(e,t[0]?.pr?.headRefName),aw(e,t[0]?.head),ow(e,t[0]?.localHead),sw(e,t[0]?.branch)},iw=M(8,j(YC)),aw=M(7,j(JC)),ow=M(9,j(XC)),sw=M(10,j(ZC)),cw=D(165,e=>I(e.b,e._._.b2?` — showing uncommitted changes only`:``),e=>e._._),lw=e=>{cw(e),uw(e)},uw=D(7,e=>I(e.a,e._.g)),dw=Oe(`i39`,`already in <!><!>.`,`b%b%`,lw),fw=e=>{g(e.a),h(e.a,dw(e)),me(e.a,`info`),p(e.a,`inline`),i(e.a),t(e.a),m(e.a),he(e.a,{})},pw=E(5,e=>l(e.a,e.d?`${e.e} #${e.d.number}`:e.e)),mw=M(3,pw),hw=M(4,pw),gw=(e,t)=>{mw(e,t[0]?.pr),hw(e,t[0]?.worktree),_w(e,t[0]?.base)},_w=M(6,j(uw)),vw=D(165,e=>I(e.b,e._._.b2?` — showing uncommitted changes only`:``),e=>e._._),yw=e=>{vw(e),bw(e)},bw=D(5,e=>I(e.a,e._.e)),xw=Oe(`i38`,`<!><!>.`,`%b%`,yw),Sw=e=>{g(e.a),h(e.a,xw(e)),me(e.a,`warn`),p(e.a,`inline`),i(e.a),t(e.a),m(e.a),he(e.a,{})},Cw=(e,t)=>l(e.a,`${t}: base not found`),ww=(e,t)=>{Cw(e,t[0]?.worktree),Tw(e,t[0]?.base)},Tw=M(4,j(bw)),Ew=E(2,e=>I(e.b,e._.bc.trim()?`No matches in diffs.`:`No files match "${e._.b1}".`)),Dw=k(36,1,Ew),Ow=e=>{Dw._(e),kw._(e),T(e.a,`_e1`)},kw=k(36,1,Ew),Aw=D(163,e=>{w(e.a,`disabled`,e._._.az),I(e.b,e._._.az?`Reloading…`:`Reload`)},e=>e._._),jw=L(`i40`,e=>A(e.a,`click`,function(){e._._.c6()})),Mw=Oe(`i41`,`<button> </button>`,` D `,e=>{Aw(e),T(e.a,`_h`),jw(e)}),Nw=k(34,0,e=>m(e.a,HA(e))),Pw=e=>{Nw._(e),g(e.a),i(e.a,we({content:Mw(e)})),h(e.a,LC(e)),me(e.a,`info`),p(e.a,`inline`),l(e.a,`GitHub is behind`),t(e.a),he(e.a,{})},Fw=D(162,e=>I(e.a,e._._.ay),e=>e._._),Iw=Oe(`i37`,` `,` `,Fw),Lw=e=>{g(e.a),h(e.a,Iw(e)),m(e.a,UA(e)),i(e.a),t(e.a),me(e.a),p(e.a),l(e.a),he(e.a,{})},Rw=k(11,0,e=>{I(e.b,e._.aw),I(e.c,e._.aw===1?``:`s`)}),zw=e=>{Rw._(e),T(e.a,`_eA`)},Bw=D(157,e=>Rb(e.a,e._._._._._._.ar||[]),e=>e._._._._._._),Vw=e=>{Bw(e),Uw(e),Gw(e),Kw(e),Jw(e),Yw(e),Xw(e),Zw(e),Qw(e),e.a,Mb(e.a,`_eT`),Ub(e.a,GA(e)),Gb(e.a,WA(e))},Hw=E(1,e=>Lb(e.a,e._._._._._._.ax&&e._._._._._._.ax?.key===e._._.k?e._._._._._._.ax:null)),Uw=D(161,Hw,e=>e._._._._._._),Ww=E(2,e=>Hb(e.a,KA(e))),Gw=D(185,Ww,e=>e._._._._._._),Kw=D(186,e=>zb(e.a,qA(e)),e=>e._._._._._._),qw=E(3,e=>Vb(e.a,JA(e))),Jw=D(189,qw,e=>e._._._._._._),Yw=D(190,e=>Bb(e.a,YA(e)),e=>e._._._._._._),Xw=D(25,e=>{Fb(e.a,e._._.j),Ww(e),qw(e)},e=>e._._),Zw=D(26,e=>{Wb(e.a,XA(e)),Hw(e)},e=>e._._),Qw=D(27,e=>Ib(e.a,e._._.v),e=>e._._),$w=O(0,`<div></div>`,` `,GC,Tb,(e=>`/${e}&`)(` b`),Vw),eT=E(3,e=>$w(e,e.b||e.c?1:0)),tT=M(2,eT),nT=E(4,e=>tT(e,e._._._._._.bf===e._.k)),rT=D(167,nT,e=>e._._._._._),iT=N(1,eT),aT=e=>{rT(e),oT._(e),iT(e,!1)},oT=k(7,3,nT),sT=E(11,e=>T(e.a,[`_eS`,e._._._._.bf===e.k&&`_eq`])),cT=E(14,e=>T(e.e,[`_e0`,e._._._._.bf===e.k&&e._._._._.bh<1&&`_er`]),2),lT=D(167,e=>{sT(e),cT(e)},e=>e._._._._),uT=O(7,`<p>binary file</p>`,` `,JS,`<p>file too large to display</p>`,` `,qS,`<p>file could not be read</p>`,` `,KS,`<!><!><!>`,`b%`,aT),dT=E(24,e=>uT(e,e.r?0:e.s?1:e.t==null&&e.u==null?2:e.x?3:4),4),fT=N(23,e=>{_(e,`a`,e.x),dT(e)}),pT=L(`i47`,e=>A(e.a,`toggle`,function(t,n){if(fT(e,n.open),!n.open){let e=n.closest(`[data-diff-main]`);if(e){let t=n.getBoundingClientRect().top-e.getBoundingClientRect().top;t<0&&(e.scrollTop+=t)}}})),mT=e=>{lT(e),hT(e),_T(e),xT(e),T(e.b,`_eU`),T(e.c,`_eZ`),fT(e,!0),pT(e)},hT=D(169,cT,e=>e._._._._),gT=E(12,e=>w(e.a,`hidden`,!e._._._._.cr.has(e.k))),_T=D(178,gT,e=>e._._._._),vT=j(Qw),yT=M(21,e=>{CT(e,e.v.length),vT(e)}),bT=E(13,e=>yT(e,e._._._._.cv.get(e.k)||[])),xT=D(181,bT,e=>e._._._._),ST=O(6,`<span>💬 <!></span>`,` Db%`,XS),CT=M(22,e=>{ST(e,+!e.w),YS(e)}),wT=j(Zw),TT=M(10,e=>{w(e.a,`data-key`,e.k),bT(e),sT(e),gT(e),cT(e),oT(e),wT(e)}),ET=(e,t)=>{w(e.c,`data-status`,t),I(e.d,t)},DT=(e,t)=>{w(e.e,`title`,t),I(e.f,t)},OT=M(17,dT),kT=M(18,dT),AT=M(19,dT),jT=M(20,dT),MT=(e,t)=>PT(e,t[0]),NT=j(Xw),PT=M(9,e=>{TT(e,e.j?.key),ET(e,e.j?.status),DT(e,e.j?.path),OT(e,e.j?.binary),kT(e,e.j?.tooLarge),AT(e,e.j?.old),jT(e,e.j?.new),NT(e)}),FT=ie(2,0),IT=E(3,e=>FT(e,e._._._.cc===1||!e._._._.bi.has(e._._.d)),2),LT=D(170,IT,e=>e._._._),RT=e=>{LT(e),zT(e),BT(e),HT(e),T(e.b,`_eR`)},zT=D(175,IT,e=>e._._._),BT=D(24,IT,e=>e._._),VT=je(1,`<details><summary><span> </span><span><bdi> </bdi></span><!></summary><!></details>`,` D D D l E m%l%`,mT,MT),HT=D(38,e=>VT(e,[e._._.t,`key`]),e=>e._._),UT=E(3,e=>I(e.b,ht(e._._._.r,e._._._._.as||``,e._._._._.at||``)),2),WT=D(158,UT,e=>e._._._._),GT=e=>{WT(e),KT(e),JT(e),YT(e),T(e.a,`_l`)},KT=D(159,UT,e=>e._._._._),qT=E(2,e=>w(e.a,`title`,`checked out ${e._._._.r} ${e._._._.s}`)),JT=D(36,e=>{qT(e),UT(e)},e=>e._._._),YT=D(37,qT,e=>e._._._),XT=(e,t)=>{mE(e,t?.title),hE(e,t?.base),gE(e,t?.head),vE(e,t?.topic)},ZT=E(17,e=>XT(e,mt(e._._.q||e._._.n,e._._.l||e._._.r,e._._._.as||``,e._._._.at||``)),5),QT=D(158,ZT,e=>e._._._),$T=e=>{QT(e),eE(e),rE(e),iE(e),oE(e),sE(e),lE(e),uE(e),dE(e),fE(e),pE(e),T(e.a,`_eL`),T(e.c,`_eM`),T(e.d,`_eN`),T(e.f,`_eP`),T(e.g,`_eO`)},eE=D(159,ZT,e=>e._._._),tE=O(9,`<span>local <!></span>`,` Db%`,GT),nE=E(16,e=>tE(e,+!e._._._.cz.has(e._._.d))),rE=D(182,nE,e=>e._._._),iE=D(24,nE,e=>e._._),aE=O(1,`<a target=_blank rel=noopener>#<!></a><span> </span>`,` Db%l D `,nC),oE=D(25,e=>aE(e,+!e._._.g),e=>e._._),sE=D(30,ZT,e=>e._._),cE=E(12,e=>w(e.c,`title`,`${e.l} · ${e._._.m.slice(0,7)}…${e._._.o.slice(0,7)}`),2),lE=D(31,cE,e=>e._._),uE=D(32,ZT,e=>e._._),dE=D(33,cE,e=>e._._),fE=D(35,ZT,e=>e._._),pE=D(36,ZT,e=>e._._),mE=M(11,cE),hE=(e,t)=>I(e.e,t),gE=(e,t)=>I(e.h,t),_E=O(8,`<span> </span>`,` D `,QS),vE=M(15,e=>{_E(e,+!e.p),ZS(e)}),yE=E(3,e=>I(e.b,ht(e._._._.r,e._._._._.as||``,e._._._._.at||``)),2),bE=D(158,yE,e=>e._._._._),xE=e=>{bE(e),SE(e),wE(e),TE(e),T(e.a,`_l`)},SE=D(159,yE,e=>e._._._._),CE=E(2,e=>w(e.a,`title`,`checked out ${e._._._.r} ${e._._._.s}`)),wE=D(36,e=>{CE(e),yE(e)},e=>e._._._),TE=D(37,CE,e=>e._._._),EE=(e,t)=>{rD(e,t?.title),iD(e,t?.base),aD(e,t?.head),sD(e,t?.topic)},DE=E(31,e=>EE(e,mt(e._._.q||e._._.n,e._._.l||e._._.r,e._._._.as||``,e._._._.at||``)),5),OE=D(158,DE,e=>e._._._),kE=L(`i45`,e=>A(e.a,`click`,function(){let t=e._._.d;if(e._._._.bl.has(t)){let n=new Set(e._._._.bl);n.delete(t),Dk(e._._._,n),e._._._.bi.has(t)||wk(e._._._,new Set([...e._._._.bi,t]));return}if(e._._._.bi.has(t)){if(e._._._.bj.has(t)){let n=new Set(e._._._.bi);n.delete(t),wk(e._._._,n);return}Dk(e._._._,new Set([...e._._._.bl,t])),requestAnimationFrame(()=>{requestAnimationFrame(()=>{if(!e._._._.bl.has(t))return;let n=new Set(e._._._.bi);n.delete(t),wk(e._._._,n);let r=new Set(e._._._.bl);r.delete(t),Dk(e._._._,r)})})}else Ek(e._._._,new Set([...e._._._.bj,t])),wk(e._._._,new Set([...e._._._.bi,t]))})),AE=e=>{OE(e),jE(e),IE(e),zE(e),HE(e),UE(e),GE(e),KE(e),qE(e),YE(e),XE(e),ZE(e),QE(e),$E(e),tD(e),nD(e),T(e.d,Et),T(e.g,`_eM`),T(e.h,`_eN`),T(e.j,`_eP`),T(e.k,`_eO`),T(e.o,`_eJ`),kE(e)},jE=D(159,DE,e=>e._._._),ME=E(18,e=>w(e.a,`title`,e.r?`Show ${e._._.x||e._._.u} files`:`Hide files`),2),NE=E(20,e=>T(e.b,[`_eW`,!e.r&&`_eX`,e.t&&`_eY`])),PE=M(17,e=>{T(e.a,[`_eG`,e.r&&`_eH`]),w(e.a,`aria-expanded`,e.r?`false`:`true`),I(e.c,e.r?`▸`:`▾`),ME(e),NE(e)}),FE=E(27,e=>PE(e,e._._._.bi.has(e._._.d))),IE=D(170,FE,e=>e._._._),LE=M(19,e=>{w(e.a,`aria-busy`,e.t?`true`:`false`),NE(e)}),RE=E(28,e=>LE(e,e._._._.bl.has(e._._.d))),zE=D(172,RE,e=>e._._._),BE=O(13,`<span>local <!></span>`,` Db%`,xE),VE=E(29,e=>BE(e,+!e._._._.cz.has(e._._.d))),HE=D(182,VE,e=>e._._._),UE=D(24,e=>{FE(e),RE(e),VE(e)},e=>e._._),WE=O(5,`<a target=_blank rel=noopener>#<!></a><span> </span>`,` Db%l D `,mC,`<span> </span>`,` D `,dC),GE=D(25,e=>WE(e,+!e._._.g),e=>e._._),KE=D(26,e=>I(e.e,e._._.h),e=>e._._),qE=D(30,DE,e=>e._._),JE=E(23,e=>w(e.g,`title`,`${e.w} · ${e._._.m.slice(0,7)}…${e._._.o.slice(0,7)}`),2),YE=D(31,JE,e=>e._._),XE=D(32,DE,e=>e._._),ZE=D(33,JE,e=>e._._),QE=D(35,DE,e=>e._._),$E=D(36,DE,e=>e._._),eD=E(30,e=>{I(e.p,e._._.x||e._._.u),I(e.q,(e._._.x||e._._.u)===1?``:`s`)}),tD=D(39,e=>{ME(e),eD(e)},e=>e._._),nD=D(40,e=>{ME(e),eD(e)},e=>e._._),rD=M(22,JE),iD=(e,t)=>I(e.i,t),aD=(e,t)=>I(e.l,t),oD=O(12,`<span> </span>`,` D `,eC),sD=M(26,e=>{oD(e,+!e.a0),$S(e)}),cD=E(4,e=>w(e.a,`hidden`,!e._.x&&!e._.g&&e._._.bg!==e._.d),3),lD=D(168,cD,e=>e._._),uD=e=>{lD(e),pD(e),mD(e),gD(e),_D._(e),yD._(e),bD._(e),xD._(e),T(e.a,`_eF`)},dD=O(2,`<!><!><div></div><!><!>`,`b%b b%`,RT),fD=E(5,e=>dD(e,e._._.cc===1||!e._._.bi.has(e._.d)||e._._.bj.has(e._.d)?0:1),3),pD=D(170,fD,e=>e._._),mD=D(171,fD,e=>e._._),hD=O(1,`<button type=button><span aria-hidden=true> </span><span> </span><!><span><span> </span><span aria-hidden=true>vs</span><span> </span><!></span><!><span><!> file<!></span></button>`,` D D l D l%b D D l b D l%l%b D%c%`,AE,`<p><!><span><span> </span><span aria-hidden=true>vs</span><span> </span><!></span><!></p>`,` D%b D D l b D l%l%`,$T),gD=D(175,e=>{hD(e,e._._.cc>1?0:1),fD(e)},e=>e._._),_D=k(0,0,e=>{cD(e),fD(e)}),vD=E(3,e=>w(e.a,`data-pr`,e._.g?`${e._.h}/${e._.g.number}`:void 0)),yD=k(0,0,e=>{vD(e),cD(e)}),bD=k(0,0,vD),xD=k(0,0,cD),SD=j(HT),CD=M(19,e=>{ND(e,e.t.length),SD(e)}),wD=E(4,e=>CD(e,e._.cs.get(e.d)||[])),TD=_e(37,wD),ED=e=>{TD._(e),kD._(e)},DD=(e,t)=>LD(e,t.length),OD=E(5,e=>DD(e,e._.ct.get(e.d)||[])),kD=_e(37,OD),AD=O(0,`<section><!><!></section>`,` D%b%`,uD),jD=E(21,e=>AD(e,e.u||e.g?0:1)),MD=j(tD),ND=M(20,e=>{jD(e),MD(e)}),PD=j(UE,iE,BT),FD=M(3,e=>{wD(e),OD(e),_D(e),PD(e)}),ID=j(nD),LD=M(23,e=>{xD(e),ID(e)}),RD=j(GE,oE),zD=M(6,e=>{VD(e,e.g?.number),HD(e,e.g?.url),UD(e,e.g?.title),WD(e,e.g?.headRefName),GD(e,e.g?.baseRefName),jD(e),yD(e),RD(e)}),BD=(e,t)=>{FD(e,t[0]?.id),zD(e,t[0]?.pr),qD(e,t[0]?.worktree),JD(e,t[0]?.head),YD(e,t[0]?.base),XD(e,t[0]?.baseSha),ZD(e,t[0]?.full_name),QD(e,t[0]?.branch),$D(e,t[0]?.localHead)},VD=M(8,j(fC,tC)),HD=M(9,j(hC,rC)),UD=M(10,j(_C,aC)),WD=M(11,j(qE,sE,vC,oC)),GD=M(16,j(QE,fE)),KD=j(KE),qD=M(7,e=>{bD(e),KD(e)}),JD=M(12,j(YE,lE,yC,sC)),YD=M(13,j(XE,uE,bC,cC)),XD=M(14,j(ZE,dE,xC,lC)),ZD=M(15,j(uC)),QD=M(17,j($E,wE,pE,JT)),$D=M(18,j(TE,YT)),eO=k(12,0,e=>Nn(e.a,e._.ar)),tO=e=>{eO._(e),nO._(e),rO._(e),Dn(e.a)},nO=k(12,0,e=>Pn(e.a,e._.de)),rO=k(12,0,e=>Fn(e.a,e._.df)),iO=L(`i36`,e=>A(e.a,`click`,function(){e._.aq?.()})),aO=e=>{T(e.a,[wt,`_ej`]),At(e.b),jt(e.b,14),Mt(e.b),iO(e)},oO=(e,t)=>{kA(e,t?.additions),AA(e,t?.deletions)},sO=M(125,j(_T)),cO=(e,t)=>uS(e.ac,t),lO=E(128,e=>cO(e,e.ca.filter(t=>(e.ct.get(t.id)||[]).length).map(t=>({id:t.id,label:t.pr?`${t.worktree} #${t.pr.number}`:t.worktree,files:e.ct.get(t.id)||[]})))),uO=M(127,e=>{lO(e),kD(e)}),dO=E(122,e=>uO(e,new Map(e.ca.map(t=>[t.id,e.cn.filter(e=>e.repo===t.id)])))),fO=M(121,e=>{HS(e.ad,e.cn),jA(e,e.cn?.length),sO(e,new Set(e.cn.map(e=>e.key))),dO(e)}),pO=E(120,e=>fO(e,e.cl?e.cg.filter(t=>e.cl.has(t.key)||t.key===e.bf):e.cg),2),mO=M(114,e=>{lb(e.a0,e.cg),oO(e,(()=>{let t=0,n=0;for(let r of e.cg)t+=r.additions||0,n+=r.deletions||0;return{additions:t,deletions:n}})()),pO(e)}),hO=E(112,e=>mO(e,(()=>{let t=Ve(e.b1);return e.cd.filter(e=>t(e.key))})())),gO=M(111,e=>{EA(e,e.cd?.length),hO(e)}),_O=M(133,j(HE,rE)),vO=je(35,o,(e=>`/${e}&`)(f),$C,rw),yO=(e,t)=>{_O(e,new Set(t.map(e=>e.id))),vO(e,[t,`id`])},bO=je(32,o,(e=>`/${e}&`)(f),Sw,ww),xO=je(33,o,(e=>`/${e}&`)(f),fw,gw),SO=je(37,`<!><!><!>`,`b%`,ED,BD),CO=M(137,Nw),wO=E(135,e=>CO(e,ZA(e))),TO=j(IC),EO=M(134,e=>{NA(e,e.d0?.length),wO(e),TO(e)}),DO=E(109,e=>EO(e,e.ca.filter(t=>t.githubDrift&&!e.bm.has(t.id)))),OO=M(108,e=>{TA(e,e.ca.length),gO(e,e.ca.flatMap(e=>e.files.map(t=>({...t,repo:e.id,key:`${e.worktree}/${t.path}`})))),yO(e,e.ca.filter(e=>!!e.pr&&!!e.localHead&&(e.localHead!==e.head||e.branch!==e.pr.headRefName))),bO(e,[e.ca.filter(e=>e.baseMissing),`id`]),xO(e,[e.ca.filter(e=>e.contained&&e.files.length),`id`]),SO(e,[e.ca,`id`]),dO(e),lO(e),DO(e),VC(e)}),kO=M(149,rO),AO=E(146,e=>kO(e,QA(e)),4),jO=M(150,j(Jw)),MO=E(147,e=>jO(e,$A(e)),5),NO=M(151,j(Yw)),PO=E(145,e=>NO(e,ej(e)),3),FO=M(144,e=>{AO(e),MO(e),PO(e)}),IO=L(`i50`,e=>fe(e,{active:e.an,load:e.c0,onMount:function(){let t=new AbortController,n={abort:t,loaded:!1,wasActive:!1,lastPr:e.am||``,lastNonce:e.ao||0,start:()=>{this.active&&!n.loaded&&(n.loaded=!0,this.load())}};return n.wasActive=!!this.active,C().addEventListener(`review.changed`,t=>{n.loaded&&t.data?.workspaceId===e.al&&e.c5()},{signal:t.signal}),C().addEventListener(`status.changed`,t=>{if(!this.active||!n.loaded||e.az)return;let r=t.data,i=r&&r[e.al];if(!i)return;let a=Be(i);!a||!e.bv||a===e.bv||e.c8()},{signal:t.signal}),n.start(),n},onUpdate:function(){this.start(),this.active&&this.loaded&&!this.wasActive&&e.c6(),this.wasActive=!!this.active;let t=e.am||``,n=e.ao||0;this.loaded&&t&&n!==this.lastNonce?(this.lastNonce=n,this.lastPr=t,e.bt(t)):(this.lastPr=t,this.lastNonce=n)},onDestroy:function(){e.bw&&clearTimeout(e.bw),this.abort.abort()}})),LO=E(107,IO,11),RO=M(106,LO),zO=E(105,e=>RO(e,nj(e))),BO=M(104,e=>{zO(e),LO(e)}),VO=E(99,e=>BO(e,rj(e))),HO=M(98,e=>{VO(e),LO(e)}),UO=E(97,e=>HO(e,ij(e)),5),WO=M(91,e=>{UO(e),LO(e)}),GO=E(82,e=>WO(e,aj(e)),2),KO=M(126,TD),qO=e=>{KO(e,new Map(e.ca.map(t=>[t.id,e.cd.filter(e=>e.repo===t.id)])))},JO=M(148,nO),YO=E(143,e=>JO(e,oj(e)),2),XO=O(31,`<p>Loading diff…</p>`,` `,MC),ZO=E(62,e=>XO(e,!e.au&&e.az?0:1)),QO=O(36,`<p> </p>`,` D `,HC,`<p> </p>`,` D `,Ow),$O=E(124,e=>QO(e,e.au&&!e.cf?0:e.au&&!e.cp&&!e.be?1:2),3),ek=N(56,e=>{OO(e,e.au||[]),FO(e,tj(e)),GO(e),qO(e),YO(e),ZO(e),$O(e)}),tk=(e,t)=>{sS(e.ac,t),LS(e.ad,t)},nk=j(xT),rk=M(129,e=>{tk(e,new Set(e.cv.keys())),nk(e)}),ik=M(141,j(Kw)),ak=M(140,j(Gw)),ok=E(139,e=>ak(e,cj(e)),3),sk=N(57,e=>{Vk(e,e.av?.length),rk(e,(()=>{let t=new Map;for(let n of e.av){let e=`${n.worktree}/${n.path}`;t.set(e,[...t.get(e)||[],n])}return t})()),ik(e,sj(e)),ok(e),YO(e),AO(e),PO(e)}),ck=j(Uw),lk=N(59,e=>{ok(e),MO(e),ck(e)}),uk=O(30,o,(e=>`/${e}&`)(f),Lw),dk=j(Fw),fk=N(60,e=>{uk(e,+!e.ay),dk(e)}),pk=j(Aw),mk=N(61,e=>{w(e.q,`disabled`,e.az),te(e.r,e.az&&`_x`),w(e.v,`disabled`,e.az),w(e.w,`disabled`,e.az),w(e.x,`disabled`,e.az),LO(e),ZO(e),pk(e)}),hk=N(63,e=>{Gt(e.g,e.b1),hO(e),Dw(e)}),gk=j(vw,cw,KC),_k=N(64,e=>{T(e.v,[`_eD`,{_eC:!e.b2}]),w(e.v,`aria-pressed`,e.b2?`false`:`true`),T(e.w,[`_eD`,{_eC:e.b2}]),w(e.w,`aria-pressed`,e.b2?`true`:`false`),T(e.x,[`_eE`,{_eC:e.b2}]),w(e.x,`aria-pressed`,e.b2?`true`:`false`),w(e.x,`title`,e.b2?`Showing working tree — tap for committed only`:`Showing committed only — tap to include uncommitted`),I(e.y,e.b2?`Dirty`:`Clean`),UO(e),VO(e),gk(e)}),vk=N(65,e=>{T(e.o,[Tt,`_ee`,{_ed:e.b3}]),w(e.o,`title`,e.b3?`Hide file tree`:`Show file tree`),cS(e.ac,e.b3)}),yk=N(66,e=>PS(e.ad,e.b4)),bk=M(119,pO),xk=e=>{bk(e,e.bc.trim()?new Set(e.bd):null)},Sk=N(73,e=>{nA(e,e.bb?.query),rA(e,e.bb?.keys),iA(e,e.bb?.hit),xk(e)}),Ck=j(pD,IE,LT),wk=N(80,e=>{Qx(e.ac,e.bi),GO(e),Ck(e)}),Tk=j(mD),Ek=N(81,e=>{nS(e.ac,e.bj),GO(e),Tk(e)}),Dk=N(83,j(zE)),Ok=N(84,e=>{DO(e),wO(e)}),kk=(e,t)=>{dA(e,t.cbs),fA(e,t.io),pA(e,t.root)},Ak=(e,t)=>{mA(e,t.sig),hA(e,t.timer)},jk=(e,t)=>gA(e,t.seq),Mk=(e,t)=>SA(e,t.busy),Nk=M(138,e=>{ok(e),MO(e)}),Pk=(e,t)=>{dS(e.ac,t),US(e.ad,t)},Fk=M(156,e=>Yy(e.a0,dj(e))),Ik=M(152,e=>{Pk(e,uj(e)),Fk(e,fj(e))}),Lk=L(`i48`,e=>{A(e.o,`click`,function(){vk(e,!e.b3),c(e.b3)}),A(e.q,`click`,function(){e.c6()}),A(e.s,`click`,function(){yk(e,!0)}),A(e.v,`click`,function(){e.b2&&(_k(e,!1),x(!1),e.c0(!1))}),A(e.w,`click`,function(){e.b2||(_k(e,!0),x(!0),e.c0(!0))}),A(e.x,`click`,function(){let t=!e.b2;_k(e,t),x(t),e.c0(t)}),A(e.a1,`click`,function(){e.dk()})});function Rk(e){T(e.a,`_ec`),T(e.b,`_eh`),T(e.d,`_eu`),T(e.f,`_ev`),Xt(e.g),Kt(e.g,vj(e)),T(e.h,`_el`),T(e.i,`_em`),T(e.j,`_ew`),T(e.n,`_eg`),Ce(e.p),le(e.p,14),se(e.p),T(e.q,[wt,`_ee`]),Fe(e.r),Me(e.r,14),T(e.s,`_e2`),T(e.u,`_eB`),sb(e.a0),Iy(e.a0,_j(e)),Wy(e.a0),Gy(e.a0),Jy(e.a0),T(e.a1,[wt,`_en`,`_ee`]),pe(e.a2),Te(e.a2,14),be(e.a2),T(e.a3,`_es`),aS(e.ac),$x(e.ac,gj(e)),rS(e.ac,hj(e)),FS(e.ad,mj(e)),ek(e,null),sk(e,[]),lk(e,null),fk(e,null),mk(e,!1),hk(e,``),_k(e,S()),vk(e,n()),yk(e,!1),Sk(e,{query:``,hit:null,keys:[]}),wk(e,new Set),Ek(e,new Set),Dk(e,new Set),Ok(e,new Set),kk(e,{io:null,root:null,cbs:null}),Ak(e,{sig:``,timer:0}),jk(e,{seq:0}),Mk(e,{busy:0}),Nk(e,lj),Ik(e,pj(e)),Lk(e)}var zk=O(11,`<span>·</span><!> comment<!>`,` b%c%`,zw),Bk=O(12,tn,(e=>`/${e}&`)(nn),tO),Vk=M(58,e=>{T(e.c,[`_ei`,{_ek:e.aw>0}]),zk(e,+!e.aw),Bk(e,+!e.aw),Rw(e)}),Hk=ye(67,e=>{T(e.z,[`_ep`,{_eo:!e.b5}]),Fy(e.a0,e.b5),w(e.a1,`hidden`,e.b5)}),Uk=E(44,e=>Hk(e,e.ag,e.ah)),Wk=M(42,Uk),Gk=M(43,Uk),Kk=L(`i51`,e=>{e.aj!=null&&e.aj!==e.b7&&Qk(e,e.aj)}),qk=E(70,Kk),Jk=L(`i49`,e=>{e.an&&window.addEventListener(`keydown`,t=>{!(t.metaKey||t.ctrlKey)||t.altKey||t.shiftKey||t.key.toLowerCase()===`f`&&(t.target instanceof HTMLTextAreaElement||(t.preventDefault(),e.dk()))},{capture:!0,signal:u(e,0)})}),Yk=E(155,e=>{ee(e,0),Jk(e)}),Xk=M(154,Yk),Zk=E(72,e=>Xk(e,yj(e))),Qk=N(69,e=>{_b(e.a0,e.b7),qk(e),Zk(e)}),$k=M(45,e=>{Qk(e,e.aj||0),qk(e)}),eA=M(71,e=>{gb(e.a0,e.b9),Zk(e)}),tA=(e,t)=>eA(e,t||{focus:bj}),nA=M(74,kw),rA=M(75),iA=M(76,e=>{oA(e,e.be?.key),sA(e,e.be?.repo),cA(e,e.be?.line),$O(e)}),aA=j(lT,rT),oA=M(77,e=>{pO(e),aA(e)}),sA=M(78,j(lD)),cA=M(79,j(hT)),lA=M(90),uA=E(89,e=>lA(e,xj(e)),2),dA=M(86,uA),fA=M(87,uA),pA=M(88,uA),mA=M(93,e=>{UO(e),LO(e)}),hA=M(94,e=>{zO(e),LO(e)}),gA=M(96,UO),_A=M(142,YO),vA=M(103,LO),yA=E(102,e=>vA(e,Cj(e))),bA=M(47,e=>{_A(e,Sj(e)),UO(e),yA(e),LO(e),ok(e),AO(e),MO(e)}),xA=M(48,e=>{UO(e),LO(e)}),SA=M(101,e=>{yA(e),AO(e),MO(e),PO(e)}),CA=M(49,e=>{LO(e),Yk(e)}),wA=M(50,LO),TA=M(110,j(gD,zT)),EA=M(113,e=>{BS(e.ad,e.cf),$O(e)}),DA=O(10,`<span>+<!></span><span>−<!></span>`,` Db%l Db%`,zC,`<span>0</span>`,` `,NC),OA=E(118,e=>DA(e,e.ci||e.cj?0:1)),kA=M(116,e=>{OA(e),RC(e)}),AA=M(117,e=>{OA(e),BC(e)}),jA=M(123,e=>{I(e.t,e.cp),$O(e)}),MA=O(34,o,(e=>`/${e}&`)(f),Pw),NA=(e,t)=>MA(e,+!t),PA=M(51,e=>{AO(e),MO(e),PO(e)}),FA=O(4,(e=>`<button title="Back to terminal">${e}</button>`)(Ot),(e=>` D/${e}&l`)(kt),aO),IA=M(52,e=>FA(e,+!e.aq)),LA=(e,t)=>{Wk(e,t.findOpen),Gk(e,t.findOpenChange),$k(e,t.findTick),tA(e,t.findFocusRef),bA(e,t.workspaceId),xA(e,t.focusPr),CA(e,t.active),wA(e,t.focusNonce),PA(e,t.onSent),IA(e,t.onExit),zA(e,t.sessions),BA(e,t.workspaceBranch),VA(e,t.workspaceName)},RA=j(Bw),zA=M(53,e=>{eO(e),RA(e)}),BA=M(54,j(OE,bE,QT,WT)),VA=M(55,j(jE,SE,eE,KT));function HA(e){return function(){e._.d3()}}function UA(e){return function(){fk(e._,null)}}function WA(e){return function(t){fk(e._._._._._._,t)}}function GA(e){return function(){lk(e._._._._._._,null)}}function KA(e){return function(t){e._._._._._._.d6(e._._.j,t)}}function qA(e){return function(t){e._._._._._._.d7(t)}}function JA(e){return function(t,n){e._._._._._._.dg(e._._.j,t,n)}}function YA(e){return function(t,n){e._._._._._._.dh(t,n)}}function XA(e){return function(t){lk(e._._._._._._,{key:e._._.k,side:t.side||`additions`,start:Math.min(t.start,t.end),end:Math.max(t.start,t.end)})}}function ZA(e){return()=>{Ok(e,new Set([...e.bm,...e.d0.map(e=>e.id)]))}}function QA(e){return async t=>{let n=e.av;e.c3++;try{await e.da(n,t),e.ap?.(t),sk(e,[]),lk(e,null),await fetch(`/api/workspaces/${e.al}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`clear`})}).catch(()=>{})}catch(t){fk(e,String(t.message||t))}finally{e.c3--}}}function $A(e){return async(t,n,r)=>{let i=e.ax;if(!i)return;let a=n.trim();if(!a)return;let o={id:-1,workspace_id:e.al,worktree:e.d4(t.repo),path:t.path,side:i.side===`deletions`?`deletions`:`additions`,line_start:i.start,line_end:i.end,text:a,created_at:``};e.c3++;try{await e.da([o],r),e.ap?.(r),lk(e,null)}catch(t){fk(e,String(t.message||t))}finally{e.c3--}}}function ej(e){return async(t,n)=>{let r=e.av.find(e=>e.id===t);if(r){e.c3++;try{await e.da([r],n),e.ap?.(n),sk(e,e.av.filter(e=>e.id!==t)),await fetch(`/api/review-comments/${t}`,{method:`DELETE`}).catch(()=>{})}catch(t){fk(e,String(t.message||t))}finally{e.c3--}}}}function tj(e){return async(t,n)=>{t.length&&await s(`/api/sessions/${n}/send`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({text:`Please address this review feedback, then summarize what you changed.\n\n${_t(t,e.au)}`,...ge()||{}})})}}function nj(e){return()=>{e.bw&&clearTimeout(e.bw),e.bw=setTimeout(()=>{e.bw=0,e.c6()},250)}}function rj(e){return()=>(Ok(e,new Set),e.c0(e.b2,!0))}function ij(e){return async(t=e.b2,n=!1)=>{let r=++e.by;mk(e,!0),fk(e,null);try{let i=new URLSearchParams;t&&i.set(`uncommitted`,`1`),n&&i.set(`refresh`,`1`);let a=i.size?`?${i}`:``,[o,c]=await Promise.all([s(`/api/workspaces/${e.al}/diff${a}`),s(`/api/workspaces/${e.al}/review`)]);if(r!==e.by)return;ek(e,o),sk(e,c.comments||[]),e.bv=ze(o),e.am&&e.bt(e.am)}catch(t){if(r!==e.by)return;fk(e,String(t.message||t))}finally{r===e.by&&mk(e,!1)}}}function aj(e){return t=>{if(!t)return;let n=e.au||[],r=n.find(e=>e.pr&&`${e.worktree}/${e.pr.number}`===t),i=new Set(e.bj);for(let t of n)e.bi.has(t.id)||i.add(t.id);r&&i.add(r.id),Ek(e,i);let a=new Set;for(let e of n)(!r||e.id!==r.id)&&a.add(e.id);wk(e,a),Dk(e,new Set);let o=Date.now(),s=()=>{let n=e.a3,r=n?.querySelector(`[data-pr="${CSS.escape(t)}"]`);if(!n||!r){Date.now()-o<2500&&requestAnimationFrame(s);return}let i=r.getBoundingClientRect().top-n.getBoundingClientRect().top+n.scrollTop;n.scrollTo({top:Math.max(0,i-8)})};requestAnimationFrame(s)}}function oj(e){return async()=>await Ae(_t(e.av,e.au))?(await e.d8(),!0):(fk(e,`Copy failed — clipboard needs HTTPS on this browser.`),!1)}function sj(e){return async t=>{sk(e,e.av.filter(e=>e.id!==t)),await fetch(`/api/review-comments/${t}`,{method:`DELETE`})}}function cj(e){return async(t,n)=>{let r=e.ax;lk(e,null);try{let i=await s(`/api/workspaces/${e.al}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`comment`,worktree:e.d4(t.repo),path:t.path,side:r.side,line_start:r.start,line_end:r.end,text:n.trim()})});sk(e,e.av.concat(i))}catch(t){fk(e,String(t.message||t))}}}function lj(e){return e.includes(`#`)?e.split(`#`)[0]:e}function uj(e){return t=>{e.di(t)?.scrollIntoView({block:`start`})}}function dj(e){return function(t){e.dm(t)}}function fj(e){return t=>{if(Sk(e,t),!t.hit)return;let n=t.hit;setTimeout(()=>{let r=e.di(n.key);if(r){if(n.line<1){let t=e.a3;if(t){let e=r.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop;t.scrollTo({top:Math.max(0,e-8)})}else r.scrollIntoView({block:`start`});return}Je(t.query,n),Ye()}},0)}}function pj(e){return t=>{let n=e.a3?.querySelector(`details[data-key="${CSS.escape(t)}"]`);return n&&(n.open=!0),n}}function mj(e){return t=>{yk(e,t)}}function hj(e){return t=>{Ek(e,t)}}function gj(e){return t=>{wk(e,t)}}function _j(e){return t=>{Hk(e,t)}}function vj(e){return t=>{hk(e,t)}}function yj(e){return()=>{Hk(e,!0),Qk(e,e.b7+1),e.b9.focus()}}function bj(){}function xj(e){return(t,n)=>{e.bo??=new WeakMap,e.bo.set(t,n);let r=e.a3||null;(!e.bp||e.bq!==r)&&(e.bp?.disconnect(),e.bq=r,e.bp=new IntersectionObserver(t=>{for(let n of t)n.isIntersecting&&(e.bp.unobserve(n.target),e.bo.get(n.target)?.())},{root:r,rootMargin:`800px 0px`})),e.bp.observe(t),requestAnimationFrame(()=>{if(!t.isConnected)return;let r=e.a3,i=t.getBoundingClientRect(),a=r?r.getBoundingClientRect():{top:0,bottom:window.innerHeight};i.bottom>=a.top-800&&i.top<=a.bottom+800&&(e.bp?.unobserve(t),n())})}}function Sj(e){return async()=>{sk(e,[]),lk(e,null),await fetch(`/api/workspaces/${e.al}/review`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`clear`})})}}function Cj(e){return async()=>{if(!e.c3)try{let t=await s(`/api/workspaces/${e.al}/review`);if(e.c3)return;sk(e,t.comments||[])}catch{}}}F(`i25`,HA),F(`i24`,UA),F(`i32`,WA),F(`i29`,GA),F(`i27`,KA),F(`i30`,qA),F(`i28`,JA),F(`i31`,YA),F(`i26`,XA),F(`i7`,ZA),F(`i14`,QA),F(`i15`,$A),F(`i16`,ej),F(`i12`,tj),F(`i6`,nj),F(`i5`,rj),F(`i3`,ij),F(`i2`,aj),F(`i13`,oj),F(`i10`,sj),F(`i9`,cj),F(`i8`,lj),F(`i18`,uj),F(`i23`,dj),F(`i20`,fj),F(`i17`,pj),F(`i35`,mj),F(`i34`,hj),F(`i33`,gj),F(`i22`,_j),F(`i21`,vj),F(`i19`,yj),F(`i0`,bj),F(`i1`,xj),F(`i11`,Sj),F(`i4`,Cj);var wj=d(`i`,WS,GS,Rk,LA);export{wj as default,Re as t};
|