@intent-hq/web 2.383.3 → 2.383.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{BZskJqHK.js → -Q8WHsT1.js} +2 -2
- package/web/app/immutable/chunks/{uA-KbK5l.js → -afdnSwu.js} +1 -1
- package/web/app/immutable/chunks/{DPPrfCEc.js → -tAyw6ob.js} +1 -1
- package/web/app/immutable/chunks/{BOYBHPRf.js → 3o8kzB3n.js} +1 -1
- package/web/app/immutable/chunks/{Dkwg3iDV.js → 3vWQiXY2.js} +3 -3
- package/web/app/immutable/chunks/{SDWlqEse.js → 5c25JTI1.js} +1 -1
- package/web/app/immutable/chunks/{DCq92KiG.js → 7dpPwFPi.js} +1 -1
- package/web/app/immutable/chunks/{sjYi8iFk.js → B-MmNWOm.js} +1 -1
- package/web/app/immutable/chunks/{ChUo5Z7l.js → B265Nxi3.js} +1 -1
- package/web/app/immutable/chunks/{CKG0fjh3.js → B2DRKAdQ.js} +1 -1
- package/web/app/immutable/chunks/{CKaMWgJQ.js → B5MrjS7j.js} +1 -1
- package/web/app/immutable/chunks/{DUdBCfQ2.js → B5YNqIIm.js} +1 -1
- package/web/app/immutable/chunks/{BwOKiDn9.js → B8V-jGiS.js} +1 -1
- package/web/app/immutable/chunks/{DLbnXb7P.js → B9YYIjUd.js} +3 -3
- package/web/app/immutable/chunks/{DpCuuI0h.js → BHt4i6xN.js} +1 -1
- package/web/app/immutable/chunks/{CXR8jfrb.js → BIQB3Kx5.js} +1 -1
- package/web/app/immutable/chunks/{DKYFDagY.js → BKPEtXUT.js} +1 -1
- package/web/app/immutable/chunks/{BDgY7Zd8.js → BNVrbjR5.js} +2 -2
- package/web/app/immutable/chunks/{DGXU2Eur.js → BRJQPxpd.js} +1 -1
- package/web/app/immutable/chunks/{CrJMkG_1.js → BTv8uh2C.js} +6 -6
- package/web/app/immutable/chunks/{m6g2qs4v.js → BWbkCnfm.js} +1 -1
- package/web/app/immutable/chunks/{B2EqH2B9.js → BXCVSrGo.js} +1 -1
- package/web/app/immutable/chunks/{D83rapov.js → BYChQVmd.js} +1 -1
- package/web/app/immutable/chunks/{DVnAuhkJ.js → BYdTf9Vr.js} +1 -1
- package/web/app/immutable/chunks/{DD98YGoG.js → BZC6DuKQ.js} +1 -1
- package/web/app/immutable/chunks/{Bok48R2D.js → B_JCVgq0.js} +1 -1
- package/web/app/immutable/chunks/{D59f5vu3.js → B_kMSQKD.js} +1 -1
- package/web/app/immutable/chunks/{Byun8_as.js → BaW_cM4B.js} +1 -1
- package/web/app/immutable/chunks/{DhN_Bb70.js → BacafptN.js} +4 -4
- package/web/app/immutable/chunks/{mlIdQnJX.js → Bg_lZIRf.js} +2 -2
- package/web/app/immutable/chunks/{eBfEHUcb.js → BhSvmxU-.js} +4 -4
- package/web/app/immutable/chunks/{DQ0P5vIc.js → BiQUDh4s.js} +1 -1
- package/web/app/immutable/chunks/{p-4Usjf1.js → Bj84UPYb.js} +1 -1
- package/web/app/immutable/chunks/{CW2OkXuF.js → BjfHx7zJ.js} +1 -1
- package/web/app/immutable/chunks/{v1V9O0KC.js → BmkXo3Yq.js} +1 -1
- package/web/app/immutable/chunks/{CpxEaO9r.js → BpcUO3Xs.js} +1 -1
- package/web/app/immutable/chunks/{CzXkTVR8.js → BqRWw-wJ.js} +1 -1
- package/web/app/immutable/chunks/{DWG0la6r.js → Bv1ckDXI.js} +1 -1
- package/web/app/immutable/chunks/{Dj5oY4MN.js → BwfxdDPw.js} +1 -1
- package/web/app/immutable/chunks/{C_1Oardw.js → BxoyDHGw.js} +1 -1
- package/web/app/immutable/chunks/{BDUjjuc4.js → Bygq9d8w.js} +1 -1
- package/web/app/immutable/chunks/{BthP56U0.js → Bymbu99U.js} +1 -1
- package/web/app/immutable/chunks/{Jmsfhy4p.js → C0LshS-P.js} +1 -1
- package/web/app/immutable/chunks/{BJA4-3TS.js → C0cGUVCr.js} +1 -1
- package/web/app/immutable/chunks/{WAmymGEm.js → C0o77pad.js} +1 -1
- package/web/app/immutable/chunks/{CMiAv123.js → C3upI-xJ.js} +1 -1
- package/web/app/immutable/chunks/{DCQ9cJhS.js → C4LrSRW3.js} +1 -1
- package/web/app/immutable/chunks/{DcTV3q3a.js → C7Zl7z5c.js} +1 -1
- package/web/app/immutable/chunks/{CGslv4Qq.js → C9dAybnM.js} +2 -2
- package/web/app/immutable/chunks/{CfdQaRg7.js → CApA6QD2.js} +4 -4
- package/web/app/immutable/chunks/{B1Gvj9xq.js → CBB3lnfZ.js} +3 -3
- package/web/app/immutable/chunks/{BvWOwOTx.js → CFUZ-wx4.js} +3 -3
- package/web/app/immutable/chunks/{AqAgOqAP.js → CG-tM1HG.js} +2 -2
- package/web/app/immutable/chunks/{CLeH6OyR.js → CHKnj_kH.js} +1 -1
- package/web/app/immutable/chunks/{BzVtDZxE.js → CJtViYfh.js} +1 -1
- package/web/app/immutable/chunks/{D6J72aTz.js → CLkfOjAo.js} +3 -3
- package/web/app/immutable/chunks/{JhwNDffI.js → CMEtJ5i1.js} +1 -1
- package/web/app/immutable/chunks/{DEIwQ6hO.js → CP9Lq5G_.js} +1 -1
- package/web/app/immutable/chunks/{CgLuwxkV.js → CWdKrGNN.js} +1 -1
- package/web/app/immutable/chunks/{a6nBCKTJ.js → CfiKUG8A.js} +1 -1
- package/web/app/immutable/chunks/{CiieGSUV.js → Cg871q2J.js} +1 -1
- package/web/app/immutable/chunks/{ufC4F9mx.js → Cgxwerkr.js} +2 -2
- package/web/app/immutable/chunks/{BTTEE7GF.js → ClJhkXR5.js} +1 -1
- package/web/app/immutable/chunks/{QXKw7ybW.js → ClMg21pU.js} +1 -1
- package/web/app/immutable/chunks/{BT9OtIDj.js → CmVBRNuA.js} +1 -1
- package/web/app/immutable/chunks/{BZ1qE3sd.js → CnZI1GOS.js} +1 -1
- package/web/app/immutable/chunks/{C19Fl1wo.js → Cngzlos4.js} +1 -1
- package/web/app/immutable/chunks/{hrbt6TUA.js → CpJb1fZG.js} +1 -1
- package/web/app/immutable/chunks/{BammBnda.js → Cq88mLGj.js} +3 -3
- package/web/app/immutable/chunks/{-2V-BAm8.js → CqnrQ6ti.js} +3 -3
- package/web/app/immutable/chunks/{Bp3ZrlmO.js → CsD5HG3r.js} +1 -1
- package/web/app/immutable/chunks/{CslzdKY2.js → CwTtJpch.js} +1 -1
- package/web/app/immutable/chunks/{gRz70TuX.js → CwtLM6uA.js} +1 -1
- package/web/app/immutable/chunks/{C89qw-SN.js → Cx37GTsM.js} +1 -1
- package/web/app/immutable/chunks/{LFBaWgJg.js → D6G8WbHL.js} +1 -1
- package/web/app/immutable/chunks/{CUHgqEKH.js → D8UBdXB2.js} +1 -1
- package/web/app/immutable/chunks/{yYvyTKgb.js → D96pHovR.js} +1 -1
- package/web/app/immutable/chunks/{C_-1gUwp.js → DAJnPbZk.js} +3 -3
- package/web/app/immutable/chunks/{CnljYLZs.js → DATzIj-C.js} +1 -1
- package/web/app/immutable/chunks/{DUxx6wT8.js → DDfr81XI.js} +1 -1
- package/web/app/immutable/chunks/{D4QkxipA.js → DFi1P2MD.js} +1 -1
- package/web/app/immutable/chunks/{BFU4GSWL.js → DH5O4f99.js} +1 -1
- package/web/app/immutable/chunks/{BGxmHLUr.js → DMV7vEM7.js} +1 -1
- package/web/app/immutable/chunks/{DlrDVrrH.js → DPCOdXX2.js} +1 -1
- package/web/app/immutable/chunks/{CEAKAkFK.js → DT3Kx0Qe.js} +1 -1
- package/web/app/immutable/chunks/{Df5fc__K.js → DW25C9MI.js} +2 -2
- package/web/app/immutable/chunks/{C-n5-Nyi.js → DY-t7Was.js} +1 -1
- package/web/app/immutable/chunks/{CImg9Ht4.js → DZYWuj4L.js} +1 -1
- package/web/app/immutable/chunks/{zw9aQKYl.js → DaFpSJap.js} +1 -1
- package/web/app/immutable/chunks/{CDXv1PW9.js → Dac_vP74.js} +1 -1
- package/web/app/immutable/chunks/{BkfSBkLs.js → DbZ5HUqx.js} +2 -2
- package/web/app/immutable/chunks/{D1QHqX16.js → DibfmKHg.js} +1 -1
- package/web/app/immutable/chunks/{Dcuzm8gD.js → Dirmxn0x.js} +1 -1
- package/web/app/immutable/chunks/{pf1qexdH.js → DizKilK3.js} +1 -1
- package/web/app/immutable/chunks/{C7cQ3lDB.js → Dj14JHUo.js} +1 -1
- package/web/app/immutable/chunks/{CKOijLzA.js → Do2giiGP.js} +1 -1
- package/web/app/immutable/chunks/{bB4pIooo.js → Dp-6l6dc.js} +1 -1
- package/web/app/immutable/chunks/{0l7ZqDIV.js → DqWLkzGY.js} +1 -1
- package/web/app/immutable/chunks/{CpdAeaX0.js → Dql2ogGT.js} +1 -1
- package/web/app/immutable/chunks/{wh8BTzW1.js → Dr8j8hDa.js} +2 -2
- package/web/app/immutable/chunks/{BdgSVihu.js → Du0DJF2z.js} +1 -1
- package/web/app/immutable/chunks/{Ax0sJJJl.js → DzB2TE-q.js} +13 -13
- package/web/app/immutable/chunks/{-NFtmIGG.js → DzbS0qCL.js} +1 -1
- package/web/app/immutable/chunks/{BhHscwNa.js → GuiAAF9e.js} +1 -1
- package/web/app/immutable/chunks/{Dipy9ZkR.js → IK5u1LkS.js} +1 -1
- package/web/app/immutable/chunks/{B4rcpoVl.js → KEaRLIGy.js} +1 -1
- package/web/app/immutable/chunks/{BB7BFhCP.js → MEqItsKn.js} +1 -1
- package/web/app/immutable/chunks/{CiNhMqq1.js → RWObpdxy.js} +1 -1
- package/web/app/immutable/chunks/{DR9rgOUR.js → SqlvGXMi.js} +1 -1
- package/web/app/immutable/chunks/{BktdbaP2.js → UMwTu6TE.js} +1 -1
- package/web/app/immutable/chunks/{B7AnydIV.js → W0L8GDXP.js} +1 -1
- package/web/app/immutable/chunks/{BMiKKOoz.js → WGwfzXjP.js} +1 -1
- package/web/app/immutable/chunks/{DLZnxjXG.js → WiA7_4AK.js} +1 -1
- package/web/app/immutable/chunks/{CWmACcmS.js → Yyy6gahW.js} +1 -1
- package/web/app/immutable/chunks/{38Vg2YF4.js → Z0_LIT6x.js} +2 -2
- package/web/app/immutable/chunks/{BD1NjrB7.js → ZxEOlEA2.js} +1 -1
- package/web/app/immutable/chunks/{BCo0L43p.js → cfdblcWY.js} +1 -1
- package/web/app/immutable/chunks/{BQ9VbGlu.js → iHxbYHJ6.js} +1 -1
- package/web/app/immutable/chunks/{yC4xveeV.js → iN763416.js} +1 -1
- package/web/app/immutable/chunks/{BwyO9iAx.js → j65te9ZT.js} +1 -1
- package/web/app/immutable/chunks/{CtIGR2R7.js → lzAd2Up3.js} +1 -1
- package/web/app/immutable/chunks/{BB5q5DsO.js → nTGBknlr.js} +1 -1
- package/web/app/immutable/chunks/{Cuvcpuwl.js → p7SBTgaC.js} +1 -1
- package/web/app/immutable/chunks/{D3a_DhRG.js → pUxZXv-3.js} +1 -1
- package/web/app/immutable/chunks/{D23uZeQI.js → u2aKD69u.js} +1 -1
- package/web/app/immutable/chunks/{B4mnoVZK.js → u8znU8zy.js} +1 -1
- package/web/app/immutable/chunks/{DqRH8mOo.js → wqIK2bns.js} +1 -1
- package/web/app/immutable/entry/{app.CeAiZV-v.js → app.Cqjdbldk.js} +2 -2
- package/web/app/immutable/entry/start.D0BpS8PF.js +1 -0
- package/web/app/immutable/nodes/{0.D2I9SFzE.js → 0.CIMKJ2v2.js} +1 -1
- package/web/app/immutable/nodes/{1.CHeML-3-.js → 1.C-zZe4mL.js} +1 -1
- package/web/app/immutable/nodes/{10.CPMi8QX9.js → 10.CRicXMMy.js} +4 -4
- package/web/app/immutable/nodes/{11.DOD-sh-z.js → 11.CFkPUf9W.js} +1 -1
- package/web/app/immutable/nodes/{15.BXDyjjHm.js → 15.BDAlg-ra.js} +1 -1
- package/web/app/immutable/nodes/{19.BEUhM4Xw.js → 19.DJgRbiNE.js} +2 -2
- package/web/app/immutable/nodes/{2.CeC42N_5.js → 2.Dl71tIky.js} +4 -4
- package/web/app/immutable/nodes/{3.-_yjscmj.js → 3.DNld1BNY.js} +1 -1
- package/web/app/immutable/nodes/{4.CdQdgUhv.js → 4.Dqn6Xii_.js} +1 -1
- package/web/app/immutable/nodes/{5.jUP9W-D7.js → 5.B0BP_LYC.js} +1 -1
- package/web/app/immutable/nodes/{6.B0WnMraI.js → 6.NwMlYZya.js} +1 -1
- package/web/app/immutable/nodes/{7.DAEOmrZS.js → 7.CP-QZto7.js} +1 -1
- package/web/app/immutable/nodes/{8.D1Q1AivC.js → 8.BsQgGFet.js} +1 -1
- package/web/app/immutable/nodes/{9.C5Qv23W5.js → 9.DY6xrFrM.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/entry/start.DrVPJx5Z.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aB as v,b as y}from"./
|
|
1
|
+
import{aB as v,b as y}from"./BhSvmxU-.js";var w=5,O=1e-5,X=2,Y=.6,R=1e-6;function N(t){const e=[];for(let s=0;s<t.length-1;s++)e.push({a:t[s],b:t[s+1]});return e}y(N,"buildSegmentList");function T(t,e,s,a){const r=e.x-t.x,o=e.y-t.y,i=a.x-s.x,d=a.y-s.y,u=r*d-o*i;if(u===0)return null;const n=s.x-t.x,c=s.y-t.y,p=(n*d-c*i)/u,f=(n*o-c*r)/u;return p<=R||p>=1-R||f<=R||f>=1-R?null:{point:{x:t.x+p*r,y:t.y+p*o},tA:p,tB:f}}y(T,"segmentIntersection");function P(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}y(P,"isHorizontalSeg");function B(t,e,s){if(t.curve!=="rounded")return!1;const a=t.points,r=a[e],o=a[e+1];if(!r||!o)return!1;const i=Math.hypot(o.x-r.x,o.y-r.y),d=s*i,u=e>0?L(a[e-1],r,o,w):null;if(u&&d<u.cutLen)return!0;const n=e+2<a.length?L(r,o,a[e+2],w):null;return n!==null&&i-d<n.cutLen}y(B,"crossingSitsInRoundedCorner");function C(t){const e=[];for(let s=0;s<t.length;s++){const a=t[s],r=N(a.points);for(let o=s+1;o<t.length;o++){const i=t[o],d=N(i.points);for(const[u,n]of r.entries())for(const[c,p]of d.entries()){const f=T(n.a,n.b,p.a,p.b);if(!f||B(a,u,f.tA)||B(i,c,f.tB))continue;const g=P(n),S=P(p);(g!==S?g:!1)?e.push({jumpEdgeId:a.id,otherEdgeId:i.id,segIndex:u,t:f.tA,point:f.point}):e.push({jumpEdgeId:i.id,otherEdgeId:a.id,segIndex:c,t:f.tB,point:f.point})}}}return e}y(C,"findEdgeIntersections");function M(t){const e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}y(M,"fmt");function A(t){return`${M(t.x)},${M(t.y)}`}y(A,"pointToString");function D(t){const e=t.b.x-t.a.x,s=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(s)?e>=0?1:0:s>=0?1:0}y(D,"getArcSweepFlag");function _(t,e){if(t.length<2)return t.map(o=>({...o}));const s=t.map(o=>({...o})),a=e.arrowTypeStart&&v[e.arrowTypeStart];if(a){const o=t[0],i=t[1],d=Math.atan2(i.y-o.y,i.x-o.x);s[0].x=o.x+a*Math.cos(d),s[0].y=o.y+a*Math.sin(d)}const r=e.arrowTypeEnd&&v[e.arrowTypeEnd];if(r){const o=t.length,i=t[o-2],d=t[o-1],u=Math.atan2(d.y-i.y,d.x-i.x);s[o-1].x=d.x-r*Math.cos(u),s[o-1].y=d.y-r*Math.sin(u)}return s}y(_,"applyMarkerOffsets");function k(t,e,s,a,r){const o=t.point.x,i=t.point.y,d={x:o-e*t.r,y:i-s*t.r},u={x:o+e*t.r,y:i+s*t.r},n=[`L${A(d)}`];return r==="arc"?n.push(`A${M(t.r)},${M(t.r)} 0 0 ${a} ${A(u)}`):n.push(`M${A(u)}`),n}y(k,"emitJump");function L(t,e,s,a){const r=e.x-t.x,o=e.y-t.y,i=s.x-e.x,d=s.y-e.y,u=Math.hypot(r,o),n=Math.hypot(i,d);if(u<O||n<O)return null;const c=r/u,p=o/u,f=i/n,g=d/n,S=c*f+p*g,b=Math.max(-1,Math.min(1,S)),m=Math.acos(b);if(m<O||Math.abs(Math.PI-m)<O)return null;const h=Math.min(a/Math.sin(m/2),u/2,n/2);return{startX:e.x-c*h,startY:e.y-p*h,endX:e.x+f*h,endY:e.y+g*h,ctrlX:e.x,ctrlY:e.y,cutLen:h}}y(L,"computeRoundedCorner");function H(t,e,s){const a=t.points;if(a.length<2)return"";const r=_(a,t),o=t.curve==="rounded",i=N(r),d=new Map;for(const n of e){const c=i[n.segIndex];if(!c)continue;const p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),f=d.get(n.segIndex)??[];f.push({t:n.t,point:n.point,d:n.t*p,r:s.jumpRadius}),d.set(n.segIndex,f)}const u=[`M${A(r[0])}`];for(let n=0;n<i.length;n++){const c=i[n],p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),f=p===0?0:(c.b.x-c.a.x)/p,g=p===0?0:(c.b.y-c.a.y)/p,S=D(c);let b=0;if(o&&n>0){const l=L(r[n-1],r[n],r[n+1]??r[n],w);l&&(b=l.cutLen)}let m=p,h=null;o&&n<i.length-1&&(h=L(r[n],r[n+1],r[n+2]??r[n+1],w),h&&(m=p-h.cutLen));const $=s.jumpRadius*Y,x=[...d.get(n)??[]].sort((l,E)=>l.t-E.t).filter(l=>{const E=Math.min(l.d-b,m-l.d)-X;return l.r=Math.min(l.r,E),l.r>=$});for(let l=0;l<x.length-1;l++){const E=x[l+1].d-x[l].d;if(x[l].r+x[l+1].r>E){const I=E/2;x[l].r=Math.min(x[l].r,I),x[l+1].r=Math.min(x[l+1].r,I)}}for(const l of x)l.r<$||u.push(...k(l,f,g,S,s.jumpStyle));o&&h?(u.push(`L${M(h.startX)},${M(h.startY)}`),u.push(`Q${M(h.ctrlX)},${M(h.ctrlY)} ${M(h.endX)},${M(h.endY)}`)):u.push(`L${A(c.b)}`)}return u.join(" ")}y(H,"rewriteEdgePath");function J(t){return/^[\d\s+,.LMelm-]*$/.test(t)}y(J,"isStraightPath");function U(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}y(U,"curveSupportsLineHops");function j(t){if(!t)return null;try{const e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),s=JSON.parse(e);if(!Array.isArray(s))return null;const a=[];for(const r of s)r&&typeof r.x=="number"&&typeof r.y=="number"&&a.push({x:r.x,y:r.y});return a.length>=2?a:null}catch{return null}}y(j,"decodeDataPoints");function F(t,e,s){if(!s.enabled)return;const a=t.node();if(!a)return;const r=new Map;for(const n of e)r.set(n.id,n);const o=new Map;for(const n of a.querySelectorAll("path[data-id]")){const c=n.getAttribute("data-id");c!==null&&!o.has(c)&&o.set(c,n)}const i=[];for(const n of e){const c=o.get(n.id);if(!c)continue;const f=j(c.getAttribute("data-points"))??n.points;i.push({...n,points:f})}const d=C(i);if(d.length===0)return;const u=new Map;for(const n of d){const c=u.get(n.jumpEdgeId)??[];c.push(n),u.set(n.jumpEdgeId,c)}for(const n of i){const c=u.get(n.id);if(!c||c.length===0)continue;const f=r.get(n.id)?.curve;if(f!==void 0&&!U(f))continue;const g=o.get(n.id);if(!g)continue;if(f===void 0){const x=g.getAttribute("d")??"";if(!J(x))continue}const S=g.getAttribute("style")??"",b=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(S),m=b?Number.parseFloat(b[1]):null,h=b?Number.parseFloat(b[2]):null,$=H(n,c,s);if(g.setAttribute("d",$),m!==null&&h!==null&&typeof g.getTotalLength=="function"){const x=g.getTotalLength(),l=Math.max(0,x-m-h),E=`0 ${m} ${l} ${h}`,I=S.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${E};`).replace(/;\s*;+/g,";");g.setAttribute("style",I)}}}y(F,"applyLineJumpsToSvg");export{F as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Cr=Object.defineProperty;var xr=(e,t,n)=>t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var b=(e,t,n)=>xr(e,typeof t!="symbol"?t+"":t,n);import{t as oo,bo as M,bw as ro,b as so,bs as di,bq as Lr,bm as $e}from"./C0QTy0Sy.js";import{bs as ao,a5 as Me,ay as ui,bS as Xe,aD as C,bA as ke,b_ as Ie,bO as it,W as de,bl as Xt,be as Dn,bn as lo,c9 as oe,aA as I,b$ as uo,aB as ge,ai as wr,bV as Te,br as kr,ca as je,bH as Q,c5 as dt,bk as Er,bj as Rr,aj as Ar,c0 as ci}from"./3SdAC2_C.js";import{i as we}from"./bhKPSdq4.js";import{f as hi,g as mn,s as fi}from"./7UPrdiE9.js";import{b as Hr}from"./goTpbPhD.js";import{b as pi}from"./Dn334wJv.js";import{h as Dr,c as rt,J as co,Y as B,Z as Zt,a as ho,k as fo,_ as Je,H as po,j as go,aW as Tr,ak as mo,U as Mr,f as Ir,e as vo,T as Fr,g as Nr,S as Pr,ad as Qe,ac as Ve,C as zr,G as bo,F as Ur,I as _r,N as mt,ar as Or,a8 as Ht,am as Dt,x as K,w as Ue,ax as wt,ay as So,D as Br,d as Vr,aj as yo,aa as ct,l as Tn,b as gi,B as mi,z as vi,aU as Wr,aA as ft,al as Gr,V as Le,X as Ut,W as $r,a9 as Tt,E as jr,i as qr,av as Co,af as Kr,ab as bi,y as xo,ap as kt,ae as Et,an as ot,aq as Lo,O as vn,ao as Si,ai as bn,n as Xr,aS as yi}from"./
|
|
1
|
+
var Cr=Object.defineProperty;var xr=(e,t,n)=>t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var b=(e,t,n)=>xr(e,typeof t!="symbol"?t+"":t,n);import{t as oo,bo as M,bw as ro,b as so,bs as di,bq as Lr,bm as $e}from"./C0QTy0Sy.js";import{bs as ao,a5 as Me,ay as ui,bS as Xe,aD as C,bA as ke,b_ as Ie,bO as it,W as de,bl as Xt,be as Dn,bn as lo,c9 as oe,aA as I,b$ as uo,aB as ge,ai as wr,bV as Te,br as kr,ca as je,bH as Q,c5 as dt,bk as Er,bj as Rr,aj as Ar,c0 as ci}from"./3SdAC2_C.js";import{i as we}from"./bhKPSdq4.js";import{f as hi,g as mn,s as fi}from"./7UPrdiE9.js";import{b as Hr}from"./goTpbPhD.js";import{b as pi}from"./Dn334wJv.js";import{h as Dr,c as rt,J as co,Y as B,Z as Zt,a as ho,k as fo,_ as Je,H as po,j as go,aW as Tr,ak as mo,U as Mr,f as Ir,e as vo,T as Fr,g as Nr,S as Pr,ad as Qe,ac as Ve,C as zr,G as bo,F as Ur,I as _r,N as mt,ar as Or,a8 as Ht,am as Dt,x as K,w as Ue,ax as wt,ay as So,D as Br,d as Vr,aj as yo,aa as ct,l as Tn,b as gi,B as mi,z as vi,aU as Wr,aA as ft,al as Gr,V as Le,X as Ut,W as $r,a9 as Tt,E as jr,i as qr,av as Co,af as Kr,ab as bi,y as xo,ap as kt,ae as Et,an as ot,aq as Lo,O as vn,ao as Si,ai as bn,n as Xr,aS as yi}from"./CApA6QD2.js";import{h as Ye}from"./DEB8jcix.js";import{g as Yr,i as Jr}from"./B6S6VNu7.js";import{F as Sn,c9 as Qr,bi as Zr,ax as es,aw as ts}from"./U9jJmfYa.js";import{f as Mn}from"./FzlZUztb.js";import"./DCRuihKm.js";import{g as ns}from"./L_tYoUCb.js";import{c as is}from"./B4SiDSWP.js";import{P as os}from"./Ctbo6mXV.js";import{l as Ci}from"./CE7dsja4.js";class rs extends Dr{constructor(){super(...arguments),this.tokenize=as}equals(t,n,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(`
|
|
2
2
|
`))&&(t=t.trim()),(!i.newlineIsToken||!n.includes(`
|
|
3
3
|
`))&&(n=n.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(t.endsWith(`
|
|
4
4
|
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var I1=Object.defineProperty;var js=t=>{throw TypeError(t)};var z1=(t,e,r)=>e in t?I1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var le=(t,e,r)=>z1(t,typeof e!="symbol"?e+"":e,r),R1=(t,e,r)=>e.has(t)||js("Cannot "+r);var Vs=(t,e,r)=>e.has(t)?js("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r);var tn=(t,e,r)=>(R1(t,e,"access private method"),r);import{cR as mr,b4 as D1,dI as Xl,a7 as _n,a5 as Ia,a6 as N1,a4 as P1,aa as _1,am as L1,a1 as O1,e9 as $1,X as B1,bn as Yl,cU as qr,dH as Zl,b3 as q1,b8 as F1,cC as H1,cS as U1,cn as W1,dC as si,e1 as G1,dW as j1,aK as X0,ax as V1,aF as _i,dG as Ql,dT as K1,ed as Jl,ec as X1}from"./BaujsV9k.js";import{D as Ks,b4 as Y1,be as Z1,aC as Q1}from"./BCo0L43p.js";import{M as J1,G as hn,I as eh}from"./Bqd7fdCF.js";import{zo as y0,Jv as E,nY as ve,nX as xe,aT as th,m as ec,I as De,bq as gn,ke as Li,me as w0,aq as Kt,md as Xs,mn as Ys,mk as Zs,jN as tc,gz as oi,HS as rh,tI as nh,AS as ah,o$ as ih,n1 as k0,Cq as sh,iN as oh,mx as lh,m8 as ch}from"./tr-2J8Mf.js";import{bm as ie}from"./C0QTy0Sy.js";import{l as rt}from"./CE7dsja4.js";import{m as uh,f as Tr}from"./C6mS8uZB.js";import{a as vn}from"./BdWqymET.js";import{o as pe,r as Vt,e as bn,s as V,_ as Je,l as yn,g as hh,n as Le,c as hr,b as Ve,u as dh,d as ph}from"./CIyUrgF0.js";import{j as rc}from"./uXuxG9cN.js";import{u as mh}from"./L_tYoUCb.js";import{selectActiveWorkspaceIds as fh}from"./S845NCb3.js";import{i as je}from"./CL3a4Hm1.js";import{l as za,c as Oi}from"./ChTqQfQN.js";import"./DCK8dPAL.js";import{e as gh,h as Er}from"./DONrLvvt.js";import{h as wn}from"./DCRuihKm.js";import{i as Qs}from"./BBWuirRW.js";import{f as $i,o as nc,p as ac,h as vh,m as ic,i as bh,k as yh}from"./DKHY8q_S.js";const Ze=[];for(let t=0;t<256;++t)Ze.push((t+256).toString(16).slice(1));function wh(t,e=0){return(Ze[t[e+0]]+Ze[t[e+1]]+Ze[t[e+2]]+Ze[t[e+3]]+"-"+Ze[t[e+4]]+Ze[t[e+5]]+"-"+Ze[t[e+6]]+Ze[t[e+7]]+"-"+Ze[t[e+8]]+Ze[t[e+9]]+"-"+Ze[t[e+10]]+Ze[t[e+11]]+Ze[t[e+12]]+Ze[t[e+13]]+Ze[t[e+14]]+Ze[t[e+15]]).toLowerCase()}const kh=new Uint8Array(16);function xh(){return crypto.getRandomValues(kh)}function Bi(t,e,r){return crypto.randomUUID?crypto.randomUUID():Sh(t)}function Sh(t,e,r){t=t||{};const n=t.random??t.rng?.()??xh();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,wh(n)}function qi(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=qi({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?J1(r.replace(/\.git\/?$/,""),e):null}function m3(t,e){return t.type==="local"?t.plainFolder?"folder":"local":qi(t,e)?.provider==="gitlab"?"gitlab":"github"}function sc(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function f3(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=sc(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function g3(t){return t.type==="local"&&t.path?t.path:void 0}const Ah=["/.clones/","/.repo-cache/"];function v3(t){const e=t.replaceAll("\\","/");return Ah.some(r=>e.includes(r))}function b3(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Th(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function y3(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Th(r)}}function w3(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,sc(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const Eh="known-repos",Ch=6e4;function Mh({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=y0(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(y0(s),s);for(const s of e.repos)a.set(y0(s),s)}const i=[...a.values()].filter(s=>!r[y0(s)]);return n==="all"?i:i.slice(0,9)}function k3(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function x3({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<Ch?"skip":"load"}function S3(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=qi(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function Ih({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ks)?Ks:null;return s===null||!i(s)?null:s}const A3=E.createSelector(t=>t.workspaceInitializer.hydrated),T3=E.createSelector(t=>t.workspaceInitializer.compactFormState),E3=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),C3=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),M3=E.createSelector(t=>t.workspaceInitializer.branchByRepo),I3=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),z3=E.createSelector(t=>ve(t.workspaceInitializer.recentRepos)),R3=E.createSelector((t,e)=>xe(t.workspaceInitializer.recentRepoRefreshes,e)),D3=E.createSelector((t,e)=>xe(t.workspaceInitializer.directoryStatusChecks,e)),N3=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),P3=E.createSelector(t=>ve(t.workspaceInitializer.remoteSetups)),_3=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),L3=E.createSelector(t=>t.workspaceInitializer.agentByRepo),O3=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),$3=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),B3=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),q3=E.createSelector((t,e)=>({restore:xe(t.workspaceInitializer.draftRestores,e),clear:xe(t.workspaceInitializer.draftClears,e)})),F3=E.createSelector((t,e,r)=>{const n=xe(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),H3=E.createSelector((t,e)=>xe(t.workspaceInitializer.initializationOutcomes,e)),U3=E.createSelector((t,e)=>xe(t.workspaceInitializer.initializationResumes,e)),W3=E.createSelector(t=>Ih({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:Z1.select(t),orchestratorId:Y1.select(t)?.id??null})),zh=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=mr.select(t);return e&&r&&D1.select(t)?JSON.stringify([r,e]):null}),G3=E.createSelector(t=>{const e=zh.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),Rh=E.createSelector(t=>{const e=xe(t.workspaceInitializer.recentRepoRefreshes,Eh),r=mr.select(t);return Mh({saved:ve(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),j3=E.createSelector(t=>Xl.select(t)?Rh.select(t):[]),V3=E.createSelector(t=>Q1.select(t)||void 0),Js="workspace-debug-flags",x0={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class Dh{constructor(){le(this,"flags");le(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return x0;try{const e=localStorage.getItem(Js);if(e)return{...x0,...JSON.parse(e)}}catch(e){za.error("Failed to load debug flags:",e)}return x0}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(Js,JSON.stringify(this.flags))}catch(e){za.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...x0},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),za.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const Ra=new Dh;function K3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function Nh(t){return t.charAt(0).toUpperCase()+t.slice(1)}function X3(t){if(!t||t.trim().length===0)return ie.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ie.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ie.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ie.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ie.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ie.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ie.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ie.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ie.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ie.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ie.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ie.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ie.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ie.workspace_sidebarHeader_branchTooLong_error()}function Y3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function li(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function Z3(t,e){return`${e}:${t.agentId??"manual"}`}function Ph(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function _h(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function Lh(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function Q3(t,e,r,n){const a=Ph(t,e),i=n?` (origin/${n})`:"";return r?a===1?ie.workspace_sidebarChanges_addToPr_one({suffix:i}):ie.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ie.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ie.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function J3(t,e,r){const n=_h(t,e),a=r?` (origin/${r})`:"";return n===1?ie.workspace_sidebarChanges_undoPush_one({suffix:a}):ie.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function e6(t,e){const r=Lh(t,e);return r===1?ie.workspace_sidebarChanges_undoCommit_one():ie.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function t6(t,e){return e===0&&t.length>0}function r6(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function n6(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function a6(t,e,r){return r?.path===t&&r?.staged===e}function i6(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function s6(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function Oh(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function o6(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=Oh(s.url),h=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:li(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:h,crossRepoDisplay:h?Fi(h,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:li(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function l6(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??th.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function $h(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function Da(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=_n(i),c=o.toLowerCase(),h=a.find(d=>!!o&&d.url.toLowerCase()===c||(i.resource||i.monitorAvailability?d.monitorIdentity===Ia(i):!d.resource&&!d.monitorAvailability&&(s?!d.crossRepo&&d.number===i.prNumber:d.crossRepo===i.repo&&d.number===i.prNumber)));if(h){h.monitorAgentId=i.agentId,h.resource=i.resource,h.monitorAvailability=i.monitorAvailability,h.monitorIdentity=i.resource||i.monitorAvailability?Ia(i):void 0,h.monitorSnapshot=i.lastSnapshot??h.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${N1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?Ia(i):void 0,url:o,htmlUrl:o,status:$h(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:Fi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function Fi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function c6(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const k of n)k.repoOwner&&k.repoName&&s.add(`${k.repoOwner}/${k.repoName}`.toLowerCase());let o=t;const c=[],h=[];if(t.some(k=>k.crossRepo)){o=[];for(const k of t)k.crossRepo?s.has(k.crossRepo.toLowerCase())?c.push(k):h.push(k):o.push(k)}const d=[],v=[],m=[];for(const k of e){const I=k.repo.toLowerCase();_n(k)&&o.some(R=>R.url===_n(k))||!k.resource&&!k.monitorAvailability&&(!i||I===i)?d.push(k):_n(k)&&c.some(R=>R.url===_n(k))||!k.resource&&!k.monitorAvailability&&s.has(I)?v.push(k):m.push(k)}const w=Da(o,d,r),A=r?.split("/")[0],C=new Set([...w,...c,...h].map(k=>`${(k.crossRepo??r??"").toLowerCase()}#${k.number}`)),M=[...c];for(const k of n){if(!k.repoOwner||!k.repoName)continue;const I=`${k.repoOwner}/${k.repoName}`;for(const R of k.pullRequests??[]){const Z=`${I.toLowerCase()}#${R.number}`;if(C.has(Z))continue;C.add(Z);const K=R.url||`https://github.com/${I}/pull/${R.number}`,ee=i!==void 0&&I.toLowerCase()===i;M.push({number:R.number,title:a(R),url:K,htmlUrl:K,status:li(R.status),createdAt:R.createdAt,updatedAt:R.updatedAt,crossRepo:ee?void 0:I,crossRepoDisplay:ee?void 0:Fi(I,A)})}}return{own:w,otherRoots:Da(M,v,r),otherTracked:Da(h,m,r)}}function eo(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function u6(t){const e=t.status==="merged"?ie.workspace_prSection_merged_label():t.status==="closed"?ie.workspace_prSection_closed_label():t.status==="draft"?ie.workspace_prSection_statusDraft_label():eo(t)?ie.workspace_prSection_statusQueued_label():ie.workspace_prSection_statusOpen_label(),r=[P1(t)??e],n=eo(t)?uh(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ie.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ie.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ie.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ie.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ie.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ie.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ie.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ie.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ie.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(Nh(a.mergeBlockedReason))),r.join(`
|
|
1
|
+
var I1=Object.defineProperty;var js=t=>{throw TypeError(t)};var z1=(t,e,r)=>e in t?I1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var le=(t,e,r)=>z1(t,typeof e!="symbol"?e+"":e,r),R1=(t,e,r)=>e.has(t)||js("Cannot "+r);var Vs=(t,e,r)=>e.has(t)?js("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r);var tn=(t,e,r)=>(R1(t,e,"access private method"),r);import{cR as mr,b4 as D1,dI as Xl,a7 as _n,a5 as Ia,a6 as N1,a4 as P1,aa as _1,am as L1,a1 as O1,e9 as $1,X as B1,bn as Yl,cU as qr,dH as Zl,b3 as q1,b8 as F1,cC as H1,cS as U1,cn as W1,dC as si,e1 as G1,dW as j1,aK as X0,ax as V1,aF as _i,dG as Ql,dT as K1,ed as Jl,ec as X1}from"./BaujsV9k.js";import{D as Ks,b4 as Y1,be as Z1,aC as Q1}from"./cfdblcWY.js";import{M as J1,G as hn,I as eh}from"./Bqd7fdCF.js";import{zo as y0,Jv as E,nY as ve,nX as xe,aT as th,m as ec,I as De,bq as gn,ke as Li,me as w0,aq as Kt,md as Xs,mn as Ys,mk as Zs,jN as tc,gz as oi,HS as rh,tI as nh,AS as ah,o$ as ih,n1 as k0,Cq as sh,iN as oh,mx as lh,m8 as ch}from"./tr-2J8Mf.js";import{bm as ie}from"./C0QTy0Sy.js";import{l as rt}from"./CE7dsja4.js";import{m as uh,f as Tr}from"./C6mS8uZB.js";import{a as vn}from"./BdWqymET.js";import{o as pe,r as Vt,e as bn,s as V,_ as Je,l as yn,g as hh,n as Le,c as hr,b as Ve,u as dh,d as ph}from"./CIyUrgF0.js";import{j as rc}from"./uXuxG9cN.js";import{u as mh}from"./L_tYoUCb.js";import{selectActiveWorkspaceIds as fh}from"./S845NCb3.js";import{i as je}from"./CL3a4Hm1.js";import{l as za,c as Oi}from"./ChTqQfQN.js";import"./DCK8dPAL.js";import{e as gh,h as Er}from"./DONrLvvt.js";import{h as wn}from"./DCRuihKm.js";import{i as Qs}from"./BBWuirRW.js";import{f as $i,o as nc,p as ac,h as vh,m as ic,i as bh,k as yh}from"./DKHY8q_S.js";const Ze=[];for(let t=0;t<256;++t)Ze.push((t+256).toString(16).slice(1));function wh(t,e=0){return(Ze[t[e+0]]+Ze[t[e+1]]+Ze[t[e+2]]+Ze[t[e+3]]+"-"+Ze[t[e+4]]+Ze[t[e+5]]+"-"+Ze[t[e+6]]+Ze[t[e+7]]+"-"+Ze[t[e+8]]+Ze[t[e+9]]+"-"+Ze[t[e+10]]+Ze[t[e+11]]+Ze[t[e+12]]+Ze[t[e+13]]+Ze[t[e+14]]+Ze[t[e+15]]).toLowerCase()}const kh=new Uint8Array(16);function xh(){return crypto.getRandomValues(kh)}function Bi(t,e,r){return crypto.randomUUID?crypto.randomUUID():Sh(t)}function Sh(t,e,r){t=t||{};const n=t.random??t.rng?.()??xh();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,wh(n)}function qi(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=qi({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?J1(r.replace(/\.git\/?$/,""),e):null}function m3(t,e){return t.type==="local"?t.plainFolder?"folder":"local":qi(t,e)?.provider==="gitlab"?"gitlab":"github"}function sc(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function f3(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=sc(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function g3(t){return t.type==="local"&&t.path?t.path:void 0}const Ah=["/.clones/","/.repo-cache/"];function v3(t){const e=t.replaceAll("\\","/");return Ah.some(r=>e.includes(r))}function b3(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Th(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function y3(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Th(r)}}function w3(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,sc(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const Eh="known-repos",Ch=6e4;function Mh({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=y0(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(y0(s),s);for(const s of e.repos)a.set(y0(s),s)}const i=[...a.values()].filter(s=>!r[y0(s)]);return n==="all"?i:i.slice(0,9)}function k3(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function x3({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<Ch?"skip":"load"}function S3(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=qi(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function Ih({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ks)?Ks:null;return s===null||!i(s)?null:s}const A3=E.createSelector(t=>t.workspaceInitializer.hydrated),T3=E.createSelector(t=>t.workspaceInitializer.compactFormState),E3=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),C3=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),M3=E.createSelector(t=>t.workspaceInitializer.branchByRepo),I3=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),z3=E.createSelector(t=>ve(t.workspaceInitializer.recentRepos)),R3=E.createSelector((t,e)=>xe(t.workspaceInitializer.recentRepoRefreshes,e)),D3=E.createSelector((t,e)=>xe(t.workspaceInitializer.directoryStatusChecks,e)),N3=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),P3=E.createSelector(t=>ve(t.workspaceInitializer.remoteSetups)),_3=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),L3=E.createSelector(t=>t.workspaceInitializer.agentByRepo),O3=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),$3=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),B3=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),q3=E.createSelector((t,e)=>({restore:xe(t.workspaceInitializer.draftRestores,e),clear:xe(t.workspaceInitializer.draftClears,e)})),F3=E.createSelector((t,e,r)=>{const n=xe(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),H3=E.createSelector((t,e)=>xe(t.workspaceInitializer.initializationOutcomes,e)),U3=E.createSelector((t,e)=>xe(t.workspaceInitializer.initializationResumes,e)),W3=E.createSelector(t=>Ih({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:Z1.select(t),orchestratorId:Y1.select(t)?.id??null})),zh=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=mr.select(t);return e&&r&&D1.select(t)?JSON.stringify([r,e]):null}),G3=E.createSelector(t=>{const e=zh.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),Rh=E.createSelector(t=>{const e=xe(t.workspaceInitializer.recentRepoRefreshes,Eh),r=mr.select(t);return Mh({saved:ve(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),j3=E.createSelector(t=>Xl.select(t)?Rh.select(t):[]),V3=E.createSelector(t=>Q1.select(t)||void 0),Js="workspace-debug-flags",x0={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class Dh{constructor(){le(this,"flags");le(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return x0;try{const e=localStorage.getItem(Js);if(e)return{...x0,...JSON.parse(e)}}catch(e){za.error("Failed to load debug flags:",e)}return x0}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(Js,JSON.stringify(this.flags))}catch(e){za.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...x0},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),za.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const Ra=new Dh;function K3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function Nh(t){return t.charAt(0).toUpperCase()+t.slice(1)}function X3(t){if(!t||t.trim().length===0)return ie.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ie.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ie.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ie.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ie.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ie.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ie.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ie.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ie.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ie.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ie.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ie.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ie.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ie.workspace_sidebarHeader_branchTooLong_error()}function Y3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function li(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function Z3(t,e){return`${e}:${t.agentId??"manual"}`}function Ph(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function _h(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function Lh(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function Q3(t,e,r,n){const a=Ph(t,e),i=n?` (origin/${n})`:"";return r?a===1?ie.workspace_sidebarChanges_addToPr_one({suffix:i}):ie.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ie.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ie.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function J3(t,e,r){const n=_h(t,e),a=r?` (origin/${r})`:"";return n===1?ie.workspace_sidebarChanges_undoPush_one({suffix:a}):ie.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function e6(t,e){const r=Lh(t,e);return r===1?ie.workspace_sidebarChanges_undoCommit_one():ie.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function t6(t,e){return e===0&&t.length>0}function r6(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function n6(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function a6(t,e,r){return r?.path===t&&r?.staged===e}function i6(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function s6(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function Oh(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function o6(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=Oh(s.url),h=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:li(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:h,crossRepoDisplay:h?Fi(h,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:li(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function l6(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??th.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function $h(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function Da(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=_n(i),c=o.toLowerCase(),h=a.find(d=>!!o&&d.url.toLowerCase()===c||(i.resource||i.monitorAvailability?d.monitorIdentity===Ia(i):!d.resource&&!d.monitorAvailability&&(s?!d.crossRepo&&d.number===i.prNumber:d.crossRepo===i.repo&&d.number===i.prNumber)));if(h){h.monitorAgentId=i.agentId,h.resource=i.resource,h.monitorAvailability=i.monitorAvailability,h.monitorIdentity=i.resource||i.monitorAvailability?Ia(i):void 0,h.monitorSnapshot=i.lastSnapshot??h.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${N1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?Ia(i):void 0,url:o,htmlUrl:o,status:$h(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:Fi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function Fi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function c6(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const k of n)k.repoOwner&&k.repoName&&s.add(`${k.repoOwner}/${k.repoName}`.toLowerCase());let o=t;const c=[],h=[];if(t.some(k=>k.crossRepo)){o=[];for(const k of t)k.crossRepo?s.has(k.crossRepo.toLowerCase())?c.push(k):h.push(k):o.push(k)}const d=[],v=[],m=[];for(const k of e){const I=k.repo.toLowerCase();_n(k)&&o.some(R=>R.url===_n(k))||!k.resource&&!k.monitorAvailability&&(!i||I===i)?d.push(k):_n(k)&&c.some(R=>R.url===_n(k))||!k.resource&&!k.monitorAvailability&&s.has(I)?v.push(k):m.push(k)}const w=Da(o,d,r),A=r?.split("/")[0],C=new Set([...w,...c,...h].map(k=>`${(k.crossRepo??r??"").toLowerCase()}#${k.number}`)),M=[...c];for(const k of n){if(!k.repoOwner||!k.repoName)continue;const I=`${k.repoOwner}/${k.repoName}`;for(const R of k.pullRequests??[]){const Z=`${I.toLowerCase()}#${R.number}`;if(C.has(Z))continue;C.add(Z);const K=R.url||`https://github.com/${I}/pull/${R.number}`,ee=i!==void 0&&I.toLowerCase()===i;M.push({number:R.number,title:a(R),url:K,htmlUrl:K,status:li(R.status),createdAt:R.createdAt,updatedAt:R.updatedAt,crossRepo:ee?void 0:I,crossRepoDisplay:ee?void 0:Fi(I,A)})}}return{own:w,otherRoots:Da(M,v,r),otherTracked:Da(h,m,r)}}function eo(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function u6(t){const e=t.status==="merged"?ie.workspace_prSection_merged_label():t.status==="closed"?ie.workspace_prSection_closed_label():t.status==="draft"?ie.workspace_prSection_statusDraft_label():eo(t)?ie.workspace_prSection_statusQueued_label():ie.workspace_prSection_statusOpen_label(),r=[P1(t)??e],n=eo(t)?uh(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ie.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ie.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ie.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ie.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ie.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ie.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ie.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ie.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ie.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(Nh(a.mergeBlockedReason))),r.join(`
|
|
2
2
|
`)}function h6(t,e){return e.has(t??"manual")}function d6(t,e){return{path:t.relativePath,additions:t.stats.additions,deletions:t.stats.deletions,staged:e,status:t.status,attribution:t.attribution?.agent?{agentId:t.attribution.agent.agentId,agentName:t.attribution.agent.agentName,sessionId:t.attribution.agent.sessionId,turnNumber:t.attribution.agent.turnNumber,timestamp:t.attribution.timestamp}:void 0}}const oc=500;function p6(t,e=oc){const r=Math.max(0,Math.floor(e));return t.length<=r?{visible:t,shown:t.length,hiddenCount:0}:{visible:t.slice(0,r),shown:r,hiddenCount:t.length-r}}function m6(t,e,r=oc){let n=Math.max(0,Math.floor(r)),a=0,i=0;return{groups:t.map(o=>{if(e(o))return{group:o,visibleFiles:[]};const c=Math.min(n,o.files.length);return n-=c,a+=c,i+=o.files.length-c,{group:o,visibleFiles:c===o.files.length?o.files:o.files.slice(0,c)}}),shown:a,hiddenCount:i}}function f6(t){if(t.hiddenCount<=0)return"";const e=rt(t.shown),r=rt(t.shown+t.hiddenCount);return t.hiddenCount===1?ie.workspace_fileChanges_hiddenFiles_one({shown:e,total:r}):ie.workspace_fileChanges_hiddenFiles_many({shown:e,total:r,count:rt(t.hiddenCount)})}function Bh(t){if(!t)return{};try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function ci(t){return t.startsWith("@")?t.slice(1):t}function qh(t,e,r,n){const a=t.fullPath||t.path||t.filename;if(a)return ci(String(a));const i=[r,e,n.trim()].map(ci).filter(Boolean),s=i.find(o=>o.includes("/"))??i[0];return s?_1(s).path:void 0}function Fh(t){const e=t.line??t.startLine??t.range?.start;return typeof e=="number"&&Number.isFinite(e)?e:void 0}function Hh(t){if(!t||t.getAttribute("data-mention")===null)return null;const e=t.getAttribute("data-type")||"",r=t.getAttribute("data-id")||"",n=t.getAttribute("data-label")||"",a=t.getAttribute("data-uri")||"",i=Bh(t.getAttribute("data-meta")),s={type:e,id:r,label:n,uri:a,meta:i},o=a.startsWith("intent://")?a:typeof i.fullUrl=="string"&&i.fullUrl.startsWith("intent://")?i.fullUrl:void 0;if(o&&(s.intentUrl=o),e==="file"||e==="file-range"){const c=qh(i,n,r,t.textContent||"");c&&(s.filePath=c);const h=Fh(i);h!==void 0&&(s.line=h)}else if(e==="folder"||e==="source-folder"){const c=i.fullPath||i.path||r||n,h=c?ci(String(c)).replace(/\/+$/,""):"";h&&(s.folderPath=h)}else if(e==="note"||e==="note-range"){const c=i.noteId||r;c&&(s.note=i.isExternalLink&&i.workspaceId?{id:c,workspaceId:String(i.workspaceId)}:{id:c})}return s}function g6(t){return{sidebarTabId:"files",type:"file",filePath:`${t}/`}}function Hi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Fr=Hi();function lc(t){Fr=t}var Nr={exec:()=>null};function Cr(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),a=e[n];return a||(a=t(n),e[n]=a),a}}function oe(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ue.caret,"$1"),r=r.replace(a,s),n},getRegex:()=>new RegExp(r,e)};return n}var cc=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),Ue={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)(\t[ \t]*)/gm,nestedBlockMarker:/^ {0,3}(?:(?:[*+-]|\d{1,9}[.)])(?: |$)|> ?)/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Cr(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Cr(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}(?:</?(?:${Wi})(?:[ \\t]+|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\d{1,9}[.)])[ \t]+|>[ \t]?))+/},Uh=/^(?:[ \t]*(?:\n|$))+/,Wh=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Gh=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,Kn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jh=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ui=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Wi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Xn=oe(" {0,3}(?:</?(?:tag)(?:[ \\t]+|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Wi).getRegex(),uc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,hc=oe(uc).replace(/bull/g,Ui).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/\|table/g,"").replace(/html/g,Xn).getRegex(),Vh=oe(uc).replace(/bull/g,Ui).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).replace(/html/g,Xn).getRegex(),Gi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Kh=/^[^\n]+/,ji=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,Xh=oe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<(?:\\.|[^\n<>\\])*>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ji).replace("title",/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),Yh=oe(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ui).getRegex(),Vi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zh=oe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*?[ \\t]*/?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Vi).replace("tag",Wi).replace("attribute",/[ \t]+[a-zA-Z:_][\w.:-]*(?:[ \t]*=[ \t]*"[^"\n]*"|[ \t]*=[ \t]*'[^'\n]*'|[ \t]*=[ \t]*[^\s"'=<>`]+)?/).getRegex(),dc=t=>oe(Gi).replace("hr",Kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html",Xn).getRegex(),Qh=dc(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Jh=dc(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),ed=oe(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",Jh).getRegex(),Ki={blockquote:ed,code:Wh,def:Xh,fences:Gh,heading:jh,hr:Kn,html:Zh,lheading:hc,list:Yh,newline:Uh,paragraph:Qh,table:Nr,text:Kh},to=oe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",Xn).getRegex(),td={...Ki,lheading:Vh,table:to,paragraph:oe(Gi).replace("hr",Kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",to).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html",Xn).getRegex()},rd={...Ki,html:oe(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace("comment",Vi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Nr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:oe(Gi).replace("hr",Kn).replace("heading",` *#{1,6} *[^
|
|
3
3
|
]`).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").replace("lheading",hc).getRegex()},nd=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ad=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pc=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,id=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Pt=/[\p{P}\p{S}]/u,kn=/[\s\p{P}\p{S}]/u,Yn=/[^\s\p{P}\p{S}]/u,sd=oe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,kn).getRegex(),od=/[\p{Pi}\p{Ps}"']/u,mc=/(?!~)[\p{P}\p{S}]/u,ld=/(?!~)[\s\p{P}\p{S}]/u,cd=/(?:[^\s\p{P}\p{S}]|~)/u,ud=oe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",cc?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),fc=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,hd=oe(fc,"u").replace(/punct/g,Pt).getRegex(),dd=oe(fc,"u").replace(/punct/g,mc).getRegex(),pd=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,md=oe(pd,"u").replace(/openQuote/g,od).replace(/punct/g,Pt).getRegex(),gc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",fd=oe(gc,"gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),gd=oe(gc,"gu").replace(/notPunctSpace/g,cd).replace(/punctSpace/g,ld).replace(/punct/g,mc).getRegex(),vd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",bd=oe(vd,"gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),yd=oe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),wd="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",kd=oe(wd,"gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),xd=oe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Pt).getRegex(),Sd="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ad=oe(Sd,"gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),Td=oe(/\\(punct)/,"gu").replace(/punct/g,Pt).getRegex(),Ed=oe(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,Pt).getRegex(),Cd=oe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Md=oe(Vi).replace("(?:-->|$)","-->").getRegex(),Id=oe("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Md).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),vc=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,q0=oe(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",vc).getRegex(),zd=oe(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",q0).replace("href",/<(?:\\.|[^\n<>\\])*>|(?!<)[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),Rd=oe(/^!?\[(label)\]\[(ref)\]/).replace("label",q0).replace("ref",ji).getRegex(),Dd=oe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ji).getRegex(),ro=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Nd=oe(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",vc).getRegex(),Pd=oe("reflink|nolink(?!\\()","g").replace("reflink",oe(/^!?\[(label)\]\[(ref)\]/).replace("label",Nd).replace("ref",ro).getRegex()).replace("nolink",oe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ro).getRegex()).getRegex(),no=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_d=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Ld=oe(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,_d).getRegex(),Xi={_backpedal:Nr,anyPunctuation:Td,anyPunctuationOutsideCode:Ed,autolink:Cd,blockSkip:ud,br:pc,code:ad,del:Nr,delLDelim:Nr,delRDelim:Nr,emStrongLDelim:hd,emStrongRDelimAst:fd,emStrongRDelimUnd:yd,escape:nd,link:zd,nolink:Dd,punctuation:sd,reflink:Rd,reflinkSearch:Pd,tag:Id,text:id,url:Nr},Od={...Xi,emStrongLDelim:md,emStrongRDelimAst:bd,emStrongRDelimUnd:kd,link:oe(/^!?\[(label)\]\((.*?)\)/).replace("label",q0).getRegex(),reflink:oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",q0).getRegex()},ui={...Xi,emStrongRDelimAst:gd,emStrongLDelim:dd,delLDelim:xd,delRDelim:Ad,url:oe(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Ld).replace("protocol",no).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:oe(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",no).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace("wwwStart",cc?"(?<![^\\s*_~(])www\\.":"www\\.").getRegex()},$d={...ui,br:oe(pc).replace("{2,}","*").getRegex(),text:oe(ui.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},S0={normal:Ki,gfm:td,pedantic:rd},Mn={normal:Xi,gfm:ui,breaks:$d,pedantic:Od},Bd={"&":"&","<":"<",">":">",'"':""","'":"'"},ao=t=>Bd[t];function mt(t,e){if(e){if(Ue.escapeTest.test(t))return t.replace(Ue.escapeReplace,ao)}else if(Ue.escapeTestNoEncode.test(t))return t.replace(Ue.escapeReplaceNoEncode,ao);return t}function qd(t){return Ue.numericCharacterReference.test(t)?t.replace(Ue.numericCharacterReferenceOrAmpersand,(e,r,n)=>{if(r===void 0&&n===void 0)return"&";let a=r===void 0?Number.parseInt(n,16):Number.parseInt(r,10);return a===0||a>1114111||a>=55296&&a<=57343?"�":a===38?"&":String.fromCodePoint(a)}):t}function io(t){try{t=encodeURI(t).replace(Ue.percentDecode,"%")}catch{return null}return t}function so(t,e){let r=t.replace(Ue.findPipe,(i,s,o)=>{let c=!1,h=s;for(;--h>=0&&o[h]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Ue.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Ue.slashPipe,"|");return n}function qt(t,e,r){let n=t.length;if(n===0)return"";let a=0;for(;a<n&&t.charAt(n-a-1)===e;)a++;return t.slice(0,n-a)}function oo(t){let e=t.split(`
|
|
4
4
|
`),r=e.length-1;for(;r>=0&&Ue.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
|