local-operator-ui 0.30.5 → 0.30.7
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/out/main/index.js +663 -42
- package/out/preload/index.js +40 -2
- package/out/renderer/assets/{_basePickBy-C4KSwmCT.js → _basePickBy-DBYR8O9B.js} +1 -1
- package/out/renderer/assets/{_baseUniq-Tv4U4nWm.js → _baseUniq-OhMNZhi7.js} +1 -1
- package/out/renderer/assets/agent-details-page-BVicz2tX.js +6 -0
- package/out/renderer/assets/{agent-hub-page-wHxSp_GW.js → agent-hub-page-CHs73703.js} +2 -2
- package/out/renderer/assets/agents-page-rb2Hwnbu.js +2 -0
- package/out/renderer/assets/{arc-DzD8wAPt.js → arc-DJQs7XhV.js} +1 -1
- package/out/renderer/assets/architectureDiagram-IEHRJDOE-xr0V8iP9.js +36 -0
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-B6WAB17o.js → blockDiagram-JOT3LUYC--j5Arlup.js} +2 -2
- package/out/renderer/assets/browser-page-DoK-77aU.js +1 -0
- package/out/renderer/assets/browser-webauthn-prompt-BJLi2ZJa.js +1 -0
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-BikcRrmj.js → c4Diagram-VJAJSXHY-Bc6EP_HP.js} +2 -2
- package/out/renderer/assets/channel-YCbc1E0Y.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-BK2w2E6b.js → chunk-4BMEZGHF--zNo-yKh.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-L5GYaZTn.js → chunk-A2AXSNBT-CIYOm0W9.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-Cf51xDme.js → chunk-AEK57VVT-W5eNrSxP.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-BNvdRpy_.js → chunk-D6G4REZN-DOaOf7dY.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-Cgmol7e5.js → chunk-RZ5BOZE2-ClT3mZ9I.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-C0dlWEyM.js → chunk-XZIHB7SX-BI7BMUin.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-DqWS7_8g.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-DqWS7_8g.js +1 -0
- package/out/renderer/assets/clone-Cyp-7Qpl.js +1 -0
- package/out/renderer/assets/compact-pagination-BwRh3C3H.js +1 -0
- package/out/renderer/assets/console-mirror-BVW-_zui.js +44 -0
- package/out/renderer/assets/console-mirror-DOrYoP_4.css +32 -0
- package/out/renderer/assets/consoleCapture-BIeBPj-4.js +1 -0
- package/out/renderer/assets/dagre-OKDRZEBW-BWwWtgLx.js +4 -0
- package/out/renderer/assets/diagram-SSKATNLV-CWrYQie4.js +43 -0
- package/out/renderer/assets/diagram-VNBRO52H-CN2gAwct.js +24 -0
- package/out/renderer/assets/erDiagram-Q7BY3M3F-Bu8iPwGW.js +60 -0
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-CayOnjMu.js → flowDiagram-4HSFHLVR-CuRpi4Dp.js} +2 -2
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-D1H-WlQG.js → ganttDiagram-APWFNJXF-mnURcNut.js} +2 -2
- package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-BdYeZl9i.js +65 -0
- package/out/renderer/assets/{graph-DING6zyF.js → graph-MLvZAGI_.js} +1 -1
- package/out/renderer/assets/icon-BQh0NRL5.js +146 -0
- package/out/renderer/assets/index-BMCrBJ-B.js +1 -0
- package/out/renderer/assets/{index-B8L0Kiwp.js → index-J5rd4Dm5.js} +418 -403
- package/out/renderer/assets/index-Q1Oi0B95.js +55 -0
- package/out/renderer/assets/index-n0ogWXxx.css +1 -0
- package/out/renderer/assets/index-wl3vxwRq.js +7 -0
- package/out/renderer/assets/infoDiagram-PH2N3AL5-BmNe_X42.js +2 -0
- package/out/renderer/assets/{installer-xkP9rTvG.js → installer-CbTFoEpL.js} +3 -3
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-BZUoUByB.js → journeyDiagram-U35MCT3I-oz0SPXm5.js} +2 -2
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-pdihKIeu.js → kanban-definition-NDS4AKOZ-D7XbJu_a.js} +2 -2
- package/out/renderer/assets/{layout-BzsmzZSv.js → layout-Cfw0DBLH.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-BQdlRR2j.js → legacy-agents-page-Cpz2ZQCy.js} +3 -3
- package/out/renderer/assets/{mermaid.core-BuXyhIZv.js → mermaid.core-XqW4GKnj.js} +19 -19
- package/out/renderer/assets/mindmap-definition-ALO5MXBD-CNweV-Fd.js +95 -0
- package/out/renderer/assets/page-header-Cc0XdSll.js +1 -0
- package/out/renderer/assets/{parseISO-FjLu4rnm.js → parseISO-ew-BKu2O.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-DSJv21tC.js → pieDiagram-IB7DONF6-BPiL68yC.js} +2 -2
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-xXstR1Vf.js → quadrantDiagram-7GDLP6J5-m9iG_U6Q.js} +2 -2
- package/out/renderer/assets/{radar-MK3ICKWK-iY9ggxmQ.js → radar-MK3ICKWK-CoKPIP0t.js} +1 -1
- package/out/renderer/assets/radient-auth-buttons-GCNNfevt.js +6 -0
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-C3wkWBba.js → requirementDiagram-KVF5MWMF-BpAhKn90.js} +2 -2
- package/out/renderer/assets/sankeyDiagram-QLVOVGJD-Kdb3WPgA.js +10 -0
- package/out/renderer/assets/{schedules-page-Du06WRO3.js → schedules-page-BOd_LGf1.js} +9 -9
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-BAJqm7xV.js → sequenceDiagram-X6HHIX6F-BxaWgsF6.js} +2 -2
- package/out/renderer/assets/{settings-page-DTvd2Uj2.js → settings-page-DmM_rBG6.js} +66 -71
- package/out/renderer/assets/stateDiagram-DGXRK772-bighRJ2W.js +1 -0
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-Dheha3M6.js +1 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-BpywGcxh.js → timeline-definition-BDJGKUSR-DyVGXzVc.js} +2 -2
- package/out/renderer/assets/use-agent-like-mutation-BQ6GyYOT.js +1 -0
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-BLfYh75R.js → xychartDiagram-VJFVF3MP-CKXHo-5e.js} +2 -2
- package/out/renderer/console-capture.html +20 -0
- package/out/renderer/index.html +6 -3
- package/out/renderer/installer.html +4 -3
- package/package.json +6 -3
- package/out/renderer/assets/agent-details-page-Cr8W7y-H.js +0 -6
- package/out/renderer/assets/agents-page-CvzMQcXA.js +0 -2
- package/out/renderer/assets/architectureDiagram-IEHRJDOE-Bdg3auIF.js +0 -36
- package/out/renderer/assets/browser-page-Cwj3W0B7.js +0 -1
- package/out/renderer/assets/browser-webauthn-prompt-HQaxvM7Z.js +0 -1
- package/out/renderer/assets/channel-DkQdMXxf.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-CduP7VCg.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-CduP7VCg.js +0 -1
- package/out/renderer/assets/clone-ByK_vrzo.js +0 -1
- package/out/renderer/assets/compact-pagination-DJ3iOLPw.js +0 -1
- package/out/renderer/assets/dagre-OKDRZEBW-CO96SQ8V.js +0 -4
- package/out/renderer/assets/diagram-SSKATNLV-CZy8Uth3.js +0 -43
- package/out/renderer/assets/diagram-VNBRO52H-xj2birJB.js +0 -24
- package/out/renderer/assets/erDiagram-Q7BY3M3F-Da-RbfXv.js +0 -60
- package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-U4UfZBoD.js +0 -65
- package/out/renderer/assets/icon-BfZhrs0k.js +0 -200
- package/out/renderer/assets/icon-Bv_GhQh2.css +0 -1
- package/out/renderer/assets/index-B8ll31iK.js +0 -7
- package/out/renderer/assets/index-UJlKYaYv.js +0 -1
- package/out/renderer/assets/infoDiagram-PH2N3AL5-cfKlqrgd.js +0 -2
- package/out/renderer/assets/mindmap-definition-ALO5MXBD-DPrERxrY.js +0 -95
- package/out/renderer/assets/page-header-Dwwd9Ozp.js +0 -1
- package/out/renderer/assets/radient-auth-buttons-Bt3YWj-N.js +0 -6
- package/out/renderer/assets/sankeyDiagram-QLVOVGJD-Bl717LGh.js +0 -10
- package/out/renderer/assets/stateDiagram-DGXRK772-CakcCsbw.js +0 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-C9clUakK.js +0 -1
- package/out/renderer/assets/use-agent-like-mutation-BwgCtL8B.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as W,a as P,S as N}from"./chunk-AEK57VVT-W5eNrSxP.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,u as U}from"./mermaid.core-XqW4GKnj.js";import{G as F}from"./graph-MLvZAGI_.js";import{l as O}from"./layout-Cfw0DBLH.js";import{G as J,H as X}from"./index-J5rd4Dm5.js";import"./chunk-RZ5BOZE2-ClT3mZ9I.js";import"./index-Q1Oi0B95.js";import"./_baseUniq-OhMNZhi7.js";import"./_basePickBy-DBYR8O9B.js";import"./icon-BQh0NRL5.js";import"./console-mirror-BVW-_zui.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),A=u(()=>Object.keys(L),"keys"),I=u(()=>A().length,"size"),$={get:Y,set:D,keys:A,size:I},j=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),q=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Z=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),K=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(x,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),c=Math.max(p.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",p.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Q=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),x=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let c=Math.max(p,x);c===x&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,p>x&&(l=(x-c)/2+o),Math.abs(a-B.x)<o&&p>x&&(l=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),p<=x&&s.attr("x",a+(c-n)/2-p/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const p=y.trim();if(p.length>0){const c=g.append("tspan");if(c.text(p),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),G=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&j(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&q(n),i.type==="default"&&i.descriptions.length===0&&Z(n,i),i.type==="default"&&i.descriptions.length>0&&K(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),_=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=J().x(function(s){return s.x}).y(function(s){return s.y}).curve(X),x=e.append("path").attr("d",g(n)).attr("id","edge"+_).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),x.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:p}=U.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",p+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,p+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,p)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",p+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",p-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}_++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const x=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,x,a,o);const p=b.padding,c=s.node().getBBox(),l=c.width+p*2,B=c.height+p*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,x)=>{const a=new F({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){y=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),c=x.db.getRelations(),l=Object.keys(p);for(const r of l){const f=p[r];d&&(f.parentId=d);let h;if(f.doc){let w=i.append("g").attr("id",f.id).attr("class","stateGroup");h=R(f.doc,w,f.id,!o,n,g,x);{w=Q(w,f,o);let v=w.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[f.id]={y:b.compositTitleSize}}}else h=G(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=G(i,w,a);f.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;c.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:dt(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),O(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),g.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},Bt={parser:P,get db(){return new N(1)},renderer:ot,styles:W,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{Bt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as r,b as e,a,S as s}from"./chunk-AEK57VVT-W5eNrSxP.js";import{_ as i}from"./mermaid.core-XqW4GKnj.js";import"./chunk-RZ5BOZE2-ClT3mZ9I.js";import"./index-J5rd4Dm5.js";import"./index-Q1Oi0B95.js";import"./icon-BQh0NRL5.js";import"./console-mirror-BVW-_zui.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-
|
|
1
|
+
import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-XqW4GKnj.js";import{d as nt}from"./arc-DJQs7XhV.js";import"./index-J5rd4Dm5.js";import"./index-Q1Oi0B95.js";import"./icon-BQh0NRL5.js";import"./console-mirror-BVW-_zui.js";var Q=function(){var n=s(function(x,i,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],u={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,c,p,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:p.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:p.addTask(o[v],0,""),this.$=o[v];break;case 16:p.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:s(function(i){var a=this,c=[0],p=[],y=[null],o=[],w=this.table,v="",N=0,A=0,V=2,U=1,M=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(i,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var P=g.yylloc;o.push(P);var W=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=p.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(p=T,T=p.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,C,I,J,R={},B,$,et,O;;){if(C=c[c.length-1],this.defaultActions[C]?I=this.defaultActions[C]:((S===null||typeof S>"u")&&(S=tt()),I=w[C]&&w[C][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[C])this.terminals_[B]&&B>V&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`:
|
|
2
2
|
`+g.showPosition()+`
|
|
3
3
|
Expecting `+O.join(", ")+", got '"+(this.terminals_[S]||S)+"'":K="Parse error on line "+(N+1)+": Unexpected "+(S==U?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(K,{text:g.match,token:this.terminals_[S]||S,line:g.yylineno,loc:P,expected:O})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+S);switch(I[0]){case 1:c.push(S),y.push(g.yytext),o.push(g.yylloc),c.push(I[1]),S=null,A=g.yyleng,v=g.yytext,N=g.yylineno,P=g.yylloc;break;case 2:if($=this.productions_[I[1]][1],R.$=y[y.length-$],R._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},W&&(R._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),J=this.performAction.apply(R,[v,A,N,b.yy,I[1],y,o].concat(M)),typeof J<"u")return J;$&&(c=c.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),c.push(this.productions_[I[1]][0]),y.push(R.$),o.push(R._$),et=w[c[c.length-2]][c[c.length-1]],c.push(et);break;case 3:return!0}}return!0},"parse")},k=function(){var x={EOF:1,parseError:s(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -58,4 +58,4 @@ Expecting `+O.join(", ")+", got '"+(this.terminals_[S]||S)+"'":K="Parse error on
|
|
|
58
58
|
.eventWrapper {
|
|
59
59
|
filter: brightness(120%);
|
|
60
60
|
}
|
|
61
|
-
`,"getStyles"),qt=Gt,
|
|
61
|
+
`,"getStyles"),qt=Gt,Yt={db:at,renderer:Ot,parser:Tt,styles:qt};export{Yt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a4 as u,g as f,a5 as g,f as i,a6 as c,a7 as l,a8 as A,a9 as h,aa as y,ab as w}from"./index-J5rd4Dm5.js";import{r as m}from"./index-Q1Oi0B95.js";const o={all:["agent-statuses"],page:e=>[...o.all,"page",[...e]]},p=e=>[...new Set(e)].sort(),v=({agentIds:e,enabled:s=!0})=>{const{isAuthenticated:r}=u(),t=e.join(","),n=m.useMemo(()=>p(e),[t]),a=f({queryKey:o.page(n),queryFn:async()=>(await g(n)).result?.statuses??{},enabled:s&&r&&n.length>0,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:!1});return{...a,statuses:a.data??{},isKnown:a.isSuccess}},E=(e,s,r)=>r?e&&s[r]!==void 0:!1,d=(e,s,r)=>{e.setQueriesData({queryKey:o.all},t=>{if(!t)return t;const n=t[s]??{liked:!1,favourited:!1};return{...t,[s]:{...n,...r}}})},F=()=>{const e=i(),{isAuthenticated:s}=u();return c({mutationFn:async({agentId:t,isCurrentlyFavourited:n})=>{if(!s)throw new Error("Authentication required to favourite/unfavourite an agent.");if(!t)throw new Error("Agent ID is required.");return n?(await A(t),{favourited:!1,changed:!0}):{favourited:!0,changed:(await h(t)).result?.already_favourited!==!0}},onSuccess:({favourited:t,changed:n},a)=>{d(e,a.agentId,{favourited:t}),n&&l(e,{agentId:a.agentId,field:"favourite_count",delta:t?1:-1})}})},K=()=>{const e=i(),{isAuthenticated:s}=u();return c({mutationFn:async({agentId:t,isCurrentlyLiked:n})=>{if(!s)throw new Error("Authentication required to like/unlike an agent.");if(!t)throw new Error("Agent ID is required.");return n?(await y(t),{liked:!1,changed:!0}):{liked:!0,changed:(await w(t)).result?.already_liked!==!0}},onSuccess:({liked:t,changed:n},a)=>{d(e,a.agentId,{liked:t}),n&&l(e,{agentId:a.agentId,field:"like_count",delta:t?1:-1})}})};export{F as a,v as b,E as i,K as u};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-
|
|
1
|
+
import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-XqW4GKnj.js";import{F as kt,E as Tt,G as Rt}from"./index-J5rd4Dm5.js";import"./index-Q1Oi0B95.js";import"./icon-BQh0NRL5.js";import"./console-mirror-BVW-_zui.js";var at=function(){var t=n(function(B,h,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=h);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],y=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],r=[1,36],D=[1,37],N=[1,43],mt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,l,c,u,m,a,X){var x=a.length-1;switch(m){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(y,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:39,13:38,24:N,27:mt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:mt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,l){if(l.recoverable)this.trace(h);else{var c=new Error(h);throw c.hash=l,c}},"parseError"),parse:n(function(h){var l=this,c=[0],u=[],m=[null],a=[],X=this.table,x="",q=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(h,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,m.length=m.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(q+1)+`:
|
|
2
2
|
`+A.showPosition()+`
|
|
3
3
|
Expecting `+Q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":nt="Parse error on line "+(q+1)+": Unexpected "+(w==wt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(nt,{text:A.match,token:this.terminals_[w]||w,line:A.yylineno,loc:et,expected:Q})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+w);switch(v[0]){case 1:c.push(w),m.push(A.yytext),a.push(A.yylloc),c.push(v[1]),w=null,Ct=A.yyleng,x=A.yytext,q=A.yylineno,et=A.yylloc;break;case 2:if(M=this.productions_[v[1]][1],z.$=m[m.length-M],z._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},Jt&&(z._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),st=this.performAction.apply(z,[x,Ct,q,W.yy,v[1],m,a].concat(Zt)),typeof st<"u")return st;M&&(c=c.slice(0,-1*M*2),m=m.slice(0,-1*M),a=a.slice(0,-1*M)),c.push(this.productions_[v[1]][0]),m.push(z.$),a.push(z._$),_t=X[c[c.length-2]][c[c.length-1]],c.push(_t);break;case 3:return!0}}return!0},"parse")},Qt=function(){var B={EOF:1,parseError:n(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw new Error(l)},"parseError"),setInput:n(function(h,l){return this.yy=l||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var l=h.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:n(function(h){var l=h.length,c=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var h=this.pastInput(),l=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
5
5
|
`+l+"^"},"showPosition"),test_match:n(function(h,l){var c,u,m;if(this.options.backtrack_lexer&&(m={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(m.yylloc.range=this.yylloc.range.slice(0))),u=h[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],c=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var a in m)this[a]=m[a];return!1}return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,l,c,u;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),a=0;a<m.length;a++)if(c=this._input.match(this.rules[m[a]]),c&&(!l||c[0].length>l[0].length)){if(l=c,u=a,this.options.backtrack_lexer){if(h=this.test_match(c,m[a]),h!==!1)return h;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(h=this.test_match(l,m[u]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
6
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n(function(){var l=this.next();return l||this.lex()},"lex"),begin:n(function(l){this.conditionStack.push(l)},"begin"),popState:n(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:n(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:n(function(l){this.begin(l)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n(function(l,c,u,m){switch(u){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return B}();tt.lexer=Qt;function G(){this.yy={}}return n(G,"Parser"),G.prototype=tt,tt.Parser=G,new G}();at.parser=at;var xi=at;function ot(t){return t.type==="bar"}n(ot,"isBarPlot");function ct(t){return t.type==="band"}n(ct,"isBandAxisData");function F(t){return t.type==="linear"}n(F,"isLinearAxisData");var It=class{constructor(t){this.parentGroup=t}static{n(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,p)=>Math.max(p.length,o),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const p=gi(s,1,o),g=p?p.width:o.length*i,y=p?p.height:i;e.width=Math.max(e.width,g),e.height=Math.max(e.height,y)}return s.remove(),e}},Dt=.7,Pt=.2,Vt=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{n(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Dt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Dt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Pt*t.width;this.outerPadding=Math.min(e.width/2,s);const o=e.height+this.axisConfig.labelPadding*2;this.labelTextHeight=e.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Pt*t.height;this.outerPadding=Math.min(e.height/2,s);const o=e.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${i},${this.getScaleValue(e)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i} L ${this.getScaleValue(e)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},pi=class extends Vt{static{n(this,"BandAxis")}constructor(t,i,e,s,o){super(t,s,o,i),this.categories=e,this.scale=kt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=kt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Lt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},di=class extends Vt{static{n(this,"LinearAxis")}constructor(t,i,e,s,o){super(t,s,o,i),this.domain=e,this.scale=Tt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Tt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function ht(t,i,e,s){const o=new It(s);return ct(t)?new pi(i,e,t.categories,t.title,o):new di(i,e,[t.min,t.max],t.title,o)}n(ht,"getAxis");var fi=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{n(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function Mt(t,i,e,s){const o=new It(s);return new fi(o,t,i,e)}n(Mt,"getChartTitleComponent");var yi=class{constructor(t,i,e,s,o){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=o}static{n(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);let i;return this.orientation==="horizontal"?i=Rt().y(e=>e[0]).x(e=>e[1])(t):i=Rt().x(e=>e[0]).y(e=>e[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},mi=class{constructor(t,i,e,s,o,p){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=o,this.plotIndex=p}static{n(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),e=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),s=e/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-s,height:e,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-s,y:o[1],width:e,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},bi=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{n(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new yi(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new mi(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break}return t}};function Bt(t,i,e){return new bi(t,i,e)}n(Bt,"getPlotComponent");var Ai=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:Mt(t,i,e,s),plot:Bt(t,i,e),xAxis:ht(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:ht(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{n(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:o,height:p});t-=g.width,i-=g.height,g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=g.height,i-=g.height,this.componentStore.xAxis.setAxisPosition("bottom"),g=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=g.height,this.componentStore.yAxis.setAxisPosition("left"),g=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=g.width,t-=g.width,t>0&&(o+=t,t=0),i>0&&(p+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:p}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+o]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+p}),this.componentStore.yAxis.setRange([s,s+p]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(y=>ot(y))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,o=0,p=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),y=this.componentStore.plot.calculateSpace({width:p,height:g});t-=y.width,i-=y.height,y=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=y.height,i-=y.height,this.componentStore.xAxis.setAxisPosition("left"),y=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=y.width,s=y.width,this.componentStore.yAxis.setAxisPosition("top"),y=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=y.height,o=e+y.height,t>0&&(p+=t,t=0),i>0&&(g+=i,i=0),this.componentStore.plot.calculateSpace({width:p,height:g}),this.componentStore.plot.setBoundingBoxXY({x:s,y:o}),this.componentStore.yAxis.setRange([s,s+p]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([o,o+g]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(T=>ot(T))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},Ci=class{static{n(this,"XYChartBuilder")}static build(t,i,e,s){return new Ai(t,i,e,s).getDrawableElement()}},Y=0,Wt,H=xt(),U=gt(),d=pt(),rt=U.plotColorPalette.split(",").map(t=>t.trim()),K=!1,ut=!1;function gt(){const t=ci(),i=lt();return Et(t.xyChart,i.themeVariables.xyChart)}n(gt,"getChartDefaultThemeConfig");function xt(){const t=lt();return Et(li.xyChart,t.xyChart)}n(xt,"getChartDefaultConfig");function pt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}n(pt,"getChartDefaultData");function Z(t){const i=lt();return ui(t.trim(),i)}n(Z,"textSanitizer");function Ot(t){Wt=t}n(Ot,"setTmpSVGG");function zt(t){t==="horizontal"?H.chartOrientation="horizontal":H.chartOrientation="vertical"}n(zt,"setOrientation");function Ft(t){d.xAxis.title=Z(t.text)}n(Ft,"setXAxisTitle");function dt(t,i){d.xAxis={type:"linear",title:d.xAxis.title,min:t,max:i},K=!0}n(dt,"setXAxisRangeData");function Nt(t){d.xAxis={type:"band",title:d.xAxis.title,categories:t.map(i=>Z(i.text))},K=!0}n(Nt,"setXAxisBand");function Xt(t){d.yAxis.title=Z(t.text)}n(Xt,"setYAxisTitle");function Yt(t,i){d.yAxis={type:"linear",title:d.yAxis.title,min:t,max:i},ut=!0}n(Yt,"setYAxisRangeData");function Ht(t){const i=Math.min(...t),e=Math.max(...t),s=F(d.yAxis)?d.yAxis.min:1/0,o=F(d.yAxis)?d.yAxis.max:-1/0;d.yAxis={type:"linear",title:d.yAxis.title,min:Math.min(s,i),max:Math.max(o,e)}}n(Ht,"setYAxisRangeFromPlotData");function ft(t){let i=[];if(t.length===0)return i;if(!K){const e=F(d.xAxis)?d.xAxis.min:1/0,s=F(d.xAxis)?d.xAxis.max:-1/0;dt(Math.min(e,1),Math.max(s,t.length))}if(ut||Ht(t),ct(d.xAxis)&&(i=d.xAxis.categories.map((e,s)=>[e,t[s]])),F(d.xAxis)){const e=d.xAxis.min,s=d.xAxis.max,o=(s-e)/(t.length-1),p=[];for(let g=e;g<=s;g+=o)p.push(`${g}`);i=p.map((g,y)=>[g,t[y]])}return i}n(ft,"transformDataWithoutCategory");function yt(t){return rt[t===0?0:t%rt.length]}n(yt,"getPlotColorFromPalette");function Ut(t,i){const e=ft(i);d.plots.push({type:"line",strokeFill:yt(Y),strokeWidth:2,data:e}),Y++}n(Ut,"setLineData");function $t(t,i){const e=ft(i);d.plots.push({type:"bar",fill:yt(Y),data:e}),Y++}n($t,"setBarData");function Gt(){if(d.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return d.title=vt(),Ci.build(H,d,U,Wt)}n(Gt,"getDrawableElem");function qt(){return U}n(qt,"getChartThemeConfig");function jt(){return H}n(jt,"getChartConfig");var wi=n(function(){ri(),Y=0,H=xt(),d=pt(),U=gt(),rt=U.plotColorPalette.split(",").map(t=>t.trim()),K=!1,ut=!1},"clear"),Si={getDrawableElem:Gt,clear:wi,setAccTitle:ai,getAccTitle:ni,setDiagramTitle:si,getDiagramTitle:vt,getAccDescription:ei,setAccDescription:ii,setOrientation:zt,setXAxisTitle:Ft,setXAxisRangeData:dt,setXAxisBand:Nt,setYAxisTitle:Xt,setYAxisRangeData:Yt,setLineData:Ut,setBarData:$t,setTmpSVGG:Ot,getChartThemeConfig:qt,getChartConfig:jt},_i=n((t,i,e,s)=>{const o=s.db,p=o.getChartThemeConfig(),g=o.getChartConfig();function y(f){return f==="top"?"text-before-edge":"middle"}n(y,"getDominantBaseLine");function T(f){return f==="left"?"start":f==="right"?"end":"middle"}n(T,"getTextAnchor");function E(f){return`translate(${f.x}, ${f.y}) rotate(${f.rotation||0})`}n(E,"getTextTransformation"),Lt.debug(`Rendering xychart chart
|
|
7
|
-
`+t);const S=oi(i),R=S.append("g").attr("class","main"),I=R.append("rect").attr("width",g.width).attr("height",g.height).attr("class","background");hi(S,g.height,g.width,!0),S.attr("viewBox",`0 0 ${g.width} ${g.height}`),I.attr("fill",p.backgroundColor),o.setTmpSVGG(S.append("g").attr("class","mermaid-tmp-group"));const V=o.getDrawableElem(),_={};function L(f){let C=R,r="";for(const[D]of f.entries()){let N=R;D>0&&_[r]&&(N=_[r]),r+=f[D],C=_[r],C||(C=_[r]=N.append("g").attr("class",f[D]))}return C}n(L,"getGroup");for(const f of V){if(f.data.length===0)continue;const C=L(f.groupTexts);switch(f.type){case"rect":C.selectAll("rect").data(f.data).enter().append("rect").attr("x",r=>r.x).attr("y",r=>r.y).attr("width",r=>r.width).attr("height",r=>r.height).attr("fill",r=>r.fill).attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth);break;case"text":C.selectAll("text").data(f.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",r=>r.fill).attr("font-size",r=>r.fontSize).attr("dominant-baseline",r=>y(r.verticalPos)).attr("text-anchor",r=>T(r.horizontalPos)).attr("transform",r=>E(r)).text(r=>r.text);break;case"path":C.selectAll("path").data(f.data).enter().append("path").attr("d",r=>r.path).attr("fill",r=>r.fill?r.fill:"none").attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth);break}}},"draw"),ki={draw:_i},
|
|
7
|
+
`+t);const S=oi(i),R=S.append("g").attr("class","main"),I=R.append("rect").attr("width",g.width).attr("height",g.height).attr("class","background");hi(S,g.height,g.width,!0),S.attr("viewBox",`0 0 ${g.width} ${g.height}`),I.attr("fill",p.backgroundColor),o.setTmpSVGG(S.append("g").attr("class","mermaid-tmp-group"));const V=o.getDrawableElem(),_={};function L(f){let C=R,r="";for(const[D]of f.entries()){let N=R;D>0&&_[r]&&(N=_[r]),r+=f[D],C=_[r],C||(C=_[r]=N.append("g").attr("class",f[D]))}return C}n(L,"getGroup");for(const f of V){if(f.data.length===0)continue;const C=L(f.groupTexts);switch(f.type){case"rect":C.selectAll("rect").data(f.data).enter().append("rect").attr("x",r=>r.x).attr("y",r=>r.y).attr("width",r=>r.width).attr("height",r=>r.height).attr("fill",r=>r.fill).attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth);break;case"text":C.selectAll("text").data(f.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",r=>r.fill).attr("font-size",r=>r.fontSize).attr("dominant-baseline",r=>y(r.verticalPos)).attr("text-anchor",r=>T(r.horizontalPos)).attr("transform",r=>E(r)).text(r=>r.text);break;case"path":C.selectAll("path").data(f.data).enter().append("path").attr("d",r=>r.path).attr("fill",r=>r.fill?r.fill:"none").attr("stroke",r=>r.strokeFill).attr("stroke-width",r=>r.strokeWidth);break}}},"draw"),ki={draw:_i},Li={parser:xi,db:Si,renderer:ki};export{Li as diagram};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<title>Local Operator Console Capture</title>
|
|
7
|
+
<meta http-equiv="Content-Security-Policy"
|
|
8
|
+
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
|
|
9
|
+
<script type="module" crossorigin src="./assets/consoleCapture-BIeBPj-4.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/index-Q1Oi0B95.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror-BVW-_zui.js">
|
|
12
|
+
<link rel="stylesheet" crossorigin href="./assets/index-n0ogWXxx.css">
|
|
13
|
+
<link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body>
|
|
17
|
+
<div id="capture"></div>
|
|
18
|
+
</body>
|
|
19
|
+
|
|
20
|
+
</html>
|
package/out/renderer/index.html
CHANGED
|
@@ -31,9 +31,12 @@
|
|
|
31
31
|
<meta http-equiv="Content-Security-Policy"
|
|
32
32
|
content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111 http://localhost:8080 http://127.0.0.1:8080 https://api.radienthq.com https://us.i.posthog.com https://login.microsoftonline.com https://accounts.google.com; script-src 'self' https://us-assets.i.posthog.com https://accounts.google.com https://login.microsoftonline.com; style-src 'self' 'unsafe-inline' data:; img-src 'self' data: blob: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' blob: http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:; frame-src 'self' data: blob: http://localhost:1111 http://127.0.0.1:1111 https://accounts.google.com https://login.microsoftonline.com" />
|
|
33
33
|
<meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin-allow-popups" />
|
|
34
|
-
<script type="module" crossorigin src="./assets/index-
|
|
35
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
36
|
-
<link rel="
|
|
34
|
+
<script type="module" crossorigin src="./assets/index-J5rd4Dm5.js"></script>
|
|
35
|
+
<link rel="modulepreload" crossorigin href="./assets/index-Q1Oi0B95.js">
|
|
36
|
+
<link rel="modulepreload" crossorigin href="./assets/icon-BQh0NRL5.js">
|
|
37
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror-BVW-_zui.js">
|
|
38
|
+
<link rel="stylesheet" crossorigin href="./assets/index-n0ogWXxx.css">
|
|
39
|
+
<link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
|
|
37
40
|
<link rel="stylesheet" crossorigin href="./assets/index-D_SlEnpm.css">
|
|
38
41
|
</head>
|
|
39
42
|
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
|
9
9
|
<meta http-equiv="Content-Security-Policy"
|
|
10
10
|
content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:" />
|
|
11
|
-
<script type="module" crossorigin src="./assets/installer-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
13
|
-
<link rel="
|
|
11
|
+
<script type="module" crossorigin src="./assets/installer-CbTFoEpL.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/index-Q1Oi0B95.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/icon-BQh0NRL5.js">
|
|
14
|
+
<link rel="stylesheet" crossorigin href="./assets/index-n0ogWXxx.css">
|
|
14
15
|
</head>
|
|
15
16
|
|
|
16
17
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-operator-ui",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.7",
|
|
4
4
|
"productName": "Local Operator",
|
|
5
5
|
"description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
|
|
6
6
|
"main": "./out/main/index.js",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"check-types": "pnpm run check-types:main && pnpm run check-types:renderer",
|
|
76
76
|
"check-changed": "node scripts/ci-scope.mjs --since \"$(git merge-base origin/main HEAD)\" --run",
|
|
77
77
|
"test:session-cookies": "node scripts/session-cookie-electron.test.mjs",
|
|
78
|
-
"test:desktop": "node scripts/run-desktop-tests.mjs scripts/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/seed-placement.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/settings-time-to-error.test.mjs scripts/backend-error-surfaces.test.mjs scripts/canonical-chat.test.mjs scripts/stale-caption.test.mjs scripts/desktop-watch-lease.test.mjs scripts/session-switch.test.mjs scripts/chat-search.test.mjs scripts/session-archive-delete.test.mjs scripts/chat-archived.test.mjs scripts/chat-archive-press.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/palette-contract.test.mjs scripts/palette-panel-request.test.mjs scripts/run-detail-model.test.mjs scripts/subagent-pulse.test.mjs scripts/chat-title.test.mjs scripts/clear-search.test.mjs scripts/tool-row.test.mjs scripts/working-line-clock.test.mjs scripts/attachment-url.test.mjs scripts/desktop-notifier.test.mjs scripts/launch-session.test.mjs scripts/desktop-feed.test.mjs scripts/session-status-feed.test.mjs scripts/viewer-record.test.mjs scripts/desktop-stream.test.mjs scripts/python-bytecode-cache.test.mjs scripts/preload-updater-surface.test.mjs scripts/update-affirmation.test.mjs scripts/update-global-install.test.mjs scripts/update-robustness.test.mjs scripts/prune-python-resource.test.mjs scripts/managed-python.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.test.mjs scripts/composer-tabs.test.mjs scripts/scroll-region-to-top.test.mjs scripts/ask-options.test.mjs scripts/click-proof-expect.test.mjs scripts/window-mode.test.mjs scripts/about-panel.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/picker-feedback.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chrome.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/logger-log-dir.test.mjs scripts/draft-splash.test.mjs scripts/suggestion-stack.test.mjs scripts/suggestion-stack-react.test.mjs scripts/notifications-off.test.mjs scripts/notification-launch.test.mjs scripts/notification-spawn-sites.test.mjs scripts/chrome-keychain.test.mjs scripts/interrupt-control.test.mjs scripts/interrupt-slot-hold-react.test.mjs scripts/chat-sidebar-archive.test.mjs scripts/chat-sidebar-selection.test.mjs scripts/message-quote.test.mjs scripts/panel-chart-hover.test.mjs scripts/panel-read-policy.test.mjs scripts/composer-suggestions.test.mjs scripts/composer-tip-react.test.mjs scripts/sidebar-catalogue-gate.test.mjs scripts/sidebar-focus-hold.test.mjs scripts/credential-capture.test.mjs scripts/credential-composer.test.mjs scripts/run-panel-navigation.test.mjs scripts/backend-settings-tiers.test.mjs scripts/backend-settings-collapse.test.mjs scripts/check-build-env.test.mjs scripts/test-inventory.test.mjs scripts/conflict-markers.test.mjs scripts/compact-receipt.test.mjs scripts/chat-image-expand.test.mjs scripts/prune-python-seed.test.mjs scripts/mcp-auth-complete-no-retry.test.mjs scripts/panel-presentation.test.mjs scripts/turn-timestamp.test.mjs scripts/analytics-session-table.test.mjs scripts/theme-grid-navigation.test.mjs scripts/theme-registry-exhaustiveness.test.mjs scripts/scheduled-task-model.test.mjs scripts/backend-setting-combos.test.mjs scripts/model-setting-options.test.mjs scripts/searchable-select.test.mjs scripts/backend-settings-drafts.test.mjs scripts/typed-row-call-sites.test.mjs scripts/palette-focus.test.mjs scripts/composer-seeding.test.mjs scripts/composer-refusal.test.mjs scripts/ci-scope.test.mjs scripts/browser-tab-strip-focus.test.mjs scripts/browser-file-transfer-row.test.mjs scripts/link-targets.test.mjs scripts/link-actions.test.mjs scripts/chat-link-affordances.test.mjs scripts/transcription-failure-copy.test.mjs scripts/backend-version-drift.test.mjs scripts/live-seed-placement.test.mjs scripts/agents-publication.test.mjs scripts/agent-hub-queries.test.mjs scripts/install-builtin-batch.test.mjs scripts/attention-seen.test.mjs scripts/mark-all-read-control.test.mjs scripts/update-global-guard.test.mjs scripts/delivery-gate.test.mjs scripts/canvas-file-freshness.test.mjs scripts/no-websocket-plane.test.mjs scripts/update-window-report.test.mjs scripts/canvas-tab-close.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/webauthn.test.mjs scripts/render-mac-entitlements.test.mjs scripts/row-state-floors.test.mjs scripts/pairing-card-copy.test.mjs scripts/update-install-copy.test.mjs scripts/update-shipit.test.mjs scripts/console-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-split.test.mjs",
|
|
78
|
+
"test:desktop": "node scripts/run-desktop-tests.mjs scripts/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/seed-placement.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/settings-time-to-error.test.mjs scripts/backend-error-surfaces.test.mjs scripts/canonical-chat.test.mjs scripts/stale-caption.test.mjs scripts/desktop-watch-lease.test.mjs scripts/session-switch.test.mjs scripts/chat-search.test.mjs scripts/session-archive-delete.test.mjs scripts/chat-archived.test.mjs scripts/chat-archive-press.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/palette-contract.test.mjs scripts/palette-panel-request.test.mjs scripts/run-detail-model.test.mjs scripts/subagent-pulse.test.mjs scripts/chat-title.test.mjs scripts/clear-search.test.mjs scripts/tool-row.test.mjs scripts/working-line-clock.test.mjs scripts/attachment-url.test.mjs scripts/desktop-notifier.test.mjs scripts/launch-session.test.mjs scripts/desktop-feed.test.mjs scripts/session-status-feed.test.mjs scripts/viewer-record.test.mjs scripts/desktop-stream.test.mjs scripts/python-bytecode-cache.test.mjs scripts/preload-updater-surface.test.mjs scripts/update-affirmation.test.mjs scripts/update-global-install.test.mjs scripts/update-robustness.test.mjs scripts/prune-python-resource.test.mjs scripts/managed-python.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.test.mjs scripts/composer-tabs.test.mjs scripts/scroll-region-to-top.test.mjs scripts/ask-options.test.mjs scripts/click-proof-expect.test.mjs scripts/window-mode.test.mjs scripts/about-panel.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/picker-feedback.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chrome.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/logger-log-dir.test.mjs scripts/draft-splash.test.mjs scripts/suggestion-stack.test.mjs scripts/suggestion-stack-react.test.mjs scripts/notifications-off.test.mjs scripts/notification-launch.test.mjs scripts/notification-spawn-sites.test.mjs scripts/chrome-keychain.test.mjs scripts/interrupt-control.test.mjs scripts/interrupt-slot-hold-react.test.mjs scripts/chat-sidebar-archive.test.mjs scripts/chat-sidebar-selection.test.mjs scripts/message-quote.test.mjs scripts/panel-chart-hover.test.mjs scripts/panel-read-policy.test.mjs scripts/composer-suggestions.test.mjs scripts/composer-tip-react.test.mjs scripts/sidebar-catalogue-gate.test.mjs scripts/sidebar-focus-hold.test.mjs scripts/credential-capture.test.mjs scripts/credential-composer.test.mjs scripts/run-panel-navigation.test.mjs scripts/backend-settings-tiers.test.mjs scripts/backend-settings-collapse.test.mjs scripts/check-build-env.test.mjs scripts/test-inventory.test.mjs scripts/conflict-markers.test.mjs scripts/compact-receipt.test.mjs scripts/chat-image-expand.test.mjs scripts/prune-python-seed.test.mjs scripts/mcp-auth-complete-no-retry.test.mjs scripts/panel-presentation.test.mjs scripts/turn-timestamp.test.mjs scripts/analytics-session-table.test.mjs scripts/theme-grid-navigation.test.mjs scripts/theme-registry-exhaustiveness.test.mjs scripts/scheduled-task-model.test.mjs scripts/backend-setting-combos.test.mjs scripts/model-setting-options.test.mjs scripts/searchable-select.test.mjs scripts/backend-settings-drafts.test.mjs scripts/typed-row-call-sites.test.mjs scripts/palette-focus.test.mjs scripts/composer-seeding.test.mjs scripts/composer-refusal.test.mjs scripts/ci-scope.test.mjs scripts/browser-tab-strip-focus.test.mjs scripts/browser-file-transfer-row.test.mjs scripts/link-targets.test.mjs scripts/link-actions.test.mjs scripts/chat-link-affordances.test.mjs scripts/transcription-failure-copy.test.mjs scripts/backend-version-drift.test.mjs scripts/live-seed-placement.test.mjs scripts/agents-publication.test.mjs scripts/agent-hub-queries.test.mjs scripts/install-builtin-batch.test.mjs scripts/attention-seen.test.mjs scripts/mark-all-read-control.test.mjs scripts/update-global-guard.test.mjs scripts/delivery-gate.test.mjs scripts/canvas-file-freshness.test.mjs scripts/no-websocket-plane.test.mjs scripts/update-window-report.test.mjs scripts/canvas-tab-close.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/webauthn.test.mjs scripts/render-mac-entitlements.test.mjs scripts/row-state-floors.test.mjs scripts/pairing-card-copy.test.mjs scripts/update-install-copy.test.mjs scripts/update-shipit.test.mjs scripts/console-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.test.mjs scripts/console-mirror.test.mjs scripts/build-env-guard.test.mjs",
|
|
79
79
|
"check-themes": "node scripts/generate-theme-css.mjs --check && node scripts/contrast-contract.mjs",
|
|
80
80
|
"check-vendored": "node scripts/check-vendored.mjs",
|
|
81
81
|
"check-evidence": "node scripts/check-evidence.mjs",
|
|
@@ -152,6 +152,8 @@
|
|
|
152
152
|
"@uiw/codemirror-extensions-langs": "^4.23.10",
|
|
153
153
|
"@uiw/react-codemirror": "^4.23.10",
|
|
154
154
|
"@vitejs/plugin-react": "^4.3.4",
|
|
155
|
+
"@xterm/addon-unicode11": "0.9.0",
|
|
156
|
+
"@xterm/xterm": "6.0.0",
|
|
155
157
|
"ag-grid-community": "^33.3.2",
|
|
156
158
|
"ag-grid-react": "^33.3.2",
|
|
157
159
|
"class-variance-authority": "0.7.1",
|
|
@@ -219,7 +221,7 @@
|
|
|
219
221
|
"appId": "com.local-operator",
|
|
220
222
|
"electronVersion": "44.3.0",
|
|
221
223
|
"productName": "Local Operator",
|
|
222
|
-
"copyright": "Copyright
|
|
224
|
+
"copyright": "Copyright \u00a9 2025 Radient Inc.",
|
|
223
225
|
"asar": {
|
|
224
226
|
"smartUnpack": false
|
|
225
227
|
},
|
|
@@ -232,6 +234,7 @@
|
|
|
232
234
|
"bin/**/*",
|
|
233
235
|
"LICENSE",
|
|
234
236
|
"README.md",
|
|
237
|
+
"THIRD_PARTY_NOTICES.md",
|
|
235
238
|
"!node_modules/electron/**/*",
|
|
236
239
|
"!node_modules/@electron/get/**/*",
|
|
237
240
|
"!node_modules/@electron-internal/**/*",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as le,r as S,j as e,L as ce,T as G,B as l,S as L,l as te,m as q,n as _,h as v,X as de,o as w,A as J,i as V,k as X,c as Z}from"./icon-BfZhrs0k.js";import{g as ae,as as ue,f as z,a4 as b,a6 as M,ar as O,at as I,au as me,av as he,aw as xe,ax as ge,ay as R,az as je,aA as se,aB as fe,h as ne,aC as ye,aD as pe,u as ve,ah as we,ap as be,aE as Ce,B as Ne,aF as Ae,aG as ke,aH as De,aj as Se,aI as Ee,aJ as ee,aq as Te,aK as Fe,aL as Pe}from"./index-B8L0Kiwp.js";import{b as qe,i as _e,u as Le,a as ze}from"./use-agent-like-mutation-BwgCtL8B.js";/**
|
|
2
|
-
* @license lucide-react v0.507.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Me=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],Ie=le("message-circle",Me),E={all:["agent-comments"],list:t=>[...E.all,"list",t]},Ke=({agentId:t,enabled:r=!0})=>ae({queryKey:E.list(t||"invalid"),queryFn:async()=>{if(!t)throw new Error("Agent ID is required to fetch comments.");return(await ue(t)).result},enabled:!!t&&r,staleTime:2*60*1e3,gcTime:5*60*1e3,refetchOnWindowFocus:!0}),Be=()=>{const t=z(),{isAuthenticated:r}=b();return M({mutationFn:async n=>{const{agentId:i,data:a}=n;if(!r)throw new Error("Authentication required.");return me(i,a)},onSuccess:(n,i)=>{t.invalidateQueries({queryKey:E.list(i.agentId)}),I("Comment posted")},onError:n=>{O(`Failed to post comment: ${n.message}`)}})},Ue=()=>{const t=z(),{isAuthenticated:r}=b();return M({mutationFn:async n=>{const{agentId:i,commentId:a,data:c}=n;if(!r)throw new Error("Authentication required.");return he(i,a,c)},onSuccess:(n,i)=>{t.invalidateQueries({queryKey:E.list(i.agentId)}),I("Comment updated")},onError:n=>{O(`Failed to update comment: ${n.message}`)}})},Qe=()=>{const t=z(),{isAuthenticated:r}=b();return M({mutationFn:async n=>{const{agentId:i,commentId:a}=n;if(!r)throw new Error("Authentication required.");return xe(i,a)},onSuccess:(n,i)=>{t.invalidateQueries({queryKey:E.list(i.agentId)}),I("Comment deleted")},onError:n=>{O(`Failed to delete comment: ${n.message}`)}})},Re=({agentId:t})=>{const{isAuthenticated:r,user:n}=b(),[i,a]=S.useState(""),[c,x]=S.useState(null),[m,C]=S.useState(""),{data:N,isLoading:T,error:A}=Ke({agentId:t}),g=N?.records??[],k=Be(),d=Ue(),j=Qe(),f=async s=>{if(s.preventDefault(),!(!i.trim()||!r||!t))try{await k.mutateAsync({agentId:t,data:{text:i}}),a("")}catch(o){console.error("Submit comment error caught in component:",o)}},K=(s,o)=>{x(s),C(o)},F=()=>{x(null),C("")},B=async()=>{if(!(!c||!m.trim()||!r||!t))try{await d.mutateAsync({agentId:t,commentId:c,data:{text:m}}),F()}catch(s){console.error("Update comment error caught in component:",s)}},y=async s=>{if(!(!r||!t)&&window.confirm("Are you sure you want to delete this comment?"))try{await j.mutateAsync({agentId:t,commentId:s})}catch(o){console.error("Delete comment error caught in component:",o)}},p=s=>r&&n?.radientUser?.account?.id===s.account_id;return e.jsxs("div",{className:"mt-6",children:[e.jsx("h2",{className:"mb-4 font-semibold text-heading text-ink",children:"Comments"}),r?e.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[e.jsxs(ce,{htmlFor:"new-comment",children:[e.jsx(Ie,{size:14,"aria-hidden":"true"}),"Leave a comment"]}),e.jsxs("form",{onSubmit:f,className:"flex flex-col gap-3",children:[e.jsx(G,{id:"new-comment",placeholder:"Share your thoughts...",rows:3,value:i,onChange:s=>a(s.target.value),required:!0}),e.jsx(l,{type:"submit",variant:"primary",disabled:k.isPending||!i.trim(),className:"self-end",children:k.isPending?e.jsx(L,{size:"sm",label:"Posting comment"}):"Post comment"})]})]}):e.jsx("p",{className:"mt-6 mb-4 text-body-sm text-ink-muted",children:"Sign in to leave comments."}),e.jsx(te,{className:"my-6"}),T&&e.jsx("ul",{className:"flex flex-col",children:[...Array(3)].map((s,o)=>e.jsxs("li",{className:"flex gap-3 pb-6",children:[e.jsx(q,{children:e.jsx(_,{children:e.jsx(v,{className:"size-full"})})}),e.jsxs("div",{className:"flex w-full flex-col gap-1.5",children:[e.jsx(v,{className:"h-3.5 w-24"}),e.jsx(v,{className:"h-3 w-15"}),e.jsx(v,{className:"mt-2 h-3.5 w-full"}),e.jsx(v,{className:"h-3.5 w-4/5"})]})]},`skeleton-${o}`))}),A&&e.jsxs("p",{role:"alert",className:"my-6 text-body-sm text-danger",children:["Failed to load comments: ",A.message]}),!T&&!A&&e.jsx("ul",{className:"flex flex-col gap-6",children:g.length===0?e.jsx("li",{className:"text-body-sm text-ink-muted",children:"No comments yet. Yours would be the first."}):g.map(s=>c===s.id?e.jsxs("li",{className:"flex gap-3",children:[e.jsx(q,{children:e.jsx(_,{children:s.account_metadata?.name?.charAt(0).toUpperCase()||"?"})}),e.jsxs("div",{className:"flex w-full flex-col gap-2",children:[e.jsx(G,{rows:3,value:m,onChange:o=>C(o.target.value),autoFocus:!0,"aria-label":"Edit comment"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(l,{variant:"secondary",size:"sm",onClick:F,children:[e.jsx(de,{}),"Cancel"]}),e.jsxs(l,{variant:"primary",size:"sm",onClick:B,disabled:d.isPending||!m.trim(),children:[d.isPending?e.jsx(L,{size:"xs",label:"Saving comment"}):e.jsx(ge,{}),"Save"]})]})]})]},s.id):e.jsxs("li",{className:"flex gap-3",children:[e.jsx(q,{children:e.jsx(_,{children:s.account_metadata?.name?.charAt(0).toUpperCase()||"?"})}),e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-body text-ink",children:s.account_metadata?.name||"Anonymous"}),e.jsxs("p",{className:"text-ink-muted text-meta",children:[R(new Date(s.created_at))," ","ago"]})]}),p(s)&&e.jsxs("div",{className:"flex gap-0.5",children:[e.jsx(w,{content:"Edit comment",children:e.jsx(l,{variant:"ghost",size:"icon-sm",onClick:()=>K(s.id,s.text),disabled:!!c,"aria-label":"Edit comment",children:e.jsx(je,{})})}),e.jsx(w,{content:"Delete comment",children:e.jsx(l,{variant:"ghost",size:"icon-sm",onClick:()=>y(s.id),disabled:!!c,"aria-label":"Delete comment",children:e.jsx(se,{})})})]})]}),e.jsx("p",{className:"mt-2 text-body-sm text-ink whitespace-pre-wrap",children:s.text})]})]},s.id))})]})},$={all:["agent-details"],detail:t=>[...$.all,t]},Oe=({agentId:t,enabled:r=!0})=>ae({queryKey:$.detail(t||"invalid"),queryFn:async()=>{if(!t)throw new Error("Agent ID is required to fetch details.");return await fe(t)},select:i=>i.result,enabled:!!t&&r,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1}),$e=()=>{const t=z(),r=ne(),{isAuthenticated:n}=b();return M({mutationFn:async({agentId:a})=>{if(!n)throw new Error("Authentication required to delist an agent.");if(!a)throw new Error("Agent ID is required to delist.");return pe(a)},onSuccess:(a,c)=>{I("Agent delisted"),t.invalidateQueries({queryKey:$.detail(c.agentId)}),ye(t),r("/agent-hub")},onError:a=>{console.error("Delist agent error:",a)}})},We={like:"The like did not go through",favourite:"The favourite did not go through",download:"The download did not start",delist:"The agent was not delisted"},Q=({children:t})=>e.jsx("span",{className:"inline-flex h-4 min-w-5 items-center text-meta text-ink-muted",children:t}),Je=()=>{const{agentId:t}=ve(),r=ne(),{isAuthenticated:n,user:i}=b(),{data:a,isLoading:c,isFetching:x,error:m,refetch:C}=Oe({agentId:t??"",enabled:!!t}),{statuses:N,isKnown:T,isError:A,isFetching:g,refetch:k}=qe({agentIds:t?[t]:[]}),d=_e(T,N,t),j=d&&N[t??""]?.liked===!0,f=d&&N[t??""]?.favourited===!0,K=a?.like_count??0,F=a?.favourite_count??0,B=a?.download_count??0,y=Le(),p=ze(),s=we(),o=$e(),[ie,P]=S.useState(!1),[h,u]=S.useState(null),U=!!i&&!!a&&i.radientUser?.account?.id===a.account_id,W=()=>{!t||!n||y.isPending||(u(null),y.mutate({agentId:t,isCurrentlyLiked:j},{onError:()=>u("like")}))},Y=()=>{!t||!n||p.isPending||(u(null),p.mutate({agentId:t,isCurrentlyFavourited:f},{onError:()=>u("favourite")}))},H=()=>{!t||!a||s.isPending||(u(null),s.mutate({agentId:a.id,agentName:a.name},{onError:()=>u("download")}))},re=()=>{!t||!U||o.isPending||(u(null),o.mutate({agentId:t},{onError:()=>u("delist")}),P(!1))},D=h?h==="like"?{action:"like",error:y.error,retry:W}:h==="favourite"?{action:"favourite",error:p.error,retry:Y}:h==="download"?{action:"download",error:s.error,retry:H}:{action:"delist",error:o.error,retry:void 0}:null,oe=()=>{r("/agent-hub")};return c?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(L,{label:"Loading agent details"})}):m?e.jsx("div",{className:"flex h-full items-center justify-center p-6",children:e.jsxs(J,{variant:"danger",className:"max-w-2xl",children:[e.jsx(V,{children:"This agent could not be loaded"}),e.jsx(X,{children:be("The Radient agent catalogue did not answer.",m)}),e.jsx("div",{className:"mt-2",children:e.jsx(l,{variant:"outline",size:"sm",onClick:()=>void C(),disabled:x,"aria-busy":x,children:x?"Trying…":"Try again"})})]})}):a?e.jsxs("div",{className:"m-6 flex flex-1 flex-col rounded-lg border border-hairline bg-surface p-8",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[e.jsx(l,{variant:"ghost",size:"icon",onClick:oe,"aria-label":"Back to Agent hub",children:e.jsx(Ce,{})}),e.jsx(q,{className:"size-11 shrink-0",children:e.jsx(_,{children:e.jsx(Ne,{size:22,"aria-hidden":"true"})})}),e.jsx("h1",{className:"truncate text-display text-ink",children:a.name})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[e.jsx(w,{content:"Sign in to Radient to use this feature",disabled:n,children:e.jsx("span",{children:e.jsxs(l,{variant:"ghost",size:"sm",onClick:W,disabled:!n||y.isPending||!d,"aria-label":d?j?"Unlike agent":"Like agent":"Like state unavailable",className:Z(j&&"text-danger"),children:[e.jsx(Ae,{fill:j?"currentColor":"none"}),e.jsx(Q,{children:K})]})})}),e.jsx(w,{content:"Sign in to Radient to use this feature",disabled:n,children:e.jsx("span",{children:e.jsxs(l,{variant:"ghost",size:"sm",onClick:Y,disabled:!n||p.isPending||!d,"aria-label":d?f?"Unfavourite agent":"Favourite agent":"Favourite state unavailable",className:Z(f&&"text-warning"),children:[e.jsx(ke,{fill:f?"currentColor":"none"}),e.jsx(Q,{children:F})]})})}),e.jsx(w,{content:"Download agent to your computer",children:e.jsx("span",{children:e.jsxs(l,{variant:"ghost",size:"icon",onClick:H,disabled:s.isPending,"aria-label":"Download agent",className:"ml-1",children:[e.jsx(De,{}),e.jsx(Q,{children:s.isPending?e.jsx(v,{className:"h-3.5 w-5"}):B})]})})}),U&&e.jsx(w,{content:"Permanently delist this agent from Agent hub",children:e.jsx("span",{children:e.jsx(l,{variant:"ghost",size:"icon",onClick:()=>P(!0),disabled:o.isPending,"aria-label":"Delist agent",className:"ml-1 text-danger hover:bg-danger-wash hover:text-danger",children:e.jsx(se,{})})})})]})]}),n&&A&&!h&&e.jsxs("output",{className:"mb-6 flex flex-wrap items-center gap-2 text-meta text-warning","data-testid":"agent-details-status-unknown",children:[e.jsx("span",{children:"Your likes and favourites could not be read, so this agent's viewer state is not shown."}),e.jsx(l,{variant:"ghost",size:"sm",onClick:()=>void k(),disabled:g,"aria-busy":g,children:g?"Trying…":"Try again"})]}),D&&h&&e.jsxs(J,{variant:"danger",className:"mb-6","data-testid":"agent-details-error",children:[e.jsx(V,{children:We[h]}),e.jsx(X,{children:Se(D.action,D.error,a.name)}),D.retry&&e.jsx("div",{className:"mt-2",children:e.jsx(l,{variant:"outline",size:"sm",onClick:D.retry,children:"Try again"})})]}),e.jsx(Ee,{tags:a.tags,categories:a.categories}),e.jsxs("div",{className:"mt-4 mb-6 flex flex-col gap-2 text-body-sm text-ink-muted",children:[e.jsxs("p",{children:["Created by: ",a.account_metadata?.name??"Unknown"," (",a.account_metadata?.email??"No email",")"]}),e.jsxs("p",{children:["Created: ",R(new Date(a.created_at))," ago (",ee(a.created_at),")"]}),e.jsxs("p",{children:["Last modified: ",R(new Date(a.updated_at))," ","ago (",ee(a.updated_at),")"]})]}),e.jsx("div",{className:"mt-2 mb-8 leading-relaxed text-body text-ink",children:a.description||"No description provided."}),e.jsx(te,{className:"my-6"}),e.jsx(Re,{agentId:a.id}),e.jsx(Te,{open:ie,onClose:()=>P(!1),title:"Delist this agent?",maxWidth:"xs",actions:e.jsxs(e.Fragment,{children:[e.jsx(Fe,{onClick:()=>P(!1),children:"Cancel"}),e.jsx(Pe,{onClick:()=>{!t||!U||o.isPending||re()},disabled:o.isPending,children:o.isPending?e.jsx(L,{size:"sm",label:"Delisting agent"}):"Delist"})]}),dialogProps:{"aria-describedby":"delist-dialog-description"},children:e.jsxs("div",{id:"delist-dialog-description",className:"text-body text-ink-muted",children:['This takes "',a.name,'" off the hub straight away, and nobody will be able to download it. You can upload it again later.']})})]}):e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("p",{className:"text-body text-ink",children:"Agent not found."})})};export{Je as AgentDetailsPage};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./legacy-agents-page-BQdlRR2j.js","./icon-BfZhrs0k.js","./icon-Bv_GhQh2.css","./page-header-Dwwd9Ozp.js","./index-B8L0Kiwp.js","./index-D_SlEnpm.css","./radient-auth-buttons-Bt3YWj-N.js","./compact-pagination-DJ3iOLPw.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{u as O,a as Q,b as J,d as V,c as W,e as G,f as H,g as X,B as Y,U as Z,P as ee,r as te,_ as ae,h as $,i as z,j as U}from"./index-B8L0Kiwp.js";import{j as e,r as n,B as u,c as P}from"./icon-BfZhrs0k.js";const se=n.lazy(()=>ae(()=>import("./legacy-agents-page-BQdlRR2j.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url).then(t=>({default:t.LegacyAgentsPage}))),d="w-full rounded-md border border-control bg-surface px-3 py-2 text-body-sm text-ink";function T({profile:t,creating:v,onSaved:g}){const[r,k]=n.useState(!1),[o,m]=n.useState(v),[p,b]=n.useState(t?.name??""),[x,C]=n.useState(t?.kind??"role"),[h,y]=n.useState(t?.description??""),[j,S]=n.useState(t?.instructions??""),[_,D]=n.useState(t?.tools?.join(", ")??""),[I,N]=n.useState(t?.effort??"inherit"),[R,L]=n.useState(t?.delegate??!1),[f,a]=n.useState(!1),[c,l]=n.useState(null),i=n.useRef(null),w=$(),E=v||r,K=async s=>{if(s.preventDefault(),f)return;const M={kind:x,description:h,instructions:j,tools:_.split(",").map(q=>q.trim()).filter(Boolean),effort:I,delegate:R},A=JSON.stringify({name:p,fields:M,fresh:E});if(i.current&&i.current.body!==A){l("The previous save has not been confirmed. Retry it unchanged or reload the profile to reconcile before editing again.");return}i.current??={id:crypto.randomUUID(),body:A},a(!0),l(null);try{const q=await U({op:E?"profiles.create":"profiles.update",requestId:i.current.id,name:p,fields:M});i.current=null,m(!1),g(q.name)}catch(q){l(q instanceof Error?q.message:"Profile could not be saved.")}finally{a(!1)}},F=async()=>{if(!(!t||f)){a(!0),l(null);try{const s=await U({op:"profiles.install",name:t.name,requestId:crypto.randomUUID()});m(!1),k(!1),i.current=null,b(s.name),C(s.kind),y(s.description??""),S(s.instructions??""),D(s.tools?.join(", ")??""),N(s.effort??"inherit"),L(s.delegate??!1),g(s.name)}catch(s){l(s instanceof Error?s.message:"Profile could not be installed.")}finally{a(!1)}}};return e.jsxs("div",{className:"max-w-3xl space-y-6",children:[e.jsxs("header",{children:[e.jsx("h1",{className:"text-title",children:E?r?"Extend agent":"Create agent":t?.name}),e.jsx("p",{className:"mt-2 text-body-sm text-ink-muted",children:"Reusable instructions shared by agent commands, subagents and teams. Chats remain separate."})]}),t&&!E&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("span",{className:"text-meta text-ink-muted",children:[t.source==="builtin"?"Built-in":t.source==="installed"?"Installed":"Custom",t.divergent_fields?.length?" · Modified":""," ·"," ",t.kind]}),t.source==="builtin"?e.jsx(u,{variant:"outline",onClick:F,disabled:f,children:"Install"}):e.jsx(u,{variant:"outline",onClick:()=>m(!0),children:"Edit"}),e.jsx(u,{variant:"outline",onClick:()=>{k(!0),m(!0),b(""),i.current=null},children:"Extend"}),e.jsx(u,{onClick:()=>{z.getState().stageDraft({kind:"agent",name:t.name}),w("/chat")},children:"New chat"})]}),c&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:c}),!o&&t?.source==="builtin"&&e.jsx("p",{id:"builtin-readonly",className:"text-body-sm text-ink-muted",children:"Built-in agents are read-only. Install this one to edit it, or Extend it to start a separate agent from its instructions."}),e.jsxs("form",{onSubmit:K,className:"space-y-4",children:[e.jsxs("fieldset",{disabled:!o||f,className:"space-y-4",children:[e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Name"}),e.jsx("input",{className:d,value:p,disabled:!E,required:!0,"aria-describedby":t?.source==="builtin"?"builtin-readonly":void 0,onChange:s=>b(s.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Kind"}),e.jsxs("select",{className:d,value:x,disabled:!E,onChange:s=>C(s.target.value),children:[e.jsx("option",{value:"role",children:"Role"}),e.jsx("option",{value:"specialist",children:"Specialist"})]})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"When to use this agent"}),e.jsx("input",{className:d,value:h,maxLength:8e3,onChange:s=>y(s.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Instructions"}),e.jsx("textarea",{className:P(d,"min-h-52"),value:j,required:!0,maxLength:8e3,onChange:s=>S(s.target.value)})]}),x==="role"&&e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Allowed tools"}),e.jsx("input",{className:d,value:_,onChange:s=>D(s.target.value),placeholder:"All tools when empty; otherwise comma-separated names"})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Effort tier"}),e.jsx("input",{className:d,value:I,onChange:s=>N(s.target.value),"aria-describedby":"effort-help"}),e.jsx("span",{id:"effort-help",className:"text-meta text-ink-muted",children:"Use inherit, or a tier configured in backend settings. Unsupported tiers are rejected before saving."})]}),e.jsxs("label",{className:"flex items-center gap-2 text-body-sm",children:[e.jsx("input",{type:"checkbox",checked:R,onChange:s=>L(s.target.checked)}),"May delegate to subagents"]})]})]}),o&&e.jsx(u,{type:"submit",disabled:f,children:f?"Saving…":E?"Create agent":"Save changes"})]}),!o&&t?.packaged_instructions&&t.divergent_fields?.length?e.jsxs("details",{className:"text-body-sm",children:[e.jsx("summary",{children:"Compare packaged instructions"}),e.jsx("pre",{className:"mt-2 whitespace-pre-wrap text-body-sm text-ink-muted",children:t.packaged_instructions})]}):null]})}function B({team:t,onSaved:v}){const[g,r]=n.useState(t?.name??""),[k,o]=n.useState(t?.description??""),[m,p]=n.useState(t?.manager??"manager"),[b,x]=n.useState((t?.members??[]).map(a=>({...a,key:crypto.randomUUID()}))),[C,h]=n.useState(t?.instructions??""),[y,j]=n.useState(t?.project??""),[S,_]=n.useState(!1),[D,I]=n.useState(null),N=n.useRef(null),R=$(),L=async a=>{if(a.preventDefault(),S)return;const c={name:g,description:k,manager:m,members:b.map(({key:i,...w})=>w),instructions:C,project:y},l=JSON.stringify(c);if(N.current&&N.current.body!==l){I("The previous save has not been confirmed. Reload the team before changing that request.");return}N.current??={id:crypto.randomUUID(),body:l},_(!0),I(null);try{const i=t?await U({op:"teams.update",name:t.name,requestId:N.current.id,fields:c}):await U({op:"teams.create",requestId:N.current.id,fields:c});N.current=null,v(i.name)}catch(i){I(i instanceof Error?i.message:"Team could not be saved.")}finally{_(!1)}},f=(a,c)=>x(l=>l.map((i,w)=>w===a?{...i,...c}:i));return e.jsxs("div",{className:"max-w-3xl space-y-6",children:[e.jsxs("header",{children:[e.jsx("h1",{className:"text-title",children:t?t.name:"Create team"}),e.jsx("p",{className:"mt-2 text-body-sm text-ink-muted",children:"The manager leads the chat. Members retain their own instructions and start only when delegated work."})]}),t&&e.jsx(u,{onClick:()=>{z.getState().stageDraft({kind:"team",name:t.name}),R("/chat")},children:"New team chat"}),D&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:D}),e.jsxs("form",{onSubmit:L,className:"space-y-4",children:[e.jsxs("fieldset",{disabled:S,className:"space-y-4",children:[e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Name"}),e.jsx("input",{className:d,required:!0,maxLength:64,value:g,onChange:a=>r(a.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Description"}),e.jsx("input",{className:d,value:k,onChange:a=>o(a.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Manager agent"}),e.jsx("input",{className:d,required:!0,value:m,onChange:a=>p(a.target.value)})]}),e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-heading",children:"Members"}),b.map((a,c)=>e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("input",{className:P(d,"w-48 flex-1"),"aria-label":`Member ${c+1} name`,required:!0,value:a.role,onChange:l=>f(c,{role:l.target.value})}),e.jsxs("select",{className:P(d,"w-32"),"aria-label":`Member ${c+1} kind`,value:a.kind,onChange:l=>f(c,{kind:l.target.value}),children:[e.jsx("option",{value:"agent",children:"Agent"}),e.jsx("option",{value:"team",children:"Nested team"})]}),e.jsx("input",{className:P(d,"w-20"),"aria-label":`Member ${c+1} count`,type:"number",min:1,max:16,value:a.count,onChange:l=>f(c,{count:Number(l.target.value)})}),e.jsx(u,{type:"button",variant:"ghost",onClick:()=>x(l=>l.filter((i,w)=>w!==c)),children:"Remove"})]},a.key)),e.jsx(u,{type:"button",variant:"outline",onClick:()=>x(a=>[...a,{role:"",count:1,kind:"agent",key:crypto.randomUUID()}]),children:"Add member"})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Collaboration instructions"}),e.jsx("textarea",{className:P(d,"min-h-36"),maxLength:8e3,value:C,onChange:a=>h(a.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Project brief"}),e.jsx("textarea",{className:P(d,"min-h-36"),maxLength:8e3,value:y,onChange:a=>j(a.target.value)})]})]}),e.jsx(u,{type:"submit",disabled:S,children:S?"Saving…":t?"Save team":"Create team"})]})]})}function le(){const{agentId:t}=O(),[v,g]=Q(),r=v.get("kind")==="team"||v.get("create")==="team",k=v.has("create"),o=v.get("name"),m=J(),p=V(m.data,r?"team_catalogue":"profile_catalogue"),b=W(p&&!r),x=G(p&&r),C=H(),h=X({queryKey:["desktop",r?"team":"profile",o],enabled:p&&!!o&&!k,queryFn:()=>U({op:r?"teams.get":"profiles.get",name:o??""}),retry:!1}),y=async j=>{await C.invalidateQueries({queryKey:["desktop"]}),g({kind:r?"team":"agent",name:j})};return t?e.jsx(n.Suspense,{fallback:e.jsx("p",{className:"p-6 text-body",children:"Loading saved agent…"}),children:e.jsx(se,{})}):e.jsxs("div",{className:"flex h-full min-h-0 bg-canvas text-ink",children:[e.jsxs("aside",{className:"flex w-64 shrink-0 flex-col gap-4 border-r border-hairline bg-surface p-4",children:[e.jsx("h1",{className:"text-heading",children:"Agents and teams"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(u,{variant:r?"ghost":"outline",onClick:()=>g({kind:"agent"}),children:[e.jsx(Y,{className:"size-4"}),"Agents"]}),e.jsxs(u,{variant:r?"outline":"ghost",onClick:()=>g({kind:"team"}),children:[e.jsx(Z,{className:"size-4"}),"Teams"]})]}),e.jsxs(u,{variant:"outline",disabled:!p,onClick:()=>g({create:r?"team":"agent"}),children:[e.jsx(ee,{className:"size-4"}),r?"Create team":"Create agent"]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:(r?x.data:b.data)?.map(j=>e.jsx("button",{type:"button",className:P("flex h-8 w-full items-center rounded-md px-2 text-left text-body-sm hover:bg-row-hover",j.name===o&&te),onClick:()=>g({kind:r?"team":"agent",name:j.name}),children:e.jsx("span",{className:"truncate",children:j.name})},j.name))})]}),e.jsx("main",{className:"min-w-0 flex-1 overflow-auto p-6",children:p?b.error||x.error||h.error?e.jsxs("div",{role:"alert",children:[e.jsx("p",{className:"text-danger",children:b.error?.message||x.error?.message||h.error?.message}),e.jsx(u,{variant:"outline",onClick:()=>{b.refetch(),x.refetch(),h.refetch()},children:"Retry"})]}):k?r?e.jsx(B,{onSaved:y},"create-team"):e.jsx(T,{creating:!0,onSaved:y},"create-agent"):o&&h.isLoading?e.jsx("p",{"aria-live":"polite",children:"Loading details…"}):o&&h.data?r?e.jsx(B,{team:h.data,onSaved:y},o):e.jsx(T,{profile:h.data,creating:!1,onSaved:y},`${o}:${h.data.source}`):e.jsxs("div",{children:[e.jsx("h2",{className:"text-title",children:r?"Reusable teams":"Reusable agents"}),e.jsx("p",{className:"mt-2 text-body text-ink-muted",children:"Select a definition to view or edit it. A new chat does not change its definition."})]}):e.jsxs("div",{"aria-live":"polite",className:"space-y-3 text-body-sm",children:[e.jsx("p",{children:m.isLoading?"Connecting to the backend…":m.error?m.error.message:"Update the backend to manage reusable agents and teams. Saved chats are unchanged."}),e.jsx(u,{variant:"outline",onClick:()=>void m.refetch(),children:"Retry connection"})]})})]})}export{le as AgentsPage};
|