@evoscientist/webui 0.2.8 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.next/BUILD_ID +1 -1
- package/dist/.next/build-manifest.json +3 -3
- package/dist/.next/server/app/_global-error.html +1 -1
- package/dist/.next/server/app/_global-error.rsc +1 -1
- package/dist/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.rsc +2 -2
- package/dist/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/dist/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/dist/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dist/.next/server/app/api/memory/executions/route.js +1 -1
- package/dist/.next/server/app/api/memory/executions/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/memory/observations/route.js +1 -1
- package/dist/.next/server/app/api/memory/observations/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/memory/route.js +1 -1
- package/dist/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/skills/catalog/route.js +1 -1
- package/dist/.next/server/app/api/skills/catalog/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/skills/detail/route.js +1 -1
- package/dist/.next/server/app/api/skills/detail/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/skills/install/route.js +1 -1
- package/dist/.next/server/app/api/skills/install/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/skills/route.js +1 -1
- package/dist/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/workspace/download/route.js +1 -1
- package/dist/.next/server/app/api/workspace/download/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/workspace/file/route.js +1 -1
- package/dist/.next/server/app/api/workspace/file/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/workspace/route.js +1 -1
- package/dist/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/dist/.next/server/app/api/workspace/upload/route.js +1 -1
- package/dist/.next/server/app/api/workspace/upload/route.js.nft.json +1 -1
- package/dist/.next/server/app/index.html +1 -1
- package/dist/.next/server/app/index.rsc +3 -3
- package/dist/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/dist/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/dist/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/dist/.next/server/app/page.js.nft.json +1 -1
- package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/.next/server/chunks/[root-of-the-server]__01e0ekn._.js +6 -0
- package/dist/.next/server/chunks/{[root-of-the-server]__0t923su._.js → [root-of-the-server]__08gtyud._.js} +1 -1
- package/dist/.next/server/chunks/{[root-of-the-server]__0key-2n._.js → [root-of-the-server]__0c_9zoh._.js} +1 -1
- package/dist/.next/server/chunks/{[root-of-the-server]__0zqsdzd._.js → [root-of-the-server]__0dsauq5._.js} +1 -1
- package/dist/.next/server/chunks/[root-of-the-server]__0om1fsa._.js +6 -0
- package/dist/.next/server/chunks/[root-of-the-server]__19l67fj._.js +6 -0
- package/dist/.next/server/chunks/[root-of-the-server]__1nb3ezt._.js +6 -0
- package/dist/.next/server/chunks/_13lro7d._.js +1 -1
- package/dist/.next/server/chunks/ssr/1daa_mermaid_dist_chunks_mermaid_core_mindmap-definition-YA3MSWOX_mjs_19k8byt._.js +6 -6
- package/dist/.next/server/chunks/ssr/[root-of-the-server]__1q-wcrf._.js +15 -0
- package/dist/.next/server/chunks/ssr/{node_modules_0a-3666._.js → node_modules_0265-rz._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{[root-of-the-server]__11a1-4t._.js → node_modules_0653v7w._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_1f65-5g._.js → node_modules_09pkkps._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_0m7-ed8._.js → node_modules_0d4t5t-._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_20iziql._.js → node_modules_0e21i6_._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1t626ye._.js → node_modules_0f1vz2j._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_1twjy-4._.js → node_modules_0fpr7k8._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_20oab__._.js → node_modules_0gq6n6w._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_10v96_9._.js → node_modules_0lb0yml._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_14xejkf._.js → node_modules_0mshgc0._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_13e524_._.js → node_modules_0r6hp0p._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1a2dy76._.js → node_modules_0revk50._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0lhl9_0._.js → node_modules_0sfdscp._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_1phops3._.js → node_modules_0snw7z_._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_002u7ir._.js → node_modules_0tbm7m-._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0ybok7k._.js → node_modules_0tfd3hd._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0fxlk06._.js → node_modules_0y4c6ao._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1mcjw-y._.js → node_modules_0zinurw._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_0qeu828._.js → node_modules_0zz_c7x._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0q44r64._.js → node_modules_10xlaeo._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0urn1wt._.js → node_modules_11xf286._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_01wbayw._.js → node_modules_13418z5._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_208gr2-._.js → node_modules_16r2-d4._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0p_8bfi._.js → node_modules_1_uze58._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0gs9qjb._.js → node_modules_1di__7s._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_02l4ncm._.js → node_modules_1e3xu34._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1owe5xv._.js → node_modules_1frmxq2._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_0tr3k8r._.js → node_modules_1ic3g8m._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0plqukv._.js → node_modules_1nia3l1._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_17rfg58._.js → node_modules_1yw7dd6._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_09ex6q5._.js → node_modules_katex_dist_katex_mjs_0rmimx0._.js} +1 -1
- package/dist/.next/server/middleware-build-manifest.js +3 -3
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/static/chunks/357uypdcfkasu.js +13 -0
- package/dist/.next/static/chunks/3cmvtz1y1tcd1.css +3 -0
- package/dist/.next/static/chunks/{27vb_89qd7ag_.js → 3fg_vuz1xt14w.js} +1 -1
- package/dist/.next/static/chunks/3lnrl25cwsoyk.js +90 -0
- package/dist/.next/static/chunks/{1bzu587wut72w.js → 3s09ok8dc101_.js} +1 -1
- package/dist/package.json +4 -4
- package/package.json +4 -4
- package/dist/.next/server/chunks/[root-of-the-server]__0jsq76h._.js +0 -6
- package/dist/.next/server/chunks/[root-of-the-server]__0k-rs5f._.js +0 -6
- package/dist/.next/server/chunks/[root-of-the-server]__0nn8czk._.js +0 -6
- package/dist/.next/server/chunks/[root-of-the-server]__1alqt3_._.js +0 -6
- package/dist/.next/server/chunks/ssr/[root-of-the-server]__0owaq8w._.js +0 -12
- package/dist/.next/static/chunks/14b2ne-5dycww.js +0 -90
- package/dist/.next/static/chunks/15e7e4t3feyih.js +0 -10
- package/dist/.next/static/chunks/2dmr54jagfdwa.css +0 -3
- /package/dist/.next/static/{DlVVJPKPg4elb2BXd_ZVZ → GuE943tuTCMHEfFMDvjrJ}/_buildManifest.js +0 -0
- /package/dist/.next/static/{DlVVJPKPg4elb2BXd_ZVZ → GuE943tuTCMHEfFMDvjrJ}/_clientMiddlewareManifest.js +0 -0
- /package/dist/.next/static/{DlVVJPKPg4elb2BXd_ZVZ → GuE943tuTCMHEfFMDvjrJ}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,839484,t=>{t.v(t=>Promise.resolve().then(()=>t(716400)))},350117,t=>{t.v(e=>Promise.all(["static/chunks/0mkmxdnpoteey.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/1kzq0rdlu1v0j.js"].map(e=>t.l(e))).then(()=>e(36245)))},382528,t=>{t.v(e=>Promise.all(["static/chunks/00h58csdfefay.js","static/chunks/1-2_pusn4n8oh.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/2qe97b2xjvm_s.js"].map(e=>t.l(e))).then(()=>e(868938)))},705108,t=>{t.v(e=>Promise.all(["static/chunks/0kdfzi54utgbh.js","static/chunks/42kilhgqayez4.js"].map(e=>t.l(e))).then(()=>e(121437)))},143904,t=>{t.v(e=>Promise.all(["static/chunks/0u3ktztrzu1fa.js","static/chunks/1ebh7wwf-wzqn.js"].map(e=>t.l(e))).then(()=>e(482661)))},409843,t=>{"use strict";var e=t.i(369110),a=t.i(382793),i=t.i(502056),s=t.i(217248),r=t.i(447804),l=t.i(60231),n=t.i(508324),o=t.i(419524);t.i(566661);var d=t.i(704642);function c(t,{edgePathsClass:e="edges edgePaths"}={}){let a=t.insert("g").attr("class","root"),i=a.insert("g").attr("class","clusters");return{clusters:i,edgePaths:a.insert("g").attr("class",e),edgeLabels:a.insert("g").attr("class","edgeLabels"),nodes:a.insert("g").attr("class","nodes"),rootGroups:a}}async function h(t,e){if(e.label){let{shapeSvg:a,bbox:i}=await (0,s.labelHelper)(t,e);e.labelBBox={width:i.width,height:i.height},a.remove()}else e.labelBBox={width:0,height:0}}async function g(t,e,a){let s=await (0,i.insertNode)(t,e,a),r=s.node()?.getBBox()??{width:0,height:0};return e.width=r.width,e.height=r.height,s}async function u(e,i){let s=new d.Graph({multigraph:!0,compound:!0}),r=[...i.edges],n=(0,l.getConfig2)(),o=c(e),{edgeLabels:u,nodes:f}=o,p=new Map,m=null!=e.node();for(let t of(await Promise.all(i.nodes.map(async t=>{if(t.isGroup)m&&await h(f,t),s.setNode(t.id,{...t});else{if(m){let e=await g(f,t,{config:n,dir:t.dir});p.set(t.id,e)}s.setNode(t.id,{...t})}})),r))m&&(0,a.hasEdgeLabel)(t)&&await (0,a.insertEdgeLabel)(u,t),s.setEdge(t.start,t.end,{...t},t.id),i.edges.some(e=>e.id===t.id)||i.edges.push(t);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:a}=await t.A(483976);a(e,i)}return{graph:s,groups:o,nodeElements:p}}(0,o.__name)(c,"createLayoutElementGroups"),(0,o.__name)(h,"measureGroupLabel"),(0,o.__name)(g,"insertMeasuredNode"),(0,o.__name)(u,"createGraphWithElements");var f=new Map,p=new Map,m=new Map,w=(0,o.__name)(()=>{p.clear(),m.clear(),f.clear()},"clear"),y=(0,o.__name)((t,e)=>{let a=p.get(e)||[];return n.log.trace("In isDescendant",e," ",t," = ",a.includes(t)),a.includes(t)},"isDescendant"),k=(0,o.__name)((t,e)=>{let a=p.get(e)||[];return n.log.info("Descendants of ",e," is ",a),n.log.info("Edge is ",t),t.v!==e&&t.w!==e&&(a.includes(t.v)||y(t.v,e)||y(t.w,e)||a.includes(t.w))},"edgeInCluster"),_=(0,o.__name)((t,e,a,i)=>{n.log.debug("Copying children of ",t,"root",i,"data",e.node(t),i);let s=e.children(t)||[];t!==i&&s.push(t),n.log.debug("Copying (nodes) clusterId",t,"nodes",s),s.forEach(s=>{if(e.children(s).length>0)_(s,e,a,i);else{let r=e.node(s);n.log.info("cp ",s," to ",i," with parent ",t),a.setNode(s,r),i!==e.parent(s)&&(n.log.debug("Setting parent",s,e.parent(s)),a.setParent(s,e.parent(s))),t!==i&&s!==t?(n.log.debug("Setting parent",s,t),a.setParent(s,t)):(n.log.info("In copy ",t,"root",i,"data",e.node(t),i),n.log.debug("Not Setting parent for node=",s,"cluster!==rootId",t!==i,"node!==clusterId",s!==t));let l=e.edges(s);n.log.debug("Copying Edges",l),l.forEach(s=>{n.log.info("Edge",s);let r=e.edge(s.v,s.w,s.name);n.log.info("Edge data",r,i);try{k(s,i)?(n.log.info("Copying as ",s.v,s.w,r,s.name),a.setEdge(s.v,s.w,r,s.name),n.log.info("newGraph edges ",a.edges(),a.edge(a.edges()[0]))):n.log.info("Skipping copy of edge ",s.v,"-->",s.w," rootId: ",i," clusterId:",t)}catch(t){n.log.error(t)}})}n.log.debug("Removing node",s),e.removeNode(s)})},"copy"),b=(0,o.__name)((t,e)=>{let a=e.children(t),i=[...a];for(let s of a)m.set(s,t),i=[...i,...b(s,e)];return i},"extractDescendants"),v=(0,o.__name)((t,e,a)=>{let i=t.edges().filter(t=>t.v===e||t.w===e),s=t.edges().filter(t=>t.v===a||t.w===a),r=i.map(t=>({v:t.v===e?a:t.v,w:t.w===e?e:t.w})),l=s.map(t=>({v:t.v,w:t.w}));return r.filter(t=>l.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),x=(0,o.__name)((t,e,a)=>{let i,s=e.children(t);if(n.log.trace("Searching children of id ",t,s),s.length<1)return t;for(let t of s){let s=x(t,e,a),r=v(e,a,s);if(s)if(!(r.length>0))return s;else i=s}return i},"findNonClusterChild"),j=(0,o.__name)(t=>f.has(t)&&f.get(t).externalConnections&&f.has(t)?f.get(t).id:t,"getAnchorId"),C=(0,o.__name)((t,e)=>{if(!t||e>10)return void n.log.debug("Opting out, no graph ");for(let e of(n.log.debug("Opting in, graph "),t.nodes().forEach(function(e){t.children(e).length>0&&(n.log.debug("Cluster identified",e," Replacement id in edges: ",x(e,t,e)),p.set(e,b(e,t)),f.set(e,{id:x(e,t,e),clusterData:t.node(e)}))}),t.nodes().forEach(function(e){let a=t.children(e),i=t.edges();a.length>0?(n.log.debug("Cluster identified",e,p),i.forEach(t=>{y(t.v,e)^y(t.w,e)&&(n.log.debug("Edge: ",t," leaves cluster ",e),n.log.debug("Descendants of XXX ",e,": ",p.get(e)),f.get(e).externalConnections=!0)})):n.log.debug("Not a cluster ",e,p)}),f.keys())){let a=f.get(e).id,i=t.parent(a);i!==e&&f.has(i)&&!f.get(i).externalConnections&&(f.get(e).id=i);let s=t.edges().some(t=>t.v===e);if(a&&f.get(e)?.externalConnections&&s&&N(t,a,e)){let i=q(t,e,t.parent(a));i&&(f.get(e).id=i)}}t.edges().forEach(function(e){let a=t.edge(e);n.log.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),n.log.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let i=e.v,s=e.w;if(n.log.debug("Fix XXX",f,"ids:",e.v,e.w,"Translating: ",f.get(e.v)," --- ",f.get(e.w)),f.get(e.v)||f.get(e.w)){if(n.log.debug("Fixing and trying - removing XXX",e.v,e.w,e.name),i=j(e.v),s=j(e.w),t.removeEdge(e.v,e.w,e.name),i!==e.v){let s=t.parent(i);f.get(s).externalConnections=!0,a.fromCluster=e.v}if(s!==e.w){let i=t.parent(s);f.get(i).externalConnections=!0,a.toCluster=e.w}n.log.debug("Fix Replacing with XXX",i,s,e.name),t.setEdge(i,s,a,e.name)}}),L(t,0),n.log.trace(f)},"adjustClustersAndEdges"),L=(0,o.__name)((t,e)=>{if(e>10)return void n.log.error("Bailing out");let a=t.nodes(),i=!1;for(let e of a){let a=t.children(e);i=i||a.length>0}if(!i)return void n.log.debug("Done, no node has children",t.nodes());for(let i of(n.log.debug("Nodes = ",a,e),a))if(n.log.debug("Extracting node",i,f,f.has(i)&&!f.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),f.has(i))if(!f.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){n.log.debug("Cluster without external connections, without a parent and with children",i,e);let a="TB"===t.graph().rankdir?"LR":"TB";f.get(i)?.clusterData?.dir&&(a=f.get(i).clusterData.dir,n.log.debug("Fixing dir",f.get(i).clusterData.dir,a));let s=new d.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});_(i,t,s,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:f.get(i).clusterData,label:f.get(i).label,graph:s})}else n.log.debug("Cluster ** ",i," **not meeting the criteria !externalConnections:",!f.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),n.log.debug(f);else n.log.debug("Not a cluster",i,e);for(let i of(a=t.nodes(),n.log.debug("New list of nodes",a),a)){let a=t.node(i);n.log.debug(" Now next level",i,a),a?.clusterNode&&L(a.graph,e+1)}},"extractor"),P=(0,o.__name)((t,e)=>{if(0===e.length)return[];let a=Object.assign([],e);return e.forEach(e=>{let i=t.children(e),s=P(t,i);a=[...a,...s]}),a},"sorter"),E=(0,o.__name)(t=>P(t,t.children()),"sortNodesByHierarchy"),N=(0,o.__name)((t,e,a)=>{let i=t.parent(e);for(;i&&i!==a;){let e=f.get(i);if(e&&!e.externalConnections)return!0;i=t.parent(i)}return!1},"isNodeInExtractableCluster"),q=(0,o.__name)((t,e,a)=>{for(let i of t.children(e)??[]){if(i===a||y(i,a))continue;let s=x(i,t,e);if(s&&!N(t,s,e))return s}return null},"findSafeAnchorNode");function B({prepareLayout:t,measureLayout:e,runLayoutCore:i,paintLayout:s,afterPaint:r,paintOptions:l}){let n=e??D;return(0,o.__name)(async function(e,o,d,c){let h=o.select("g");(d?.insertMarkers??a.markers_default)(h,e.markers,e.type,e.diagramId),S();let g={element:h,helpers:d,options:c};g.preparedLayout=await t?.(e,g);let u=await n(e,g),f=await i(e,g),p={...g,measure:u};s?await s(e,p,f):await T(e,p,l),await r?.(e,p,f)},"render")}function S(){(0,i.clear)(),(0,a.clear)(),(0,e.clear)(),w()}async function D(t,{element:e}){return await u(e,t)}async function T(t,e,a={}){let{measure:i}=e,{groups:s}=i;for(let i of a.getNodes?.(t,e)??t.nodes)a.skipNode?.(i,e)||await $(s,i,e,a);let r=M(t.nodes);for(let i of t.edges)z(i,a)||await I(s,i,r,t,a,e)}async function $(t,a,s,r){a.clusterNode?(0,i.positionNode)(a):R(a,s,r)?await (0,e.insertCluster)(t.clusters,a):(0,i.positionNode)(a)}function R(t,e,a){return!0===t.isGroup&&(a.isCluster?.(t,e)??!0)}function M(t){let e=new Map;for(let a of t)a?.id&&e.set(a.id,a);return e}function z(t,e){return t.isLayoutOnly||!!e.skipEdge?.(t)}async function I(t,e,i,s,r,l){let n=(0,a.insertEdge)(t.edgePaths,{...e},r.clusterDb??new Map,s.type,G(e.start,e,i,l,r),G(e.end,e,i,l,r),s.diagramId,X(e,r));(0,a.hasEdgeLabel)(e)&&(a.edgeLabels.has(e.id)||await (0,a.insertEdgeLabel)(t.edgeLabels,e),A(e,n))}function G(t,e,a,i,s){return s.getEdgeNode?.(t,e,i)??(t?a.get(t)??{}:{})}function X(t,e){return"function"==typeof e.skipIntersect?e.skipIntersect(t):e.skipIntersect??!1}function A(t,e){let s=e?.updatedPath??e?.originalPath,o=(0,l.getConfig)(),{subGraphTitleTotalMargin:d}=(0,i.getSubGraphTitleMargins)({flowchart:o.flowchart??{}});if(t.label){let i=a.edgeLabels.get(t.id),l=t.x,o=t.y;if(s){let a=r.utils_default.calcLabelPosition(s);n.log.debug("Moving label "+t.label+" from (",l,",",o,") to (",a.x,",",a.y,") abc88"),e?.updatedPath&&(l=a.x,o=a.y)}i.attr("transform",`translate(${l}, ${o+d/2})`)}if(t?.startLabelLeft){let e=a.terminalLabels.get(t.id).startLeft,i=t?.x,l=t?.y;if(s){let e=r.utils_default.calcTerminalLabelPosition(10*!!t.arrowTypeStart,"start_left",s);i=e.x,l=e.y}e.attr("transform",`translate(${i}, ${l})`)}if(t.startLabelRight){let e=a.terminalLabels.get(t.id).startRight,i=t.x,l=t.y;if(s){let e=r.utils_default.calcTerminalLabelPosition(10*!!t.arrowTypeStart,"start_right",s);i=e.x,l=e.y}e.attr("transform",`translate(${i}, ${l})`)}if(t.endLabelLeft){let e=a.terminalLabels.get(t.id).endLeft,i=t.x,l=t.y;if(s){let e=r.utils_default.calcTerminalLabelPosition(10*!!t.arrowTypeEnd,"end_left",s);i=e.x,l=e.y}e.attr("transform",`translate(${i}, ${l})`)}if(t.endLabelRight){let e=a.terminalLabels.get(t.id).endRight,i=t.x,l=t.y;if(s){let e=r.utils_default.calcTerminalLabelPosition(10*!!t.arrowTypeEnd,"end_right",s);i=e.x,l=e.y}e.attr("transform",`translate(${i}, ${l})`)}}(0,o.__name)(B,"createCommonLayoutRenderer"),(0,o.__name)(S,"clearLayoutRenderState"),(0,o.__name)(D,"defaultMeasureLayout"),(0,o.__name)(T,"paintLayoutData"),(0,o.__name)($,"paintLayoutNode"),(0,o.__name)(R,"shouldPaintAsCluster"),(0,o.__name)(M,"buildNodeLookup"),(0,o.__name)(z,"shouldSkipPaintEdge"),(0,o.__name)(I,"paintLayoutEdge"),(0,o.__name)(G,"getRenderedNode"),(0,o.__name)(X,"shouldSkipIntersect"),(0,o.__name)(A,"positionRenderedEdgeLabel"),t.s(["adjustClustersAndEdges",0,C,"clearLayoutRenderState",0,S,"clusterDb",0,f,"createCommonLayoutRenderer",0,B,"createLayoutElementGroups",0,c,"defaultMeasureLayout",0,D,"findNonClusterChild",0,x,"insertMeasuredNode",0,g,"paintLayoutData",0,T,"sortNodesByHierarchy",0,E])},696017,t=>{"use strict";var e=t.i(60231),a=t.i(419524);t.i(947716);var i=t.i(723685),s=(0,a.__name)(t=>{let{securityLevel:a}=(0,e.getConfig2)(),s=(0,i.select)("body");if("sandbox"===a){let e=(0,i.select)(`#i${t}`),a=e.node()?.contentDocument??document;s=(0,i.select)(a.body)}return s.select(`#${t}`)},"selectSvgElement");t.s(["selectSvgElement",0,s])},502056,t=>{"use strict";var e=t.i(217248),a=t.i(447804),i=t.i(508324),s=t.i(419524),r=(0,s.__name)(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,a=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:e+a}},"getSubGraphTitleMargins"),l=new Map;async function n(t,i,s){let r,n;"rect"===i.shape&&(i.rx&&i.ry?i.shape="roundedRect":i.shape="squareRect");let o=i.shape?e.shapes[i.shape]:void 0;if(!o)throw Error(`No such shape: ${i.shape}. Please check your syntax.`);if(i.link){let e;"sandbox"===s.config.securityLevel?e="_top":i.linkTarget&&(e=i.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",i.link).attr("target",e??null),n=await o(r,i,s)}else r=n=await o(t,i,s);return r.attr("data-look",(0,a.handleUndefinedAttr)(i.look)),i.tooltip&&n.attr("title",i.tooltip),l.set(i.id,r),i.haveCallback&&r.attr("class",r.attr("class")+" clickable"),r}(0,s.__name)(n,"insertNode");var o=(0,s.__name)((t,e)=>{l.set(e.id,t)},"setNodeElem"),d=(0,s.__name)(()=>{l.clear()},"clear"),c=(0,s.__name)(t=>{let e=l.get(t.id);i.log.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode");t.s(["clear",0,d,"getSubGraphTitleMargins",0,r,"insertNode",0,n,"positionNode",0,c,"setNodeElem",0,o])},369110,t=>{"use strict";var e=t.i(502056),a=t.i(217248),i=t.i(224797),s=t.i(836333),r=t.i(60231),l=t.i(508324),n=t.i(419524);t.i(947716);var o=t.i(723685),d=t.i(883272),c=(0,n.__name)(async(t,e)=>{let n,c,h=(0,r.getConfig2)(),{themeVariables:g,handDrawnSeed:u}=h,{clusterBkg:f,clusterBorder:p}=g,{labelStyles:m,nodeStyles:w,borderStyles:y,backgroundStyles:k}=(0,i.styles2String)(e),_=t.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look),b=(0,r.evaluate)(h.flowchart.htmlLabels),v="LR"===e.direction,x=_.insert("g").attr("class","cluster-label swimlane-label"),j=await (0,s.createText)(x,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width}),C=j.getBBox();if(b){let t=j.children[0],e=(0,o.select)(j);C=t.getBoundingClientRect(),e.attr("width",C.width),e.attr("height",C.height)}let L=e.padding??0,P=e.width<=C.width+L?C.width+L:e.width;e.width<=C.width+L?e.diff=(P-e.width)/2-L:e.diff=-L;let E=e.height,N=e.y-E/2,q=e.y+E/2,B=e.x-P/2,S=void 0!==e.swimlaneContentTop?e.swimlaneContentTop:N+E/3,D=4*!!v,T=C.height+2*D;if(v){let t=Math.max(T,C.height+2*D),a=B+t,s=Math.max(0,P-t);if("handDrawn"===e.look){let r=d.default.svg(_),l=(0,i.userNodeOverrides)(e,{roughness:.7,fill:f,stroke:p,fillWeight:3,seed:u}),o=(0,i.userNodeOverrides)(e,{roughness:.7,fill:"none",stroke:p,seed:u}),h=r.rectangle(B,N,t,E,l);n=_.insert(()=>h,":first-child");let g=r.rectangle(a,N,s,E,o);c=_.insert(()=>g,":first-child"),n.select("path:nth-child(2)").attr("style",y.join(";")),n.select("path").attr("style",k.join(";").replace("fill","stroke"))}else n=_.insert("rect",":first-child"),c=_.insert("rect",":first-child"),n.attr("class","swimlane-title").attr("style",w).attr("x",B).attr("y",N).attr("width",t).attr("height",E).attr("fill",f).attr("stroke",p),c.attr("class","swimlane-body").attr("style",w).attr("x",a).attr("y",N).attr("width",s).attr("height",E).attr("fill","none").attr("stroke",p);let r=B+t/2,l=e.y;x.attr("transform",`translate(${r}, ${l}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{let t=Math.min(T,Math.max(0,S-N)),a=N+t,s=Math.max(0,q-a),r=e.x-P/2;if("handDrawn"===e.look){let l=d.default.svg(_),o=(0,i.userNodeOverrides)(e,{roughness:.7,fill:f,stroke:p,fillWeight:3,seed:u}),h=(0,i.userNodeOverrides)(e,{roughness:.7,fill:"none",stroke:p,seed:u}),g=l.rectangle(r,N,P,t,o);n=_.insert(()=>g,":first-child");let m=l.rectangle(r,a,P,s,h);c=_.insert(()=>m,":first-child"),n.select("path:nth-child(2)").attr("style",y.join(";")),n.select("path").attr("style",k.join(";").replace("fill","stroke"))}else n=_.insert("rect",":first-child"),c=_.insert("rect",":first-child"),n.attr("class","swimlane-title").attr("style",w).attr("x",r).attr("y",N).attr("width",P).attr("height",t).attr("fill",f).attr("stroke",p),c.attr("class","swimlane-body").attr("style",w).attr("x",r).attr("y",a).attr("width",P).attr("height",s).attr("fill","none").attr("stroke",p);let l=e.x-C.width/2,o=N+(t-C.height)/2;x.attr("transform",`translate(${l}, ${o})`)}if(l.log.trace("Swimlane data ",e,JSON.stringify(e)),m){let t=x.select("span");t&&t.attr("style",m)}return e.offsetX=0,e.width=P,e.height=E,e.offsetY=C.height-L/2,e.intersect=function(t){return(0,a.intersect_rect_default)(e,t)},{cluster:_,labelBBox:C}},"swimlane"),h=(0,n.__name)(async(t,n)=>{let c,h;l.log.info("Creating subgraph rect for ",n.id,n);let g=(0,r.getConfig2)(),{themeVariables:u,handDrawnSeed:f}=g,{clusterBkg:p,clusterBorder:m}=u,{labelStyles:w,nodeStyles:y,borderStyles:k,backgroundStyles:_}=(0,i.styles2String)(n),b=t.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),v=(0,r.getEffectiveHtmlLabels)(g),x=b.insert("g").attr("class","cluster-label "),j=(c="markdown"===n.labelType?await (0,s.createText)(x,n.label,{style:n.labelStyle,useHtmlLabels:v,isNode:!0,width:n.width}):await (0,a.createLabel_default)(x,n.label,n.labelStyle||"",!1,!0)).getBBox();if((0,r.getEffectiveHtmlLabels)(g)){let t=c.children[0],e=(0,o.select)(c);j=t.getBoundingClientRect(),e.attr("width",j.width),e.attr("height",j.height)}let C=n.width<=j.width+n.padding?j.width+n.padding:n.width;n.width<=j.width+n.padding?n.diff=(C-n.width)/2-n.padding:n.diff=-n.padding;let L=n.height,P=n.x-C/2,E=n.y-L/2;if(l.log.trace("Data ",n,JSON.stringify(n)),"handDrawn"===n.look){let t=d.default.svg(b),e=(0,i.userNodeOverrides)(n,{roughness:.7,fill:p,stroke:m,fillWeight:3,seed:f}),s=t.path((0,a.createRoundedRectPathD)(P,E,C,L,0),e);(h=b.insert(()=>(l.log.debug("Rough node insert CXC",s),s),":first-child")).select("path:nth-child(2)").attr("style",k.join(";")),h.select("path").attr("style",_.join(";").replace("fill","stroke"))}else(h=b.insert("rect",":first-child")).attr("style",y).attr("rx",n.rx).attr("ry",n.ry).attr("x",P).attr("y",E).attr("width",C).attr("height",L);let{subGraphTitleTopMargin:N}=(0,e.getSubGraphTitleMargins)(g);if(x.attr("transform",`translate(${n.x-j.width/2}, ${n.y-n.height/2+N})`),w){let t=x.select("span");t&&t.attr("style",w)}let q=h.node().getBBox();return n.offsetX=0,n.width=q.width,n.height=q.height,n.offsetY=j.height-n.padding/2,n.intersect=function(t){return(0,a.intersect_rect_default)(n,t)},{cluster:b,labelBBox:j}},"rect"),g=(0,n.__name)((t,e)=>{let i=t.insert("g").attr("class","note-cluster").attr("id",e.domId),s=i.insert("rect",":first-child"),r=0*e.padding,l=r/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-l).attr("y",e.y-e.height/2-l).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");let n=s.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return(0,a.intersect_rect_default)(e,t)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),u=(0,n.__name)(async(t,e)=>{let i,s=(0,r.getConfig2)(),{themeVariables:l,handDrawnSeed:n}=s,{altBackground:c,compositeBackground:h,compositeTitleBackground:g,nodeBorder:u}=l,f=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),p=f.insert("g",":first-child"),m=f.insert("g").attr("class","cluster-label"),w=f.append("rect"),y=await (0,a.createLabel_default)(m,e.label,e.labelStyle,void 0,!0),k=y.getBBox();if((0,r.getEffectiveHtmlLabels)(s)){let t=y.children[0],e=(0,o.select)(y);k=t.getBoundingClientRect(),e.attr("width",k.width),e.attr("height",k.height)}let _=0*e.padding,b=(e.width<=k.width+e.padding?k.width+e.padding:e.width)+_;e.width<=k.width+e.padding?e.diff=(b-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height+_,x=e.height+_-k.height-6,j=e.x-b/2,C=e.y-v/2;e.width=b;let L=e.y-e.height/2-_/2+k.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),s=d.default.svg(f),r=e.rx||e.ry?s.path((0,a.createRoundedRectPathD)(j,C,b,v,10),{roughness:.7,fill:g,fillStyle:"solid",stroke:u,seed:n}):s.rectangle(j,C,b,v,{seed:n});i=f.insert(()=>r,":first-child");let l=s.rectangle(j,L,b,x,{fill:t?c:h,fillStyle:t?"hachure":"solid",stroke:u,seed:n});i=f.insert(()=>r,":first-child"),w=f.insert(()=>l)}else(i=p.insert("rect",":first-child")).attr("class","outer").attr("x",j).attr("y",C).attr("width",b).attr("height",v).attr("data-look",e.look),w.attr("class","inner").attr("x",j).attr("y",L).attr("width",b).attr("height",x);return m.attr("transform",`translate(${e.x-k.width/2}, ${C+1-3*!(0,r.getEffectiveHtmlLabels)(s)})`),e.height=i.node().getBBox().height,e.offsetX=0,e.offsetY=k.height-e.padding/2,e.labelBBox=k,e.intersect=function(t){return(0,a.intersect_rect_default)(e,t)},{cluster:f,labelBBox:k}},"roundedWithTitle"),f=(0,n.__name)(async(t,n)=>{let c;l.log.info("Creating subgraph rect for ",n.id,n);let h=(0,r.getConfig2)(),{themeVariables:g,handDrawnSeed:u}=h,{clusterBkg:f,clusterBorder:p}=g,{labelStyles:m,nodeStyles:w,borderStyles:y,backgroundStyles:k}=(0,i.styles2String)(n),_=t.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),b=(0,r.getEffectiveHtmlLabels)(h),v=_.insert("g").attr("class","cluster-label "),x=await (0,s.createText)(v,n.label,{style:n.labelStyle,useHtmlLabels:b,isNode:!0,width:n.width}),j=x.getBBox();if((0,r.getEffectiveHtmlLabels)(h)){let t=x.children[0],e=(0,o.select)(x);j=t.getBoundingClientRect(),e.attr("width",j.width),e.attr("height",j.height)}let C=n.width<=j.width+n.padding?j.width+n.padding:n.width;n.width<=j.width+n.padding?n.diff=(C-n.width)/2-n.padding:n.diff=-n.padding;let L=n.height,P=n.x-C/2,E=n.y-L/2;if(l.log.trace("Data ",n,JSON.stringify(n)),"handDrawn"===n.look){let t=d.default.svg(_),e=(0,i.userNodeOverrides)(n,{roughness:.7,fill:f,stroke:p,fillWeight:4,seed:u}),s=t.path((0,a.createRoundedRectPathD)(P,E,C,L,n.rx),e);(c=_.insert(()=>(l.log.debug("Rough node insert CXC",s),s),":first-child")).select("path:nth-child(2)").attr("style",y.join(";")),c.select("path").attr("style",k.join(";").replace("fill","stroke"))}else(c=_.insert("rect",":first-child")).attr("style",w).attr("rx",n.rx).attr("ry",n.ry).attr("x",P).attr("y",E).attr("width",C).attr("height",L);let{subGraphTitleTopMargin:N}=(0,e.getSubGraphTitleMargins)(h);if(v.attr("transform",`translate(${n.x-j.width/2}, ${n.y-n.height/2+N})`),m){let t=v.select("span");t&&t.attr("style",m)}let q=c.node().getBBox();return n.offsetX=0,n.width=q.width,n.height=q.height,n.offsetY=j.height-n.padding/2,n.intersect=function(t){return(0,a.intersect_rect_default)(n,t)},{cluster:_,labelBBox:j}},"kanbanSection"),p={rect:h,squareRect:h,roundedWithTitle:u,noteGroup:g,divider:(0,n.__name)((t,e)=>{let i,{themeVariables:s,handDrawnSeed:l}=(0,r.getConfig2)(),{nodeBorder:n}=s,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),c=o.insert("g",":first-child"),h=0*e.padding,g=e.width+h;e.diff=-e.padding;let u=e.height+h,f=e.x-g/2,p=e.y-u/2;if(e.width=g,"handDrawn"===e.look){let t=d.default.svg(o).rectangle(f,p,g,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:l});i=o.insert(()=>t,":first-child")}else{i=c.insert("rect",":first-child");let t="outer";e.look,t="divider",i.attr("class",t).attr("x",f).attr("y",p).attr("width",g).attr("height",u).attr("data-look",e.look)}return e.height=i.node().getBBox().height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return(0,a.intersect_rect_default)(e,t)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:f,swimlane:c},m=new Map,w=(0,n.__name)(async(t,e)=>{let a=e.shape||"rect",i=await p[a](t,e);return m.set(e.id,i),i},"insertCluster"),y=(0,n.__name)(()=>{m=new Map},"clear");t.s(["clear",0,y,"insertCluster",0,w])},121292,t=>{"use strict";var e=t.i(369110),a=t.i(382793),i=t.i(502056),s=t.i(217248),r=t.i(447804),l=t.i(60231),n=t.i(508324),o=t.i(419524),d={common:l.common_default,getConfig:l.getConfig,insertCluster:e.insertCluster,insertEdge:a.insertEdge,insertEdgeLabel:a.insertEdgeLabel,insertMarkers:a.markers_default,insertNode:i.insertNode,interpolateToCurve:r.interpolateToCurve,labelHelper:s.labelHelper,log:n.log,positionEdgeLabel:a.positionEdgeLabel},c={},h=(0,o.__name)(t=>{for(let e of t)c[e.name]=e},"registerLayoutLoaders");(0,o.__name)(()=>{h([{name:"dagre",loader:(0,o.__name)(async()=>await t.A(555153),"loader")},{name:"swimlane",loader:(0,o.__name)(async()=>await t.A(12782),"loader")},{name:"cose-bilkent",loader:(0,o.__name)(async()=>await t.A(208503),"loader")}])},"registerDefaultLayoutLoaders")();var g=(0,o.__name)(async(t,e)=>{if(!(t.layoutAlgorithm in c))throw Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(let e of t.nodes){let a=e.domId||e.id;e.domId=`${t.diagramId}-${a}`}let a=c[t.layoutAlgorithm],i=await a.loader(),{theme:s,themeVariables:r}=t.config,{useGradient:l,gradientStart:n,gradientStop:o}=r,h=e.attr("id");if(e.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),e.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),l){let t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",o).attr("stop-opacity",1)}return i.render(t,e,d,{algorithm:a.algorithm})},"render"),u=(0,o.__name)((t="",{fallback:e="dagre"}={})=>{if(t in c)return t;if(e in c)return n.log.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm");t.s(["getRegisteredLayoutAlgorithm",0,u,"registerLayoutLoaders",0,h,"render",0,g])},110338,t=>{t.v(e=>Promise.all(["static/chunks/2gocl3dq0_h1s.js","static/chunks/2itcfm_igcz5x.js"].map(e=>t.l(e))).then(()=>e(59618)))},4699,t=>{t.v(e=>Promise.all(["static/chunks/01xjer0i_e5z5.js","static/chunks/2itcfm_igcz5x.js"].map(e=>t.l(e))).then(()=>e(595016)))},208503,t=>{t.v(e=>Promise.all(["static/chunks/0vhltcpdssl3-.js","static/chunks/2qe97b2xjvm_s.js"].map(e=>t.l(e))).then(()=>e(752312)))},342649,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/1g6hadfcoz4ag.js"].map(e=>t.l(e))).then(()=>e(447429)))},555153,t=>{t.v(e=>Promise.all(["static/chunks/16mzcd_gvdgbo.js","static/chunks/3lx-n8v_8u7og.js"].map(e=>t.l(e))).then(()=>e(921789)))},121563,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/221-n1wtpkus8.js"].map(e=>t.l(e))).then(()=>e(52278)))},775281,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/3oif9bymgqjgd.js"].map(e=>t.l(e))).then(()=>e(75306)))},840094,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/3mjwob-a5hhwz.js"].map(e=>t.l(e))).then(()=>e(958133)))},806739,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/266qo7h19xz_m.js"].map(e=>t.l(e))).then(()=>e(486182)))},725135,t=>{t.v(e=>Promise.all(["static/chunks/25pfy8u3vc_bn.js","static/chunks/2qq7e47gpyc_e.js"].map(e=>t.l(e))).then(()=>e(271981)))},257999,t=>{t.v(e=>Promise.all(["static/chunks/1kg8hnvdsweku.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/1kzq0rdlu1v0j.js"].map(e=>t.l(e))).then(()=>e(954776)))},126038,t=>{t.v(e=>Promise.all(["static/chunks/1wrwqqt23_cqy.js"].map(e=>t.l(e))).then(()=>e(868948)))},299022,t=>{t.v(e=>Promise.all(["static/chunks/025bmrgeukcb2.js","static/chunks/2b4v6n9b8htrv.js"].map(e=>t.l(e))).then(()=>e(595502)))},216587,t=>{t.v(e=>Promise.all(["static/chunks/1ztlt8o8gnas8.js","static/chunks/04e-e--5lk26x.js"].map(e=>t.l(e))).then(()=>e(222024)))},405760,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/1rh4z578p-h1a.js"].map(e=>t.l(e))).then(()=>e(896515)))},937084,t=>{t.v(e=>Promise.all(["static/chunks/09nk4rn1z6j8b.js","static/chunks/2qq7e47gpyc_e.js"].map(e=>t.l(e))).then(()=>e(722875)))},223045,t=>{t.v(e=>Promise.all(["static/chunks/0x7n81v2cw92f.js"].map(e=>t.l(e))).then(()=>e(239077)))},104423,t=>{t.v(e=>Promise.all(["static/chunks/0oyz95sujd2c7.js"].map(e=>t.l(e))).then(()=>e(547384)))},847615,t=>{t.v(e=>Promise.all(["static/chunks/3s-zbm7kxc46y.js"].map(e=>t.l(e))).then(()=>e(980953)))},265584,t=>{t.v(e=>Promise.all(["static/chunks/14b2ne-5dycww.js"].map(e=>t.l(e))).then(()=>e(582576)))},121612,t=>{t.v(e=>Promise.all(["static/chunks/1-axl1a1s8xi7.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/1kzq0rdlu1v0j.js"].map(e=>t.l(e))).then(()=>e(724854)))},761201,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/38h4_u_fq6ose.js"].map(e=>t.l(e))).then(()=>e(537834)))},480988,t=>{t.v(e=>Promise.all(["static/chunks/0dhmf6y59xjoo.js"].map(e=>t.l(e))).then(()=>e(713179)))},780947,t=>{t.v(e=>Promise.all(["static/chunks/3r7r2d2yc93-y.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/1kzq0rdlu1v0j.js"].map(e=>t.l(e))).then(()=>e(354077)))},775900,t=>{t.v(e=>Promise.all(["static/chunks/14osgsp3aiqpz.js"].map(e=>t.l(e))).then(()=>e(207851)))},650519,t=>{t.v(e=>Promise.all(["static/chunks/3peltyinql2qj.js"].map(e=>t.l(e))).then(()=>e(621500)))},654159,t=>{t.v(e=>Promise.all(["static/chunks/2o4dndk0d68do.js","static/chunks/1u5i-jti87jbo.js"].map(e=>t.l(e))).then(()=>e(801891)))},483976,t=>{t.v(e=>Promise.all(["static/chunks/0p54qye85am3w.js"].map(e=>t.l(e))).then(()=>e(122015)))},99530,t=>{t.v(e=>Promise.all(["static/chunks/0u9ae9k_2g7k3.js","static/chunks/3lx-n8v_8u7og.js","static/chunks/3her9o9_qn46y.js"].map(e=>t.l(e))).then(()=>e(757018)))},633604,t=>{t.v(e=>Promise.all(["static/chunks/2sdwbfs1x5skp.js","static/chunks/3her9o9_qn46y.js"].map(e=>t.l(e))).then(()=>e(196572)))},12782,t=>{t.v(e=>Promise.all(["static/chunks/0_l0vn2teso0z.js"].map(e=>t.l(e))).then(()=>e(619325)))},868278,t=>{t.v(e=>Promise.all(["static/chunks/2m267diam_vib.js","static/chunks/2b4v6n9b8htrv.js"].map(e=>t.l(e))).then(()=>e(557786)))},9691,t=>{t.v(e=>Promise.all(["static/chunks/2udhdtq_z8488.js"].map(e=>t.l(e))).then(()=>e(254768)))},539575,t=>{t.v(e=>Promise.all(["static/chunks/0si45yj1su8y7.js"].map(e=>t.l(e))).then(()=>e(263487)))},85919,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/02slxciv9jt1p.js"].map(e=>t.l(e))).then(()=>e(353883)))},437446,t=>{t.v(e=>Promise.all(["static/chunks/2v_t22-0u_seu.js","static/chunks/0m-pl93u72hp9.js"].map(e=>t.l(e))).then(()=>e(819125)))}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,839484,t=>{t.v(t=>Promise.resolve().then(()=>t(716400)))},350117,t=>{t.v(e=>Promise.all(["static/chunks/0mkmxdnpoteey.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/1kzq0rdlu1v0j.js"].map(e=>t.l(e))).then(()=>e(36245)))},382528,t=>{t.v(e=>Promise.all(["static/chunks/00h58csdfefay.js","static/chunks/1-2_pusn4n8oh.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/2qe97b2xjvm_s.js"].map(e=>t.l(e))).then(()=>e(868938)))},705108,t=>{t.v(e=>Promise.all(["static/chunks/0kdfzi54utgbh.js","static/chunks/42kilhgqayez4.js"].map(e=>t.l(e))).then(()=>e(121437)))},143904,t=>{t.v(e=>Promise.all(["static/chunks/0u3ktztrzu1fa.js","static/chunks/1ebh7wwf-wzqn.js"].map(e=>t.l(e))).then(()=>e(482661)))},409843,t=>{"use strict";var e=t.i(369110),a=t.i(382793),i=t.i(502056),s=t.i(217248),r=t.i(447804),l=t.i(60231),n=t.i(508324),o=t.i(419524);t.i(566661);var d=t.i(704642);function c(t,{edgePathsClass:e="edges edgePaths"}={}){let a=t.insert("g").attr("class","root"),i=a.insert("g").attr("class","clusters");return{clusters:i,edgePaths:a.insert("g").attr("class",e),edgeLabels:a.insert("g").attr("class","edgeLabels"),nodes:a.insert("g").attr("class","nodes"),rootGroups:a}}async function h(t,e){if(e.label){let{shapeSvg:a,bbox:i}=await (0,s.labelHelper)(t,e);e.labelBBox={width:i.width,height:i.height},a.remove()}else e.labelBBox={width:0,height:0}}async function g(t,e,a){let s=await (0,i.insertNode)(t,e,a),r=s.node()?.getBBox()??{width:0,height:0};return e.width=r.width,e.height=r.height,s}async function u(e,i){let s=new d.Graph({multigraph:!0,compound:!0}),r=[...i.edges],n=(0,l.getConfig2)(),o=c(e),{edgeLabels:u,nodes:f}=o,p=new Map,m=null!=e.node();for(let t of(await Promise.all(i.nodes.map(async t=>{if(t.isGroup)m&&await h(f,t),s.setNode(t.id,{...t});else{if(m){let e=await g(f,t,{config:n,dir:t.dir});p.set(t.id,e)}s.setNode(t.id,{...t})}})),r))m&&(0,a.hasEdgeLabel)(t)&&await (0,a.insertEdgeLabel)(u,t),s.setEdge(t.start,t.end,{...t},t.id),i.edges.some(e=>e.id===t.id)||i.edges.push(t);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:a}=await t.A(483976);a(e,i)}return{graph:s,groups:o,nodeElements:p}}(0,o.__name)(c,"createLayoutElementGroups"),(0,o.__name)(h,"measureGroupLabel"),(0,o.__name)(g,"insertMeasuredNode"),(0,o.__name)(u,"createGraphWithElements");var f=new Map,p=new Map,m=new Map,w=(0,o.__name)(()=>{p.clear(),m.clear(),f.clear()},"clear"),y=(0,o.__name)((t,e)=>{let a=p.get(e)||[];return n.log.trace("In isDescendant",e," ",t," = ",a.includes(t)),a.includes(t)},"isDescendant"),k=(0,o.__name)((t,e)=>{let a=p.get(e)||[];return n.log.info("Descendants of ",e," is ",a),n.log.info("Edge is ",t),t.v!==e&&t.w!==e&&(a.includes(t.v)||y(t.v,e)||y(t.w,e)||a.includes(t.w))},"edgeInCluster"),_=(0,o.__name)((t,e,a,i)=>{n.log.debug("Copying children of ",t,"root",i,"data",e.node(t),i);let s=e.children(t)||[];t!==i&&s.push(t),n.log.debug("Copying (nodes) clusterId",t,"nodes",s),s.forEach(s=>{if(e.children(s).length>0)_(s,e,a,i);else{let r=e.node(s);n.log.info("cp ",s," to ",i," with parent ",t),a.setNode(s,r),i!==e.parent(s)&&(n.log.debug("Setting parent",s,e.parent(s)),a.setParent(s,e.parent(s))),t!==i&&s!==t?(n.log.debug("Setting parent",s,t),a.setParent(s,t)):(n.log.info("In copy ",t,"root",i,"data",e.node(t),i),n.log.debug("Not Setting parent for node=",s,"cluster!==rootId",t!==i,"node!==clusterId",s!==t));let l=e.edges(s);n.log.debug("Copying Edges",l),l.forEach(s=>{n.log.info("Edge",s);let r=e.edge(s.v,s.w,s.name);n.log.info("Edge data",r,i);try{k(s,i)?(n.log.info("Copying as ",s.v,s.w,r,s.name),a.setEdge(s.v,s.w,r,s.name),n.log.info("newGraph edges ",a.edges(),a.edge(a.edges()[0]))):n.log.info("Skipping copy of edge ",s.v,"-->",s.w," rootId: ",i," clusterId:",t)}catch(t){n.log.error(t)}})}n.log.debug("Removing node",s),e.removeNode(s)})},"copy"),b=(0,o.__name)((t,e)=>{let a=e.children(t),i=[...a];for(let s of a)m.set(s,t),i=[...i,...b(s,e)];return i},"extractDescendants"),v=(0,o.__name)((t,e,a)=>{let i=t.edges().filter(t=>t.v===e||t.w===e),s=t.edges().filter(t=>t.v===a||t.w===a),r=i.map(t=>({v:t.v===e?a:t.v,w:t.w===e?e:t.w})),l=s.map(t=>({v:t.v,w:t.w}));return r.filter(t=>l.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),x=(0,o.__name)((t,e,a)=>{let i,s=e.children(t);if(n.log.trace("Searching children of id ",t,s),s.length<1)return t;for(let t of s){let s=x(t,e,a),r=v(e,a,s);if(s)if(!(r.length>0))return s;else i=s}return i},"findNonClusterChild"),j=(0,o.__name)(t=>f.has(t)&&f.get(t).externalConnections&&f.has(t)?f.get(t).id:t,"getAnchorId"),C=(0,o.__name)((t,e)=>{if(!t||e>10)return void n.log.debug("Opting out, no graph ");for(let e of(n.log.debug("Opting in, graph "),t.nodes().forEach(function(e){t.children(e).length>0&&(n.log.debug("Cluster identified",e," Replacement id in edges: ",x(e,t,e)),p.set(e,b(e,t)),f.set(e,{id:x(e,t,e),clusterData:t.node(e)}))}),t.nodes().forEach(function(e){let a=t.children(e),i=t.edges();a.length>0?(n.log.debug("Cluster identified",e,p),i.forEach(t=>{y(t.v,e)^y(t.w,e)&&(n.log.debug("Edge: ",t," leaves cluster ",e),n.log.debug("Descendants of XXX ",e,": ",p.get(e)),f.get(e).externalConnections=!0)})):n.log.debug("Not a cluster ",e,p)}),f.keys())){let a=f.get(e).id,i=t.parent(a);i!==e&&f.has(i)&&!f.get(i).externalConnections&&(f.get(e).id=i);let s=t.edges().some(t=>t.v===e);if(a&&f.get(e)?.externalConnections&&s&&N(t,a,e)){let i=q(t,e,t.parent(a));i&&(f.get(e).id=i)}}t.edges().forEach(function(e){let a=t.edge(e);n.log.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),n.log.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let i=e.v,s=e.w;if(n.log.debug("Fix XXX",f,"ids:",e.v,e.w,"Translating: ",f.get(e.v)," --- ",f.get(e.w)),f.get(e.v)||f.get(e.w)){if(n.log.debug("Fixing and trying - removing XXX",e.v,e.w,e.name),i=j(e.v),s=j(e.w),t.removeEdge(e.v,e.w,e.name),i!==e.v){let s=t.parent(i);f.get(s).externalConnections=!0,a.fromCluster=e.v}if(s!==e.w){let i=t.parent(s);f.get(i).externalConnections=!0,a.toCluster=e.w}n.log.debug("Fix Replacing with XXX",i,s,e.name),t.setEdge(i,s,a,e.name)}}),L(t,0),n.log.trace(f)},"adjustClustersAndEdges"),L=(0,o.__name)((t,e)=>{if(e>10)return void n.log.error("Bailing out");let a=t.nodes(),i=!1;for(let e of a){let a=t.children(e);i=i||a.length>0}if(!i)return void n.log.debug("Done, no node has children",t.nodes());for(let i of(n.log.debug("Nodes = ",a,e),a))if(n.log.debug("Extracting node",i,f,f.has(i)&&!f.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),f.has(i))if(!f.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){n.log.debug("Cluster without external connections, without a parent and with children",i,e);let a="TB"===t.graph().rankdir?"LR":"TB";f.get(i)?.clusterData?.dir&&(a=f.get(i).clusterData.dir,n.log.debug("Fixing dir",f.get(i).clusterData.dir,a));let s=new d.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});_(i,t,s,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:f.get(i).clusterData,label:f.get(i).label,graph:s})}else n.log.debug("Cluster ** ",i," **not meeting the criteria !externalConnections:",!f.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),n.log.debug(f);else n.log.debug("Not a cluster",i,e);for(let i of(a=t.nodes(),n.log.debug("New list of nodes",a),a)){let a=t.node(i);n.log.debug(" Now next level",i,a),a?.clusterNode&&L(a.graph,e+1)}},"extractor"),P=(0,o.__name)((t,e)=>{if(0===e.length)return[];let a=Object.assign([],e);return e.forEach(e=>{let i=t.children(e),s=P(t,i);a=[...a,...s]}),a},"sorter"),E=(0,o.__name)(t=>P(t,t.children()),"sortNodesByHierarchy"),N=(0,o.__name)((t,e,a)=>{let i=t.parent(e);for(;i&&i!==a;){let e=f.get(i);if(e&&!e.externalConnections)return!0;i=t.parent(i)}return!1},"isNodeInExtractableCluster"),q=(0,o.__name)((t,e,a)=>{for(let i of t.children(e)??[]){if(i===a||y(i,a))continue;let s=x(i,t,e);if(s&&!N(t,s,e))return s}return null},"findSafeAnchorNode");function B({prepareLayout:t,measureLayout:e,runLayoutCore:i,paintLayout:s,afterPaint:r,paintOptions:l}){let n=e??D;return(0,o.__name)(async function(e,o,d,c){let h=o.select("g");(d?.insertMarkers??a.markers_default)(h,e.markers,e.type,e.diagramId),S();let g={element:h,helpers:d,options:c};g.preparedLayout=await t?.(e,g);let u=await n(e,g),f=await i(e,g),p={...g,measure:u};s?await s(e,p,f):await T(e,p,l),await r?.(e,p,f)},"render")}function S(){(0,i.clear)(),(0,a.clear)(),(0,e.clear)(),w()}async function D(t,{element:e}){return await u(e,t)}async function T(t,e,a={}){let{measure:i}=e,{groups:s}=i;for(let i of a.getNodes?.(t,e)??t.nodes)a.skipNode?.(i,e)||await $(s,i,e,a);let r=M(t.nodes);for(let i of t.edges)z(i,a)||await I(s,i,r,t,a,e)}async function $(t,a,s,r){a.clusterNode?(0,i.positionNode)(a):R(a,s,r)?await (0,e.insertCluster)(t.clusters,a):(0,i.positionNode)(a)}function R(t,e,a){return!0===t.isGroup&&(a.isCluster?.(t,e)??!0)}function M(t){let e=new Map;for(let a of t)a?.id&&e.set(a.id,a);return e}function z(t,e){return t.isLayoutOnly||!!e.skipEdge?.(t)}async function I(t,e,i,s,r,l){let n=(0,a.insertEdge)(t.edgePaths,{...e},r.clusterDb??new Map,s.type,G(e.start,e,i,l,r),G(e.end,e,i,l,r),s.diagramId,X(e,r));(0,a.hasEdgeLabel)(e)&&(a.edgeLabels.has(e.id)||await (0,a.insertEdgeLabel)(t.edgeLabels,e),A(e,n))}function G(t,e,a,i,s){return s.getEdgeNode?.(t,e,i)??(t?a.get(t)??{}:{})}function X(t,e){return"function"==typeof e.skipIntersect?e.skipIntersect(t):e.skipIntersect??!1}function A(t,e){let s=e?.updatedPath??e?.originalPath,o=(0,l.getConfig)(),{subGraphTitleTotalMargin:d}=(0,i.getSubGraphTitleMargins)({flowchart:o.flowchart??{}});if(t.label){let i=a.edgeLabels.get(t.id),l=t.x,o=t.y;if(s){let a=r.utils_default.calcLabelPosition(s);n.log.debug("Moving label "+t.label+" from (",l,",",o,") to (",a.x,",",a.y,") abc88"),e?.updatedPath&&(l=a.x,o=a.y)}i.attr("transform",`translate(${l}, ${o+d/2})`)}if(t?.startLabelLeft){let e=a.terminalLabels.get(t.id).startLeft,i=t?.x,l=t?.y;if(s){let e=r.utils_default.calcTerminalLabelPosition(10*!!t.arrowTypeStart,"start_left",s);i=e.x,l=e.y}e.attr("transform",`translate(${i}, ${l})`)}if(t.startLabelRight){let e=a.terminalLabels.get(t.id).startRight,i=t.x,l=t.y;if(s){let e=r.utils_default.calcTerminalLabelPosition(10*!!t.arrowTypeStart,"start_right",s);i=e.x,l=e.y}e.attr("transform",`translate(${i}, ${l})`)}if(t.endLabelLeft){let e=a.terminalLabels.get(t.id).endLeft,i=t.x,l=t.y;if(s){let e=r.utils_default.calcTerminalLabelPosition(10*!!t.arrowTypeEnd,"end_left",s);i=e.x,l=e.y}e.attr("transform",`translate(${i}, ${l})`)}if(t.endLabelRight){let e=a.terminalLabels.get(t.id).endRight,i=t.x,l=t.y;if(s){let e=r.utils_default.calcTerminalLabelPosition(10*!!t.arrowTypeEnd,"end_right",s);i=e.x,l=e.y}e.attr("transform",`translate(${i}, ${l})`)}}(0,o.__name)(B,"createCommonLayoutRenderer"),(0,o.__name)(S,"clearLayoutRenderState"),(0,o.__name)(D,"defaultMeasureLayout"),(0,o.__name)(T,"paintLayoutData"),(0,o.__name)($,"paintLayoutNode"),(0,o.__name)(R,"shouldPaintAsCluster"),(0,o.__name)(M,"buildNodeLookup"),(0,o.__name)(z,"shouldSkipPaintEdge"),(0,o.__name)(I,"paintLayoutEdge"),(0,o.__name)(G,"getRenderedNode"),(0,o.__name)(X,"shouldSkipIntersect"),(0,o.__name)(A,"positionRenderedEdgeLabel"),t.s(["adjustClustersAndEdges",0,C,"clearLayoutRenderState",0,S,"clusterDb",0,f,"createCommonLayoutRenderer",0,B,"createLayoutElementGroups",0,c,"defaultMeasureLayout",0,D,"findNonClusterChild",0,x,"insertMeasuredNode",0,g,"paintLayoutData",0,T,"sortNodesByHierarchy",0,E])},696017,t=>{"use strict";var e=t.i(60231),a=t.i(419524);t.i(947716);var i=t.i(723685),s=(0,a.__name)(t=>{let{securityLevel:a}=(0,e.getConfig2)(),s=(0,i.select)("body");if("sandbox"===a){let e=(0,i.select)(`#i${t}`),a=e.node()?.contentDocument??document;s=(0,i.select)(a.body)}return s.select(`#${t}`)},"selectSvgElement");t.s(["selectSvgElement",0,s])},502056,t=>{"use strict";var e=t.i(217248),a=t.i(447804),i=t.i(508324),s=t.i(419524),r=(0,s.__name)(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,a=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:e+a}},"getSubGraphTitleMargins"),l=new Map;async function n(t,i,s){let r,n;"rect"===i.shape&&(i.rx&&i.ry?i.shape="roundedRect":i.shape="squareRect");let o=i.shape?e.shapes[i.shape]:void 0;if(!o)throw Error(`No such shape: ${i.shape}. Please check your syntax.`);if(i.link){let e;"sandbox"===s.config.securityLevel?e="_top":i.linkTarget&&(e=i.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",i.link).attr("target",e??null),n=await o(r,i,s)}else r=n=await o(t,i,s);return r.attr("data-look",(0,a.handleUndefinedAttr)(i.look)),i.tooltip&&n.attr("title",i.tooltip),l.set(i.id,r),i.haveCallback&&r.attr("class",r.attr("class")+" clickable"),r}(0,s.__name)(n,"insertNode");var o=(0,s.__name)((t,e)=>{l.set(e.id,t)},"setNodeElem"),d=(0,s.__name)(()=>{l.clear()},"clear"),c=(0,s.__name)(t=>{let e=l.get(t.id);i.log.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode");t.s(["clear",0,d,"getSubGraphTitleMargins",0,r,"insertNode",0,n,"positionNode",0,c,"setNodeElem",0,o])},369110,t=>{"use strict";var e=t.i(502056),a=t.i(217248),i=t.i(224797),s=t.i(836333),r=t.i(60231),l=t.i(508324),n=t.i(419524);t.i(947716);var o=t.i(723685),d=t.i(883272),c=(0,n.__name)(async(t,e)=>{let n,c,h=(0,r.getConfig2)(),{themeVariables:g,handDrawnSeed:u}=h,{clusterBkg:f,clusterBorder:p}=g,{labelStyles:m,nodeStyles:w,borderStyles:y,backgroundStyles:k}=(0,i.styles2String)(e),_=t.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look),b=(0,r.evaluate)(h.flowchart.htmlLabels),v="LR"===e.direction,x=_.insert("g").attr("class","cluster-label swimlane-label"),j=await (0,s.createText)(x,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width}),C=j.getBBox();if(b){let t=j.children[0],e=(0,o.select)(j);C=t.getBoundingClientRect(),e.attr("width",C.width),e.attr("height",C.height)}let L=e.padding??0,P=e.width<=C.width+L?C.width+L:e.width;e.width<=C.width+L?e.diff=(P-e.width)/2-L:e.diff=-L;let E=e.height,N=e.y-E/2,q=e.y+E/2,B=e.x-P/2,S=void 0!==e.swimlaneContentTop?e.swimlaneContentTop:N+E/3,D=4*!!v,T=C.height+2*D;if(v){let t=Math.max(T,C.height+2*D),a=B+t,s=Math.max(0,P-t);if("handDrawn"===e.look){let r=d.default.svg(_),l=(0,i.userNodeOverrides)(e,{roughness:.7,fill:f,stroke:p,fillWeight:3,seed:u}),o=(0,i.userNodeOverrides)(e,{roughness:.7,fill:"none",stroke:p,seed:u}),h=r.rectangle(B,N,t,E,l);n=_.insert(()=>h,":first-child");let g=r.rectangle(a,N,s,E,o);c=_.insert(()=>g,":first-child"),n.select("path:nth-child(2)").attr("style",y.join(";")),n.select("path").attr("style",k.join(";").replace("fill","stroke"))}else n=_.insert("rect",":first-child"),c=_.insert("rect",":first-child"),n.attr("class","swimlane-title").attr("style",w).attr("x",B).attr("y",N).attr("width",t).attr("height",E).attr("fill",f).attr("stroke",p),c.attr("class","swimlane-body").attr("style",w).attr("x",a).attr("y",N).attr("width",s).attr("height",E).attr("fill","none").attr("stroke",p);let r=B+t/2,l=e.y;x.attr("transform",`translate(${r}, ${l}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{let t=Math.min(T,Math.max(0,S-N)),a=N+t,s=Math.max(0,q-a),r=e.x-P/2;if("handDrawn"===e.look){let l=d.default.svg(_),o=(0,i.userNodeOverrides)(e,{roughness:.7,fill:f,stroke:p,fillWeight:3,seed:u}),h=(0,i.userNodeOverrides)(e,{roughness:.7,fill:"none",stroke:p,seed:u}),g=l.rectangle(r,N,P,t,o);n=_.insert(()=>g,":first-child");let m=l.rectangle(r,a,P,s,h);c=_.insert(()=>m,":first-child"),n.select("path:nth-child(2)").attr("style",y.join(";")),n.select("path").attr("style",k.join(";").replace("fill","stroke"))}else n=_.insert("rect",":first-child"),c=_.insert("rect",":first-child"),n.attr("class","swimlane-title").attr("style",w).attr("x",r).attr("y",N).attr("width",P).attr("height",t).attr("fill",f).attr("stroke",p),c.attr("class","swimlane-body").attr("style",w).attr("x",r).attr("y",a).attr("width",P).attr("height",s).attr("fill","none").attr("stroke",p);let l=e.x-C.width/2,o=N+(t-C.height)/2;x.attr("transform",`translate(${l}, ${o})`)}if(l.log.trace("Swimlane data ",e,JSON.stringify(e)),m){let t=x.select("span");t&&t.attr("style",m)}return e.offsetX=0,e.width=P,e.height=E,e.offsetY=C.height-L/2,e.intersect=function(t){return(0,a.intersect_rect_default)(e,t)},{cluster:_,labelBBox:C}},"swimlane"),h=(0,n.__name)(async(t,n)=>{let c,h;l.log.info("Creating subgraph rect for ",n.id,n);let g=(0,r.getConfig2)(),{themeVariables:u,handDrawnSeed:f}=g,{clusterBkg:p,clusterBorder:m}=u,{labelStyles:w,nodeStyles:y,borderStyles:k,backgroundStyles:_}=(0,i.styles2String)(n),b=t.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),v=(0,r.getEffectiveHtmlLabels)(g),x=b.insert("g").attr("class","cluster-label "),j=(c="markdown"===n.labelType?await (0,s.createText)(x,n.label,{style:n.labelStyle,useHtmlLabels:v,isNode:!0,width:n.width}):await (0,a.createLabel_default)(x,n.label,n.labelStyle||"",!1,!0)).getBBox();if((0,r.getEffectiveHtmlLabels)(g)){let t=c.children[0],e=(0,o.select)(c);j=t.getBoundingClientRect(),e.attr("width",j.width),e.attr("height",j.height)}let C=n.width<=j.width+n.padding?j.width+n.padding:n.width;n.width<=j.width+n.padding?n.diff=(C-n.width)/2-n.padding:n.diff=-n.padding;let L=n.height,P=n.x-C/2,E=n.y-L/2;if(l.log.trace("Data ",n,JSON.stringify(n)),"handDrawn"===n.look){let t=d.default.svg(b),e=(0,i.userNodeOverrides)(n,{roughness:.7,fill:p,stroke:m,fillWeight:3,seed:f}),s=t.path((0,a.createRoundedRectPathD)(P,E,C,L,0),e);(h=b.insert(()=>(l.log.debug("Rough node insert CXC",s),s),":first-child")).select("path:nth-child(2)").attr("style",k.join(";")),h.select("path").attr("style",_.join(";").replace("fill","stroke"))}else(h=b.insert("rect",":first-child")).attr("style",y).attr("rx",n.rx).attr("ry",n.ry).attr("x",P).attr("y",E).attr("width",C).attr("height",L);let{subGraphTitleTopMargin:N}=(0,e.getSubGraphTitleMargins)(g);if(x.attr("transform",`translate(${n.x-j.width/2}, ${n.y-n.height/2+N})`),w){let t=x.select("span");t&&t.attr("style",w)}let q=h.node().getBBox();return n.offsetX=0,n.width=q.width,n.height=q.height,n.offsetY=j.height-n.padding/2,n.intersect=function(t){return(0,a.intersect_rect_default)(n,t)},{cluster:b,labelBBox:j}},"rect"),g=(0,n.__name)((t,e)=>{let i=t.insert("g").attr("class","note-cluster").attr("id",e.domId),s=i.insert("rect",":first-child"),r=0*e.padding,l=r/2;s.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-l).attr("y",e.y-e.height/2-l).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");let n=s.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return(0,a.intersect_rect_default)(e,t)},{cluster:i,labelBBox:{width:0,height:0}}},"noteGroup"),u=(0,n.__name)(async(t,e)=>{let i,s=(0,r.getConfig2)(),{themeVariables:l,handDrawnSeed:n}=s,{altBackground:c,compositeBackground:h,compositeTitleBackground:g,nodeBorder:u}=l,f=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),p=f.insert("g",":first-child"),m=f.insert("g").attr("class","cluster-label"),w=f.append("rect"),y=await (0,a.createLabel_default)(m,e.label,e.labelStyle,void 0,!0),k=y.getBBox();if((0,r.getEffectiveHtmlLabels)(s)){let t=y.children[0],e=(0,o.select)(y);k=t.getBoundingClientRect(),e.attr("width",k.width),e.attr("height",k.height)}let _=0*e.padding,b=(e.width<=k.width+e.padding?k.width+e.padding:e.width)+_;e.width<=k.width+e.padding?e.diff=(b-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height+_,x=e.height+_-k.height-6,j=e.x-b/2,C=e.y-v/2;e.width=b;let L=e.y-e.height/2-_/2+k.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),s=d.default.svg(f),r=e.rx||e.ry?s.path((0,a.createRoundedRectPathD)(j,C,b,v,10),{roughness:.7,fill:g,fillStyle:"solid",stroke:u,seed:n}):s.rectangle(j,C,b,v,{seed:n});i=f.insert(()=>r,":first-child");let l=s.rectangle(j,L,b,x,{fill:t?c:h,fillStyle:t?"hachure":"solid",stroke:u,seed:n});i=f.insert(()=>r,":first-child"),w=f.insert(()=>l)}else(i=p.insert("rect",":first-child")).attr("class","outer").attr("x",j).attr("y",C).attr("width",b).attr("height",v).attr("data-look",e.look),w.attr("class","inner").attr("x",j).attr("y",L).attr("width",b).attr("height",x);return m.attr("transform",`translate(${e.x-k.width/2}, ${C+1-3*!(0,r.getEffectiveHtmlLabels)(s)})`),e.height=i.node().getBBox().height,e.offsetX=0,e.offsetY=k.height-e.padding/2,e.labelBBox=k,e.intersect=function(t){return(0,a.intersect_rect_default)(e,t)},{cluster:f,labelBBox:k}},"roundedWithTitle"),f=(0,n.__name)(async(t,n)=>{let c;l.log.info("Creating subgraph rect for ",n.id,n);let h=(0,r.getConfig2)(),{themeVariables:g,handDrawnSeed:u}=h,{clusterBkg:f,clusterBorder:p}=g,{labelStyles:m,nodeStyles:w,borderStyles:y,backgroundStyles:k}=(0,i.styles2String)(n),_=t.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),b=(0,r.getEffectiveHtmlLabels)(h),v=_.insert("g").attr("class","cluster-label "),x=await (0,s.createText)(v,n.label,{style:n.labelStyle,useHtmlLabels:b,isNode:!0,width:n.width}),j=x.getBBox();if((0,r.getEffectiveHtmlLabels)(h)){let t=x.children[0],e=(0,o.select)(x);j=t.getBoundingClientRect(),e.attr("width",j.width),e.attr("height",j.height)}let C=n.width<=j.width+n.padding?j.width+n.padding:n.width;n.width<=j.width+n.padding?n.diff=(C-n.width)/2-n.padding:n.diff=-n.padding;let L=n.height,P=n.x-C/2,E=n.y-L/2;if(l.log.trace("Data ",n,JSON.stringify(n)),"handDrawn"===n.look){let t=d.default.svg(_),e=(0,i.userNodeOverrides)(n,{roughness:.7,fill:f,stroke:p,fillWeight:4,seed:u}),s=t.path((0,a.createRoundedRectPathD)(P,E,C,L,n.rx),e);(c=_.insert(()=>(l.log.debug("Rough node insert CXC",s),s),":first-child")).select("path:nth-child(2)").attr("style",y.join(";")),c.select("path").attr("style",k.join(";").replace("fill","stroke"))}else(c=_.insert("rect",":first-child")).attr("style",w).attr("rx",n.rx).attr("ry",n.ry).attr("x",P).attr("y",E).attr("width",C).attr("height",L);let{subGraphTitleTopMargin:N}=(0,e.getSubGraphTitleMargins)(h);if(v.attr("transform",`translate(${n.x-j.width/2}, ${n.y-n.height/2+N})`),m){let t=v.select("span");t&&t.attr("style",m)}let q=c.node().getBBox();return n.offsetX=0,n.width=q.width,n.height=q.height,n.offsetY=j.height-n.padding/2,n.intersect=function(t){return(0,a.intersect_rect_default)(n,t)},{cluster:_,labelBBox:j}},"kanbanSection"),p={rect:h,squareRect:h,roundedWithTitle:u,noteGroup:g,divider:(0,n.__name)((t,e)=>{let i,{themeVariables:s,handDrawnSeed:l}=(0,r.getConfig2)(),{nodeBorder:n}=s,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),c=o.insert("g",":first-child"),h=0*e.padding,g=e.width+h;e.diff=-e.padding;let u=e.height+h,f=e.x-g/2,p=e.y-u/2;if(e.width=g,"handDrawn"===e.look){let t=d.default.svg(o).rectangle(f,p,g,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:l});i=o.insert(()=>t,":first-child")}else{i=c.insert("rect",":first-child");let t="outer";e.look,t="divider",i.attr("class",t).attr("x",f).attr("y",p).attr("width",g).attr("height",u).attr("data-look",e.look)}return e.height=i.node().getBBox().height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return(0,a.intersect_rect_default)(e,t)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:f,swimlane:c},m=new Map,w=(0,n.__name)(async(t,e)=>{let a=e.shape||"rect",i=await p[a](t,e);return m.set(e.id,i),i},"insertCluster"),y=(0,n.__name)(()=>{m=new Map},"clear");t.s(["clear",0,y,"insertCluster",0,w])},121292,t=>{"use strict";var e=t.i(369110),a=t.i(382793),i=t.i(502056),s=t.i(217248),r=t.i(447804),l=t.i(60231),n=t.i(508324),o=t.i(419524),d={common:l.common_default,getConfig:l.getConfig,insertCluster:e.insertCluster,insertEdge:a.insertEdge,insertEdgeLabel:a.insertEdgeLabel,insertMarkers:a.markers_default,insertNode:i.insertNode,interpolateToCurve:r.interpolateToCurve,labelHelper:s.labelHelper,log:n.log,positionEdgeLabel:a.positionEdgeLabel},c={},h=(0,o.__name)(t=>{for(let e of t)c[e.name]=e},"registerLayoutLoaders");(0,o.__name)(()=>{h([{name:"dagre",loader:(0,o.__name)(async()=>await t.A(555153),"loader")},{name:"swimlane",loader:(0,o.__name)(async()=>await t.A(12782),"loader")},{name:"cose-bilkent",loader:(0,o.__name)(async()=>await t.A(208503),"loader")}])},"registerDefaultLayoutLoaders")();var g=(0,o.__name)(async(t,e)=>{if(!(t.layoutAlgorithm in c))throw Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(let e of t.nodes){let a=e.domId||e.id;e.domId=`${t.diagramId}-${a}`}let a=c[t.layoutAlgorithm],i=await a.loader(),{theme:s,themeVariables:r}=t.config,{useGradient:l,gradientStart:n,gradientStop:o}=r,h=e.attr("id");if(e.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),e.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),l){let t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",o).attr("stop-opacity",1)}return i.render(t,e,d,{algorithm:a.algorithm})},"render"),u=(0,o.__name)((t="",{fallback:e="dagre"}={})=>{if(t in c)return t;if(e in c)return n.log.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm");t.s(["getRegisteredLayoutAlgorithm",0,u,"registerLayoutLoaders",0,h,"render",0,g])},110338,t=>{t.v(e=>Promise.all(["static/chunks/2gocl3dq0_h1s.js","static/chunks/2itcfm_igcz5x.js"].map(e=>t.l(e))).then(()=>e(59618)))},4699,t=>{t.v(e=>Promise.all(["static/chunks/01xjer0i_e5z5.js","static/chunks/2itcfm_igcz5x.js"].map(e=>t.l(e))).then(()=>e(595016)))},208503,t=>{t.v(e=>Promise.all(["static/chunks/0vhltcpdssl3-.js","static/chunks/2qe97b2xjvm_s.js"].map(e=>t.l(e))).then(()=>e(752312)))},342649,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/1g6hadfcoz4ag.js"].map(e=>t.l(e))).then(()=>e(447429)))},555153,t=>{t.v(e=>Promise.all(["static/chunks/16mzcd_gvdgbo.js","static/chunks/3lx-n8v_8u7og.js"].map(e=>t.l(e))).then(()=>e(921789)))},121563,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/221-n1wtpkus8.js"].map(e=>t.l(e))).then(()=>e(52278)))},775281,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/3oif9bymgqjgd.js"].map(e=>t.l(e))).then(()=>e(75306)))},840094,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/3mjwob-a5hhwz.js"].map(e=>t.l(e))).then(()=>e(958133)))},806739,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/266qo7h19xz_m.js"].map(e=>t.l(e))).then(()=>e(486182)))},725135,t=>{t.v(e=>Promise.all(["static/chunks/25pfy8u3vc_bn.js","static/chunks/2qq7e47gpyc_e.js"].map(e=>t.l(e))).then(()=>e(271981)))},257999,t=>{t.v(e=>Promise.all(["static/chunks/1kg8hnvdsweku.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/1kzq0rdlu1v0j.js"].map(e=>t.l(e))).then(()=>e(954776)))},126038,t=>{t.v(e=>Promise.all(["static/chunks/1wrwqqt23_cqy.js"].map(e=>t.l(e))).then(()=>e(868948)))},299022,t=>{t.v(e=>Promise.all(["static/chunks/025bmrgeukcb2.js","static/chunks/2b4v6n9b8htrv.js"].map(e=>t.l(e))).then(()=>e(595502)))},216587,t=>{t.v(e=>Promise.all(["static/chunks/1ztlt8o8gnas8.js","static/chunks/04e-e--5lk26x.js"].map(e=>t.l(e))).then(()=>e(222024)))},405760,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/1rh4z578p-h1a.js"].map(e=>t.l(e))).then(()=>e(896515)))},937084,t=>{t.v(e=>Promise.all(["static/chunks/09nk4rn1z6j8b.js","static/chunks/2qq7e47gpyc_e.js"].map(e=>t.l(e))).then(()=>e(722875)))},223045,t=>{t.v(e=>Promise.all(["static/chunks/0x7n81v2cw92f.js"].map(e=>t.l(e))).then(()=>e(239077)))},104423,t=>{t.v(e=>Promise.all(["static/chunks/0oyz95sujd2c7.js"].map(e=>t.l(e))).then(()=>e(547384)))},847615,t=>{t.v(e=>Promise.all(["static/chunks/3s-zbm7kxc46y.js"].map(e=>t.l(e))).then(()=>e(980953)))},265584,t=>{t.v(e=>Promise.all(["static/chunks/3lnrl25cwsoyk.js"].map(e=>t.l(e))).then(()=>e(582576)))},121612,t=>{t.v(e=>Promise.all(["static/chunks/1-axl1a1s8xi7.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/1kzq0rdlu1v0j.js"].map(e=>t.l(e))).then(()=>e(724854)))},761201,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/38h4_u_fq6ose.js"].map(e=>t.l(e))).then(()=>e(537834)))},480988,t=>{t.v(e=>Promise.all(["static/chunks/0dhmf6y59xjoo.js"].map(e=>t.l(e))).then(()=>e(713179)))},780947,t=>{t.v(e=>Promise.all(["static/chunks/3r7r2d2yc93-y.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/1kzq0rdlu1v0j.js"].map(e=>t.l(e))).then(()=>e(354077)))},775900,t=>{t.v(e=>Promise.all(["static/chunks/14osgsp3aiqpz.js"].map(e=>t.l(e))).then(()=>e(207851)))},650519,t=>{t.v(e=>Promise.all(["static/chunks/3peltyinql2qj.js"].map(e=>t.l(e))).then(()=>e(621500)))},654159,t=>{t.v(e=>Promise.all(["static/chunks/2o4dndk0d68do.js","static/chunks/1u5i-jti87jbo.js"].map(e=>t.l(e))).then(()=>e(801891)))},483976,t=>{t.v(e=>Promise.all(["static/chunks/0p54qye85am3w.js"].map(e=>t.l(e))).then(()=>e(122015)))},99530,t=>{t.v(e=>Promise.all(["static/chunks/0u9ae9k_2g7k3.js","static/chunks/3lx-n8v_8u7og.js","static/chunks/3her9o9_qn46y.js"].map(e=>t.l(e))).then(()=>e(757018)))},633604,t=>{t.v(e=>Promise.all(["static/chunks/2sdwbfs1x5skp.js","static/chunks/3her9o9_qn46y.js"].map(e=>t.l(e))).then(()=>e(196572)))},12782,t=>{t.v(e=>Promise.all(["static/chunks/0_l0vn2teso0z.js"].map(e=>t.l(e))).then(()=>e(619325)))},868278,t=>{t.v(e=>Promise.all(["static/chunks/2m267diam_vib.js","static/chunks/2b4v6n9b8htrv.js"].map(e=>t.l(e))).then(()=>e(557786)))},9691,t=>{t.v(e=>Promise.all(["static/chunks/2udhdtq_z8488.js"].map(e=>t.l(e))).then(()=>e(254768)))},539575,t=>{t.v(e=>Promise.all(["static/chunks/0si45yj1su8y7.js"].map(e=>t.l(e))).then(()=>e(263487)))},85919,t=>{t.v(e=>Promise.all(["static/chunks/3n80kknp-eoi9.js","static/chunks/2qq7e47gpyc_e.js","static/chunks/02slxciv9jt1p.js"].map(e=>t.l(e))).then(()=>e(353883)))},437446,t=>{t.v(e=>Promise.all(["static/chunks/2v_t22-0u_seu.js","static/chunks/0m-pl93u72hp9.js"].map(e=>t.l(e))).then(()=>e(819125)))}]);
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evoscientist/webui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Web UI for EvoScientist — a self-evolving AI scientist built on DeepAgents/LangGraph.",
|
|
5
5
|
"author": "Xi Zhang <zacharyzhang2022@gmail.com>",
|
|
6
6
|
"type": "module",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"@langchain/core": "1.1.49",
|
|
56
56
|
"@langchain/langgraph-sdk": "1.9.25",
|
|
57
57
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
58
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
58
59
|
"@radix-ui/react-label": "^2.1.8",
|
|
59
60
|
"@radix-ui/react-scroll-area": "^1.2.9",
|
|
60
61
|
"@radix-ui/react-select": "^2.2.6",
|
|
61
62
|
"@radix-ui/react-slot": "^1.2.4",
|
|
62
63
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
63
|
-
"@types/uuid": "^9.0.8",
|
|
64
64
|
"class-variance-authority": "^0.7.1",
|
|
65
65
|
"clsx": "^1.2.1",
|
|
66
66
|
"katex": "^0.16.47",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"react-dom": "19.1.0",
|
|
73
73
|
"react-markdown": "^9.0.1",
|
|
74
74
|
"react-resizable-panels": "^3.0.6",
|
|
75
|
-
"react-syntax-highlighter": "^
|
|
75
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
76
76
|
"rehype-katex": "^7.0.1",
|
|
77
77
|
"rehype-raw": "^7.0.0",
|
|
78
78
|
"rehype-sanitize": "^6.0.0",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"swr": "^2.4.1",
|
|
83
83
|
"tailwind-merge": "^2.6",
|
|
84
84
|
"use-stick-to-bottom": "^1.1.6",
|
|
85
|
-
"uuid": "^
|
|
85
|
+
"uuid": "^14.0.2"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@eslint/js": "^9",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evoscientist/webui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Web UI for EvoScientist — a self-evolving AI scientist built on DeepAgents/LangGraph.",
|
|
5
5
|
"author": "Xi Zhang <zacharyzhang2022@gmail.com>",
|
|
6
6
|
"type": "module",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"@langchain/core": "1.1.49",
|
|
56
56
|
"@langchain/langgraph-sdk": "1.9.25",
|
|
57
57
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
58
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
58
59
|
"@radix-ui/react-label": "^2.1.8",
|
|
59
60
|
"@radix-ui/react-scroll-area": "^1.2.9",
|
|
60
61
|
"@radix-ui/react-select": "^2.2.6",
|
|
61
62
|
"@radix-ui/react-slot": "^1.2.4",
|
|
62
63
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
63
|
-
"@types/uuid": "^9.0.8",
|
|
64
64
|
"class-variance-authority": "^0.7.1",
|
|
65
65
|
"clsx": "^1.2.1",
|
|
66
66
|
"katex": "^0.16.47",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"react-dom": "19.1.0",
|
|
73
73
|
"react-markdown": "^9.0.1",
|
|
74
74
|
"react-resizable-panels": "^3.0.6",
|
|
75
|
-
"react-syntax-highlighter": "^
|
|
75
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
76
76
|
"rehype-katex": "^7.0.1",
|
|
77
77
|
"rehype-raw": "^7.0.0",
|
|
78
78
|
"rehype-sanitize": "^6.0.0",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"swr": "^2.4.1",
|
|
83
83
|
"tailwind-merge": "^2.6",
|
|
84
84
|
"use-stick-to-bottom": "^1.1.6",
|
|
85
|
-
"uuid": "^
|
|
85
|
+
"uuid": "^14.0.2"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@eslint/js": "^9",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
module.exports=[254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},854032,e=>{"use strict";var t=e.i(89171),r=e.i(904937);async function a(e){try{let a="1"===e.nextUrl.searchParams.get("refresh"),i=await (0,r.getCatalog)(a);return t.NextResponse.json({skills:i})}catch(e){return t.NextResponse.json({error:e instanceof Error?e.message:"Failed to load the skills catalog."},{status:502})}}e.s(["GET",0,a,"runtime",0,"nodejs"])},863384,e=>{"use strict";var t=e.i(747909),r=e.i(174017),a=e.i(996250),i=e.i(759756),n=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),c=e.i(487718),u=e.i(995169),d=e.i(47587),p=e.i(666012),h=e.i(570101),m=e.i(626937),f=e.i(10372),w=e.i(193695);e.i(52474);var v=e.i(600220);let x=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/skills/catalog/route",pathname:"/api/skills/catalog",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/skills/catalog/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(854032),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:y,serverHooks:R}=x;async function E(e,t,a){a.requestMeta&&(0,i.setRequestMeta)(e,a.requestMeta),x.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/skills/catalog/route";g=g.replace(/\/index$/,"")||"/";let y=await x.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:R,deploymentId:E,params:k,nextConfig:b,parsedUrl:$,isDraftMode:C,prerenderManifest:S,routerServerContext:A,isOnDemandRevalidate:j,revalidateOnlyGenerated:T,resolvedPathname:I,clientReferenceManifest:N,serverActionsManifest:q}=y,P=(0,o.normalizeAppPath)(g),_=!!(S.dynamicRoutes[P]||S.routes[I]),O=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,$,!1):t.end("This page could not be found"),null);if(_&&!C){let e=!!S.routes[I],t=S.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await O();throw new w.NoFallbackError}}let U=null;!_||x.isDev||C||(U="/index"===(U=I)?"/":U);let D=!0===x.isDev||!_,H=_&&!D;q&&N&&(0,s.setManifestsSingleton)({page:g,clientReferenceManifest:N,serverActionsManifest:q});let M=e.method||"GET",F=(0,n.getTracer)(),L=F.getActiveScopeSpan(),K=!!(null==A?void 0:A.isWrappedByNextServer),W=!!(0,i.getRequestMeta)(e,"minimalMode"),B=(0,i.getRequestMeta)(e,"incrementalCache")||await x.getIncrementalCache(e,b,S,W);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let G={params:k,previewProps:S.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts,useCacheTimeout:b.experimental.useCacheTimeout},cacheComponents:!!b.cacheComponents,validationLevel:b.experimental.instantInsights.validationLevel,supportsDynamicResponse:D,incrementalCache:B,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:b.cacheLife,staticPageGenerationTimeout:b.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,i)=>x.onRequestError(e,t,a,i,A)},sharedContext:{buildId:R,deploymentId:E}},z=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),Z=c.NextRequestAdapter.fromNodeNextRequest(z,(0,c.signalFromNodeResponse)(t)),X=async({previousCacheEntry:r})=>{try{if(!W&&j&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await x.handle(Z,G);e.fetchMetrics=G.renderOpts.fetchMetrics;let n=G.renderOpts.pendingWaitUntil;n&&a.waitUntil&&(a.waitUntil(n),n=void 0);let s=G.renderOpts.collectedTags;if(!_)return await (0,p.sendResponse)(z,V,i,n),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);s&&(t[f.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?!1!==r&&r>0?b.expireTime:void 0:G.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await x.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:j})},!1,A),t}},J=async(i,s)=>{try{var o,l;let i=await x.handleResponse({req:e,nextConfig:b,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:j,revalidateOnlyGenerated:T,responseGenerator:X,waitUntil:a.waitUntil,isMinimalMode:W});if(!_)return;if((null==i||null==(o=i.value)?void 0:o.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});W||t.setHeader("x-nextjs-cache",j?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,h.fromNodeOutgoingHttpHeaders)(i.value.headers);W&&_||n.delete(f.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,m.getCacheControlHeader)(i.cacheControl)),await (0,p.sendResponse)(z,V,new Response(i.value.body,{headers:n,status:i.value.status||200}));return}catch(t){if(t instanceof w.NoFallbackError||await x.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:j})},!1,A),_)throw t;await (0,p.sendResponse)(z,V,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:n.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||P,o=`${M} ${a}`;i.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),i.updateName(o),s&&s!==i&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(K&&L)await J(L,void 0);else{let t=F.getActiveScopeSpan();await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${g}`,kind:n.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},e=>J(e,t)),void 0,!K)}}e.s(["handler",0,E,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:y})},"routeModule",0,x,"serverHooks",0,R,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,y])},904937,e=>{"use strict";let t;var r=e.i(446786),a=e.i(814747),i=e.i(522734),n=e.i(254799);let s="EvoScientist/EvoSkills",o="main",l="skills/",c=(0,a.join)((t=process.env.EVOSCIENTIST_DATA_DIR)&&t.trim()?t.startsWith("~")?(0,a.join)((0,r.homedir)(),t.slice(1)):(0,a.resolve)(t):(0,a.join)((0,r.homedir)(),".evoscientist"),"skills"),u=[c,(0,a.join)((0,r.homedir)(),".config","evoscientist","skills")],d={Accept:"application/vnd.github+json","User-Agent":"evoscientist-webui"};function p(e){return e.length<=128&&/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(e)&&!e.includes("..")}function h(e){let t=e.match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n|$)/);return t?{frontmatter:t[1],body:e.slice(t[0].length).trim()}:{frontmatter:null,body:e.trim()}}function m(e){let t=t=>{let r=e.match(RegExp(`^${t}\\s*:\\s*(.+?)\\s*$`,"m"));return r?r[1].replace(/^["']|["']$/g,"").trim():void 0};return{name:t("name"),description:t("description"),version:function(e){let t=e.match(/^metadata\s*:[ \t]*\n((?:[ \t]+.*(?:\n|$))*)/m);if(!t)return;let r=t[1].match(/^[ \t]+version\s*:\s*(.+?)\s*$/m);return r?r[1].replace(/^["']|["']$/g,"").trim():void 0}(e)}}function f(e){let{frontmatter:t}=h(e);return t?m(t):{}}async function w(e){for(let t of u)try{let r=await i.promises.readFile((0,a.join)(t,e,"SKILL.md"),"utf-8"),n=f(r).version;if(n)return n}catch{}}function v(e,t){return`https://raw.githubusercontent.com/${s}/${e}/${t}`}let x=/^[0-9a-f]{7,40}$/,g=null;async function y(){try{let e=await fetch(`https://api.github.com/repos/${s}/commits/${o}`,{headers:d});if(e.ok){let t=await e.json();if("string"==typeof t.sha&&x.test(t.sha))return t.sha}}catch{}return o}async function R(e=!1){if(!e&&g&&Date.now()-g.at<3e5)return{ref:g.ref,tree:g.tree};let t=await y(),r=await fetch(`https://api.github.com/repos/${s}/git/trees/${t}?recursive=1`,{headers:d});if(!r.ok)throw Error(403===r.status?"GitHub rate limit reached — try again in a minute.":`Couldn't reach the skills catalog (GitHub ${r.status}).`);let a=await r.json();if(!Array.isArray(a.tree))throw Error("Unexpected response from the skills catalog.");return g={at:Date.now(),ref:t,tree:a.tree},{ref:t,tree:a.tree}}function E(){return(0,a.join)(c,".installed.yaml")}async function k(){try{return function(e){let t={},r=null;for(let a of e.split("\n"))if(!(!a.trim()||a.trimStart().startsWith("#"))){if(/^\S/.test(a)){let e=a.match(/^(\S[^:]*?):\s*$/);(r=e?e[1].trim():null)&&(t[r]={source:""})}else if(r){let e=a.match(/^\s+([A-Za-z_]+)\s*:\s*(.+?)\s*$/);if(e){let a=e[2].replace(/^["']|["']$/g,"").trim();"source"===e[1]?t[r].source=a:"commit"===e[1]&&(t[r].commit=a)}}}for(let e of Object.keys(t))t[e].source||delete t[e];return t}(await i.promises.readFile(E(),"utf-8"))}catch{return{}}}async function b(e){let t=E(),r=`${t}.${(0,n.randomUUID)()}.tmp`;await i.promises.mkdir(c,{recursive:!0}),await i.promises.writeFile(r,function(e){let t=Object.keys(e).sort();if(0===t.length)return"{}\n";let r="";for(let a of t)r+=`${a}:
|
|
2
|
-
`,e[a].commit&&(r+=` commit: ${e[a].commit}
|
|
3
|
-
`),r+=` source: ${e[a].source}
|
|
4
|
-
`;return r}(e),{mode:384}),await i.promises.rename(r,t)}async function $(e,t){let r=await k(),a=`${s}@${l}${e}`;r[e]=t?{source:a,commit:t}:{source:a},await b(r)}async function C(e){let t=await k();e in t&&(delete t[e],await b(t))}async function S(){let e=new Set;for(let t of u)try{for(let r of(await i.promises.readdir(t,{withFileTypes:!0})))r.isDirectory()&&!r.name.startsWith(".")&&e.add(r.name)}catch{}return e}async function A(e=!1){let[{ref:t,tree:r},a]=await Promise.all([R(e),S()]),i=function(e){let t=new Map;for(let r of e){if("blob"!==r.type||!r.path.startsWith(l))continue;let e=r.path.slice(l.length),a=e.indexOf("/");if(a<=0)continue;let i=e.slice(0,a);(t.get(i)??t.set(i,[]).get(i)).push(r)}return t}(r);return(await Promise.all([...i.entries()].map(async([e,r])=>{let i,n=e,s="",o=r.find(t=>t.path===`${l}${e}/SKILL.md`);if(o)try{let r=await fetch(v(t,o.path),{headers:d}).then(e=>e.ok?e.text():""),a=f(r);n=a.name||e,s=a.description||"",i=a.version}catch{}let c=a.has(e),u=c?await w(e):void 0,p=c&&!!i&&!!u&&function(e,t){let r=e.split(".").map(e=>parseInt(e,10)),a=t.split(".").map(e=>parseInt(e,10)),i=Math.max(r.length,a.length);for(let e=0;e<i;e+=1){let t=r[e]??0,i=a[e]??0;if(Number.isNaN(t)||Number.isNaN(i))break;if(t!==i)return t>i?1:-1}return 0}(i,u)>0;return{name:e,title:n,description:s,fileCount:r.length,installed:c,latestVersion:i,installedVersion:u,updateAvailable:p}}))).sort((e,t)=>e.title.localeCompare(t.title))}async function j(e){let t;if(!p(e))throw Error("Invalid skill name.");let r=!1;for(let n of u)try{let s=await i.promises.realpath((0,a.join)(n,e,"SKILL.md")),o=await i.promises.realpath(n);if(s!==o&&!s.startsWith(o+a.sep))continue;t=await i.promises.readFile(s,"utf-8"),r=!0;break}catch{}if(void 0===t){let{ref:r,tree:a}=await R(),i=a.find(t=>"blob"===t.type&&t.path===`${l}${e}/SKILL.md`);if(!i)throw Error(`Skill "${e}" was not found.`);let n=await fetch(v(r,i.path),{headers:d});if(!n.ok)throw Error(`Failed to load skill (${n.status}).`);t=await n.text()}let{frontmatter:n,body:s}=h(t),o=n?m(n):{},c=null!==n&&(null!=o.name||null!=o.description||null!=o.version);return{name:e,title:o.name||e,description:o.description||"",version:o.version,body:c?s:t.trim(),installed:r}}async function T(e){if(!p(e))throw Error("Invalid skill name.");let{ref:t,tree:r}=await R(),s=`${l}${e}/`,u=r.filter(e=>"blob"===e.type&&e.path.startsWith(s));if(0===u.length)throw Error(`Skill "${e}" was not found in the catalog.`);if(u.length>300)throw Error("This skill has too many files to install.");if(u.reduce((e,t)=>e+(t.size??0),0)>0x1900000)throw Error("This skill is too large to install.");let h=(0,a.resolve)(c),m=(0,a.resolve)(h,e);if(m!==(0,a.join)(h,e))throw Error("Invalid skill name.");let f=(0,a.join)(h,`.installing-${e}-${(0,n.randomUUID)()}`);try{for(let e of(await i.promises.mkdir(f,{recursive:!0}),u)){let r=e.path.slice(s.length),n=(0,a.resolve)(f,r);if(n!==f&&!n.startsWith(f+a.sep))throw Error("Invalid file path in skill.");let o=await fetch(v(t,e.path),{headers:d});if(!o.ok)throw Error(`Failed to download ${r} (${o.status}).`);let l=Buffer.from(await o.arrayBuffer());await i.promises.mkdir((0,a.dirname)(n),{recursive:!0}),await i.promises.writeFile(n,l)}await i.promises.rm(m,{recursive:!0,force:!0}),await i.promises.mkdir(h,{recursive:!0}),await i.promises.rename(f,m)}catch(e){throw await i.promises.rm(f,{recursive:!0,force:!0}).catch(()=>{}),e}try{await $(e,t!==o&&x.test(t)?t:null)}catch{}return{files:u.length}}e.s(["SKILL_DIRS",0,u,"getCatalog",0,A,"getSkillDetail",0,j,"installSkill",0,T,"isValidSkillName",0,p,"recordUninstall",0,C])}];
|
|
5
|
-
|
|
6
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0jsq76h._.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
module.exports=[254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},915908,e=>{"use strict";var t=e.i(89171),r=e.i(904937),i=e.i(17883);async function a(e){try{if((0,i.isCrossOrigin)(e))return t.NextResponse.json({error:"Cross-origin installs are not allowed."},{status:403});let a=await e.json().catch(()=>null),s=a?.name;if("string"!=typeof s||!s)return t.NextResponse.json({error:"Missing skill name."},{status:400});let n=await (0,r.installSkill)(s);return t.NextResponse.json({ok:!0,...n})}catch(e){return t.NextResponse.json({error:e instanceof Error?e.message:"Failed to install skill."},{status:400})}}e.s(["POST",0,a,"runtime",0,"nodejs"])},810900,e=>{"use strict";var t=e.i(747909),r=e.i(174017),i=e.i(996250),a=e.i(759756),s=e.i(561916),n=e.i(174677),o=e.i(869741),l=e.i(316795),c=e.i(487718),u=e.i(995169),p=e.i(47587),d=e.i(666012),h=e.i(570101),f=e.i(626937),m=e.i(10372),w=e.i(193695);e.i(52474);var v=e.i(600220);let g=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/skills/install/route",pathname:"/api/skills/install",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/skills/install/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(915908),...{}}),{workAsyncStorage:y,workUnitAsyncStorage:x,serverHooks:E}=g;async function R(e,t,i){i.requestMeta&&(0,a.setRequestMeta)(e,i.requestMeta),g.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let y="/api/skills/install/route";y=y.replace(/\/index$/,"")||"/";let x=await g.prepare(e,t,{srcPage:y,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==i.waitUntil||i.waitUntil.call(i,Promise.resolve()),null;let{buildId:E,deploymentId:R,params:b,nextConfig:k,parsedUrl:S,isDraftMode:C,prerenderManifest:$,routerServerContext:A,isOnDemandRevalidate:j,revalidateOnlyGenerated:T,resolvedPathname:_,clientReferenceManifest:I,serverActionsManifest:N}=x,O=(0,o.normalizeAppPath)(y),P=!!($.dynamicRoutes[O]||$.routes[_]),q=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,S,!1):t.end("This page could not be found"),null);if(P&&!C){let e=!!$.routes[_],t=$.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(k.adapterPath)return await q();throw new w.NoFallbackError}}let D=null;!P||g.isDev||C||(D="/index"===(D=_)?"/":D);let U=!0===g.isDev||!P,M=P&&!U;N&&I&&(0,n.setManifestsSingleton)({page:y,clientReferenceManifest:I,serverActionsManifest:N});let F=e.method||"GET",H=(0,s.getTracer)(),L=H.getActiveScopeSpan(),W=!!(null==A?void 0:A.isWrappedByNextServer),K=!!(0,a.getRequestMeta)(e,"minimalMode"),B=(0,a.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,k,$,K);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let z={params:b,previewProps:$.preview,renderOpts:{experimental:{authInterrupts:!!k.experimental.authInterrupts,useCacheTimeout:k.experimental.useCacheTimeout},cacheComponents:!!k.cacheComponents,validationLevel:k.experimental.instantInsights.validationLevel,supportsDynamicResponse:U,incrementalCache:B,hmrRefreshHash:(0,a.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:k.cacheLife,staticPageGenerationTimeout:k.staticPageGenerationTimeout,waitUntil:i.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,i,a)=>g.onRequestError(e,t,i,a,A)},sharedContext:{buildId:E,deploymentId:R}},G=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),X=c.NextRequestAdapter.fromNodeNextRequest(G,(0,c.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:r})=>{try{if(!K&&j&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await g.handle(X,z);e.fetchMetrics=z.renderOpts.fetchMetrics;let s=z.renderOpts.pendingWaitUntil;s&&i.waitUntil&&(i.waitUntil(s),s=void 0);let n=z.renderOpts.collectedTags;if(!P)return await (0,d.sendResponse)(G,V,a,s),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);n&&(t[m.NEXT_CACHE_TAGS_HEADER]=n),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==z.renderOpts.collectedRevalidate&&!(z.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&z.renderOpts.collectedRevalidate,i=void 0===z.renderOpts.collectedExpire||z.renderOpts.collectedExpire>=m.INFINITE_CACHE?!1!==r&&r>0?k.expireTime:void 0:z.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:i}}}}catch(t){throw(null==r?void 0:r.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:y,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:j})},!1,A),t}},J=async(a,n)=>{try{var o,l;let a=await g.handleResponse({req:e,nextConfig:k,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:$,isRoutePPREnabled:!1,isOnDemandRevalidate:j,revalidateOnlyGenerated:T,responseGenerator:Z,waitUntil:i.waitUntil,isMinimalMode:K});if(!P)return;if((null==a||null==(o=a.value)?void 0:o.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==a||null==(l=a.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",j?"REVALIDATED":a.isMiss?"MISS":a.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,h.fromNodeOutgoingHttpHeaders)(a.value.headers);K&&P||s.delete(m.NEXT_CACHE_TAGS_HEADER),!a.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,f.getCacheControlHeader)(a.cacheControl)),await (0,d.sendResponse)(G,V,new Response(a.value.body,{headers:s,status:a.value.status||200}));return}catch(t){if(t instanceof w.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:j})},!1,A),P)throw t;await (0,d.sendResponse)(G,V,new Response(null,{status:500}));return}finally{(()=>{if(!a)return;let e=t.statusCode;a.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(a.setStatus({code:s.SpanStatusCode.ERROR}),a.setAttribute("error.type",e.toString()));let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let i=r.get("next.route")||O,o=`${F} ${i}`;a.setAttributes({"next.route":i,"http.route":i,"next.span_name":o}),a.updateName(o),n&&n!==a&&(n.setAttribute("http.route",i),n.updateName(o))})()}};if(W&&L)await J(L,void 0);else{let t=H.getActiveScopeSpan();await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${F} ${y}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>J(e,t)),void 0,!W)}}e.s(["handler",0,R,"patchFetch",0,function(){return(0,i.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:x})},"routeModule",0,g,"serverHooks",0,E,"workAsyncStorage",0,y,"workUnitAsyncStorage",0,x])},904937,e=>{"use strict";let t;var r=e.i(446786),i=e.i(814747),a=e.i(522734),s=e.i(254799);let n="EvoScientist/EvoSkills",o="main",l="skills/",c=(0,i.join)((t=process.env.EVOSCIENTIST_DATA_DIR)&&t.trim()?t.startsWith("~")?(0,i.join)((0,r.homedir)(),t.slice(1)):(0,i.resolve)(t):(0,i.join)((0,r.homedir)(),".evoscientist"),"skills"),u=[c,(0,i.join)((0,r.homedir)(),".config","evoscientist","skills")],p={Accept:"application/vnd.github+json","User-Agent":"evoscientist-webui"};function d(e){return e.length<=128&&/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(e)&&!e.includes("..")}function h(e){let t=e.match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n|$)/);return t?{frontmatter:t[1],body:e.slice(t[0].length).trim()}:{frontmatter:null,body:e.trim()}}function f(e){let t=t=>{let r=e.match(RegExp(`^${t}\\s*:\\s*(.+?)\\s*$`,"m"));return r?r[1].replace(/^["']|["']$/g,"").trim():void 0};return{name:t("name"),description:t("description"),version:function(e){let t=e.match(/^metadata\s*:[ \t]*\n((?:[ \t]+.*(?:\n|$))*)/m);if(!t)return;let r=t[1].match(/^[ \t]+version\s*:\s*(.+?)\s*$/m);return r?r[1].replace(/^["']|["']$/g,"").trim():void 0}(e)}}function m(e){let{frontmatter:t}=h(e);return t?f(t):{}}async function w(e){for(let t of u)try{let r=await a.promises.readFile((0,i.join)(t,e,"SKILL.md"),"utf-8"),s=m(r).version;if(s)return s}catch{}}function v(e,t){return`https://raw.githubusercontent.com/${n}/${e}/${t}`}let g=/^[0-9a-f]{7,40}$/,y=null;async function x(){try{let e=await fetch(`https://api.github.com/repos/${n}/commits/${o}`,{headers:p});if(e.ok){let t=await e.json();if("string"==typeof t.sha&&g.test(t.sha))return t.sha}}catch{}return o}async function E(e=!1){if(!e&&y&&Date.now()-y.at<3e5)return{ref:y.ref,tree:y.tree};let t=await x(),r=await fetch(`https://api.github.com/repos/${n}/git/trees/${t}?recursive=1`,{headers:p});if(!r.ok)throw Error(403===r.status?"GitHub rate limit reached — try again in a minute.":`Couldn't reach the skills catalog (GitHub ${r.status}).`);let i=await r.json();if(!Array.isArray(i.tree))throw Error("Unexpected response from the skills catalog.");return y={at:Date.now(),ref:t,tree:i.tree},{ref:t,tree:i.tree}}function R(){return(0,i.join)(c,".installed.yaml")}async function b(){try{return function(e){let t={},r=null;for(let i of e.split("\n"))if(!(!i.trim()||i.trimStart().startsWith("#"))){if(/^\S/.test(i)){let e=i.match(/^(\S[^:]*?):\s*$/);(r=e?e[1].trim():null)&&(t[r]={source:""})}else if(r){let e=i.match(/^\s+([A-Za-z_]+)\s*:\s*(.+?)\s*$/);if(e){let i=e[2].replace(/^["']|["']$/g,"").trim();"source"===e[1]?t[r].source=i:"commit"===e[1]&&(t[r].commit=i)}}}for(let e of Object.keys(t))t[e].source||delete t[e];return t}(await a.promises.readFile(R(),"utf-8"))}catch{return{}}}async function k(e){let t=R(),r=`${t}.${(0,s.randomUUID)()}.tmp`;await a.promises.mkdir(c,{recursive:!0}),await a.promises.writeFile(r,function(e){let t=Object.keys(e).sort();if(0===t.length)return"{}\n";let r="";for(let i of t)r+=`${i}:
|
|
2
|
-
`,e[i].commit&&(r+=` commit: ${e[i].commit}
|
|
3
|
-
`),r+=` source: ${e[i].source}
|
|
4
|
-
`;return r}(e),{mode:384}),await a.promises.rename(r,t)}async function S(e,t){let r=await b(),i=`${n}@${l}${e}`;r[e]=t?{source:i,commit:t}:{source:i},await k(r)}async function C(e){let t=await b();e in t&&(delete t[e],await k(t))}async function $(){let e=new Set;for(let t of u)try{for(let r of(await a.promises.readdir(t,{withFileTypes:!0})))r.isDirectory()&&!r.name.startsWith(".")&&e.add(r.name)}catch{}return e}async function A(e=!1){let[{ref:t,tree:r},i]=await Promise.all([E(e),$()]),a=function(e){let t=new Map;for(let r of e){if("blob"!==r.type||!r.path.startsWith(l))continue;let e=r.path.slice(l.length),i=e.indexOf("/");if(i<=0)continue;let a=e.slice(0,i);(t.get(a)??t.set(a,[]).get(a)).push(r)}return t}(r);return(await Promise.all([...a.entries()].map(async([e,r])=>{let a,s=e,n="",o=r.find(t=>t.path===`${l}${e}/SKILL.md`);if(o)try{let r=await fetch(v(t,o.path),{headers:p}).then(e=>e.ok?e.text():""),i=m(r);s=i.name||e,n=i.description||"",a=i.version}catch{}let c=i.has(e),u=c?await w(e):void 0,d=c&&!!a&&!!u&&function(e,t){let r=e.split(".").map(e=>parseInt(e,10)),i=t.split(".").map(e=>parseInt(e,10)),a=Math.max(r.length,i.length);for(let e=0;e<a;e+=1){let t=r[e]??0,a=i[e]??0;if(Number.isNaN(t)||Number.isNaN(a))break;if(t!==a)return t>a?1:-1}return 0}(a,u)>0;return{name:e,title:s,description:n,fileCount:r.length,installed:c,latestVersion:a,installedVersion:u,updateAvailable:d}}))).sort((e,t)=>e.title.localeCompare(t.title))}async function j(e){let t;if(!d(e))throw Error("Invalid skill name.");let r=!1;for(let s of u)try{let n=await a.promises.realpath((0,i.join)(s,e,"SKILL.md")),o=await a.promises.realpath(s);if(n!==o&&!n.startsWith(o+i.sep))continue;t=await a.promises.readFile(n,"utf-8"),r=!0;break}catch{}if(void 0===t){let{ref:r,tree:i}=await E(),a=i.find(t=>"blob"===t.type&&t.path===`${l}${e}/SKILL.md`);if(!a)throw Error(`Skill "${e}" was not found.`);let s=await fetch(v(r,a.path),{headers:p});if(!s.ok)throw Error(`Failed to load skill (${s.status}).`);t=await s.text()}let{frontmatter:s,body:n}=h(t),o=s?f(s):{},c=null!==s&&(null!=o.name||null!=o.description||null!=o.version);return{name:e,title:o.name||e,description:o.description||"",version:o.version,body:c?n:t.trim(),installed:r}}async function T(e){if(!d(e))throw Error("Invalid skill name.");let{ref:t,tree:r}=await E(),n=`${l}${e}/`,u=r.filter(e=>"blob"===e.type&&e.path.startsWith(n));if(0===u.length)throw Error(`Skill "${e}" was not found in the catalog.`);if(u.length>300)throw Error("This skill has too many files to install.");if(u.reduce((e,t)=>e+(t.size??0),0)>0x1900000)throw Error("This skill is too large to install.");let h=(0,i.resolve)(c),f=(0,i.resolve)(h,e);if(f!==(0,i.join)(h,e))throw Error("Invalid skill name.");let m=(0,i.join)(h,`.installing-${e}-${(0,s.randomUUID)()}`);try{for(let e of(await a.promises.mkdir(m,{recursive:!0}),u)){let r=e.path.slice(n.length),s=(0,i.resolve)(m,r);if(s!==m&&!s.startsWith(m+i.sep))throw Error("Invalid file path in skill.");let o=await fetch(v(t,e.path),{headers:p});if(!o.ok)throw Error(`Failed to download ${r} (${o.status}).`);let l=Buffer.from(await o.arrayBuffer());await a.promises.mkdir((0,i.dirname)(s),{recursive:!0}),await a.promises.writeFile(s,l)}await a.promises.rm(f,{recursive:!0,force:!0}),await a.promises.mkdir(h,{recursive:!0}),await a.promises.rename(m,f)}catch(e){throw await a.promises.rm(m,{recursive:!0,force:!0}).catch(()=>{}),e}try{await S(e,t!==o&&g.test(t)?t:null)}catch{}return{files:u.length}}e.s(["SKILL_DIRS",0,u,"getCatalog",0,A,"getSkillDetail",0,j,"installSkill",0,T,"isValidSkillName",0,d,"recordUninstall",0,C])},17883,e=>{"use strict";var t=e.i(522734),r=e.i(446786),i=e.i(814747),a=e.i(254799);let s=(0,i.join)((0,r.homedir)(),".config","evoscientist","langgraph_dev.workspace.json");function n(e){for(let t=0;t<e.length;t+=1){let r=e.charCodeAt(t);if(r<32||127===r||r>=128&&r<=159||8232===r||8233===r)return!0}return!1}let o=new Set(["large_tool_results","conversation_history","__pycache__","node_modules","__MACOSX"]),l=[".pyc",".pyo"];function c(e){return!!(e.startsWith(".")||o.has(e))||l.some(t=>e.endsWith(t))}async function u(){let e;try{let r=JSON.parse(await t.promises.readFile(s,"utf-8")),i=r.workspace,a=r.pid;"string"==typeof i&&i.trim()&&(!("number"==typeof a&&a>0)||function(e){try{return process.kill(e,0),!0}catch(e){return"EPERM"===e.code}}(a))&&(e=i)}catch{}if(!(e||=process.env.EVOSCIENTIST_WORKSPACE_DIR))throw Error("No active EvoScientist workspace found. Start the backend with `EvoSci deploy` first.");let r=(0,i.resolve)(e);if(!(await t.promises.stat(r)).isDirectory())throw Error("The active EvoScientist workspace is not a directory.");return t.promises.realpath(r)}function p(e,t){if(n(t))throw Error("Invalid path.");let r=t.replaceAll("\\","/").replace(/^\/+/,"");if(r.split("/").some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");let a=(0,i.resolve)(e,r);if(a!==e&&!a.startsWith(e+i.sep))throw Error("Path is outside the workspace.");return a}async function d(e,r){let a,s=p(e,r);try{a=await t.promises.realpath(s)}catch{throw Error("Path is not accessible.")}if(a!==e&&!a.startsWith(e+i.sep))throw Error("Path is not accessible.");let n=(0,i.relative)(e,a);if(n&&n.split(i.sep).some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");return a}let h=new Set(["txt","text","md","markdown","log","csv","tsv","json","jsonl","yaml","yml","toml","xml","ini","cfg","conf","env","py","js","jsx","ts","tsx","sh","bash","zsh","r","jl","cpp","cc","c","h","hpp","java","go","rs","rb","php","swift","kt","cs","sql","tex","bib","rst","css","scss","html"]);async function f(e,r){let a;try{a=await t.promises.realpath((0,i.dirname)(r))}catch{throw Error("Path is not accessible.")}if(a!==e&&!a.startsWith(e+i.sep))throw Error("Path is not accessible.")}function m(e){let t;return h.has((t=e.lastIndexOf("."))>=0?e.slice(t+1).toLowerCase():"")}async function w(e,r,s){let n;if("string"!=typeof s)throw Error("Content must be a string.");if(Buffer.byteLength(s,"utf-8")>5242880)throw Error("This file is too large to save.");if(!m(r.replaceAll("\\","/").split("/").pop()||r))throw Error("Only text/code files can be edited.");let o=p(e,r);try{n=await t.promises.lstat(o)}catch{throw Error("Only files can be edited.")}if(n.isSymbolicLink())throw Error("Editing symlinks is not allowed.");let l=await d(e,r);if(!m((0,i.basename)(l)))throw Error("Only text/code files can be edited.");let c=await t.promises.stat(l);if(!c.isFile())throw Error("Only files can be edited.");let u=`${l}.${(0,a.randomUUID)()}.tmp`;try{await f(e,l),await t.promises.writeFile(u,s,{encoding:"utf-8",mode:511&c.mode}),await f(e,l),await t.promises.rename(u,l)}catch(e){throw await t.promises.rm(u,{force:!0}).catch(()=>{}),e}let h=await t.promises.stat(l);return{path:r.replaceAll("\\","/").replace(/^\/+/,""),size:h.size,mtime:h.mtimeMs}}async function v(e,r){await d(e,r);let i=p(e,r);if((await t.promises.lstat(i)).isDirectory())throw Error("Only files can be deleted.");await f(e,i),await t.promises.rm(i,{force:!0})}e.s(["MAX_WORKSPACE_WRITE_BYTES",0,5242880,"deleteWorkspaceFile",0,v,"getWorkspaceDir",0,u,"hasControlChar",0,n,"isCrossOrigin",0,function(e){let t=e.headers.get("host");if(!t)return!0;let r=e.headers.get("sec-fetch-site");if(r)return"same-origin"!==r&&"same-site"!==r&&"none"!==r;let i=e.headers.get("origin");if(!i)return!1;try{return new URL(i).host!==t}catch{return!0}},"isHiddenEntry",0,c,"safeResolve",0,d,"writeWorkspaceFile",0,w,"zipExcludeArgs",0,function(){let e=[".*","*/.*"];for(let t of o)e.push(`${t}/*`,`*/${t}/*`,t,`*/${t}`);for(let t of l)e.push(`*${t}`);return e.flatMap(e=>["-x",e])}])}];
|
|
5
|
-
|
|
6
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0k-rs5f._.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
module.exports=[254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},904937,e=>{"use strict";let t;var r=e.i(446786),i=e.i(814747),s=e.i(522734),a=e.i(254799);let n="EvoScientist/EvoSkills",o="main",l="skills/",c=(0,i.join)((t=process.env.EVOSCIENTIST_DATA_DIR)&&t.trim()?t.startsWith("~")?(0,i.join)((0,r.homedir)(),t.slice(1)):(0,i.resolve)(t):(0,i.join)((0,r.homedir)(),".evoscientist"),"skills"),u=[c,(0,i.join)((0,r.homedir)(),".config","evoscientist","skills")],p={Accept:"application/vnd.github+json","User-Agent":"evoscientist-webui"};function m(e){return e.length<=128&&/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(e)&&!e.includes("..")}function f(e){let t=e.match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n|$)/);return t?{frontmatter:t[1],body:e.slice(t[0].length).trim()}:{frontmatter:null,body:e.trim()}}function d(e){let t=t=>{let r=e.match(RegExp(`^${t}\\s*:\\s*(.+?)\\s*$`,"m"));return r?r[1].replace(/^["']|["']$/g,"").trim():void 0};return{name:t("name"),description:t("description"),version:function(e){let t=e.match(/^metadata\s*:[ \t]*\n((?:[ \t]+.*(?:\n|$))*)/m);if(!t)return;let r=t[1].match(/^[ \t]+version\s*:\s*(.+?)\s*$/m);return r?r[1].replace(/^["']|["']$/g,"").trim():void 0}(e)}}function h(e){let{frontmatter:t}=f(e);return t?d(t):{}}async function w(e){for(let t of u)try{let r=await s.promises.readFile((0,i.join)(t,e,"SKILL.md"),"utf-8"),a=h(r).version;if(a)return a}catch{}}function x(e,t){return`https://raw.githubusercontent.com/${n}/${e}/${t}`}let y=/^[0-9a-f]{7,40}$/,v=null;async function g(){try{let e=await fetch(`https://api.github.com/repos/${n}/commits/${o}`,{headers:p});if(e.ok){let t=await e.json();if("string"==typeof t.sha&&y.test(t.sha))return t.sha}}catch{}return o}async function $(e=!1){if(!e&&v&&Date.now()-v.at<3e5)return{ref:v.ref,tree:v.tree};let t=await g(),r=await fetch(`https://api.github.com/repos/${n}/git/trees/${t}?recursive=1`,{headers:p});if(!r.ok)throw Error(403===r.status?"GitHub rate limit reached — try again in a minute.":`Couldn't reach the skills catalog (GitHub ${r.status}).`);let i=await r.json();if(!Array.isArray(i.tree))throw Error("Unexpected response from the skills catalog.");return v={at:Date.now(),ref:t,tree:i.tree},{ref:t,tree:i.tree}}function k(){return(0,i.join)(c,".installed.yaml")}async function b(){try{return function(e){let t={},r=null;for(let i of e.split("\n"))if(!(!i.trim()||i.trimStart().startsWith("#"))){if(/^\S/.test(i)){let e=i.match(/^(\S[^:]*?):\s*$/);(r=e?e[1].trim():null)&&(t[r]={source:""})}else if(r){let e=i.match(/^\s+([A-Za-z_]+)\s*:\s*(.+?)\s*$/);if(e){let i=e[2].replace(/^["']|["']$/g,"").trim();"source"===e[1]?t[r].source=i:"commit"===e[1]&&(t[r].commit=i)}}}for(let e of Object.keys(t))t[e].source||delete t[e];return t}(await s.promises.readFile(k(),"utf-8"))}catch{return{}}}async function j(e){let t=k(),r=`${t}.${(0,a.randomUUID)()}.tmp`;await s.promises.mkdir(c,{recursive:!0}),await s.promises.writeFile(r,function(e){let t=Object.keys(e).sort();if(0===t.length)return"{}\n";let r="";for(let i of t)r+=`${i}:
|
|
2
|
-
`,e[i].commit&&(r+=` commit: ${e[i].commit}
|
|
3
|
-
`),r+=` source: ${e[i].source}
|
|
4
|
-
`;return r}(e),{mode:384}),await s.promises.rename(r,t)}async function S(e,t){let r=await b(),i=`${n}@${l}${e}`;r[e]=t?{source:i,commit:t}:{source:i},await j(r)}async function E(e){let t=await b();e in t&&(delete t[e],await j(t))}async function I(){let e=new Set;for(let t of u)try{for(let r of(await s.promises.readdir(t,{withFileTypes:!0})))r.isDirectory()&&!r.name.startsWith(".")&&e.add(r.name)}catch{}return e}async function q(e=!1){let[{ref:t,tree:r},i]=await Promise.all([$(e),I()]),s=function(e){let t=new Map;for(let r of e){if("blob"!==r.type||!r.path.startsWith(l))continue;let e=r.path.slice(l.length),i=e.indexOf("/");if(i<=0)continue;let s=e.slice(0,i);(t.get(s)??t.set(s,[]).get(s)).push(r)}return t}(r);return(await Promise.all([...s.entries()].map(async([e,r])=>{let s,a=e,n="",o=r.find(t=>t.path===`${l}${e}/SKILL.md`);if(o)try{let r=await fetch(x(t,o.path),{headers:p}).then(e=>e.ok?e.text():""),i=h(r);a=i.name||e,n=i.description||"",s=i.version}catch{}let c=i.has(e),u=c?await w(e):void 0,m=c&&!!s&&!!u&&function(e,t){let r=e.split(".").map(e=>parseInt(e,10)),i=t.split(".").map(e=>parseInt(e,10)),s=Math.max(r.length,i.length);for(let e=0;e<s;e+=1){let t=r[e]??0,s=i[e]??0;if(Number.isNaN(t)||Number.isNaN(s))break;if(t!==s)return t>s?1:-1}return 0}(s,u)>0;return{name:e,title:a,description:n,fileCount:r.length,installed:c,latestVersion:s,installedVersion:u,updateAvailable:m}}))).sort((e,t)=>e.title.localeCompare(t.title))}async function L(e){let t;if(!m(e))throw Error("Invalid skill name.");let r=!1;for(let a of u)try{let n=await s.promises.realpath((0,i.join)(a,e,"SKILL.md")),o=await s.promises.realpath(a);if(n!==o&&!n.startsWith(o+i.sep))continue;t=await s.promises.readFile(n,"utf-8"),r=!0;break}catch{}if(void 0===t){let{ref:r,tree:i}=await $(),s=i.find(t=>"blob"===t.type&&t.path===`${l}${e}/SKILL.md`);if(!s)throw Error(`Skill "${e}" was not found.`);let a=await fetch(x(r,s.path),{headers:p});if(!a.ok)throw Error(`Failed to load skill (${a.status}).`);t=await a.text()}let{frontmatter:a,body:n}=f(t),o=a?d(a):{},c=null!==a&&(null!=o.name||null!=o.description||null!=o.version);return{name:e,title:o.name||e,description:o.description||"",version:o.version,body:c?n:t.trim(),installed:r}}async function A(e){if(!m(e))throw Error("Invalid skill name.");let{ref:t,tree:r}=await $(),n=`${l}${e}/`,u=r.filter(e=>"blob"===e.type&&e.path.startsWith(n));if(0===u.length)throw Error(`Skill "${e}" was not found in the catalog.`);if(u.length>300)throw Error("This skill has too many files to install.");if(u.reduce((e,t)=>e+(t.size??0),0)>0x1900000)throw Error("This skill is too large to install.");let f=(0,i.resolve)(c),d=(0,i.resolve)(f,e);if(d!==(0,i.join)(f,e))throw Error("Invalid skill name.");let h=(0,i.join)(f,`.installing-${e}-${(0,a.randomUUID)()}`);try{for(let e of(await s.promises.mkdir(h,{recursive:!0}),u)){let r=e.path.slice(n.length),a=(0,i.resolve)(h,r);if(a!==h&&!a.startsWith(h+i.sep))throw Error("Invalid file path in skill.");let o=await fetch(x(t,e.path),{headers:p});if(!o.ok)throw Error(`Failed to download ${r} (${o.status}).`);let l=Buffer.from(await o.arrayBuffer());await s.promises.mkdir((0,i.dirname)(a),{recursive:!0}),await s.promises.writeFile(a,l)}await s.promises.rm(d,{recursive:!0,force:!0}),await s.promises.mkdir(f,{recursive:!0}),await s.promises.rename(h,d)}catch(e){throw await s.promises.rm(h,{recursive:!0,force:!0}).catch(()=>{}),e}try{await S(e,t!==o&&y.test(t)?t:null)}catch{}return{files:u.length}}e.s(["SKILL_DIRS",0,u,"getCatalog",0,q,"getSkillDetail",0,L,"installSkill",0,A,"isValidSkillName",0,m,"recordUninstall",0,E])}];
|
|
5
|
-
|
|
6
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0nn8czk._.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
module.exports=[254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(e,t,r)=>{t.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},713149,e=>{"use strict";var t=e.i(89171),r=e.i(904937);async function a(e){try{let a=e.nextUrl.searchParams.get("name");if(!a)return t.NextResponse.json({error:"Missing skill name."},{status:400});let i=await (0,r.getSkillDetail)(a);return t.NextResponse.json(i)}catch(e){return t.NextResponse.json({error:e instanceof Error?e.message:"Failed to load skill detail."},{status:400})}}e.s(["GET",0,a,"runtime",0,"nodejs"])},562441,e=>{"use strict";var t=e.i(747909),r=e.i(174017),a=e.i(996250),i=e.i(759756),n=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),c=e.i(995169),d=e.i(47587),p=e.i(666012),h=e.i(570101),m=e.i(626937),f=e.i(10372),w=e.i(193695);e.i(52474);var v=e.i(600220);let x=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/skills/detail/route",pathname:"/api/skills/detail",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/skills/detail/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(713149),...{}}),{workAsyncStorage:g,workUnitAsyncStorage:y,serverHooks:R}=x;async function E(e,t,a){a.requestMeta&&(0,i.setRequestMeta)(e,a.requestMeta),x.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/skills/detail/route";g=g.replace(/\/index$/,"")||"/";let y=await x.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:R,deploymentId:E,params:k,nextConfig:b,parsedUrl:$,isDraftMode:S,prerenderManifest:C,routerServerContext:A,isOnDemandRevalidate:j,revalidateOnlyGenerated:T,resolvedPathname:N,clientReferenceManifest:I,serverActionsManifest:q}=y,P=(0,o.normalizeAppPath)(g),_=!!(C.dynamicRoutes[P]||C.routes[N]),O=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,$,!1):t.end("This page could not be found"),null);if(_&&!S){let e=!!C.routes[N],t=C.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await O();throw new w.NoFallbackError}}let D=null;!_||x.isDev||S||(D="/index"===(D=N)?"/":D);let U=!0===x.isDev||!_,H=_&&!U;q&&I&&(0,s.setManifestsSingleton)({page:g,clientReferenceManifest:I,serverActionsManifest:q});let M=e.method||"GET",F=(0,n.getTracer)(),L=F.getActiveScopeSpan(),K=!!(null==A?void 0:A.isWrappedByNextServer),W=!!(0,i.getRequestMeta)(e,"minimalMode"),B=(0,i.getRequestMeta)(e,"incrementalCache")||await x.getIncrementalCache(e,b,C,W);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let G={params:k,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts,useCacheTimeout:b.experimental.useCacheTimeout},cacheComponents:!!b.cacheComponents,validationLevel:b.experimental.instantInsights.validationLevel,supportsDynamicResponse:U,incrementalCache:B,hmrRefreshHash:(0,i.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:b.cacheLife,staticPageGenerationTimeout:b.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,i)=>x.onRequestError(e,t,a,i,A)},sharedContext:{buildId:R,deploymentId:E}},z=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),Z=u.NextRequestAdapter.fromNodeNextRequest(z,(0,u.signalFromNodeResponse)(t)),X=async({previousCacheEntry:r})=>{try{if(!W&&j&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await x.handle(Z,G);e.fetchMetrics=G.renderOpts.fetchMetrics;let n=G.renderOpts.pendingWaitUntil;n&&a.waitUntil&&(a.waitUntil(n),n=void 0);let s=G.renderOpts.collectedTags;if(!_)return await (0,p.sendResponse)(z,V,i,n),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);s&&(t[f.NEXT_CACHE_TAGS_HEADER]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?!1!==r&&r>0?b.expireTime:void 0:G.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await x.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:j})},!1,A),t}},J=async(i,s)=>{try{var o,l;let i=await x.handleResponse({req:e,nextConfig:b,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:j,revalidateOnlyGenerated:T,responseGenerator:X,waitUntil:a.waitUntil,isMinimalMode:W});if(!_)return;if((null==i||null==(o=i.value)?void 0:o.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});W||t.setHeader("x-nextjs-cache",j?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,h.fromNodeOutgoingHttpHeaders)(i.value.headers);W&&_||n.delete(f.NEXT_CACHE_TAGS_HEADER),!i.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,m.getCacheControlHeader)(i.cacheControl)),await (0,p.sendResponse)(z,V,new Response(i.value.body,{headers:n,status:i.value.status||200}));return}catch(t){if(t instanceof w.NoFallbackError||await x.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:j})},!1,A),_)throw t;await (0,p.sendResponse)(z,V,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:n.SpanStatusCode.ERROR}),i.setAttribute("error.type",e.toString()));let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||P,o=`${M} ${a}`;i.setAttributes({"next.route":a,"http.route":a,"next.span_name":o}),i.updateName(o),s&&s!==i&&(s.setAttribute("http.route",a),s.updateName(o))})()}};if(K&&L)await J(L,void 0);else{let t=F.getActiveScopeSpan();await F.withPropagatedContext(e.headers,()=>F.trace(c.BaseServerSpan.handleRequest,{spanName:`${M} ${g}`,kind:n.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},e=>J(e,t)),void 0,!K)}}e.s(["handler",0,E,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:y})},"routeModule",0,x,"serverHooks",0,R,"workAsyncStorage",0,g,"workUnitAsyncStorage",0,y])},904937,e=>{"use strict";let t;var r=e.i(446786),a=e.i(814747),i=e.i(522734),n=e.i(254799);let s="EvoScientist/EvoSkills",o="main",l="skills/",u=(0,a.join)((t=process.env.EVOSCIENTIST_DATA_DIR)&&t.trim()?t.startsWith("~")?(0,a.join)((0,r.homedir)(),t.slice(1)):(0,a.resolve)(t):(0,a.join)((0,r.homedir)(),".evoscientist"),"skills"),c=[u,(0,a.join)((0,r.homedir)(),".config","evoscientist","skills")],d={Accept:"application/vnd.github+json","User-Agent":"evoscientist-webui"};function p(e){return e.length<=128&&/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(e)&&!e.includes("..")}function h(e){let t=e.match(/^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n|$)/);return t?{frontmatter:t[1],body:e.slice(t[0].length).trim()}:{frontmatter:null,body:e.trim()}}function m(e){let t=t=>{let r=e.match(RegExp(`^${t}\\s*:\\s*(.+?)\\s*$`,"m"));return r?r[1].replace(/^["']|["']$/g,"").trim():void 0};return{name:t("name"),description:t("description"),version:function(e){let t=e.match(/^metadata\s*:[ \t]*\n((?:[ \t]+.*(?:\n|$))*)/m);if(!t)return;let r=t[1].match(/^[ \t]+version\s*:\s*(.+?)\s*$/m);return r?r[1].replace(/^["']|["']$/g,"").trim():void 0}(e)}}function f(e){let{frontmatter:t}=h(e);return t?m(t):{}}async function w(e){for(let t of c)try{let r=await i.promises.readFile((0,a.join)(t,e,"SKILL.md"),"utf-8"),n=f(r).version;if(n)return n}catch{}}function v(e,t){return`https://raw.githubusercontent.com/${s}/${e}/${t}`}let x=/^[0-9a-f]{7,40}$/,g=null;async function y(){try{let e=await fetch(`https://api.github.com/repos/${s}/commits/${o}`,{headers:d});if(e.ok){let t=await e.json();if("string"==typeof t.sha&&x.test(t.sha))return t.sha}}catch{}return o}async function R(e=!1){if(!e&&g&&Date.now()-g.at<3e5)return{ref:g.ref,tree:g.tree};let t=await y(),r=await fetch(`https://api.github.com/repos/${s}/git/trees/${t}?recursive=1`,{headers:d});if(!r.ok)throw Error(403===r.status?"GitHub rate limit reached — try again in a minute.":`Couldn't reach the skills catalog (GitHub ${r.status}).`);let a=await r.json();if(!Array.isArray(a.tree))throw Error("Unexpected response from the skills catalog.");return g={at:Date.now(),ref:t,tree:a.tree},{ref:t,tree:a.tree}}function E(){return(0,a.join)(u,".installed.yaml")}async function k(){try{return function(e){let t={},r=null;for(let a of e.split("\n"))if(!(!a.trim()||a.trimStart().startsWith("#"))){if(/^\S/.test(a)){let e=a.match(/^(\S[^:]*?):\s*$/);(r=e?e[1].trim():null)&&(t[r]={source:""})}else if(r){let e=a.match(/^\s+([A-Za-z_]+)\s*:\s*(.+?)\s*$/);if(e){let a=e[2].replace(/^["']|["']$/g,"").trim();"source"===e[1]?t[r].source=a:"commit"===e[1]&&(t[r].commit=a)}}}for(let e of Object.keys(t))t[e].source||delete t[e];return t}(await i.promises.readFile(E(),"utf-8"))}catch{return{}}}async function b(e){let t=E(),r=`${t}.${(0,n.randomUUID)()}.tmp`;await i.promises.mkdir(u,{recursive:!0}),await i.promises.writeFile(r,function(e){let t=Object.keys(e).sort();if(0===t.length)return"{}\n";let r="";for(let a of t)r+=`${a}:
|
|
2
|
-
`,e[a].commit&&(r+=` commit: ${e[a].commit}
|
|
3
|
-
`),r+=` source: ${e[a].source}
|
|
4
|
-
`;return r}(e),{mode:384}),await i.promises.rename(r,t)}async function $(e,t){let r=await k(),a=`${s}@${l}${e}`;r[e]=t?{source:a,commit:t}:{source:a},await b(r)}async function S(e){let t=await k();e in t&&(delete t[e],await b(t))}async function C(){let e=new Set;for(let t of c)try{for(let r of(await i.promises.readdir(t,{withFileTypes:!0})))r.isDirectory()&&!r.name.startsWith(".")&&e.add(r.name)}catch{}return e}async function A(e=!1){let[{ref:t,tree:r},a]=await Promise.all([R(e),C()]),i=function(e){let t=new Map;for(let r of e){if("blob"!==r.type||!r.path.startsWith(l))continue;let e=r.path.slice(l.length),a=e.indexOf("/");if(a<=0)continue;let i=e.slice(0,a);(t.get(i)??t.set(i,[]).get(i)).push(r)}return t}(r);return(await Promise.all([...i.entries()].map(async([e,r])=>{let i,n=e,s="",o=r.find(t=>t.path===`${l}${e}/SKILL.md`);if(o)try{let r=await fetch(v(t,o.path),{headers:d}).then(e=>e.ok?e.text():""),a=f(r);n=a.name||e,s=a.description||"",i=a.version}catch{}let u=a.has(e),c=u?await w(e):void 0,p=u&&!!i&&!!c&&function(e,t){let r=e.split(".").map(e=>parseInt(e,10)),a=t.split(".").map(e=>parseInt(e,10)),i=Math.max(r.length,a.length);for(let e=0;e<i;e+=1){let t=r[e]??0,i=a[e]??0;if(Number.isNaN(t)||Number.isNaN(i))break;if(t!==i)return t>i?1:-1}return 0}(i,c)>0;return{name:e,title:n,description:s,fileCount:r.length,installed:u,latestVersion:i,installedVersion:c,updateAvailable:p}}))).sort((e,t)=>e.title.localeCompare(t.title))}async function j(e){let t;if(!p(e))throw Error("Invalid skill name.");let r=!1;for(let n of c)try{let s=await i.promises.realpath((0,a.join)(n,e,"SKILL.md")),o=await i.promises.realpath(n);if(s!==o&&!s.startsWith(o+a.sep))continue;t=await i.promises.readFile(s,"utf-8"),r=!0;break}catch{}if(void 0===t){let{ref:r,tree:a}=await R(),i=a.find(t=>"blob"===t.type&&t.path===`${l}${e}/SKILL.md`);if(!i)throw Error(`Skill "${e}" was not found.`);let n=await fetch(v(r,i.path),{headers:d});if(!n.ok)throw Error(`Failed to load skill (${n.status}).`);t=await n.text()}let{frontmatter:n,body:s}=h(t),o=n?m(n):{},u=null!==n&&(null!=o.name||null!=o.description||null!=o.version);return{name:e,title:o.name||e,description:o.description||"",version:o.version,body:u?s:t.trim(),installed:r}}async function T(e){if(!p(e))throw Error("Invalid skill name.");let{ref:t,tree:r}=await R(),s=`${l}${e}/`,c=r.filter(e=>"blob"===e.type&&e.path.startsWith(s));if(0===c.length)throw Error(`Skill "${e}" was not found in the catalog.`);if(c.length>300)throw Error("This skill has too many files to install.");if(c.reduce((e,t)=>e+(t.size??0),0)>0x1900000)throw Error("This skill is too large to install.");let h=(0,a.resolve)(u),m=(0,a.resolve)(h,e);if(m!==(0,a.join)(h,e))throw Error("Invalid skill name.");let f=(0,a.join)(h,`.installing-${e}-${(0,n.randomUUID)()}`);try{for(let e of(await i.promises.mkdir(f,{recursive:!0}),c)){let r=e.path.slice(s.length),n=(0,a.resolve)(f,r);if(n!==f&&!n.startsWith(f+a.sep))throw Error("Invalid file path in skill.");let o=await fetch(v(t,e.path),{headers:d});if(!o.ok)throw Error(`Failed to download ${r} (${o.status}).`);let l=Buffer.from(await o.arrayBuffer());await i.promises.mkdir((0,a.dirname)(n),{recursive:!0}),await i.promises.writeFile(n,l)}await i.promises.rm(m,{recursive:!0,force:!0}),await i.promises.mkdir(h,{recursive:!0}),await i.promises.rename(f,m)}catch(e){throw await i.promises.rm(f,{recursive:!0,force:!0}).catch(()=>{}),e}try{await $(e,t!==o&&x.test(t)?t:null)}catch{}return{files:c.length}}e.s(["SKILL_DIRS",0,c,"getCatalog",0,A,"getSkillDetail",0,j,"installSkill",0,T,"isValidSkillName",0,p,"recordUninstall",0,S])}];
|
|
5
|
-
|
|
6
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__1alqt3_._.js.map
|