wiki-viewer 2.11.7 → 2.12.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.
Files changed (158) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/standalone/.next/build-manifest.json +5 -5
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/required-server-files.json +4 -4
  6. package/.next/standalone/.next/routes-manifest.json +6 -0
  7. package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +2 -2
  8. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +2 -2
  16. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/api/agent/activity/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/agent/events/[...path]/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/agent/files/[...path]/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js +1 -1
  21. package/.next/standalone/.next/server/app/api/agent/fs/file/[...path]/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/agent/fs/ls/[[...path]]/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/agent/fs/move/route.js +1 -1
  24. package/.next/standalone/.next/server/app/api/agent/fs/move/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/agent/fs/search/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/agent/internal/span/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/agent/settings/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/agent/sidecar/[...path]/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/agents/install/route.js +1 -1
  30. package/.next/standalone/.next/server/app/api/agents/install/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/agents/skill/route.js +1 -1
  32. package/.next/standalone/.next/server/app/api/agents/skill/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/agents/skill.tar.gz/route.js +1 -1
  34. package/.next/standalone/.next/server/app/api/agents/skill.tar.gz/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/app-proxy/[...path]/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/assets/[...path]/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/pdf/save/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/share/[token]/asset/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/share/[token]/route.js +3 -4
  40. package/.next/standalone/.next/server/app/api/share/[token]/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/share/route.js +1 -1
  42. package/.next/standalone/.next/server/app/api/share/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/system/browse/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/system/reveal/route.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/api/system/workspaces/[id]/branch/route.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/api/system/workspaces/[id]/open/route.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/api/system/workspaces/[id]/refresh/route.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/api/system/workspaces/[id]/route.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/api/system/workspaces/route.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/api/upload/[...path]/route.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/api/wiki/app/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/api/wiki/backlinks/route.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/api/wiki/content/route.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/api/wiki/download/route.js.nft.json +1 -1
  55. package/.next/standalone/.next/server/app/api/wiki/folder/route.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/api/wiki/git-branches/route.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/api/wiki/git-checkout/route.js.nft.json +1 -1
  58. package/.next/standalone/.next/server/app/api/wiki/git-diff/route.js.nft.json +1 -1
  59. package/.next/standalone/.next/server/app/api/wiki/git-file-info/route.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/api/wiki/git-history/route.js.nft.json +1 -1
  61. package/.next/standalone/.next/server/app/api/wiki/git-pull/route.js.nft.json +1 -1
  62. package/.next/standalone/.next/server/app/api/wiki/move/route.js.nft.json +1 -1
  63. package/.next/standalone/.next/server/app/api/wiki/new-file/route.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/api/wiki/outlinks/route.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/api/wiki/page/route.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/api/wiki/presence/route.js.nft.json +1 -1
  67. package/.next/standalone/.next/server/app/api/wiki/route.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/api/wiki/scratch/route/app-paths-manifest.json +3 -0
  69. package/.next/standalone/.next/server/app/api/wiki/scratch/route/build-manifest.json +9 -0
  70. package/.next/standalone/.next/server/app/api/wiki/scratch/route/server-reference-manifest.json +4 -0
  71. package/.next/standalone/.next/server/app/api/wiki/scratch/route.js +16 -0
  72. package/.next/standalone/.next/server/app/api/wiki/scratch/route.js.map +5 -0
  73. package/.next/standalone/.next/server/app/api/wiki/scratch/route.js.nft.json +1 -0
  74. package/.next/standalone/.next/server/app/api/wiki/scratch/route_client-reference-manifest.js +3 -0
  75. package/.next/standalone/.next/server/app/api/wiki/search/route.js +1 -1
  76. package/.next/standalone/.next/server/app/api/wiki/search/route.js.nft.json +1 -1
  77. package/.next/standalone/.next/server/app/api/wiki/slugs/route.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/api/wiki/upload/route.js.nft.json +1 -1
  79. package/.next/standalone/.next/server/app/api/wiki/watch/route.js.nft.json +1 -1
  80. package/.next/standalone/.next/server/app/page/build-manifest.json +2 -2
  81. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  82. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  83. package/.next/standalone/.next/server/app/s/[token]/page/build-manifest.json +2 -2
  84. package/.next/standalone/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/signin/page/build-manifest.json +2 -2
  86. package/.next/standalone/.next/server/app/signin/page_client-reference-manifest.js +1 -1
  87. package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  88. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0pyc~jf._.js → [root-of-the-server]__05o3qcm._.js} +2 -2
  89. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0kuwuwk._.js → [root-of-the-server]__07wa2lq._.js} +2 -2
  90. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0bpv09n._.js +20 -0
  91. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0269d2e._.js → [root-of-the-server]__0mgvfb5._.js} +2 -2
  92. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0_5~w8k._.js → [root-of-the-server]__0n2r6u9._.js} +2 -2
  93. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qpqspq._.js +3 -0
  94. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__05tbv~.._.js → [root-of-the-server]__0q~ky91._.js} +2 -2
  95. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0uja7sb._.js +3 -0
  96. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__00sn-o5._.js → [root-of-the-server]__0xoz8e8._.js} +2 -2
  97. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0t4nr00._.js → [root-of-the-server]__10pak1_._.js} +2 -2
  98. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_system_workspaces_[id]_open_route_actions_1087xu7.js +1 -1
  99. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_wiki_scratch_route_actions_07i6~7z.js +3 -0
  100. package/.next/standalone/.next/server/chunks/src_0pwns~4._.js +3 -0
  101. package/.next/standalone/.next/server/chunks/ssr/{0~w0_katex_dist_katex_mjs_12tyg_2._.js → 0~w0_katex_dist_katex_mjs_0-fyxoz._.js} +1 -1
  102. package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-5ZQYHXKU_mjs_0z1.978._.js +1 -1
  103. package/.next/standalone/.next/server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-KSCS5N6A_mjs_0v4oeem._.js +1 -1
  104. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vp_6mg._.js → [root-of-the-server]__0~4py6h._.js} +2 -2
  105. package/.next/standalone/.next/server/chunks/ssr/_0oq8kwv._.js +18 -18
  106. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0mlbfkr._.js → node_modules__pnpm_0.xieh4._.js} +1 -1
  107. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0j.6d4e._.js → node_modules__pnpm_01~03ak._.js} +1 -1
  108. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0ko9~5a._.js → node_modules__pnpm_02qa21p._.js} +1 -1
  109. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0wks2mj._.js → node_modules__pnpm_05c~go7._.js} +2 -2
  110. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0z3vu9g._.js → node_modules__pnpm_07hg43b._.js} +1 -1
  111. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0c7mg2j._.js → node_modules__pnpm_09y5c~i._.js} +1 -1
  112. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_04.xdv4._.js → node_modules__pnpm_0_g0a7t._.js} +1 -1
  113. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0e_u7-~._.js → node_modules__pnpm_0_zd0nt._.js} +1 -1
  114. package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0a4su30._.js +1 -1
  115. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_03z~hj.._.js → node_modules__pnpm_0b6_242._.js} +1 -1
  116. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_01vjz.e._.js → node_modules__pnpm_0c6q9~6._.js} +1 -1
  117. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_05xxz0p._.js → node_modules__pnpm_0d4-t2b._.js} +1 -1
  118. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0pq4fcx._.js → node_modules__pnpm_0f0qocb._.js} +1 -1
  119. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0m4ord.._.js → node_modules__pnpm_0f6r-u~._.js} +2 -2
  120. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0k1lm~x._.js → node_modules__pnpm_0f9artj._.js} +2 -2
  121. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0l-zh.x._.js → node_modules__pnpm_0g_tlt-._.js} +1 -1
  122. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0dkpe61._.js → node_modules__pnpm_0ghm84g._.js} +2 -2
  123. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0y~gqyx._.js → node_modules__pnpm_0k6yfdh._.js} +2 -2
  124. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0yw839x._.js → node_modules__pnpm_0kib6pw._.js} +1 -1
  125. package/.next/standalone/.next/server/chunks/ssr/node_modules__pnpm_0o~d81.._.js +1 -1
  126. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0.a-6pb._.js → node_modules__pnpm_0pggrwu._.js} +2 -2
  127. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0d_jgm8._.js → node_modules__pnpm_0q9s5k5._.js} +1 -1
  128. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0~1a~df._.js → node_modules__pnpm_0q_v1_2._.js} +1 -1
  129. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0hlvme9._.js → node_modules__pnpm_0sdy2lv._.js} +1 -1
  130. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_077radr._.js → node_modules__pnpm_0tvmv0e._.js} +2 -2
  131. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0e7k2ai._.js → node_modules__pnpm_0v7wopg._.js} +1 -1
  132. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_05b80e_._.js → node_modules__pnpm_0vahm7l._.js} +1 -1
  133. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_11e33_1._.js → node_modules__pnpm_0zdl7-7._.js} +1 -1
  134. package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_05-ipmg._.js → node_modules__pnpm_0~wqhb9._.js} +1 -1
  135. package/.next/standalone/.next/server/instrumentation.js +1 -1
  136. package/.next/standalone/.next/server/middleware-build-manifest.js +5 -5
  137. package/.next/standalone/.next/server/pages/500.html +1 -1
  138. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  139. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  140. package/.next/standalone/.next/static/chunks/0gogvjz6oxo51.css +1 -0
  141. package/.next/standalone/.next/static/chunks/{08usk_~k6d0yf.js → 0k31ncl7m_j9q.js} +2 -2
  142. package/.next/standalone/.next/static/chunks/{0x6s~jkd4xkpx.js → 11ehczv8yax~_.js} +23 -23
  143. package/.next/standalone/.next/static/chunks/{turbopack-0~8fsjmdvb_1i.js → turbopack-1105gjd__15ti.js} +1 -1
  144. package/.next/standalone/.test-floor +1 -1
  145. package/.next/standalone/package.json +1 -1
  146. package/.next/standalone/server.js +1 -1
  147. package/.next/standalone/specs/changes/scratchpad/design.md +156 -0
  148. package/.next/standalone/specs/changes/scratchpad/proposal.md +82 -0
  149. package/.next/standalone/specs/changes/scratchpad/requirements.md +83 -0
  150. package/.next/standalone/specs/changes/scratchpad/tasks.md +45 -0
  151. package/package.json +1 -1
  152. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0k46u9j._.js +0 -3
  153. package/.next/standalone/.next/server/chunks/[root-of-the-server]__11ltgmp._.js +0 -20
  154. package/.next/standalone/.next/server/chunks/src_0ks~u~e._.js +0 -3
  155. package/.next/standalone/.next/static/chunks/0h9okx8g~3~jd.css +0 -1
  156. /package/.next/standalone/.next/static/{N4JUwvz_xf2GOGFJN02sZ → AsrmwC0YfrYEMAXj2s0Wx}/_buildManifest.js +0 -0
  157. /package/.next/standalone/.next/static/{N4JUwvz_xf2GOGFJN02sZ → AsrmwC0YfrYEMAXj2s0Wx}/_clientMiddlewareManifest.js +0 -0
  158. /package/.next/standalone/.next/static/{N4JUwvz_xf2GOGFJN02sZ → AsrmwC0YfrYEMAXj2s0Wx}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- module.exports=[814747,(e,t,a)=>{t.exports=e.x("path",()=>require("path"))},224361,(e,t,a)=>{t.exports=e.x("util",()=>require("util"))},688947,(e,t,a)=>{t.exports=e.x("stream",()=>require("stream"))},427699,(e,t,a)=>{t.exports=e.x("events",()=>require("events"))},228064,e=>{"use strict";var t=e.i(666680),a=e.i(912714),r=e.i(660526),n=e.i(750227),i=e.i(832852);let s="__registry__",o=new Map;function l(){let e=process.env.HOME??r.default.homedir();return n.default.join(e,".wiki-viewer")}function u(){return n.default.join(l(),"agents.json")}function c(e){return(0,t.createHash)("sha256").update(e,"utf8").digest("hex")}async function d(){try{let e=await (0,a.readFile)(u(),"utf8"),t=JSON.parse(e);return{version:1,agents:Array.isArray(t.agents)?t.agents:[]}}catch{return null}}async function p(e){await (0,a.mkdir)(l(),{recursive:!0});let t=u()+".tmp";await (0,a.writeFile)(t,JSON.stringify(e,null,2),{encoding:"utf8",mode:384});try{await (0,a.chmod)(t,384)}catch{}await (0,a.rename)(t,u())}async function h(){let e=await d();if(e)return e;let t={version:1,agents:[]};return await p(t),t}async function f(e){let a=await d();if(!a)return null;let r=c(e);for(let e of a.agents)if(function(e,a){let r=Buffer.from(e.padEnd(64,"0"),"utf8"),n=Buffer.from(a.padEnd(64,"0"),"utf8");return r.length===n.length&&(0,t.timingSafeEqual)(r,n)&&e.length===a.length}(e.tokenHash,r))return e;return null}async function m(e){await (0,i.withFileMutex)(s,async()=>{let t=await h(),a=t.agents.findIndex(t=>t.id===e.id);a>=0?t.agents[a]=e:t.agents.push(e),await p(t)})}async function g(e){return(0,i.withFileMutex)(s,async()=>{let t=await d();if(!t)return!1;let a=t.agents.length;return t.agents=t.agents.filter(t=>t.id!==e),t.agents.length!==a&&(await p(t),!0)})}async function w(e){Date.now()-(o.get(e)??0)<3e4||await (0,i.withFileMutex)(s,async()=>{let t=await d();if(!t)return;let a=t.agents.find(t=>t.id===e);a&&(a.lastSeen=new Date().toISOString(),o.set(e,Date.now()),await p(t))})}e.s(["addAgent",0,m,"hashToken",0,c,"lookupAgentByToken",0,f,"readRegistry",0,d,"removeAgent",0,g,"updateLastSeen",0,w])},215043,552350,e=>{"use strict";var t=e.i(228064);function a(e,t){return(function(e){let t="^",a=0;for(;a<e.length;)"*"===e[a]&&"*"===e[a+1]?(t+=".*","/"===e[a+=2]&&(t+="(?:.+/)?",a++)):("*"===e[a]?t+="[^/]*":"?"===e[a]?t+="[^/]":t+=e[a].replace(/[.+^${}()|[\]\\]/g,"\\$&"),a++);return new RegExp(t+="$")})(e).test(t)}e.s(["matchGlob",0,a],552350);var r=e.i(254226);async function n(e){let a=await (0,r.getSessionFromRequest)(e);if(a?.user){let e=a.user;return{ok:!0,agent:{id:`user:${e.id}`,displayName:e.name,tokenHash:"",scope:{paths:["**/*"],ops:["read","mutate","delete"]},createdAt:"",lastSeen:""}}}let n=e.headers.get("authorization")??"",i=n.startsWith("Bearer ")?n.slice(7).trim():"";if(!i)return{ok:!1,code:"UNAUTHORIZED",message:"No credentials"};let s=await (0,t.lookupAgentByToken)(i);if(!s)return{ok:!1,code:"UNAUTHORIZED",message:"Unknown or invalid token"};let o=e.headers.get("x-agent-id")??"";return o?o!==s.id?{ok:!1,code:"UNAUTHORIZED",message:"X-Agent-Id does not match token owner"}:((0,t.updateLastSeen)(s.id),{ok:!0,agent:s}):{ok:!1,code:"UNAUTHORIZED",message:"X-Agent-Id header required"}}process.env.AGENT_BEARER_TOKEN&&console.warn("[wiki-viewer] AGENT_BEARER_TOKEN is no longer used; manage agents via the AI Panel."),e.s(["checkAuth",0,n,"enforceScope",0,function(e,t){let{scope:r}=e;return void 0!==r.workspaceId&&void 0!==t.workspaceId&&r.workspaceId!==t.workspaceId?{ok:!1,code:"FORBIDDEN",message:`Agent scope does not cover workspace "${t.workspaceId}" (granted: "${r.workspaceId}")`}:r.ops.includes(t.op)?t.filePath&&!r.paths.some(e=>a(e,t.filePath))?{ok:!1,code:"FORBIDDEN",message:`Agent scope does not cover path "${t.filePath}"`}:{ok:!0}:{ok:!1,code:"FORBIDDEN",message:`Agent scope does not allow "${t.op}"`}},"verifyBy",0,function(e,t){return e.id.startsWith("user:")?!t||"owner"===t||"human"===t||t.startsWith("human:")||t===e.id?{ok:!0}:{ok:!1,code:"FORBIDDEN",message:'User agent must use "human", "owner", or own id in "by" field'}:t!==e.id?{ok:!1,code:"FORBIDDEN",message:`"by" field must equal agent id "${e.id}"`}:{ok:!0}}],215043)},973909,e=>{"use strict";var t=e.i(912714),a=e.i(750227);function r(e,t){return a.default.join(e,".proof",t+".json")}async function n(e,a){let n=r(e,a);try{let e=await (0,t.readFile)(n,"utf-8"),a=JSON.parse(e);if(1!==a.schemaVersion)throw Error(`Sidecar schema version mismatch: expected 1, got ${a.schemaVersion}`);return a}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)return null;throw e}}async function i(e,n,i){let s=r(e,n);await (0,t.mkdir)(a.default.dirname(s),{recursive:!0});let o=s+".tmp";await (0,t.writeFile)(o,JSON.stringify(i,null,2),"utf-8"),await (0,t.rename)(o,s)}async function s(e,n,i){let s=r(e,n),o=r(e,i);try{await (0,t.mkdir)(a.default.dirname(o),{recursive:!0}),await (0,t.rename)(s,o)}catch(e){if("ENOENT"===e.code)return;throw e}}async function o(e,a){let n=r(e,a);try{await (0,t.unlink)(n)}catch(e){if("ENOENT"===e.code)return;throw e}}e.s(["deleteSidecar",0,o,"emptySidecar",0,function(e){let t=new Date().toISOString();return{schemaVersion:1,path:e,revision:0,createdAt:t,updatedAt:t,refMap:{},refAliases:{},comments:[],suggestions:[],archivedSuggestions:[],events:[],nextEventId:1,lastAck:{},fingerprint:"",blockProvenance:{}}},"moveSidecar",0,s,"readSidecar",0,n,"writeSidecar",0,i])},536654,e=>{"use strict";var t=e.i(912714),a=e.i(750227);function r(e){return!!(a.default.isAbsolute(e)||".."===e||e.startsWith(".."+a.default.sep)||e.startsWith("../"))}async function n(e,i,s={}){let o;if(!e)return null;let l=function(e){if(e.includes("\0")||a.default.isAbsolute(e))return null;let t=e.replace(/\\/g,"/");return(("."===(t=a.default.posix.normalize(t))||"./"===t)&&(t=""),".."===t||t.startsWith("../")||/^[a-zA-Z]:\//.test(t)||t.startsWith("/"))?null:t}(i);if(null===l)return null;if(s.deniedSegments?.length){for(let e of l.split("/").filter(Boolean))if(s.deniedSegments.includes(e))return null}try{o=await (0,t.realpath)(e)}catch{return null}let u=l?a.default.join(o,l):o;try{let e=await (0,t.realpath)(u),n=a.default.relative(o,e);if(r(n))return null;return{relPath:l,absolutePath:e}}catch{if(!s.allowMissing)return null;let e=u;for(;;){let n=a.default.dirname(e);if(n===e)break;try{let e=await (0,t.realpath)(n),i=a.default.relative(o,e);if(r(i))return null;return{relPath:l,absolutePath:u}}catch{e=n}}return null}}e.s(["resolveWorkspacePath",0,n])},848475,e=>{"use strict";var t=e.i(750227);let a={".md":"text/markdown; charset=utf-8",".markdown":"text/markdown; charset=utf-8",".txt":"text/plain; charset=utf-8",".json":"application/json; charset=utf-8",".jsonc":"application/json; charset=utf-8",".ts":"text/typescript; charset=utf-8",".tsx":"text/typescript; charset=utf-8",".mts":"text/typescript; charset=utf-8",".js":"text/javascript; charset=utf-8",".jsx":"text/javascript; charset=utf-8",".mjs":"text/javascript; charset=utf-8",".html":"text/html; charset=utf-8",".htm":"text/html; charset=utf-8",".css":"text/css; charset=utf-8",".yaml":"text/yaml; charset=utf-8",".yml":"text/yaml; charset=utf-8",".toml":"text/toml; charset=utf-8",".xml":"application/xml; charset=utf-8",".svg":"image/svg+xml",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".ico":"image/x-icon",".bmp":"image/bmp",".pdf":"application/pdf",".zip":"application/zip",".tar":"application/x-tar",".gz":"application/gzip",".py":"text/x-python; charset=utf-8",".rs":"text/x-rustsrc; charset=utf-8",".go":"text/x-go; charset=utf-8",".sh":"text/x-shellscript; charset=utf-8",".csv":"text/csv; charset=utf-8",".tsv":"text/tab-separated-values; charset=utf-8",".env":"text/plain; charset=utf-8",".log":"text/plain; charset=utf-8",".ini":"text/plain; charset=utf-8",".conf":"text/plain; charset=utf-8",".mmd":"text/plain; charset=utf-8",".ipynb":"application/json; charset=utf-8",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".doc":"application/msword",".xls":"application/vnd.ms-excel",".ppt":"application/vnd.ms-powerpoint",".mp4":"video/mp4",".webm":"video/webm",".mov":"video/quicktime",".m4v":"video/mp4",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".m4a":"audio/mp4",".aac":"audio/aac"};e.s(["contentTypeForPath",0,function(e){return a[t.default.extname(e).toLowerCase()]??"application/octet-stream"}])},719126,e=>{"use strict";var t=e.i(666680),a=e.i(912714),r=e.i(750227),n=e.i(536654),i=e.i(848475);async function s(e,t){if(!e)return null;let a=await (0,n.resolveWorkspacePath)(e,t,{allowMissing:!0,deniedSegments:[".proof",".git"]});return a?.absolutePath??null}async function o(e,t){let r=420;try{let t=await (0,a.stat)(e);r=511&t.mode}catch{}let n=e+".~"+process.pid+"."+Date.now()+".tmp",i=await (0,a.open)(n,"w",r);try{await i.write(t),await i.datasync()}finally{await i.close()}await (0,a.rename)(n,e)}async function l(e,t){let n=r.default.dirname(e);if(t)return await (0,a.mkdir)(n,{recursive:!0}),!0;try{return await (0,a.stat)(n),!0}catch{return!1}}e.s(["atomicWrite",0,o,"ensureParentDir",0,l,"extractShaHex",0,function(e){return e.replace(/^"/,"").replace(/"$/,"").replace(/^sha256:/,"")},"isDeniedRelPath",0,function(e){let t=e.replace(/\\/g,"/");return".proof"===t||t.startsWith(".proof/")||".git"===t||t.startsWith(".git/")},"isMarkdown",0,function(e){return e.endsWith(".md")||e.endsWith(".markdown")},"looksLikeBinary",0,function(e){return e.slice(0,Math.min(e.length,8192)).includes(0)},"mimeByExt",0,function(e){return(0,i.contentTypeForPath)(e)},"safeAbsPath",0,s,"sha256ofBuf",0,function(e){return"sha256:"+(0,t.createHash)("sha256").update(e).digest("hex")}])},487018,e=>{"use strict";var t=e.x("node:sqlite",()=>require("node:sqlite"),!0);function a(e){return 1===e.length&&Array.isArray(e[0])?e[0]:e}class r{stmt;constructor(e){this.stmt=e}get reader(){return this.stmt.columns().length>0}all(...e){let t=a(e);return this.stmt.all(...t)}get(...e){let t=a(e);return this.stmt.get(...t)}run(...e){let t=a(e),r=this.stmt.run(...t);return{changes:Number(r.changes),lastInsertRowid:Number(r.lastInsertRowid)}}iterate(...e){let t=a(e);return this.stmt.iterate(...t)}}class n{db;constructor(e){this.db=new t.DatabaseSync(e),this.db.exec("PRAGMA busy_timeout = 5000"),this.db.exec("PRAGMA journal_mode = WAL")}prepare(e){return new r(this.db.prepare(e))}exec(e){this.db.exec(e)}close(){this.db.close()}pragma(e){this.db.exec(`PRAGMA ${e}`)}}e.s(["default",()=>n])},670910,e=>{"use strict";var t=e.i(487018),a=e.i(750227),r=e.i(660526),n=e.i(902157);let i=null;e.s(["writeAuditRow",0,function(e){try{(function(){if(i)return i;let e=a.default.join(process.env.HOME??r.default.homedir(),".wiki-viewer");(0,n.mkdirSync)(e,{recursive:!0});let s=a.default.join(e,"auth.db");(i=new t.default(s)).pragma("journal_mode = WAL"),i.exec(`
1
+ module.exports=[536654,e=>{"use strict";var t=e.i(912714),a=e.i(750227);function r(e){return!!(a.default.isAbsolute(e)||".."===e||e.startsWith(".."+a.default.sep)||e.startsWith("../"))}async function n(e,i,s={}){let o;if(!e)return null;let l=function(e){if(e.includes("\0")||a.default.isAbsolute(e))return null;let t=e.replace(/\\/g,"/");return(("."===(t=a.default.posix.normalize(t))||"./"===t)&&(t=""),".."===t||t.startsWith("../")||/^[a-zA-Z]:\//.test(t)||t.startsWith("/"))?null:t}(i);if(null===l)return null;if(s.deniedSegments?.length){for(let e of l.split("/").filter(Boolean))if(s.deniedSegments.includes(e))return null}try{o=await (0,t.realpath)(e)}catch{return null}let u=l?a.default.join(o,l):o;try{let e=await (0,t.realpath)(u),n=a.default.relative(o,e);if(r(n))return null;return{relPath:l,absolutePath:e}}catch{if(!s.allowMissing)return null;let e=u;for(;;){let n=a.default.dirname(e);if(n===e)break;try{let e=await (0,t.realpath)(n),i=a.default.relative(o,e);if(r(i))return null;return{relPath:l,absolutePath:u}}catch{e=n}}return null}}e.s(["resolveWorkspacePath",0,n])},814747,(e,t,a)=>{t.exports=e.x("path",()=>require("path"))},224361,(e,t,a)=>{t.exports=e.x("util",()=>require("util"))},688947,(e,t,a)=>{t.exports=e.x("stream",()=>require("stream"))},427699,(e,t,a)=>{t.exports=e.x("events",()=>require("events"))},228064,e=>{"use strict";var t=e.i(666680),a=e.i(912714),r=e.i(660526),n=e.i(750227),i=e.i(832852);let s="__registry__",o=new Map;function l(){let e=process.env.HOME??r.default.homedir();return n.default.join(e,".wiki-viewer")}function u(){return n.default.join(l(),"agents.json")}function c(e){return(0,t.createHash)("sha256").update(e,"utf8").digest("hex")}async function d(){try{let e=await (0,a.readFile)(u(),"utf8"),t=JSON.parse(e);return{version:1,agents:Array.isArray(t.agents)?t.agents:[]}}catch{return null}}async function p(e){await (0,a.mkdir)(l(),{recursive:!0});let t=u()+".tmp";await (0,a.writeFile)(t,JSON.stringify(e,null,2),{encoding:"utf8",mode:384});try{await (0,a.chmod)(t,384)}catch{}await (0,a.rename)(t,u())}async function h(){let e=await d();if(e)return e;let t={version:1,agents:[]};return await p(t),t}async function f(e){let a=await d();if(!a)return null;let r=c(e);for(let e of a.agents)if(function(e,a){let r=Buffer.from(e.padEnd(64,"0"),"utf8"),n=Buffer.from(a.padEnd(64,"0"),"utf8");return r.length===n.length&&(0,t.timingSafeEqual)(r,n)&&e.length===a.length}(e.tokenHash,r))return e;return null}async function m(e){await (0,i.withFileMutex)(s,async()=>{let t=await h(),a=t.agents.findIndex(t=>t.id===e.id);a>=0?t.agents[a]=e:t.agents.push(e),await p(t)})}async function g(e){return(0,i.withFileMutex)(s,async()=>{let t=await d();if(!t)return!1;let a=t.agents.length;return t.agents=t.agents.filter(t=>t.id!==e),t.agents.length!==a&&(await p(t),!0)})}async function w(e){Date.now()-(o.get(e)??0)<3e4||await (0,i.withFileMutex)(s,async()=>{let t=await d();if(!t)return;let a=t.agents.find(t=>t.id===e);a&&(a.lastSeen=new Date().toISOString(),o.set(e,Date.now()),await p(t))})}e.s(["addAgent",0,m,"hashToken",0,c,"lookupAgentByToken",0,f,"readRegistry",0,d,"removeAgent",0,g,"updateLastSeen",0,w])},215043,552350,e=>{"use strict";var t=e.i(228064);function a(e,t){return(function(e){let t="^",a=0;for(;a<e.length;)"*"===e[a]&&"*"===e[a+1]?(t+=".*","/"===e[a+=2]&&(t+="(?:.+/)?",a++)):("*"===e[a]?t+="[^/]*":"?"===e[a]?t+="[^/]":t+=e[a].replace(/[.+^${}()|[\]\\]/g,"\\$&"),a++);return new RegExp(t+="$")})(e).test(t)}e.s(["matchGlob",0,a],552350);var r=e.i(254226);async function n(e){let a=await (0,r.getSessionFromRequest)(e);if(a?.user){let e=a.user;return{ok:!0,agent:{id:`user:${e.id}`,displayName:e.name,tokenHash:"",scope:{paths:["**/*"],ops:["read","mutate","delete"]},createdAt:"",lastSeen:""}}}let n=e.headers.get("authorization")??"",i=n.startsWith("Bearer ")?n.slice(7).trim():"";if(!i)return{ok:!1,code:"UNAUTHORIZED",message:"No credentials"};let s=await (0,t.lookupAgentByToken)(i);if(!s)return{ok:!1,code:"UNAUTHORIZED",message:"Unknown or invalid token"};let o=e.headers.get("x-agent-id")??"";return o?o!==s.id?{ok:!1,code:"UNAUTHORIZED",message:"X-Agent-Id does not match token owner"}:((0,t.updateLastSeen)(s.id),{ok:!0,agent:s}):{ok:!1,code:"UNAUTHORIZED",message:"X-Agent-Id header required"}}process.env.AGENT_BEARER_TOKEN&&console.warn("[wiki-viewer] AGENT_BEARER_TOKEN is no longer used; manage agents via the AI Panel."),e.s(["checkAuth",0,n,"enforceScope",0,function(e,t){let{scope:r}=e;return void 0!==r.workspaceId&&void 0!==t.workspaceId&&r.workspaceId!==t.workspaceId?{ok:!1,code:"FORBIDDEN",message:`Agent scope does not cover workspace "${t.workspaceId}" (granted: "${r.workspaceId}")`}:r.ops.includes(t.op)?t.filePath&&!r.paths.some(e=>a(e,t.filePath))?{ok:!1,code:"FORBIDDEN",message:`Agent scope does not cover path "${t.filePath}"`}:{ok:!0}:{ok:!1,code:"FORBIDDEN",message:`Agent scope does not allow "${t.op}"`}},"verifyBy",0,function(e,t){return e.id.startsWith("user:")?!t||"owner"===t||"human"===t||t.startsWith("human:")||t===e.id?{ok:!0}:{ok:!1,code:"FORBIDDEN",message:'User agent must use "human", "owner", or own id in "by" field'}:t!==e.id?{ok:!1,code:"FORBIDDEN",message:`"by" field must equal agent id "${e.id}"`}:{ok:!0}}],215043)},973909,e=>{"use strict";var t=e.i(912714),a=e.i(750227);function r(e,t){return a.default.join(e,".proof",t+".json")}async function n(e,a){let n=r(e,a);try{let e=await (0,t.readFile)(n,"utf-8"),a=JSON.parse(e);if(1!==a.schemaVersion)throw Error(`Sidecar schema version mismatch: expected 1, got ${a.schemaVersion}`);return a}catch(e){if(e instanceof Error&&"code"in e&&"ENOENT"===e.code)return null;throw e}}async function i(e,n,i){let s=r(e,n);await (0,t.mkdir)(a.default.dirname(s),{recursive:!0});let o=s+".tmp";await (0,t.writeFile)(o,JSON.stringify(i,null,2),"utf-8"),await (0,t.rename)(o,s)}async function s(e,n,i){let s=r(e,n),o=r(e,i);try{await (0,t.mkdir)(a.default.dirname(o),{recursive:!0}),await (0,t.rename)(s,o)}catch(e){if("ENOENT"===e.code)return;throw e}}async function o(e,a){let n=r(e,a);try{await (0,t.unlink)(n)}catch(e){if("ENOENT"===e.code)return;throw e}}e.s(["deleteSidecar",0,o,"emptySidecar",0,function(e){let t=new Date().toISOString();return{schemaVersion:1,path:e,revision:0,createdAt:t,updatedAt:t,refMap:{},refAliases:{},comments:[],suggestions:[],archivedSuggestions:[],events:[],nextEventId:1,lastAck:{},fingerprint:"",blockProvenance:{}}},"moveSidecar",0,s,"readSidecar",0,n,"writeSidecar",0,i])},848475,e=>{"use strict";var t=e.i(750227);let a={".md":"text/markdown; charset=utf-8",".markdown":"text/markdown; charset=utf-8",".txt":"text/plain; charset=utf-8",".json":"application/json; charset=utf-8",".jsonc":"application/json; charset=utf-8",".ts":"text/typescript; charset=utf-8",".tsx":"text/typescript; charset=utf-8",".mts":"text/typescript; charset=utf-8",".js":"text/javascript; charset=utf-8",".jsx":"text/javascript; charset=utf-8",".mjs":"text/javascript; charset=utf-8",".html":"text/html; charset=utf-8",".htm":"text/html; charset=utf-8",".css":"text/css; charset=utf-8",".yaml":"text/yaml; charset=utf-8",".yml":"text/yaml; charset=utf-8",".toml":"text/toml; charset=utf-8",".xml":"application/xml; charset=utf-8",".svg":"image/svg+xml",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".ico":"image/x-icon",".bmp":"image/bmp",".pdf":"application/pdf",".zip":"application/zip",".tar":"application/x-tar",".gz":"application/gzip",".py":"text/x-python; charset=utf-8",".rs":"text/x-rustsrc; charset=utf-8",".go":"text/x-go; charset=utf-8",".sh":"text/x-shellscript; charset=utf-8",".csv":"text/csv; charset=utf-8",".tsv":"text/tab-separated-values; charset=utf-8",".env":"text/plain; charset=utf-8",".log":"text/plain; charset=utf-8",".ini":"text/plain; charset=utf-8",".conf":"text/plain; charset=utf-8",".mmd":"text/plain; charset=utf-8",".ipynb":"application/json; charset=utf-8",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".doc":"application/msword",".xls":"application/vnd.ms-excel",".ppt":"application/vnd.ms-powerpoint",".mp4":"video/mp4",".webm":"video/webm",".mov":"video/quicktime",".m4v":"video/mp4",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".m4a":"audio/mp4",".aac":"audio/aac"};e.s(["contentTypeForPath",0,function(e){return a[t.default.extname(e).toLowerCase()]??"application/octet-stream"}])},719126,e=>{"use strict";var t=e.i(666680),a=e.i(912714),r=e.i(750227),n=e.i(536654),i=e.i(848475);async function s(e,t){if(!e)return null;let a=await (0,n.resolveWorkspacePath)(e,t,{allowMissing:!0,deniedSegments:[".proof",".git"]});return a?.absolutePath??null}async function o(e,t){let r=420;try{let t=await (0,a.stat)(e);r=511&t.mode}catch{}let n=e+".~"+process.pid+"."+Date.now()+".tmp",i=await (0,a.open)(n,"w",r);try{await i.write(t),await i.datasync()}finally{await i.close()}await (0,a.rename)(n,e)}async function l(e,t){let n=r.default.dirname(e);if(t)return await (0,a.mkdir)(n,{recursive:!0}),!0;try{return await (0,a.stat)(n),!0}catch{return!1}}e.s(["atomicWrite",0,o,"ensureParentDir",0,l,"extractShaHex",0,function(e){return e.replace(/^"/,"").replace(/"$/,"").replace(/^sha256:/,"")},"isDeniedRelPath",0,function(e){let t=e.replace(/\\/g,"/");return".proof"===t||t.startsWith(".proof/")||".git"===t||t.startsWith(".git/")},"isMarkdown",0,function(e){return e.endsWith(".md")||e.endsWith(".markdown")},"looksLikeBinary",0,function(e){return e.slice(0,Math.min(e.length,8192)).includes(0)},"mimeByExt",0,function(e){return(0,i.contentTypeForPath)(e)},"safeAbsPath",0,s,"sha256ofBuf",0,function(e){return"sha256:"+(0,t.createHash)("sha256").update(e).digest("hex")}])},487018,e=>{"use strict";var t=e.x("node:sqlite",()=>require("node:sqlite"),!0);function a(e){return 1===e.length&&Array.isArray(e[0])?e[0]:e}class r{stmt;constructor(e){this.stmt=e}get reader(){return this.stmt.columns().length>0}all(...e){let t=a(e);return this.stmt.all(...t)}get(...e){let t=a(e);return this.stmt.get(...t)}run(...e){let t=a(e),r=this.stmt.run(...t);return{changes:Number(r.changes),lastInsertRowid:Number(r.lastInsertRowid)}}iterate(...e){let t=a(e);return this.stmt.iterate(...t)}}class n{db;constructor(e){this.db=new t.DatabaseSync(e),this.db.exec("PRAGMA busy_timeout = 5000"),this.db.exec("PRAGMA journal_mode = WAL")}prepare(e){return new r(this.db.prepare(e))}exec(e){this.db.exec(e)}close(){this.db.close()}pragma(e){this.db.exec(`PRAGMA ${e}`)}}e.s(["default",()=>n])},670910,e=>{"use strict";var t=e.i(487018),a=e.i(750227),r=e.i(660526),n=e.i(902157);let i=null;e.s(["writeAuditRow",0,function(e){try{(function(){if(i)return i;let e=a.default.join(process.env.HOME??r.default.homedir(),".wiki-viewer");(0,n.mkdirSync)(e,{recursive:!0});let s=a.default.join(e,"auth.db");(i=new t.default(s)).pragma("journal_mode = WAL"),i.exec(`
2
2
  CREATE TABLE IF NOT EXISTS agent_fs_audit (
3
3
  id INTEGER PRIMARY KEY AUTOINCREMENT,
4
4
  agent_id TEXT NOT NULL,
@@ -13,4 +13,4 @@ module.exports=[814747,(e,t,a)=>{t.exports=e.x("path",()=>require("path"))},2243
13
13
  `);try{i.exec("ALTER TABLE agent_fs_audit ADD COLUMN workspace_id TEXT")}catch{}return i})().prepare(`INSERT INTO agent_fs_audit (agent_id, op, path, old_sha, new_sha, forced, at, workspace_id)
14
14
  VALUES (?, ?, ?, ?, ?, ?, ?, ?)`).run(e.agentId,e.op,e.path,e.oldSha??null,e.newSha??null,+!!e.forced,new Date().toISOString(),e.workspaceId??null)}catch(e){console.error("[agent-fs audit] write failed:",e)}}])},142343,e=>{"use strict";var t=e.i(364564),a=e.i(102095),r=e.i(691091),n=e.i(475331),i=e.i(490301),s=e.i(670943),o=e.i(690324),l=e.i(243133),u=e.i(404870),c=e.i(420180),d=e.i(867883),p=e.i(336708),h=e.i(682278),f=e.i(157569),m=e.i(844146),g=e.i(193695);e.i(105888);var w=e.i(530564),v=e.i(912714),y=e.i(750227),x=e.i(702414),A=e.i(215043),E=e.i(660038),_=e.i(359211),N=e.i(832852),k=e.i(973909),T=e.i(670910),R=e.i(719126);function I(e,t,a){return x.NextResponse.json({error:e,message:t},{status:a})}async function S(e){let t,a,r=await (0,A.checkAuth)(e);if(!r.ok)return I("UNAUTHORIZED",r.message??"Unauthorized",401);try{t=await e.json()}catch{return I("INVALID_PAYLOAD","Invalid JSON body",400)}if("string"!=typeof t.from||!t.from)return I("INVALID_PAYLOAD","from (string) required",400);if("string"!=typeof t.to||!t.to)return I("INVALID_PAYLOAD","to (string) required",400);let n=t.from,i=t.to,s="string"==typeof t.ifMatch?t.ifMatch:void 0,o=await (0,E.resolveWorkspaceForAgent)(e,"write");if(!o.ok)return I(o.code,o.code,o.status);let{ws:l,rootDir:u}=o;if(!(0,_.safeWorkspacePath)(u,n))return I("INVALID_PATH","from: path traversal rejected",400);if(!(0,_.safeWorkspacePath)(u,i))return I("INVALID_PATH","to: path traversal rejected",400);let c=await (0,R.safeAbsPath)(u,n);if(!c)return I("INVALID_PATH","from: path rejected (symlink escape or denied)",400);let d=await (0,R.safeAbsPath)(u,i);if(!d)return I("INVALID_PATH","to: path rejected (symlink escape or denied)",400);if(c===d)return I("INVALID_PATH","from and to are the same path",400);if(d.startsWith(c+y.default.sep))return I("INVALID_PATH","Cannot move a directory into itself",400);let p=(0,A.enforceScope)(r.agent,{filePath:n,op:"read",workspaceId:l.id});if(!p.ok)return I(p.code,p.message,403);let h=(0,A.enforceScope)(r.agent,{filePath:n,op:"mutate",workspaceId:l.id});if(!h.ok)return I(h.code,h.message,403);let f=(0,A.enforceScope)(r.agent,{filePath:i,op:"mutate",workspaceId:l.id});if(!f.ok)return I(f.code,f.message,403);try{await (0,v.stat)(c)}catch(e){if("ENOENT"===e.code)return I("NOT_FOUND","Source file not found",404);throw e}if(s){let e;try{e=await (0,v.readFile)(c)}catch{return I("NOT_FOUND","Source file not found",404)}if(a=(0,R.sha256ofBuf)(e),(0,R.extractShaHex)(s)!==(0,R.extractShaHex)(a))return I("PRECONDITION_FAILED","If-Match sha256 mismatch",412)}let m=(0,R.isMarkdown)(n),g=!0===t.overwrite,[w,S]=[n,i].sort(),P=async()=>{try{let e=await (0,v.stat)(d);if(!g)return I("DESTINATION_EXISTS","Destination already exists",409);if(e.isDirectory())return I("DESTINATION_EXISTS","Cannot overwrite a directory",409)}catch(e){if("ENOENT"!==e.code)throw e}try{if(!(await (0,v.stat)(y.default.dirname(d))).isDirectory())return I("INVALID_PATH","Destination parent is not a directory",400)}catch(e){if("ENOENT"===e.code)return I("INVALID_PATH","Destination parent directory does not exist",400);throw e}await (0,v.rename)(c,d),m&&await (0,k.moveSidecar)(u,n,i),(0,T.writeAuditRow)({agentId:r.agent.id,op:"move",path:n,newSha:i,forced:g,workspaceId:l.id})},O=await (0,N.withFileMutex)((0,N.workspaceLockKey)(u,w),()=>(0,N.withFileMutex)((0,N.workspaceLockKey)(u,S),P));return O||x.NextResponse.json({from:n,to:i})}e.s(["POST",0,S,"runtime",0,"nodejs"],672679);var P=e.i(672679);let O=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/agent/fs/move/route",pathname:"/api/agent/fs/move",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agent/fs/move/route.ts",nextConfigOutput:"standalone",userland:P,...{}}),{workAsyncStorage:D,workUnitAsyncStorage:b,serverHooks:j}=O;async function C(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),O.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/agent/fs/move/route";v=v.replace(/\/index$/,"")||"/";let y=await O.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:x,params:A,nextConfig:E,parsedUrl:_,isDraftMode:N,prerenderManifest:k,routerServerContext:T,isOnDemandRevalidate:R,revalidateOnlyGenerated:I,resolvedPathname:S,clientReferenceManifest:P,serverActionsManifest:D}=y,b=(0,o.normalizeAppPath)(v),j=!!(k.dynamicRoutes[b]||k.routes[S]),C=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,_,!1):t.end("This page could not be found"),null);if(j&&!N){let e=!!k.routes[S],t=k.dynamicRoutes[b];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await C();throw new g.NoFallbackError}}let L=null;!j||O.isDev||N||(L="/index"===(L=S)?"/":L);let q=!0===O.isDev||!j,U=j&&!q;D&&P&&(0,s.setManifestsSingleton)({page:v,clientReferenceManifest:P,serverActionsManifest:D});let H=e.method||"GET",M=(0,i.getTracer)(),F=M.getActiveScopeSpan(),B=!!(null==T?void 0:T.isWrappedByNextServer),W=!!(0,n.getRequestMeta)(e,"minimalMode"),$=(0,n.getRequestMeta)(e,"incrementalCache")||await O.getIncrementalCache(e,E,k,W);null==$||$.resetRequestCache(),globalThis.__incrementalCache=$;let V={params:A,previewProps:k.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:q,incrementalCache:$,cacheLifeProfiles:E.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>O.onRequestError(e,t,r,n,T)},sharedContext:{buildId:x}},X=new l.NodeNextRequest(e),z=new l.NodeNextResponse(t),K=u.NextRequestAdapter.fromNodeNextRequest(X,(0,u.signalFromNodeResponse)(t));try{let n,s=async e=>O.handle(K,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=M.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==c.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route");if(r){let t=`${H} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",r),n.updateName(t))}else e.updateName(`${H} ${v}`)}),o=async n=>{var i,o;let l=async({previousCacheEntry:a})=>{try{if(!W&&R&&I&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(n);e.fetchMetrics=V.renderOpts.fetchMetrics;let o=V.renderOpts.pendingWaitUntil;o&&r.waitUntil&&(r.waitUntil(o),o=void 0);let l=V.renderOpts.collectedTags;if(!j)return await (0,p.sendResponse)(X,z,i,V.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,r=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await O.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:R})},!1,T),t}},u=await O.handleResponse({req:e,nextConfig:E,cacheKey:L,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:k,isRoutePPREnabled:!1,isOnDemandRevalidate:R,revalidateOnlyGenerated:I,responseGenerator:l,waitUntil:r.waitUntil,isMinimalMode:W});if(!j)return null;if((null==u||null==(i=u.value)?void 0:i.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});W||t.setHeader("x-nextjs-cache",R?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return W&&j||c.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(X,z,new Response(u.value.body,{headers:c,status:u.value.status||200})),null};B&&F?await o(F):(n=M.getActiveScopeSpan(),await M.withPropagatedContext(e.headers,()=>M.trace(c.BaseServerSpan.handleRequest,{spanName:`${H} ${v}`,kind:i.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},o),void 0,!B))}catch(t){if(t instanceof g.NoFallbackError||await O.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:R})},!1,T),j)throw t;return await (0,p.sendResponse)(X,z,new Response(null,{status:500})),null}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:D,workUnitAsyncStorage:b})},"routeModule",0,O,"serverHooks",0,j,"workAsyncStorage",0,D,"workUnitAsyncStorage",0,b],142343)},168315,e=>{e.v(t=>Promise.all(["server/chunks/0sag_@better-auth_memory-adapter_dist_index_mjs_0pvj6im._.js"].map(t=>e.l(t))).then(()=>t(862112)))},396690,e=>{e.v(t=>Promise.all(["server/chunks/032z_better-auth_dist_adapters_kysely-adapter_index_mjs_0.uqexi._.js"].map(t=>e.l(t))).then(()=>t(320652)))},580632,e=>{e.v(e=>Promise.resolve().then(()=>e(270406)))},947559,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_bun-sqlite-dialect-DzNwOpKv_mjs_0z1z6m4._.js"].map(t=>e.l(t))).then(()=>t(495181)))},715018,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_node-sqlite-dialect_mjs_0qqlvhl._.js"].map(t=>e.l(t))).then(()=>t(698370)))},146843,e=>{e.v(t=>Promise.all(["server/chunks/0ugq_@better-auth_kysely-adapter_dist_d1-sqlite-dialect-C2B7YsIT_mjs_0wynrz3._.js"].map(t=>e.l(t))).then(()=>t(143740)))},84040,e=>{e.v(t=>Promise.all(["server/chunks/0p91_next_0h94sj1._.js"].map(t=>e.l(t))).then(()=>t(815068)))},526888,e=>{e.v(e=>Promise.resolve().then(()=>e(28962)))},893412,e=>{e.v(e=>Promise.resolve().then(()=>e(499465)))},687903,e=>{e.v(e=>Promise.resolve().then(()=>e(912714)))}];
15
15
 
16
- //# sourceMappingURL=%5Broot-of-the-server%5D__00sn-o5._.js.map
16
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0xoz8e8._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[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"))},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"))},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"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},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"))},959801,(e,t,r)=>{"use strict";t.exports=e.r(918622)},637142,(e,t,r)=>{"use strict";t.exports=e.r(959801).vendored["react-rsc"].React},186791,(e,t,r)=>{"use strict";var n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o={},l={RequestCookies:()=>f,ResponseCookies:()=>g,parseCookie:()=>d,parseSetCookie:()=>c,stringifyCookie:()=>u};for(var p in l)n(o,p,{get:l[p],enumerable:!0});function u(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function d(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,a]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=a?a:"true"))}catch{}}return t}function c(e){if(!e)return;let[[t,r],...n]=d(e),{domain:a,expires:s,httponly:i,maxage:o,path:l,samesite:p,secure:u,partitioned:c,priority:f}=Object.fromEntries(n.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,x,v={name:t,value:decodeURIComponent(r),domain:a,...s&&{expires:new Date(s)},...i&&{httpOnly:!0},..."string"==typeof o&&{maxAge:Number(o)},path:l,...p&&{sameSite:h.includes(g=(g=p).toLowerCase())?g:void 0},...u&&{secure:!0},...f&&{priority:m.includes(x=(x=f).toLowerCase())?x:void 0},...c&&{partitioned:!0}};let e={};for(let t in v)v[t]&&(e[t]=v[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of s(t))i.call(e,o)||void 0===o||n(e,o,{get:()=>t[o],enumerable:!(r=a(t,o))||r.enumerable});return e})(n({},"__esModule",{value:!0}),o);var h=["strict","lax","none"],m=["low","medium","high"],f=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of d(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>u(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>u(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;const a=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(const e of Array.isArray(a)?a:function(e){if(!e)return[];var t,r,n,a,s,i=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,s=!1;l();)if(","===(r=e.charAt(o))){for(n=o,o+=1,l(),a=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(s=!0,o=a,i.push(e.substring(t,n)),t=o):o=n+1}else o+=1;(!s||o>=e.length)&&i.push(e.substring(t,e.length))}return i}(a)){const t=c(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,a=this._parsed;return a.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=u(r);t.append("set-cookie",e)}}(a,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(u).join("; ")}}},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},776170,e=>{"use strict";var t=e.i(364564),r=e.i(102095),n=e.i(691091),a=e.i(475331),s=e.i(490301),i=e.i(670943),o=e.i(690324),l=e.i(243133),p=e.i(404870),u=e.i(420180),d=e.i(867883),c=e.i(336708),h=e.i(682278),m=e.i(157569),f=e.i(844146),g=e.i(193695);e.i(105888);var x=e.i(530564),v=e.i(702414),y=e.i(912714),R=e.i(750227);async function w(e){let t=R.default.resolve(process.cwd(),"agents/wiki-viewer-skill/SKILL.md"),r=await (0,y.readFile)(t,"utf-8");return new v.NextResponse(r,{status:200,headers:{"Content-Type":"text/markdown; charset=utf-8","Cache-Control":"no-store"}})}e.s(["GET",0,w,"runtime",0,"nodejs"],480242);var C=e.i(480242);let A=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/agents/skill/route",pathname:"/api/agents/skill",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agents/skill/route.ts",nextConfigOutput:"standalone",userland:C,...{}}),{workAsyncStorage:b,workUnitAsyncStorage:_,serverHooks:E}=A;async function k(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),A.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/agents/skill/route";v=v.replace(/\/index$/,"")||"/";let y=await A.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:R,params:w,nextConfig:C,parsedUrl:b,isDraftMode:_,prerenderManifest:E,routerServerContext:k,isOnDemandRevalidate:S,revalidateOnlyGenerated:O,resolvedPathname:j,clientReferenceManifest:P,serverActionsManifest:N}=y,q=(0,o.normalizeAppPath)(v),T=!!(E.dynamicRoutes[q]||E.routes[j]),$=async()=>((null==k?void 0:k.render404)?await k.render404(e,t,b,!1):t.end("This page could not be found"),null);if(T&&!_){let e=!!E.routes[j],t=E.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await $();throw new g.NoFallbackError}}let D=null;!T||A.isDev||_||(D="/index"===(D=j)?"/":D);let I=!0===A.isDev||!T,U=T&&!I;N&&P&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:P,serverActionsManifest:N});let M=e.method||"GET",H=(0,s.getTracer)(),L=H.getActiveScopeSpan(),F=!!(null==k?void 0:k.isWrappedByNextServer),K=!!(0,a.getRequestMeta)(e,"minimalMode"),B=(0,a.getRequestMeta)(e,"incrementalCache")||await A.getIncrementalCache(e,C,E,K);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let G={params:w,previewProps:E.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:I,incrementalCache:B,cacheLifeProfiles:C.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>A.onRequestError(e,t,n,a,k)},sharedContext:{buildId:R}},z=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),W=p.NextRequestAdapter.fromNodeNextRequest(z,(0,p.signalFromNodeResponse)(t));try{let a,i=async e=>A.handle(W,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${M} ${v}`)}),o=async a=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&S&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!T)return await (0,c.sendResponse)(z,V,s,G.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!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,n=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:S})},!1,k),t}},p=await A.handleResponse({req:e,nextConfig:C,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:E,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:O,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:K});if(!T)return null;if((null==p||null==(s=p.value)?void 0:s.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(o=p.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",S?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),_&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(p.value.headers);return K&&T||u.delete(f.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,m.getCacheControlHeader)(p.cacheControl)),await (0,c.sendResponse)(z,V,new Response(p.value.body,{headers:u,status:p.value.status||200})),null};F&&L?await o(L):(a=H.getActiveScopeSpan(),await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},o),void 0,!F))}catch(t){if(t instanceof g.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:S})},!1,k),T)throw t;return await (0,c.sendResponse)(z,V,new Response(null,{status:500})),null}}e.s(["handler",0,k,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:_})},"routeModule",0,A,"serverHooks",0,E,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,_],776170)}];
1
+ module.exports=[750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},912714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},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"))},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"))},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"))},270406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},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"))},959801,(e,t,r)=>{"use strict";t.exports=e.r(918622)},637142,(e,t,r)=>{"use strict";t.exports=e.r(959801).vendored["react-rsc"].React},186791,(e,t,r)=>{"use strict";var n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o={},l={RequestCookies:()=>f,ResponseCookies:()=>g,parseCookie:()=>d,parseSetCookie:()=>c,stringifyCookie:()=>u};for(var p in l)n(o,p,{get:l[p],enumerable:!0});function u(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function d(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,a]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=a?a:"true"))}catch{}}return t}function c(e){if(!e)return;let[[t,r],...n]=d(e),{domain:a,expires:s,httponly:i,maxage:o,path:l,samesite:p,secure:u,partitioned:c,priority:f}=Object.fromEntries(n.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var g,x,v={name:t,value:decodeURIComponent(r),domain:a,...s&&{expires:new Date(s)},...i&&{httpOnly:!0},..."string"==typeof o&&{maxAge:Number(o)},path:l,...p&&{sameSite:h.includes(g=(g=p).toLowerCase())?g:void 0},...u&&{secure:!0},...f&&{priority:m.includes(x=(x=f).toLowerCase())?x:void 0},...c&&{partitioned:!0}};let e={};for(let t in v)v[t]&&(e[t]=v[t]);return e}}t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of s(t))i.call(e,o)||void 0===o||n(e,o,{get:()=>t[o],enumerable:!(r=a(t,o))||r.enumerable});return e})(n({},"__esModule",{value:!0}),o);var h=["strict","lax","none"],m=["low","medium","high"],f=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of d(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>u(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>u(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},g=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;const a=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[];for(const e of Array.isArray(a)?a:function(e){if(!e)return[];var t,r,n,a,s,i=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,s=!1;l();)if(","===(r=e.charAt(o))){for(n=o,o+=1,l(),a=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(s=!0,o=a,i.push(e.substring(t,n)),t=o):o=n+1}else o+=1;(!s||o>=e.length)&&i.push(e.substring(t,e.length))}return i}(a)){const t=c(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,a=this._parsed;return a.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=u(r);t.append("set-cookie",e)}}(a,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(u).join("; ")}}},776170,e=>{"use strict";var t=e.i(364564),r=e.i(102095),n=e.i(691091),a=e.i(475331),s=e.i(490301),i=e.i(670943),o=e.i(690324),l=e.i(243133),p=e.i(404870),u=e.i(420180),d=e.i(867883),c=e.i(336708),h=e.i(682278),m=e.i(157569),f=e.i(844146),g=e.i(193695);e.i(105888);var x=e.i(530564),v=e.i(702414),y=e.i(912714),R=e.i(750227);async function w(e){let t=R.default.resolve(process.cwd(),"agents/wiki-viewer-skill/SKILL.md"),r=await (0,y.readFile)(t,"utf-8");return new v.NextResponse(r,{status:200,headers:{"Content-Type":"text/markdown; charset=utf-8","Cache-Control":"no-store"}})}e.s(["GET",0,w,"runtime",0,"nodejs"],480242);var C=e.i(480242);let A=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/agents/skill/route",pathname:"/api/agents/skill",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agents/skill/route.ts",nextConfigOutput:"standalone",userland:C,...{}}),{workAsyncStorage:b,workUnitAsyncStorage:_,serverHooks:E}=A;async function k(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),A.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/agents/skill/route";v=v.replace(/\/index$/,"")||"/";let y=await A.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:R,params:w,nextConfig:C,parsedUrl:b,isDraftMode:_,prerenderManifest:E,routerServerContext:k,isOnDemandRevalidate:S,revalidateOnlyGenerated:O,resolvedPathname:j,clientReferenceManifest:P,serverActionsManifest:N}=y,q=(0,o.normalizeAppPath)(v),T=!!(E.dynamicRoutes[q]||E.routes[j]),$=async()=>((null==k?void 0:k.render404)?await k.render404(e,t,b,!1):t.end("This page could not be found"),null);if(T&&!_){let e=!!E.routes[j],t=E.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(C.adapterPath)return await $();throw new g.NoFallbackError}}let D=null;!T||A.isDev||_||(D="/index"===(D=j)?"/":D);let I=!0===A.isDev||!T,U=T&&!I;N&&P&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:P,serverActionsManifest:N});let M=e.method||"GET",H=(0,s.getTracer)(),L=H.getActiveScopeSpan(),F=!!(null==k?void 0:k.isWrappedByNextServer),K=!!(0,a.getRequestMeta)(e,"minimalMode"),B=(0,a.getRequestMeta)(e,"incrementalCache")||await A.getIncrementalCache(e,C,E,K);null==B||B.resetRequestCache(),globalThis.__incrementalCache=B;let G={params:w,previewProps:E.preview,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:I,incrementalCache:B,cacheLifeProfiles:C.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>A.onRequestError(e,t,n,a,k)},sharedContext:{buildId:R}},z=new l.NodeNextRequest(e),V=new l.NodeNextResponse(t),W=p.NextRequestAdapter.fromNodeNextRequest(z,(0,p.signalFromNodeResponse)(t));try{let a,i=async e=>A.handle(W,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${M} ${v}`)}),o=async a=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&S&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!T)return await (0,c.sendResponse)(z,V,s,G.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[f.NEXT_CACHE_TAGS_HEADER]=l),!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,n=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:S})},!1,k),t}},p=await A.handleResponse({req:e,nextConfig:C,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:E,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:O,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:K});if(!T)return null;if((null==p||null==(s=p.value)?void 0:s.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(o=p.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",S?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),_&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(p.value.headers);return K&&T||u.delete(f.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,m.getCacheControlHeader)(p.cacheControl)),await (0,c.sendResponse)(z,V,new Response(p.value.body,{headers:u,status:p.value.status||200})),null};F&&L?await o(L):(a=H.getActiveScopeSpan(),await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},o),void 0,!F))}catch(t){if(t instanceof g.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:S})},!1,k),T)throw t;return await (0,c.sendResponse)(z,V,new Response(null,{status:500})),null}}e.s(["handler",0,k,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:_})},"routeModule",0,A,"serverHooks",0,E,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,_],776170)}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0t4nr00._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__10pak1_._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[158493,s=>{"use strict";s.s([])}];
1
+ module.exports=[242663,s=>{"use strict";s.s([])}];
2
2
 
3
3
  //# sourceMappingURL=_next-internal_server_app_api_system_workspaces_%5Bid%5D_open_route_actions_1087xu7.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[100751,s=>{"use strict";s.s([])}];
2
+
3
+ //# sourceMappingURL=_next-internal_server_app_api_wiki_scratch_route_actions_07i6~7z.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[397998,e=>{"use strict";async function r(){{let{ensureApiKey:r}=await e.A(613146);r();let{deleteLegacySearchDb:s}=await e.A(566560);s();try{let r=process.env.ROOT_DIR;if(r){let{sweepScratch:s}=await e.A(454918);await s(r)}}catch{}}}e.s(["register",0,r])},613146,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__0er9oof._.js"].map(r=>e.l(r))).then(()=>r(504263)))},566560,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__0ifw4.q._.js"].map(r=>e.l(r))).then(()=>r(717372)))},454918,e=>{e.v(r=>Promise.all(["server/chunks/[root-of-the-server]__0qpqspq._.js"].map(r=>e.l(r))).then(()=>r(32851)))}];
2
+
3
+ //# sourceMappingURL=src_0pwns~4._.js.map
@@ -1,3 +1,3 @@
1
1
  module.exports=[389424,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0~w0_katex_dist_katex_mjs_0-.ao2a._.js"].map(b=>a.l(b))).then(()=>b(706823)))}];
2
2
 
3
- //# sourceMappingURL=0~w0_katex_dist_katex_mjs_12tyg_2._.js.map
3
+ //# sourceMappingURL=0~w0_katex_dist_katex_mjs_0-fyxoz._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[197112,129393,951640,906040,878486,906562,955072,501649,326783,823277,742046,768894,218157,189283,454143,684224,164148,574273,622397,877636,126410,a=>{"use strict";var b,c=a.i(604225),d=a.i(762939),e=a.i(319120);function f(a,b,c){a._context.bezierCurveTo((2*a._x0+a._x1)/3,(2*a._y0+a._y1)/3,(a._x0+2*a._x1)/3,(a._y0+2*a._y1)/3,(a._x0+4*a._x1+b)/6,(a._y0+4*a._y1+c)/6)}function g(a){this._context=a}function h(a){return new g(a)}function i(){}function j(a){this._context=a}function k(a){this._context=a}a.i(43066),g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:f(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:f(this,a,b)}this._x0=this._x1,this._x1=a,this._y0=this._y1,this._y1=b}},a.s(["curveBasis",0,h],129393),j.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._x2=a,this._y2=b;break;case 1:this._point=2,this._x3=a,this._y3=b;break;case 2:this._point=3,this._x4=a,this._y4=b,this._context.moveTo((this._x0+4*this._x1+a)/6,(this._y0+4*this._y1+b)/6);break;default:f(this,a,b)}this._x0=this._x1,this._x1=a,this._y0=this._y1,this._y1=b}},k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var c=(this._x0+4*this._x1+a)/6,d=(this._y0+4*this._y1+b)/6;this._line?this._context.lineTo(c,d):this._context.moveTo(c,d);break;case 3:this._point=4;default:f(this,a,b)}this._x0=this._x1,this._x1=a,this._y0=this._y1,this._y1=b}};class l{constructor(a,b){this._context=a,this._x=b}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+a)/2,this._y0,this._x0,b,a,b):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+b)/2,a,this._y0,a,b)}this._x0=a,this._y0=b}}function m(a){return new l(a,!0)}function n(a){return new l(a,!1)}function o(a,b){this._basis=new g(a),this._beta=b}a.s(["curveBumpX",0,m],951640),a.s(["curveBumpY",0,n],906040),o.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var a=this._x,b=this._y,c=a.length-1;if(c>0)for(var d,e=a[0],f=b[0],g=a[c]-e,h=b[c]-f,i=-1;++i<=c;)d=i/c,this._basis.point(this._beta*a[i]+(1-this._beta)*(e+d*g),this._beta*b[i]+(1-this._beta)*(f+d*h));this._x=this._y=null,this._basis.lineEnd()},point:function(a,b){this._x.push(+a),this._y.push(+b)}};let p=function a(b){function c(a){return 1===b?new g(a):new o(a,b)}return c.beta=function(b){return a(+b)},c}(.85);function q(a,b,c){a._context.bezierCurveTo(a._x1+a._k*(a._x2-a._x0),a._y1+a._k*(a._y2-a._y0),a._x2+a._k*(a._x1-b),a._y2+a._k*(a._y1-c),a._x2,a._y2)}function r(a,b){this._context=a,this._k=(1-b)/6}r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:q(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2,this._x1=a,this._y1=b;break;case 2:this._point=3;default:q(this,a,b)}this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};let s=function a(b){function c(a){return new r(a,b)}return c.tension=function(b){return a(+b)},c}(0);function t(a,b){this._context=a,this._k=(1-b)/6}t.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._x3=a,this._y3=b;break;case 1:this._point=2,this._context.moveTo(this._x4=a,this._y4=b);break;case 2:this._point=3,this._x5=a,this._y5=b;break;default:q(this,a,b)}this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};let u=function a(b){function c(a){return new t(a,b)}return c.tension=function(b){return a(+b)},c}(0);function v(a,b){this._context=a,this._k=(1-b)/6}v.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:q(this,a,b)}this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};let w=function a(b){function c(a){return new v(a,b)}return c.tension=function(b){return a(+b)},c}(0);a.s(["curveCardinal",0,s],878486);var x=a.i(774086);function y(a,b,c){var d=a._x1,e=a._y1,f=a._x2,g=a._y2;if(a._l01_a>x.epsilon){var h=2*a._l01_2a+3*a._l01_a*a._l12_a+a._l12_2a,i=3*a._l01_a*(a._l01_a+a._l12_a);d=(d*h-a._x0*a._l12_2a+a._x2*a._l01_2a)/i,e=(e*h-a._y0*a._l12_2a+a._y2*a._l01_2a)/i}if(a._l23_a>x.epsilon){var j=2*a._l23_2a+3*a._l23_a*a._l12_a+a._l12_2a,k=3*a._l23_a*(a._l23_a+a._l12_a);f=(f*j+a._x1*a._l23_2a-b*a._l12_2a)/k,g=(g*j+a._y1*a._l23_2a-c*a._l12_2a)/k}a._context.bezierCurveTo(d,e,f,g,a._x2,a._y2)}function z(a,b){this._context=a,this._alpha=b}z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){if(a*=1,b*=1,this._point){var c=this._x2-a,d=this._y2-b;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(c*c+d*d,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;break;case 2:this._point=3;default:y(this,a,b)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};let A=function a(b){function c(a){return b?new z(a,b):new r(a,0)}return c.alpha=function(b){return a(+b)},c}(.5);function B(a,b){this._context=a,this._alpha=b}B.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(a,b){if(a*=1,b*=1,this._point){var c=this._x2-a,d=this._y2-b;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(c*c+d*d,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=a,this._y3=b;break;case 1:this._point=2,this._context.moveTo(this._x4=a,this._y4=b);break;case 2:this._point=3,this._x5=a,this._y5=b;break;default:y(this,a,b)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};let C=function a(b){function c(a){return b?new B(a,b):new t(a,0)}return c.alpha=function(b){return a(+b)},c}(.5);function D(a,b){this._context=a,this._alpha=b}D.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){if(a*=1,b*=1,this._point){var c=this._x2-a,d=this._y2-b;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(c*c+d*d,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:y(this,a,b)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};let E=function a(b){function c(a){return b?new D(a,b):new v(a,0)}return c.alpha=function(b){return a(+b)},c}(.5);function F(a){this._context=a}function G(a){return new F(a)}function H(a){this._context=a}a.s(["curveCatmullRom",0,A],906562),F.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;default:this._context.lineTo(a,b)}}},a.s(["default",0,G],955072),a.s(["curveLinear",0,G],501649),H.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(a,b){a*=1,b*=1,this._point?this._context.lineTo(a,b):(this._point=1,this._context.moveTo(a,b))}};function I(a,b,c){var d=a._x1-a._x0,e=b-a._x1,f=(a._y1-a._y0)/(d||e<0&&-0),g=(c-a._y1)/(e||d<0&&-0);return((f<0?-1:1)+(g<0?-1:1))*Math.min(Math.abs(f),Math.abs(g),.5*Math.abs((f*e+g*d)/(d+e)))||0}function J(a,b){var c=a._x1-a._x0;return c?(3*(a._y1-a._y0)/c-b)/2:b}function K(a,b,c){var d=a._x0,e=a._y0,f=a._x1,g=a._y1,h=(f-d)/3;a._context.bezierCurveTo(d+h,e+h*b,f-h,g-h*c,f,g)}function L(a){this._context=a}function M(a){this._context=new N(a)}function N(a){this._context=a}function O(a){return new L(a)}function P(a){return new M(a)}function Q(a){this._context=a}function R(a){var b,c,d=a.length-1,e=Array(d),f=Array(d),g=Array(d);for(e[0]=0,f[0]=2,g[0]=a[0]+2*a[1],b=1;b<d-1;++b)e[b]=1,f[b]=4,g[b]=4*a[b]+2*a[b+1];for(e[d-1]=2,f[d-1]=7,g[d-1]=8*a[d-1]+a[d],b=1;b<d;++b)c=e[b]/f[b-1],f[b]-=c,g[b]-=c*g[b-1];for(e[d-1]=g[d-1]/f[d-1],b=d-2;b>=0;--b)e[b]=(g[b]-e[b+1])/f[b];for(b=0,f[d-1]=(a[d]+e[d-1])/2;b<d-1;++b)f[b]=2*a[b+1]-e[b+1];return[e,f]}function S(a){return new Q(a)}function T(a,b){this._context=a,this._t=b}function U(a){return new T(a,.5)}function V(a){return new T(a,0)}function W(a){return new T(a,1)}L.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:K(this,this._t0,J(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){var c=NaN;if(b*=1,(a*=1)!==this._x1||b!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;break;case 2:this._point=3,K(this,J(this,c=I(this,a,b)),c);break;default:K(this,this._t0,c=I(this,a,b))}this._x0=this._x1,this._x1=a,this._y0=this._y1,this._y1=b,this._t0=c}}},(M.prototype=Object.create(L.prototype)).point=function(a,b){L.prototype.point.call(this,b,a)},N.prototype={moveTo:function(a,b){this._context.moveTo(b,a)},closePath:function(){this._context.closePath()},lineTo:function(a,b){this._context.lineTo(b,a)},bezierCurveTo:function(a,b,c,d,e,f){this._context.bezierCurveTo(b,a,d,c,f,e)}},a.s(["curveMonotoneX",0,O],326783),a.s(["curveMonotoneY",0,P],823277),Q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var a=this._x,b=this._y,c=a.length;if(c)if(this._line?this._context.lineTo(a[0],b[0]):this._context.moveTo(a[0],b[0]),2===c)this._context.lineTo(a[1],b[1]);else for(var d=R(a),e=R(b),f=0,g=1;g<c;++f,++g)this._context.bezierCurveTo(d[0][f],e[0][f],d[1][f],e[1][f],a[g],b[g]);(this._line||0!==this._line&&1===c)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(a,b){this._x.push(+a),this._y.push(+b)}},a.s(["curveNatural",0,S],742046),T.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,b),this._context.lineTo(a,b);else{var c=this._x*(1-this._t)+a*this._t;this._context.lineTo(c,this._y),this._context.lineTo(c,b)}}this._x=a,this._y=b}},a.s(["curveStep",0,U],768894),a.s(["curveStepAfter",0,W],218157),a.s(["curveStepBefore",0,V],189283);var X=a.i(455784);function Y(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw TypeError("Expected a function");let c=function(...d){let e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);let g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Y.Cache||Map),c}function Z(){}function $(a){return null==a||"object"!=typeof a&&"function"!=typeof a}function _(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)}function aa(a){return Object.getOwnPropertySymbols(a).filter(b=>Object.prototype.propertyIsEnumerable.call(a,b))}Y.Cache=Map,a.s(["isPrimitive",0,$],454143);let ab="object"==typeof globalThis&&globalThis||"object"==typeof self&&self||a.g||function(){return this}()||Function("return this")();function ac(a){return void 0!==ab.Buffer&&ab.Buffer.isBuffer(a)}function ad(a){if("object"!=typeof a||null==a)return!1;if(null===Object.getPrototypeOf(a))return!0;if("[object Object]"!==Object.prototype.toString.call(a)){let b=a[Symbol.toStringTag];return null!=b&&!!Object.getOwnPropertyDescriptor(a,Symbol.toStringTag)?.writable&&a.toString()===`[object ${b}]`}let b=a;for(;null!==Object.getPrototypeOf(b);)b=Object.getPrototypeOf(b);return Object.getPrototypeOf(a)===b}function ae(a){return null==a?void 0===a?"[object Undefined]":"[object Null]":Object.prototype.toString.call(a)}a.s(["isBuffer",0,ac],684224),a.s(["getTag",0,ae],164148);let af="[object RegExp]",ag="[object String]",ah="[object Number]",ai="[object Boolean]",aj="[object Arguments]",ak="[object Symbol]",al="[object Date]",am="[object Map]",an="[object Set]",ao="[object Array]",ap="[object ArrayBuffer]",aq="[object Object]",ar="[object DataView]",as="[object Uint8Array]",at="[object Uint8ClampedArray]",au="[object Uint16Array]",av="[object Uint32Array]",aw="[object Int8Array]",ax="[object Int16Array]",ay="[object Int32Array]",az="[object Float32Array]",aA="[object Float64Array]";function aB(a,b,c,d=new Map,e){let f=e?.(a,b,c,d);if(void 0!==f)return f;if($(a))return a;if(d.has(a))return d.get(a);if(Array.isArray(a)){let b=Array(a.length);d.set(a,b);for(let f=0;f<a.length;f++)b[f]=aB(a[f],f,c,d,e);return Object.hasOwn(a,"index")&&(b.index=a.index),Object.hasOwn(a,"input")&&(b.input=a.input),b}if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp){let b=new RegExp(a.source,a.flags);return b.lastIndex=a.lastIndex,b}if(a instanceof Map){let b=new Map;for(let[f,g]of(d.set(a,b),a))b.set(f,aB(g,f,c,d,e));return b}if(a instanceof Set){let b=new Set;for(let f of(d.set(a,b),a))b.add(aB(f,void 0,c,d,e));return b}if(ac(a))return a.subarray();if(_(a)){let b=new(Object.getPrototypeOf(a)).constructor(a.length);d.set(a,b);for(let f=0;f<a.length;f++)b[f]=aB(a[f],f,c,d,e);return b}if(a instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&a instanceof SharedArrayBuffer)return a.slice(0);if(a instanceof DataView){let b=new DataView(a.buffer.slice(0),a.byteOffset,a.byteLength);return d.set(a,b),aC(b,a,c,d,e),b}if("u">typeof File&&a instanceof File){let b=new File([a],a.name,{type:a.type});return d.set(a,b),aC(b,a,c,d,e),b}if("u">typeof Blob&&a instanceof Blob){let b=new Blob([a],{type:a.type});return d.set(a,b),aC(b,a,c,d,e),b}if(a instanceof Error){let b=structuredClone(a);return d.set(a,b),b.message=a.message,b.name=a.name,b.stack=a.stack,b.cause=a.cause,b.constructor=a.constructor,aC(b,a,c,d,e),b}if(a instanceof Boolean){let b=new Boolean(a.valueOf());return d.set(a,b),aC(b,a,c,d,e),b}if(a instanceof Number){let b=new Number(a.valueOf());return d.set(a,b),aC(b,a,c,d,e),b}if(a instanceof String){let b=new String(a.valueOf());return d.set(a,b),aC(b,a,c,d,e),b}if("object"==typeof a&&function(a){switch(ae(a)){case aj:case ao:case ap:case ar:case ai:case al:case az:case aA:case aw:case ax:case ay:case am:case ah:case aq:case af:case an:case ag:case ak:case as:case at:case au:case av:return!0;default:return!1}}(a)){let b=Object.create(Object.getPrototypeOf(a));return d.set(a,b),aC(b,a,c,d,e),b}return a}function aC(a,b,c=a,d,e){let f=[...Object.keys(b),...aa(b)];for(let g=0;g<f.length;g++){let h=f[g],i=Object.getOwnPropertyDescriptor(a,h);(null==i||i.writable)&&(a[h]=aB(b[h],h,c,d,e))}}function aD(a){var b;return b=(b,c,d,e)=>{let f;if(void 0!==f)return f;if("object"==typeof a){if("[object Object]"===ae(a)&&"function"!=typeof a.constructor){let b={};return e.set(a,b),aC(b,a,d,e),b}switch(Object.prototype.toString.call(a)){case ah:case ag:case ai:{let b=new a.constructor(a?.valueOf());return aC(b,a),b}case aj:{let b={};return aC(b,a),b.length=a.length,b[Symbol.iterator]=a[Symbol.iterator],b}default:return}}},aB(a,void 0,a,new Map,b)}function aE(a){return null!==a&&"object"==typeof a&&"[object Arguments]"===ae(a)}function aF(a){return"object"==typeof a&&null!==a}function aG(a){var b;return null!=a&&"function"!=typeof a&&Number.isSafeInteger(b=a.length)&&b>=0}function aH(a){return _(a)}a.s(["argumentsTag",0,aj,"arrayBufferTag",0,ap,"arrayTag",0,ao,"booleanTag",0,ai,"dataViewTag",0,ar,"dateTag",0,al,"float32ArrayTag",0,az,"float64ArrayTag",0,aA,"int16ArrayTag",0,ax,"int32ArrayTag",0,ay,"int8ArrayTag",0,aw,"mapTag",0,am,"numberTag",0,ah,"objectTag",0,aq,"regexpTag",0,af,"setTag",0,an,"stringTag",0,ag,"symbolTag",0,ak,"uint16ArrayTag",0,au,"uint32ArrayTag",0,av,"uint8ArrayTag",0,as,"uint8ClampedArrayTag",0,at],574273),a.s(["isArguments",0,aE],622397),a.s(["isArrayLike",0,aG],877636),a.s(["isTypedArray",0,aH],126410);var aI={curveBasis:h,curveBasisClosed:function(a){return new j(a)},curveBasisOpen:function(a){return new k(a)},curveBumpX:m,curveBumpY:n,curveBundle:p,curveCardinalClosed:u,curveCardinalOpen:w,curveCardinal:s,curveCatmullRomClosed:C,curveCatmullRomOpen:E,curveCatmullRom:A,curveLinear:G,curveLinearClosed:function(a){return new H(a)},curveMonotoneX:O,curveMonotoneY:P,curveNatural:S,curveStep:U,curveStepAfter:W,curveStepBefore:V},aJ=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,aK=(0,d.__name)(function(a,b){let d=aL(a,/(?:init\b)|(?:initialize\b)/),e={};if(Array.isArray(d)){let a=d.map(a=>a.args);(0,c.sanitizeDirective)(a),e=(0,c.assignWithDepth_default)(e,[...a])}else e=d.args;if(!e)return;let f=(0,c.detectType)(a,b),g="config";return void 0!==e[g]&&("flowchart-v2"===f&&(f="flowchart"),e[f]=e[g],delete e[g]),e},"detectInit"),aL=(0,d.__name)(function(a,b=null){try{let e,f=RegExp(`[%]{2}(?![{]${aJ.source})(?=[}][%]{2}).*
1
+ module.exports=[197112,129393,951640,906040,878486,847758,955072,501649,326783,823277,742046,768894,218157,189283,454143,684224,164148,574273,622397,877636,126410,a=>{"use strict";var b,c=a.i(604225),d=a.i(762939),e=a.i(319120);function f(a,b,c){a._context.bezierCurveTo((2*a._x0+a._x1)/3,(2*a._y0+a._y1)/3,(a._x0+2*a._x1)/3,(a._y0+2*a._y1)/3,(a._x0+4*a._x1+b)/6,(a._y0+4*a._y1+c)/6)}function g(a){this._context=a}function h(a){return new g(a)}function i(){}function j(a){this._context=a}function k(a){this._context=a}a.i(43066),g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:f(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:f(this,a,b)}this._x0=this._x1,this._x1=a,this._y0=this._y1,this._y1=b}},a.s(["curveBasis",0,h],129393),j.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._x2=a,this._y2=b;break;case 1:this._point=2,this._x3=a,this._y3=b;break;case 2:this._point=3,this._x4=a,this._y4=b,this._context.moveTo((this._x0+4*this._x1+a)/6,(this._y0+4*this._y1+b)/6);break;default:f(this,a,b)}this._x0=this._x1,this._x1=a,this._y0=this._y1,this._y1=b}},k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var c=(this._x0+4*this._x1+a)/6,d=(this._y0+4*this._y1+b)/6;this._line?this._context.lineTo(c,d):this._context.moveTo(c,d);break;case 3:this._point=4;default:f(this,a,b)}this._x0=this._x1,this._x1=a,this._y0=this._y1,this._y1=b}};class l{constructor(a,b){this._context=a,this._x=b}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+a)/2,this._y0,this._x0,b,a,b):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+b)/2,a,this._y0,a,b)}this._x0=a,this._y0=b}}function m(a){return new l(a,!0)}function n(a){return new l(a,!1)}function o(a,b){this._basis=new g(a),this._beta=b}a.s(["curveBumpX",0,m],951640),a.s(["curveBumpY",0,n],906040),o.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var a=this._x,b=this._y,c=a.length-1;if(c>0)for(var d,e=a[0],f=b[0],g=a[c]-e,h=b[c]-f,i=-1;++i<=c;)d=i/c,this._basis.point(this._beta*a[i]+(1-this._beta)*(e+d*g),this._beta*b[i]+(1-this._beta)*(f+d*h));this._x=this._y=null,this._basis.lineEnd()},point:function(a,b){this._x.push(+a),this._y.push(+b)}};let p=function a(b){function c(a){return 1===b?new g(a):new o(a,b)}return c.beta=function(b){return a(+b)},c}(.85);function q(a,b,c){a._context.bezierCurveTo(a._x1+a._k*(a._x2-a._x0),a._y1+a._k*(a._y2-a._y0),a._x2+a._k*(a._x1-b),a._y2+a._k*(a._y1-c),a._x2,a._y2)}function r(a,b){this._context=a,this._k=(1-b)/6}r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:q(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2,this._x1=a,this._y1=b;break;case 2:this._point=3;default:q(this,a,b)}this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};let s=function a(b){function c(a){return new r(a,b)}return c.tension=function(b){return a(+b)},c}(0);function t(a,b){this._context=a,this._k=(1-b)/6}t.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._x3=a,this._y3=b;break;case 1:this._point=2,this._context.moveTo(this._x4=a,this._y4=b);break;case 2:this._point=3,this._x5=a,this._y5=b;break;default:q(this,a,b)}this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};let u=function a(b){function c(a){return new t(a,b)}return c.tension=function(b){return a(+b)},c}(0);function v(a,b){this._context=a,this._k=(1-b)/6}v.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:q(this,a,b)}this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};let w=function a(b){function c(a){return new v(a,b)}return c.tension=function(b){return a(+b)},c}(0);a.s(["curveCardinal",0,s],878486);var x=a.i(774086);function y(a,b,c){var d=a._x1,e=a._y1,f=a._x2,g=a._y2;if(a._l01_a>x.epsilon){var h=2*a._l01_2a+3*a._l01_a*a._l12_a+a._l12_2a,i=3*a._l01_a*(a._l01_a+a._l12_a);d=(d*h-a._x0*a._l12_2a+a._x2*a._l01_2a)/i,e=(e*h-a._y0*a._l12_2a+a._y2*a._l01_2a)/i}if(a._l23_a>x.epsilon){var j=2*a._l23_2a+3*a._l23_a*a._l12_a+a._l12_2a,k=3*a._l23_a*(a._l23_a+a._l12_a);f=(f*j+a._x1*a._l23_2a-b*a._l12_2a)/k,g=(g*j+a._y1*a._l23_2a-c*a._l12_2a)/k}a._context.bezierCurveTo(d,e,f,g,a._x2,a._y2)}function z(a,b){this._context=a,this._alpha=b}z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){if(a*=1,b*=1,this._point){var c=this._x2-a,d=this._y2-b;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(c*c+d*d,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;break;case 2:this._point=3;default:y(this,a,b)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};let A=function a(b){function c(a){return b?new z(a,b):new r(a,0)}return c.alpha=function(b){return a(+b)},c}(.5);function B(a,b){this._context=a,this._alpha=b}B.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(a,b){if(a*=1,b*=1,this._point){var c=this._x2-a,d=this._y2-b;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(c*c+d*d,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=a,this._y3=b;break;case 1:this._point=2,this._context.moveTo(this._x4=a,this._y4=b);break;case 2:this._point=3,this._x5=a,this._y5=b;break;default:y(this,a,b)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};let C=function a(b){function c(a){return b?new B(a,b):new t(a,0)}return c.alpha=function(b){return a(+b)},c}(.5);function D(a,b){this._context=a,this._alpha=b}D.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){if(a*=1,b*=1,this._point){var c=this._x2-a,d=this._y2-b;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(c*c+d*d,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:y(this,a,b)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=a,this._y0=this._y1,this._y1=this._y2,this._y2=b}};let E=function a(b){function c(a){return b?new D(a,b):new v(a,0)}return c.alpha=function(b){return a(+b)},c}(.5);function F(a){this._context=a}function G(a){return new F(a)}function H(a){this._context=a}a.s(["curveCatmullRom",0,A],847758),F.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;default:this._context.lineTo(a,b)}}},a.s(["default",0,G],955072),a.s(["curveLinear",0,G],501649),H.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(a,b){a*=1,b*=1,this._point?this._context.lineTo(a,b):(this._point=1,this._context.moveTo(a,b))}};function I(a,b,c){var d=a._x1-a._x0,e=b-a._x1,f=(a._y1-a._y0)/(d||e<0&&-0),g=(c-a._y1)/(e||d<0&&-0);return((f<0?-1:1)+(g<0?-1:1))*Math.min(Math.abs(f),Math.abs(g),.5*Math.abs((f*e+g*d)/(d+e)))||0}function J(a,b){var c=a._x1-a._x0;return c?(3*(a._y1-a._y0)/c-b)/2:b}function K(a,b,c){var d=a._x0,e=a._y0,f=a._x1,g=a._y1,h=(f-d)/3;a._context.bezierCurveTo(d+h,e+h*b,f-h,g-h*c,f,g)}function L(a){this._context=a}function M(a){this._context=new N(a)}function N(a){this._context=a}function O(a){return new L(a)}function P(a){return new M(a)}function Q(a){this._context=a}function R(a){var b,c,d=a.length-1,e=Array(d),f=Array(d),g=Array(d);for(e[0]=0,f[0]=2,g[0]=a[0]+2*a[1],b=1;b<d-1;++b)e[b]=1,f[b]=4,g[b]=4*a[b]+2*a[b+1];for(e[d-1]=2,f[d-1]=7,g[d-1]=8*a[d-1]+a[d],b=1;b<d;++b)c=e[b]/f[b-1],f[b]-=c,g[b]-=c*g[b-1];for(e[d-1]=g[d-1]/f[d-1],b=d-2;b>=0;--b)e[b]=(g[b]-e[b+1])/f[b];for(b=0,f[d-1]=(a[d]+e[d-1])/2;b<d-1;++b)f[b]=2*a[b+1]-e[b+1];return[e,f]}function S(a){return new Q(a)}function T(a,b){this._context=a,this._t=b}function U(a){return new T(a,.5)}function V(a){return new T(a,0)}function W(a){return new T(a,1)}L.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:K(this,this._t0,J(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(a,b){var c=NaN;if(b*=1,(a*=1)!==this._x1||b!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;break;case 2:this._point=3,K(this,J(this,c=I(this,a,b)),c);break;default:K(this,this._t0,c=I(this,a,b))}this._x0=this._x1,this._x1=a,this._y0=this._y1,this._y1=b,this._t0=c}}},(M.prototype=Object.create(L.prototype)).point=function(a,b){L.prototype.point.call(this,b,a)},N.prototype={moveTo:function(a,b){this._context.moveTo(b,a)},closePath:function(){this._context.closePath()},lineTo:function(a,b){this._context.lineTo(b,a)},bezierCurveTo:function(a,b,c,d,e,f){this._context.bezierCurveTo(b,a,d,c,f,e)}},a.s(["curveMonotoneX",0,O],326783),a.s(["curveMonotoneY",0,P],823277),Q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var a=this._x,b=this._y,c=a.length;if(c)if(this._line?this._context.lineTo(a[0],b[0]):this._context.moveTo(a[0],b[0]),2===c)this._context.lineTo(a[1],b[1]);else for(var d=R(a),e=R(b),f=0,g=1;g<c;++f,++g)this._context.bezierCurveTo(d[0][f],e[0][f],d[1][f],e[1][f],a[g],b[g]);(this._line||0!==this._line&&1===c)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(a,b){this._x.push(+a),this._y.push(+b)}},a.s(["curveNatural",0,S],742046),T.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(a,b){switch(a*=1,b*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,b),this._context.lineTo(a,b);else{var c=this._x*(1-this._t)+a*this._t;this._context.lineTo(c,this._y),this._context.lineTo(c,b)}}this._x=a,this._y=b}},a.s(["curveStep",0,U],768894),a.s(["curveStepAfter",0,W],218157),a.s(["curveStepBefore",0,V],189283);var X=a.i(455784);function Y(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw TypeError("Expected a function");let c=function(...d){let e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);let g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Y.Cache||Map),c}function Z(){}function $(a){return null==a||"object"!=typeof a&&"function"!=typeof a}function _(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)}function aa(a){return Object.getOwnPropertySymbols(a).filter(b=>Object.prototype.propertyIsEnumerable.call(a,b))}Y.Cache=Map,a.s(["isPrimitive",0,$],454143);let ab="object"==typeof globalThis&&globalThis||"object"==typeof self&&self||a.g||function(){return this}()||Function("return this")();function ac(a){return void 0!==ab.Buffer&&ab.Buffer.isBuffer(a)}function ad(a){if("object"!=typeof a||null==a)return!1;if(null===Object.getPrototypeOf(a))return!0;if("[object Object]"!==Object.prototype.toString.call(a)){let b=a[Symbol.toStringTag];return null!=b&&!!Object.getOwnPropertyDescriptor(a,Symbol.toStringTag)?.writable&&a.toString()===`[object ${b}]`}let b=a;for(;null!==Object.getPrototypeOf(b);)b=Object.getPrototypeOf(b);return Object.getPrototypeOf(a)===b}function ae(a){return null==a?void 0===a?"[object Undefined]":"[object Null]":Object.prototype.toString.call(a)}a.s(["isBuffer",0,ac],684224),a.s(["getTag",0,ae],164148);let af="[object RegExp]",ag="[object String]",ah="[object Number]",ai="[object Boolean]",aj="[object Arguments]",ak="[object Symbol]",al="[object Date]",am="[object Map]",an="[object Set]",ao="[object Array]",ap="[object ArrayBuffer]",aq="[object Object]",ar="[object DataView]",as="[object Uint8Array]",at="[object Uint8ClampedArray]",au="[object Uint16Array]",av="[object Uint32Array]",aw="[object Int8Array]",ax="[object Int16Array]",ay="[object Int32Array]",az="[object Float32Array]",aA="[object Float64Array]";function aB(a,b,c,d=new Map,e){let f=e?.(a,b,c,d);if(void 0!==f)return f;if($(a))return a;if(d.has(a))return d.get(a);if(Array.isArray(a)){let b=Array(a.length);d.set(a,b);for(let f=0;f<a.length;f++)b[f]=aB(a[f],f,c,d,e);return Object.hasOwn(a,"index")&&(b.index=a.index),Object.hasOwn(a,"input")&&(b.input=a.input),b}if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp){let b=new RegExp(a.source,a.flags);return b.lastIndex=a.lastIndex,b}if(a instanceof Map){let b=new Map;for(let[f,g]of(d.set(a,b),a))b.set(f,aB(g,f,c,d,e));return b}if(a instanceof Set){let b=new Set;for(let f of(d.set(a,b),a))b.add(aB(f,void 0,c,d,e));return b}if(ac(a))return a.subarray();if(_(a)){let b=new(Object.getPrototypeOf(a)).constructor(a.length);d.set(a,b);for(let f=0;f<a.length;f++)b[f]=aB(a[f],f,c,d,e);return b}if(a instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&a instanceof SharedArrayBuffer)return a.slice(0);if(a instanceof DataView){let b=new DataView(a.buffer.slice(0),a.byteOffset,a.byteLength);return d.set(a,b),aC(b,a,c,d,e),b}if("u">typeof File&&a instanceof File){let b=new File([a],a.name,{type:a.type});return d.set(a,b),aC(b,a,c,d,e),b}if("u">typeof Blob&&a instanceof Blob){let b=new Blob([a],{type:a.type});return d.set(a,b),aC(b,a,c,d,e),b}if(a instanceof Error){let b=structuredClone(a);return d.set(a,b),b.message=a.message,b.name=a.name,b.stack=a.stack,b.cause=a.cause,b.constructor=a.constructor,aC(b,a,c,d,e),b}if(a instanceof Boolean){let b=new Boolean(a.valueOf());return d.set(a,b),aC(b,a,c,d,e),b}if(a instanceof Number){let b=new Number(a.valueOf());return d.set(a,b),aC(b,a,c,d,e),b}if(a instanceof String){let b=new String(a.valueOf());return d.set(a,b),aC(b,a,c,d,e),b}if("object"==typeof a&&function(a){switch(ae(a)){case aj:case ao:case ap:case ar:case ai:case al:case az:case aA:case aw:case ax:case ay:case am:case ah:case aq:case af:case an:case ag:case ak:case as:case at:case au:case av:return!0;default:return!1}}(a)){let b=Object.create(Object.getPrototypeOf(a));return d.set(a,b),aC(b,a,c,d,e),b}return a}function aC(a,b,c=a,d,e){let f=[...Object.keys(b),...aa(b)];for(let g=0;g<f.length;g++){let h=f[g],i=Object.getOwnPropertyDescriptor(a,h);(null==i||i.writable)&&(a[h]=aB(b[h],h,c,d,e))}}function aD(a){var b;return b=(b,c,d,e)=>{let f;if(void 0!==f)return f;if("object"==typeof a){if("[object Object]"===ae(a)&&"function"!=typeof a.constructor){let b={};return e.set(a,b),aC(b,a,d,e),b}switch(Object.prototype.toString.call(a)){case ah:case ag:case ai:{let b=new a.constructor(a?.valueOf());return aC(b,a),b}case aj:{let b={};return aC(b,a),b.length=a.length,b[Symbol.iterator]=a[Symbol.iterator],b}default:return}}},aB(a,void 0,a,new Map,b)}function aE(a){return null!==a&&"object"==typeof a&&"[object Arguments]"===ae(a)}function aF(a){return"object"==typeof a&&null!==a}function aG(a){var b;return null!=a&&"function"!=typeof a&&Number.isSafeInteger(b=a.length)&&b>=0}function aH(a){return _(a)}a.s(["argumentsTag",0,aj,"arrayBufferTag",0,ap,"arrayTag",0,ao,"booleanTag",0,ai,"dataViewTag",0,ar,"dateTag",0,al,"float32ArrayTag",0,az,"float64ArrayTag",0,aA,"int16ArrayTag",0,ax,"int32ArrayTag",0,ay,"int8ArrayTag",0,aw,"mapTag",0,am,"numberTag",0,ah,"objectTag",0,aq,"regexpTag",0,af,"setTag",0,an,"stringTag",0,ag,"symbolTag",0,ak,"uint16ArrayTag",0,au,"uint32ArrayTag",0,av,"uint8ArrayTag",0,as,"uint8ClampedArrayTag",0,at],574273),a.s(["isArguments",0,aE],622397),a.s(["isArrayLike",0,aG],877636),a.s(["isTypedArray",0,aH],126410);var aI={curveBasis:h,curveBasisClosed:function(a){return new j(a)},curveBasisOpen:function(a){return new k(a)},curveBumpX:m,curveBumpY:n,curveBundle:p,curveCardinalClosed:u,curveCardinalOpen:w,curveCardinal:s,curveCatmullRomClosed:C,curveCatmullRomOpen:E,curveCatmullRom:A,curveLinear:G,curveLinearClosed:function(a){return new H(a)},curveMonotoneX:O,curveMonotoneY:P,curveNatural:S,curveStep:U,curveStepAfter:W,curveStepBefore:V},aJ=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,aK=(0,d.__name)(function(a,b){let d=aL(a,/(?:init\b)|(?:initialize\b)/),e={};if(Array.isArray(d)){let a=d.map(a=>a.args);(0,c.sanitizeDirective)(a),e=(0,c.assignWithDepth_default)(e,[...a])}else e=d.args;if(!e)return;let f=(0,c.detectType)(a,b),g="config";return void 0!==e[g]&&("flowchart-v2"===f&&(f="flowchart"),e[f]=e[g],delete e[g]),e},"detectInit"),aL=(0,d.__name)(function(a,b=null){try{let e,f=RegExp(`[%]{2}(?![{]${aJ.source})(?=[}][%]{2}).*
2
2
  `,"ig");a=a.trim().replace(f,"").replace(/'/gm,'"'),d.log.debug(`Detecting diagram directive${null!==b?" type:"+b:""} based on the text:${a}`);let g=[];for(;null!==(e=c.directiveRegex.exec(a));)if(e.index===c.directiveRegex.lastIndex&&c.directiveRegex.lastIndex++,e&&!b||b&&e[1]?.match(b)||b&&e[2]?.match(b)){let a=e[1]?e[1]:e[2],b=e[3]?e[3].trim():e[4]?JSON.parse(e[4].trim()):null;g.push({type:a,args:b})}if(0===g.length)return{type:a,args:null};return 1===g.length?g[0]:g}catch(c){return d.log.error(`ERROR: ${c.message} - Unable to parse directive type: '${b}' based on the text: '${a}'`),{type:void 0,args:null}}},"detectDirective"),aM=(0,d.__name)(function(a){return a.replace(c.directiveRegex,"")},"removeDirectives"),aN=(0,d.__name)(function(a,b){for(let[c,d]of b.entries())if(d.match(a))return c;return -1},"isSubstringInArray");function aO(a,b){return a?aI[`curve${a.charAt(0).toUpperCase()+a.slice(1)}`]??b:b}function aP(a,b){let c=a.trim();if(c)return"loose"!==b.securityLevel?(0,e.sanitizeUrl)(c):c}(0,d.__name)(aO,"interpolateToCurve"),(0,d.__name)(aP,"formatUrl");var aQ=(0,d.__name)((a,...b)=>{let c=a.split("."),e=c.length-1,f=c[e],g=window;for(let b=0;b<e;b++)if(!(g=g[c[b]]))return void d.log.error(`Function name: ${a} not found in window`);g[f](...b)},"runFunc");function aR(a,b){return a&&b?Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2)):0}function aS(a){let b,c=0;return a.forEach(a=>{c+=aR(a,b),b=a}),aV(a,c/2)}function aT(a){return 1===a.length?a[0]:aS(a)}(0,d.__name)(aR,"distance"),(0,d.__name)(aS,"traverseEdge"),(0,d.__name)(aT,"calcLabelPosition");var aU=(0,d.__name)((a,b=2)=>{let c=Math.pow(10,b);return Math.round(a*c)/c},"roundNumber"),aV=(0,d.__name)((a,b)=>{let c,d=b;for(let b of a){if(c){let a=aR(b,c);if(0===a)return c;if(a<d)d-=a;else{let e=d/a;if(e<=0)return c;if(e>=1)return{x:b.x,y:b.y};if(e>0&&e<1)return{x:aU((1-e)*c.x+e*b.x,5),y:aU((1-e)*c.y+e*b.y,5)}}}c=b}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),aW=(0,d.__name)((a,b,c)=>{d.log.info(`our points ${JSON.stringify(b)}`),b[0]!==c&&(b=b.reverse());let e=aV(b,25),f=a?10:5,g=Math.atan2(b[0].y-e.y,b[0].x-e.x),h={x:0,y:0};return h.x=Math.sin(g)*f+(b[0].x+e.x)/2,h.y=-Math.cos(g)*f+(b[0].y+e.y)/2,h},"calcCardinalityPosition");function aX(a,b,c){let e=structuredClone(c);d.log.info("our points",e),"start_left"!==b&&"start_right"!==b&&e.reverse();let f=aV(e,25+a),g=10+.5*a,h=Math.atan2(e[0].y-f.y,e[0].x-f.x),i={x:0,y:0};return"start_left"===b?(i.x=Math.sin(h+Math.PI)*g+(e[0].x+f.x)/2,i.y=-Math.cos(h+Math.PI)*g+(e[0].y+f.y)/2):"end_right"===b?(i.x=Math.sin(h-Math.PI)*g+(e[0].x+f.x)/2-5,i.y=-Math.cos(h-Math.PI)*g+(e[0].y+f.y)/2-5):"end_left"===b?(i.x=Math.sin(h)*g+(e[0].x+f.x)/2-5,i.y=-Math.cos(h)*g+(e[0].y+f.y)/2-5):(i.x=Math.sin(h)*g+(e[0].x+f.x)/2,i.y=-Math.cos(h)*g+(e[0].y+f.y)/2),i}function aY(a){let b="",c="";for(let d of a)void 0!==d&&(d.startsWith("color:")||d.startsWith("text-align:")?c=c+d+";":b=b+d+";");return{style:b,labelStyle:c}}(0,d.__name)(aX,"calcTerminalLabelPosition"),(0,d.__name)(aY,"getStylesFromArray");var aZ=0,a$=(0,d.__name)(()=>(aZ++,"id-"+Math.random().toString(36).substr(2,12)+"-"+aZ),"generateId");function a_(a){let b="",c="0123456789abcdef",d=c.length;for(let e=0;e<a;e++)b+=c.charAt(Math.floor(Math.random()*d));return b}(0,d.__name)(a_,"makeRandomHex");var a0=(0,d.__name)(a=>a_(a.length),"random"),a1=(0,d.__name)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),a2=(0,d.__name)(function(a,b){let d=b.text.replace(c.common_default.lineBreakRegex," "),[,e]=bc(b.fontSize),f=a.append("text");f.attr("x",b.x),f.attr("y",b.y),f.style("text-anchor",b.anchor),f.style("font-family",b.fontFamily),f.style("font-size",e),f.style("font-weight",b.fontWeight),f.attr("fill",b.fill),void 0!==b.class&&f.attr("class",b.class);let g=f.append("tspan");return g.attr("x",b.x+2*b.textMargin),g.attr("fill",b.fill),g.text(d),f},"drawSimpleText"),a3=Y((a,b,d)=>{if(!a||(d=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},d),c.common_default.lineBreakRegex.test(a)))return a;let e=a.split(" ").filter(Boolean),f=[],g="";return e.forEach((a,c)=>{let h=a6(`${a} `,d),i=a6(g,d);if(h>b){let{hyphenatedStrings:c,remainingWord:e}=a4(a,b,"-",d);f.push(g,...c),g=e}else i+h>=b?(f.push(g),g=a):g=[g,a].filter(Boolean).join(" ");c+1===e.length&&f.push(g)}),f.filter(a=>""!==a).join(d.joinWith)},(a,b,c)=>`${a}${b}${c.fontSize}${c.fontWeight}${c.fontFamily}${c.joinWith}`),a4=Y((a,b,c="-",d)=>{d=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},d);let e=[...a],f=[],g="";return e.forEach((a,h)=>{let i=`${g}${a}`;if(a6(i,d)>=b){let a=e.length===h+1,b=`${i}${c}`;f.push(a?i:b),g=""}else g=i}),{hyphenatedStrings:f,remainingWord:g}},(a,b,c="-",d)=>`${a}${b}${c}${d.fontSize}${d.fontWeight}${d.fontFamily}`);function a5(a,b){return a7(a,b).height}function a6(a,b){return a7(a,b).width}(0,d.__name)(a5,"calculateTextHeight"),(0,d.__name)(a6,"calculateTextWidth");var a7=Y((a,b)=>{let{fontSize:d=12,fontFamily:e="Arial",fontWeight:f=400}=b;if(!a)return{width:0,height:0};let[,g]=bc(d),h=a.split(c.common_default.lineBreakRegex),i=[],j=(0,X.select)("body");if(!j.remove)return{width:0,height:0,lineHeight:0};let k=j.append("svg");for(let a of["sans-serif",e]){let b=0,c={width:0,height:0,lineHeight:0};for(let d of h){let e=a1();e.text=d||"​";let h=a2(k,e).style("font-size",g).style("font-weight",f).style("font-family",a),i=(h._groups||h)[0][0].getBBox();if(0===i.width&&0===i.height)throw Error("svg element not in render tree");c.width=Math.round(Math.max(c.width,i.width)),b=Math.round(i.height),c.height+=b,c.lineHeight=Math.round(Math.max(c.lineHeight,b))}i.push(c)}k.remove();let l=isNaN(i[1].height)||isNaN(i[1].width)||isNaN(i[1].lineHeight)||i[0].height>i[1].height&&i[0].width>i[1].width&&i[0].lineHeight>i[1].lineHeight?0:1;return i[l]},(a,b)=>`${a}${b.fontSize}${b.fontWeight}${b.fontFamily}`),a8=class{constructor(a=!1,b){this.count=0,this.count=b?b.length:0,this.next=a?()=>this.count++:()=>Date.now()}static{(0,d.__name)(this,"InitIDGenerator")}},a9=(0,d.__name)(function(a){return b=b||document.createElement("div"),a=escape(a).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),b.innerHTML=a,unescape(b.textContent)},"entityDecode");function ba(a){return"str"in a}(0,d.__name)(ba,"isDetailedError");var bb=(0,d.__name)((a,b,c,d)=>{if(!d)return;let e=a.node()?.getBBox();e&&a.append("text").text(d).attr("text-anchor","middle").attr("x",e.x+e.width/2).attr("y",-c).attr("class",b)},"insertTitle"),bc=(0,d.__name)(a=>{if("number"==typeof a)return[a,a+"px"];let b=parseInt(a??"",10);return Number.isNaN(b)?[void 0,void 0]:a===String(b)?[b,a+"px"]:[b,a]},"parseFontSize");function bd(a,b){return function(a,...b){return function(a,...b){let c=b.slice(0,-1),d=b[b.length-1],e=a;for(let a=0;a<c.length;a++)e=function a(b,c,d,e){if($(b)&&(b=Object(b)),null==c||"object"!=typeof c)return b;if(e.has(c))return function(a){if($(a))return a;if(Array.isArray(a)||_(a)||a instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&a instanceof SharedArrayBuffer)return a.slice(0);let b=Object.getPrototypeOf(a);if(null==b)return Object.assign(Object.create(b),a);let c=b.constructor;if(a instanceof Date||a instanceof Map||a instanceof Set)return new c(a);if(a instanceof RegExp){let b=new c(a);return b.lastIndex=a.lastIndex,b}if(a instanceof DataView)return new c(a.buffer.slice(0));if(a instanceof Error){let b;return(b=a instanceof AggregateError?new c(a.errors,a.message,{cause:a.cause}):new c(a.message,{cause:a.cause})).stack=a.stack,Object.assign(b,a),b}return"u">typeof File&&a instanceof File?new c([a],a.name,{type:a.type,lastModified:a.lastModified}):"object"==typeof a?Object.assign(Object.create(b),a):a}(e.get(c));if(e.set(c,b),Array.isArray(c)){c=c.slice();for(let a=0;a<c.length;a++)c[a]=c[a]??void 0}let f=[...Object.keys(c),...aa(c)];for(let h=0;h<f.length;h++){let i=f[h];if("__proto__"===i)continue;let j=c[i],k=b[i];if(aE(j)&&(j={...j}),aE(k)&&(k={...k}),ac(j)&&(j=aD(j)),Array.isArray(j))if(Array.isArray(k)){let a=[],b=Reflect.ownKeys(k);for(let c=0;c<b.length;c++){let d=b[c];a[d]=k[d]}k=a}else{var g;if(aF(g=k)&&aG(g)){let a=[];for(let b=0;b<k.length;b++)a[b]=k[b];k=a}else k=[]}let l=d(k,j,i,b,c,e);void 0!==l?b[i]=l:Array.isArray(j)||aF(k)&&aF(j)&&(ad(k)||ad(j)||aH(k)||aH(j))?b[i]=a(k,j,d,e):null==k&&ad(j)?b[i]=a({},j,d,e):null==k&&aH(j)?b[i]=aD(j):(void 0===k||void 0!==j)&&(b[i]=j)}return b}(e,c[a],d,new Map);return e}(a,...b,Z)}({},a,b)}(0,d.__name)(bd,"cleanAndMerge");var be={assignWithDepth:c.assignWithDepth_default,wrapLabel:a3,calculateTextHeight:a5,calculateTextWidth:a6,calculateTextDimensions:a7,cleanAndMerge:bd,detectInit:aK,detectDirective:aL,isSubstringInArray:aN,interpolateToCurve:aO,calcLabelPosition:aT,calcCardinalityPosition:aW,calcTerminalLabelPosition:aX,formatUrl:aP,getStylesFromArray:aY,generateId:a$,random:a0,runFunc:aQ,entityDecode:a9,insertTitle:bb,isLabelCoordinateInPath:bj,parseFontSize:bc,InitIDGenerator:a8},bf=(0,d.__name)(function(a){let b=a;return(b=(b=b.replace(/style.*:\S*#.*;/g,function(a){return a.substring(0,a.length-1)})).replace(/classDef.*:\S*#.*;/g,function(a){return a.substring(0,a.length-1)})).replace(/#\w+;/g,function(a){let b=a.substring(1,a.length-1);return/^\+?\d+$/.test(b)?"fl°°"+b+"¶ß":"fl°"+b+"¶ß"})},"encodeEntities"),bg=(0,d.__name)(function(a){return a.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),bh=(0,d.__name)((a,b,{counter:c=0,prefix:d,suffix:e},f)=>f||`${d?`${d}_`:""}${a}_${b}_${c}${e?`_${e}`:""}`,"getEdgeId");function bi(a){return a??null}function bj(a,b){let c=Math.round(a.x),d=Math.round(a.y),e=b.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return e.includes(c.toString())||e.includes(d.toString())}(0,d.__name)(bi,"handleUndefinedAttr"),(0,d.__name)(bj,"isLabelCoordinateInPath"),a.s(["ZERO_WIDTH_SPACE",0,"​","calculateTextDimensions",0,a7,"calculateTextHeight",0,a5,"calculateTextWidth",0,a6,"cleanAndMerge",0,bd,"decodeEntities",0,bg,"encodeEntities",0,bf,"generateId",0,a$,"getEdgeId",0,bh,"getStylesFromArray",0,aY,"handleUndefinedAttr",0,bi,"interpolateToCurve",0,aO,"isDetailedError",0,ba,"parseFontSize",0,bc,"random",0,a0,"removeDirectives",0,aM,"utils_default",0,be,"wrapLabel",0,a3],197112)}];
3
3
 
4
4
  //# sourceMappingURL=12y~_mermaid_dist_chunks_mermaid_core_chunk-5ZQYHXKU_mjs_0z1.978._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[762927,a=>{"use strict";var b=a.i(764901),c=a.i(215586),d=a.i(211193),e=a.i(706860),f=a.i(654669),g=a.i(197112),h=a.i(604225),i=a.i(762939);a.i(43066);var j=a.i(129393),k=a.i(501649),l=a.i(878486),m=a.i(951640),n=a.i(906040),o=a.i(906562),p=a.i(326783),q=a.i(823277),r=a.i(742046),s=a.i(768894),t=a.i(218157),u=a.i(189283),v=a.i(298648),w=a.i(455784),x=a.i(504591),y=(0,i.__name)((a,b,c,d,e,f=!1,g)=>{b.arrowTypeStart&&B(a,"start",b.arrowTypeStart,c,d,e,f,g),b.arrowTypeEnd&&B(a,"end",b.arrowTypeEnd,c,d,e,f,g)},"addEdgeMarkers"),z={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},A=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],B=(0,i.__name)((a,b,c,d,e,f,g=!1,h)=>{let j=z[c],k=j&&A.includes(j.type);if(!j)return void i.log.warn(`Unknown arrow type: ${c}`);let l=j.type,m=`${e}_${f}-${l}${"start"===b?"Start":"End"}${g&&k?"-margin":""}`;if(h&&""!==h.trim()){let c=h.replace(/[^\dA-Za-z]/g,"_"),e=`${m}_${c}`;if(!document.getElementById(e)){let a=document.getElementById(m);if(a){let b=a.cloneNode(!0);b.id=e,b.querySelectorAll("path, circle, line").forEach(a=>{a.setAttribute("stroke",h),j.fill&&a.setAttribute("fill",h)}),a.parentNode?.appendChild(b)}}a.attr(`marker-${b}`,`url(${d}#${e})`)}else a.attr(`marker-${b}`,`url(${d}#${m})`)},"addEdgeMarker"),C=(0,i.__name)(a=>"string"==typeof a?a:(0,h.getConfig2)()?.flowchart?.curve,"resolveEdgeCurveType"),D=new Map,E=new Map,F=(0,i.__name)(()=>{D.clear(),E.clear()},"clear"),G=(0,i.__name)(a=>a?"string"==typeof a?a:a.reduce((a,b)=>a+";"+b,""):"","getLabelStyles"),H=(0,i.__name)(async(a,d)=>{let g,j=(0,h.getConfig2)(),k=(0,h.getEffectiveHtmlLabels)(j),{labelStyles:l}=(0,e.styles2String)(d);d.labelStyle=l;let m=a.insert("g").attr("class","edgeLabel"),n=m.insert("g").attr("class","label").attr("data-id",d.id),o="markdown"===d.labelType,p=await (0,f.createText)(a,d.label,{style:G(d.labelStyle),useHtmlLabels:k,addSvgBackground:!0,isNode:!1,markdown:o,width:void 0},j);n.node().appendChild(p),i.log.info("abc82",d,d.labelType);let q=p.getBBox(),r=q;if(k){let a=p.children[0],b=(0,w.select)(p);r=q=a.getBoundingClientRect(),b.attr("width",q.width),b.attr("height",q.height)}else{let a=(0,w.select)(p).select("text").node();a&&"function"==typeof a.getBBox&&(r=a.getBBox())}if(n.attr("transform",(0,b.computeLabelTransform)(r,k)),D.set(d.id,m),d.width=q.width,d.height=q.height,d.startLabelLeft){let e=a.insert("g").attr("class","edgeTerminals"),f=e.insert("g").attr("class","inner"),h=await (0,c.createLabel_default)(f,d.startLabelLeft,G(d.labelStyle)||"",!1,!1);g=h;let i=h.getBBox();if(k){let a=h.children[0],b=(0,w.select)(h);i=a.getBoundingClientRect(),b.attr("width",i.width),b.attr("height",i.height)}f.attr("transform",(0,b.computeLabelTransform)(i,k)),E.get(d.id)||E.set(d.id,{}),E.get(d.id).startLeft=e,I(g,d.startLabelLeft)}if(d.startLabelRight){let e=a.insert("g").attr("class","edgeTerminals"),f=e.insert("g").attr("class","inner"),h=await (0,c.createLabel_default)(f,d.startLabelRight,G(d.labelStyle)||"",!1,!1);g=h;let i=h.getBBox();if(k){let a=h.children[0],b=(0,w.select)(h);i=a.getBoundingClientRect(),b.attr("width",i.width),b.attr("height",i.height)}f.attr("transform",(0,b.computeLabelTransform)(i,k)),E.get(d.id)||E.set(d.id,{}),E.get(d.id).startRight=e,I(g,d.startLabelRight)}if(d.endLabelLeft){let e=a.insert("g").attr("class","edgeTerminals"),f=e.insert("g").attr("class","inner"),h=await (0,c.createLabel_default)(e,d.endLabelLeft,G(d.labelStyle)||"",!1,!1);g=h;let i=h.getBBox();if(k){let a=h.children[0],b=(0,w.select)(h);i=a.getBoundingClientRect(),b.attr("width",i.width),b.attr("height",i.height)}f.attr("transform",(0,b.computeLabelTransform)(i,k)),E.get(d.id)||E.set(d.id,{}),E.get(d.id).endLeft=e,I(g,d.endLabelLeft)}if(d.endLabelRight){let e=a.insert("g").attr("class","edgeTerminals"),f=e.insert("g").attr("class","inner"),h=await (0,c.createLabel_default)(e,d.endLabelRight,G(d.labelStyle)||"",!1,!1);g=h;let i=h.getBBox();if(k){let a=h.children[0],b=(0,w.select)(h);i=a.getBoundingClientRect(),b.attr("width",i.width),b.attr("height",i.height)}f.attr("transform",(0,b.computeLabelTransform)(i,k)),E.get(d.id)||E.set(d.id,{}),E.get(d.id).endRight=e,I(g,d.endLabelRight)}return p},"insertEdgeLabel");function I(a,b){(0,h.getEffectiveHtmlLabels)((0,h.getConfig2)())&&a&&(a.style.width=9*b.length+"px",a.style.height="12px")}(0,i.__name)(I,"setTerminalWidth");var J=(0,i.__name)((a,b)=>{i.log.debug("Moving label abc88 ",a.id,a.label,D.get(a.id),b);let c=b.updatedPath?b.updatedPath:b.originalPath,e=(0,h.getConfig2)(),{subGraphTitleTotalMargin:f}=(0,d.getSubGraphTitleMargins)(e);if(a.label){let d=D.get(a.id),e=a.x,h=a.y;if(c){let d=g.utils_default.calcLabelPosition(c);i.log.debug("Moving label "+a.label+" from (",e,",",h,") to (",d.x,",",d.y,") abc88"),b.updatedPath&&(e=d.x,h=d.y)}d.attr("transform",`translate(${e}, ${h+f/2})`)}if(a.startLabelLeft){let b=E.get(a.id).startLeft,d=a.x,e=a.y;if(c){let b=g.utils_default.calcTerminalLabelPosition(10*!!a.arrowTypeStart,"start_left",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}if(a.startLabelRight){let b=E.get(a.id).startRight,d=a.x,e=a.y;if(c){let b=g.utils_default.calcTerminalLabelPosition(10*!!a.arrowTypeStart,"start_right",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}if(a.endLabelLeft){let b=E.get(a.id).endLeft,d=a.x,e=a.y;if(c){let b=g.utils_default.calcTerminalLabelPosition(10*!!a.arrowTypeEnd,"end_left",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}if(a.endLabelRight){let b=E.get(a.id).endRight,d=a.x,e=a.y;if(c){let b=g.utils_default.calcTerminalLabelPosition(10*!!a.arrowTypeEnd,"end_right",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}},"positionEdgeLabel"),K=(0,i.__name)((a,b)=>{let c=a.x,d=a.y,e=Math.abs(b.x-c),f=Math.abs(b.y-d),g=a.width/2,h=a.height/2;return e>=g||f>=h},"outsideNode"),L=(0,i.__name)((a,b,c)=>{i.log.debug(`intersection calc abc89:
1
+ module.exports=[762927,a=>{"use strict";var b=a.i(764901),c=a.i(215586),d=a.i(211193),e=a.i(706860),f=a.i(654669),g=a.i(197112),h=a.i(604225),i=a.i(762939);a.i(43066);var j=a.i(129393),k=a.i(501649),l=a.i(878486),m=a.i(951640),n=a.i(906040),o=a.i(847758),p=a.i(326783),q=a.i(823277),r=a.i(742046),s=a.i(768894),t=a.i(218157),u=a.i(189283),v=a.i(298648),w=a.i(455784),x=a.i(504591),y=(0,i.__name)((a,b,c,d,e,f=!1,g)=>{b.arrowTypeStart&&B(a,"start",b.arrowTypeStart,c,d,e,f,g),b.arrowTypeEnd&&B(a,"end",b.arrowTypeEnd,c,d,e,f,g)},"addEdgeMarkers"),z={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},A=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],B=(0,i.__name)((a,b,c,d,e,f,g=!1,h)=>{let j=z[c],k=j&&A.includes(j.type);if(!j)return void i.log.warn(`Unknown arrow type: ${c}`);let l=j.type,m=`${e}_${f}-${l}${"start"===b?"Start":"End"}${g&&k?"-margin":""}`;if(h&&""!==h.trim()){let c=h.replace(/[^\dA-Za-z]/g,"_"),e=`${m}_${c}`;if(!document.getElementById(e)){let a=document.getElementById(m);if(a){let b=a.cloneNode(!0);b.id=e,b.querySelectorAll("path, circle, line").forEach(a=>{a.setAttribute("stroke",h),j.fill&&a.setAttribute("fill",h)}),a.parentNode?.appendChild(b)}}a.attr(`marker-${b}`,`url(${d}#${e})`)}else a.attr(`marker-${b}`,`url(${d}#${m})`)},"addEdgeMarker"),C=(0,i.__name)(a=>"string"==typeof a?a:(0,h.getConfig2)()?.flowchart?.curve,"resolveEdgeCurveType"),D=new Map,E=new Map,F=(0,i.__name)(()=>{D.clear(),E.clear()},"clear"),G=(0,i.__name)(a=>a?"string"==typeof a?a:a.reduce((a,b)=>a+";"+b,""):"","getLabelStyles"),H=(0,i.__name)(async(a,d)=>{let g,j=(0,h.getConfig2)(),k=(0,h.getEffectiveHtmlLabels)(j),{labelStyles:l}=(0,e.styles2String)(d);d.labelStyle=l;let m=a.insert("g").attr("class","edgeLabel"),n=m.insert("g").attr("class","label").attr("data-id",d.id),o="markdown"===d.labelType,p=await (0,f.createText)(a,d.label,{style:G(d.labelStyle),useHtmlLabels:k,addSvgBackground:!0,isNode:!1,markdown:o,width:void 0},j);n.node().appendChild(p),i.log.info("abc82",d,d.labelType);let q=p.getBBox(),r=q;if(k){let a=p.children[0],b=(0,w.select)(p);r=q=a.getBoundingClientRect(),b.attr("width",q.width),b.attr("height",q.height)}else{let a=(0,w.select)(p).select("text").node();a&&"function"==typeof a.getBBox&&(r=a.getBBox())}if(n.attr("transform",(0,b.computeLabelTransform)(r,k)),D.set(d.id,m),d.width=q.width,d.height=q.height,d.startLabelLeft){let e=a.insert("g").attr("class","edgeTerminals"),f=e.insert("g").attr("class","inner"),h=await (0,c.createLabel_default)(f,d.startLabelLeft,G(d.labelStyle)||"",!1,!1);g=h;let i=h.getBBox();if(k){let a=h.children[0],b=(0,w.select)(h);i=a.getBoundingClientRect(),b.attr("width",i.width),b.attr("height",i.height)}f.attr("transform",(0,b.computeLabelTransform)(i,k)),E.get(d.id)||E.set(d.id,{}),E.get(d.id).startLeft=e,I(g,d.startLabelLeft)}if(d.startLabelRight){let e=a.insert("g").attr("class","edgeTerminals"),f=e.insert("g").attr("class","inner"),h=await (0,c.createLabel_default)(f,d.startLabelRight,G(d.labelStyle)||"",!1,!1);g=h;let i=h.getBBox();if(k){let a=h.children[0],b=(0,w.select)(h);i=a.getBoundingClientRect(),b.attr("width",i.width),b.attr("height",i.height)}f.attr("transform",(0,b.computeLabelTransform)(i,k)),E.get(d.id)||E.set(d.id,{}),E.get(d.id).startRight=e,I(g,d.startLabelRight)}if(d.endLabelLeft){let e=a.insert("g").attr("class","edgeTerminals"),f=e.insert("g").attr("class","inner"),h=await (0,c.createLabel_default)(e,d.endLabelLeft,G(d.labelStyle)||"",!1,!1);g=h;let i=h.getBBox();if(k){let a=h.children[0],b=(0,w.select)(h);i=a.getBoundingClientRect(),b.attr("width",i.width),b.attr("height",i.height)}f.attr("transform",(0,b.computeLabelTransform)(i,k)),E.get(d.id)||E.set(d.id,{}),E.get(d.id).endLeft=e,I(g,d.endLabelLeft)}if(d.endLabelRight){let e=a.insert("g").attr("class","edgeTerminals"),f=e.insert("g").attr("class","inner"),h=await (0,c.createLabel_default)(e,d.endLabelRight,G(d.labelStyle)||"",!1,!1);g=h;let i=h.getBBox();if(k){let a=h.children[0],b=(0,w.select)(h);i=a.getBoundingClientRect(),b.attr("width",i.width),b.attr("height",i.height)}f.attr("transform",(0,b.computeLabelTransform)(i,k)),E.get(d.id)||E.set(d.id,{}),E.get(d.id).endRight=e,I(g,d.endLabelRight)}return p},"insertEdgeLabel");function I(a,b){(0,h.getEffectiveHtmlLabels)((0,h.getConfig2)())&&a&&(a.style.width=9*b.length+"px",a.style.height="12px")}(0,i.__name)(I,"setTerminalWidth");var J=(0,i.__name)((a,b)=>{i.log.debug("Moving label abc88 ",a.id,a.label,D.get(a.id),b);let c=b.updatedPath?b.updatedPath:b.originalPath,e=(0,h.getConfig2)(),{subGraphTitleTotalMargin:f}=(0,d.getSubGraphTitleMargins)(e);if(a.label){let d=D.get(a.id),e=a.x,h=a.y;if(c){let d=g.utils_default.calcLabelPosition(c);i.log.debug("Moving label "+a.label+" from (",e,",",h,") to (",d.x,",",d.y,") abc88"),b.updatedPath&&(e=d.x,h=d.y)}d.attr("transform",`translate(${e}, ${h+f/2})`)}if(a.startLabelLeft){let b=E.get(a.id).startLeft,d=a.x,e=a.y;if(c){let b=g.utils_default.calcTerminalLabelPosition(10*!!a.arrowTypeStart,"start_left",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}if(a.startLabelRight){let b=E.get(a.id).startRight,d=a.x,e=a.y;if(c){let b=g.utils_default.calcTerminalLabelPosition(10*!!a.arrowTypeStart,"start_right",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}if(a.endLabelLeft){let b=E.get(a.id).endLeft,d=a.x,e=a.y;if(c){let b=g.utils_default.calcTerminalLabelPosition(10*!!a.arrowTypeEnd,"end_left",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}if(a.endLabelRight){let b=E.get(a.id).endRight,d=a.x,e=a.y;if(c){let b=g.utils_default.calcTerminalLabelPosition(10*!!a.arrowTypeEnd,"end_right",c);d=b.x,e=b.y}b.attr("transform",`translate(${d}, ${e})`)}},"positionEdgeLabel"),K=(0,i.__name)((a,b)=>{let c=a.x,d=a.y,e=Math.abs(b.x-c),f=Math.abs(b.y-d),g=a.width/2,h=a.height/2;return e>=g||f>=h},"outsideNode"),L=(0,i.__name)((a,b,c)=>{i.log.debug(`intersection calc abc89:
2
2
  outsidePoint: ${JSON.stringify(b)}
3
3
  insidePoint : ${JSON.stringify(c)}
4
4
  node : x:${a.x} y:${a.y} w:${a.width} h:${a.height}`);let d=a.x,e=a.y,f=Math.abs(d-c.x),g=a.width/2,h=c.x<b.x?g-f:g+f,j=a.height/2,k=Math.abs(b.y-c.y),l=Math.abs(b.x-c.x);if(Math.abs(e-b.y)*g>Math.abs(d-b.x)*j){let a=c.y<b.y?b.y-j-e:e-j-b.y;h=l*a/k;let d={x:c.x<b.x?c.x+h:c.x-l+h,y:c.y<b.y?c.y+k-a:c.y-k+a};return 0===h&&(d.x=b.x,d.y=b.y),0===l&&(d.x=b.x),0===k&&(d.y=b.y),i.log.debug(`abc89 top/bottom calc, Q ${k}, q ${a}, R ${l}, r ${h}`,d),d}{let a=k*(h=c.x<b.x?b.x-g-d:d-g-b.x)/l,e=c.x<b.x?c.x+l-h:c.x-l+h,f=c.y<b.y?c.y+a:c.y-a;return i.log.debug(`sides calc abc89, Q ${k}, q ${a}, R ${l}, r ${h}`,{_x:e,_y:f}),0===h&&(e=b.x,f=b.y),0===l&&(e=b.x),0===k&&(f=b.y),{x:e,y:f}}},"intersection"),M=(0,i.__name)((a,b)=>{i.log.warn("abc88 cutPathAtIntersect",a,b);let c=[],d=a[0],e=!1;return a.forEach(a=>{if(i.log.info("abc88 checking point",a,b),K(b,a)||e)i.log.warn("abc88 outside",a,d),d=a,e||c.push(a);else{let f=L(b,d,a);i.log.debug("abc88 inside",a,d,f),i.log.debug("abc88 intersection",f,b);let g=!1;c.forEach(a=>{g=g||a.x===f.x&&a.y===f.y}),c.some(a=>a.x===f.x&&a.y===f.y)?i.log.warn("abc88 no intersect",f,c):c.push(f),e=!0}}),i.log.debug("returning points",c),c},"cutPathAtIntersect");function N(a){let b=[],c=[];for(let d=1;d<a.length-1;d++){let e=a[d-1],f=a[d],g=a[d+1];e.x===f.x&&f.y===g.y&&Math.abs(f.x-g.x)>5&&Math.abs(f.y-e.y)>5?(b.push(f),c.push(d)):e.y===f.y&&f.x===g.x&&Math.abs(f.x-e.x)>5&&Math.abs(f.y-g.y)>5&&(b.push(f),c.push(d))}return{cornerPoints:b,cornerPointPositions:c}}(0,i.__name)(N,"extractCornerPoints");var O=(0,i.__name)(function(a,b,c){let d=b.x-a.x,e=b.y-a.y,f=c/Math.sqrt(d*d+e*e);return{x:b.x-f*d,y:b.y-f*e}},"findAdjacentPoint"),P=(0,i.__name)(function(a){let{cornerPointPositions:b}=N(a),c=[];for(let d=0;d<a.length;d++)if(b.includes(d)){let b=a[d-1],e=a[d+1],f=a[d],g=O(b,f,5),h=O(e,f,5),j=h.x-g.x,k=h.y-g.y;c.push(g);let l=2*Math.sqrt(2),m={x:f.x,y:f.y};Math.abs(e.x-b.x)>10&&Math.abs(e.y-b.y)>=10?(i.log.debug("Corner point fixing",Math.abs(e.x-b.x),Math.abs(e.y-b.y)),m=f.x===g.x?{x:j<0?g.x-5+l:g.x+5-l,y:k<0?g.y-l:g.y+l}:{x:j<0?g.x-l:g.x+l,y:k<0?g.y-5+l:g.y+5-l}):i.log.debug("Corner point skipping fixing",Math.abs(e.x-b.x),Math.abs(e.y-b.y)),c.push(m,h)}else c.push(a[d]);return c},"fixCorners"),Q=(0,i.__name)((a,b,c)=>{let d=Array(Math.floor((a-b-c)/4)).fill("2 2").join(" ");return`0 ${b} ${d} ${c}`},"generateDashArray"),R=(0,i.__name)(function(a,c,d,f,z,A,B,D=!1){let E,F;if(!B)throw Error(`insertEdge: missing diagramId for edge "${c.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:G}=(0,h.getConfig2)(),H=c.points,I=!1,J=[];for(let a in c.cssCompiledStyles)(0,e.isLabelStyle)(a)||J.push(c.cssCompiledStyles[a]);i.log.debug("UIO intersect check",c.points,A.x,z.x),A.intersect&&z.intersect&&!D&&((H=H.slice(1,c.points.length-1)).unshift(z.intersect(H[0])),i.log.debug("Last point UIO",c.start,"-->",c.end,H[H.length-1],A,A.intersect(H[H.length-1])),H.push(A.intersect(H[H.length-1])));let K=btoa(JSON.stringify(H));c.toCluster&&(i.log.info("to cluster abc88",d.get(c.toCluster)),H=M(c.points,d.get(c.toCluster).node),I=!0),c.fromCluster&&(i.log.debug("from cluster abc88",d.get(c.fromCluster),JSON.stringify(H,null,2)),H=M(H.reverse(),d.get(c.fromCluster).node).reverse(),I=!0);let L=H.filter(a=>!Number.isNaN(a.y)),N=C(c.curve);"rounded"!==N&&(L=P(L));let O=k.curveLinear;switch(N){case"linear":case"rounded":O=k.curveLinear;break;case"basis":default:O=j.curveBasis;break;case"cardinal":O=l.curveCardinal;break;case"bumpX":O=m.curveBumpX;break;case"bumpY":O=n.curveBumpY;break;case"catmullRom":O=o.curveCatmullRom;break;case"monotoneX":O=p.curveMonotoneX;break;case"monotoneY":O=q.curveMonotoneY;break;case"natural":O=r.curveNatural;break;case"step":O=s.curveStep;break;case"stepAfter":O=t.curveStepAfter;break;case"stepBefore":O=u.curveStepBefore}let{x:R,y:T}=(0,b.getLineFunctionsWithOffset)(c),V=(0,v.line)().x(R).y(T).curve(O);switch(c.thickness){case"normal":default:E="edge-thickness-normal";break;case"thick":E="edge-thickness-thick";break;case"invisible":E="edge-thickness-invisible"}switch(c.pattern){case"solid":default:E+=" edge-pattern-solid";break;case"dotted":E+=" edge-pattern-dotted";break;case"dashed":E+=" edge-pattern-dashed"}let W="rounded"===N?S(U(L,c),5):V(L),X=Array.isArray(c.style)?c.style:[c.style],Y=X.find(a=>a?.startsWith("stroke:")),Z="";c.animate&&(Z="edge-animation-fast"),c.animation&&(Z="edge-animation-"+c.animation);let $=!1;if("handDrawn"===c.look){let b=x.default.svg(a);Object.assign([],L);let d=b.path(W,{roughness:.3,seed:G});E+=" transition";let e=(F=(0,w.select)(d).select("path").attr("id",`${B}-${c.id}`).attr("class"," "+E+(c.classes?" "+c.classes:"")+(Z?" "+Z:"")).attr("style",X?X.reduce((a,b)=>a+";"+b,""):"")).attr("d");F.attr("d",e),a.node().appendChild(F.node())}else{let d=J.join(";"),e=X?X.reduce((a,b)=>a+b+";",""):"",f=(d?d+";"+e+";":e)+";"+(X?X.reduce((a,b)=>a+";"+b,""):"");F=a.append("path").attr("d",W).attr("id",`${B}-${c.id}`).attr("class"," "+E+(c.classes?" "+c.classes:"")+(Z?" "+Z:"")).attr("style",f),Y=f.match(/stroke:([^;]+)/)?.[1],$=!0===c.animate||!!c.animation||d.includes("animation");let g=F.node(),h="function"==typeof g.getTotalLength?g.getTotalLength():0,i=b.markerOffsets2[c.arrowTypeStart]||0,j=b.markerOffsets2[c.arrowTypeEnd]||0;if("neo"===c.look&&!$){let a="dotted"===c.pattern||"dashed"===c.pattern?Q(h,i,j):`0 ${i} ${h-i-j} ${j}`,b=`stroke-dasharray: ${a}; stroke-dashoffset: 0;`;F.attr("style",b+F.attr("style"))}}F.attr("data-edge",!0),F.attr("data-et","edge"),F.attr("data-id",c.id),F.attr("data-points",K),F.attr("data-look",(0,g.handleUndefinedAttr)(c.look)),c.showPoints&&L.forEach(b=>{a.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",b.x).attr("cy",b.y)});let _="";((0,h.getConfig2)().flowchart.arrowMarkerAbsolute||(0,h.getConfig2)().state.arrowMarkerAbsolute)&&(_=(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),i.log.info("arrowTypeStart",c.arrowTypeStart),i.log.info("arrowTypeEnd",c.arrowTypeEnd);let aa=!$&&c?.look==="neo";y(F,c,_,B,f,aa,Y);let ab=Math.floor(H.length/2),ac=H[ab];g.utils_default.isLabelCoordinateInPath(ac,F.attr("d"))||(I=!0);let ad={};return I&&(ad.updatedPath=H),ad.originalPath=c.points,ad},"insertEdge");function S(a,b){if(a.length<2)return"";let c="",d=a.length;for(let e=0;e<d;e++){let f=a[e],g=a[e-1],h=a[e+1];if(0===e)c+=`M${f.x},${f.y}`;else if(e===d-1)c+=`L${f.x},${f.y}`;else{let a=f.x-g.x,d=f.y-g.y,e=h.x-f.x,i=h.y-f.y,j=Math.hypot(a,d),k=Math.hypot(e,i);if(j<1e-5||k<1e-5){c+=`L${f.x},${f.y}`;continue}let l=a/j,m=d/j,n=e/k,o=i/k,p=Math.acos(Math.max(-1,Math.min(1,l*n+m*o)));if(p<1e-5||1e-5>Math.abs(Math.PI-p)){c+=`L${f.x},${f.y}`;continue}let q=Math.min(b/Math.sin(p/2),j/2,k/2),r=f.x-l*q,s=f.y-m*q,t=f.x+n*q,u=f.y+o*q;c+=`L${r},${s}Q${f.x},${f.y} ${t},${u}`}}return c}function T(a,b){if(!a||!b)return{angle:0,deltaX:0,deltaY:0};let c=b.x-a.x,d=b.y-a.y;return{angle:Math.atan2(d,c),deltaX:c,deltaY:d}}function U(a,c){let d=a.map(a=>({...a}));if(a.length>=2&&b.markerOffsets[c.arrowTypeStart]){let e=b.markerOffsets[c.arrowTypeStart],f=a[0],{angle:g}=T(f,a[1]),h=e*Math.cos(g),i=e*Math.sin(g);d[0].x=f.x+h,d[0].y=f.y+i}let e=a.length;if(e>=2&&b.markerOffsets[c.arrowTypeEnd]){let f=b.markerOffsets[c.arrowTypeEnd],g=a[e-1],{angle:h}=T(a[e-2],g),i=f*Math.cos(h),j=f*Math.sin(h);d[e-1].x=g.x-i,d[e-1].y=g.y-j}return d}(0,i.__name)(S,"generateRoundedPath"),(0,i.__name)(T,"calculateDeltaAndAngle"),(0,i.__name)(U,"applyMarkerOffsetsToPoints");var V=(0,i.__name)((a,b,c,d)=>{b.forEach(b=>{ao[b](a,c,d)})},"insertMarkers"),W=(0,i.__name)((a,b,c)=>{i.log.trace("Making markers for ",c),a.append("defs").append("marker").attr("id",c+"_"+b+"-extensionStart").attr("class","marker extension "+b).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-extensionEnd").attr("class","marker extension "+b).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),a.append("marker").attr("id",c+"_"+b+"-extensionStart-margin").attr("class","marker extension "+b).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),a.append("defs").append("marker").attr("id",c+"_"+b+"-extensionEnd-margin").attr("class","marker extension "+b).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),X=(0,i.__name)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-compositionStart").attr("class","marker composition "+b).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-compositionEnd").attr("class","marker composition "+b).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-compositionStart-margin").attr("class","marker composition "+b).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-compositionEnd-margin").attr("class","marker composition "+b).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Y=(0,i.__name)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-aggregationStart").attr("class","marker aggregation "+b).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-aggregationEnd").attr("class","marker aggregation "+b).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-aggregationStart-margin").attr("class","marker aggregation "+b).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-aggregationEnd-margin").attr("class","marker aggregation "+b).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Z=(0,i.__name)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-dependencyStart").attr("class","marker dependency "+b).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-dependencyEnd").attr("class","marker dependency "+b).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-dependencyStart-margin").attr("class","marker dependency "+b).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-dependencyEnd-margin").attr("class","marker dependency "+b).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),$=(0,i.__name)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-lollipopStart").attr("class","marker lollipop "+b).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),a.append("defs").append("marker").attr("id",c+"_"+b+"-lollipopEnd").attr("class","marker lollipop "+b).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),a.append("defs").append("marker").attr("id",c+"_"+b+"-lollipopStart-margin").attr("class","marker lollipop "+b).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),a.append("defs").append("marker").attr("id",c+"_"+b+"-lollipopEnd-margin").attr("class","marker lollipop "+b).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),_=(0,i.__name)((a,b,c)=>{a.append("marker").attr("id",c+"_"+b+"-pointEnd").attr("class","marker "+b).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",c+"_"+b+"-pointStart").attr("class","marker "+b).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",c+"_"+b+"-pointEnd-margin").attr("class","marker "+b).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),a.append("marker").attr("id",c+"_"+b+"-pointStart-margin").attr("class","marker "+b).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),aa=(0,i.__name)((a,b,c)=>{a.append("marker").attr("id",c+"_"+b+"-circleEnd").attr("class","marker "+b).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",c+"_"+b+"-circleStart").attr("class","marker "+b).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",c+"_"+b+"-circleEnd-margin").attr("class","marker "+b).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),a.append("marker").attr("id",c+"_"+b+"-circleStart-margin").attr("class","marker "+b).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),ab=(0,i.__name)((a,b,c)=>{a.append("marker").attr("id",c+"_"+b+"-crossEnd").attr("class","marker cross "+b).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),a.append("marker").attr("id",c+"_"+b+"-crossStart").attr("class","marker cross "+b).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),a.append("marker").attr("id",c+"_"+b+"-crossEnd-margin").attr("class","marker cross "+b).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),a.append("marker").attr("id",c+"_"+b+"-crossStart-margin").attr("class","marker cross "+b).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),ac=(0,i.__name)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),ad=(0,i.__name)((a,b,c)=>{let{themeVariables:d}=(0,h.getConfig)(),{transitionColor:e}=d;a.append("defs").append("marker").attr("id",c+"_"+b+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),a.append("defs").append("marker").attr("id",c+"_"+b+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${e}`)},"barbNeo"),ae=(0,i.__name)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-onlyOneStart").attr("class","marker onlyOne "+b).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),a.append("defs").append("marker").attr("id",c+"_"+b+"-onlyOneEnd").attr("class","marker onlyOne "+b).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),af=(0,i.__name)((a,b,c)=>{let d=a.append("defs").append("marker").attr("id",c+"_"+b+"-zeroOrOneStart").attr("class","marker zeroOrOne "+b).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");d.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),d.append("path").attr("d","M9,0 L9,18");let e=a.append("defs").append("marker").attr("id",c+"_"+b+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+b).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");e.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),e.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),ag=(0,i.__name)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-oneOrMoreStart").attr("class","marker oneOrMore "+b).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),a.append("defs").append("marker").attr("id",c+"_"+b+"-oneOrMoreEnd").attr("class","marker oneOrMore "+b).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),ah=(0,i.__name)((a,b,c)=>{let d=a.append("defs").append("marker").attr("id",c+"_"+b+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+b).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");d.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),d.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let e=a.append("defs").append("marker").attr("id",c+"_"+b+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+b).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");e.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),e.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),ai=(0,i.__name)((a,b,c)=>{let{themeVariables:d}=(0,h.getConfig)(),{strokeWidth:e}=d;a.append("defs").append("marker").attr("id",c+"_"+b+"-onlyOneStart").attr("class","marker onlyOne "+b).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${e}`),a.append("defs").append("marker").attr("id",c+"_"+b+"-onlyOneEnd").attr("class","marker onlyOne "+b).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${e}`)},"only_one_neo"),aj=(0,i.__name)((a,b,c)=>{let{themeVariables:d}=(0,h.getConfig)(),{strokeWidth:e,mainBkg:f}=d,g=a.append("defs").append("marker").attr("id",c+"_"+b+"-zeroOrOneStart").attr("class","marker zeroOrOne "+b).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");g.append("circle").attr("fill",f??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${e}`).attr("r",6),g.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${e}`);let i=a.append("defs").append("marker").attr("id",c+"_"+b+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+b).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");i.append("circle").attr("fill",f??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${e}`).attr("r",6),i.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${e}`)},"zero_or_one_neo"),ak=(0,i.__name)((a,b,c)=>{let{themeVariables:d}=(0,h.getConfig)(),{strokeWidth:e}=d;a.append("defs").append("marker").attr("id",c+"_"+b+"-oneOrMoreStart").attr("class","marker oneOrMore "+b).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${e}`),a.append("defs").append("marker").attr("id",c+"_"+b+"-oneOrMoreEnd").attr("class","marker oneOrMore "+b).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${e}`)},"one_or_more_neo"),al=(0,i.__name)((a,b,c)=>{let{themeVariables:d}=(0,h.getConfig)(),{strokeWidth:e,mainBkg:f}=d,g=a.append("defs").append("marker").attr("id",c+"_"+b+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+b).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");g.append("circle").attr("fill",f??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${e}`),g.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${e}`);let i=a.append("defs").append("marker").attr("id",c+"_"+b+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+b).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");i.append("circle").attr("fill",f??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${e}`),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${e}`)},"zero_or_more_neo"),am=(0,i.__name)((a,b,c)=>{a.append("defs").append("marker").attr("id",c+"_"+b+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
@@ -1,3 +1,3 @@
1
- module.exports=[750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},857764,(a,b,c)=>{b.exports=a.x("node:url",()=>require("node:url"))},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},462711,651212,316552,a=>{"use strict";var b=a.i(750227);a.s(["minpath",()=>b.default],462711);var c=a.i(59639);a.s(["minproc",()=>c.default],651212);var d=a.i(857764);a.s(["urlToPath",()=>d.fileURLToPath],316552)},710149,a=>{"use strict";a.s(["apiUrl",0,function(a){if(!a.startsWith("/"))return a;let b=process.env.WIKI_URL_PREFIX??"";return!b||a.startsWith(b+"/")||a===b?a:b+a},"isLite",0,function(){return"1"===process.env.WIKI_LITE}])},314875,a=>{"use strict";var b=function(a,c){return(b=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])})(a,c)},c=function(){return(c=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++)for(var e in b=arguments[c])Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e]);return a}).apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError,a.s(["__assign",()=>c,"__awaiter",0,function(a,b,c,d){return new(c||(c=Promise))(function(e,f){function g(a){try{i(d.next(a))}catch(a){f(a)}}function h(a){try{i(d.throw(a))}catch(a){f(a)}}function i(a){var b;a.done?e(a.value):((b=a.value)instanceof c?b:new c(function(a){a(b)})).then(g,h)}i((d=d.apply(a,b||[])).next())})},"__extends",0,function(a,c){if("function"!=typeof c&&null!==c)throw TypeError("Class extends value "+String(c)+" is not a constructor or null");function d(){this.constructor=a}b(a,c),a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},"__generator",0,function(a,b){var c,d,e,f={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]},g=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return g.next=h(0),g.throw=h(1),g.return=h(2),"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function h(h){return function(i){var j=[h,i];if(c)throw TypeError("Generator is already executing.");for(;g&&(g=0,j[0]&&(f=0)),f;)try{if(c=1,d&&(e=2&j[0]?d.return:j[0]?d.throw||((e=d.return)&&e.call(d),0):d.next)&&!(e=e.call(d,j[1])).done)return e;switch(d=0,e&&(j=[2&j[0],e.value]),j[0]){case 0:case 1:e=j;break;case 4:return f.label++,{value:j[1],done:!1};case 5:f.label++,d=j[1],j=[0];continue;case 7:j=f.ops.pop(),f.trys.pop();continue;default:if(!(e=(e=f.trys).length>0&&e[e.length-1])&&(6===j[0]||2===j[0])){f=0;continue}if(3===j[0]&&(!e||j[1]>e[0]&&j[1]<e[3])){f.label=j[1];break}if(6===j[0]&&f.label<e[1]){f.label=e[1],e=j;break}if(e&&f.label<e[2]){f.label=e[2],f.ops.push(j);break}e[2]&&f.ops.pop(),f.trys.pop();continue}j=b.call(a,f)}catch(a){j=[6,a],d=0}finally{c=e=0}if(5&j[0])throw j[1];return{value:j[0]?j[1]:void 0,done:!0}}}},"__rest",0,function(a,b){var c={};for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&0>b.indexOf(d)&&(c[d]=a[d]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols)for(var e=0,d=Object.getOwnPropertySymbols(a);e<d.length;e++)0>b.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(a,d[e])&&(c[d[e]]=a[d[e]]);return c},"__spreadArray",0,function(a,b,c){if(c||2==arguments.length)for(var d,e=0,f=b.length;e<f;e++)!d&&e in b||(d||(d=Array.prototype.slice.call(b,0,e)),d[e]=b[e]);return a.concat(d||Array.prototype.slice.call(b))}])},463652,(a,b,c)=>{"use strict";c._=function(a){return a&&a.__esModule?a:{default:a}}},334743,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules__pnpm_0y~gqyx._.js","server/chunks/ssr/node_modules__pnpm_04rulr6._.js","server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-5ZQYHXKU_mjs_0z1.978._.js","server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-XPW4576I_mjs_0u7glrg._.js","server/chunks/ssr/0hhx_roughjs_bundled_rough_esm_0hyphnf.js","server/chunks/ssr/12y~_mermaid_dist_mermaid_core_mjs_0hj_n-~._.js","server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-CSCIHK7Q_mjs_01i7moi._.js","server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-3OPIFGDE_mjs_09p1amp._.js","server/chunks/ssr/node_modules__pnpm_00krony._.js","server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-O5CBEL6O_mjs_11437bo._.js","server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-KSCS5N6A_mjs_0v4oeem._.js"].map(b=>a.l(b))).then(()=>b(496249)))},458647,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__05-uq57._.js","server/chunks/ssr/node_modules__pnpm_0a4su30._.js","server/chunks/ssr/0~c0_docx-preview_dist_docx-preview_mjs_107snq3._.js"].map(b=>a.l(b))).then(()=>b(204460)))},287443,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__0btd01s._.js","server/chunks/ssr/node_modules__pnpm_0o~d81.._.js","server/chunks/ssr/node_modules__pnpm_0a4su30._.js"].map(b=>a.l(b))).then(()=>b(170263)))},57386,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0se0_xlsx_xlsx_mjs_12z-ju4._.js"].map(b=>a.l(b))).then(()=>b(86253)))}];
1
+ module.exports=[750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},857764,(a,b,c)=>{b.exports=a.x("node:url",()=>require("node:url"))},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},462711,651212,316552,a=>{"use strict";var b=a.i(750227);a.s(["minpath",()=>b.default],462711);var c=a.i(59639);a.s(["minproc",()=>c.default],651212);var d=a.i(857764);a.s(["urlToPath",()=>d.fileURLToPath],316552)},710149,a=>{"use strict";a.s(["apiUrl",0,function(a){if(!a.startsWith("/"))return a;let b=process.env.WIKI_URL_PREFIX??"";return!b||a.startsWith(b+"/")||a===b?a:b+a},"isLite",0,function(){return"1"===process.env.WIKI_LITE}])},314875,a=>{"use strict";var b=function(a,c){return(b=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])})(a,c)},c=function(){return(c=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++)for(var e in b=arguments[c])Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e]);return a}).apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError,a.s(["__assign",()=>c,"__awaiter",0,function(a,b,c,d){return new(c||(c=Promise))(function(e,f){function g(a){try{i(d.next(a))}catch(a){f(a)}}function h(a){try{i(d.throw(a))}catch(a){f(a)}}function i(a){var b;a.done?e(a.value):((b=a.value)instanceof c?b:new c(function(a){a(b)})).then(g,h)}i((d=d.apply(a,b||[])).next())})},"__extends",0,function(a,c){if("function"!=typeof c&&null!==c)throw TypeError("Class extends value "+String(c)+" is not a constructor or null");function d(){this.constructor=a}b(a,c),a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},"__generator",0,function(a,b){var c,d,e,f={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]},g=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return g.next=h(0),g.throw=h(1),g.return=h(2),"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function h(h){return function(i){var j=[h,i];if(c)throw TypeError("Generator is already executing.");for(;g&&(g=0,j[0]&&(f=0)),f;)try{if(c=1,d&&(e=2&j[0]?d.return:j[0]?d.throw||((e=d.return)&&e.call(d),0):d.next)&&!(e=e.call(d,j[1])).done)return e;switch(d=0,e&&(j=[2&j[0],e.value]),j[0]){case 0:case 1:e=j;break;case 4:return f.label++,{value:j[1],done:!1};case 5:f.label++,d=j[1],j=[0];continue;case 7:j=f.ops.pop(),f.trys.pop();continue;default:if(!(e=(e=f.trys).length>0&&e[e.length-1])&&(6===j[0]||2===j[0])){f=0;continue}if(3===j[0]&&(!e||j[1]>e[0]&&j[1]<e[3])){f.label=j[1];break}if(6===j[0]&&f.label<e[1]){f.label=e[1],e=j;break}if(e&&f.label<e[2]){f.label=e[2],f.ops.push(j);break}e[2]&&f.ops.pop(),f.trys.pop();continue}j=b.call(a,f)}catch(a){j=[6,a],d=0}finally{c=e=0}if(5&j[0])throw j[1];return{value:j[0]?j[1]:void 0,done:!0}}}},"__rest",0,function(a,b){var c={};for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&0>b.indexOf(d)&&(c[d]=a[d]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols)for(var e=0,d=Object.getOwnPropertySymbols(a);e<d.length;e++)0>b.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(a,d[e])&&(c[d[e]]=a[d[e]]);return c},"__spreadArray",0,function(a,b,c){if(c||2==arguments.length)for(var d,e=0,f=b.length;e<f;e++)!d&&e in b||(d||(d=Array.prototype.slice.call(b,0,e)),d[e]=b[e]);return a.concat(d||Array.prototype.slice.call(b))}])},463652,(a,b,c)=>{"use strict";c._=function(a){return a&&a.__esModule?a:{default:a}}},334743,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules__pnpm_0k6yfdh._.js","server/chunks/ssr/node_modules__pnpm_04rulr6._.js","server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-5ZQYHXKU_mjs_0z1.978._.js","server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-XPW4576I_mjs_0u7glrg._.js","server/chunks/ssr/0hhx_roughjs_bundled_rough_esm_0hyphnf.js","server/chunks/ssr/12y~_mermaid_dist_mermaid_core_mjs_0hj_n-~._.js","server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-CSCIHK7Q_mjs_01i7moi._.js","server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-3OPIFGDE_mjs_09p1amp._.js","server/chunks/ssr/node_modules__pnpm_00krony._.js","server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-O5CBEL6O_mjs_11437bo._.js","server/chunks/ssr/12y~_mermaid_dist_chunks_mermaid_core_chunk-KSCS5N6A_mjs_0v4oeem._.js"].map(b=>a.l(b))).then(()=>b(496249)))},458647,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__05-uq57._.js","server/chunks/ssr/node_modules__pnpm_0a4su30._.js","server/chunks/ssr/0~c0_docx-preview_dist_docx-preview_mjs_107snq3._.js"].map(b=>a.l(b))).then(()=>b(204460)))},287443,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__0btd01s._.js","server/chunks/ssr/node_modules__pnpm_0o~d81.._.js","server/chunks/ssr/node_modules__pnpm_0a4su30._.js"].map(b=>a.l(b))).then(()=>b(170263)))},57386,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0se0_xlsx_xlsx_mjs_12z-ju4._.js"].map(b=>a.l(b))).then(()=>b(86253)))}];
2
2
 
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0vp_6mg._.js.map
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__0~4py6h._.js.map