@jait/gateway 0.1.211 → 0.1.213

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 (65) hide show
  1. package/bin/jait.mjs +91 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +16 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/surfaces/terminal.d.ts +6 -0
  6. package/dist/surfaces/terminal.d.ts.map +1 -1
  7. package/dist/surfaces/terminal.js +11 -0
  8. package/dist/surfaces/terminal.js.map +1 -1
  9. package/dist/tools/terminal-tools.d.ts.map +1 -1
  10. package/dist/tools/terminal-tools.js +2 -0
  11. package/dist/tools/terminal-tools.js.map +1 -1
  12. package/package.json +4 -2
  13. package/web-dist/assets/{_basePickBy-MjayjAmR.js → _basePickBy-DHEkWgav.js} +1 -1
  14. package/web-dist/assets/{_baseUniq-Dph5MhDW.js → _baseUniq-B6nQ_a7-.js} +1 -1
  15. package/web-dist/assets/{arc-BFGi-GF5.js → arc-DGVI23rV.js} +1 -1
  16. package/web-dist/assets/{architectureDiagram-2XIMDMQ5-DpOwhWSP.js → architectureDiagram-2XIMDMQ5-t9_mc_uh.js} +1 -1
  17. package/web-dist/assets/{blockDiagram-WCTKOSBZ-CuS0pENN.js → blockDiagram-WCTKOSBZ-BimMIGVt.js} +1 -1
  18. package/web-dist/assets/{c4Diagram-IC4MRINW-BEH8u-i8.js → c4Diagram-IC4MRINW-DOyLfPQU.js} +1 -1
  19. package/web-dist/assets/channel-El-8QyDA.js +1 -0
  20. package/web-dist/assets/{chunk-4BX2VUAB-CndK95p4.js → chunk-4BX2VUAB-pn-7YXVr.js} +1 -1
  21. package/web-dist/assets/{chunk-55IACEB6-QN6IIIG0.js → chunk-55IACEB6-B_tSsy8Q.js} +1 -1
  22. package/web-dist/assets/{chunk-FMBD7UC4-CMWVNCjg.js → chunk-FMBD7UC4-B_bvG4nK.js} +1 -1
  23. package/web-dist/assets/{chunk-JSJVCQXG-RwHV39Ax.js → chunk-JSJVCQXG-W1D4_e73.js} +1 -1
  24. package/web-dist/assets/{chunk-KX2RTZJC-Cfv6Vokc.js → chunk-KX2RTZJC-B6yh7xUO.js} +1 -1
  25. package/web-dist/assets/{chunk-NQ4KR5QH-C-RtbEKj.js → chunk-NQ4KR5QH-CMDih_tu.js} +1 -1
  26. package/web-dist/assets/{chunk-QZHKN3VN-C7YQdrfy.js → chunk-QZHKN3VN-DbSV7i8m.js} +1 -1
  27. package/web-dist/assets/{chunk-WL4C6EOR-CM3oB-iV.js → chunk-WL4C6EOR-C_I4yl9I.js} +1 -1
  28. package/web-dist/assets/classDiagram-VBA2DB6C-C9Q8wGay.js +1 -0
  29. package/web-dist/assets/classDiagram-v2-RAHNMMFH-C9Q8wGay.js +1 -0
  30. package/web-dist/assets/clone-V_YFqHKL.js +1 -0
  31. package/web-dist/assets/{cose-bilkent-S5V4N54A-CMurZb86.js → cose-bilkent-S5V4N54A-BisD8ttz.js} +1 -1
  32. package/web-dist/assets/{dagre-KLK3FWXG-D8Lx_qV7.js → dagre-KLK3FWXG-D8W3Im6q.js} +1 -1
  33. package/web-dist/assets/{diagram-E7M64L7V-vVjHC2qx.js → diagram-E7M64L7V-BjCnnq3Z.js} +1 -1
  34. package/web-dist/assets/{diagram-IFDJBPK2-Bd0pL2-e.js → diagram-IFDJBPK2-C2HkaT6E.js} +1 -1
  35. package/web-dist/assets/{diagram-P4PSJMXO-BGrw0dnS.js → diagram-P4PSJMXO-DTNBoo4C.js} +1 -1
  36. package/web-dist/assets/{erDiagram-INFDFZHY-BepaWwME.js → erDiagram-INFDFZHY-Cs3Ew6wG.js} +1 -1
  37. package/web-dist/assets/{flowDiagram-PKNHOUZH-BTpuLq5M.js → flowDiagram-PKNHOUZH-B0r4Kzj_.js} +1 -1
  38. package/web-dist/assets/{ganttDiagram-A5KZAMGK-C7KllM0F.js → ganttDiagram-A5KZAMGK-CGGoORUN.js} +1 -1
  39. package/web-dist/assets/{gitGraphDiagram-K3NZZRJ6-DOxzc7pI.js → gitGraphDiagram-K3NZZRJ6-Q9zN3-2Y.js} +1 -1
  40. package/web-dist/assets/{graph-CI71ScDb.js → graph-CqHmNZcd.js} +1 -1
  41. package/web-dist/assets/{index-yzdpqlx8.js → index-__0EddV-.js} +4 -4
  42. package/web-dist/assets/{infoDiagram-LFFYTUFH-reZ2x4wr.js → infoDiagram-LFFYTUFH-Cqf-KP6a.js} +1 -1
  43. package/web-dist/assets/{ishikawaDiagram-PHBUUO56-BUb3d6K0.js → ishikawaDiagram-PHBUUO56-B2mtTxFh.js} +1 -1
  44. package/web-dist/assets/{journeyDiagram-4ABVD52K-C9dhWTQG.js → journeyDiagram-4ABVD52K-DEpTFcbV.js} +1 -1
  45. package/web-dist/assets/{kanban-definition-K7BYSVSG-CecpD-kV.js → kanban-definition-K7BYSVSG-6b_CwLq1.js} +1 -1
  46. package/web-dist/assets/{layout-8ZxRIfNx.js → layout-Bggv5Qsx.js} +1 -1
  47. package/web-dist/assets/{linear-fyBBCDq_.js → linear-B6Pn2aeh.js} +1 -1
  48. package/web-dist/assets/{mindmap-definition-YRQLILUH-MuP2ZrRx.js → mindmap-definition-YRQLILUH-CZurNg-N.js} +1 -1
  49. package/web-dist/assets/{pieDiagram-SKSYHLDU-9OE4IBm4.js → pieDiagram-SKSYHLDU-CVgjF9sQ.js} +1 -1
  50. package/web-dist/assets/{quadrantDiagram-337W2JSQ-gAlQxLLG.js → quadrantDiagram-337W2JSQ-B0pd1aWx.js} +1 -1
  51. package/web-dist/assets/{requirementDiagram-Z7DCOOCP-Jkzr_Cw6.js → requirementDiagram-Z7DCOOCP-DuMDYd2N.js} +1 -1
  52. package/web-dist/assets/{sankeyDiagram-WA2Y5GQK-CDOHW84x.js → sankeyDiagram-WA2Y5GQK-DOX6NV5B.js} +1 -1
  53. package/web-dist/assets/{sequenceDiagram-2WXFIKYE-CPUjJ_UM.js → sequenceDiagram-2WXFIKYE-tdMm47lv.js} +1 -1
  54. package/web-dist/assets/{stateDiagram-RAJIS63D-kthdlWtx.js → stateDiagram-RAJIS63D-o2pg1TF_.js} +1 -1
  55. package/web-dist/assets/stateDiagram-v2-FVOUBMTO-BztSEcIi.js +1 -0
  56. package/web-dist/assets/{timeline-definition-YZTLITO2-DatP0GiC.js → timeline-definition-YZTLITO2-CnmOF4P9.js} +1 -1
  57. package/web-dist/assets/{treemap-KZPCXAKY-jUrRW8x4.js → treemap-KZPCXAKY-BNW6-hD1.js} +1 -1
  58. package/web-dist/assets/{vennDiagram-LZ73GAT5-BMU9ryTX.js → vennDiagram-LZ73GAT5-Djaoh1ub.js} +1 -1
  59. package/web-dist/assets/{xychartDiagram-JWTSCODW-6aLu_dnB.js → xychartDiagram-JWTSCODW-BD4GMond.js} +1 -1
  60. package/web-dist/index.html +1 -1
  61. package/web-dist/assets/channel-ZxdOVMdP.js +0 -1
  62. package/web-dist/assets/classDiagram-VBA2DB6C-DeZl_7ZE.js +0 -1
  63. package/web-dist/assets/classDiagram-v2-RAHNMMFH-DeZl_7ZE.js +0 -1
  64. package/web-dist/assets/clone-D_OHxjaG.js +0 -1
  65. package/web-dist/assets/stateDiagram-v2-FVOUBMTO-SwzfIa0e.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-DA-rfuFy.js","./html-pp8916En.js","./javascript-wDzz0qaB.js","./css-CLj8gQPS.js","./angular-ts-BrjP3tb8.js","./scss-D5BDwBP9.js","./astro-HNnZUWAn.js","./json-Cp-IABpG.js","./typescript-BPQ3VLAy.js","./postcss-CXtECtnM.js","./tsx-COt5Ahok.js","./blade-BjGOyj-B.js","./html-derivative-DlHx6ybY.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js","./sql-BLtJtn59.js","./coffee-Ch7k5sss.js","./cpp-CofmeUqb.js","./regexp-CDVJQ6XC.js","./glsl-DplSGwfg.js","./c-BIGW1oBm.js","./graphql-ChdNCCLP.js","./jsx-g9-lgVsj.js","./haml-D5jkg6IW.js","./handlebars-BpdQsYii.js","./yaml-Buea-lGh.js","./http-jrhK8wxY.js","./shellscript-Yzrsuije.js","./hurl-irOxFIW8.js","./csv-fuZLfV_i.js","./jinja-f2NsQr07.js","./jison-wvAkD_A8.js","./julia-CxzCAyBv.js","./python-B6aJPvgy.js","./r-Dspwwk_N.js","./marko-DjSrsDqO.js","./less-B1dDrJ26.js","./mdc-DTYItulj.js","./markdown-Cvjx9yec.js","./php-R6g_5hLQ.js","./pug-DKIMFp6K.js","./svelte-Cy7k_4gC.js","./ts-tags-DQrlYJgV.js","./vue-D2xRrEX4.js","./vue-html-AaS7Mt5G.js","./vue-vine-BoDAl6tE.js","./stylus-BEDo0Tqx.js","./dagre-KLK3FWXG-D8Lx_qV7.js","./graph-CI71ScDb.js","./_baseUniq-Dph5MhDW.js","./layout-8ZxRIfNx.js","./_basePickBy-MjayjAmR.js","./clone-D_OHxjaG.js","./cose-bilkent-S5V4N54A-CMurZb86.js","./cytoscape.esm-BQaXIfA_.js","./c4Diagram-IC4MRINW-BEH8u-i8.js","./chunk-JSJVCQXG-RwHV39Ax.js","./flowDiagram-PKNHOUZH-BTpuLq5M.js","./chunk-FMBD7UC4-CMWVNCjg.js","./chunk-55IACEB6-QN6IIIG0.js","./chunk-KX2RTZJC-Cfv6Vokc.js","./channel-ZxdOVMdP.js","./erDiagram-INFDFZHY-BepaWwME.js","./gitGraphDiagram-K3NZZRJ6-DOxzc7pI.js","./chunk-4BX2VUAB-CndK95p4.js","./chunk-QZHKN3VN-C7YQdrfy.js","./treemap-KZPCXAKY-jUrRW8x4.js","./ganttDiagram-A5KZAMGK-C7KllM0F.js","./linear-fyBBCDq_.js","./defaultLocale-DX6XiGOO.js","./infoDiagram-LFFYTUFH-reZ2x4wr.js","./pieDiagram-SKSYHLDU-9OE4IBm4.js","./arc-BFGi-GF5.js","./quadrantDiagram-337W2JSQ-gAlQxLLG.js","./xychartDiagram-JWTSCODW-6aLu_dnB.js","./requirementDiagram-Z7DCOOCP-Jkzr_Cw6.js","./sequenceDiagram-2WXFIKYE-CPUjJ_UM.js","./classDiagram-VBA2DB6C-DeZl_7ZE.js","./chunk-WL4C6EOR-CM3oB-iV.js","./classDiagram-v2-RAHNMMFH-DeZl_7ZE.js","./stateDiagram-RAJIS63D-kthdlWtx.js","./chunk-NQ4KR5QH-C-RtbEKj.js","./stateDiagram-v2-FVOUBMTO-SwzfIa0e.js","./journeyDiagram-4ABVD52K-C9dhWTQG.js","./timeline-definition-YZTLITO2-DatP0GiC.js","./mindmap-definition-YRQLILUH-MuP2ZrRx.js","./kanban-definition-K7BYSVSG-CecpD-kV.js","./diagram-P4PSJMXO-BGrw0dnS.js","./diagram-IFDJBPK2-Bd0pL2-e.js","./blockDiagram-WCTKOSBZ-CuS0pENN.js","./architectureDiagram-2XIMDMQ5-DpOwhWSP.js","./diagram-E7M64L7V-vVjHC2qx.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-DA-rfuFy.js","./html-pp8916En.js","./javascript-wDzz0qaB.js","./css-CLj8gQPS.js","./angular-ts-BrjP3tb8.js","./scss-D5BDwBP9.js","./astro-HNnZUWAn.js","./json-Cp-IABpG.js","./typescript-BPQ3VLAy.js","./postcss-CXtECtnM.js","./tsx-COt5Ahok.js","./blade-BjGOyj-B.js","./html-derivative-DlHx6ybY.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js","./sql-BLtJtn59.js","./coffee-Ch7k5sss.js","./cpp-CofmeUqb.js","./regexp-CDVJQ6XC.js","./glsl-DplSGwfg.js","./c-BIGW1oBm.js","./graphql-ChdNCCLP.js","./jsx-g9-lgVsj.js","./haml-D5jkg6IW.js","./handlebars-BpdQsYii.js","./yaml-Buea-lGh.js","./http-jrhK8wxY.js","./shellscript-Yzrsuije.js","./hurl-irOxFIW8.js","./csv-fuZLfV_i.js","./jinja-f2NsQr07.js","./jison-wvAkD_A8.js","./julia-CxzCAyBv.js","./python-B6aJPvgy.js","./r-Dspwwk_N.js","./marko-DjSrsDqO.js","./less-B1dDrJ26.js","./mdc-DTYItulj.js","./markdown-Cvjx9yec.js","./php-R6g_5hLQ.js","./pug-DKIMFp6K.js","./svelte-Cy7k_4gC.js","./ts-tags-DQrlYJgV.js","./vue-D2xRrEX4.js","./vue-html-AaS7Mt5G.js","./vue-vine-BoDAl6tE.js","./stylus-BEDo0Tqx.js","./dagre-KLK3FWXG-D8W3Im6q.js","./graph-CqHmNZcd.js","./_baseUniq-B6nQ_a7-.js","./layout-Bggv5Qsx.js","./_basePickBy-DHEkWgav.js","./clone-V_YFqHKL.js","./cose-bilkent-S5V4N54A-BisD8ttz.js","./cytoscape.esm-BQaXIfA_.js","./c4Diagram-IC4MRINW-DOyLfPQU.js","./chunk-JSJVCQXG-W1D4_e73.js","./flowDiagram-PKNHOUZH-B0r4Kzj_.js","./chunk-FMBD7UC4-B_bvG4nK.js","./chunk-55IACEB6-B_tSsy8Q.js","./chunk-KX2RTZJC-B6yh7xUO.js","./channel-El-8QyDA.js","./erDiagram-INFDFZHY-Cs3Ew6wG.js","./gitGraphDiagram-K3NZZRJ6-Q9zN3-2Y.js","./chunk-4BX2VUAB-pn-7YXVr.js","./chunk-QZHKN3VN-DbSV7i8m.js","./treemap-KZPCXAKY-BNW6-hD1.js","./ganttDiagram-A5KZAMGK-CGGoORUN.js","./linear-B6Pn2aeh.js","./defaultLocale-DX6XiGOO.js","./infoDiagram-LFFYTUFH-Cqf-KP6a.js","./pieDiagram-SKSYHLDU-CVgjF9sQ.js","./arc-DGVI23rV.js","./quadrantDiagram-337W2JSQ-B0pd1aWx.js","./xychartDiagram-JWTSCODW-BD4GMond.js","./requirementDiagram-Z7DCOOCP-DuMDYd2N.js","./sequenceDiagram-2WXFIKYE-tdMm47lv.js","./classDiagram-VBA2DB6C-C9Q8wGay.js","./chunk-WL4C6EOR-C_I4yl9I.js","./classDiagram-v2-RAHNMMFH-C9Q8wGay.js","./stateDiagram-RAJIS63D-o2pg1TF_.js","./chunk-NQ4KR5QH-CMDih_tu.js","./stateDiagram-v2-FVOUBMTO-BztSEcIi.js","./journeyDiagram-4ABVD52K-DEpTFcbV.js","./timeline-definition-YZTLITO2-CnmOF4P9.js","./mindmap-definition-YRQLILUH-CZurNg-N.js","./kanban-definition-K7BYSVSG-6b_CwLq1.js","./diagram-P4PSJMXO-DTNBoo4C.js","./diagram-IFDJBPK2-C2HkaT6E.js","./blockDiagram-WCTKOSBZ-BimMIGVt.js","./architectureDiagram-2XIMDMQ5-t9_mc_uh.js","./diagram-E7M64L7V-BjCnnq3Z.js"])))=>i.map(i=>d[i]);
2
2
  var $ie=Object.defineProperty;var Iie=(e,r,n)=>r in e?$ie(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var ze=(e,r,n)=>Iie(e,typeof r!="symbol"?r+"":r,n);function Bie(e,r){for(var n=0;n<r.length;n++){const i=r[n];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(i,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function um(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Att(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if(typeof r=="function"){var n=function i(){return this instanceof i?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};n.prototype=r.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),n}var xk={exports:{}},Iy={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -982,8 +982,8 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
982
982
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-n.x),a=e.width/2;let l=n.x<r.x?a-o:a+o;const c=e.height/2,u=Math.abs(r.y-n.y),d=Math.abs(r.x-n.x);if(Math.abs(s-r.y)*a>Math.abs(i-r.x)*c){let p=n.y<r.y?r.y-c-s:s-c-r.y;l=d*p/u;const g={x:n.x<r.x?n.x+l:n.x-d+l,y:n.y<r.y?n.y+u-p:n.y-u+p};return l===0&&(g.x=r.x,g.y=r.y),d===0&&(g.x=r.x),u===0&&(g.y=r.y),lt.debug(`abc89 top/bottom calc, Q ${u}, q ${p}, R ${d}, r ${l}`,g),g}else{n.x<r.x?l=r.x-a-i:l=i-a-r.x;let p=u*l/d,g=n.x<r.x?n.x+d-l:n.x-d+l,y=n.y<r.y?n.y+p:n.y-p;return lt.debug(`sides calc abc89, Q ${u}, q ${p}, R ${d}, r ${l}`,{_x:g,_y:y}),l===0&&(g=r.x,y=r.y),d===0&&(g=r.x),u===0&&(y=r.y),{x:g,y}}},"intersection"),GD=B((e,r)=>{lt.warn("abc88 cutPathAtIntersect",e,r);let n=[],i=e[0],s=!1;return e.forEach(o=>{if(lt.info("abc88 checking point",o,r),!lPe(r,o)&&!s){const a=cPe(r,i,o);lt.debug("abc88 inside",o,i,a),lt.debug("abc88 intersection",a,r);let l=!1;n.forEach(c=>{l=l||c.x===a.x&&c.y===a.y}),n.some(c=>c.x===a.x&&c.y===a.y)?lt.warn("abc88 no intersect",a,n):n.push(a),s=!0}else lt.warn("abc88 outside",o,i),i=o,s||n.push(o)}),lt.debug("returning points",n),n},"cutPathAtIntersect");function KJ(e){const r=[],n=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(r.push(o),n.push(i))}return{cornerPoints:r,cornerPointPositions:n}}B(KJ,"extractCornerPoints");var YD=B(function(e,r,n){const i=r.x-e.x,s=r.y-e.y,o=Math.sqrt(i*i+s*s),a=n/o;return{x:r.x-a*i,y:r.y-a*s}},"findAdjacentPoint"),uPe=B(function(e){const{cornerPointPositions:r}=KJ(e),n=[];for(let i=0;i<e.length;i++)if(r.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],l=YD(s,a,5),c=YD(o,a,5),u=c.x-l.x,d=c.y-l.y;n.push(l);const p=Math.sqrt(2)*2;let g={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){lt.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const y=5;a.x===l.x?g={x:u<0?l.x-y+p:l.x+y-p,y:d<0?l.y-p:l.y+p}:g={x:u<0?l.x-p:l.x+p,y:d<0?l.y-y+p:l.y+y-p}}else lt.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));n.push(g,c)}else n.push(e[i]);return n},"fixCorners"),hPe=B((e,r,n)=>{const i=e-r-n,s=2,o=2,a=s+o,l=Math.floor(i/a),c=Array(l).fill(`${s} ${o}`).join(" ");return`0 ${r} ${c} ${n}`},"generateDashArray"),fPe=B(function(e,r,n,i,s,o,a,l=!1){var P;const{handDrawnSeed:c}=Sn();let u=r.points,d=!1;const p=s;var g=o;const y=[];for(const $ in r.cssCompiledStyles)KX($)||y.push(r.cssCompiledStyles[$]);lt.debug("UIO intersect check",r.points,g.x,p.x),g.intersect&&p.intersect&&!l&&(u=u.slice(1,r.points.length-1),u.unshift(p.intersect(u[0])),lt.debug("Last point UIO",r.start,"-->",r.end,u[u.length-1],g,g.intersect(u[u.length-1])),u.push(g.intersect(u[u.length-1])));const b=btoa(JSON.stringify(u));r.toCluster&&(lt.info("to cluster abc88",n.get(r.toCluster)),u=GD(r.points,n.get(r.toCluster).node),d=!0),r.fromCluster&&(lt.debug("from cluster abc88",n.get(r.fromCluster),JSON.stringify(u,null,2)),u=GD(u.reverse(),n.get(r.fromCluster).node).reverse(),d=!0);let w=u.filter($=>!Number.isNaN($.y));const C=sPe(r.curve);C!=="rounded"&&(w=uPe(w));let S=mv;switch(C){case"linear":S=mv;break;case"basis":S=C8;break;case"cardinal":S=OY;break;case"bumpX":S=CY;break;case"bumpY":S=kY;break;case"catmullRom":S=AY;break;case"monotoneX":S=$Y;break;case"monotoneY":S=IY;break;case"natural":S=zY;break;case"step":S=FY;break;case"stepAfter":S=WY;break;case"stepBefore":S=HY;break;case"rounded":S=mv;break;default:S=C8}const{x:k,y:E}=l7e(r),O=IEe().x(k).y(E).curve(S);let A;switch(r.thickness){case"normal":A="edge-thickness-normal";break;case"thick":A="edge-thickness-thick";break;case"invisible":A="edge-thickness-invisible";break;default:A="edge-thickness-normal"}switch(r.pattern){case"solid":A+=" edge-pattern-solid";break;case"dotted":A+=" edge-pattern-dotted";break;case"dashed":A+=" edge-pattern-dashed";break;default:A+=" edge-pattern-solid"}let T,R=C==="rounded"?XJ(ZJ(w,r),5):O(w);const U=Array.isArray(r.style)?r.style:[r.style];let q=U.find($=>$==null?void 0:$.startsWith("stroke:")),D="";r.animate&&(D="edge-animation-fast"),r.animation&&(D="edge-animation-"+r.animation);let Y=!1;if(r.look==="handDrawn"){const $=Vt.svg(e);Object.assign([],w);const z=$.path(R,{roughness:.3,seed:c});A+=" transition",T=lr(z).select("path").attr("id",r.id).attr("class"," "+A+(r.classes?" "+r.classes:"")+(D?" "+D:"")).attr("style",U?U.reduce((H,F)=>H+";"+F,""):"");let X=T.attr("d");T.attr("d",X),e.node().appendChild(T.node())}else{const $=y.join(";"),z=U?U.reduce((ie,re)=>ie+re+";",""):"",X=($?$+";"+z+";":z)+";"+(U?U.reduce((ie,re)=>ie+";"+re,""):"");T=e.append("path").attr("d",R).attr("id",r.id).attr("class"," "+A+(r.classes?" "+r.classes:"")+(D?" "+D:"")).attr("style",X),q=(P=X.match(/stroke:([^;]+)/))==null?void 0:P[1],Y=r.animate===!0||!!r.animation||$.includes("animation");const H=T.node(),F=typeof H.getTotalLength=="function"?H.getTotalLength():0,Q=cD[r.arrowTypeStart]||0,M=cD[r.arrowTypeEnd]||0;if(r.look==="neo"&&!Y){const re=`stroke-dasharray: ${r.pattern==="dotted"||r.pattern==="dashed"?hPe(F,Q,M):`0 ${Q} ${F-Q-M} ${M}`}; stroke-dashoffset: 0;`;T.attr("style",re+T.attr("style"))}}T.attr("data-edge",!0),T.attr("data-et","edge"),T.attr("data-id",r.id),T.attr("data-points",b),r.showPoints&&w.forEach($=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",$.x).attr("cy",$.y)});let K="";(Sn().flowchart.arrowMarkerAbsolute||Sn().state.arrowMarkerAbsolute)&&(K=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,K=K.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),lt.info("arrowTypeStart",r.arrowTypeStart),lt.info("arrowTypeEnd",r.arrowTypeEnd),nPe(T,r,K,a,i,q);const Z=Math.floor(u.length/2),L=u[Z];Tc.isLabelCoordinateInPath(L,T.attr("d"))||(d=!0);let I={};return d&&(I.updatedPath=u),I.originalPath=r.points,I},"insertEdge");function XJ(e,r){if(e.length<2)return"";let n="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],l=e[o-1],c=e[o+1];if(o===0)n+=`M${a.x},${a.y}`;else if(o===i-1)n+=`L${a.x},${a.y}`;else{const u=a.x-l.x,d=a.y-l.y,p=c.x-a.x,g=c.y-a.y,y=Math.hypot(u,d),b=Math.hypot(p,g);if(y<s||b<s){n+=`L${a.x},${a.y}`;continue}const w=u/y,C=d/y,S=p/b,k=g/b,E=w*S+C*k,O=Math.max(-1,Math.min(1,E)),A=Math.acos(O);if(A<s||Math.abs(Math.PI-A)<s){n+=`L${a.x},${a.y}`;continue}const T=Math.min(r/Math.sin(A/2),y/2,b/2),R=a.x-w*T,U=a.y-C*T,q=a.x+S*T,D=a.y+k*T;n+=`L${R},${U}`,n+=`Q${a.x},${a.y} ${q},${D}`}}return n}B(XJ,"generateRoundedPath");function J8(e,r){if(!e||!r)return{angle:0,deltaX:0,deltaY:0};const n=r.x-e.x,i=r.y-e.y;return{angle:Math.atan2(i,n),deltaX:n,deltaY:i}}B(J8,"calculateDeltaAndAngle");function ZJ(e,r){const n=e.map(s=>({...s}));if(e.length>=2&&_o[r.arrowTypeStart]){const s=_o[r.arrowTypeStart],o=e[0],a=e[1],{angle:l}=J8(o,a),c=s*Math.cos(l),u=s*Math.sin(l);n[0].x=o.x+c,n[0].y=o.y+u}const i=e.length;if(i>=2&&_o[r.arrowTypeEnd]){const s=_o[r.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:l}=J8(a,o),c=s*Math.cos(l),u=s*Math.sin(l);n[i-1].x=o.x-c,n[i-1].y=o.y-u}return n}B(ZJ,"applyMarkerOffsetsToPoints");var dPe=B((e,r,n,i)=>{r.forEach(s=>{OPe[s](e,n,i)})},"insertMarkers"),pPe=B((e,r,n)=>{lt.trace("Making markers for ",n),e.append("defs").append("marker").attr("id",n+"_"+r+"-extensionStart").attr("class","marker extension "+r).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",n+"_"+r+"-extensionEnd").attr("class","marker extension "+r).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")},"extension"),mPe=B((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-compositionStart").attr("class","marker composition "+r).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"),e.append("defs").append("marker").attr("id",n+"_"+r+"-compositionEnd").attr("class","marker composition "+r).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")},"composition"),gPe=B((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-aggregationStart").attr("class","marker aggregation "+r).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"),e.append("defs").append("marker").attr("id",n+"_"+r+"-aggregationEnd").attr("class","marker aggregation "+r).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")},"aggregation"),yPe=B((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-dependencyStart").attr("class","marker dependency "+r).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"),e.append("defs").append("marker").attr("id",n+"_"+r+"-dependencyEnd").attr("class","marker dependency "+r).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")},"dependency"),vPe=B((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-lollipopStart").attr("class","marker lollipop "+r).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),e.append("defs").append("marker").attr("id",n+"_"+r+"-lollipopEnd").attr("class","marker lollipop "+r).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)},"lollipop"),_Pe=B((e,r,n)=>{e.append("marker").attr("id",n+"_"+r+"-pointEnd").attr("class","marker "+r).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"),e.append("marker").attr("id",n+"_"+r+"-pointStart").attr("class","marker "+r).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")},"point"),bPe=B((e,r,n)=>{e.append("marker").attr("id",n+"_"+r+"-circleEnd").attr("class","marker "+r).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"),e.append("marker").attr("id",n+"_"+r+"-circleStart").attr("class","marker "+r).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")},"circle"),xPe=B((e,r,n)=>{e.append("marker").attr("id",n+"_"+r+"-crossEnd").attr("class","marker cross "+r).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"),e.append("marker").attr("id",n+"_"+r+"-crossStart").attr("class","marker cross "+r).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")},"cross"),wPe=B((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-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"),SPe=B((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-onlyOneStart").attr("class","marker onlyOne "+r).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"),e.append("defs").append("marker").attr("id",n+"_"+r+"-onlyOneEnd").attr("class","marker onlyOne "+r).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"),CPe=B((e,r,n)=>{const i=e.append("defs").append("marker").attr("id",n+"_"+r+"-zeroOrOneStart").attr("class","marker zeroOrOne "+r).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",n+"_"+r+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+r).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),kPe=B((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-oneOrMoreStart").attr("class","marker oneOrMore "+r).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"),e.append("defs").append("marker").attr("id",n+"_"+r+"-oneOrMoreEnd").attr("class","marker oneOrMore "+r).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"),jPe=B((e,r,n)=>{const i=e.append("defs").append("marker").attr("id",n+"_"+r+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+r).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",n+"_"+r+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+r).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),EPe=B((e,r,n)=>{e.append("defs").append("marker").attr("id",n+"_"+r+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
983
983
  L20,10
984
984
  M20,10
985
- L0,20`)},"requirement_arrow"),TPe=B((e,r,n)=>{const i=e.append("defs").append("marker").attr("id",n+"_"+r+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),OPe={extension:pPe,composition:mPe,aggregation:gPe,dependency:yPe,lollipop:vPe,point:_Pe,circle:bPe,cross:xPe,barb:wPe,only_one:SPe,zero_or_one:CPe,one_or_more:kPe,zero_or_more:jPe,requirement_arrow:EPe,requirement_contains:TPe},NPe=dPe,APe={common:Qb,getConfig:wo,insertCluster:$Ae,insertEdge:fPe,insertEdgeLabel:oPe,insertMarkers:NPe,insertNode:YJ,interpolateToCurve:MO,labelHelper:mr,log:lt,positionEdgeLabel:aPe},k_={},JJ=B(e=>{for(const r of e)k_[r.name]=r},"registerLayoutLoaders"),PPe=B(()=>{JJ([{name:"dagre",loader:B(async()=>await Re(()=>import("./dagre-KLK3FWXG-D8Lx_qV7.js"),__vite__mapDeps([47,48,49,50,51,52]),import.meta.url),"loader")},{name:"cose-bilkent",loader:B(async()=>await Re(()=>import("./cose-bilkent-S5V4N54A-CMurZb86.js"),__vite__mapDeps([53,54]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");PPe();var vrt=B(async(e,r)=>{if(!(e.layoutAlgorithm in k_))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const n=k_[e.layoutAlgorithm];return(await n.loader()).render(e,r,APe,{algorithm:n.algorithm})},"render"),_rt=B((e="",{fallback:r="dagre"}={})=>{if(e in k_)return e;if(r in k_)return lt.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Both layout algorithms ${e} and ${r} are not registered.`)},"getRegisteredLayoutAlgorithm"),MPe=TX(Object.keys,Object),RPe=Object.prototype,LPe=RPe.hasOwnProperty;function DPe(e){if(!I5(e))return MPe(e);var r=[];for(var n in Object(e))LPe.call(e,n)&&n!="constructor"&&r.push(n);return r}var Q8=vm(Wc,"DataView"),eE=vm(Wc,"Promise"),tE=vm(Wc,"Set"),rE=vm(Wc,"WeakMap"),KD="[object Map]",$Pe="[object Object]",XD="[object Promise]",ZD="[object Set]",JD="[object WeakMap]",QD="[object DataView]",IPe=ym(Q8),BPe=ym(S_),zPe=ym(eE),FPe=ym(tE),HPe=ym(rE),Ep=gm;(Q8&&Ep(new Q8(new ArrayBuffer(1)))!=QD||S_&&Ep(new S_)!=KD||eE&&Ep(eE.resolve())!=XD||tE&&Ep(new tE)!=ZD||rE&&Ep(new rE)!=JD)&&(Ep=function(e){var r=gm(e),n=r==$Pe?e.constructor:void 0,i=n?ym(n):"";if(i)switch(i){case IPe:return QD;case BPe:return KD;case zPe:return XD;case FPe:return ZD;case HPe:return JD}return r});var WPe="[object Map]",UPe="[object Set]",VPe=Object.prototype,qPe=VPe.hasOwnProperty;function e$(e){if(e==null)return!0;if(B5(e)&&(XS(e)||typeof e=="string"||typeof e.splice=="function"||AO(e)||PO(e)||KS(e)))return!e.length;var r=Ep(e);if(r==WPe||r==UPe)return!e.size;if(I5(e))return!DPe(e).length;for(var n in e)if(qPe.call(e,n))return!1;return!0}var QJ="c4",GPe=B(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),YPe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./c4Diagram-IC4MRINW-BEH8u-i8.js");return{diagram:r}},__vite__mapDeps([55,56]),import.meta.url);return{id:QJ,diagram:e}},"loader"),KPe={id:QJ,detector:GPe,loader:YPe},XPe=KPe,eQ="flowchart",ZPe=B((e,r)=>{var n,i;return((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"||((i=r==null?void 0:r.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),JPe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-BTpuLq5M.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:eQ,diagram:e}},"loader"),QPe={id:eQ,detector:ZPe,loader:JPe},eMe=QPe,tQ="flowchart-v2",tMe=B((e,r)=>{var n,i,s;return((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="dagre-d3"?!1:(((i=r==null?void 0:r.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(r.layout="elk"),/^\s*graph/.test(e)&&((s=r==null?void 0:r.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),rMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-BTpuLq5M.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:tQ,diagram:e}},"loader"),nMe={id:tQ,detector:tMe,loader:rMe},iMe=nMe,rQ="er",sMe=B(e=>/^\s*erDiagram/.test(e),"detector"),oMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./erDiagram-INFDFZHY-BepaWwME.js");return{diagram:r}},__vite__mapDeps([62,59,60,61]),import.meta.url);return{id:rQ,diagram:e}},"loader"),aMe={id:rQ,detector:sMe,loader:oMe},lMe=aMe,nQ="gitGraph",cMe=B(e=>/^\s*gitGraph/.test(e),"detector"),uMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./gitGraphDiagram-K3NZZRJ6-DOxzc7pI.js");return{diagram:r}},__vite__mapDeps([63,64,65,66,49,51,52]),import.meta.url);return{id:nQ,diagram:e}},"loader"),hMe={id:nQ,detector:cMe,loader:uMe},fMe=hMe,iQ="gantt",dMe=B(e=>/^\s*gantt/.test(e),"detector"),pMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./ganttDiagram-A5KZAMGK-C7KllM0F.js");return{diagram:r}},__vite__mapDeps([67,68,69]),import.meta.url);return{id:iQ,diagram:e}},"loader"),mMe={id:iQ,detector:dMe,loader:pMe},gMe=mMe,sQ="info",yMe=B(e=>/^\s*info/.test(e),"detector"),vMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./infoDiagram-LFFYTUFH-reZ2x4wr.js");return{diagram:r}},__vite__mapDeps([70,66,49,51,52]),import.meta.url);return{id:sQ,diagram:e}},"loader"),_Me={id:sQ,detector:yMe,loader:vMe},oQ="pie",bMe=B(e=>/^\s*pie/.test(e),"detector"),xMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./pieDiagram-SKSYHLDU-9OE4IBm4.js");return{diagram:r}},__vite__mapDeps([71,64,66,49,51,52,72]),import.meta.url);return{id:oQ,diagram:e}},"loader"),wMe={id:oQ,detector:bMe,loader:xMe},aQ="quadrantChart",SMe=B(e=>/^\s*quadrantChart/.test(e),"detector"),CMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./quadrantDiagram-337W2JSQ-gAlQxLLG.js");return{diagram:r}},__vite__mapDeps([73,68,69]),import.meta.url);return{id:aQ,diagram:e}},"loader"),kMe={id:aQ,detector:SMe,loader:CMe},jMe=kMe,lQ="xychart",EMe=B(e=>/^\s*xychart(-beta)?/.test(e),"detector"),TMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./xychartDiagram-JWTSCODW-6aLu_dnB.js");return{diagram:r}},__vite__mapDeps([74,68,69]),import.meta.url);return{id:lQ,diagram:e}},"loader"),OMe={id:lQ,detector:EMe,loader:TMe},NMe=OMe,cQ="requirement",AMe=B(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),PMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./requirementDiagram-Z7DCOOCP-Jkzr_Cw6.js");return{diagram:r}},__vite__mapDeps([75,59,60]),import.meta.url);return{id:cQ,diagram:e}},"loader"),MMe={id:cQ,detector:AMe,loader:PMe},RMe=MMe,uQ="sequence",LMe=B(e=>/^\s*sequenceDiagram/.test(e),"detector"),DMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./sequenceDiagram-2WXFIKYE-CPUjJ_UM.js");return{diagram:r}},__vite__mapDeps([76,56,65]),import.meta.url);return{id:uQ,diagram:e}},"loader"),$Me={id:uQ,detector:LMe,loader:DMe},IMe=$Me,hQ="class",BMe=B((e,r)=>{var n;return((n=r==null?void 0:r.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),zMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./classDiagram-VBA2DB6C-DeZl_7ZE.js");return{diagram:r}},__vite__mapDeps([77,78,58,56,59,60]),import.meta.url);return{id:hQ,diagram:e}},"loader"),FMe={id:hQ,detector:BMe,loader:zMe},HMe=FMe,fQ="classDiagram",WMe=B((e,r)=>{var n;return/^\s*classDiagram/.test(e)&&((n=r==null?void 0:r.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),UMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./classDiagram-v2-RAHNMMFH-DeZl_7ZE.js");return{diagram:r}},__vite__mapDeps([79,78,58,56,59,60]),import.meta.url);return{id:fQ,diagram:e}},"loader"),VMe={id:fQ,detector:WMe,loader:UMe},qMe=VMe,dQ="state",GMe=B((e,r)=>{var n;return((n=r==null?void 0:r.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),YMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./stateDiagram-RAJIS63D-kthdlWtx.js");return{diagram:r}},__vite__mapDeps([80,81,59,60,48,49,50,51]),import.meta.url);return{id:dQ,diagram:e}},"loader"),KMe={id:dQ,detector:GMe,loader:YMe},XMe=KMe,pQ="stateDiagram",ZMe=B((e,r)=>{var n;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((n=r==null?void 0:r.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper")},"detector"),JMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./stateDiagram-v2-FVOUBMTO-SwzfIa0e.js");return{diagram:r}},__vite__mapDeps([82,81,59,60]),import.meta.url);return{id:pQ,diagram:e}},"loader"),QMe={id:pQ,detector:ZMe,loader:JMe},eRe=QMe,mQ="journey",tRe=B(e=>/^\s*journey/.test(e),"detector"),rRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./journeyDiagram-4ABVD52K-C9dhWTQG.js");return{diagram:r}},__vite__mapDeps([83,58,56,72]),import.meta.url);return{id:mQ,diagram:e}},"loader"),nRe={id:mQ,detector:tRe,loader:rRe},iRe=nRe,sRe=B((e,r,n)=>{lt.debug(`rendering svg for syntax error
986
- `);const i=eTe(r),s=i.append("g");i.attr("viewBox","0 0 2412 512"),UG(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw"),gQ={draw:sRe},oRe=gQ,aRe={db:{},renderer:gQ,parser:{parse:B(()=>{},"parse")}},lRe=aRe,yQ="flowchart-elk",cRe=B((e,r={})=>{var n;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="elk"?(r.layout="elk",!0):!1},"detector"),uRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-BTpuLq5M.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:yQ,diagram:e}},"loader"),hRe={id:yQ,detector:cRe,loader:uRe},fRe=hRe,vQ="timeline",dRe=B(e=>/^\s*timeline/.test(e),"detector"),pRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./timeline-definition-YZTLITO2-DatP0GiC.js");return{diagram:r}},__vite__mapDeps([84,72]),import.meta.url);return{id:vQ,diagram:e}},"loader"),mRe={id:vQ,detector:dRe,loader:pRe},gRe=mRe,_Q="mindmap",yRe=B(e=>/^\s*mindmap/.test(e),"detector"),vRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./mindmap-definition-YRQLILUH-MuP2ZrRx.js");return{diagram:r}},__vite__mapDeps([85,59,60]),import.meta.url);return{id:_Q,diagram:e}},"loader"),_Re={id:_Q,detector:yRe,loader:vRe},bRe=_Re,bQ="kanban",xRe=B(e=>/^\s*kanban/.test(e),"detector"),wRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./kanban-definition-K7BYSVSG-CecpD-kV.js");return{diagram:r}},__vite__mapDeps([86,58]),import.meta.url);return{id:bQ,diagram:e}},"loader"),SRe={id:bQ,detector:xRe,loader:wRe},CRe=SRe,xQ="sankey",kRe=B(e=>/^\s*sankey(-beta)?/.test(e),"detector"),jRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./sankeyDiagram-WA2Y5GQK-CDOHW84x.js");return{diagram:r}},[],import.meta.url);return{id:xQ,diagram:e}},"loader"),ERe={id:xQ,detector:kRe,loader:jRe},TRe=ERe,wQ="packet",ORe=B(e=>/^\s*packet(-beta)?/.test(e),"detector"),NRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./diagram-P4PSJMXO-BGrw0dnS.js");return{diagram:r}},__vite__mapDeps([87,64,66,49,51,52]),import.meta.url);return{id:wQ,diagram:e}},"loader"),ARe={id:wQ,detector:ORe,loader:NRe},SQ="radar",PRe=B(e=>/^\s*radar-beta/.test(e),"detector"),MRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./diagram-IFDJBPK2-Bd0pL2-e.js");return{diagram:r}},__vite__mapDeps([88,64,66,49,51,52]),import.meta.url);return{id:SQ,diagram:e}},"loader"),RRe={id:SQ,detector:PRe,loader:MRe},CQ="block",LRe=B(e=>/^\s*block(-beta)?/.test(e),"detector"),DRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./blockDiagram-WCTKOSBZ-CuS0pENN.js");return{diagram:r}},__vite__mapDeps([89,58,52,49,48,61]),import.meta.url);return{id:CQ,diagram:e}},"loader"),$Re={id:CQ,detector:LRe,loader:DRe},IRe=$Re,kQ="architecture",BRe=B(e=>/^\s*architecture/.test(e),"detector"),zRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./architectureDiagram-2XIMDMQ5-DpOwhWSP.js");return{diagram:r}},__vite__mapDeps([90,64,66,49,51,52,54]),import.meta.url);return{id:kQ,diagram:e}},"loader"),FRe={id:kQ,detector:BRe,loader:zRe},HRe=FRe,jQ="ishikawa",WRe=B(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),URe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./ishikawaDiagram-PHBUUO56-BUb3d6K0.js");return{diagram:r}},[],import.meta.url);return{id:jQ,diagram:e}},"loader"),VRe={id:jQ,detector:WRe,loader:URe},EQ="venn",qRe=B(e=>/^\s*venn-beta/.test(e),"detector"),GRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./vennDiagram-LZ73GAT5-BMU9ryTX.js");return{diagram:r}},[],import.meta.url);return{id:EQ,diagram:e}},"loader"),YRe={id:EQ,detector:qRe,loader:GRe},KRe=YRe,TQ="treemap",XRe=B(e=>/^\s*treemap/.test(e),"detector"),ZRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./diagram-E7M64L7V-vVjHC2qx.js");return{diagram:r}},__vite__mapDeps([91,60,64,66,49,51,52,69]),import.meta.url);return{id:TQ,diagram:e}},"loader"),JRe={id:TQ,detector:XRe,loader:ZRe},t$=!1,G5=B(()=>{t$||(t$=!0,AS("error",lRe,e=>e.toLowerCase().trim()==="error"),AS("---",{db:{clear:B(()=>{},"clear")},styles:{},renderer:{draw:B(()=>{},"draw")},parser:{parse:B(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:B(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),c8(fRe,bRe,HRe),c8(XPe,CRe,qMe,HMe,lMe,gMe,_Me,wMe,RMe,IMe,iMe,eMe,gRe,fMe,eRe,XMe,iRe,jMe,TRe,ARe,NMe,IRe,RRe,VRe,JRe,KRe))},"addDiagrams"),QRe=B(async()=>{lt.debug("Loading registered diagrams");const r=(await Promise.allSettled(Object.entries(Zp).map(async([n,{detector:i,loader:s}])=>{if(s)try{d8(n)}catch{try{const{diagram:o,id:a}=await s();AS(a,o,i)}catch(o){throw lt.error(`Failed to load external diagram with key ${n}. Removing from detectors.`),delete Zp[n],o}}}))).filter(n=>n.status==="rejected");if(r.length>0){lt.error(`Failed to load ${r.length} external diagrams`);for(const n of r)lt.error(n);throw new Error(`Failed to load ${r.length} external diagrams`)}},"loadRegisteredDiagrams"),eLe="graphics-document document";function OQ(e,r){e.attr("role",eLe),r!==""&&e.attr("aria-roledescription",r)}B(OQ,"setA11yDiagramInfo");function NQ(e,r,n,i){if(e.insert!==void 0){if(n){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(n)}if(r){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(r)}}}B(NQ,"addSVGa11yTitleDescription");var Wp,nE=(Wp=class{constructor(r,n,i,s,o){this.type=r,this.text=n,this.db=i,this.parser=s,this.renderer=o}static async fromText(r,n={}){var u,d;const i=wo(),s=eO(r,i);r=n9e(r)+`
985
+ L0,20`)},"requirement_arrow"),TPe=B((e,r,n)=>{const i=e.append("defs").append("marker").attr("id",n+"_"+r+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),OPe={extension:pPe,composition:mPe,aggregation:gPe,dependency:yPe,lollipop:vPe,point:_Pe,circle:bPe,cross:xPe,barb:wPe,only_one:SPe,zero_or_one:CPe,one_or_more:kPe,zero_or_more:jPe,requirement_arrow:EPe,requirement_contains:TPe},NPe=dPe,APe={common:Qb,getConfig:wo,insertCluster:$Ae,insertEdge:fPe,insertEdgeLabel:oPe,insertMarkers:NPe,insertNode:YJ,interpolateToCurve:MO,labelHelper:mr,log:lt,positionEdgeLabel:aPe},k_={},JJ=B(e=>{for(const r of e)k_[r.name]=r},"registerLayoutLoaders"),PPe=B(()=>{JJ([{name:"dagre",loader:B(async()=>await Re(()=>import("./dagre-KLK3FWXG-D8W3Im6q.js"),__vite__mapDeps([47,48,49,50,51,52]),import.meta.url),"loader")},{name:"cose-bilkent",loader:B(async()=>await Re(()=>import("./cose-bilkent-S5V4N54A-BisD8ttz.js"),__vite__mapDeps([53,54]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");PPe();var vrt=B(async(e,r)=>{if(!(e.layoutAlgorithm in k_))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const n=k_[e.layoutAlgorithm];return(await n.loader()).render(e,r,APe,{algorithm:n.algorithm})},"render"),_rt=B((e="",{fallback:r="dagre"}={})=>{if(e in k_)return e;if(r in k_)return lt.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Both layout algorithms ${e} and ${r} are not registered.`)},"getRegisteredLayoutAlgorithm"),MPe=TX(Object.keys,Object),RPe=Object.prototype,LPe=RPe.hasOwnProperty;function DPe(e){if(!I5(e))return MPe(e);var r=[];for(var n in Object(e))LPe.call(e,n)&&n!="constructor"&&r.push(n);return r}var Q8=vm(Wc,"DataView"),eE=vm(Wc,"Promise"),tE=vm(Wc,"Set"),rE=vm(Wc,"WeakMap"),KD="[object Map]",$Pe="[object Object]",XD="[object Promise]",ZD="[object Set]",JD="[object WeakMap]",QD="[object DataView]",IPe=ym(Q8),BPe=ym(S_),zPe=ym(eE),FPe=ym(tE),HPe=ym(rE),Ep=gm;(Q8&&Ep(new Q8(new ArrayBuffer(1)))!=QD||S_&&Ep(new S_)!=KD||eE&&Ep(eE.resolve())!=XD||tE&&Ep(new tE)!=ZD||rE&&Ep(new rE)!=JD)&&(Ep=function(e){var r=gm(e),n=r==$Pe?e.constructor:void 0,i=n?ym(n):"";if(i)switch(i){case IPe:return QD;case BPe:return KD;case zPe:return XD;case FPe:return ZD;case HPe:return JD}return r});var WPe="[object Map]",UPe="[object Set]",VPe=Object.prototype,qPe=VPe.hasOwnProperty;function e$(e){if(e==null)return!0;if(B5(e)&&(XS(e)||typeof e=="string"||typeof e.splice=="function"||AO(e)||PO(e)||KS(e)))return!e.length;var r=Ep(e);if(r==WPe||r==UPe)return!e.size;if(I5(e))return!DPe(e).length;for(var n in e)if(qPe.call(e,n))return!1;return!0}var QJ="c4",GPe=B(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),YPe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./c4Diagram-IC4MRINW-DOyLfPQU.js");return{diagram:r}},__vite__mapDeps([55,56]),import.meta.url);return{id:QJ,diagram:e}},"loader"),KPe={id:QJ,detector:GPe,loader:YPe},XPe=KPe,eQ="flowchart",ZPe=B((e,r)=>{var n,i;return((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"||((i=r==null?void 0:r.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),JPe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-B0r4Kzj_.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:eQ,diagram:e}},"loader"),QPe={id:eQ,detector:ZPe,loader:JPe},eMe=QPe,tQ="flowchart-v2",tMe=B((e,r)=>{var n,i,s;return((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="dagre-d3"?!1:(((i=r==null?void 0:r.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(r.layout="elk"),/^\s*graph/.test(e)&&((s=r==null?void 0:r.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),rMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-B0r4Kzj_.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:tQ,diagram:e}},"loader"),nMe={id:tQ,detector:tMe,loader:rMe},iMe=nMe,rQ="er",sMe=B(e=>/^\s*erDiagram/.test(e),"detector"),oMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./erDiagram-INFDFZHY-Cs3Ew6wG.js");return{diagram:r}},__vite__mapDeps([62,59,60,61]),import.meta.url);return{id:rQ,diagram:e}},"loader"),aMe={id:rQ,detector:sMe,loader:oMe},lMe=aMe,nQ="gitGraph",cMe=B(e=>/^\s*gitGraph/.test(e),"detector"),uMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./gitGraphDiagram-K3NZZRJ6-Q9zN3-2Y.js");return{diagram:r}},__vite__mapDeps([63,64,65,66,49,51,52]),import.meta.url);return{id:nQ,diagram:e}},"loader"),hMe={id:nQ,detector:cMe,loader:uMe},fMe=hMe,iQ="gantt",dMe=B(e=>/^\s*gantt/.test(e),"detector"),pMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./ganttDiagram-A5KZAMGK-CGGoORUN.js");return{diagram:r}},__vite__mapDeps([67,68,69]),import.meta.url);return{id:iQ,diagram:e}},"loader"),mMe={id:iQ,detector:dMe,loader:pMe},gMe=mMe,sQ="info",yMe=B(e=>/^\s*info/.test(e),"detector"),vMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./infoDiagram-LFFYTUFH-Cqf-KP6a.js");return{diagram:r}},__vite__mapDeps([70,66,49,51,52]),import.meta.url);return{id:sQ,diagram:e}},"loader"),_Me={id:sQ,detector:yMe,loader:vMe},oQ="pie",bMe=B(e=>/^\s*pie/.test(e),"detector"),xMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./pieDiagram-SKSYHLDU-CVgjF9sQ.js");return{diagram:r}},__vite__mapDeps([71,64,66,49,51,52,72]),import.meta.url);return{id:oQ,diagram:e}},"loader"),wMe={id:oQ,detector:bMe,loader:xMe},aQ="quadrantChart",SMe=B(e=>/^\s*quadrantChart/.test(e),"detector"),CMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./quadrantDiagram-337W2JSQ-B0pd1aWx.js");return{diagram:r}},__vite__mapDeps([73,68,69]),import.meta.url);return{id:aQ,diagram:e}},"loader"),kMe={id:aQ,detector:SMe,loader:CMe},jMe=kMe,lQ="xychart",EMe=B(e=>/^\s*xychart(-beta)?/.test(e),"detector"),TMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./xychartDiagram-JWTSCODW-BD4GMond.js");return{diagram:r}},__vite__mapDeps([74,68,69]),import.meta.url);return{id:lQ,diagram:e}},"loader"),OMe={id:lQ,detector:EMe,loader:TMe},NMe=OMe,cQ="requirement",AMe=B(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),PMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./requirementDiagram-Z7DCOOCP-DuMDYd2N.js");return{diagram:r}},__vite__mapDeps([75,59,60]),import.meta.url);return{id:cQ,diagram:e}},"loader"),MMe={id:cQ,detector:AMe,loader:PMe},RMe=MMe,uQ="sequence",LMe=B(e=>/^\s*sequenceDiagram/.test(e),"detector"),DMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./sequenceDiagram-2WXFIKYE-tdMm47lv.js");return{diagram:r}},__vite__mapDeps([76,56,65]),import.meta.url);return{id:uQ,diagram:e}},"loader"),$Me={id:uQ,detector:LMe,loader:DMe},IMe=$Me,hQ="class",BMe=B((e,r)=>{var n;return((n=r==null?void 0:r.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),zMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./classDiagram-VBA2DB6C-C9Q8wGay.js");return{diagram:r}},__vite__mapDeps([77,78,58,56,59,60]),import.meta.url);return{id:hQ,diagram:e}},"loader"),FMe={id:hQ,detector:BMe,loader:zMe},HMe=FMe,fQ="classDiagram",WMe=B((e,r)=>{var n;return/^\s*classDiagram/.test(e)&&((n=r==null?void 0:r.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),UMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./classDiagram-v2-RAHNMMFH-C9Q8wGay.js");return{diagram:r}},__vite__mapDeps([79,78,58,56,59,60]),import.meta.url);return{id:fQ,diagram:e}},"loader"),VMe={id:fQ,detector:WMe,loader:UMe},qMe=VMe,dQ="state",GMe=B((e,r)=>{var n;return((n=r==null?void 0:r.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),YMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./stateDiagram-RAJIS63D-o2pg1TF_.js");return{diagram:r}},__vite__mapDeps([80,81,59,60,48,49,50,51]),import.meta.url);return{id:dQ,diagram:e}},"loader"),KMe={id:dQ,detector:GMe,loader:YMe},XMe=KMe,pQ="stateDiagram",ZMe=B((e,r)=>{var n;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((n=r==null?void 0:r.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper")},"detector"),JMe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./stateDiagram-v2-FVOUBMTO-BztSEcIi.js");return{diagram:r}},__vite__mapDeps([82,81,59,60]),import.meta.url);return{id:pQ,diagram:e}},"loader"),QMe={id:pQ,detector:ZMe,loader:JMe},eRe=QMe,mQ="journey",tRe=B(e=>/^\s*journey/.test(e),"detector"),rRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./journeyDiagram-4ABVD52K-DEpTFcbV.js");return{diagram:r}},__vite__mapDeps([83,58,56,72]),import.meta.url);return{id:mQ,diagram:e}},"loader"),nRe={id:mQ,detector:tRe,loader:rRe},iRe=nRe,sRe=B((e,r,n)=>{lt.debug(`rendering svg for syntax error
986
+ `);const i=eTe(r),s=i.append("g");i.attr("viewBox","0 0 2412 512"),UG(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw"),gQ={draw:sRe},oRe=gQ,aRe={db:{},renderer:gQ,parser:{parse:B(()=>{},"parse")}},lRe=aRe,yQ="flowchart-elk",cRe=B((e,r={})=>{var n;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((n=r==null?void 0:r.flowchart)==null?void 0:n.defaultRenderer)==="elk"?(r.layout="elk",!0):!1},"detector"),uRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./flowDiagram-PKNHOUZH-B0r4Kzj_.js");return{diagram:r}},__vite__mapDeps([57,58,56,59,60,61]),import.meta.url);return{id:yQ,diagram:e}},"loader"),hRe={id:yQ,detector:cRe,loader:uRe},fRe=hRe,vQ="timeline",dRe=B(e=>/^\s*timeline/.test(e),"detector"),pRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./timeline-definition-YZTLITO2-CnmOF4P9.js");return{diagram:r}},__vite__mapDeps([84,72]),import.meta.url);return{id:vQ,diagram:e}},"loader"),mRe={id:vQ,detector:dRe,loader:pRe},gRe=mRe,_Q="mindmap",yRe=B(e=>/^\s*mindmap/.test(e),"detector"),vRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./mindmap-definition-YRQLILUH-CZurNg-N.js");return{diagram:r}},__vite__mapDeps([85,59,60]),import.meta.url);return{id:_Q,diagram:e}},"loader"),_Re={id:_Q,detector:yRe,loader:vRe},bRe=_Re,bQ="kanban",xRe=B(e=>/^\s*kanban/.test(e),"detector"),wRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./kanban-definition-K7BYSVSG-6b_CwLq1.js");return{diagram:r}},__vite__mapDeps([86,58]),import.meta.url);return{id:bQ,diagram:e}},"loader"),SRe={id:bQ,detector:xRe,loader:wRe},CRe=SRe,xQ="sankey",kRe=B(e=>/^\s*sankey(-beta)?/.test(e),"detector"),jRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./sankeyDiagram-WA2Y5GQK-DOX6NV5B.js");return{diagram:r}},[],import.meta.url);return{id:xQ,diagram:e}},"loader"),ERe={id:xQ,detector:kRe,loader:jRe},TRe=ERe,wQ="packet",ORe=B(e=>/^\s*packet(-beta)?/.test(e),"detector"),NRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./diagram-P4PSJMXO-DTNBoo4C.js");return{diagram:r}},__vite__mapDeps([87,64,66,49,51,52]),import.meta.url);return{id:wQ,diagram:e}},"loader"),ARe={id:wQ,detector:ORe,loader:NRe},SQ="radar",PRe=B(e=>/^\s*radar-beta/.test(e),"detector"),MRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./diagram-IFDJBPK2-C2HkaT6E.js");return{diagram:r}},__vite__mapDeps([88,64,66,49,51,52]),import.meta.url);return{id:SQ,diagram:e}},"loader"),RRe={id:SQ,detector:PRe,loader:MRe},CQ="block",LRe=B(e=>/^\s*block(-beta)?/.test(e),"detector"),DRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./blockDiagram-WCTKOSBZ-BimMIGVt.js");return{diagram:r}},__vite__mapDeps([89,58,52,49,48,61]),import.meta.url);return{id:CQ,diagram:e}},"loader"),$Re={id:CQ,detector:LRe,loader:DRe},IRe=$Re,kQ="architecture",BRe=B(e=>/^\s*architecture/.test(e),"detector"),zRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./architectureDiagram-2XIMDMQ5-t9_mc_uh.js");return{diagram:r}},__vite__mapDeps([90,64,66,49,51,52,54]),import.meta.url);return{id:kQ,diagram:e}},"loader"),FRe={id:kQ,detector:BRe,loader:zRe},HRe=FRe,jQ="ishikawa",WRe=B(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),URe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./ishikawaDiagram-PHBUUO56-B2mtTxFh.js");return{diagram:r}},[],import.meta.url);return{id:jQ,diagram:e}},"loader"),VRe={id:jQ,detector:WRe,loader:URe},EQ="venn",qRe=B(e=>/^\s*venn-beta/.test(e),"detector"),GRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./vennDiagram-LZ73GAT5-Djaoh1ub.js");return{diagram:r}},[],import.meta.url);return{id:EQ,diagram:e}},"loader"),YRe={id:EQ,detector:qRe,loader:GRe},KRe=YRe,TQ="treemap",XRe=B(e=>/^\s*treemap/.test(e),"detector"),ZRe=B(async()=>{const{diagram:e}=await Re(async()=>{const{diagram:r}=await import("./diagram-E7M64L7V-BjCnnq3Z.js");return{diagram:r}},__vite__mapDeps([91,60,64,66,49,51,52,69]),import.meta.url);return{id:TQ,diagram:e}},"loader"),JRe={id:TQ,detector:XRe,loader:ZRe},t$=!1,G5=B(()=>{t$||(t$=!0,AS("error",lRe,e=>e.toLowerCase().trim()==="error"),AS("---",{db:{clear:B(()=>{},"clear")},styles:{},renderer:{draw:B(()=>{},"draw")},parser:{parse:B(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:B(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),c8(fRe,bRe,HRe),c8(XPe,CRe,qMe,HMe,lMe,gMe,_Me,wMe,RMe,IMe,iMe,eMe,gRe,fMe,eRe,XMe,iRe,jMe,TRe,ARe,NMe,IRe,RRe,VRe,JRe,KRe))},"addDiagrams"),QRe=B(async()=>{lt.debug("Loading registered diagrams");const r=(await Promise.allSettled(Object.entries(Zp).map(async([n,{detector:i,loader:s}])=>{if(s)try{d8(n)}catch{try{const{diagram:o,id:a}=await s();AS(a,o,i)}catch(o){throw lt.error(`Failed to load external diagram with key ${n}. Removing from detectors.`),delete Zp[n],o}}}))).filter(n=>n.status==="rejected");if(r.length>0){lt.error(`Failed to load ${r.length} external diagrams`);for(const n of r)lt.error(n);throw new Error(`Failed to load ${r.length} external diagrams`)}},"loadRegisteredDiagrams"),eLe="graphics-document document";function OQ(e,r){e.attr("role",eLe),r!==""&&e.attr("aria-roledescription",r)}B(OQ,"setA11yDiagramInfo");function NQ(e,r,n,i){if(e.insert!==void 0){if(n){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(n)}if(r){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(r)}}}B(NQ,"addSVGa11yTitleDescription");var Wp,nE=(Wp=class{constructor(r,n,i,s,o){this.type=r,this.text=n,this.db=i,this.parser=s,this.renderer=o}static async fromText(r,n={}){var u,d;const i=wo(),s=eO(r,i);r=n9e(r)+`
987
987
  `;try{d8(s)}catch{const p=Vke(s);if(!p)throw new NG(`Diagram ${s} not found.`);const{id:g,diagram:y}=await p();AS(g,y)}const{db:o,parser:a,renderer:l,init:c}=d8(s);return a.parser&&(a.parser.yy=o),(u=o.clear)==null||u.call(o),c==null||c(i),n.title&&((d=o.setDiagramTitle)==null||d.call(o,n.title)),await a.parse(r),new Wp(s,r,o,a,l)}async render(r,n){await this.renderer.draw(this.text,r,n,this)}getParser(){return this.parser}getType(){return this.type}},B(Wp,"Diagram"),Wp),r$=[],tLe=B(()=>{r$.forEach(e=>{e()}),r$=[]},"attachFunctions"),rLe=B(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function AQ(e){const r=e.match(OG);if(!r)return{text:e,metadata:{}};let n=a7e(r[1],{schema:o7e})??{};n=typeof n=="object"&&!Array.isArray(n)?n:{};const i={};return n.displayMode&&(i.displayMode=n.displayMode.toString()),n.title&&(i.title=n.title.toString()),n.config&&(i.config=n.config),{text:e.slice(r[0].length),metadata:i}}B(AQ,"extractFrontMatter");var nLe=B(e=>e.replace(/\r\n?/g,`
988
988
  `).replace(/<(\w+)([^>]*)>/g,(r,n,i)=>"<"+n+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),iLe=B(e=>{const{text:r,metadata:n}=AQ(e),{displayMode:i,title:s,config:o={}}=n;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:r}},"processFrontmatter"),sLe=B(e=>{const r=Tc.detectInit(e)??{},n=Tc.detectDirective(e,"wrap");return Array.isArray(n)?r.wrap=n.some(({type:i})=>i==="wrap"):(n==null?void 0:n.type)==="wrap"&&(r.wrap=!0),{text:UNe(e),directive:r}},"processDirectives");function eN(e){const r=nLe(e),n=iLe(r),i=sLe(n.text),s=IO(n.config,i.directive);return e=rLe(i.text),{code:e,title:n.title,config:s}}B(eN,"preprocessDiagram");function PQ(e){const r=new TextEncoder().encode(e),n=Array.from(r,i=>String.fromCodePoint(i)).join("");return btoa(n)}B(PQ,"toBase64");var oLe=5e4,aLe="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",lLe="sandbox",cLe="loose",uLe="http://www.w3.org/2000/svg",hLe="http://www.w3.org/1999/xlink",fLe="http://www.w3.org/1999/xhtml",dLe="100%",pLe="100%",mLe="border:0;margin:0;",gLe="margin:0",yLe="allow-top-navigation-by-user-activation allow-popups",vLe='The "iframe" tag is not supported by your browser.',_Le=["foreignobject"],bLe=["dominant-baseline"];function tN(e){const r=eN(e);return OS(),a4e(r.config??{}),r}B(tN,"processAndSetConfigs");async function MQ(e,r){G5();try{const{code:n,config:i}=tN(e);return{diagramType:(await LQ(n)).type,config:i}}catch(n){if(r!=null&&r.suppressErrors)return!1;throw n}}B(MQ,"parse");var n$=B((e,r,n=[])=>`
989
989
  .${e} ${r} { ${n.join(" !important; ")} !important; }`,"cssImportantStyles"),xLe=B((e,r=new Map)=>{let n="";if(e.themeCSS!==void 0&&(n+=`
@@ -1123,7 +1123,7 @@ WARNING: This link could potentially be dangerous`)){let n=window.open();if(n){t
1123
1123
  * Fabrice Bellard's javascript vt100 for jslinux:
1124
1124
  * http://bellard.org/jslinux/
1125
1125
  * Copyright (c) 2011 Fabrice Bellard
1126
- */var eet=class{constructor(e,r,n,i={}){this._terminal=e,this._regex=r,this._handler=n,this._options=i}provideLinks(e,r){let n=ret.computeLink(e,this._regex,this._terminal,this._handler);r(this._addCallbacks(n))}_addCallbacks(e){return e.map(r=>(r.leave=this._options.leave,r.hover=(n,i)=>{if(this._options.hover){let{range:s}=r;this._options.hover(n,i,s)}},r))}};function tet(e){try{let r=new URL(e),n=r.password&&r.username?`${r.protocol}//${r.username}:${r.password}@${r.host}`:r.username?`${r.protocol}//${r.username}@${r.host}`:`${r.protocol}//${r.host}`;return e.toLocaleLowerCase().startsWith(n.toLocaleLowerCase())}catch{return!1}}var ret=class Kw{static computeLink(r,n,i,s){let o=new RegExp(n.source,(n.flags||"")+"g"),[a,l]=Kw._getWindowedLineStrings(r-1,i),c=a.join(""),u,d=[];for(;u=o.exec(c);){let p=u[0];if(!tet(p))continue;let[g,y]=Kw._mapStrIdx(i,l,0,u.index),[b,w]=Kw._mapStrIdx(i,g,y,p.length);if(g===-1||y===-1||b===-1||w===-1)continue;let C={start:{x:y+1,y:g+1},end:{x:w,y:b+1}};d.push({range:C,text:p,activate:s})}return d}static _getWindowedLineStrings(r,n){let i,s=r,o=r,a=0,l="",c=[];if(i=n.buffer.active.getLine(r)){let u=i.translateToString(!0);if(i.isWrapped&&u[0]!==" "){for(a=0;(i=n.buffer.active.getLine(--s))&&a<2048&&(l=i.translateToString(!0),a+=l.length,c.push(l),!(!i.isWrapped||l.indexOf(" ")!==-1)););c.reverse()}for(c.push(u),a=0;(i=n.buffer.active.getLine(++o))&&i.isWrapped&&a<2048&&(l=i.translateToString(!0),a+=l.length,c.push(l),l.indexOf(" ")===-1););}return[c,s]}static _mapStrIdx(r,n,i,s){let o=r.buffer.active,a=o.getNullCell(),l=i;for(;s;){let c=o.getLine(n);if(!c)return[-1,-1];for(let u=l;u<c.length;++u){c.getCell(u,a);let d=a.getChars();if(a.getWidth()&&(s-=d.length||1,u===c.length-1&&d==="")){let p=o.getLine(n+1);p&&p.isWrapped&&(p.getCell(0,a),a.getWidth()===2&&(s+=1))}if(s<0)return[n,u]}n++,l=0}return[n,l]}},net=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function iet(e,r){let n=window.open();if(n){try{n.opener=null}catch{}n.location.href=r}else console.warn("Opening link blocked as opener could not be cleared")}var set=class{constructor(e=iet,r={}){this._handler=e,this._options=r}activate(e){this._terminal=e;let r=this._options,n=r.urlRegex||net;this._linkProvider=this._terminal.registerLinkProvider(new eet(this._terminal,n,this._handler,r))}dispose(){var e;(e=this._linkProvider)==null||e.dispose()}};function oet(e,r,n){if(!n||n.type!=="terminal.output"||n.terminalId!==r)return!1;if(!n.streamId||typeof n.seq!="number")return!0;const i=e.get(n.streamId)??-1;return n.seq<=i?!1:(e.set(n.streamId,n.seq),!0)}const Xw=hn(),aet=Kb();function Zw(e){return e?{Authorization:`Bearer ${e}`}:{}}function cet(e){const[r,n]=_.useState([]),[i,s]=_.useState(null),o=_.useCallback(async()=>{try{const u=await(await fetch(`${Xw}/api/terminals`,{headers:Zw(e)})).json();return n(u.terminals),u.terminals}catch{return[]}},[e]),a=_.useCallback(async(c,u)=>{const p=await(await fetch(`${Xw}/api/terminals`,{method:"POST",headers:{"Content-Type":"application/json",...Zw(e)},body:JSON.stringify({sessionId:c,workspaceRoot:u})})).json();return n(g=>[...g,p]),s(p.id),p},[e]),l=_.useCallback(async c=>{await fetch(`${Xw}/api/terminals/${c}`,{method:"DELETE",headers:Zw(e)}),n(u=>u.filter(d=>d.id!==c)),s(u=>u===c?null:u)},[e]);return _.useEffect(()=>{o()},[o]),{terminals:r,activeTerminalId:i,setActiveTerminalId:s,createTerminal:a,killTerminal:l,refresh:o}}function uet({terminalId:e,className:r,token:n}){const i=_.useRef(null),s=_.useRef(null),o=_.useRef(null),a=_.useRef(null);return _.useEffect(()=>{if(!i.current)return;const l=new XQe({cursorBlink:!0,fontSize:13,fontFamily:"'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace",theme:{background:"#0a0a0a",foreground:"#e4e4e7",cursor:"#e4e4e7",selectionBackground:"#27272a"},allowProposedApi:!0}),c=new QQe,u=new set;l.loadAddon(c),l.loadAddon(u),l.open(i.current),requestAnimationFrame(()=>{c.fit(),l.focus()}),s.current=l,o.current=c;let d=null,p=null,g=!1;const y=new Map;function b(){if(g)return;const C=n?`?token=${encodeURIComponent(n)}`:"";d=new WebSocket(`${aet}${C}`),a.current=d,d.onopen=()=>{d.send(JSON.stringify({type:"terminal.subscribe",terminalId:e}))},d.onmessage=S=>{try{const k=JSON.parse(S.data);oet(y,e,k.payload)&&l.write(k.payload.data??"")}catch{}},d.onclose=()=>{g||(p=setTimeout(b,1e3))},d.onerror=()=>{}}b(),l.onData(C=>{d&&d.readyState===WebSocket.OPEN&&d.send(JSON.stringify({type:"terminal.input",terminalId:e,data:C}))}),l.onResize(({cols:C,rows:S})=>{d&&d.readyState===WebSocket.OPEN&&d.send(JSON.stringify({type:"terminal.resize",terminalId:e,cols:C,rows:S})),fetch(`${Xw}/api/terminals/${e}/resize`,{method:"POST",headers:{"Content-Type":"application/json",...Zw(n)},body:JSON.stringify({cols:C,rows:S})})});const w=new ResizeObserver(()=>{requestAnimationFrame(()=>c.fit())});return w.observe(i.current),()=>{g=!0,p&&clearTimeout(p),w.disconnect(),d&&d.close(),l.dispose(),s.current=null,o.current=null,a.current=null}},[e,n]),f.jsx("div",{className:`w-full overflow-hidden ${r??""}`,onClick:()=>{var l;return(l=s.current)==null?void 0:l.focus()},children:f.jsx("div",{ref:i,className:"h-full w-full"})})}function het({terminals:e,activeTerminalId:r,onSelect:n,onCreate:i,onKill:s}){return f.jsxs("div",{className:"flex items-center gap-1 px-2 h-8 border-b bg-muted/50 shrink-0 overflow-x-auto",children:[e.map(o=>f.jsxs("div",{role:"tab",tabIndex:0,onClick:()=>n(o.id),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&n(o.id)},className:`group flex items-center gap-1.5 px-2.5 py-1 text-xs rounded-sm transition-colors cursor-pointer ${r===o.id?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/50"}`,children:[f.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${o.state==="running"?"bg-green-500":"bg-zinc-500"}`}),f.jsx("span",{className:"truncate max-w-[100px]",children:o.id.replace(/^term-/,"").slice(0,8)}),f.jsx("button",{onClick:a=>{a.stopPropagation(),s(o.id)},className:"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-destructive ml-0.5",children:"×"})]},o.id)),f.jsx("button",{onClick:i,className:"px-2 py-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:"+"})]})}function fet(e){const r=e==null?void 0:e.trim();return r?/^https?:\/\//i.test(r)?r:r.startsWith("/")?`${hn()}${r}`:r:null}async function det(e,r,n){const i=await fetch(`${hn()}/api/workspace/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,content:r,surfaceId:n})});if(!i.ok){const s=await i.json().catch(()=>({}));throw new Error(s.message||`Failed to save file: ${i.statusText}`)}}function pet({detachedTabId:e}){const[r,n]=_.useState(()=>f$(e)),[i,s]=_.useState((r==null?void 0:r.tab.content)??""),[o,a]=_.useState(!1),[l,c]=_.useState(null);_.useEffect(()=>{const g=()=>n(f$(e));return g(),window.addEventListener("storage",g),()=>window.removeEventListener("storage",g)},[e]),_.useEffect(()=>{r&&(document.title=r.title||r.tab.label||"Jait")},[r]),_.useEffect(()=>{r&&document.documentElement.classList.toggle("dark",r.theme==="dark")},[r]),_.useEffect(()=>{s((r==null?void 0:r.tab.content)??"")},[r==null?void 0:r.tab.content]);const u=_.useMemo(()=>fet(r==null?void 0:r.tab.previewSrc),[r==null?void 0:r.tab.previewSrc]),d=_.useCallback(()=>{hDe(e),window.close()},[e]),p=_.useCallback(async()=>{if(!(!r||r.tab.type!=="file")){a(!0),c(null);try{await det(r.tab.path,i,r.surfaceId??null)}catch(g){c(g instanceof Error?g.message:"Failed to save file")}finally{a(!1)}}},[i,r]);return r?f.jsxs("div",{className:"flex h-screen flex-col bg-muted/10 text-foreground",children:[f.jsxs("div",{className:"flex h-[35px] items-center gap-2 border-b bg-muted/30 px-3 shrink-0",children:[r.tab.type==="architecture"?f.jsx(eS,{className:"h-4 w-4 shrink-0"}):r.tab.type==="preview"?f.jsx(di,{className:"h-4 w-4 shrink-0"}):null,f.jsx("span",{className:"truncate text-sm font-medium",children:r.title}),f.jsxs("div",{className:"ml-auto flex items-center gap-1.5",children:[r.tab.type==="file"&&f.jsxs($e,{type:"button",variant:"ghost",size:"sm",className:"h-8 px-2 text-[11px]",onClick:()=>{p()},disabled:o,children:[o?f.jsx(er,{className:"mr-1 h-3 w-3 animate-spin"}):f.jsx(HT,{className:"mr-1 h-3 w-3"}),"Save"]}),r.tab.type==="preview"&&u&&f.jsx("a",{href:u,target:"_blank",rel:"noreferrer",className:"inline-flex",children:f.jsxs($e,{type:"button",variant:"ghost",size:"sm",className:"h-8 px-2 text-[11px]",children:[f.jsx(Tv,{className:"mr-1 h-3 w-3"}),"Open"]})}),f.jsx($e,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8",onClick:d,children:f.jsx(Xn,{className:"h-4 w-4"})})]})]}),l?f.jsx("div",{className:"border-b px-3 py-2 text-xs text-destructive",children:l}):null,f.jsx("div",{className:"min-h-0 flex-1 bg-background",children:r.tab.type==="diff"?f.jsx(h_,{className:"h-full",editorClassName:"h-full",original:r.tab.originalContent??"",modified:r.tab.modifiedContent??"",language:r.tab.language??"plaintext",renderSideBySide:!0,options:{minimap:{enabled:!1}}}):r.tab.type==="preview"?u?f.jsx("iframe",{src:u,title:r.title,className:"h-full w-full bg-white",sandbox:"allow-forms allow-modals allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-downloads"}):f.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"Preview unavailable."}):r.tab.type==="architecture"?f.jsx(aE,{diagram:r.architectureDiagram??null,isGenerating:r.architectureGenerating,theme:r.theme}):r.tab.originalContent!=null?f.jsx(iee,{path:r.tab.path,language:r.tab.language??"plaintext",value:i,originalContent:r.tab.originalContent,theme:r.theme==="dark"?"vs-dark":"vs",onChange:g=>s(g??"")}):f.jsx(S5,{height:"100%",theme:r.theme==="dark"?"vs-dark":"vs",path:r.tab.path,language:r.tab.language??"plaintext",value:i,onChange:g=>s(g??""),options:{minimap:{enabled:!1},fontSize:13,automaticLayout:!0}})})]}):f.jsx("div",{className:"flex h-screen items-center justify-center bg-background text-sm text-muted-foreground",children:"Detached tab not found."})}const hj=hn();function met({platform:e}){switch(e){case"windows":case"macos":case"linux":return f.jsx(ka,{className:"h-3.5 w-3.5"});case"android":case"ios":return f.jsx(F3,{className:"h-3.5 w-3.5"});default:return f.jsx(di,{className:"h-3.5 w-3.5"})}}function Mz({open:e,onOpenChange:r,onSelect:n,gatewayOnly:i,initialPath:s,initialNodeId:o}){const[a,l]=_.useState(null),[c,u]=_.useState(null),[d,p]=_.useState([]),[g,y]=_.useState([]),[b,w]=_.useState(!1),[C,S]=_.useState(null),[k,E]=_.useState(""),[O,A]=_.useState(!1),[T,R]=_.useState([]),[U,q]=_.useState("gateway"),D=_.useCallback(X=>{l(X.path),u(X.parent),p(X.entries),E(X.path)},[]),Y=_.useCallback(async(X,H)=>{const F=`${hj}/api/filesystem/browse?path=${encodeURIComponent(X)}&nodeId=${encodeURIComponent(H)}`,Q=await fetch(F);if(!Q.ok){const M=await Q.json().catch(()=>({message:"Failed to browse"}));throw new Error(M.message??"Failed to browse")}return await Q.json()},[]),K=_.useCallback(async(X,H)=>{try{w(!0),S(null),l(null),u(null),p([]);const F=`${hj}/api/filesystem/roots?nodeId=${encodeURIComponent(X)}`,Q=await fetch(F);if(!Q.ok)throw new Error("Failed to load roots");const M=await Q.json();if(y(M.roots),H)try{const re=await Y(H,X);D(re);return}catch{}const ie=M.roots.find(re=>re.name==="Home")??M.roots[0];if(ie){const re=await Y(ie.path,X);D(re)}}catch(F){S(F instanceof Error?F.message:"Failed to load")}finally{w(!1)}},[D,Y]),Z=_.useCallback(async(X,H)=>{try{const F=await fetch(`${hj}/api/filesystem/nodes`);if(!F.ok)throw new Error("Failed to load nodes");const Q=await F.json();R(Q.nodes);const M=As();let ie="gateway";if(X&&Q.nodes.some(re=>re.id===X)&&(ie=X),ie==="gateway"&&(M==="electron"||M==="capacitor")){const re=NN(),oe=Q.nodes.find(me=>me.id===re);oe&&(ie=oe.id)}q(ie),await K(ie,X===ie?H:null)}catch(F){S(F instanceof Error?F.message:"Failed to load nodes")}},[K]);_.useEffect(()=>{if(e){if(i){q("gateway"),K("gateway",s);return}Z(o,s)}},[e,i,o,s,Z,K]);const L=_.useCallback(async(X,H)=>{const F=H??U;try{w(!0),S(null);const Q=await Y(X,F);D(Q)}catch(Q){S(Q instanceof Error?Q.message:"Failed to browse")}finally{w(!1)}},[D,Y,U]),I=_.useCallback(X=>{q(X),K(X)},[K]),P=_.useCallback(()=>{a&&(n(a,U),r(!1))},[a,U,n,r]),$=_.useCallback(()=>{k.trim()&&(L(k.trim()),A(!1))},[k,L]),z=d.filter(X=>X.type==="dir");return f.jsx(Ld,{open:e,onOpenChange:r,children:f.jsxs(tf,{className:"max-w-md sm:max-w-lg p-0 gap-0 overflow-hidden",children:[f.jsx($u,{className:"px-4 pt-4 pb-2",children:f.jsxs(Iu,{className:"flex items-center gap-2 text-base",children:[f.jsx(Eu,{className:"h-4 w-4"}),"Open Workspace"]})}),!i&&T.length>1&&f.jsx("div",{className:"flex items-center gap-1 px-3 py-1.5 border-b bg-muted/20 overflow-x-auto",children:T.map(X=>f.jsxs("button",{onClick:()=>I(X.id),className:We("flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs whitespace-nowrap transition-colors",U===X.id?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground text-muted-foreground"),children:[f.jsx(met,{platform:X.platform}),f.jsx("span",{children:X.name})]},X.id))}),f.jsxs("div",{className:"flex items-center gap-1 px-3 py-1.5 border-b text-xs text-muted-foreground bg-muted/30",children:[g.filter(X=>X.name!=="Home").map(X=>f.jsxs("button",{onClick:()=>void L(X.path),className:"px-1.5 py-0.5 rounded hover:bg-accent hover:text-accent-foreground flex items-center gap-1",title:X.path,children:[f.jsx(kle,{className:"h-3 w-3"}),f.jsx("span",{children:X.name})]},X.path)),f.jsx("button",{onClick:()=>{const X=g.find(H=>H.name==="Home");X&&L(X.path)},className:"px-1.5 py-0.5 rounded hover:bg-accent hover:text-accent-foreground flex items-center gap-1",title:"Home directory",children:f.jsx(uH,{className:"h-3 w-3"})}),f.jsx("div",{className:"h-3 w-px bg-border mx-1"}),c&&f.jsx("button",{onClick:()=>void L(c),className:"px-1.5 py-0.5 rounded hover:bg-accent hover:text-accent-foreground flex items-center gap-1",title:"Go up",children:f.jsx(rH,{className:"h-3 w-3"})}),f.jsx("button",{onClick:()=>A(X=>!X),className:"ml-auto px-1.5 py-0.5 rounded hover:bg-accent hover:text-accent-foreground text-[10px]",children:O?"Browse":"Enter path"})]}),O&&f.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b bg-muted/20",children:[f.jsx("input",{type:"text",value:k,onChange:X=>E(X.target.value),onKeyDown:X=>{X.key==="Enter"&&$()},className:"flex-1 h-7 px-2 text-xs border rounded bg-background focus:outline-none focus:ring-1 focus:ring-ring",placeholder:"Enter absolute path...",autoFocus:!0}),f.jsx($e,{size:"sm",variant:"secondary",className:"h-7 text-xs",onClick:$,children:"Go"})]}),f.jsx("div",{className:"px-3 py-1.5 text-xs font-mono text-muted-foreground truncate border-b",children:a??"..."}),f.jsx("div",{className:"overflow-y-auto min-h-[120px] max-h-[50vh]",children:f.jsxs("div",{className:"p-2",children:[b&&f.jsxs("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[f.jsx(er,{className:"h-4 w-4 animate-spin mr-2"}),"Loading..."]}),C&&f.jsx("div",{className:"text-destructive text-xs py-4 text-center",children:C}),!b&&!C&&z.length===0&&f.jsx("div",{className:"text-muted-foreground text-xs py-4 text-center",children:"No subdirectories"}),!b&&!C&&z.map(X=>f.jsxs("button",{onClick:()=>void L(X.path),className:We("w-full flex items-center gap-2 px-2 py-1.5 rounded text-xs text-left","hover:bg-accent hover:text-accent-foreground transition-colors"),children:[f.jsx(aH,{className:"h-3.5 w-3.5 text-yellow-500 shrink-0"}),f.jsx("span",{className:"truncate",children:X.name}),f.jsx(Yl,{className:"h-3 w-3 ml-auto text-muted-foreground shrink-0"})]},X.path))]})}),f.jsxs(P0,{className:"px-4 py-3 border-t",children:[f.jsx($e,{variant:"ghost",size:"sm",onClick:()=>r(!1),children:"Cancel"}),f.jsxs($e,{size:"sm",onClick:P,disabled:!a,children:[f.jsx(Eu,{className:"h-3.5 w-3.5 mr-1.5"}),"Open this folder"]})]})]})})}function Rz(e){return{id:e.id??`evt-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,source:e.source,title:e.title,detail:e.detail,createdAt:e.createdAt??new Date().toISOString()}}const Np=hn(),fj={theme:"system",api_keys:{},stt_provider:"whisper",chat_provider:"jait",workspace_picker_path:null,workspace_picker_node_id:null,updated_at:new Date(0).toISOString()};async function dj(e){try{const r=await fetch(`${Np}/auth/settings`,{headers:{Authorization:`Bearer ${e}`}});return r.ok?await r.json():null}catch{return null}}function get(){const[e,r]=_.useState({user:null,token:null,settings:null,isLoading:!0}),n=_.useCallback(async p=>{try{const g=await fetch(`${Np}/auth/me`,{headers:{Authorization:`Bearer ${p}`}});if(!g.ok){P4(),r({user:null,token:null,settings:null,isLoading:!1});return}const y=await g.json(),b=await dj(p);r({user:y,token:p,settings:b??fj,isLoading:!1})}catch{P4(),r({user:null,token:null,settings:null,isLoading:!1})}},[]);_.useEffect(()=>{const p=Bp();if(p){n(p);return}r(g=>({...g,isLoading:!1}))},[n]);const i=_.useCallback(async p=>{M5e(p.access_token);const g=await dj(p.access_token);r({user:p.user,token:p.access_token,settings:g??fj,isLoading:!1})},[]),s=_.useCallback(async(p,g)=>{const y=await fetch(`${Np}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:p,password:g})});if(!y.ok){const w=await y.json().catch(()=>({detail:"Login failed"}));throw new Error(w.detail??"Login failed")}const b=await y.json();return await i(b),b},[i]),o=_.useCallback(async(p,g)=>{const y=await fetch(`${Np}/auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:p,password:g})});if(!y.ok){const w=await y.json().catch(()=>({detail:"Registration failed"}));throw new Error(w.detail??"Registration failed")}const b=await y.json();return await i(b),b},[i]),a=_.useCallback(()=>{P4(),r({user:null,token:null,settings:null,isLoading:!1})},[]),l=_.useCallback(async()=>{if(!e.token)return null;const p=await dj(e.token);return p?(r(g=>({...g,settings:p})),p):null},[e.token]),c=_.useCallback(async p=>{if(!e.token)throw new Error("Not authenticated");const g=await fetch(`${Np}/auth/settings`,{method:"PATCH",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},body:JSON.stringify(p)});if(!g.ok){const b=await g.json().catch(()=>({detail:"Failed to update settings"}));throw new Error(b.detail??"Failed to update settings")}const y=await g.json();return r(b=>({...b,settings:y})),y},[e.token]),u=_.useCallback(async()=>{if(!e.token)throw new Error("Not authenticated");const p=await fetch(`${Np}/auth/settings/archive`,{method:"DELETE",headers:{Authorization:`Bearer ${e.token}`}});if(!p.ok){const g=await p.json().catch(()=>({detail:"Failed to clear archive"}));throw new Error(g.detail??"Failed to clear archive")}return await p.json()},[e.token]),d=_.useCallback(async p=>{if(e.token)try{await fetch(`${Np}/auth/session/bind`,{method:"POST",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},body:JSON.stringify({session_id:p})})}catch{}},[e.token]);return{user:e.user,token:e.token,settings:e.settings??fj,isLoading:e.isLoading,isAuthenticated:!!e.user,login:s,register:o,logout:a,bindSession:d,refreshSettings:l,updateSettings:c,clearSessionArchive:u}}const _c=hn(),yet=120;function pj(e){return e?{Authorization:`Bearer ${e}`}:{}}function Lz(e){if(!(e!=null&&e.length))return;const r=e.flatMap(n=>n.type==="image"?[{name:n.name,mimeType:n.mimeType,data:n.data,preview:`data:${n.mimeType};base64,${n.data}`}]:[]);return r.length>0?r:void 0}function vet(e,r,n,i){const[s,o]=_.useState({messages:[],isLoading:!1,isLoadingHistory:!1,promptCount:0,remainingPrompts:null,error:null,hitMaxRounds:!1}),[a,l]=_.useState(null),[c,u]=_.useState([]),[d,p]=_.useState([]),[g,y]=_.useState([]),[b,w]=_.useState(0),[C,S]=_.useState(null),[k,E]=_.useState(null),O=_.useRef(!1),A=_.useRef(null),T=_.useRef(null),R=_.useRef(null),U=_.useRef(0),q=_.useRef(!1),[D,Y]=_.useState(0),K=_.useCallback(()=>{e&&(T.current=null,Y(ut=>ut+1))},[e]);_.useEffect(()=>{if(e===T.current)return;if(U.current+=1,T.current=e,A.current=null,R.current&&(R.current.abort(),R.current=null),!e){o({messages:[],isLoading:!1,isLoadingHistory:!1,promptCount:0,remainingPrompts:null,hitMaxRounds:!1,error:null}),u([]),p([]),y([]),S(null);return}let ut=!1;o(Ye=>({...Ye,messages:[],isLoading:!1,isLoadingHistory:!0,error:null})),S(null);const ye=new AbortController;return R.current=ye,(async()=>{var Ye,dt;try{const rt=await fetch(`${_c}/api/sessions/${e}/stream?limit=${yet}`,{signal:ye.signal,headers:pj(r)});if(rt.status===401){n==null||n(),o(he=>({...he,isLoadingHistory:!1}));return}if(!rt.ok||ut)return;const jt=(Ye=rt.body)==null?void 0:Ye.getReader();if(!jt)return;const yt=new TextDecoder;let ot="",Ie=null;const pt=(he,ve)=>{const Ue=he?[...he]:[],Se=Ue[Ue.length-1];return(Se==null?void 0:Se.type)==="text"?Ue[Ue.length-1]={type:"text",content:Se.content+ve}:Ue.push({type:"text",content:ve}),Ue},Lt=(he,ve)=>{const Ue=he?[...he]:[],Se=Ue[Ue.length-1];return(Se==null?void 0:Se.type)==="toolGroup"?Se.callIds.includes(ve)||(Ue[Ue.length-1]={type:"toolGroup",callIds:[...Se.callIds,ve]}):Ue.push({type:"toolGroup",callIds:[ve]}),Ue};for(;;){const{done:he,value:ve}=await jt.read();if(he)break;if(ut){jt.cancel();break}ot+=yt.decode(ve,{stream:!0});const Ue=ot.split(`
1126
+ */var eet=class{constructor(e,r,n,i={}){this._terminal=e,this._regex=r,this._handler=n,this._options=i}provideLinks(e,r){let n=ret.computeLink(e,this._regex,this._terminal,this._handler);r(this._addCallbacks(n))}_addCallbacks(e){return e.map(r=>(r.leave=this._options.leave,r.hover=(n,i)=>{if(this._options.hover){let{range:s}=r;this._options.hover(n,i,s)}},r))}};function tet(e){try{let r=new URL(e),n=r.password&&r.username?`${r.protocol}//${r.username}:${r.password}@${r.host}`:r.username?`${r.protocol}//${r.username}@${r.host}`:`${r.protocol}//${r.host}`;return e.toLocaleLowerCase().startsWith(n.toLocaleLowerCase())}catch{return!1}}var ret=class Kw{static computeLink(r,n,i,s){let o=new RegExp(n.source,(n.flags||"")+"g"),[a,l]=Kw._getWindowedLineStrings(r-1,i),c=a.join(""),u,d=[];for(;u=o.exec(c);){let p=u[0];if(!tet(p))continue;let[g,y]=Kw._mapStrIdx(i,l,0,u.index),[b,w]=Kw._mapStrIdx(i,g,y,p.length);if(g===-1||y===-1||b===-1||w===-1)continue;let C={start:{x:y+1,y:g+1},end:{x:w,y:b+1}};d.push({range:C,text:p,activate:s})}return d}static _getWindowedLineStrings(r,n){let i,s=r,o=r,a=0,l="",c=[];if(i=n.buffer.active.getLine(r)){let u=i.translateToString(!0);if(i.isWrapped&&u[0]!==" "){for(a=0;(i=n.buffer.active.getLine(--s))&&a<2048&&(l=i.translateToString(!0),a+=l.length,c.push(l),!(!i.isWrapped||l.indexOf(" ")!==-1)););c.reverse()}for(c.push(u),a=0;(i=n.buffer.active.getLine(++o))&&i.isWrapped&&a<2048&&(l=i.translateToString(!0),a+=l.length,c.push(l),l.indexOf(" ")===-1););}return[c,s]}static _mapStrIdx(r,n,i,s){let o=r.buffer.active,a=o.getNullCell(),l=i;for(;s;){let c=o.getLine(n);if(!c)return[-1,-1];for(let u=l;u<c.length;++u){c.getCell(u,a);let d=a.getChars();if(a.getWidth()&&(s-=d.length||1,u===c.length-1&&d==="")){let p=o.getLine(n+1);p&&p.isWrapped&&(p.getCell(0,a),a.getWidth()===2&&(s+=1))}if(s<0)return[n,u]}n++,l=0}return[n,l]}},net=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function iet(e,r){let n=window.open();if(n){try{n.opener=null}catch{}n.location.href=r}else console.warn("Opening link blocked as opener could not be cleared")}var set=class{constructor(e=iet,r={}){this._handler=e,this._options=r}activate(e){this._terminal=e;let r=this._options,n=r.urlRegex||net;this._linkProvider=this._terminal.registerLinkProvider(new eet(this._terminal,n,this._handler,r))}dispose(){var e;(e=this._linkProvider)==null||e.dispose()}};function oet(e,r,n){if(!n||n.type!=="terminal.output"||n.terminalId!==r)return!1;if(!n.streamId||typeof n.seq!="number")return!0;const i=e.get(n.streamId)??-1;return n.seq<=i?!1:(e.set(n.streamId,n.seq),!0)}const Xw=hn(),aet=Kb();function Zw(e){return e?{Authorization:`Bearer ${e}`}:{}}function cet(e){const[r,n]=_.useState([]),[i,s]=_.useState(null),o=_.useCallback(async()=>{try{const d=await(await fetch(`${Xw}/api/terminals`,{headers:Zw(e)})).json();return n(d.terminals),d.terminals}catch{return[]}},[e]),a=_.useRef(!1),l=_.useCallback(async(u,d)=>{if(a.current)return r[0]??{id:"",type:"terminal",state:"idle",sessionId:u,metadata:{}};a.current=!0;try{const g=await(await fetch(`${Xw}/api/terminals`,{method:"POST",headers:{"Content-Type":"application/json",...Zw(e)},body:JSON.stringify({sessionId:u,workspaceRoot:d})})).json();return n(y=>[...y,g]),s(g.id),g}finally{a.current=!1}},[e,r]),c=_.useCallback(async u=>{await fetch(`${Xw}/api/terminals/${u}`,{method:"DELETE",headers:Zw(e)}),n(d=>d.filter(p=>p.id!==u)),s(d=>d===u?null:d)},[e]);return _.useEffect(()=>{o()},[o]),{terminals:r,activeTerminalId:i,setActiveTerminalId:s,createTerminal:l,killTerminal:c,refresh:o}}function uet({terminalId:e,className:r,token:n}){const i=_.useRef(null),s=_.useRef(null),o=_.useRef(null),a=_.useRef(null);return _.useEffect(()=>{if(!i.current)return;const l=new XQe({cursorBlink:!0,fontSize:13,fontFamily:"'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace",theme:{background:"#0a0a0a",foreground:"#e4e4e7",cursor:"#e4e4e7",selectionBackground:"#27272a"},allowProposedApi:!0}),c=new QQe,u=new set;l.loadAddon(c),l.loadAddon(u),l.open(i.current),requestAnimationFrame(()=>{c.fit(),l.focus()}),s.current=l,o.current=c;let d=null,p=null,g=!1,y=1e3;const b=3e4,w=new Map;function C(){if(g)return;const k=n?`?token=${encodeURIComponent(n)}`:"";d=new WebSocket(`${aet}${k}`),a.current=d,d.onopen=()=>{y=1e3,d.send(JSON.stringify({type:"terminal.subscribe",terminalId:e}))},d.onmessage=E=>{try{const O=JSON.parse(E.data);oet(w,e,O.payload)&&l.write(O.payload.data??"")}catch{}},d.onclose=()=>{g||(p=setTimeout(C,y),y=Math.min(y*1.5,b))},d.onerror=()=>{}}C(),l.onData(k=>{d&&d.readyState===WebSocket.OPEN&&d.send(JSON.stringify({type:"terminal.input",terminalId:e,data:k}))}),l.onResize(({cols:k,rows:E})=>{d&&d.readyState===WebSocket.OPEN&&d.send(JSON.stringify({type:"terminal.resize",terminalId:e,cols:k,rows:E})),fetch(`${Xw}/api/terminals/${e}/resize`,{method:"POST",headers:{"Content-Type":"application/json",...Zw(n)},body:JSON.stringify({cols:k,rows:E})})});const S=new ResizeObserver(()=>{requestAnimationFrame(()=>c.fit())});return S.observe(i.current),()=>{g=!0,p&&clearTimeout(p),S.disconnect(),d&&d.close(),l.dispose(),s.current=null,o.current=null,a.current=null}},[e,n]),f.jsx("div",{className:`w-full overflow-hidden ${r??""}`,onClick:()=>{var l;return(l=s.current)==null?void 0:l.focus()},children:f.jsx("div",{ref:i,className:"h-full w-full"})})}function het({terminals:e,activeTerminalId:r,onSelect:n,onCreate:i,onKill:s}){return f.jsxs("div",{className:"flex items-center gap-1 px-2 h-8 border-b bg-muted/50 shrink-0 overflow-x-auto",children:[e.map(o=>f.jsxs("div",{role:"tab",tabIndex:0,onClick:()=>n(o.id),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&n(o.id)},className:`group flex items-center gap-1.5 px-2.5 py-1 text-xs rounded-sm transition-colors cursor-pointer ${r===o.id?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/50"}`,children:[f.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${o.state==="running"?"bg-green-500":"bg-zinc-500"}`}),f.jsx("span",{className:"truncate max-w-[100px]",children:o.id.replace(/^term-/,"").slice(0,8)}),f.jsx("button",{onClick:a=>{a.stopPropagation(),s(o.id)},className:"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-destructive ml-0.5",children:"×"})]},o.id)),f.jsx("button",{onClick:i,className:"px-2 py-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:"+"})]})}function fet(e){const r=e==null?void 0:e.trim();return r?/^https?:\/\//i.test(r)?r:r.startsWith("/")?`${hn()}${r}`:r:null}async function det(e,r,n){const i=await fetch(`${hn()}/api/workspace/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,content:r,surfaceId:n})});if(!i.ok){const s=await i.json().catch(()=>({}));throw new Error(s.message||`Failed to save file: ${i.statusText}`)}}function pet({detachedTabId:e}){const[r,n]=_.useState(()=>f$(e)),[i,s]=_.useState((r==null?void 0:r.tab.content)??""),[o,a]=_.useState(!1),[l,c]=_.useState(null);_.useEffect(()=>{const g=()=>n(f$(e));return g(),window.addEventListener("storage",g),()=>window.removeEventListener("storage",g)},[e]),_.useEffect(()=>{r&&(document.title=r.title||r.tab.label||"Jait")},[r]),_.useEffect(()=>{r&&document.documentElement.classList.toggle("dark",r.theme==="dark")},[r]),_.useEffect(()=>{s((r==null?void 0:r.tab.content)??"")},[r==null?void 0:r.tab.content]);const u=_.useMemo(()=>fet(r==null?void 0:r.tab.previewSrc),[r==null?void 0:r.tab.previewSrc]),d=_.useCallback(()=>{hDe(e),window.close()},[e]),p=_.useCallback(async()=>{if(!(!r||r.tab.type!=="file")){a(!0),c(null);try{await det(r.tab.path,i,r.surfaceId??null)}catch(g){c(g instanceof Error?g.message:"Failed to save file")}finally{a(!1)}}},[i,r]);return r?f.jsxs("div",{className:"flex h-screen flex-col bg-muted/10 text-foreground",children:[f.jsxs("div",{className:"flex h-[35px] items-center gap-2 border-b bg-muted/30 px-3 shrink-0",children:[r.tab.type==="architecture"?f.jsx(eS,{className:"h-4 w-4 shrink-0"}):r.tab.type==="preview"?f.jsx(di,{className:"h-4 w-4 shrink-0"}):null,f.jsx("span",{className:"truncate text-sm font-medium",children:r.title}),f.jsxs("div",{className:"ml-auto flex items-center gap-1.5",children:[r.tab.type==="file"&&f.jsxs($e,{type:"button",variant:"ghost",size:"sm",className:"h-8 px-2 text-[11px]",onClick:()=>{p()},disabled:o,children:[o?f.jsx(er,{className:"mr-1 h-3 w-3 animate-spin"}):f.jsx(HT,{className:"mr-1 h-3 w-3"}),"Save"]}),r.tab.type==="preview"&&u&&f.jsx("a",{href:u,target:"_blank",rel:"noreferrer",className:"inline-flex",children:f.jsxs($e,{type:"button",variant:"ghost",size:"sm",className:"h-8 px-2 text-[11px]",children:[f.jsx(Tv,{className:"mr-1 h-3 w-3"}),"Open"]})}),f.jsx($e,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8",onClick:d,children:f.jsx(Xn,{className:"h-4 w-4"})})]})]}),l?f.jsx("div",{className:"border-b px-3 py-2 text-xs text-destructive",children:l}):null,f.jsx("div",{className:"min-h-0 flex-1 bg-background",children:r.tab.type==="diff"?f.jsx(h_,{className:"h-full",editorClassName:"h-full",original:r.tab.originalContent??"",modified:r.tab.modifiedContent??"",language:r.tab.language??"plaintext",renderSideBySide:!0,options:{minimap:{enabled:!1}}}):r.tab.type==="preview"?u?f.jsx("iframe",{src:u,title:r.title,className:"h-full w-full bg-white",sandbox:"allow-forms allow-modals allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-downloads"}):f.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"Preview unavailable."}):r.tab.type==="architecture"?f.jsx(aE,{diagram:r.architectureDiagram??null,isGenerating:r.architectureGenerating,theme:r.theme}):r.tab.originalContent!=null?f.jsx(iee,{path:r.tab.path,language:r.tab.language??"plaintext",value:i,originalContent:r.tab.originalContent,theme:r.theme==="dark"?"vs-dark":"vs",onChange:g=>s(g??"")}):f.jsx(S5,{height:"100%",theme:r.theme==="dark"?"vs-dark":"vs",path:r.tab.path,language:r.tab.language??"plaintext",value:i,onChange:g=>s(g??""),options:{minimap:{enabled:!1},fontSize:13,automaticLayout:!0}})})]}):f.jsx("div",{className:"flex h-screen items-center justify-center bg-background text-sm text-muted-foreground",children:"Detached tab not found."})}const hj=hn();function met({platform:e}){switch(e){case"windows":case"macos":case"linux":return f.jsx(ka,{className:"h-3.5 w-3.5"});case"android":case"ios":return f.jsx(F3,{className:"h-3.5 w-3.5"});default:return f.jsx(di,{className:"h-3.5 w-3.5"})}}function Mz({open:e,onOpenChange:r,onSelect:n,gatewayOnly:i,initialPath:s,initialNodeId:o}){const[a,l]=_.useState(null),[c,u]=_.useState(null),[d,p]=_.useState([]),[g,y]=_.useState([]),[b,w]=_.useState(!1),[C,S]=_.useState(null),[k,E]=_.useState(""),[O,A]=_.useState(!1),[T,R]=_.useState([]),[U,q]=_.useState("gateway"),D=_.useCallback(X=>{l(X.path),u(X.parent),p(X.entries),E(X.path)},[]),Y=_.useCallback(async(X,H)=>{const F=`${hj}/api/filesystem/browse?path=${encodeURIComponent(X)}&nodeId=${encodeURIComponent(H)}`,Q=await fetch(F);if(!Q.ok){const M=await Q.json().catch(()=>({message:"Failed to browse"}));throw new Error(M.message??"Failed to browse")}return await Q.json()},[]),K=_.useCallback(async(X,H)=>{try{w(!0),S(null),l(null),u(null),p([]);const F=`${hj}/api/filesystem/roots?nodeId=${encodeURIComponent(X)}`,Q=await fetch(F);if(!Q.ok)throw new Error("Failed to load roots");const M=await Q.json();if(y(M.roots),H)try{const re=await Y(H,X);D(re);return}catch{}const ie=M.roots.find(re=>re.name==="Home")??M.roots[0];if(ie){const re=await Y(ie.path,X);D(re)}}catch(F){S(F instanceof Error?F.message:"Failed to load")}finally{w(!1)}},[D,Y]),Z=_.useCallback(async(X,H)=>{try{const F=await fetch(`${hj}/api/filesystem/nodes`);if(!F.ok)throw new Error("Failed to load nodes");const Q=await F.json();R(Q.nodes);const M=As();let ie="gateway";if(X&&Q.nodes.some(re=>re.id===X)&&(ie=X),ie==="gateway"&&(M==="electron"||M==="capacitor")){const re=NN(),oe=Q.nodes.find(me=>me.id===re);oe&&(ie=oe.id)}q(ie),await K(ie,X===ie?H:null)}catch(F){S(F instanceof Error?F.message:"Failed to load nodes")}},[K]);_.useEffect(()=>{if(e){if(i){q("gateway"),K("gateway",s);return}Z(o,s)}},[e,i,o,s,Z,K]);const L=_.useCallback(async(X,H)=>{const F=H??U;try{w(!0),S(null);const Q=await Y(X,F);D(Q)}catch(Q){S(Q instanceof Error?Q.message:"Failed to browse")}finally{w(!1)}},[D,Y,U]),I=_.useCallback(X=>{q(X),K(X)},[K]),P=_.useCallback(()=>{a&&(n(a,U),r(!1))},[a,U,n,r]),$=_.useCallback(()=>{k.trim()&&(L(k.trim()),A(!1))},[k,L]),z=d.filter(X=>X.type==="dir");return f.jsx(Ld,{open:e,onOpenChange:r,children:f.jsxs(tf,{className:"max-w-md sm:max-w-lg p-0 gap-0 overflow-hidden",children:[f.jsx($u,{className:"px-4 pt-4 pb-2",children:f.jsxs(Iu,{className:"flex items-center gap-2 text-base",children:[f.jsx(Eu,{className:"h-4 w-4"}),"Open Workspace"]})}),!i&&T.length>1&&f.jsx("div",{className:"flex items-center gap-1 px-3 py-1.5 border-b bg-muted/20 overflow-x-auto",children:T.map(X=>f.jsxs("button",{onClick:()=>I(X.id),className:We("flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs whitespace-nowrap transition-colors",U===X.id?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground text-muted-foreground"),children:[f.jsx(met,{platform:X.platform}),f.jsx("span",{children:X.name})]},X.id))}),f.jsxs("div",{className:"flex items-center gap-1 px-3 py-1.5 border-b text-xs text-muted-foreground bg-muted/30",children:[g.filter(X=>X.name!=="Home").map(X=>f.jsxs("button",{onClick:()=>void L(X.path),className:"px-1.5 py-0.5 rounded hover:bg-accent hover:text-accent-foreground flex items-center gap-1",title:X.path,children:[f.jsx(kle,{className:"h-3 w-3"}),f.jsx("span",{children:X.name})]},X.path)),f.jsx("button",{onClick:()=>{const X=g.find(H=>H.name==="Home");X&&L(X.path)},className:"px-1.5 py-0.5 rounded hover:bg-accent hover:text-accent-foreground flex items-center gap-1",title:"Home directory",children:f.jsx(uH,{className:"h-3 w-3"})}),f.jsx("div",{className:"h-3 w-px bg-border mx-1"}),c&&f.jsx("button",{onClick:()=>void L(c),className:"px-1.5 py-0.5 rounded hover:bg-accent hover:text-accent-foreground flex items-center gap-1",title:"Go up",children:f.jsx(rH,{className:"h-3 w-3"})}),f.jsx("button",{onClick:()=>A(X=>!X),className:"ml-auto px-1.5 py-0.5 rounded hover:bg-accent hover:text-accent-foreground text-[10px]",children:O?"Browse":"Enter path"})]}),O&&f.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b bg-muted/20",children:[f.jsx("input",{type:"text",value:k,onChange:X=>E(X.target.value),onKeyDown:X=>{X.key==="Enter"&&$()},className:"flex-1 h-7 px-2 text-xs border rounded bg-background focus:outline-none focus:ring-1 focus:ring-ring",placeholder:"Enter absolute path...",autoFocus:!0}),f.jsx($e,{size:"sm",variant:"secondary",className:"h-7 text-xs",onClick:$,children:"Go"})]}),f.jsx("div",{className:"px-3 py-1.5 text-xs font-mono text-muted-foreground truncate border-b",children:a??"..."}),f.jsx("div",{className:"overflow-y-auto min-h-[120px] max-h-[50vh]",children:f.jsxs("div",{className:"p-2",children:[b&&f.jsxs("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[f.jsx(er,{className:"h-4 w-4 animate-spin mr-2"}),"Loading..."]}),C&&f.jsx("div",{className:"text-destructive text-xs py-4 text-center",children:C}),!b&&!C&&z.length===0&&f.jsx("div",{className:"text-muted-foreground text-xs py-4 text-center",children:"No subdirectories"}),!b&&!C&&z.map(X=>f.jsxs("button",{onClick:()=>void L(X.path),className:We("w-full flex items-center gap-2 px-2 py-1.5 rounded text-xs text-left","hover:bg-accent hover:text-accent-foreground transition-colors"),children:[f.jsx(aH,{className:"h-3.5 w-3.5 text-yellow-500 shrink-0"}),f.jsx("span",{className:"truncate",children:X.name}),f.jsx(Yl,{className:"h-3 w-3 ml-auto text-muted-foreground shrink-0"})]},X.path))]})}),f.jsxs(P0,{className:"px-4 py-3 border-t",children:[f.jsx($e,{variant:"ghost",size:"sm",onClick:()=>r(!1),children:"Cancel"}),f.jsxs($e,{size:"sm",onClick:P,disabled:!a,children:[f.jsx(Eu,{className:"h-3.5 w-3.5 mr-1.5"}),"Open this folder"]})]})]})})}function Rz(e){return{id:e.id??`evt-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,source:e.source,title:e.title,detail:e.detail,createdAt:e.createdAt??new Date().toISOString()}}const Np=hn(),fj={theme:"system",api_keys:{},stt_provider:"whisper",chat_provider:"jait",workspace_picker_path:null,workspace_picker_node_id:null,updated_at:new Date(0).toISOString()};async function dj(e){try{const r=await fetch(`${Np}/auth/settings`,{headers:{Authorization:`Bearer ${e}`}});return r.ok?await r.json():null}catch{return null}}function get(){const[e,r]=_.useState({user:null,token:null,settings:null,isLoading:!0}),n=_.useCallback(async p=>{try{const g=await fetch(`${Np}/auth/me`,{headers:{Authorization:`Bearer ${p}`}});if(!g.ok){P4(),r({user:null,token:null,settings:null,isLoading:!1});return}const y=await g.json(),b=await dj(p);r({user:y,token:p,settings:b??fj,isLoading:!1})}catch{P4(),r({user:null,token:null,settings:null,isLoading:!1})}},[]);_.useEffect(()=>{const p=Bp();if(p){n(p);return}r(g=>({...g,isLoading:!1}))},[n]);const i=_.useCallback(async p=>{M5e(p.access_token);const g=await dj(p.access_token);r({user:p.user,token:p.access_token,settings:g??fj,isLoading:!1})},[]),s=_.useCallback(async(p,g)=>{const y=await fetch(`${Np}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:p,password:g})});if(!y.ok){const w=await y.json().catch(()=>({detail:"Login failed"}));throw new Error(w.detail??"Login failed")}const b=await y.json();return await i(b),b},[i]),o=_.useCallback(async(p,g)=>{const y=await fetch(`${Np}/auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:p,password:g})});if(!y.ok){const w=await y.json().catch(()=>({detail:"Registration failed"}));throw new Error(w.detail??"Registration failed")}const b=await y.json();return await i(b),b},[i]),a=_.useCallback(()=>{P4(),r({user:null,token:null,settings:null,isLoading:!1})},[]),l=_.useCallback(async()=>{if(!e.token)return null;const p=await dj(e.token);return p?(r(g=>({...g,settings:p})),p):null},[e.token]),c=_.useCallback(async p=>{if(!e.token)throw new Error("Not authenticated");const g=await fetch(`${Np}/auth/settings`,{method:"PATCH",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},body:JSON.stringify(p)});if(!g.ok){const b=await g.json().catch(()=>({detail:"Failed to update settings"}));throw new Error(b.detail??"Failed to update settings")}const y=await g.json();return r(b=>({...b,settings:y})),y},[e.token]),u=_.useCallback(async()=>{if(!e.token)throw new Error("Not authenticated");const p=await fetch(`${Np}/auth/settings/archive`,{method:"DELETE",headers:{Authorization:`Bearer ${e.token}`}});if(!p.ok){const g=await p.json().catch(()=>({detail:"Failed to clear archive"}));throw new Error(g.detail??"Failed to clear archive")}return await p.json()},[e.token]),d=_.useCallback(async p=>{if(e.token)try{await fetch(`${Np}/auth/session/bind`,{method:"POST",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},body:JSON.stringify({session_id:p})})}catch{}},[e.token]);return{user:e.user,token:e.token,settings:e.settings??fj,isLoading:e.isLoading,isAuthenticated:!!e.user,login:s,register:o,logout:a,bindSession:d,refreshSettings:l,updateSettings:c,clearSessionArchive:u}}const _c=hn(),yet=120;function pj(e){return e?{Authorization:`Bearer ${e}`}:{}}function Lz(e){if(!(e!=null&&e.length))return;const r=e.flatMap(n=>n.type==="image"?[{name:n.name,mimeType:n.mimeType,data:n.data,preview:`data:${n.mimeType};base64,${n.data}`}]:[]);return r.length>0?r:void 0}function vet(e,r,n,i){const[s,o]=_.useState({messages:[],isLoading:!1,isLoadingHistory:!1,promptCount:0,remainingPrompts:null,error:null,hitMaxRounds:!1}),[a,l]=_.useState(null),[c,u]=_.useState([]),[d,p]=_.useState([]),[g,y]=_.useState([]),[b,w]=_.useState(0),[C,S]=_.useState(null),[k,E]=_.useState(null),O=_.useRef(!1),A=_.useRef(null),T=_.useRef(null),R=_.useRef(null),U=_.useRef(0),q=_.useRef(!1),[D,Y]=_.useState(0),K=_.useCallback(()=>{e&&(T.current=null,Y(ut=>ut+1))},[e]);_.useEffect(()=>{if(e===T.current)return;if(U.current+=1,T.current=e,A.current=null,R.current&&(R.current.abort(),R.current=null),!e){o({messages:[],isLoading:!1,isLoadingHistory:!1,promptCount:0,remainingPrompts:null,hitMaxRounds:!1,error:null}),u([]),p([]),y([]),S(null);return}let ut=!1;o(Ye=>({...Ye,messages:[],isLoading:!1,isLoadingHistory:!0,error:null})),S(null);const ye=new AbortController;return R.current=ye,(async()=>{var Ye,dt;try{const rt=await fetch(`${_c}/api/sessions/${e}/stream?limit=${yet}`,{signal:ye.signal,headers:pj(r)});if(rt.status===401){n==null||n(),o(he=>({...he,isLoadingHistory:!1}));return}if(!rt.ok||ut)return;const jt=(Ye=rt.body)==null?void 0:Ye.getReader();if(!jt)return;const yt=new TextDecoder;let ot="",Ie=null;const pt=(he,ve)=>{const Ue=he?[...he]:[],Se=Ue[Ue.length-1];return(Se==null?void 0:Se.type)==="text"?Ue[Ue.length-1]={type:"text",content:Se.content+ve}:Ue.push({type:"text",content:ve}),Ue},Lt=(he,ve)=>{const Ue=he?[...he]:[],Se=Ue[Ue.length-1];return(Se==null?void 0:Se.type)==="toolGroup"?Se.callIds.includes(ve)||(Ue[Ue.length-1]={type:"toolGroup",callIds:[...Se.callIds,ve]}):Ue.push({type:"toolGroup",callIds:[ve]}),Ue};for(;;){const{done:he,value:ve}=await jt.read();if(he)break;if(ut){jt.cancel();break}ot+=yt.decode(ve,{stream:!0});const Ue=ot.split(`
1127
1127
  `);ot=Ue.pop()||"";for(const Se of Ue)if(Se.startsWith("data: "))try{const Te=JSON.parse(Se.slice(6));if(u6(String(Te.type??"unknown"),Se.slice(6)),Te.type==="snapshot"){const Ve=Te.messages,Ae=Te.streaming,le=Ve.map(Qe=>{const et={id:Qe.id,role:Qe.role,content:Qe.content};if(Qe.role==="user"&&Qe.segments&&Qe.segments.length>0)et.displaySegments=F7(Qe.segments),et.displayContent=Gb(et.displaySegments),et.referencedFiles=h0(et.displaySegments),et.attachments=Lz(et.displaySegments);else if(Qe.role==="user"){const wt=zq(Qe.content);wt.files.length>0&&(et.displayContent=wt.text,et.referencedFiles=wt.files,et.displaySegments=wt.displaySegments,et.attachments=Lz(et.displaySegments))}else Qe.segments&&Qe.segments.length>0&&(et.segments=Qe.segments);return Qe.toolCalls&&Qe.toolCalls.length>0&&(et.toolCalls=Qe.toolCalls.map(wt=>{let mt=wt.status??(wt.ok?"success":"error");return(mt==="running"||mt==="pending")&&!Ae&&(mt="error"),{callId:wt.callId,tool:wt.tool,args:wt.args??{},status:mt,result:mt==="running"?void 0:{ok:!!wt.ok,message:wt.message??"Cancelled",data:wt.data??(wt.output!=null?{output:wt.output}:void 0)},streamingOutput:wt.streamingOutput,startedAt:wt.startedAt??0,completedAt:wt.completedAt??0}})),et}),nt=le[le.length-1];(nt==null?void 0:nt.role)==="assistant"&&(Ie=nt.id),o(Qe=>({...Qe,messages:le,isLoadingHistory:!1,isLoading:Ae}))}else if(Te.type==="token"&&Ie){const Ve=Te.content;o(Ae=>({...Ae,messages:Ae.messages.map(le=>le.id===Ie?{...le,content:le.content+Ve,segments:pt(le.segments,Ve)}:le)}))}else if(Te.type==="tool_call_delta"&&Ie){const Ve=Te.call_id,Ae=Te.name_delta||"",le=Te.args_delta||"";o(nt=>{var mt;const Qe=nt.messages.find(Tt=>Tt.id===Ie);if((mt=Qe==null?void 0:Qe.toolCalls)==null?void 0:mt.find(Tt=>Tt.callId===Ve))return{...nt,messages:nt.messages.map(Tt=>{var Mt;return Tt.id===Ie?{...Tt,toolCalls:(Mt=Tt.toolCalls)==null?void 0:Mt.map(Wr=>Wr.callId===Ve?{...Wr,tool:Wr.tool+Ae,streamingArgs:(Wr.streamingArgs??"")+le}:Wr)}:Tt})};const wt={callId:Ve,tool:Ae,args:{},status:"pending",streamingArgs:le,startedAt:Date.now()};return{...nt,messages:nt.messages.map(Tt=>Tt.id===Ie?{...Tt,toolCalls:[...Tt.toolCalls??[],wt],segments:Lt(Tt.segments,Ve)}:Tt)}})}else if(Te.type==="tool_start"&&Ie){const Ve=Te.call_id;o(Ae=>{var et;const le=Ae.messages.find(wt=>wt.id===Ie);if((et=le==null?void 0:le.toolCalls)==null?void 0:et.find(wt=>wt.callId===Ve))return{...Ae,messages:Ae.messages.map(wt=>{var mt;return wt.id===Ie?{...wt,toolCalls:(mt=wt.toolCalls)==null?void 0:mt.map(Tt=>Tt.callId===Ve?{...Tt,tool:Te.tool,args:Te.args??{},status:"running",streamingArgs:void 0}:Tt)}:wt})};const Qe={callId:Ve,tool:Te.tool,args:Te.args??{},status:"running",startedAt:Date.now()};return{...Ae,messages:Ae.messages.map(wt=>wt.id===Ie?{...wt,toolCalls:[...wt.toolCalls??[],Qe],segments:Lt(wt.segments,Ve)}:wt)}})}else if(Te.type==="tool_output"&&Ie)o(Ve=>({...Ve,messages:Ve.messages.map(Ae=>{var le;return Ae.id!==Ie?Ae:{...Ae,toolCalls:(le=Ae.toolCalls)==null?void 0:le.map(nt=>nt.callId===Te.call_id?{...nt,streamingOutput:(nt.streamingOutput??"")+Te.content}:nt)}})}));else if(Te.type==="tool_result"&&Ie){if(o(Ve=>({...Ve,messages:Ve.messages.map(Ae=>{var le;return Ae.id!==Ie?Ae:{...Ae,toolCalls:(le=Ae.toolCalls)==null?void 0:le.map(nt=>nt.callId===Te.call_id?{...nt,status:Te.ok?"success":"error",result:{ok:Te.ok,message:Te.message,data:Te.data},completedAt:Date.now()}:nt)}})})),Te.ok){const Ve=s.messages.find(le=>le.id===Ie),Ae=(dt=Ve==null?void 0:Ve.toolCalls)==null?void 0:dt.find(le=>le.callId===Te.call_id);if(Ae){const le=Ae.tool.replace("_",".");if(le==="file.write"||le==="file.patch"||le==="edit"){const nt=Te.data&&typeof Te.data=="object"?Te.data:void 0,Qe=fE(le,Ae.args??{},nt,Te.message)??"";if(Qe){const et=Qe.split("/").pop()??Qe;p(wt=>wt.some(mt=>mt.path===Qe)?wt:[...wt,{path:Qe,name:et,state:"undecided"}])}}}}}else if(Te.type==="todo_list"){const Ve=Te.items;u(Ve)}else if(Te.type==="context_usage")S(Te);else if(Te.type==="session_info")E({provider:Te.provider,workspacePath:Te.workspacePath,isRemote:Te.isRemote,remoteNode:Te.remoteNode});else if(Te.type==="file_changed"){const Ve=Te.path,Ae=Te.name;p(le=>le.find(Qe=>Qe.path===Ve)?le:[...le,{path:Ve,name:Ae,state:"undecided"}])}else Te.type==="done"?o(Ve=>(Ve.isLoading&&w(Ae=>Ae+1),{...Ve,isLoading:!1,promptCount:Te.prompt_count??Ve.promptCount,remainingPrompts:Te.remaining_prompts??Ve.remainingPrompts,messages:Ve.messages.map(Ae=>{var le;return(le=Ae.toolCalls)!=null&&le.some(nt=>nt.status==="running")?{...Ae,toolCalls:Ae.toolCalls.map(nt=>nt.status==="running"?{...nt,status:"error",result:{ok:!1,message:"Cancelled"},completedAt:Date.now()}:nt)}:Ae})})):Te.type==="error"&&o(Ve=>({...Ve,isLoading:!1,error:Te.message}))}catch(Te){if(!(Te instanceof SyntaxError))throw Te}}}catch(rt){if(rt instanceof Error&&rt.name==="AbortError")return;ut||o(jt=>({...jt,isLoadingHistory:!1}))}})(),()=>{ut=!0,ye.abort(),T.current=null}},[r,n,e,D]);const Z=_.useCallback(()=>{!e||s.isLoading||K()},[K,e,s.isLoading]),L=_.useCallback(async(ut,ye={})=>{var Te,Ve,Ae,le,nt,Qe;const{token:Ye,sessionId:dt,onLoginRequired:rt}=ye,jt=Ye??r,yt=rt??n,ot=dt??e,Ie=`assistant-${Date.now()}`,pt={id:`user-${Date.now()}`,role:"user",content:ut,...ye.displayContent?{displayContent:ye.displayContent}:{},...(Te=ye.referencedFiles)!=null&&Te.length?{referencedFiles:ye.referencedFiles}:{},...(Ve=ye.displaySegments)!=null&&Ve.length?{displaySegments:ye.displaySegments}:{},...(Ae=ye.attachments)!=null&&Ae.length?{attachments:ye.attachments}:{}};o(et=>({...et,messages:[...et.messages,pt,{id:Ie,role:"assistant",content:""}],isLoading:!0,error:null,hitMaxRounds:!1})),u([]);const Lt=new AbortController;A.current=Lt;const he=++U.current,ve=()=>T.current!==ot||U.current!==he;let Ue=null,Se=null;try{const et={"Content-Type":"application/json"};jt&&(et.Authorization=`Bearer ${jt}`);const wt={content:ut,sessionId:ot,...ye.mode&&ye.mode!=="agent"?{mode:ye.mode}:{},...ye.provider&&ye.provider!=="jait"?{provider:ye.provider}:{},...ye.provider&&ye.provider!=="jait"&&ye.runtimeMode?{runtimeMode:ye.runtimeMode}:{},...ye.model?{model:ye.model}:{},...(le=ye.displaySegments)!=null&&le.length?{displaySegments:ye.displaySegments}:{},...(nt=ye.attachments)!=null&&nt.length?{attachments:ye.attachments.map(br=>({name:br.name,mimeType:br.mimeType,data:br.data}))}:{}};u6("request",JSON.stringify(wt));const mt=await fetch(`${_c}/api/chat`,{method:"POST",headers:et,body:JSON.stringify(wt),signal:Lt.signal});if(mt.status===401){const br=await mt.json();if(br.detail==="login_required"||br.detail==="limit_reached")return o(wr=>({...wr,isLoading:!1,error:br.detail,messages:wr.messages.filter(Er=>ye.queued?Er.id!==Ie&&Er.id!==pt.id:!(Er.id===Ie&&!Er.content&&!Er.thinking&&(!Er.toolCalls||Er.toolCalls.length===0)))})),br.detail==="login_required"&&(yt==null||yt()),"retry"}if(!mt.ok)throw new Error(`HTTP ${mt.status}`);const Tt=(Qe=mt.body)==null?void 0:Qe.getReader();if(!Tt)throw new Error("No response body");const Mt=new TextDecoder;let Wr="",vn="",fr=null,Rt;const Ut=[],qt=[];let an="";const Rr=br=>{const wr=qt[qt.length-1];(wr==null?void 0:wr.type)==="text"?wr.content+=br:qt.push({type:"text",content:br})},Bt=br=>{const wr=qt[qt.length-1];(wr==null?void 0:wr.type)==="toolGroup"?wr.callIds.includes(br)||wr.callIds.push(br):qt.push({type:"toolGroup",callIds:[br]})},Cn=()=>{if(Se!==null&&(window.cancelAnimationFrame(Se),Se=null),ve()||!Ue)return;const br=Ue;Ue=null,o(wr=>({...wr,messages:wr.messages.map(Er=>Er.id===Ie?{...Er,...br}:Er)}))},Bn=br=>{ve()||(Ue={...Ue??{},...br},Se===null&&(Se=window.requestAnimationFrame(()=>{Se=null,Cn()})))};for(;;){const{done:br,value:wr}=await Tt.read();if(br)break;an+=Mt.decode(wr,{stream:!0});const Er=an.split(`
1128
1128
  `);an=Er.pop()||"";for(const _n of Er)if(_n.startsWith("data: "))try{const de=JSON.parse(_n.slice(6));if(u6(String(de.type??"unknown"),_n.slice(6)),de.type==="thinking")fr||(fr=Date.now()),vn+=de.content,Bn({thinking:vn});else if(de.type==="token")fr&&!Rt&&(Rt=Math.round((Date.now()-fr)/1e3)),Wr+=de.content,Rr(de.content),Bn({content:Wr,thinkingDuration:Rt,segments:[...qt]});else if(de.type==="tool_call_delta"){const Ke=de.call_id,St=de.name_delta||"",vt=de.args_delta||"",Ot=Ut.findIndex(Sr=>Sr.callId===Ke);Ot!==-1?Ut[Ot]={...Ut[Ot],tool:Ut[Ot].tool+St,streamingArgs:(Ut[Ot].streamingArgs??"")+vt}:(Ut.push({callId:Ke,tool:St,args:{},status:"pending",streamingArgs:vt,startedAt:Date.now()}),Bt(Ke)),Bn({toolCalls:[...Ut],segments:[...qt]})}else if(de.type==="tool_start"){const Ke=de.call_id,St=Ut.findIndex(vt=>vt.callId===Ke);St!==-1?Ut[St]={...Ut[St],tool:de.tool,args:de.args??{},status:"running",streamingArgs:void 0}:(Ut.push({callId:Ke,tool:de.tool,args:de.args??{},status:"running",startedAt:Date.now()}),Bt(Ke)),Bn({toolCalls:[...Ut],segments:[...qt]})}else if(de.type==="tool_output"){const Ke=Ut.findIndex(St=>St.callId===de.call_id);Ke!==-1&&(Ut[Ke]={...Ut[Ke],streamingOutput:(Ut[Ke].streamingOutput??"")+de.content},Bn({toolCalls:[...Ut]}))}else if(de.type==="tool_result"){const Ke=Ut.findIndex(St=>St.callId===de.call_id);if(Ke!==-1&&(Ut[Ke]={...Ut[Ke],status:de.ok?"success":"error",result:{ok:de.ok,message:de.message,data:de.data},completedAt:Date.now()},Bn({toolCalls:[...Ut]}),de.ok)){const St=Ut[Ke],vt=St.tool.replace("_",".");if(vt==="file.write"||vt==="file.patch"||vt==="edit"){const Ot=de.data&&typeof de.data=="object"?de.data:void 0,Sr=fE(vt,St.args??{},Ot,de.message)??"";if(Sr){const dr=Sr.split("/").pop()??Sr;p(Yr=>Yr.some(Mn=>Mn.path===Sr)?Yr:[...Yr,{path:Sr,name:dr,state:"undecided"}])}}}}else if(de.type==="plan_complete"){const Ke={plan_id:de.plan_id,summary:de.summary,actions:de.actions??[]};l(Ke)}else if(de.type==="mode_notice"){const Ke=`
1129
1129
 
@@ -1,2 +1,2 @@
1
- import{_ as a,l as s,L as n,e as i}from"./index-yzdpqlx8.js";import{p}from"./treemap-KZPCXAKY-jUrRW8x4.js";import"./_baseUniq-Dph5MhDW.js";import"./_basePickBy-MjayjAmR.js";import"./clone-D_OHxjaG.js";var g={parse:a(async r=>{const e=await p("info",r);s.debug(e)},"parse")},v={version:"11.13.0"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,o)=>{s.debug(`rendering info diagram
1
+ import{_ as a,l as s,L as n,e as i}from"./index-__0EddV-.js";import{p}from"./treemap-KZPCXAKY-BNW6-hD1.js";import"./_baseUniq-B6nQ_a7-.js";import"./_basePickBy-DHEkWgav.js";import"./clone-V_YFqHKL.js";var g={parse:a(async r=>{const e=await p("info",r);s.debug(e)},"parse")},v={version:"11.13.0"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,o)=>{s.debug(`rendering info diagram
2
2
  `+r);const t=n(e);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),l={draw:c},y={parser:g,db:m,renderer:l};export{y as diagram};
@@ -1,4 +1,4 @@
1
- import{_ as o,c as ot,a4 as ut,L as dt,as as yt,A as ft,k as pt,q as it,a as gt,b as kt,g as wt,s as mt,t as _t,e as bt}from"./index-yzdpqlx8.js";var tt=(function(){var e=o(function(M,t,s,i){for(s=s||{},i=M.length;i--;s[M[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],w=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],N={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,u,p,n,v){var m=n.length-1;switch(p){case 6:case 7:return u;case 15:u.addNode(n[m-1].length,n[m].trim());break;case 16:u.addNode(0,n[m].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:w},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:f,7:d,10:22,11:w},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],u=[],p=[null],n=[],v=this.table,m="",I=0,S=0,L=2,E=1,R=n.slice.call(arguments,1),b=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);b.setInput(t,C.yy),C.yy.lexer=b,C.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var T=b.yylloc;n.push(T);var D=b.options&&b.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(P){i.length=i.length-2*P,p.length=p.length-P,n.length=n.length-P}o(j,"popStack");function z(){var P;return P=u.pop()||b.lex()||E,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}o(z,"lex");for(var A,W,B,K,H={},X,V,et,Y;;){if(W=i[i.length-1],this.defaultActions[W]?B=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=z()),B=v[W]&&v[W][A]),typeof B>"u"||!B.length||!B[0]){var Q="";Y=[];for(X in v[W])this.terminals_[X]&&X>L&&Y.push("'"+this.terminals_[X]+"'");b.showPosition?Q="Parse error on line "+(I+1)+`:
1
+ import{_ as o,c as ot,a4 as ut,L as dt,as as yt,A as ft,k as pt,q as it,a as gt,b as kt,g as wt,s as mt,t as _t,e as bt}from"./index-__0EddV-.js";var tt=(function(){var e=o(function(M,t,s,i){for(s=s||{},i=M.length;i--;s[M[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],w=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],N={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,u,p,n,v){var m=n.length-1;switch(p){case 6:case 7:return u;case 15:u.addNode(n[m-1].length,n[m].trim());break;case 16:u.addNode(0,n[m].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:w},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:f,7:d,10:22,11:w},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],u=[],p=[null],n=[],v=this.table,m="",I=0,S=0,L=2,E=1,R=n.slice.call(arguments,1),b=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);b.setInput(t,C.yy),C.yy.lexer=b,C.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var T=b.yylloc;n.push(T);var D=b.options&&b.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(P){i.length=i.length-2*P,p.length=p.length-P,n.length=n.length-P}o(j,"popStack");function z(){var P;return P=u.pop()||b.lex()||E,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}o(z,"lex");for(var A,W,B,K,H={},X,V,et,Y;;){if(W=i[i.length-1],this.defaultActions[W]?B=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=z()),B=v[W]&&v[W][A]),typeof B>"u"||!B.length||!B[0]){var Q="";Y=[];for(X in v[W])this.terminals_[X]&&X>L&&Y.push("'"+this.terminals_[X]+"'");b.showPosition?Q="Parse error on line "+(I+1)+`:
2
2
  `+b.showPosition()+`
3
3
  Expecting `+Y.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Q="Parse error on line "+(I+1)+": Unexpected "+(A==E?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(Q,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:T,expected:Y})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(B[0]){case 1:i.push(A),p.push(b.yytext),n.push(b.yylloc),i.push(B[1]),A=null,S=b.yyleng,m=b.yytext,I=b.yylineno,T=b.yylloc;break;case 2:if(V=this.productions_[B[1]][1],H.$=p[p.length-V],H._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},D&&(H._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]]),K=this.performAction.apply(H,[m,S,I,C.yy,B[1],p,n].concat(R)),typeof K<"u")return K;V&&(i=i.slice(0,-1*V*2),p=p.slice(0,-1*V),n=n.slice(0,-1*V)),i.push(this.productions_[B[1]][0]),p.push(H.$),n.push(H._$),et=v[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},O=(function(){var M={EOF:1,parseError:o(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:o(function(t,s){return this.yy=s||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as gt}from"./chunk-FMBD7UC4-CMWVNCjg.js";import{a as mt,g as lt,h as xt,d as kt}from"./chunk-JSJVCQXG-RwHV39Ax.js";import{g as _t,s as vt,a as bt,b as wt,t as Tt,q as St,_ as n,c as R,d as X,e as $t,A as Mt}from"./index-yzdpqlx8.js";import{d as et}from"./arc-BFGi-GF5.js";var U=(function(){var t=n(function(h,i,a,l){for(a=a||{},l=h.length;l--;a[h[l]]=i);return a},"o"),e=[6,8,10,11,12,14,16,17,18],s=[1,9],c=[1,10],r=[1,11],f=[1,12],u=[1,13],y=[1,14],g={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:n(function(i,a,l,d,p,o,b){var k=o.length-1;switch(p){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:d.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),d.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),d.setAccDescription(this.$);break;case 12:d.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:d.addTask(o[k-1],o[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:s,12:c,14:r,16:f,17:u,18:y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:s,12:c,14:r,16:f,17:u,18:y},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:n(function(i,a){if(a.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=a,l}},"parseError"),parse:n(function(i){var a=this,l=[0],d=[],p=[null],o=[],b=this.table,k="",C=0,K=0,dt=2,Q=1,yt=o.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(i,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;o.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,p.length=p.length-w,o.length=o.length-w}n(pt,"popStack");function D(){var w;return w=d.pop()||_.lex()||Q,typeof w!="number"&&(w instanceof Array&&(d=w,w=d.pop()),w=a.symbols_[w]||w),w}n(D,"lex");for(var v,A,T,q,F={},N,M,tt,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((v===null||typeof v>"u")&&(v=D()),T=b[A]&&b[A][v]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in b[A])this.terminals_[N]&&N>dt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`:
1
+ import{g as gt}from"./chunk-FMBD7UC4-B_bvG4nK.js";import{a as mt,g as lt,h as xt,d as kt}from"./chunk-JSJVCQXG-W1D4_e73.js";import{g as _t,s as vt,a as bt,b as wt,t as Tt,q as St,_ as n,c as R,d as X,e as $t,A as Mt}from"./index-__0EddV-.js";import{d as et}from"./arc-DGVI23rV.js";var U=(function(){var t=n(function(h,i,a,l){for(a=a||{},l=h.length;l--;a[h[l]]=i);return a},"o"),e=[6,8,10,11,12,14,16,17,18],s=[1,9],c=[1,10],r=[1,11],f=[1,12],u=[1,13],y=[1,14],g={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:n(function(i,a,l,d,p,o,b){var k=o.length-1;switch(p){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:d.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),d.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),d.setAccDescription(this.$);break;case 12:d.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:d.addTask(o[k-1],o[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:s,12:c,14:r,16:f,17:u,18:y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:s,12:c,14:r,16:f,17:u,18:y},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:n(function(i,a){if(a.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=a,l}},"parseError"),parse:n(function(i){var a=this,l=[0],d=[],p=[null],o=[],b=this.table,k="",C=0,K=0,dt=2,Q=1,yt=o.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(i,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;o.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,p.length=p.length-w,o.length=o.length-w}n(pt,"popStack");function D(){var w;return w=d.pop()||_.lex()||Q,typeof w!="number"&&(w instanceof Array&&(d=w,w=d.pop()),w=a.symbols_[w]||w),w}n(D,"lex");for(var v,A,T,q,F={},N,M,tt,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((v===null||typeof v>"u")&&(v=D()),T=b[A]&&b[A][v]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in b[A])this.terminals_[N]&&N>dt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`:
2
2
  `+_.showPosition()+`
3
3
  Expecting `+z.join(", ")+", got '"+(this.terminals_[v]||v)+"'":H="Parse error on line "+(C+1)+": Unexpected "+(v==Q?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(H,{text:_.match,token:this.terminals_[v]||v,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+v);switch(T[0]){case 1:l.push(v),p.push(_.yytext),o.push(_.yylloc),l.push(T[1]),v=null,K=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=p[p.length-M],F._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},ft&&(F._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),q=this.performAction.apply(F,[k,K,C,I.yy,T[1],p,o].concat(yt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),p=p.slice(0,-1*M),o=o.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),p.push(F.$),o.push(F._$),tt=b[l[l.length-2]][l[l.length-1]],l.push(tt);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:n(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:n(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:n(function(i){var a=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(i){this.unput(this.match.slice(i))},"less"),pastInput:n(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{_ as c,l as te,c as W,L as fe,ah as ye,ai as be,aj as me,ac as _e,H as Y,i as G,v as ke,J as Ee,ad as Se,ae as le,af as ce}from"./index-yzdpqlx8.js";import{g as Ne}from"./chunk-FMBD7UC4-CMWVNCjg.js";var $=(function(){var t=c(function(_,s,n,a){for(n=n||{},a=_.length;a--;n[_[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],k=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],j=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],H=[1,35],M=[1,36],A=[1,6,7,11,13,16,17,20,23],U=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:j}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},t(P,[2,14],{7:H,11:M}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:j}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:U}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:H,11:M}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:U}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);b.setInput(s,T.yy),T.yy.lexer=b,T.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;e.push(q);var de=b.options&&b.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var E,R,v,Q,F={},X,I,oe,K;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((E===null||typeof E>"u")&&(E=ae()),v=B[R]&&B[R][E]),typeof v>"u"||!v.length||!v[0]){var Z="";K=[];for(X in B[R])this.terminals_[X]&&X>ue&&K.push("'"+this.terminals_[X]+"'");b.showPosition?Z="Parse error on line "+(z+1)+`:
1
+ import{_ as c,l as te,c as W,L as fe,ah as ye,ai as be,aj as me,ac as _e,H as Y,i as G,v as ke,J as Ee,ad as Se,ae as le,af as ce}from"./index-__0EddV-.js";import{g as Ne}from"./chunk-FMBD7UC4-B_bvG4nK.js";var $=(function(){var t=c(function(_,s,n,a){for(n=n||{},a=_.length;a--;n[_[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],k=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],j=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],H=[1,35],M=[1,36],A=[1,6,7,11,13,16,17,20,23],U=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:j}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},t(P,[2,14],{7:H,11:M}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:j}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:U}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:H,11:M}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:U}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);b.setInput(s,T.yy),T.yy.lexer=b,T.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;e.push(q);var de=b.options&&b.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var E,R,v,Q,F={},X,I,oe,K;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((E===null||typeof E>"u")&&(E=ae()),v=B[R]&&B[R][E]),typeof v>"u"||!v.length||!v[0]){var Z="";K=[];for(X in B[R])this.terminals_[X]&&X>ue&&K.push("'"+this.terminals_[X]+"'");b.showPosition?Z="Parse error on line "+(z+1)+`:
2
2
  `+b.showPosition()+`
3
3
  Expecting `+K.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(E==re?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[E]||E,line:b.yylineno,loc:q,expected:K})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+E);switch(v[0]){case 1:a.push(E),u.push(b.yytext),e.push(b.yylloc),a.push(v[1]),E=null,ie=b.yyleng,l=b.yytext,z=b.yylineno,q=b.yylloc;break;case 2:if(I=this.productions_[v[1]][1],F.$=u[u.length-I],F._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(F._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Q=this.performAction.apply(F,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Q<"u")return Q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(F.$),e.push(F._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},m=(function(){var _={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`