@evoscientist/webui 0.2.8 → 0.2.9
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.html +1 -1
- package/dist/.next/server/app/_not-found.rsc +1 -1
- package/dist/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- 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 +2 -2
- package/dist/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dist/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/dist/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- 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]__0k-rs5f._.js → [root-of-the-server]__01e0ekn._.js} +1 -1
- 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]__0jsq76h._.js → [root-of-the-server]__0om1fsa._.js} +1 -1
- package/dist/.next/server/chunks/{[root-of-the-server]__1alqt3_._.js → [root-of-the-server]__19l67fj._.js} +1 -1
- package/dist/.next/server/chunks/{[root-of-the-server]__0nn8czk._.js → [root-of-the-server]__1nb3ezt._.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_1a2dy76._.js → node_modules_0-3gk4n._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_02l4ncm._.js → node_modules_03mz3d2._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0lhl9_0._.js → node_modules_042csl2._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_0a-3666._.js → node_modules_0_3n1hi._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0m7-ed8._.js → node_modules_0_n1n9u._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1owe5xv._.js → node_modules_0bnt8d5._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_0fxlk06._.js → node_modules_0gmj-7m._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{[root-of-the-server]__11a1-4t._.js → node_modules_0j6b-p5._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_1t626ye._.js → node_modules_0mhroki._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_0q44r64._.js → node_modules_0pimgwq._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0urn1wt._.js → node_modules_0s436hr._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_0p_8bfi._.js → node_modules_0u5o24a._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1mcjw-y._.js → node_modules_0z53q9t._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_208gr2-._.js → node_modules_0zzr3iv._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_002u7ir._.js → node_modules_14_5zct._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_10v96_9._.js → node_modules_14j-r2i._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_0qeu828._.js → node_modules_16ih6qm._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0gs9qjb._.js → node_modules_18frml9._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_20oab__._.js → node_modules_1b08rf0._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_14xejkf._.js → node_modules_1bddg7x._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_17rfg58._.js → node_modules_1bompw4._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_1f65-5g._.js → node_modules_1i5ml3x._.js} +2 -2
- package/dist/.next/server/chunks/ssr/{node_modules_1phops3._.js → node_modules_1jpkt5_._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_20iziql._.js → node_modules_1rsc-gt._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_1twjy-4._.js → node_modules_1ti62ba._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_13e524_._.js → node_modules_1wn8qu0._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0plqukv._.js → node_modules_1wvft2t._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0ybok7k._.js → node_modules_1xgltz7._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_01wbayw._.js → node_modules_1y4f8cf._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_0tr3k8r._.js → node_modules_1z39zs4._.js} +1 -1
- package/dist/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_09ex6q5._.js → node_modules_katex_dist_katex_mjs_16enqn_._.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/{27vb_89qd7ag_.js → 3fg_vuz1xt14w.js} +1 -1
- package/dist/.next/static/chunks/3lnrl25cwsoyk.js +90 -0
- package/dist/.next/static/chunks/3r4zv-ypmltqz.js +13 -0
- package/dist/.next/static/chunks/{1bzu587wut72w.js → 3s09ok8dc101_.js} +1 -1
- package/dist/package.json +3 -4
- package/package.json +3 -4
- 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/{DlVVJPKPg4elb2BXd_ZVZ → jymT8vIg_gKraNQQCXVtL}/_buildManifest.js +0 -0
- /package/dist/.next/static/{DlVVJPKPg4elb2BXd_ZVZ → jymT8vIg_gKraNQQCXVtL}/_clientMiddlewareManifest.js +0 -0
- /package/dist/.next/static/{DlVVJPKPg4elb2BXd_ZVZ → jymT8vIg_gKraNQQCXVtL}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
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"))},85678,e=>{"use strict";var t=e.i(522734),r=e.i(446786),i=e.i(814747),s=e.i(254799),a=e.i(17883);function o(e){return e.startsWith("~")?(0,i.join)((0,r.homedir)(),e.slice(1)):(0,i.resolve)(e)}function n(){let e,t=process.env.EVOSCIENTIST_MEMORIES_DIR||process.env.EVOSCIENTIST_MEMORY_DIR;return t&&t.trim()?o(t):(0,i.join)((e=process.env.EVOSCIENTIST_DATA_DIR)&&e.trim()?o(e):(0,i.join)((0,r.homedir)(),".evoscientist"),"memories")}async function l(){try{let e=await t.promises.realpath(n());return(await t.promises.stat(e)).isDirectory()?e:null}catch{return null}}async function c(){let e=n();return await t.promises.mkdir(e,{recursive:!0}),t.promises.realpath(e)}let p=new Set(["__pycache__","node_modules","__MACOSX"]),m=[".pyc",".pyo"];function h(e){return!!(e.startsWith(".")||p.has(e))||m.some(t=>e.endsWith(t))}let f=new Set(["md","markdown","txt","text","json","yaml","yml","csv","tsv","log","tex","bib","rst"]);function u(e){let t;return f.has((t=e.lastIndexOf("."))>=0?e.slice(t+1).toLowerCase():"")}function d(e,t){if((0,a.hasControlChar)(t))throw Error("Invalid path.");let r=t.replaceAll("\\","/").replace(/^\/+/,"");if(!r)throw Error("A file path is required.");if(r.split("/").some(e=>""!==e&&h(e)))throw Error("Path is not accessible.");let s=(0,i.resolve)(e,r);if(s!==e&&!s.startsWith(e+i.sep))throw Error("Path is outside the memory directory.");return s}async function w(e,r){let s,a=d(e,r);try{s=await t.promises.realpath(a)}catch{throw Error("Path is not accessible.")}if(s!==e&&!s.startsWith(e+i.sep))throw Error("Path is not accessible.");let o=(0,i.relative)(e,s);if(o&&o.split(i.sep).some(e=>""!==e&&h(e)))throw Error("Path is not accessible.");return s}async function y(e,r){let s=d(e,r),a=(0,i.dirname)(s);for(;;)try{let r=await t.promises.realpath(a);if(r!==e&&!r.startsWith(e+i.sep))throw Error("Path is outside the memory directory.");break}catch(t){if(t instanceof Error&&t.message.includes("outside"))throw t;let e=(0,i.dirname)(a);if(e===a)break;a=e}return s}async function x(){let e=n(),r=await l();if(!r)return{dir:e,exists:!1,entries:[],truncated:!1};let s=[],a=!1;async function o(e,n){let l;if(n>8||s.length>=2e3){s.length>=2e3&&(a=!0);return}try{l=await t.promises.readdir(e,{withFileTypes:!0})}catch{return}for(let c of(l.sort((e,t)=>e.name.localeCompare(t.name)),l)){if(h(c.name))continue;if(s.length>=2e3){a=!0;return}let l=(0,i.join)(e,c.name);if(c.isDirectory())await o(l,n+1);else if(c.isFile()){let e=0,a=0;try{let r=await t.promises.stat(l);e=r.size,a=r.mtimeMs}catch{continue}s.push({path:(0,i.relative)(r,l).split(i.sep).join("/"),size:e,mtime:a,editable:u(c.name)&&e<=2097152})}}}return await o(r,0),{dir:e,exists:!0,entries:s,truncated:a}}async function g(e){let r=await l();if(!r)throw Error("No memory directory found.");if(!u(e))throw Error("This file type can't be edited.");let i=await w(r,e),s=await t.promises.stat(i);if(!s.isFile())throw Error("Not a file.");if(s.size>2097152)throw Error("This file is too large to open.");let a=await t.promises.readFile(i,"utf-8");return{path:e.replaceAll("\\","/").replace(/^\/+/,""),content:a,size:s.size,mtime:s.mtimeMs}}async function E(e,r){if("string"!=typeof r)throw Error("Content must be a string.");if(Buffer.byteLength(r,"utf-8")>1048576)throw Error("This file is too large to save.");if(!u(e))throw Error("Only text/markdown memory files can be saved.");let a=await c(),o=await y(a,e);await t.promises.mkdir((0,i.dirname)(o),{recursive:!0});let n=`${o}.${(0,s.randomUUID)()}.tmp`;try{await t.promises.writeFile(n,r,{encoding:"utf-8",mode:384}),await t.promises.rename(n,o)}catch(e){throw await t.promises.rm(n,{force:!0}).catch(()=>{}),e}let l=await t.promises.stat(o);return{path:e.replaceAll("\\","/").replace(/^\/+/,""),content:r,size:l.size,mtime:l.mtimeMs}}function v(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---/);return t?t[1]:""}function b(e,t){let r=RegExp(`^${t}:\\s*(.+)`,"m"),i=e.match(r);return i?i[1].trim().replace(/^'(.*)'$/,"$1").replace(/^"(.*)"$/,"$1"):""}function _(e,t){let r=RegExp(`\\b${t}:\\s*(.+)`,"m"),i=e.match(r);return i?i[1].trim().replace(/^'(.*)'$/,"$1").replace(/^"(.*)"$/,"$1"):""}async function j(){let e=await l();if(!e)return{nodes:[],edges:[]};let r=(0,i.join)(e,"observations");try{await t.promises.access(r)}catch{return{nodes:[],edges:[]}}let s=new Map,a=[];async function o(r){let n;try{n=await t.promises.readdir(r,{withFileTypes:!0})}catch{return}for(let l of(n.sort((e,t)=>e.name.localeCompare(t.name)),n)){if(h(l.name))continue;let n=(0,i.join)(r,l.name);if(l.isDirectory())await o(n);else if(l.isFile()&&l.name.endsWith(".md")){let r=await t.promises.readFile(n,"utf-8").catch(()=>null);if(!r)continue;let o=v(r),c=b(o,"id")||l.name.replace(/\.md$/,""),p=b(o,"summary")||c,m=b(o,"memory_type")||"semantic",h=b(o,"scope")||"global",f=b(o,"created_at")||"",u=function(e){let t,r=e.indexOf("related_observations:");if(-1===r)return[];let i=e.slice(r+21),s=[],a=/^- id:\s*(.+)$/gm;for(;null!==(t=a.exec(i));){let e=t.index,r=i.slice(e+1),a=r.match(/^(?:- |[a-z_])/m),o=i.slice(e,e+1+(a?.index??r.length)),n=t[1].trim().replace(/^['"]|['"]$/g,""),l=o.match(/^\s+relation:\s*(.+)$/m),c=l?.[1]?.trim()??"";n&&c&&s.push({id:n,relation:c})}return s}(o),d=(0,i.relative)(e,n).split(i.sep).join("/");for(let e of(s.set(c,{id:c,path:d,summary:p,memory_type:m,scope:h,created_at:f,degree:0}),u))a.push({source:c,target:e.id,relation:e.relation})}}}await o(r);let n=a.filter(e=>s.has(e.source)&&s.has(e.target));for(let e of n)s.get(e.source).degree++,s.get(e.target).degree++;return{nodes:Array.from(s.values()),edges:n}}async function S(){let e=await l();if(!e)return{entries:[],truncated:!1};let r=(0,i.join)(e,"executions");try{await t.promises.access(r)}catch{return{entries:[],truncated:!1}}let s=[],a=!1;async function o(r){let n;if(s.length>=2e3){a=!0;return}try{n=await t.promises.readdir(r,{withFileTypes:!0})}catch{return}for(let a of(n.sort((e,t)=>e.name.localeCompare(t.name)),n)){if(h(a.name))continue;let n=(0,i.join)(r,a.name);if(a.isDirectory())await o(n);else if(a.isFile()&&a.name.endsWith(".md")){let r=await t.promises.readFile(n,"utf-8").catch(()=>null);if(!r)continue;let o=v(r),l=b(o,"id")||a.name.replace(/\.md$/,""),c=b(o,"created_at")||"",p=b(o,"project_id")||"",m=_(o,"agent"),h=_(o,"session_id"),f=r.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/,"").trim(),u=f.match(/^##\s+Summary\s*\r?\n([\s\S]*?)(?=\n##\s|\s*$)/m),d=u?u[1].trim():f.slice(0,500),w=[...new Set(f.match(/\bO-[0-9a-f]{16}\b/g)??[])];s.push({id:l,created_at:c,agent:m,session_id:h,project_id:p,summary:d,obs_ids:w,path:(0,i.relative)(e,n).split(i.sep).join("/")})}}}return await o(r),s.sort((e,t)=>t.created_at.localeCompare(e.created_at)),{entries:s,truncated:a}}async function k(e){let r=await l();if(!r)throw Error("No memory directory found.");let i=await w(r,e);if(!(await t.promises.stat(i)).isFile())throw Error("Only files can be deleted.");await t.promises.rm(i,{force:!0})}e.s(["deleteMemory",0,k,"listExecutions",0,S,"listMemory",0,x,"listObservations",0,j,"readMemory",0,g,"writeMemory",0,E])},17883,e=>{"use strict";var t=e.i(522734),r=e.i(446786),i=e.i(814747),s=e.i(254799);let a=(0,i.join)((0,r.homedir)(),".config","evoscientist","langgraph_dev.workspace.json");function o(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 n=new Set(["large_tool_results","conversation_history","__pycache__","node_modules","__MACOSX"]),l=[".pyc",".pyo"];function c(e){return!!(e.startsWith(".")||n.has(e))||l.some(t=>e.endsWith(t))}async function p(){let e;try{let r=JSON.parse(await t.promises.readFile(a,"utf-8")),i=r.workspace,s=r.pid;"string"==typeof i&&i.trim()&&(!("number"==typeof s&&s>0)||function(e){try{return process.kill(e,0),!0}catch(e){return"EPERM"===e.code}}(s))&&(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 m(e,t){if(o(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 s=(0,i.resolve)(e,r);if(s!==e&&!s.startsWith(e+i.sep))throw Error("Path is outside the workspace.");return s}async function h(e,r){let s,a=m(e,r);try{s=await t.promises.realpath(a)}catch{throw Error("Path is not accessible.")}if(s!==e&&!s.startsWith(e+i.sep))throw Error("Path is not accessible.");let o=(0,i.relative)(e,s);if(o&&o.split(i.sep).some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");return s}let f=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 u(e,r){let s;try{s=await t.promises.realpath((0,i.dirname)(r))}catch{throw Error("Path is not accessible.")}if(s!==e&&!s.startsWith(e+i.sep))throw Error("Path is not accessible.")}function d(e){let t;return f.has((t=e.lastIndexOf("."))>=0?e.slice(t+1).toLowerCase():"")}async function w(e,r,a){let o;if("string"!=typeof a)throw Error("Content must be a string.");if(Buffer.byteLength(a,"utf-8")>5242880)throw Error("This file is too large to save.");if(!d(r.replaceAll("\\","/").split("/").pop()||r))throw Error("Only text/code files can be edited.");let n=m(e,r);try{o=await t.promises.lstat(n)}catch{throw Error("Only files can be edited.")}if(o.isSymbolicLink())throw Error("Editing symlinks is not allowed.");let l=await h(e,r);if(!d((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 p=`${l}.${(0,s.randomUUID)()}.tmp`;try{await u(e,l),await t.promises.writeFile(p,a,{encoding:"utf-8",mode:511&c.mode}),await u(e,l),await t.promises.rename(p,l)}catch(e){throw await t.promises.rm(p,{force:!0}).catch(()=>{}),e}let f=await t.promises.stat(l);return{path:r.replaceAll("\\","/").replace(/^\/+/,""),size:f.size,mtime:f.mtimeMs}}async function y(e,r){await h(e,r);let i=m(e,r);if((await t.promises.lstat(i)).isDirectory())throw Error("Only files can be deleted.");await u(e,i),await t.promises.rm(i,{force:!0})}e.s(["MAX_WORKSPACE_WRITE_BYTES",0,5242880,"deleteWorkspaceFile",0,y,"getWorkspaceDir",0,p,"hasControlChar",0,o,"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,h,"writeWorkspaceFile",0,w,"zipExcludeArgs",0,function(){let e=[".*","*/.*"];for(let t of n)e.push(`${t}/*`,`*/${t}/*`,t,`*/${t}`);for(let t of l)e.push(`*${t}`);return e.flatMap(e=>["-x",e])}])}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__08gtyud._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module.exports=[254799,(e,r,t)=>{r.exports=e.x("crypto",()=>require("crypto"))},522734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},270406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,r,t)=>{r.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,r,t)=>{r.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,r,t)=>{r.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,r,t)=>{r.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,r,t)=>{r.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,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},446786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},814747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},688947,(e,r,t)=>{r.exports=e.x("stream",()=>require("stream"))},17883,e=>{"use strict";var r=e.i(522734),t=e.i(446786),s=e.i(814747),i=e.i(254799);let o=(0,s.join)((0,t.homedir)(),".config","evoscientist","langgraph_dev.workspace.json");function a(e){for(let r=0;r<e.length;r+=1){let t=e.charCodeAt(r);if(t<32||127===t||t>=128&&t<=159||8232===t||8233===t)return!0}return!1}let n=new Set(["large_tool_results","conversation_history","__pycache__","node_modules","__MACOSX"]),l=[".pyc",".pyo"];function c(e){return!!(e.startsWith(".")||n.has(e))||l.some(r=>e.endsWith(r))}async function p(){let e;try{let t=JSON.parse(await r.promises.readFile(o,"utf-8")),s=t.workspace,i=t.pid;"string"==typeof s&&s.trim()&&(!("number"==typeof i&&i>0)||function(e){try{return process.kill(e,0),!0}catch(e){return"EPERM"===e.code}}(i))&&(e=s)}catch{}if(!(e||=process.env.EVOSCIENTIST_WORKSPACE_DIR))throw Error("No active EvoScientist workspace found. Start the backend with `EvoSci deploy` first.");let t=(0,s.resolve)(e);if(!(await r.promises.stat(t)).isDirectory())throw Error("The active EvoScientist workspace is not a directory.");return r.promises.realpath(t)}function d(e,r){if(a(r))throw Error("Invalid path.");let t=r.replaceAll("\\","/").replace(/^\/+/,"");if(t.split("/").some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");let i=(0,s.resolve)(e,t);if(i!==e&&!i.startsWith(e+s.sep))throw Error("Path is outside the workspace.");return i}async function h(e,t){let i,o=d(e,t);try{i=await r.promises.realpath(o)}catch{throw Error("Path is not accessible.")}if(i!==e&&!i.startsWith(e+s.sep))throw Error("Path is not accessible.");let a=(0,s.relative)(e,i);if(a&&a.split(s.sep).some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");return i}let x=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,t){let i;try{i=await r.promises.realpath((0,s.dirname)(t))}catch{throw Error("Path is not accessible.")}if(i!==e&&!i.startsWith(e+s.sep))throw Error("Path is not accessible.")}function u(e){let r;return x.has((r=e.lastIndexOf("."))>=0?e.slice(r+1).toLowerCase():"")}async function m(e,t,o){let a;if("string"!=typeof o)throw Error("Content must be a string.");if(Buffer.byteLength(o,"utf-8")>5242880)throw Error("This file is too large to save.");if(!u(t.replaceAll("\\","/").split("/").pop()||t))throw Error("Only text/code files can be edited.");let n=d(e,t);try{a=await r.promises.lstat(n)}catch{throw Error("Only files can be edited.")}if(a.isSymbolicLink())throw Error("Editing symlinks is not allowed.");let l=await h(e,t);if(!u((0,s.basename)(l)))throw Error("Only text/code files can be edited.");let c=await r.promises.stat(l);if(!c.isFile())throw Error("Only files can be edited.");let p=`${l}.${(0,i.randomUUID)()}.tmp`;try{await f(e,l),await r.promises.writeFile(p,o,{encoding:"utf-8",mode:511&c.mode}),await f(e,l),await r.promises.rename(p,l)}catch(e){throw await r.promises.rm(p,{force:!0}).catch(()=>{}),e}let x=await r.promises.stat(l);return{path:t.replaceAll("\\","/").replace(/^\/+/,""),size:x.size,mtime:x.mtimeMs}}async function w(e,t){await h(e,t);let s=d(e,t);if((await r.promises.lstat(s)).isDirectory())throw Error("Only files can be deleted.");await f(e,s),await r.promises.rm(s,{force:!0})}e.s(["MAX_WORKSPACE_WRITE_BYTES",0,5242880,"deleteWorkspaceFile",0,w,"getWorkspaceDir",0,p,"hasControlChar",0,a,"isCrossOrigin",0,function(e){let r=e.headers.get("host");if(!r)return!0;let t=e.headers.get("sec-fetch-site");if(t)return"same-origin"!==t&&"same-site"!==t&&"none"!==t;let s=e.headers.get("origin");if(!s)return!1;try{return new URL(s).host!==r}catch{return!0}},"isHiddenEntry",0,c,"safeResolve",0,h,"writeWorkspaceFile",0,m,"zipExcludeArgs",0,function(){let e=[".*","*/.*"];for(let r of n)e.push(`${r}/*`,`*/${r}/*`,r,`*/${r}`);for(let r of l)e.push(`*${r}`);return e.flatMap(e=>["-x",e])}])}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0c_9zoh._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module.exports=[254799,(e,r,t)=>{r.exports=e.x("crypto",()=>require("crypto"))},522734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},270406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},918622,(e,r,t)=>{r.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,r,t)=>{r.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,r,t)=>{r.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,r,t)=>{r.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,r,t)=>{r.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,r,t)=>{r.exports=e.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},193695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},81111,(e,r,t)=>{r.exports=e.x("node:stream",()=>require("node:stream"))},446786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},814747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},17883,e=>{"use strict";var r=e.i(522734),t=e.i(446786),s=e.i(814747),i=e.i(254799);let o=(0,s.join)((0,t.homedir)(),".config","evoscientist","langgraph_dev.workspace.json");function a(e){for(let r=0;r<e.length;r+=1){let t=e.charCodeAt(r);if(t<32||127===t||t>=128&&t<=159||8232===t||8233===t)return!0}return!1}let n=new Set(["large_tool_results","conversation_history","__pycache__","node_modules","__MACOSX"]),l=[".pyc",".pyo"];function c(e){return!!(e.startsWith(".")||n.has(e))||l.some(r=>e.endsWith(r))}async function p(){let e;try{let t=JSON.parse(await r.promises.readFile(o,"utf-8")),s=t.workspace,i=t.pid;"string"==typeof s&&s.trim()&&(!("number"==typeof i&&i>0)||function(e){try{return process.kill(e,0),!0}catch(e){return"EPERM"===e.code}}(i))&&(e=s)}catch{}if(!(e||=process.env.EVOSCIENTIST_WORKSPACE_DIR))throw Error("No active EvoScientist workspace found. Start the backend with `EvoSci deploy` first.");let t=(0,s.resolve)(e);if(!(await r.promises.stat(t)).isDirectory())throw Error("The active EvoScientist workspace is not a directory.");return r.promises.realpath(t)}function d(e,r){if(a(r))throw Error("Invalid path.");let t=r.replaceAll("\\","/").replace(/^\/+/,"");if(t.split("/").some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");let i=(0,s.resolve)(e,t);if(i!==e&&!i.startsWith(e+s.sep))throw Error("Path is outside the workspace.");return i}async function h(e,t){let i,o=d(e,t);try{i=await r.promises.realpath(o)}catch{throw Error("Path is not accessible.")}if(i!==e&&!i.startsWith(e+s.sep))throw Error("Path is not accessible.");let a=(0,s.relative)(e,i);if(a&&a.split(s.sep).some(e=>""!==e&&c(e)))throw Error("Path is not accessible.");return i}let f=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 x(e,t){let i;try{i=await r.promises.realpath((0,s.dirname)(t))}catch{throw Error("Path is not accessible.")}if(i!==e&&!i.startsWith(e+s.sep))throw Error("Path is not accessible.")}function u(e){let r;return f.has((r=e.lastIndexOf("."))>=0?e.slice(r+1).toLowerCase():"")}async function m(e,t,o){let a;if("string"!=typeof o)throw Error("Content must be a string.");if(Buffer.byteLength(o,"utf-8")>5242880)throw Error("This file is too large to save.");if(!u(t.replaceAll("\\","/").split("/").pop()||t))throw Error("Only text/code files can be edited.");let n=d(e,t);try{a=await r.promises.lstat(n)}catch{throw Error("Only files can be edited.")}if(a.isSymbolicLink())throw Error("Editing symlinks is not allowed.");let l=await h(e,t);if(!u((0,s.basename)(l)))throw Error("Only text/code files can be edited.");let c=await r.promises.stat(l);if(!c.isFile())throw Error("Only files can be edited.");let p=`${l}.${(0,i.randomUUID)()}.tmp`;try{await x(e,l),await r.promises.writeFile(p,o,{encoding:"utf-8",mode:511&c.mode}),await x(e,l),await r.promises.rename(p,l)}catch(e){throw await r.promises.rm(p,{force:!0}).catch(()=>{}),e}let f=await r.promises.stat(l);return{path:t.replaceAll("\\","/").replace(/^\/+/,""),size:f.size,mtime:f.mtimeMs}}async function w(e,t){await h(e,t);let s=d(e,t);if((await r.promises.lstat(s)).isDirectory())throw Error("Only files can be deleted.");await x(e,s),await r.promises.rm(s,{force:!0})}e.s(["MAX_WORKSPACE_WRITE_BYTES",0,5242880,"deleteWorkspaceFile",0,w,"getWorkspaceDir",0,p,"hasControlChar",0,a,"isCrossOrigin",0,function(e){let r=e.headers.get("host");if(!r)return!0;let t=e.headers.get("sec-fetch-site");if(t)return"same-origin"!==t&&"same-site"!==t&&"none"!==t;let s=e.headers.get("origin");if(!s)return!1;try{return new URL(s).host!==r}catch{return!0}},"isHiddenEntry",0,c,"safeResolve",0,h,"writeWorkspaceFile",0,m,"zipExcludeArgs",0,function(){let e=[".*","*/.*"];for(let r of n)e.push(`${r}/*`,`*/${r}/*`,r,`*/${r}`);for(let r of l)e.push(`*${r}`);return e.flatMap(e=>["-x",e])}])}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0dsauq5._.js.map
|
|
@@ -3,4 +3,4 @@ module.exports=[254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},
|
|
|
3
3
|
`),r+=` source: ${e[a].source}
|
|
4
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
5
|
|
|
6
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
6
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0om1fsa._.js.map
|
|
@@ -3,4 +3,4 @@ module.exports=[254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},
|
|
|
3
3
|
`),r+=` source: ${e[a].source}
|
|
4
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
5
|
|
|
6
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
6
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__19l67fj._.js.map
|
|
@@ -3,4 +3,4 @@ module.exports=[254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},
|
|
|
3
3
|
`),r+=` source: ${e[i].source}
|
|
4
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
5
|
|
|
6
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
6
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__1nb3ezt._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[790158,a=>{"use strict";var b=a.i(898197),c=a.i(671199),d=a.i(882458);a.i(416635),a.i(43429),a.i(428212),a.i(916573),a.i(789676),a.i(956864),a.i(166292),a.i(887370);var e=a.i(261234),f=a.i(875117),g=a.i(539110);let h=new Uint8Array(16),i=[];for(let a=0;a<256;++a)i.push((a+256).toString(16).slice(1));var j=a.i(21288),k=a.i(526987),l=a.i(524703),m=function(){var a=(0,g.__name)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,4],c=[1,13],d=[1,12],e=[1,15],f=[1,16],h=[1,20],i=[1,19],j=[6,7,8],k=[1,26],l=[1,24],m=[1,25],n=[6,7,11],o=[1,6,13,15,16,19,22],p=[1,33],q=[1,34],r=[1,6,7,11,13,15,16,19,22],s={trace:(0,g.__name)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,g.__name)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 6:case 7:return d;case 8:d.getLogger().trace("Stop NL ");break;case 9:d.getLogger().trace("Stop EOF ");break;case 11:d.getLogger().trace("Stop NL2 ");break;case 12:d.getLogger().trace("Stop EOF2 ");break;case 15:d.getLogger().info("Node: ",f[h].id),d.addNode(f[h-1].length,f[h].id,f[h].descr,f[h].type);break;case 16:d.getLogger().trace("Icon: ",f[h]),d.decorateNode({icon:f[h]});break;case 17:case 21:d.decorateNode({class:f[h]});break;case 18:d.getLogger().trace("SPACELIST");break;case 19:d.getLogger().trace("Node: ",f[h].id),d.addNode(0,f[h].id,f[h].descr,f[h].type);break;case 20:d.decorateNode({icon:f[h]});break;case 25:d.getLogger().trace("node found ..",f[h-2]),this.$={id:f[h-1],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 26:this.$={id:f[h],descr:f[h],type:d.nodeType.DEFAULT};break;case 27:d.getLogger().trace("node found ..",f[h-3]),this.$={id:f[h-3],descr:f[h-1],type:d.getType(f[h-2],f[h])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:b},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:b},{6:c,7:[1,10],9:9,12:11,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},a(j,[2,3]),{1:[2,2]},a(j,[2,4]),a(j,[2,5]),{1:[2,6],6:c,12:21,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},{6:c,9:22,12:11,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},{6:k,7:l,10:23,11:m},a(n,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:h,22:i}),a(n,[2,18]),a(n,[2,19]),a(n,[2,20]),a(n,[2,21]),a(n,[2,23]),a(n,[2,24]),a(n,[2,26],{19:[1,30]}),{20:[1,31]},{6:k,7:l,10:32,11:m},{1:[2,7],6:c,12:21,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},a(o,[2,14],{7:p,11:q}),a(r,[2,8]),a(r,[2,9]),a(r,[2,10]),a(n,[2,15]),a(n,[2,16]),a(n,[2,17]),{20:[1,35]},{21:[1,36]},a(o,[2,13],{7:p,11:q}),a(r,[2,11]),a(r,[2,12]),{21:[1,37]},a(n,[2,25]),a(n,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,g.__name)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,g.__name)(function(a){var b=this,c=[0],d=[],e=[null],f=[],h=this.table,i="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,g.__name)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,g.__name)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=h[v]&&h[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],h[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,i=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[i,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=h[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function t(){this.yy={}}return s.lexer={EOF:1,parseError:(0,g.__name)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,g.__name)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,g.__name)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,g.__name)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,g.__name)(function(){return this._more=!0,this},"more"),reject:(0,g.__name)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,g.__name)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,g.__name)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,g.__name)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,g.__name)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,g.__name)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,g.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,g.__name)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,g.__name)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,g.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,g.__name)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,g.__name)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,g.__name)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,g.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,g.__name)(function(a,b,c,d){switch(c){case 0:return a.getLogger().trace("Found comment",b.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:a.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return a.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:a.getLogger().trace("end icon"),this.popState();break;case 10:return a.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return a.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return a.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return a.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:a.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return a.getLogger().trace("description:",b.yytext),"NODE_DESCR";case 27:return this.popState(),a.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),a.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),a.getLogger().trace("node end ...",b.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),a.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),a.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return a.getLogger().trace("Long description:",b.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}},(0,g.__name)(t,"Parser"),t.prototype=s,s.Parser=t,new t}();m.parser=m;var n={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},o=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=n,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,g.__name)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(a){for(let b=this.nodes.length-1;b>=0;b--)if(this.nodes[b].level<a)return this.nodes[b];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(a,b,c,d){f.log.info("addNode",a,b,c,d);let g=!1;0===this.nodes.length?(this.baseLevel=a,a=0,g=!0):void 0!==this.baseLevel&&(a-=this.baseLevel,g=!1);let h=(0,e.getConfig2)(),i=h.mindmap?.padding??e.defaultConfig_default.mindmap.padding;switch(d){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:i*=2}let j={id:this.count++,nodeId:(0,e.sanitizeText)(b,h),level:a,descr:(0,e.sanitizeText)(c,h),type:d,children:[],width:h.mindmap?.maxNodeWidth??e.defaultConfig_default.mindmap.maxNodeWidth,padding:i,isRoot:g},k=this.getParent(a);if(k)k.children.push(j),this.nodes.push(j);else if(g)this.nodes.push(j);else throw Error(`There can be only one root. No parent could be found for ("${j.descr}")`)}getType(a,b){switch(f.log.debug("In get type",a,b),a){case"[":return this.nodeType.RECT;case"(":return")"===b?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(a,b){this.elements[a]=b}getElementById(a){return this.elements[a]}decorateNode(a){if(!a)return;let b=(0,e.getConfig2)(),c=this.nodes[this.nodes.length-1];a.icon&&(c.icon=(0,e.sanitizeText)(a.icon,b)),a.class&&(c.class=(0,e.sanitizeText)(a.class,b))}type2Str(a){switch(a){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(a,b){if(0===a.level?a.section=void 0:a.section=b,a.children)for(let[c,d]of a.children.entries()){let e=0===a.level?c%11:b;this.assignSections(d,e)}}flattenNodes(a,b){let c=(0,e.getConfig2)(),d=["mindmap-node"];!0===a.isRoot?d.push("section-root","section--1"):void 0!==a.section&&d.push(`section-${a.section}`),a.class&&d.push(a.class);let f=d.join(" "),h=(0,g.__name)(a=>{let b=(c.theme?.toLowerCase()??"").includes("redux");switch(a){case n.CIRCLE:return"mindmapCircle";case n.RECT:return"rect";case n.ROUNDED_RECT:return"rounded";case n.CLOUD:return"cloud";case n.BANG:return"bang";case n.HEXAGON:return"hexagon";case n.DEFAULT:return b?"rounded":"defaultMindmapNode";case n.NO_BORDER:default:return"rect"}},"getShapeFromType"),i={id:a.id.toString(),domId:"node_"+a.id.toString(),label:a.descr,labelType:"markdown",isGroup:!1,shape:h(a.type),width:a.width,height:a.height??0,padding:a.padding,cssClasses:f,cssStyles:[],look:c.look,icon:a.icon,x:a.x,y:a.y,level:a.level,nodeId:a.nodeId,type:a.type,section:a.section};if(b.push(i),a.children)for(let c of a.children)this.flattenNodes(c,b)}generateEdges(a,b){if(!a.children)return;let c=(0,e.getConfig2)();for(let d of a.children){let e="edge";void 0!==d.section&&(e+=` section-edge-${d.section}`);let f=a.level+1;e+=` edge-depth-${f}`;let g={id:`edge_${a.id}_${d.id}`,start:a.id.toString(),end:d.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:c.look,classes:e,depth:a.level,section:d.section};b.push(g),this.generateEdges(d,b)}}getData(){let a=this.getMindmap(),b=(0,e.getConfig2)();if(void 0!==(0,e.getUserDefinedConfig)().layout||(b.layout="cose-bilkent"),!a)return{nodes:[],edges:[],config:b};f.log.debug("getData: mindmapRoot",a,b),this.assignSections(a);let c=[],d=[];this.flattenNodes(a,c),this.generateEdges(a,d),f.log.debug(`getData: processed ${c.length} nodes and ${d.length} edges`);let g=new Map;for(let a of c)g.set(a.id,{shape:a.shape,width:a.width,height:a.height,padding:a.padding});return{nodes:c,edges:d,config:b,rootNode:a,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(g),type:"mindmap",diagramId:"mindmap-"+(crypto.randomUUID?crypto.randomUUID():function(a,b,c){let d=(a=a||{}).random??a.rng?.()??crypto.getRandomValues(h);if(d.length<16)throw Error("Random bytes length must be >= 16");if(d[6]=15&d[6]|64,d[8]=63&d[8]|128,b){if((c=c||0)<0||c+16>b.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[c+a]=d[a];return b}return function(a,b=0){return(i[a[b+0]]+i[a[b+1]]+i[a[b+2]]+i[a[b+3]]+"-"+i[a[b+4]]+i[a[b+5]]+"-"+i[a[b+6]]+i[a[b+7]]+"-"+i[a[b+8]]+i[a[b+9]]+"-"+i[a[b+10]]+i[a[b+11]]+i[a[b+12]]+i[a[b+13]]+i[a[b+14]]+i[a[b+15]]).toLowerCase()}(d)}(void 0,void 0,void 0))}}getLogger(){return f.log}},p=(0,g.__name)(async(a,g,h,i)=>{f.log.debug("Rendering mindmap diagram\n"+a);let j=i.db,k=j.getData(),l=(0,b.getDiagramElement)(g,k.config.securityLevel);if(k.type=i.type,k.layoutAlgorithm=(0,d.getRegisteredLayoutAlgorithm)(k.config.layout,{fallback:"cose-bilkent"}),k.diagramId=g,!j.getMindmap())return;k.nodes.forEach(a=>{"rounded"===a.shape?(a.radius=15,a.taper=15,a.stroke="none",a.width=0,a.padding=15):"circle"===a.shape?a.padding=10:"rect"===a.shape?(a.width=0,a.padding=10):"hexagon"===a.shape&&(a.width=0,a.height=0)}),await (0,d.render)(k,l);let{themeVariables:m}=(0,e.getConfig)(),{useGradient:n,gradientStart:o,gradientStop:p}=m;if(n&&o&&p){let a=l.attr("id"),b=l.append("defs").append("linearGradient").attr("id",`${a}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");b.append("stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),b.append("stop").attr("offset","100%").attr("stop-color",p).attr("stop-opacity",1)}(0,c.setupViewPortForSVG)(l,k.config.mindmap?.padding??e.defaultConfig_default.mindmap.padding,"mindmapDiagram",k.config.mindmap?.useMaxWidth??e.defaultConfig_default.mindmap.useMaxWidth)},"draw"),q=(0,g.__name)(a=>{let{theme:b,look:c}=a,d="";for(let b=0;b<a.THEME_COLOR_LIMIT;b++)a["lineColor"+b]=a["lineColor"+b]||a["cScaleInv"+b],(0,l.isDark)(a["lineColor"+b])?a["lineColor"+b]=(0,k.lighten)(a["lineColor"+b],20):a["lineColor"+b]=(0,j.darken)(a["lineColor"+b],20);for(let e=0;e<a.THEME_COLOR_LIMIT;e++){let f=""+("neo"===c?Math.max(10-(e-1)*2,2):17-3*e);d+=`
|
|
1
|
+
module.exports=[790158,a=>{"use strict";var b=a.i(898197),c=a.i(671199),d=a.i(882458);a.i(416635),a.i(43429),a.i(428212),a.i(916573),a.i(789676),a.i(956864),a.i(166292),a.i(887370);var e=a.i(261234),f=a.i(875117),g=a.i(539110),h=a.i(849666),i=a.i(21288),j=a.i(526987),k=a.i(524703),l=function(){var a=(0,g.__name)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,4],c=[1,13],d=[1,12],e=[1,15],f=[1,16],h=[1,20],i=[1,19],j=[6,7,8],k=[1,26],l=[1,24],m=[1,25],n=[6,7,11],o=[1,6,13,15,16,19,22],p=[1,33],q=[1,34],r=[1,6,7,11,13,15,16,19,22],s={trace:(0,g.__name)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,g.__name)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 6:case 7:return d;case 8:d.getLogger().trace("Stop NL ");break;case 9:d.getLogger().trace("Stop EOF ");break;case 11:d.getLogger().trace("Stop NL2 ");break;case 12:d.getLogger().trace("Stop EOF2 ");break;case 15:d.getLogger().info("Node: ",f[h].id),d.addNode(f[h-1].length,f[h].id,f[h].descr,f[h].type);break;case 16:d.getLogger().trace("Icon: ",f[h]),d.decorateNode({icon:f[h]});break;case 17:case 21:d.decorateNode({class:f[h]});break;case 18:d.getLogger().trace("SPACELIST");break;case 19:d.getLogger().trace("Node: ",f[h].id),d.addNode(0,f[h].id,f[h].descr,f[h].type);break;case 20:d.decorateNode({icon:f[h]});break;case 25:d.getLogger().trace("node found ..",f[h-2]),this.$={id:f[h-1],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 26:this.$={id:f[h],descr:f[h],type:d.nodeType.DEFAULT};break;case 27:d.getLogger().trace("node found ..",f[h-3]),this.$={id:f[h-3],descr:f[h-1],type:d.getType(f[h-2],f[h])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:b},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:b},{6:c,7:[1,10],9:9,12:11,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},a(j,[2,3]),{1:[2,2]},a(j,[2,4]),a(j,[2,5]),{1:[2,6],6:c,12:21,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},{6:c,9:22,12:11,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},{6:k,7:l,10:23,11:m},a(n,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:h,22:i}),a(n,[2,18]),a(n,[2,19]),a(n,[2,20]),a(n,[2,21]),a(n,[2,23]),a(n,[2,24]),a(n,[2,26],{19:[1,30]}),{20:[1,31]},{6:k,7:l,10:32,11:m},{1:[2,7],6:c,12:21,13:d,14:14,15:e,16:f,17:17,18:18,19:h,22:i},a(o,[2,14],{7:p,11:q}),a(r,[2,8]),a(r,[2,9]),a(r,[2,10]),a(n,[2,15]),a(n,[2,16]),a(n,[2,17]),{20:[1,35]},{21:[1,36]},a(o,[2,13],{7:p,11:q}),a(r,[2,11]),a(r,[2,12]),{21:[1,37]},a(n,[2,25]),a(n,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,g.__name)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,g.__name)(function(a){var b=this,c=[0],d=[],e=[null],f=[],h=this.table,i="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,g.__name)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,g.__name)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=h[v]&&h[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],h[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,i=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[i,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=h[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function t(){this.yy={}}return s.lexer={EOF:1,parseError:(0,g.__name)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,g.__name)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,g.__name)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,g.__name)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,g.__name)(function(){return this._more=!0,this},"more"),reject:(0,g.__name)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,g.__name)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,g.__name)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,g.__name)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,g.__name)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,g.__name)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,g.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,g.__name)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,g.__name)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,g.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,g.__name)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,g.__name)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,g.__name)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,g.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,g.__name)(function(a,b,c,d){switch(c){case 0:return a.getLogger().trace("Found comment",b.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:a.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return a.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:a.getLogger().trace("end icon"),this.popState();break;case 10:return a.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return a.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return a.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return a.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:a.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return a.getLogger().trace("description:",b.yytext),"NODE_DESCR";case 27:return this.popState(),a.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),a.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),a.getLogger().trace("node end ...",b.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),a.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),a.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return a.getLogger().trace("Long description:",b.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}},(0,g.__name)(t,"Parser"),t.prototype=s,s.Parser=t,new t}();l.parser=l;var m={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},n=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=m,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,g.__name)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(a){for(let b=this.nodes.length-1;b>=0;b--)if(this.nodes[b].level<a)return this.nodes[b];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(a,b,c,d){f.log.info("addNode",a,b,c,d);let g=!1;0===this.nodes.length?(this.baseLevel=a,a=0,g=!0):void 0!==this.baseLevel&&(a-=this.baseLevel,g=!1);let h=(0,e.getConfig2)(),i=h.mindmap?.padding??e.defaultConfig_default.mindmap.padding;switch(d){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:i*=2}let j={id:this.count++,nodeId:(0,e.sanitizeText)(b,h),level:a,descr:(0,e.sanitizeText)(c,h),type:d,children:[],width:h.mindmap?.maxNodeWidth??e.defaultConfig_default.mindmap.maxNodeWidth,padding:i,isRoot:g},k=this.getParent(a);if(k)k.children.push(j),this.nodes.push(j);else if(g)this.nodes.push(j);else throw Error(`There can be only one root. No parent could be found for ("${j.descr}")`)}getType(a,b){switch(f.log.debug("In get type",a,b),a){case"[":return this.nodeType.RECT;case"(":return")"===b?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(a,b){this.elements[a]=b}getElementById(a){return this.elements[a]}decorateNode(a){if(!a)return;let b=(0,e.getConfig2)(),c=this.nodes[this.nodes.length-1];a.icon&&(c.icon=(0,e.sanitizeText)(a.icon,b)),a.class&&(c.class=(0,e.sanitizeText)(a.class,b))}type2Str(a){switch(a){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(a,b){if(0===a.level?a.section=void 0:a.section=b,a.children)for(let[c,d]of a.children.entries()){let e=0===a.level?c%11:b;this.assignSections(d,e)}}flattenNodes(a,b){let c=(0,e.getConfig2)(),d=["mindmap-node"];!0===a.isRoot?d.push("section-root","section--1"):void 0!==a.section&&d.push(`section-${a.section}`),a.class&&d.push(a.class);let f=d.join(" "),h=(0,g.__name)(a=>{let b=(c.theme?.toLowerCase()??"").includes("redux");switch(a){case m.CIRCLE:return"mindmapCircle";case m.RECT:return"rect";case m.ROUNDED_RECT:return"rounded";case m.CLOUD:return"cloud";case m.BANG:return"bang";case m.HEXAGON:return"hexagon";case m.DEFAULT:return b?"rounded":"defaultMindmapNode";case m.NO_BORDER:default:return"rect"}},"getShapeFromType"),i={id:a.id.toString(),domId:"node_"+a.id.toString(),label:a.descr,labelType:"markdown",isGroup:!1,shape:h(a.type),width:a.width,height:a.height??0,padding:a.padding,cssClasses:f,cssStyles:[],look:c.look,icon:a.icon,x:a.x,y:a.y,level:a.level,nodeId:a.nodeId,type:a.type,section:a.section};if(b.push(i),a.children)for(let c of a.children)this.flattenNodes(c,b)}generateEdges(a,b){if(!a.children)return;let c=(0,e.getConfig2)();for(let d of a.children){let e="edge";void 0!==d.section&&(e+=` section-edge-${d.section}`);let f=a.level+1;e+=` edge-depth-${f}`;let g={id:`edge_${a.id}_${d.id}`,start:a.id.toString(),end:d.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:c.look,classes:e,depth:a.level,section:d.section};b.push(g),this.generateEdges(d,b)}}getData(){let a=this.getMindmap(),b=(0,e.getConfig2)();if(void 0!==(0,e.getUserDefinedConfig)().layout||(b.layout="cose-bilkent"),!a)return{nodes:[],edges:[],config:b};f.log.debug("getData: mindmapRoot",a,b),this.assignSections(a);let c=[],d=[];this.flattenNodes(a,c),this.generateEdges(a,d),f.log.debug(`getData: processed ${c.length} nodes and ${d.length} edges`);let g=new Map;for(let a of c)g.set(a.id,{shape:a.shape,width:a.width,height:a.height,padding:a.padding});return{nodes:c,edges:d,config:b,rootNode:a,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(g),type:"mindmap",diagramId:"mindmap-"+(0,h.v4)()}}getLogger(){return f.log}},o=(0,g.__name)(async(a,g,h,i)=>{f.log.debug("Rendering mindmap diagram\n"+a);let j=i.db,k=j.getData(),l=(0,b.getDiagramElement)(g,k.config.securityLevel);if(k.type=i.type,k.layoutAlgorithm=(0,d.getRegisteredLayoutAlgorithm)(k.config.layout,{fallback:"cose-bilkent"}),k.diagramId=g,!j.getMindmap())return;k.nodes.forEach(a=>{"rounded"===a.shape?(a.radius=15,a.taper=15,a.stroke="none",a.width=0,a.padding=15):"circle"===a.shape?a.padding=10:"rect"===a.shape?(a.width=0,a.padding=10):"hexagon"===a.shape&&(a.width=0,a.height=0)}),await (0,d.render)(k,l);let{themeVariables:m}=(0,e.getConfig)(),{useGradient:n,gradientStart:o,gradientStop:p}=m;if(n&&o&&p){let a=l.attr("id"),b=l.append("defs").append("linearGradient").attr("id",`${a}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");b.append("stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),b.append("stop").attr("offset","100%").attr("stop-color",p).attr("stop-opacity",1)}(0,c.setupViewPortForSVG)(l,k.config.mindmap?.padding??e.defaultConfig_default.mindmap.padding,"mindmapDiagram",k.config.mindmap?.useMaxWidth??e.defaultConfig_default.mindmap.useMaxWidth)},"draw"),p=(0,g.__name)(a=>{let{theme:b,look:c}=a,d="";for(let b=0;b<a.THEME_COLOR_LIMIT;b++)a["lineColor"+b]=a["lineColor"+b]||a["cScaleInv"+b],(0,k.isDark)(a["lineColor"+b])?a["lineColor"+b]=(0,j.lighten)(a["lineColor"+b],20):a["lineColor"+b]=(0,i.darken)(a["lineColor"+b],20);for(let e=0;e<a.THEME_COLOR_LIMIT;e++){let f=""+("neo"===c?Math.max(10-(e-1)*2,2):17-3*e);d+=`
|
|
2
2
|
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} polygon, .section-${e-1} path {
|
|
3
3
|
fill: ${a["cScale"+e]};
|
|
4
4
|
}
|
|
@@ -40,18 +40,18 @@ module.exports=[790158,a=>{"use strict";var b=a.i(898197),c=a.i(671199),d=a.i(88
|
|
|
40
40
|
[data-look="neo"].mindmap-node.section-${e-1} text {
|
|
41
41
|
fill: ${"redux"===b||"redux-dark"===b?a.nodeBorder:a["cScaleLabel"+("neutral"===b?1:e)]};
|
|
42
42
|
}
|
|
43
|
-
`}return d},"genSections"),
|
|
43
|
+
`}return d},"genSections"),q=(0,g.__name)((a,b,c)=>{let d="";for(let e=0;e<a;e++)d+=`
|
|
44
44
|
[data-look="neo"].mindmap-node.section-${e-1} rect, [data-look="neo"].mindmap-node.section-${e-1} path, [data-look="neo"].mindmap-node.section-${e-1} circle, [data-look="neo"].mindmap-node.section-${e-1} polygon {
|
|
45
45
|
stroke: url(${b}-gradient);
|
|
46
46
|
fill: ${c};
|
|
47
47
|
}
|
|
48
48
|
.section-${e-1} line {
|
|
49
49
|
stroke-width: 0;
|
|
50
|
-
}`;return d},"genGradient"),
|
|
50
|
+
}`;return d},"genGradient"),r=(0,g.__name)(a=>{let{theme:b}=a,c=a.svgId,d=a.dropShadow?a.dropShadow.replace("url(#drop-shadow)",`url(${c}-drop-shadow)`):"none";return`
|
|
51
51
|
.edge {
|
|
52
52
|
stroke-width: 3;
|
|
53
53
|
}
|
|
54
|
-
${
|
|
54
|
+
${p(a)}
|
|
55
55
|
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
56
56
|
fill: ${a.git0};
|
|
57
57
|
}
|
|
@@ -86,7 +86,7 @@ module.exports=[790158,a=>{"use strict";var b=a.i(898197),c=a.i(671199),d=a.i(88
|
|
|
86
86
|
[data-look="neo"].mindmap-node.section-root .text-inner-tspan {
|
|
87
87
|
fill: ${b?.includes("redux")?a.nodeBorder:a["cScaleLabel"+ +("neutral"===b)]};
|
|
88
88
|
}
|
|
89
|
-
${a.useGradient&&c&&a.mainBkg?
|
|
90
|
-
`},"getStyles");a.s(["diagram",0,{get db(){return new
|
|
89
|
+
${a.useGradient&&c&&a.mainBkg?q(a.THEME_COLOR_LIMIT,c,a.mainBkg):""}
|
|
90
|
+
`},"getStyles");a.s(["diagram",0,{get db(){return new n},renderer:{draw:o},parser:l,styles:r}])}];
|
|
91
91
|
|
|
92
92
|
//# sourceMappingURL=1daa_mermaid_dist_chunks_mermaid_core_mindmap-definition-YA3MSWOX_mjs_19k8byt._.js.map
|