@kabmo-labs/kabmo 0.55.0 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +466 -466
  3. package/dist/client/static/js/{Body-a4dwe3hh.js → Body-jfy4bhk2.js} +1 -1
  4. package/dist/client/static/js/{CsvGrid-ppj80brw.js → CsvGrid-4c5t668z.js} +1 -1
  5. package/dist/client/static/js/{DocxView-ef0bd2pg.js → DocxView-3x7whtvq.js} +1 -1
  6. package/dist/client/static/js/{DrawioView-44tpkzbd.js → DrawioView-tbkc5dfz.js} +1 -1
  7. package/dist/client/static/js/{HtmlPreview-w654aykz.js → HtmlPreview-egxkayya.js} +1 -1
  8. package/dist/client/static/js/{ImageView-kg0skt5s.js → ImageView-swhzvw2p.js} +1 -1
  9. package/dist/client/static/js/{LayoutWrapper-qepkrtd8.js → LayoutWrapper-sangsrt5.js} +2 -2
  10. package/dist/client/static/js/MergeDiffView-bv00y63x.js +1 -0
  11. package/dist/client/static/js/{Modal-8d299emm.js → Modal-1fj8kvme.js} +7 -7
  12. package/dist/client/static/js/{PdfView-eq7fnqa2.js → PdfView-0k2egsbz.js} +1 -1
  13. package/dist/client/static/js/{SessionsView-tedh2es3.js → SessionsView-t547rqeb.js} +1 -1
  14. package/dist/client/static/js/{SheetView-5xm33kgk.js → SheetView-anb3gavm.js} +1 -1
  15. package/dist/client/static/js/{SvgPreview-tp1m8r4t.js → SvgPreview-e2wrj2hj.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-xppr9jf1.js → abnfDiagram-O67JEVCF-0rs86b68.js} +1 -1
  17. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-s23e6vtk.js → architectureDiagram-NJMV4G6O-0k3zzxz1.js} +3 -3
  18. package/dist/client/static/js/{blockDiagram-BEXU5L5S-7ws8yq9e.js → blockDiagram-BEXU5L5S-t1n1fx96.js} +1 -1
  19. package/dist/client/static/js/{c4Diagram-YGBWAQC7-517yhfzj.js → c4Diagram-YGBWAQC7-93b7eds9.js} +1 -1
  20. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-tcad3rst.js → classDiagram-v2-NBCMYWYE-bnf85z0f.js} +1 -1
  21. package/dist/client/static/js/{cose-bilkent-JH36ORCC-a76vf82p.js → cose-bilkent-JH36ORCC-e290161f.js} +1 -1
  22. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-9kety453.js → cynefinDiagram-VND7K2PF-s13ra9ag.js} +1 -1
  23. package/dist/client/static/js/{dagre-6A5THRUB-6g6gsp6b.js → dagre-6A5THRUB-83wshh5e.js} +1 -1
  24. package/dist/client/static/js/{diagram-22UHCM2B-ngj4fyg3.js → diagram-22UHCM2B-ywh4wqna.js} +1 -1
  25. package/dist/client/static/js/{diagram-3UASUU5V-xw2m99qa.js → diagram-3UASUU5V-cb53z698.js} +1 -1
  26. package/dist/client/static/js/{diagram-ATOU4E4O-hz3bd083.js → diagram-ATOU4E4O-btf55c44.js} +1 -1
  27. package/dist/client/static/js/{diagram-CDSNMT55-vfhtemve.js → diagram-CDSNMT55-p6tbbm1n.js} +1 -1
  28. package/dist/client/static/js/{diagram-MLGK6HIB-22cjvj5g.js → diagram-MLGK6HIB-6kzssf4y.js} +1 -1
  29. package/dist/client/static/js/{diagram-MPIPVDR6-xv8fsecp.js → diagram-MPIPVDR6-4v0yncvv.js} +1 -1
  30. package/dist/client/static/js/{dockerfile-491tyqmj.js → dockerfile-r422htmd.js} +1 -1
  31. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-m6mkn986.js → ebnfDiagram-ZINNZB2B-mw1gh30z.js} +1 -1
  32. package/dist/client/static/js/{elk-276RUBZZ-jccw706n.js → elk-276RUBZZ-1pe786ap.js} +1 -1
  33. package/dist/client/static/js/{erDiagram-OPXOYQCR-rxk86jsf.js → erDiagram-OPXOYQCR-x7rk70q6.js} +1 -1
  34. package/dist/client/static/js/flowDiagram-KWPJA3E3-kfwaac44.js +1 -0
  35. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-veweech7.js → ganttDiagram-FUAMR5RP-j3m5km4p.js} +1 -1
  36. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-7dyqcj8r.js → gitGraphDiagram-X574FWY7-fd1kebdy.js} +1 -1
  37. package/dist/client/static/js/{index-wa234c7k.js → index-004x0a3p.js} +1 -1
  38. package/dist/client/static/js/{index-637my5h0.js → index-0mhxw0a1.js} +1 -1
  39. package/dist/client/static/js/{index-dg714jam.js → index-22frp78d.js} +1 -1
  40. package/dist/client/static/js/{index-trpn9gxs.js → index-29b1ysz6.js} +1 -1
  41. package/dist/client/static/js/{index-bfy437re.js → index-3hrvhyym.js} +1 -1
  42. package/dist/client/static/js/{index-3x88fxzj.js → index-3k45gspr.js} +1 -1
  43. package/dist/client/static/js/{index-bhst1c2x.js → index-473wm10a.js} +1 -1
  44. package/dist/client/static/js/{index-d9dz0wt0.js → index-4acka5fn.js} +1 -1
  45. package/dist/client/static/js/{index-sx5x2q80.js → index-4dzvjfkd.js} +1 -1
  46. package/dist/client/static/js/{index-pqmvhqmj.js → index-4fpyzg5e.js} +7 -7
  47. package/dist/client/static/js/{index-xm3691yp.js → index-4jg10xtp.js} +1 -1
  48. package/dist/client/static/js/{index-0qmpqtp2.js → index-4nyajpeg.js} +1 -1
  49. package/dist/client/static/js/{index-4m94cbms.js → index-5fxm2tpg.js} +1 -1
  50. package/dist/client/static/js/{index-kfcpkx7h.js → index-72v57e07.js} +1 -1
  51. package/dist/client/static/js/{index-39mr4tym.js → index-7tsdw8wt.js} +1 -1
  52. package/dist/client/static/js/{index-0ak5wdz1.js → index-8e66p2a7.js} +1 -1
  53. package/dist/client/static/js/{index-7ehep28z.js → index-8n4qwd64.js} +2 -2
  54. package/dist/client/static/js/{index-2cfw7wem.js → index-bnamrpm6.js} +1 -1
  55. package/dist/client/static/js/{index-twjq786a.js → index-bxhszdcz.js} +1 -1
  56. package/dist/client/static/js/{index-e6tjaccf.js → index-cbbwq25c.js} +1 -1
  57. package/dist/client/static/js/{index-xq78fj64.js → index-dfha2z56.js} +1 -1
  58. package/dist/client/static/js/{index-r51fqzb5.js → index-drsy400d.js} +1 -1
  59. package/dist/client/static/js/{index-4kchzh9y.js → index-e4yj4kbe.js} +8 -8
  60. package/dist/client/static/js/{index-zjc8yfbe.js → index-g84dwmvr.js} +1 -1
  61. package/dist/client/static/js/index-gedsa0z7.css +1 -0
  62. package/dist/client/static/js/{index-x3g8fwkc.js → index-hge0y4vn.js} +2 -2
  63. package/dist/client/static/js/{index-cz80n8yc.js → index-hgsjynb0.js} +1 -1
  64. package/dist/client/static/js/{index-2asa0faw.js → index-j1prebvy.js} +2 -2
  65. package/dist/client/static/js/{index-wp7tsava.js → index-jbaceghb.js} +1 -1
  66. package/dist/client/static/js/{index-na95tr1k.js → index-jtyzeynv.js} +2 -2
  67. package/dist/client/static/js/{index-tk1vr8q2.js → index-kbk0vmex.js} +4 -4
  68. package/dist/client/static/js/{index-0xh8402w.js → index-q178zgxp.js} +1 -1
  69. package/dist/client/static/js/{index-gsw1zh30.js → index-q4t5j3x7.js} +1 -1
  70. package/dist/client/static/js/{index-xbvjpa60.js → index-qdabc51h.js} +3 -3
  71. package/dist/client/static/js/{index-7ckzdf4r.js → index-qrwjxqdh.js} +168 -168
  72. package/dist/client/static/js/{index-j0qt8gaj.js → index-rm5b3kn8.js} +1 -1
  73. package/dist/client/static/js/{index-nzjc24v9.js → index-s4v3vcsn.js} +1 -1
  74. package/dist/client/static/js/{index-wvqwzgpx.js → index-s6nv35dv.js} +1 -1
  75. package/dist/client/static/js/{index-088gwjbz.js → index-satnfvaz.js} +1 -1
  76. package/dist/client/static/js/{index-60fjqzdw.js → index-tcp5cp53.js} +1 -1
  77. package/dist/client/static/js/{index-5701gj1f.js → index-zkef5q39.js} +1 -1
  78. package/dist/client/static/js/{infoDiagram-VRGFBTTK-ksz9cvq3.js → infoDiagram-VRGFBTTK-1m0br602.js} +1 -1
  79. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-g8symmrp.js → ishikawaDiagram-OU5B5YK6-zryzhpq6.js} +1 -1
  80. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-qs2e3hdf.js → journeyDiagram-ZHPQQLJL-6apqr7h4.js} +1 -1
  81. package/dist/client/static/js/{kanban-definition-PNTS6WVX-pzef80sz.js → kanban-definition-PNTS6WVX-am385c1e.js} +1 -1
  82. package/dist/client/static/js/{mermaid.core-chfcvkkc.js → mermaid.core-k937exrm.js} +2 -2
  83. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-sds2e243.js → mindmap-definition-NLK3R4M7-hx8qq866.js} +1 -1
  84. package/dist/client/static/js/one-dark-pro-phxqe9mx.js +1 -0
  85. package/dist/client/static/js/one-light-vhwh499y.js +1 -0
  86. package/dist/client/static/js/{pegDiagram-GJSIUBJH-m8199cy0.js → pegDiagram-GJSIUBJH-1hasj2h7.js} +1 -1
  87. package/dist/client/static/js/{pieDiagram-5QR66LMP-wqz5k5w6.js → pieDiagram-5QR66LMP-x5nwff8r.js} +1 -1
  88. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-rjszd8an.js → quadrantDiagram-O4NWA36T-gmrcr5jb.js} +1 -1
  89. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-qv0be7dh.js → railroadDiagram-XR7U4H2S-rdznfhfb.js} +1 -1
  90. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-b87kqbr7.js → requirementDiagram-PLB6GJNP-v9wb3ppf.js} +1 -1
  91. package/dist/client/static/js/{rust-m7ma3tq9.js → rust-9cgnbbcs.js} +1 -1
  92. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-dh5we479.js → sankeyDiagram-IPEJSGJF-3p4ddd2h.js} +1 -1
  93. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-e6fg0x45.js → sequenceDiagram-PO4LG4MO-wfcqxjfq.js} +1 -1
  94. package/dist/client/static/js/{sizeCapture-INFHLROL-mam6cagq.js → sizeCapture-INFHLROL-g02k0k8x.js} +1 -1
  95. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-htwar22v.js → stateDiagram-v2-GCMORJYK-7k449yvg.js} +1 -1
  96. package/dist/client/static/js/{swimlanes-2SLR337P-5g26cnkr.js → swimlanes-2SLR337P-zkf2bgm8.js} +1 -1
  97. package/dist/client/static/js/{swimlanesDiagram-TC7HE7FX-rseba3zs.js → swimlanesDiagram-TC7HE7FX-yex8g4fx.js} +1 -1
  98. package/dist/client/static/js/{timeline-definition-EJHVYXUP-5km8n8mj.js → timeline-definition-EJHVYXUP-qsfpjr1c.js} +1 -1
  99. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-0vt6ms5g.js → usecaseDiagram-POWQR4AR-b2vprhsr.js} +1 -1
  100. package/dist/client/static/js/{vennDiagram-UO4OBE2U-k425105a.js → vennDiagram-UO4OBE2U-x0ffeg2t.js} +1 -1
  101. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-s0gd4jg1.js → wardleyDiagram-VNRHLVJA-hsnhaf4f.js} +1 -1
  102. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-2nrdzp7p.js → xychartDiagram-PMCCYNJV-90f9aadp.js} +1 -1
  103. package/package.json +3 -3
  104. package/src/client/components/settings/categories/chat-settings/ToolRenderSection.tsx +1 -1
  105. package/src/client/components/workspace/chat-timeline/block-chrome.test.tsx +5 -3
  106. package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
  107. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/GroupedAsk.tsx +41 -21
  108. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/QuestionBlock.tsx +16 -3
  109. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.test.ts +105 -2
  110. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.tsx +59 -8
  111. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/AgentAdmin.test.tsx +0 -13
  112. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/AgentAdmin.tsx +6 -23
  113. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/agent-admin-rows.test.ts +1 -39
  114. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/agent-admin-rows.ts +11 -46
  115. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.test.tsx +36 -1
  116. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +10 -5
  117. package/src/client/hooks/chat/timeline/ask-frame-buckets.ts +14 -4
  118. package/src/client/hooks/chat/timeline/ask-frames-context.ts +3 -1
  119. package/src/client/hooks/chat/timeline/ask-frames-grouped.test.ts +31 -0
  120. package/src/client/hooks/chat/timeline/ask-frames.ts +12 -3
  121. package/src/client/hooks/chat/timeline/send-props.ts +1 -2
  122. package/src/server/lib/harness/acp/client-capabilities.test.ts +3 -2
  123. package/src/server/lib/sessions/last-opened.server.test.ts +26 -7
  124. package/src/server/lib/sessions/last-opened.server.ts +19 -4
  125. package/src/shared/lib/chat/ask-questions.test.ts +29 -0
  126. package/src/shared/lib/chat/ask-questions.ts +44 -3
  127. package/src/shared/lib/chat/ask-results.test.ts +66 -0
  128. package/src/shared/lib/chat/ask-results.ts +58 -0
  129. package/src/shared/lib/chat/timeline/block-chrome.ts +4 -4
  130. package/tsconfig.json +6 -0
  131. package/dist/client/static/js/MergeDiffView-n2h8vv0j.js +0 -1
  132. package/dist/client/static/js/flowDiagram-KWPJA3E3-aegwx04w.js +0 -1
  133. package/dist/client/static/js/index-4m2d73m3.css +0 -1
  134. package/dist/client/static/js/one-dark-pro-5fvhpb1t.js +0 -1
  135. package/dist/client/static/js/one-light-pwj40vbr.js +0 -1
@@ -1,2 +1,2 @@
1
- import{t,va,ka,zg,Zt,xm}from"./index-pqmvhqmj.js";import{Zl}from"./index-5701gj1f.js";import"./index-x3g8fwkc.js";import{oi,Sp}from"./index-60fjqzdw.js";function X(){throw Error("elkjs is not bundled in this build; use the default dagre layout")}class pt{}var yt=new Proxy(pt,{construct:X,apply:X,get:X});var kt=t((e,r,{parentById:n})=>{let o=new Set,i=e;if(e===r)return n[e]||"root";while(i){if(o.add(i),i===r)return i;i=n[i]}i=r;while(i){if(o.has(i))return i;i=n[i]}return"root"},"findCommonAncestor"),pe=6;function bt(e,{measure:r}){let n=e.config?.elk?.lineHops;if(n===!1)return;let o=e.edges.filter((i)=>Array.isArray(i.points)&&i.points.length>=2).map((i)=>({id:i.id,points:i.points,curve:i.curve,arrowTypeStart:i.arrowTypeStart,arrowTypeEnd:i.arrowTypeEnd}));Zl(r.groups.edgePaths,o,{enabled:!0,jumpRadius:pe,jumpStyle:n==="gap"?"gap":"arc"})}t(bt,"applyElkLineJumps");var ye={},Ee={},xe={},me={},R=1,ke=10,v=t((e,r,n=0.5)=>{let o=e.width/2,i=e.height/2,s=e.x-o,a=e.x+o,c=e.y-i,l=e.y+i,u=Math.abs(r.x-s)<=n&&r.y>=c-n&&r.y<=l+n,h=Math.abs(r.x-a)<=n&&r.y>=c-n&&r.y<=l+n,d=Math.abs(r.y-c)<=n&&r.x>=s-n&&r.x<=a+n,f=Math.abs(r.y-l)<=n&&r.x>=s-n&&r.x<=a+n;return u||h||d||f},"onBorder"),be=t((e,r,n)=>{let{x:o,y:i}=e,s=Math.abs(o-n.x),a=e.width/2,c=n.x<r.x?a-s:a+s,l=e.height/2,u=Math.abs(r.y-n.y),h=Math.abs(r.x-n.x);if(Math.abs(i-r.y)*a>Math.abs(o-r.x)*l){let d=n.y<r.y?r.y-l-i:i-l-r.y;c=h*d/u;let f={x:n.x<r.x?n.x+c:n.x-h+c,y:n.y<r.y?n.y+u-d:n.y-u+d};if(h===0)f.x=r.x;if(u===0)f.y=r.y;return f}else{if(n.x<r.x)c=r.x-a-o;else c=o-a-r.x;let d=u*c/h,f=n.x<r.x?n.x+h-c:n.x-h+c,g=n.y<r.y?n.y+d:n.y-d;if(h===0)f=r.x;if(u===0)g=r.y;return{x:f,y:g}}},"intersection"),T=t((e,r)=>{let{x:n,y:o}=e,i=Math.abs(r.x-n),s=Math.abs(r.y-o),a=e.width/2,c=e.height/2;return i>=a||s>=c},"outsideNode"),we=t((e,r,n=ke)=>{let o=Math.abs(r.x-e.x),i=Math.abs(r.y-e.y),s=e.width/2,a=e.height/2;if(Math.abs(o-s)<R||Math.abs(i-a)<R){let c=r.x-e.x,l=r.y-e.y,u=Math.sqrt(c*c+l*l);if(u>0)return{x:e.x+c/u*(u+n),y:e.y+l/u*(u+n)}}return r},"ensureTrulyOutside"),Ie=t((e,r,n)=>{let o=Math.abs(r.x-e.x)<R,i=Math.abs(r.y-e.y)<R;return{x:o?r.x:r.x<e.x?e.x-e.width/4:e.x+e.width/4,y:i?r.y:n.y}},"makeInsidePoint"),Oe=t((e,r,n)=>{if(!e?.intersect)return null;let o=e.intersect(n);if(!o)return null;if(n.x<r.x&&o.x>r.x||n.x>r.x&&o.x<r.x)return null;if(Math.hypot(n.x-o.x,n.y-o.y)<=R)return null;return o},"tryNodeIntersect"),Se=t((e,r,n)=>{let o=Ie(e,r,n);return be(e,r,o)},"fallbackIntersection"),Pe=20,Et=0.000001,W=t((e,r,n)=>{let o=e.intersect?.(n);if(!o)return!1;let i=Math.hypot(n.x-r.x,n.y-r.y),s=Math.hypot(o.x-r.x,o.y-r.y);return i<=s+0.000000001},"insideOutline"),Me=t((e,r,n,o)=>{if(!e?.intersect)return null;let i=o.x-n.x,s=o.y-n.y;if(i===0&&s===0)return null;if(Math.abs(i)>Et&&Math.abs(s)>Et)return null;let a={x:r.x,y:r.y},c=Math.abs(i)>Math.abs(s),l=t((d)=>c?{x:d,y:n.y}:{x:n.x,y:d},"along"),u=c?a.x:a.y,h=c?n.x:n.y;if(!W(e,a,l(u)))return null;if(W(e,a,l(h)))return{...n};for(let d=0;d<Pe;d++){let f=(u+h)/2;if(W(e,a,l(f)))u=f;else h=f}return l(u)},"outlineAttachPoint"),C=t((e,r,n,o)=>{let i=we(r,n);return Oe(e,r,i)??Se(r,i,o)},"computeNodeIntersection"),L=t((e,r,n,o=0.1)=>{if(!n||e.length===0)return;if(r==="start")if(e.length>0&&Math.abs(e[0].x-n.x)<o&&Math.abs(e[0].y-n.y)<o)e.shift();else e[0]=n;else{let i=e.length-1;if(e.length>0&&Math.abs(e[i].x-n.x)<o&&Math.abs(e[i].y-n.y)<o)e.pop();else e[i]=n}},"replaceEndpoint"),wt=8,It=t((e)=>{if(typeof e!=="string")return 0;return Math.max(Zt[e]??0,xm[e]??0)},"markerPathOffset"),xt={arrow_open:["none","none"],arrow_cross:["none","arrow_cross"],double_arrow_cross:["arrow_cross","arrow_cross"],arrow_point:["none","arrow_point"],double_arrow_point:["arrow_point","arrow_point"],arrow_circle:["none","arrow_circle"],double_arrow_circle:["arrow_circle","arrow_circle"]},N=12,Ot=`[top=${N},left=${N},bottom=${N},right=${N}]`,O=24,St=24,Pt=50,P=15,M=10,nt={"spacing.baseValue":15,"spacing.nodeNode":15,"elk.aspectRatio":"1.6","elk.expandNodes":"true","elk.rectpacking.trybox":"true","elk.rectpacking.packing.compaction.rowHeightReevaluation":"true","elk.rectpacking.packing.compaction.iterations":10,"elk.rectpacking.whiteSpaceElimination.strategy":"EQUAL_BETWEEN_STRUCTURES","elk.rectpacking.widthApproximation.strategy":"SCANLINE"},Ne=["nodeSize.constraints","nodeSize.minimum","elk.algorithm","elk.aspectRatio","elk.contentAlignment","elk.expandNodes","elk.padding",...Object.keys(nt)];function Mt(e){for(let r of Ne)delete e[r];e["spacing.baseValue"]=St,e["spacing.nodeNode"]=Pt}t(Mt,"clearContainerAlgorithmOptions");var mt=new Set(["elk.layered","elk.box","elk.rectpacking","elk.stress","elk.force","elk.mrtree","elk.radial","elk.sporeOverlap"]);function it(e,r){if(typeof e!=="string")return;if(!mt.has(e)){r?.warn(`Unknown container layout algorithm "${e}". Supported values: ${[...mt].join(", ")}. Falling back to the diagram's layout algorithm.`);return}return e}t(it,"resolveContainerAlgorithm");function ot(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"TB":case"TD":return"DOWN";case"BT":return"UP";default:return"DOWN"}}t(ot,"dir2ElkDirection");function F(e){if(!zg(e.shape))return 0;return(e.labelData?.width??e.labels?.[0]?.width??0)+(e.padding??0)}t(F,"groupTitleWidth");function st(e){if(!zg(e.shape))return{};return{"nodeSize.constraints":"[MINIMUM_SIZE, NODE_LABELS]","nodeSize.minimum":`(${F(e)}, 0)`}}t(st,"groupTitleSizeOptions");function Nt(e,r,n,o){let i=e.labelData?.width??0,s=e.padding??0,a=i+2*s,c=e.labelData?.height??0,l=ct(r?.preset),u={...st(e),"spacing.baseValue":St,"elk.layered.spacing.edgeNodeBetweenLayers":30,"elk.spacing.edgeEdge":20,"spacing.nodeNode":Pt,"elk.padding":`[top=${O},left=${O},bottom=${O},right=${O}]`,"nodeLabels.placement":"[H_CENTER V_TOP, INSIDE]","elk.layered.mergeEdges":r?.mergeEdges,"elk.layered.nodePlacement.bk.fixedAlignment":r?.nodePlacementAlignment??l.alignment,"elk.layered.nodePlacement.strategy":r?.nodePlacementStrategy??l.containerPlacement,"elk.layered.cycleBreaking.strategy":r?.cycleBreakingStrategy??l.cycleBreaking,"elk.layered.nodePlacement.networkSimplex.nodeFlexibility":"PORT_POSITION","elk.spacing.portsSurrounding":Ot},h=it(e.metadata?.algorithm,o);if(h){let d=c+P;if(u["nodeSize.constraints"]="[MINIMUM_SIZE, NODE_LABELS]",u["nodeSize.minimum"]=`(${a}, ${d+P})`,u["elk.algorithm"]=h,u["elk.hierarchyHandling"]="SEPARATE_CHILDREN",u["elk.aspectRatio"]="2.0",u["elk.contentAlignment"]="H_CENTER V_TOP",u["elk.expandNodes"]="true",u["elk.padding"]=`[top=${d},left=${P},bottom=${P},right=${P}]`,h==="elk.rectpacking"){let f=c+M;Object.assign(u,nt,{"elk.padding":`[top=${f},left=${M},bottom=${M},right=${M}]`,"nodeSize.minimum":`(${a}, ${f+M})`})}}else if(e.dir)u["elk.algorithm"]=n,u["elk.direction"]=ot(e.dir),u["elk.hierarchyHandling"]="SEPARATE_CHILDREN";return Object.assign(u,me),u}t(Nt,"buildSubgraphLayoutOptions");function At(e,r){let n=new Set,o=new Map;for(let{id:i,parentId:s}of e){let a=o.get(s);if(a)a.push(i);else o.set(s,[i])}for(let i of o.values()){let s=new Set(i),a=new Map(i.map((p)=>[p,0])),c=new Map(i.map((p)=>[p,[]])),l=[];for(let p of r){let y=p.source==null?void 0:String(p.source),E=p.target==null?void 0:String(p.target);if(!y||!E||y===E)continue;if(!s.has(y)||!s.has(E))continue;a.set(E,(a.get(E)??0)+1),c.get(y).push(E),c.get(E).push(y),l.push([y,E])}let u=new Map,h=0;for(let p of i){if(u.has(p))continue;let y=[p];u.set(p,h);while(y.length>0){let E=y.pop();for(let b of c.get(E))if(!u.has(b))u.set(b,h),y.push(b)}h++}let d=Array(h).fill(!1);for(let p of i)if((a.get(p)??0)===0)d[u.get(p)]=!0;if(!d.includes(!1))continue;let f=new Map(i.map((p)=>[p,[]])),g=new Map(i.map((p)=>[p,0])),m=t((p,y)=>{let E=new Set([p]),b=[p];while(b.length>0){let w=b.pop();if(w===y)return!0;for(let x of f.get(w))if(!E.has(x))E.add(x),b.push(x)}return!1},"reaches");for(let[p,y]of l){if(m(y,p))continue;f.get(p).push(y),g.set(y,(g.get(y)??0)+1)}let k=Array(h).fill(!1);for(let p of i){let y=u.get(p);if(!d[y]&&!k[y]&&g.get(p)===0)n.add(p),k[y]=!0}}return n}t(At,"findCyclicEntryNodes");function _t(e,r){if(!e.config.elk?.keepEntryNodeOnTop)return;let n=At(e.nodes,e.edges.map((o)=>({source:o.start,target:o.end})));for(let o of n){let i=r[o];if(i)i.layoutOptions={...i.layoutOptions,"elk.layered.layering.layerConstraint":"FIRST"}}}t(_t,"applyCyclicEntryConstraint");function vt(e,r){let n=at(r);return Dt(n),se(e,n),{algorithm:n.algorithm}}t(vt,"prepareLayoutForElk");async function Rt(e,r){let n=at(r),o=Tt(e,n),i=new yt;n.log.info("Drawing flowchart using v4 renderer",i);let s=await Yt(i,o.elkGraph,n.log);return Kt(e,s,o,n.log),Ct(e.nodes),s}t(Rt,"runElkLayoutCore");function Tt(e,r){let n={},o=Lt(e,r.algorithm,r.rootLayoutOptions),i=e.direction??"DOWN";o.layoutOptions["elk.direction"]=ot(i);let s=Gt(e.nodes,r.log);return lt(e.nodes,o,n,r),Ht(e,o,n,r),Wt(e,n,s,r),$t(o,n,s,r.log),_t(e,n),{elkGraph:o,nodeDb:n,parentLookupDb:s}}t(Tt,"buildElkGraphFromLayoutData");var Ve=oi({afterPaint:bt,prepareLayout:vt,measureLayout:t((e,r)=>Sp(e,r,{unwrapGroupLabels:!0}),"measureLayout"),runLayoutCore:Rt,paintOptions:{skipIntersect:!0}});function Dt(e){va(e.getConfig())}t(Dt,"syncHostConfig");function Ct(e){let r=new Map(e.map((n)=>[n.id,n]));e.sort((n,o)=>{if(n.isGroup!==o.isGroup)return n.isGroup?-1:1;if(n.isGroup&&o.isGroup)return K(n,r)-K(o,r);return 0})}t(Ct,"orderNodesForElkPaint");function K(e,r){let n=0,o=new Set,i=e.parentId;while(i&&!o.has(i)){o.add(i);let s=r.get(i);if(!s?.isGroup)break;n++,i=s.parentId}return n}t(K,"getGroupDepth");function at(e){let r=e.helpers;if(!r)throw Error("ELK layout requires Mermaid internal helpers");return{algorithm:e.preparedLayout?.algorithm??e.options?.algorithm,rootLayoutOptions:e.options?.rootLayoutOptions,common:r.common,getConfig:r.getConfig,interpolateToCurve:r.interpolateToCurve,log:r.log}}t(at,"getElkLayoutContext");var Y={default:{layering:"NETWORK_SIMPLEX",placement:"BRANDES_KOEPF",containerPlacement:"BRANDES_KOEPF",alignment:"BALANCED",cycleBreaking:"DEPTH_FIRST"},legacy:{layering:"NETWORK_SIMPLEX",placement:"BRANDES_KOEPF",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"GREEDY"},modelOrder:{layering:"NETWORK_SIMPLEX",placement:"NETWORK_SIMPLEX",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"GREEDY_MODEL_ORDER"},depthFirst:{layering:"NETWORK_SIMPLEX",placement:"NETWORK_SIMPLEX",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"DEPTH_FIRST"}};function ct(e){return e!==void 0&&Object.hasOwn(Y,e)?Y[e]:Y.default}t(ct,"resolveElkPreset");function Lt(e,r,n){let o=ct(e.config.elk?.preset),i={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.algorithm":r,"elk.layered.nodePlacement.strategy":e.config.elk?.nodePlacementStrategy??o.placement,"elk.layered.nodePlacement.bk.fixedAlignment":e.config.elk?.nodePlacementAlignment??o.alignment,"elk.layered.mergeEdges":e.config.elk?.mergeEdges,"elk.direction":"DOWN","spacing.baseValue":40,"elk.layered.crossingMinimization.forceNodeModelOrder":e.config.elk?.forceNodeModelOrder,"elk.layered.considerModelOrder.strategy":e.config.elk?.considerModelOrder,"elk.layered.unnecessaryBendpoints":!0,"elk.layered.cycleBreaking.strategy":e.config.elk?.cycleBreakingStrategy??o.cycleBreaking,"elk.layered.layering.strategy":e.config.elk?.layeringStrategy??o.layering,"elk.layered.layering.coffmanGraham.layerBound":e.config.elk?.layeringLayerBound,"elk.layered.wrapping.multiEdge.improveCuts":!0,"elk.layered.wrapping.multiEdge.improveWrappedEdges":!0,"elk.layered.edgeRouting.selfLoopDistribution":"EQUALLY","elk.layered.mergeHierarchyEdges":!0,"elk.spacing.portsSurrounding":Ot},children:[],edges:[]};if(r==="elk.rectpacking")Object.assign(i.layoutOptions,nt,{"elk.contentAlignment":"H_CENTER V_TOP","elk.padding":"[top=15,left=15,bottom=15,right=15]"});if(n)Object.assign(i.layoutOptions,n);return Object.assign(i.layoutOptions,ye,Ee,xe),i}t(Lt,"createRootElkGraph");function Gt(e,r){let n={parentById:{},childrenById:{}},o=e.filter((i)=>i.isGroup);return r.info("Subgraphs - ",o),o.forEach((i)=>{e.filter((a)=>a.parentId===i.id).forEach((a)=>{n.parentById[a.id]=i.id,n.childrenById[i.id]??=[],n.childrenById[i.id].push(a.id)})}),n}t(Gt,"addSubGraphs");function lt(e,r,n,o,i){let s=e.filter((a)=>a?.parentId===i);return o.log.info("addVertices APA12",s,i),s.forEach((a)=>{Bt(r,e,a,n,o)}),r}t(lt,"addVertices");function Bt(e,r,n,o,i){let s=Ft(n);if(e.children.push(s),o[n.id]=s,n.isGroup)s.children=[],lt(r,s,o,i,n.id),s.labelData=Ut(n,i.getConfig())}t(Bt,"addVertex");function Ft(e){let r={...e};if(delete r.domId,e.isGroup)r.children=[];else if(r.width=e.width??0,r.height=e.height??0,e.spreadPorts)r.layoutOptions={...r.layoutOptions,"elk.portAlignment.default":"CENTER"};return r}t(Ft,"createElkNode");function Ut(e,r){let n=e.labelData;if(n)return n;if(e.labelBBox)return{width:e.labelBBox.width,height:Math.max(0,e.labelBBox.height-2),wrappingWidth:e.wrappingWidth??r.flowchart?.wrappingWidth};return{width:0,height:0,wrappingWidth:e.wrappingWidth??r.flowchart?.wrappingWidth}}t(Ut,"getMeasuredLabelData");function Ht(e,r,n,o){o.log.info("abc78 DAGA edges = ",e);let i={};return e.edges.forEach((s)=>{let a=s.id;i[a]=(i[a]??-1)+1;let c=a;s.id=c,o.log.info("abc78 new link id to be used is",a,c,i[a]);let{source:l,target:u,sourceId:h,targetId:d}=Xt(s,n);o.log.debug("abc78 source and target",l,u),r.edges.push({...s,sources:[l],targets:[u],sourceId:h,targetId:d,labels:[{width:s.width??0,height:s.height??0,orgWidth:s.width??0,orgHeight:s.height??0,text:s.label??"",layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}}]})}),r}t(Ht,"addEdgesToElkGraph");function Xt(e,r){let{start:n,end:o}=e,i=n,s=o,a=n?r[n]:void 0,c=o?r[o]:void 0;if(!a||!c)return{source:i,target:s};return{source:i,target:s,sourceId:n,targetId:o}}t(Xt,"getEdgeStartEndPoint");function Wt(e,r,n,o){e.nodes.forEach((i)=>{let s=r[i.id];if(!s||n.childrenById[s.id]===void 0)return;s.labels=[{text:s.label,width:s?.labelData?.width??50,height:s?.labelData?.height??50}],o.log.debug("UIO node label",s?.labelData?.width,s.padding),s.layoutOptions=Nt(s,e.config.elk,o.algorithm,o.log),delete s.x,delete s.y,delete s.width,delete s.height})}t(Wt,"configureSubgraphNodes");function $t(e,r,n,o){o.debug("APA01 processing edges, count:",e.edges.length),e.edges.forEach((i,s)=>{o.debug("APA01 processing edge",s,":",i);let a=i.sources[0],c=i.targets[0];if(o.debug("APA01 source:",a,"target:",c),o.debug("APA01 nodeDb[source]:",r[a]),o.debug("APA01 nodeDb[target]:",r[c]),r[a]&&r[c]&&r[a].parentId!==r[c].parentId){let l=kt(a,c,n);G(r,a,l,o),G(r,c,l,o)}})}t($t,"configureCrossHierarchyEdges");function G(e,r,n,o){let i=e[r];if(!i)return;if(i.layoutOptions??={},i.layoutOptions["elk.hierarchyHandling"]==="SEPARATE_CHILDREN"&&it(i.metadata?.algorithm))o.debug("Dropping explicit algorithm for node",i.id,"due to cross-boundary edges"),Mt(i.layoutOptions),Object.assign(i.layoutOptions,st(i));if(i.layoutOptions["elk.hierarchyHandling"]="INCLUDE_CHILDREN",i.id!==n&&i.parentId)G(e,i.parentId,n,o)}t(G,"setIncludeChildrenPolicy");async function Yt(e,r,n){let o=globalThis.__mermaidProfiler;try{o?.begin("layoutCore");let i;try{i=await e.layout(r)}finally{o?.end()}return n.debug("APA01 after - success"),n.debug("APA01 layout result:",i),i}catch(i){throw n.error("ELK layout error:",i),i}}t(Yt,"runElkLayout");function Kt(e,r,n,o){let i=new Map(e.nodes.map((s)=>[s.id,s]));ht(r.children??[],n,i,0,0,0,o),ft(r.children??[],n,i,r),qt(e,r,n,o)}t(Kt,"applyElkLayoutResult");function ut(e,r=new Set){for(let n of e.children??[])r.add(n.id),ut(n,r);return r}t(ut,"collectDescendantIds");function jt(e,r,n,o){let i=[];for(let s of e.edges??[]){let a=s.sources?.[0]??s.start,c=s.targets?.[0]??s.end,l=r.has(a)&&r.has(c),u=a===o,h=c===o;if(!l&&!u&&!h)continue;let d=B(a,c,n.parentLookupDb,n.nodeDb);for(let f of s.sections??[]){let g=l?[f.startPoint,...f.bendPoints??[],f.endPoint]:[u?f.startPoint:null,h?f.endPoint:null];for(let m of g)if(m)i.push({x:m.x+d.x,y:m.y+d.y})}}return i}t(jt,"internalEdgePoints");function ft(e,r,n,o={}){for(let i of e){if(!i?.isGroup)continue;let s=i.children??[];ft(s,r,n,o);let a=r.nodeDb[i.id],c=s.map((x)=>r.nodeDb[x.id]).filter((x)=>x?.offset&&x.width&&x.height);if(!a?.offset||c.length===0)continue;let l=jt(o,ut(i),r,i.id),u=[...c.map((x)=>x.offset.posX),...c.map((x)=>x.offset.posX+x.width),...l.map((x)=>x.x)],h=[...c.map((x)=>x.offset.posY),...c.map((x)=>x.offset.posY+x.height),...l.map((x)=>x.y)],d=a.offset,f=Math.max(d.posX,Math.min(...u)-O),g=Math.min(d.posX+a.width,Math.max(...u)+O),m=Math.min(d.posY+a.height,Math.max(...h)+O),k=d.posY,p=F(i),y=f,E=g-f;if(E<p){y-=(p-E)/2,E=p;let x=d.posX+a.width;y=Math.max(d.posX,Math.min(y,x-E)),E=Math.min(E,a.width)}let b=m-k;if(b<=0||E<=0)continue;a.elkOrigin??={posX:d.posX,posY:d.posY},a.offset.posX=y,a.offset.width=E,a.offset.height=b,a.width=E,a.height=b,a.x=y+E/2,a.y=k+b/2;let w=n.get(i.id);if(w)w.x=a.x,w.y=a.y,w.width=E,w.height=b}}t(ft,"evenGroupFrames");function ht(e,r,n,o,i,s,a){e.forEach((c)=>{if(!c)return;let l=r.nodeDb[c.id]??c,u=Math.max(c.width,c.labels?c.labels[0]?.width||0:0),h={posX:c.x+o,posY:c.y+i,x:o,y:i,depth:s,width:u,height:c.height};l.offset=h,l.x=h.posX+c.width/2,l.y=h.posY+c.height/2,l.width=c.width,l.height=c.height;let d=n.get(c.id);if(d){d.x=l.x,d.y=l.y,d.width=c.isGroup?Math.max(c.width,c.labelData?.width??0):c.width,d.height=c.height;let f=d;f.labelData=c.labelData,f.labels=c.labels}if(c.isGroup)a.debug("Id abc88 subgraph = ",c.id,c.x,c.y,c.labelData),ht(c.children??[],r,n,h.posX,h.posY,s+1,a);else a.info("Id NODE = ",c.id,c.x,c.y,o,i,`translate(${l.x}, ${l.y})`)})}t(ht,"applyElkNodePositions");var Ae=16,_e=30,A=0.01;function _(e,r){let n=Math.abs(r.x-e.x),o=Math.abs(r.y-e.y);if(n>A&&o<=A)return"h";if(o>A&&n<=A)return"v";return}t(_,"axisOf");function Vt(e){let r=j(e)??e,n=[...r].reverse(),o=j(n);if(o)r=o.reverse();return r}t(Vt,"straightenTerminalJogs");function j(e){if(e.length<5)return null;let[r,n,o,i]=e,s=_(r,n);if(!s||_(o,i)!==s||_(n,o)!==(s==="h"?"v":"h"))return null;if(Math.hypot(n.x-r.x,n.y-r.y)>_e)return null;let a=s==="h"?Math.abs(o.y-n.y):Math.abs(o.x-n.x);if(a<A||a>Ae)return null;if(!(s==="h"?Math.sign(n.x-r.x)===Math.sign(i.x-o.x):Math.sign(n.y-r.y)===Math.sign(i.y-o.y)))return null;let l=3;while(l+1<e.length&&_(e[l],e[l+1])===s)l++;if(l===e.length-1)return null;let u=[...e];for(let h=2;h<=l;h++)u[h]=s==="h"?{x:e[h].x,y:r.y}:{x:r.x,y:e[h].y};return u.splice(1,2),u}t(j,"straightenFront");function zt(e,r,n,o){let i=t((u,h,d)=>(h.x-u.x)*(d.y-u.y)-(h.y-u.y)*(d.x-u.x),"side"),s=i(n,o,e),a=i(n,o,r),c=i(e,r,n),l=i(e,r,o);return(s>0&&a<0||s<0&&a>0)&&(c>0&&l<0||c<0&&l>0)}t(zt,"segmentsCrossStrict");function V(e,r){let n=0;for(let o=0;o<e.length-1;o++)for(let i=0;i<r.length-1;i++)if(zt(e[o],e[o+1],r[i],r[i+1]))n++;return n}t(V,"crossingCount");function Jt(e){let r=e.map((n)=>n.points??[]);for(let[n,o]of e.entries()){let i=r[n];if(i.length<5)continue;let s=Vt(i);if(s===i)continue;let a=0,c=0;for(let[l,u]of r.entries()){if(l===n||u.length<2)continue;a+=V(i,u),c+=V(s,u)}if(c>a)continue;o.points=s,r[n]=s}}t(Jt,"straightenEdgeTerminals");function qt(e,r,n,o){let i=new Map(e.edges.map((l)=>[l.id,l])),s=e.config.elk?.straightenEdges!==!1,a=new Map(e.nodes.map((l)=>[l.id,l])),c=new Set;if(r.edges?.forEach((l)=>{if(!l.sections?.length)return;let u=n.nodeDb[l.sources?.[0]??l.start],h=n.nodeDb[l.targets?.[0]??l.end];if(!u||!h)return;let d=l.start??l.sourceId??l.sources?.[0],f=l.end??l.targetId??l.targets?.[0],g=B(d,f,n.parentLookupDb,n.nodeDb),m=l.sections[0];if(u.shape!=="rect33")z(u,{x:m.startPoint.x+g.x,y:m.startPoint.y+g.y},a,c);if(h.shape!=="rect33")z(h,{x:m.endPoint.x+g.x,y:m.endPoint.y+g.y},a,c)}),r.edges?.forEach((l)=>{let u=i.get(l.id);if(!u)return;let h=l.sources?.[0]??l.start,d=l.targets?.[0]??l.end,f=n.nodeDb[h],g=n.nodeDb[d];if(!f||!g)return;if(!l.sections?.length){let x=t((S)=>({x:(S.offset?.posX??S.x??0)+(S.width??0)/2,y:(S.offset?.posY??S.y??0)+(S.height??0)/2}),"centre"),U=x(f),H=x(g);f.x=U.x,f.y=U.y,g.x=H.x,g.y=H.y;let D=J([U,H],f,g,o);u.points=D,u.curve="linear";let dt=D[0],gt=D[D.length-1];u.x=(dt.x+gt.x)/2,u.y=(dt.y+gt.y)/2,o.debug("APA18 no edge sections, using a straight line",l.id,u.points);return}let m=l.start??l.sourceId??h,k=l.end??l.targetId??d,p=B(m,k,n.parentLookupDb,n.nodeDb);o.debug("APA18 offset",p,m," ==> ",k,"edge:",l,f);let y=l.sections[0],E=Qt(y,p);if(f.x=f.offset.posX+f.width/2,f.y=f.offset.posY+f.height/2,g.x=g.offset.posX+g.width/2,g.y=g.offset.posY+g.height/2,f.shape!=="rect33")E.unshift({x:f.x,y:f.y});if(g.shape!=="rect33")E.push({x:g.x,y:g.y});let b=J(E,f,g,o);u.points=ie(oe(b,I(g),re(u),o),I(f),ne(u),o),u.curve="rounded";let w=l.labels?.[0];if(w)u.x=w.x+p.x+w.width/2,u.y=w.y+p.y+w.height/2}),s)Jt(e.edges)}t(qt,"applyElkEdgeLayout");function z(e,r,n,o){let i=e.width??0,s=e.height??0,a=e.offset.posY,c=a+s,l=0.5,u=Math.abs(r.y-a)<=0.5||Math.abs(r.y-c)<=0.5;if((u?i:s)>=2*N)return;if(o.has(e.id))return;o.add(e.id);let h=u?r.x-(e.offset.posX+i/2):r.y-(e.offset.posY+s/2);if(Math.abs(h)<0.01)return;if(u)e.offset.posX+=h,e.x=e.offset.posX+i/2;else e.offset.posY+=h,e.y=e.offset.posY+s/2;let d=n.get(e.id);if(d)d.x=e.offset.posX+i/2,d.y=e.offset.posY+s/2}t(z,"alignDegenerateNodeToAnchor");function Qt(e,r){let{startPoint:n,endPoint:o}=e,s=(e.bendPoints?e.bendPoints:[]).map((a)=>({x:a.x+r.x,y:a.y+r.y}));return[{x:n.x+r.x,y:n.y+r.y},...s,{x:o.x+r.x,y:o.y+r.y}]}t(Qt,"createEdgePointsFromSection");function B(e,r,n,o){let i=kt(e,r,n);if(i===void 0||i==="root")return{x:0,y:0};let s=o[i],a=s?.elkOrigin??s?.offset;return{x:a?.posX??0,y:a?.posY??0}}t(B,"calcOffset");function J(e,r,n,o){let i=Array.isArray(e)?[...e]:[],s=I(n);o.debug("PPP cutter2: Points before cutter2:",JSON.stringify(e),"endBounds:",s,v(s,e[e.length-1]));let a;{let c=I(r),l=I(n),u=!!r?.isGroup,h=!!n?.isGroup,{candidate:d,centerApprox:f}=Z(i,r,"start"),{candidate:g,centerApprox:m}=Z(i,n,"end"),k=u&&v(c,d),p=h&&v(l,g);if(tt(i,"start",k&&f),tt(i,"end",p&&m),u&&!k)k=et(i,c,"start");if(h&&!p)p=et(i,l,"end");if(k||p){if(!k)he(i,r,c,o);if(!p)de(i,n,l,o);o.debug("PPP cutter2: skipping cutter2 due to on-border group endpoint(s)",{skipStart:k,skipEnd:p,startCenterApprox:f,endCenterApprox:m,startCandidate:d,endCandidate:g}),a=i}else a=ge(r,n,i,o)}if(o.debug("PPP cutter2: Points after cutter2:",JSON.stringify(a)),!Array.isArray(a)||a.length<2||te(a)){o.warn("POI cutter2: Invalid points from cutter2, falling back to prevPoints",a);let c=i.filter((l)=>Number.isFinite(l?.x)&&Number.isFinite(l?.y));a=c.length>=2?c:i}return o.debug("UIO cutter2: Points after cutter2 (sanitized):",a),ee(a,o)}t(J,"sanitizeElkEdgePoints");function te(e){return e?.some((r)=>!Number.isFinite(r?.x)||!Number.isFinite(r?.y))}t(te,"hasInvalidPoint");function ee(e,r){let n=e.filter((o,i,s)=>{if(i===0)return!0;let a=s[i-1];return Math.abs(o.x-a.x)>0.000001||Math.abs(o.y-a.y)>0.000001});if(n.length!==e.length)r.debug("UIO cutter2: removed consecutive duplicate points",{before:e,after:n});return n}t(ee,"dedupeConsecutivePoints");function re(e){return It(e.arrowTypeEnd)}t(re,"getEndMarkerPathOffset");function ne(e){return It(e.arrowTypeStart)}t(ne,"getStartMarkerPathOffset");function ie(e,r,n,o){if(n<=0||e.length<3)return e;let i=e[0],s=e[1],a=Math.hypot(s.x-i.x,s.y-i.y);if(a>=Math.max(wt,n*2))return e;if(!v(r,s,1))return e;let c=[i,...e.slice(2)];return o.debug("UIO cutter2: removed short start marker segment",{before:e,after:c,markerOffset:n,segmentLength:a}),c}t(ie,"ensureStartMarkerSegmentLength");function oe(e,r,n,o){if(n<=0||e.length<3)return e;let i=e[e.length-1],s=e[e.length-2],a=Math.hypot(i.x-s.x,i.y-s.y);if(a>=Math.max(wt,n*2))return e;if(!v(r,s,1))return e;let c=[...e.slice(0,-2),i];return o.debug("UIO cutter2: removed short end marker segment",{before:e,after:c,markerOffset:n,segmentLength:a}),c}t(oe,"ensureEndMarkerSegmentLength");function se(e,r){let n=e.edges.defaultInterpolate,o=e.edges.defaultStyle,i=r.getConfig();e.edges.forEach((s)=>{let a=ue(s,{defaultStyle:o,defaultInterpolate:n,confCurve:i.curve},r);Object.assign(s,a)})}t(se,"applyElkEdgeRenderData");function ae(e){if(e.classes!==void 0)return e.classes;if(e.start&&e.end)return`flowchart-link LS_${e.start} LE_${e.end}`;return}t(ae,"buildFallbackEdgeClasses");function ce(e,r,n){let o="normal",i="solid",s=[],a=[];if(e==="dotted")i="dotted",s=["fill:none","stroke-width:2px","stroke-dasharray:3"];else if(e==="thick")o="thick",s=["stroke-width: 3.5px","fill:none"];else if(s=r??["fill:none"],n!==void 0)a=n;return{thickness:o,pattern:i,style:s,labelStyle:a}}t(ce,"computeStroke");function le(e,r,n){if(e!==void 0)return e;if(r!==void 0)return r;return n}t(le,"getCurve");function ue(e,r,n){let o={};o.minlen=e.minlen??e.length??1,o.text=e.text??e.label,o.arrowhead=e.arrowhead??(e.type==="arrow_open"?"none":"normal");let i=xt[e.type??"arrow_open"]??xt.arrow_open;o.arrowTypeStart=e.arrowTypeStart??i[0],o.arrowTypeEnd=e.arrowTypeEnd??i[1],o.startLabelRight=e.startLabelRight,o.endLabelLeft=e.endLabelLeft;let s=ce(e.stroke,r.defaultStyle,r.defaultLabelStyle);o.thickness=e.thickness??s.thickness,o.pattern=e.pattern??s.pattern,o.style=e.style??s.style,o.labelStyle=e.labelStyle??s.labelStyle,o.classes=ae(e),o.curve=n.interpolateToCurve(le(e.curve??e.interpolate,r.defaultInterpolate,r.confCurve),ka);let a=(o.text??"")!=="";if(e.arrowheadStyle!==void 0)o.arrowheadStyle=e.arrowheadStyle;else if(a||e.style!==void 0)o.arrowheadStyle="fill: #333";return o.labelpos=e.labelpos??(a?"c":void 0),o.labelType=e.labelType,o.label=(e.label??o.text??"").replace(n.common.lineBreakRegex,`
1
+ import{t,va,ka,zg,Zt,xm}from"./index-4fpyzg5e.js";import{Zl}from"./index-zkef5q39.js";import"./index-hge0y4vn.js";import{oi,Sp}from"./index-tcp5cp53.js";function X(){throw Error("elkjs is not bundled in this build; use the default dagre layout")}class pt{}var yt=new Proxy(pt,{construct:X,apply:X,get:X});var kt=t((e,r,{parentById:n})=>{let o=new Set,i=e;if(e===r)return n[e]||"root";while(i){if(o.add(i),i===r)return i;i=n[i]}i=r;while(i){if(o.has(i))return i;i=n[i]}return"root"},"findCommonAncestor"),pe=6;function bt(e,{measure:r}){let n=e.config?.elk?.lineHops;if(n===!1)return;let o=e.edges.filter((i)=>Array.isArray(i.points)&&i.points.length>=2).map((i)=>({id:i.id,points:i.points,curve:i.curve,arrowTypeStart:i.arrowTypeStart,arrowTypeEnd:i.arrowTypeEnd}));Zl(r.groups.edgePaths,o,{enabled:!0,jumpRadius:pe,jumpStyle:n==="gap"?"gap":"arc"})}t(bt,"applyElkLineJumps");var ye={},Ee={},xe={},me={},R=1,ke=10,v=t((e,r,n=0.5)=>{let o=e.width/2,i=e.height/2,s=e.x-o,a=e.x+o,c=e.y-i,l=e.y+i,u=Math.abs(r.x-s)<=n&&r.y>=c-n&&r.y<=l+n,h=Math.abs(r.x-a)<=n&&r.y>=c-n&&r.y<=l+n,d=Math.abs(r.y-c)<=n&&r.x>=s-n&&r.x<=a+n,f=Math.abs(r.y-l)<=n&&r.x>=s-n&&r.x<=a+n;return u||h||d||f},"onBorder"),be=t((e,r,n)=>{let{x:o,y:i}=e,s=Math.abs(o-n.x),a=e.width/2,c=n.x<r.x?a-s:a+s,l=e.height/2,u=Math.abs(r.y-n.y),h=Math.abs(r.x-n.x);if(Math.abs(i-r.y)*a>Math.abs(o-r.x)*l){let d=n.y<r.y?r.y-l-i:i-l-r.y;c=h*d/u;let f={x:n.x<r.x?n.x+c:n.x-h+c,y:n.y<r.y?n.y+u-d:n.y-u+d};if(h===0)f.x=r.x;if(u===0)f.y=r.y;return f}else{if(n.x<r.x)c=r.x-a-o;else c=o-a-r.x;let d=u*c/h,f=n.x<r.x?n.x+h-c:n.x-h+c,g=n.y<r.y?n.y+d:n.y-d;if(h===0)f=r.x;if(u===0)g=r.y;return{x:f,y:g}}},"intersection"),T=t((e,r)=>{let{x:n,y:o}=e,i=Math.abs(r.x-n),s=Math.abs(r.y-o),a=e.width/2,c=e.height/2;return i>=a||s>=c},"outsideNode"),we=t((e,r,n=ke)=>{let o=Math.abs(r.x-e.x),i=Math.abs(r.y-e.y),s=e.width/2,a=e.height/2;if(Math.abs(o-s)<R||Math.abs(i-a)<R){let c=r.x-e.x,l=r.y-e.y,u=Math.sqrt(c*c+l*l);if(u>0)return{x:e.x+c/u*(u+n),y:e.y+l/u*(u+n)}}return r},"ensureTrulyOutside"),Ie=t((e,r,n)=>{let o=Math.abs(r.x-e.x)<R,i=Math.abs(r.y-e.y)<R;return{x:o?r.x:r.x<e.x?e.x-e.width/4:e.x+e.width/4,y:i?r.y:n.y}},"makeInsidePoint"),Oe=t((e,r,n)=>{if(!e?.intersect)return null;let o=e.intersect(n);if(!o)return null;if(n.x<r.x&&o.x>r.x||n.x>r.x&&o.x<r.x)return null;if(Math.hypot(n.x-o.x,n.y-o.y)<=R)return null;return o},"tryNodeIntersect"),Se=t((e,r,n)=>{let o=Ie(e,r,n);return be(e,r,o)},"fallbackIntersection"),Pe=20,Et=0.000001,W=t((e,r,n)=>{let o=e.intersect?.(n);if(!o)return!1;let i=Math.hypot(n.x-r.x,n.y-r.y),s=Math.hypot(o.x-r.x,o.y-r.y);return i<=s+0.000000001},"insideOutline"),Me=t((e,r,n,o)=>{if(!e?.intersect)return null;let i=o.x-n.x,s=o.y-n.y;if(i===0&&s===0)return null;if(Math.abs(i)>Et&&Math.abs(s)>Et)return null;let a={x:r.x,y:r.y},c=Math.abs(i)>Math.abs(s),l=t((d)=>c?{x:d,y:n.y}:{x:n.x,y:d},"along"),u=c?a.x:a.y,h=c?n.x:n.y;if(!W(e,a,l(u)))return null;if(W(e,a,l(h)))return{...n};for(let d=0;d<Pe;d++){let f=(u+h)/2;if(W(e,a,l(f)))u=f;else h=f}return l(u)},"outlineAttachPoint"),C=t((e,r,n,o)=>{let i=we(r,n);return Oe(e,r,i)??Se(r,i,o)},"computeNodeIntersection"),L=t((e,r,n,o=0.1)=>{if(!n||e.length===0)return;if(r==="start")if(e.length>0&&Math.abs(e[0].x-n.x)<o&&Math.abs(e[0].y-n.y)<o)e.shift();else e[0]=n;else{let i=e.length-1;if(e.length>0&&Math.abs(e[i].x-n.x)<o&&Math.abs(e[i].y-n.y)<o)e.pop();else e[i]=n}},"replaceEndpoint"),wt=8,It=t((e)=>{if(typeof e!=="string")return 0;return Math.max(Zt[e]??0,xm[e]??0)},"markerPathOffset"),xt={arrow_open:["none","none"],arrow_cross:["none","arrow_cross"],double_arrow_cross:["arrow_cross","arrow_cross"],arrow_point:["none","arrow_point"],double_arrow_point:["arrow_point","arrow_point"],arrow_circle:["none","arrow_circle"],double_arrow_circle:["arrow_circle","arrow_circle"]},N=12,Ot=`[top=${N},left=${N},bottom=${N},right=${N}]`,O=24,St=24,Pt=50,P=15,M=10,nt={"spacing.baseValue":15,"spacing.nodeNode":15,"elk.aspectRatio":"1.6","elk.expandNodes":"true","elk.rectpacking.trybox":"true","elk.rectpacking.packing.compaction.rowHeightReevaluation":"true","elk.rectpacking.packing.compaction.iterations":10,"elk.rectpacking.whiteSpaceElimination.strategy":"EQUAL_BETWEEN_STRUCTURES","elk.rectpacking.widthApproximation.strategy":"SCANLINE"},Ne=["nodeSize.constraints","nodeSize.minimum","elk.algorithm","elk.aspectRatio","elk.contentAlignment","elk.expandNodes","elk.padding",...Object.keys(nt)];function Mt(e){for(let r of Ne)delete e[r];e["spacing.baseValue"]=St,e["spacing.nodeNode"]=Pt}t(Mt,"clearContainerAlgorithmOptions");var mt=new Set(["elk.layered","elk.box","elk.rectpacking","elk.stress","elk.force","elk.mrtree","elk.radial","elk.sporeOverlap"]);function it(e,r){if(typeof e!=="string")return;if(!mt.has(e)){r?.warn(`Unknown container layout algorithm "${e}". Supported values: ${[...mt].join(", ")}. Falling back to the diagram's layout algorithm.`);return}return e}t(it,"resolveContainerAlgorithm");function ot(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"TB":case"TD":return"DOWN";case"BT":return"UP";default:return"DOWN"}}t(ot,"dir2ElkDirection");function F(e){if(!zg(e.shape))return 0;return(e.labelData?.width??e.labels?.[0]?.width??0)+(e.padding??0)}t(F,"groupTitleWidth");function st(e){if(!zg(e.shape))return{};return{"nodeSize.constraints":"[MINIMUM_SIZE, NODE_LABELS]","nodeSize.minimum":`(${F(e)}, 0)`}}t(st,"groupTitleSizeOptions");function Nt(e,r,n,o){let i=e.labelData?.width??0,s=e.padding??0,a=i+2*s,c=e.labelData?.height??0,l=ct(r?.preset),u={...st(e),"spacing.baseValue":St,"elk.layered.spacing.edgeNodeBetweenLayers":30,"elk.spacing.edgeEdge":20,"spacing.nodeNode":Pt,"elk.padding":`[top=${O},left=${O},bottom=${O},right=${O}]`,"nodeLabels.placement":"[H_CENTER V_TOP, INSIDE]","elk.layered.mergeEdges":r?.mergeEdges,"elk.layered.nodePlacement.bk.fixedAlignment":r?.nodePlacementAlignment??l.alignment,"elk.layered.nodePlacement.strategy":r?.nodePlacementStrategy??l.containerPlacement,"elk.layered.cycleBreaking.strategy":r?.cycleBreakingStrategy??l.cycleBreaking,"elk.layered.nodePlacement.networkSimplex.nodeFlexibility":"PORT_POSITION","elk.spacing.portsSurrounding":Ot},h=it(e.metadata?.algorithm,o);if(h){let d=c+P;if(u["nodeSize.constraints"]="[MINIMUM_SIZE, NODE_LABELS]",u["nodeSize.minimum"]=`(${a}, ${d+P})`,u["elk.algorithm"]=h,u["elk.hierarchyHandling"]="SEPARATE_CHILDREN",u["elk.aspectRatio"]="2.0",u["elk.contentAlignment"]="H_CENTER V_TOP",u["elk.expandNodes"]="true",u["elk.padding"]=`[top=${d},left=${P},bottom=${P},right=${P}]`,h==="elk.rectpacking"){let f=c+M;Object.assign(u,nt,{"elk.padding":`[top=${f},left=${M},bottom=${M},right=${M}]`,"nodeSize.minimum":`(${a}, ${f+M})`})}}else if(e.dir)u["elk.algorithm"]=n,u["elk.direction"]=ot(e.dir),u["elk.hierarchyHandling"]="SEPARATE_CHILDREN";return Object.assign(u,me),u}t(Nt,"buildSubgraphLayoutOptions");function At(e,r){let n=new Set,o=new Map;for(let{id:i,parentId:s}of e){let a=o.get(s);if(a)a.push(i);else o.set(s,[i])}for(let i of o.values()){let s=new Set(i),a=new Map(i.map((p)=>[p,0])),c=new Map(i.map((p)=>[p,[]])),l=[];for(let p of r){let y=p.source==null?void 0:String(p.source),E=p.target==null?void 0:String(p.target);if(!y||!E||y===E)continue;if(!s.has(y)||!s.has(E))continue;a.set(E,(a.get(E)??0)+1),c.get(y).push(E),c.get(E).push(y),l.push([y,E])}let u=new Map,h=0;for(let p of i){if(u.has(p))continue;let y=[p];u.set(p,h);while(y.length>0){let E=y.pop();for(let b of c.get(E))if(!u.has(b))u.set(b,h),y.push(b)}h++}let d=Array(h).fill(!1);for(let p of i)if((a.get(p)??0)===0)d[u.get(p)]=!0;if(!d.includes(!1))continue;let f=new Map(i.map((p)=>[p,[]])),g=new Map(i.map((p)=>[p,0])),m=t((p,y)=>{let E=new Set([p]),b=[p];while(b.length>0){let w=b.pop();if(w===y)return!0;for(let x of f.get(w))if(!E.has(x))E.add(x),b.push(x)}return!1},"reaches");for(let[p,y]of l){if(m(y,p))continue;f.get(p).push(y),g.set(y,(g.get(y)??0)+1)}let k=Array(h).fill(!1);for(let p of i){let y=u.get(p);if(!d[y]&&!k[y]&&g.get(p)===0)n.add(p),k[y]=!0}}return n}t(At,"findCyclicEntryNodes");function _t(e,r){if(!e.config.elk?.keepEntryNodeOnTop)return;let n=At(e.nodes,e.edges.map((o)=>({source:o.start,target:o.end})));for(let o of n){let i=r[o];if(i)i.layoutOptions={...i.layoutOptions,"elk.layered.layering.layerConstraint":"FIRST"}}}t(_t,"applyCyclicEntryConstraint");function vt(e,r){let n=at(r);return Dt(n),se(e,n),{algorithm:n.algorithm}}t(vt,"prepareLayoutForElk");async function Rt(e,r){let n=at(r),o=Tt(e,n),i=new yt;n.log.info("Drawing flowchart using v4 renderer",i);let s=await Yt(i,o.elkGraph,n.log);return Kt(e,s,o,n.log),Ct(e.nodes),s}t(Rt,"runElkLayoutCore");function Tt(e,r){let n={},o=Lt(e,r.algorithm,r.rootLayoutOptions),i=e.direction??"DOWN";o.layoutOptions["elk.direction"]=ot(i);let s=Gt(e.nodes,r.log);return lt(e.nodes,o,n,r),Ht(e,o,n,r),Wt(e,n,s,r),$t(o,n,s,r.log),_t(e,n),{elkGraph:o,nodeDb:n,parentLookupDb:s}}t(Tt,"buildElkGraphFromLayoutData");var Ve=oi({afterPaint:bt,prepareLayout:vt,measureLayout:t((e,r)=>Sp(e,r,{unwrapGroupLabels:!0}),"measureLayout"),runLayoutCore:Rt,paintOptions:{skipIntersect:!0}});function Dt(e){va(e.getConfig())}t(Dt,"syncHostConfig");function Ct(e){let r=new Map(e.map((n)=>[n.id,n]));e.sort((n,o)=>{if(n.isGroup!==o.isGroup)return n.isGroup?-1:1;if(n.isGroup&&o.isGroup)return K(n,r)-K(o,r);return 0})}t(Ct,"orderNodesForElkPaint");function K(e,r){let n=0,o=new Set,i=e.parentId;while(i&&!o.has(i)){o.add(i);let s=r.get(i);if(!s?.isGroup)break;n++,i=s.parentId}return n}t(K,"getGroupDepth");function at(e){let r=e.helpers;if(!r)throw Error("ELK layout requires Mermaid internal helpers");return{algorithm:e.preparedLayout?.algorithm??e.options?.algorithm,rootLayoutOptions:e.options?.rootLayoutOptions,common:r.common,getConfig:r.getConfig,interpolateToCurve:r.interpolateToCurve,log:r.log}}t(at,"getElkLayoutContext");var Y={default:{layering:"NETWORK_SIMPLEX",placement:"BRANDES_KOEPF",containerPlacement:"BRANDES_KOEPF",alignment:"BALANCED",cycleBreaking:"DEPTH_FIRST"},legacy:{layering:"NETWORK_SIMPLEX",placement:"BRANDES_KOEPF",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"GREEDY"},modelOrder:{layering:"NETWORK_SIMPLEX",placement:"NETWORK_SIMPLEX",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"GREEDY_MODEL_ORDER"},depthFirst:{layering:"NETWORK_SIMPLEX",placement:"NETWORK_SIMPLEX",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"DEPTH_FIRST"}};function ct(e){return e!==void 0&&Object.hasOwn(Y,e)?Y[e]:Y.default}t(ct,"resolveElkPreset");function Lt(e,r,n){let o=ct(e.config.elk?.preset),i={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.algorithm":r,"elk.layered.nodePlacement.strategy":e.config.elk?.nodePlacementStrategy??o.placement,"elk.layered.nodePlacement.bk.fixedAlignment":e.config.elk?.nodePlacementAlignment??o.alignment,"elk.layered.mergeEdges":e.config.elk?.mergeEdges,"elk.direction":"DOWN","spacing.baseValue":40,"elk.layered.crossingMinimization.forceNodeModelOrder":e.config.elk?.forceNodeModelOrder,"elk.layered.considerModelOrder.strategy":e.config.elk?.considerModelOrder,"elk.layered.unnecessaryBendpoints":!0,"elk.layered.cycleBreaking.strategy":e.config.elk?.cycleBreakingStrategy??o.cycleBreaking,"elk.layered.layering.strategy":e.config.elk?.layeringStrategy??o.layering,"elk.layered.layering.coffmanGraham.layerBound":e.config.elk?.layeringLayerBound,"elk.layered.wrapping.multiEdge.improveCuts":!0,"elk.layered.wrapping.multiEdge.improveWrappedEdges":!0,"elk.layered.edgeRouting.selfLoopDistribution":"EQUALLY","elk.layered.mergeHierarchyEdges":!0,"elk.spacing.portsSurrounding":Ot},children:[],edges:[]};if(r==="elk.rectpacking")Object.assign(i.layoutOptions,nt,{"elk.contentAlignment":"H_CENTER V_TOP","elk.padding":"[top=15,left=15,bottom=15,right=15]"});if(n)Object.assign(i.layoutOptions,n);return Object.assign(i.layoutOptions,ye,Ee,xe),i}t(Lt,"createRootElkGraph");function Gt(e,r){let n={parentById:{},childrenById:{}},o=e.filter((i)=>i.isGroup);return r.info("Subgraphs - ",o),o.forEach((i)=>{e.filter((a)=>a.parentId===i.id).forEach((a)=>{n.parentById[a.id]=i.id,n.childrenById[i.id]??=[],n.childrenById[i.id].push(a.id)})}),n}t(Gt,"addSubGraphs");function lt(e,r,n,o,i){let s=e.filter((a)=>a?.parentId===i);return o.log.info("addVertices APA12",s,i),s.forEach((a)=>{Bt(r,e,a,n,o)}),r}t(lt,"addVertices");function Bt(e,r,n,o,i){let s=Ft(n);if(e.children.push(s),o[n.id]=s,n.isGroup)s.children=[],lt(r,s,o,i,n.id),s.labelData=Ut(n,i.getConfig())}t(Bt,"addVertex");function Ft(e){let r={...e};if(delete r.domId,e.isGroup)r.children=[];else if(r.width=e.width??0,r.height=e.height??0,e.spreadPorts)r.layoutOptions={...r.layoutOptions,"elk.portAlignment.default":"CENTER"};return r}t(Ft,"createElkNode");function Ut(e,r){let n=e.labelData;if(n)return n;if(e.labelBBox)return{width:e.labelBBox.width,height:Math.max(0,e.labelBBox.height-2),wrappingWidth:e.wrappingWidth??r.flowchart?.wrappingWidth};return{width:0,height:0,wrappingWidth:e.wrappingWidth??r.flowchart?.wrappingWidth}}t(Ut,"getMeasuredLabelData");function Ht(e,r,n,o){o.log.info("abc78 DAGA edges = ",e);let i={};return e.edges.forEach((s)=>{let a=s.id;i[a]=(i[a]??-1)+1;let c=a;s.id=c,o.log.info("abc78 new link id to be used is",a,c,i[a]);let{source:l,target:u,sourceId:h,targetId:d}=Xt(s,n);o.log.debug("abc78 source and target",l,u),r.edges.push({...s,sources:[l],targets:[u],sourceId:h,targetId:d,labels:[{width:s.width??0,height:s.height??0,orgWidth:s.width??0,orgHeight:s.height??0,text:s.label??"",layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}}]})}),r}t(Ht,"addEdgesToElkGraph");function Xt(e,r){let{start:n,end:o}=e,i=n,s=o,a=n?r[n]:void 0,c=o?r[o]:void 0;if(!a||!c)return{source:i,target:s};return{source:i,target:s,sourceId:n,targetId:o}}t(Xt,"getEdgeStartEndPoint");function Wt(e,r,n,o){e.nodes.forEach((i)=>{let s=r[i.id];if(!s||n.childrenById[s.id]===void 0)return;s.labels=[{text:s.label,width:s?.labelData?.width??50,height:s?.labelData?.height??50}],o.log.debug("UIO node label",s?.labelData?.width,s.padding),s.layoutOptions=Nt(s,e.config.elk,o.algorithm,o.log),delete s.x,delete s.y,delete s.width,delete s.height})}t(Wt,"configureSubgraphNodes");function $t(e,r,n,o){o.debug("APA01 processing edges, count:",e.edges.length),e.edges.forEach((i,s)=>{o.debug("APA01 processing edge",s,":",i);let a=i.sources[0],c=i.targets[0];if(o.debug("APA01 source:",a,"target:",c),o.debug("APA01 nodeDb[source]:",r[a]),o.debug("APA01 nodeDb[target]:",r[c]),r[a]&&r[c]&&r[a].parentId!==r[c].parentId){let l=kt(a,c,n);G(r,a,l,o),G(r,c,l,o)}})}t($t,"configureCrossHierarchyEdges");function G(e,r,n,o){let i=e[r];if(!i)return;if(i.layoutOptions??={},i.layoutOptions["elk.hierarchyHandling"]==="SEPARATE_CHILDREN"&&it(i.metadata?.algorithm))o.debug("Dropping explicit algorithm for node",i.id,"due to cross-boundary edges"),Mt(i.layoutOptions),Object.assign(i.layoutOptions,st(i));if(i.layoutOptions["elk.hierarchyHandling"]="INCLUDE_CHILDREN",i.id!==n&&i.parentId)G(e,i.parentId,n,o)}t(G,"setIncludeChildrenPolicy");async function Yt(e,r,n){let o=globalThis.__mermaidProfiler;try{o?.begin("layoutCore");let i;try{i=await e.layout(r)}finally{o?.end()}return n.debug("APA01 after - success"),n.debug("APA01 layout result:",i),i}catch(i){throw n.error("ELK layout error:",i),i}}t(Yt,"runElkLayout");function Kt(e,r,n,o){let i=new Map(e.nodes.map((s)=>[s.id,s]));ht(r.children??[],n,i,0,0,0,o),ft(r.children??[],n,i,r),qt(e,r,n,o)}t(Kt,"applyElkLayoutResult");function ut(e,r=new Set){for(let n of e.children??[])r.add(n.id),ut(n,r);return r}t(ut,"collectDescendantIds");function jt(e,r,n,o){let i=[];for(let s of e.edges??[]){let a=s.sources?.[0]??s.start,c=s.targets?.[0]??s.end,l=r.has(a)&&r.has(c),u=a===o,h=c===o;if(!l&&!u&&!h)continue;let d=B(a,c,n.parentLookupDb,n.nodeDb);for(let f of s.sections??[]){let g=l?[f.startPoint,...f.bendPoints??[],f.endPoint]:[u?f.startPoint:null,h?f.endPoint:null];for(let m of g)if(m)i.push({x:m.x+d.x,y:m.y+d.y})}}return i}t(jt,"internalEdgePoints");function ft(e,r,n,o={}){for(let i of e){if(!i?.isGroup)continue;let s=i.children??[];ft(s,r,n,o);let a=r.nodeDb[i.id],c=s.map((x)=>r.nodeDb[x.id]).filter((x)=>x?.offset&&x.width&&x.height);if(!a?.offset||c.length===0)continue;let l=jt(o,ut(i),r,i.id),u=[...c.map((x)=>x.offset.posX),...c.map((x)=>x.offset.posX+x.width),...l.map((x)=>x.x)],h=[...c.map((x)=>x.offset.posY),...c.map((x)=>x.offset.posY+x.height),...l.map((x)=>x.y)],d=a.offset,f=Math.max(d.posX,Math.min(...u)-O),g=Math.min(d.posX+a.width,Math.max(...u)+O),m=Math.min(d.posY+a.height,Math.max(...h)+O),k=d.posY,p=F(i),y=f,E=g-f;if(E<p){y-=(p-E)/2,E=p;let x=d.posX+a.width;y=Math.max(d.posX,Math.min(y,x-E)),E=Math.min(E,a.width)}let b=m-k;if(b<=0||E<=0)continue;a.elkOrigin??={posX:d.posX,posY:d.posY},a.offset.posX=y,a.offset.width=E,a.offset.height=b,a.width=E,a.height=b,a.x=y+E/2,a.y=k+b/2;let w=n.get(i.id);if(w)w.x=a.x,w.y=a.y,w.width=E,w.height=b}}t(ft,"evenGroupFrames");function ht(e,r,n,o,i,s,a){e.forEach((c)=>{if(!c)return;let l=r.nodeDb[c.id]??c,u=Math.max(c.width,c.labels?c.labels[0]?.width||0:0),h={posX:c.x+o,posY:c.y+i,x:o,y:i,depth:s,width:u,height:c.height};l.offset=h,l.x=h.posX+c.width/2,l.y=h.posY+c.height/2,l.width=c.width,l.height=c.height;let d=n.get(c.id);if(d){d.x=l.x,d.y=l.y,d.width=c.isGroup?Math.max(c.width,c.labelData?.width??0):c.width,d.height=c.height;let f=d;f.labelData=c.labelData,f.labels=c.labels}if(c.isGroup)a.debug("Id abc88 subgraph = ",c.id,c.x,c.y,c.labelData),ht(c.children??[],r,n,h.posX,h.posY,s+1,a);else a.info("Id NODE = ",c.id,c.x,c.y,o,i,`translate(${l.x}, ${l.y})`)})}t(ht,"applyElkNodePositions");var Ae=16,_e=30,A=0.01;function _(e,r){let n=Math.abs(r.x-e.x),o=Math.abs(r.y-e.y);if(n>A&&o<=A)return"h";if(o>A&&n<=A)return"v";return}t(_,"axisOf");function Vt(e){let r=j(e)??e,n=[...r].reverse(),o=j(n);if(o)r=o.reverse();return r}t(Vt,"straightenTerminalJogs");function j(e){if(e.length<5)return null;let[r,n,o,i]=e,s=_(r,n);if(!s||_(o,i)!==s||_(n,o)!==(s==="h"?"v":"h"))return null;if(Math.hypot(n.x-r.x,n.y-r.y)>_e)return null;let a=s==="h"?Math.abs(o.y-n.y):Math.abs(o.x-n.x);if(a<A||a>Ae)return null;if(!(s==="h"?Math.sign(n.x-r.x)===Math.sign(i.x-o.x):Math.sign(n.y-r.y)===Math.sign(i.y-o.y)))return null;let l=3;while(l+1<e.length&&_(e[l],e[l+1])===s)l++;if(l===e.length-1)return null;let u=[...e];for(let h=2;h<=l;h++)u[h]=s==="h"?{x:e[h].x,y:r.y}:{x:r.x,y:e[h].y};return u.splice(1,2),u}t(j,"straightenFront");function zt(e,r,n,o){let i=t((u,h,d)=>(h.x-u.x)*(d.y-u.y)-(h.y-u.y)*(d.x-u.x),"side"),s=i(n,o,e),a=i(n,o,r),c=i(e,r,n),l=i(e,r,o);return(s>0&&a<0||s<0&&a>0)&&(c>0&&l<0||c<0&&l>0)}t(zt,"segmentsCrossStrict");function V(e,r){let n=0;for(let o=0;o<e.length-1;o++)for(let i=0;i<r.length-1;i++)if(zt(e[o],e[o+1],r[i],r[i+1]))n++;return n}t(V,"crossingCount");function Jt(e){let r=e.map((n)=>n.points??[]);for(let[n,o]of e.entries()){let i=r[n];if(i.length<5)continue;let s=Vt(i);if(s===i)continue;let a=0,c=0;for(let[l,u]of r.entries()){if(l===n||u.length<2)continue;a+=V(i,u),c+=V(s,u)}if(c>a)continue;o.points=s,r[n]=s}}t(Jt,"straightenEdgeTerminals");function qt(e,r,n,o){let i=new Map(e.edges.map((l)=>[l.id,l])),s=e.config.elk?.straightenEdges!==!1,a=new Map(e.nodes.map((l)=>[l.id,l])),c=new Set;if(r.edges?.forEach((l)=>{if(!l.sections?.length)return;let u=n.nodeDb[l.sources?.[0]??l.start],h=n.nodeDb[l.targets?.[0]??l.end];if(!u||!h)return;let d=l.start??l.sourceId??l.sources?.[0],f=l.end??l.targetId??l.targets?.[0],g=B(d,f,n.parentLookupDb,n.nodeDb),m=l.sections[0];if(u.shape!=="rect33")z(u,{x:m.startPoint.x+g.x,y:m.startPoint.y+g.y},a,c);if(h.shape!=="rect33")z(h,{x:m.endPoint.x+g.x,y:m.endPoint.y+g.y},a,c)}),r.edges?.forEach((l)=>{let u=i.get(l.id);if(!u)return;let h=l.sources?.[0]??l.start,d=l.targets?.[0]??l.end,f=n.nodeDb[h],g=n.nodeDb[d];if(!f||!g)return;if(!l.sections?.length){let x=t((S)=>({x:(S.offset?.posX??S.x??0)+(S.width??0)/2,y:(S.offset?.posY??S.y??0)+(S.height??0)/2}),"centre"),U=x(f),H=x(g);f.x=U.x,f.y=U.y,g.x=H.x,g.y=H.y;let D=J([U,H],f,g,o);u.points=D,u.curve="linear";let dt=D[0],gt=D[D.length-1];u.x=(dt.x+gt.x)/2,u.y=(dt.y+gt.y)/2,o.debug("APA18 no edge sections, using a straight line",l.id,u.points);return}let m=l.start??l.sourceId??h,k=l.end??l.targetId??d,p=B(m,k,n.parentLookupDb,n.nodeDb);o.debug("APA18 offset",p,m," ==> ",k,"edge:",l,f);let y=l.sections[0],E=Qt(y,p);if(f.x=f.offset.posX+f.width/2,f.y=f.offset.posY+f.height/2,g.x=g.offset.posX+g.width/2,g.y=g.offset.posY+g.height/2,f.shape!=="rect33")E.unshift({x:f.x,y:f.y});if(g.shape!=="rect33")E.push({x:g.x,y:g.y});let b=J(E,f,g,o);u.points=ie(oe(b,I(g),re(u),o),I(f),ne(u),o),u.curve="rounded";let w=l.labels?.[0];if(w)u.x=w.x+p.x+w.width/2,u.y=w.y+p.y+w.height/2}),s)Jt(e.edges)}t(qt,"applyElkEdgeLayout");function z(e,r,n,o){let i=e.width??0,s=e.height??0,a=e.offset.posY,c=a+s,l=0.5,u=Math.abs(r.y-a)<=0.5||Math.abs(r.y-c)<=0.5;if((u?i:s)>=2*N)return;if(o.has(e.id))return;o.add(e.id);let h=u?r.x-(e.offset.posX+i/2):r.y-(e.offset.posY+s/2);if(Math.abs(h)<0.01)return;if(u)e.offset.posX+=h,e.x=e.offset.posX+i/2;else e.offset.posY+=h,e.y=e.offset.posY+s/2;let d=n.get(e.id);if(d)d.x=e.offset.posX+i/2,d.y=e.offset.posY+s/2}t(z,"alignDegenerateNodeToAnchor");function Qt(e,r){let{startPoint:n,endPoint:o}=e,s=(e.bendPoints?e.bendPoints:[]).map((a)=>({x:a.x+r.x,y:a.y+r.y}));return[{x:n.x+r.x,y:n.y+r.y},...s,{x:o.x+r.x,y:o.y+r.y}]}t(Qt,"createEdgePointsFromSection");function B(e,r,n,o){let i=kt(e,r,n);if(i===void 0||i==="root")return{x:0,y:0};let s=o[i],a=s?.elkOrigin??s?.offset;return{x:a?.posX??0,y:a?.posY??0}}t(B,"calcOffset");function J(e,r,n,o){let i=Array.isArray(e)?[...e]:[],s=I(n);o.debug("PPP cutter2: Points before cutter2:",JSON.stringify(e),"endBounds:",s,v(s,e[e.length-1]));let a;{let c=I(r),l=I(n),u=!!r?.isGroup,h=!!n?.isGroup,{candidate:d,centerApprox:f}=Z(i,r,"start"),{candidate:g,centerApprox:m}=Z(i,n,"end"),k=u&&v(c,d),p=h&&v(l,g);if(tt(i,"start",k&&f),tt(i,"end",p&&m),u&&!k)k=et(i,c,"start");if(h&&!p)p=et(i,l,"end");if(k||p){if(!k)he(i,r,c,o);if(!p)de(i,n,l,o);o.debug("PPP cutter2: skipping cutter2 due to on-border group endpoint(s)",{skipStart:k,skipEnd:p,startCenterApprox:f,endCenterApprox:m,startCandidate:d,endCandidate:g}),a=i}else a=ge(r,n,i,o)}if(o.debug("PPP cutter2: Points after cutter2:",JSON.stringify(a)),!Array.isArray(a)||a.length<2||te(a)){o.warn("POI cutter2: Invalid points from cutter2, falling back to prevPoints",a);let c=i.filter((l)=>Number.isFinite(l?.x)&&Number.isFinite(l?.y));a=c.length>=2?c:i}return o.debug("UIO cutter2: Points after cutter2 (sanitized):",a),ee(a,o)}t(J,"sanitizeElkEdgePoints");function te(e){return e?.some((r)=>!Number.isFinite(r?.x)||!Number.isFinite(r?.y))}t(te,"hasInvalidPoint");function ee(e,r){let n=e.filter((o,i,s)=>{if(i===0)return!0;let a=s[i-1];return Math.abs(o.x-a.x)>0.000001||Math.abs(o.y-a.y)>0.000001});if(n.length!==e.length)r.debug("UIO cutter2: removed consecutive duplicate points",{before:e,after:n});return n}t(ee,"dedupeConsecutivePoints");function re(e){return It(e.arrowTypeEnd)}t(re,"getEndMarkerPathOffset");function ne(e){return It(e.arrowTypeStart)}t(ne,"getStartMarkerPathOffset");function ie(e,r,n,o){if(n<=0||e.length<3)return e;let i=e[0],s=e[1],a=Math.hypot(s.x-i.x,s.y-i.y);if(a>=Math.max(wt,n*2))return e;if(!v(r,s,1))return e;let c=[i,...e.slice(2)];return o.debug("UIO cutter2: removed short start marker segment",{before:e,after:c,markerOffset:n,segmentLength:a}),c}t(ie,"ensureStartMarkerSegmentLength");function oe(e,r,n,o){if(n<=0||e.length<3)return e;let i=e[e.length-1],s=e[e.length-2],a=Math.hypot(i.x-s.x,i.y-s.y);if(a>=Math.max(wt,n*2))return e;if(!v(r,s,1))return e;let c=[...e.slice(0,-2),i];return o.debug("UIO cutter2: removed short end marker segment",{before:e,after:c,markerOffset:n,segmentLength:a}),c}t(oe,"ensureEndMarkerSegmentLength");function se(e,r){let n=e.edges.defaultInterpolate,o=e.edges.defaultStyle,i=r.getConfig();e.edges.forEach((s)=>{let a=ue(s,{defaultStyle:o,defaultInterpolate:n,confCurve:i.curve},r);Object.assign(s,a)})}t(se,"applyElkEdgeRenderData");function ae(e){if(e.classes!==void 0)return e.classes;if(e.start&&e.end)return`flowchart-link LS_${e.start} LE_${e.end}`;return}t(ae,"buildFallbackEdgeClasses");function ce(e,r,n){let o="normal",i="solid",s=[],a=[];if(e==="dotted")i="dotted",s=["fill:none","stroke-width:2px","stroke-dasharray:3"];else if(e==="thick")o="thick",s=["stroke-width: 3.5px","fill:none"];else if(s=r??["fill:none"],n!==void 0)a=n;return{thickness:o,pattern:i,style:s,labelStyle:a}}t(ce,"computeStroke");function le(e,r,n){if(e!==void 0)return e;if(r!==void 0)return r;return n}t(le,"getCurve");function ue(e,r,n){let o={};o.minlen=e.minlen??e.length??1,o.text=e.text??e.label,o.arrowhead=e.arrowhead??(e.type==="arrow_open"?"none":"normal");let i=xt[e.type??"arrow_open"]??xt.arrow_open;o.arrowTypeStart=e.arrowTypeStart??i[0],o.arrowTypeEnd=e.arrowTypeEnd??i[1],o.startLabelRight=e.startLabelRight,o.endLabelLeft=e.endLabelLeft;let s=ce(e.stroke,r.defaultStyle,r.defaultLabelStyle);o.thickness=e.thickness??s.thickness,o.pattern=e.pattern??s.pattern,o.style=e.style??s.style,o.labelStyle=e.labelStyle??s.labelStyle,o.classes=ae(e),o.curve=n.interpolateToCurve(le(e.curve??e.interpolate,r.defaultInterpolate,r.confCurve),ka);let a=(o.text??"")!=="";if(e.arrowheadStyle!==void 0)o.arrowheadStyle=e.arrowheadStyle;else if(a||e.style!==void 0)o.arrowheadStyle="fill: #333";return o.labelpos=e.labelpos??(a?"c":void 0),o.labelType=e.labelType,o.label=(e.label??o.text??"").replace(n.common.lineBreakRegex,`
2
2
  `),o}t(ue,"buildEdgeData");function fe(e){return Math.max(e.width??0,F(e))}t(fe,"getEffectiveGroupWidth");function I(e){let r=e?.isGroup?fe(e):e.width;return{x:e.offset.posX+e.width/2,y:e.offset.posY+e.height/2,width:r??0,height:e.height??0,padding:e.padding}}t(I,"boundsFor");function q(e,r,n=0.000001){return Math.abs(e-r)<n}t(q,"approxEq");function Q(e,r){return q(e.x,r.x??0)&&q(e.y,r.y??0)}t(Q,"isCenterApprox");function Z(e,r,n){if(!e?.length)return{candidate:{x:r.x??0,y:r.y??0},centerApprox:!0};if(n==="start"){let o=e[0],i=Q(o,r);return{candidate:i&&e.length>1?e[1]:o,centerApprox:i}}else{let o=e[e.length-1],i=Q(o,r);return{candidate:i&&e.length>1?e[e.length-2]:o,centerApprox:i}}}t(Z,"getCandidateBorderPoint");function tt(e,r,n){if(!n)return;if(r==="start"){if(e.length>0)e.shift()}else if(e.length>0)e.pop()}t(tt,"dropAutoCenterPoint");function et(e,r,n){let o=n==="start"?1:-1,i=n==="start"?0:e.length-1,s=i;while(i>=0&&i<e.length&&!T(r,e[i]))i+=o;if(i===s||i<0||i>=e.length)return!1;let a=e[i],c=e[i-o],l=a.x-c.x,u=a.y-c.y,h=l===0?1/0:(r.x+Math.sign(l)*r.width/2-c.x)/l,d=u===0?1/0:(r.y+Math.sign(u)*r.height/2-c.y)/u,f=Math.min(h,d),g={x:c.x+f*l,y:c.y+f*u};if(n==="start")e.splice(0,i,g);else e.splice(i+1,e.length-i-1,g);return!0}t(et,"clipGroupEndpoint");function he(e,r,n,o){let i=-1;for(let[s,a]of e.entries())if(T(n,a)){i=s;break}if(i!==-1){let s=e[i],a=e[0],c=C(r,n,s,a);L(e,"start",c),o.debug("UIO cutter2: start-only intersection applied",{startIntersection:c})}}t(he,"applyStartIntersectionIfNeeded");function de(e,r,n,o){let i=-1;for(let s=e.length-1;s>=0;s--)if(T(n,e[s])){i=s;break}if(i!==-1){let s=e[i],a=e[e.length-1],c=C(r,n,s,a);L(e,"end",c),o.debug("UIO cutter2: end-only intersection applied",{endIntersection:c})}}t(de,"applyEndIntersectionIfNeeded");function rt(e,r,n,o,i){if(e?.isGroup)return null;let s=n[o],a=n[o+i];if(!s||!a)return null;return Me(e,r,s,a)}t(rt,"attachAlongDepartureAxis");function ge(e,r,n,o){let i=I(e),s=I(r);if(n.length===0)return[];let a=[...n],c=a[0],l=a[a.length-1];o.debug("PPP cutter2: bounds",{startBounds:i,endBounds:s}),o.debug("PPP cutter2: original points",n);let u=-1;for(let[f,g]of a.entries())if(u===-1&&T(i,g))u=f;if(u!==-1){let f=a[u],g=rt(e,i,a,u,1)??C(e,i,f,c);o.debug("UIO cutter2: start intersection",g),L(a,"start",g)}let h=null,d=-1;for(let f=a.length-1;f>=0;f--)if(T(s,a[f])){h=a[f],d=f;break}if(!h&&a.length>1)h=a[a.length-2],d=a.length-2;if(h){let f=rt(r,s,a,d,-1)??C(r,s,h,l);o.debug("UIO cutter2: end intersection",{endIntersection:f,outsideIndexForEnd:d}),L(a,"end",f)}if(a.length>1){let f=a[a.length-1],g=a[a.length-2],m=Math.sqrt((f.x-g.x)**2+(f.y-g.y)**2);if(m<2)o.debug("UIO cutter2: trimming tail point (too close)",{distance:m,lastPoint:f,secondLastPoint:g}),a.pop()}return o.debug("UIO cutter2: final points",a),a}t(ge,"cutter2");export{Ve as render};
@@ -1,4 +1,4 @@
1
- import{t,Eo,l,bt,ya,w,M,O,G,z,j,q,H,m,b,V,Mn,hd,yt,ct,ut,ta,Pt,Ot,$t,vt}from"./index-pqmvhqmj.js";var we=function(){var s=t(function(K,n,c,p){for(c=c||{},p=K.length;p--;c[K[p]]=n);return c},"o"),o=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],d=[2,2],a=[1,7],h=[1,9],k=[1,10],S=[1,11],g=[1,12],T=[1,30],f=[1,23],y=[1,24],I=[1,25],Z=[1,26],X=[1,27],C=[1,19],D=[1,28],te=[1,29],R=[1,20],L=[1,18],B=[1,21],F=[1,22],Ve=[2,6],u=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],Se=[1,36],Te=[1,37],Ce=[1,38],Oe=[1,39],Ne=[1,40],se=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],Y=[1,46],P=[1,47],ie=[1,57],re=[43,51,53,54,55,74,75],ae=[1,70],ne=[1,68],U=[1,65],oe=[1,69],le=[1,71],ue=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],de=[1,78],be=[1,77],pe=[1,76],Me=[69,70,71,72,73],Be=[1,91],Ge=[6,9,45,50],J=[6,9,12,44,45,50,51,52],fe=[1,101],ke=[1,100],ge=[1,99],ce=[18,61],Fe=[1,110],Ye=[1,109],Pe=[20,43,51,53,54,55],xe=[18,61,64,66],Ae={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:t(function(n,c,p,r,_,e,he){var i=e.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=e[i-1].concat(e[i]);break;case 4:this.$=e[i];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(e[i-4]),r.addEntity(e[i-2]),r.addRelationship(e[i-4],e[i],e[i-2],e[i-3]),this.$=[e[i-4],e[i-2]];break;case 8:r.addEntity(e[i-8]),r.addEntity(e[i-4]),r.addRelationship(e[i-8],e[i],e[i-4],e[i-5]),r.setClass([e[i-8]],e[i-6]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-8],e[i-4]];break;case 9:r.addEntity(e[i-6]),r.addEntity(e[i-2]),r.addRelationship(e[i-6],e[i],e[i-2],e[i-3]),r.setClass([e[i-6]],e[i-4]),this.$=[e[i-6],e[i-2]];break;case 10:r.addEntity(e[i-6]),r.addEntity(e[i-4]),r.addRelationship(e[i-6],e[i],e[i-4],e[i-5]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-6],e[i-4]];break;case 11:r.addEntity(e[i-3]),r.addAttributes(e[i-3],e[i-1]),this.$=[e[i-3]];break;case 12:r.addEntity(e[i-5]),r.addAttributes(e[i-5],e[i-1]),r.setClass([e[i-5]],e[i-3]),this.$=[e[i-5]];break;case 13:r.addEntity(e[i-2]),this.$=[e[i-2]];break;case 14:r.addEntity(e[i-4]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-4]];break;case 15:r.addEntity(e[i]),this.$=[e[i]];break;case 16:r.addEntity(e[i-2]),r.setClass([e[i-2]],e[i]),this.$=[e[i-2]];break;case 17:r.addEntity(e[i-6],e[i-4]),r.addAttributes(e[i-6],e[i-1]),this.$=[e[i-6]];break;case 18:r.addEntity(e[i-8],e[i-6]),r.addAttributes(e[i-8],e[i-1]),r.setClass([e[i-8]],e[i-3]),this.$=[e[i-8]];break;case 19:r.addEntity(e[i-5],e[i-3]),this.$=[e[i-5]];break;case 20:r.addEntity(e[i-7],e[i-5]),r.setClass([e[i-7]],e[i-2]),this.$=[e[i-7]];break;case 21:r.addEntity(e[i-3],e[i-1]);break;case 22:r.addEntity(e[i-5],e[i-3]),r.setClass([e[i-5]],e[i]);break;case 23:case 24:this.$=e[i].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=e[i].trim(),r.setAccDescription(this.$);break;case 27:if(!r.subgraphDepth)r.setDirection(e[i].value),this.$=[];else this.$=e[i];break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:e[i-2].id},e[i-1],{text:e[i-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:e[i-1],text:e[i-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:e[i-4],text:e[i-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=e[i];break;case 35:this.$=e[i-1]+" "+e[i];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=e[i-3],r.addClass(e[i-2],e[i-1]);break;case 41:case 42:case 63:case 72:this.$=[e[i]];break;case 43:case 44:this.$=e[i-2].concat([e[i]]);break;case 45:this.$=e[i-2],r.setClass(e[i-1],e[i]);break;case 46:this.$=e[i-3],r.addCssStyles(e[i-2],e[i-1]);break;case 47:this.$=[e[i]];break;case 48:e[i-2].push(e[i]),this.$=e[i-2];break;case 50:this.$=e[i-1]+e[i];break;case 58:case 84:case 85:this.$=e[i].replace(/"/g,"");break;case 64:e[i].push(e[i-1]),this.$=e[i];break;case 65:this.$={type:e[i-1],name:e[i]};break;case 66:this.$={type:e[i-2],name:e[i-1],keys:e[i]};break;case 67:this.$={type:e[i-2],name:e[i-1],comment:e[i]};break;case 68:this.$={type:e[i-3],name:e[i-2],keys:e[i-1],comment:e[i]};break;case 69:case 71:case 74:this.$=e[i];break;case 70:this.$=e[i-1]+e[i];break;case 73:e[i-2].push(e[i]),this.$=e[i-2];break;case 75:this.$=e[i].replace(/"/g,"");break;case 76:this.$={cardA:e[i],relType:e[i-1],cardB:e[i-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(o,d,{5:3}),{6:[1,4],7:5,8:6,9:a,10:8,21:h,23:k,25:S,27:g,28:13,29:14,30:15,31:16,32:17,34:T,37:f,38:y,39:I,40:Z,41:X,43:C,46:D,47:te,51:R,53:L,54:B,55:F},s(o,Ve,{1:[2,1]}),s(u,[2,3]),s(u,[2,4]),s(u,[2,5]),s(u,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:Se,70:Te,71:Ce,72:Oe,73:Ne}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(u,[2,26]),s(u,[2,27]),s(u,[2,28]),s(u,[2,29]),s(u,[2,30]),s(u,d,{5:44}),s(se,[2,58]),s(se,[2,59]),s(se,[2,60]),s(se,[2,61]),s(se,[2,62]),s(u,[2,36]),s(u,[2,37]),s(u,[2,38]),s(u,[2,39]),{15:45,43:Y,44:P},{15:48,43:Y,44:P},{15:49,43:Y,44:P},{10:50,43:C,51:R,53:L,54:B,55:F},{10:51,43:C,51:R,53:L,54:B,55:F},{15:52,43:Y,44:P},{17:53,18:[1,54],56:55,57:56,61:ie},{10:58,43:C,51:R,53:L,54:B,55:F},{68:59,74:[1,60],75:[1,61]},s(re,[2,77]),s(re,[2,78]),s(re,[2,79]),s(re,[2,80]),s(re,[2,81]),s(u,[2,23]),s(u,[2,24]),s(u,[2,25]),{6:[1,63],7:5,8:6,9:a,10:8,21:h,23:k,25:S,27:g,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:T,37:f,38:y,39:I,40:Z,41:X,43:C,46:D,47:te,51:R,53:L,54:B,55:F},{12:ae,42:64,44:ne,45:U,48:66,49:67,51:oe,52:le},s(ue,[2,41]),s(ue,[2,42]),{15:72,43:Y,44:P,45:U},{12:ae,42:73,44:ne,45:U,48:66,49:67,51:oe,52:le},{6:de,9:be,19:[1,75],35:74,50:pe},{12:[1,79],14:[1,80]},s(u,[2,16],{67:35,11:81,16:[1,82],45:U,69:Se,70:Te,71:Ce,72:Oe,73:Ne}),{18:[1,83]},s(u,[2,13]),{17:84,18:[2,63],56:55,57:56,61:ie},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:Se,70:Te,71:Ce,72:Oe,73:Ne},s(Me,[2,82]),s(Me,[2,83]),s(u,[2,31]),s(u,Ve),{6:de,9:be,35:90,45:Be,50:pe},{43:[1,92],44:[1,93]},s(Ge,[2,47],{49:94,12:ae,44:ne,51:oe,52:le}),s(J,[2,49]),s(J,[2,54]),s(J,[2,55]),s(J,[2,56]),s(J,[2,57]),s(u,[2,45],{45:U}),{6:de,9:be,35:95,45:Be,50:pe},s(u,[2,32]),{10:97,36:96,43:C,51:R,53:L,54:B,55:F},s(u,[2,51]),s(u,[2,52]),s(u,[2,53]),{13:98,43:fe,53:ke,76:ge},{15:102,43:Y,44:P},{10:103,43:C,51:R,53:L,54:B,55:F},{17:104,18:[1,105],56:55,57:56,61:ie},s(u,[2,11]),{18:[2,64]},s(ce,[2,65],{59:106,60:107,63:108,65:Fe,66:Ye}),s([18,61,65,66],[2,71]),{61:[2,70]},s(u,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(u,[2,40]),{12:ae,44:ne,48:113,49:67,51:oe,52:le},s(ue,[2,43]),s(ue,[2,44]),s(J,[2,50]),s(u,[2,46]),{10:115,20:[1,114],43:C,51:R,53:L,54:B,55:F},s(Pe,[2,34]),s(u,[2,7]),s(u,[2,84]),s(u,[2,85]),s(u,[2,86]),{12:[1,116],45:U},{12:[1,118],14:[1,117]},{18:[1,119]},s(u,[2,14]),s(ce,[2,66],{60:120,64:[1,121],66:Ye}),s(ce,[2,67]),s(xe,[2,72]),s(ce,[2,75]),s(xe,[2,74]),{17:122,18:[1,123],56:55,57:56,61:ie},{15:124,43:Y,44:P},s(Ge,[2,48],{49:94,12:ae,44:ne,51:oe,52:le}),{6:de,9:be,35:125,50:pe},s(Pe,[2,35]),{13:126,43:fe,53:ke,76:ge},{15:127,43:Y,44:P},{13:128,43:fe,53:ke,76:ge},s(u,[2,12]),s(ce,[2,68]),{63:129,65:Fe},{18:[1,130]},s(u,[2,19]),s(u,[2,22],{16:[1,131],45:U}),s(u,[2,33]),s(u,[2,10]),{12:[1,132],45:U},s(u,[2,9]),s(xe,[2,73]),s(u,[2,17]),{17:133,18:[1,134],56:55,57:56,61:ie},{13:135,43:fe,53:ke,76:ge},{18:[1,136]},s(u,[2,20]),s(u,[2,8]),s(u,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:t(function(n,c){if(c.recoverable)this.trace(n);else{var p=Error(n);throw p.hash=c,p}},"parseError"),parse:t(function(n){var c=this,p=[0],r=[],_=[null],e=[],he=this.table,i="",_e=0,ze=0,Ue=0,Qe=2,Ke=1,Xe=e.slice.call(arguments,1),E=Object.create(this.lexer),W={yy:{}};for(var Ie in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Ie))W.yy[Ie]=this.yy[Ie];if(E.setInput(n,W.yy),W.yy.lexer=E,W.yy.parser=this,typeof E.yylloc>"u")E.yylloc={};var Re=E.yylloc;e.push(Re);var Je=E.options&&E.options.ranges;if(typeof W.yy.parseError==="function")this.parseError=W.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function $e(A){p.length=p.length-2*A,_.length=_.length-A,e.length=e.length-A}t($e,"popStack");function Ze(){var A=r.pop()||E.lex()||Ke;if(typeof A!=="number"){if(A instanceof Array)r=A,A=r.pop();A=c.symbols_[A]||A}return A}t(Ze,"lex");var N,ve,Q,x,nt,De,ee={},me,v,je,Ee;while(!0){if(Q=p[p.length-1],this.defaultActions[Q])x=this.defaultActions[Q];else{if(N===null||typeof N>"u")N=Ze();x=he[Q]&&he[Q][N]}if(typeof x>"u"||!x.length||!x[0]){var Le="";Ee=[];for(me in he[Q])if(this.terminals_[me]&&me>Qe)Ee.push("'"+this.terminals_[me]+"'");if(E.showPosition)Le="Parse error on line "+(_e+1)+`:
1
+ import{t,Eo,l,bt,ya,w,M,O,G,z,j,q,H,m,b,V,Mn,hd,yt,ct,ut,ta,Pt,Ot,$t,vt}from"./index-4fpyzg5e.js";var we=function(){var s=t(function(K,n,c,p){for(c=c||{},p=K.length;p--;c[K[p]]=n);return c},"o"),o=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],d=[2,2],a=[1,7],h=[1,9],k=[1,10],S=[1,11],g=[1,12],T=[1,30],f=[1,23],y=[1,24],I=[1,25],Z=[1,26],X=[1,27],C=[1,19],D=[1,28],te=[1,29],R=[1,20],L=[1,18],B=[1,21],F=[1,22],Ve=[2,6],u=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],Se=[1,36],Te=[1,37],Ce=[1,38],Oe=[1,39],Ne=[1,40],se=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],Y=[1,46],P=[1,47],ie=[1,57],re=[43,51,53,54,55,74,75],ae=[1,70],ne=[1,68],U=[1,65],oe=[1,69],le=[1,71],ue=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],de=[1,78],be=[1,77],pe=[1,76],Me=[69,70,71,72,73],Be=[1,91],Ge=[6,9,45,50],J=[6,9,12,44,45,50,51,52],fe=[1,101],ke=[1,100],ge=[1,99],ce=[18,61],Fe=[1,110],Ye=[1,109],Pe=[20,43,51,53,54,55],xe=[18,61,64,66],Ae={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:t(function(n,c,p,r,_,e,he){var i=e.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=e[i-1].concat(e[i]);break;case 4:this.$=e[i];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(e[i-4]),r.addEntity(e[i-2]),r.addRelationship(e[i-4],e[i],e[i-2],e[i-3]),this.$=[e[i-4],e[i-2]];break;case 8:r.addEntity(e[i-8]),r.addEntity(e[i-4]),r.addRelationship(e[i-8],e[i],e[i-4],e[i-5]),r.setClass([e[i-8]],e[i-6]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-8],e[i-4]];break;case 9:r.addEntity(e[i-6]),r.addEntity(e[i-2]),r.addRelationship(e[i-6],e[i],e[i-2],e[i-3]),r.setClass([e[i-6]],e[i-4]),this.$=[e[i-6],e[i-2]];break;case 10:r.addEntity(e[i-6]),r.addEntity(e[i-4]),r.addRelationship(e[i-6],e[i],e[i-4],e[i-5]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-6],e[i-4]];break;case 11:r.addEntity(e[i-3]),r.addAttributes(e[i-3],e[i-1]),this.$=[e[i-3]];break;case 12:r.addEntity(e[i-5]),r.addAttributes(e[i-5],e[i-1]),r.setClass([e[i-5]],e[i-3]),this.$=[e[i-5]];break;case 13:r.addEntity(e[i-2]),this.$=[e[i-2]];break;case 14:r.addEntity(e[i-4]),r.setClass([e[i-4]],e[i-2]),this.$=[e[i-4]];break;case 15:r.addEntity(e[i]),this.$=[e[i]];break;case 16:r.addEntity(e[i-2]),r.setClass([e[i-2]],e[i]),this.$=[e[i-2]];break;case 17:r.addEntity(e[i-6],e[i-4]),r.addAttributes(e[i-6],e[i-1]),this.$=[e[i-6]];break;case 18:r.addEntity(e[i-8],e[i-6]),r.addAttributes(e[i-8],e[i-1]),r.setClass([e[i-8]],e[i-3]),this.$=[e[i-8]];break;case 19:r.addEntity(e[i-5],e[i-3]),this.$=[e[i-5]];break;case 20:r.addEntity(e[i-7],e[i-5]),r.setClass([e[i-7]],e[i-2]),this.$=[e[i-7]];break;case 21:r.addEntity(e[i-3],e[i-1]);break;case 22:r.addEntity(e[i-5],e[i-3]),r.setClass([e[i-5]],e[i]);break;case 23:case 24:this.$=e[i].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=e[i].trim(),r.setAccDescription(this.$);break;case 27:if(!r.subgraphDepth)r.setDirection(e[i].value),this.$=[];else this.$=e[i];break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:e[i-2].id},e[i-1],{text:e[i-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:e[i-1],text:e[i-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:e[i-4],text:e[i-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=e[i];break;case 35:this.$=e[i-1]+" "+e[i];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=e[i-3],r.addClass(e[i-2],e[i-1]);break;case 41:case 42:case 63:case 72:this.$=[e[i]];break;case 43:case 44:this.$=e[i-2].concat([e[i]]);break;case 45:this.$=e[i-2],r.setClass(e[i-1],e[i]);break;case 46:this.$=e[i-3],r.addCssStyles(e[i-2],e[i-1]);break;case 47:this.$=[e[i]];break;case 48:e[i-2].push(e[i]),this.$=e[i-2];break;case 50:this.$=e[i-1]+e[i];break;case 58:case 84:case 85:this.$=e[i].replace(/"/g,"");break;case 64:e[i].push(e[i-1]),this.$=e[i];break;case 65:this.$={type:e[i-1],name:e[i]};break;case 66:this.$={type:e[i-2],name:e[i-1],keys:e[i]};break;case 67:this.$={type:e[i-2],name:e[i-1],comment:e[i]};break;case 68:this.$={type:e[i-3],name:e[i-2],keys:e[i-1],comment:e[i]};break;case 69:case 71:case 74:this.$=e[i];break;case 70:this.$=e[i-1]+e[i];break;case 73:e[i-2].push(e[i]),this.$=e[i-2];break;case 75:this.$=e[i].replace(/"/g,"");break;case 76:this.$={cardA:e[i],relType:e[i-1],cardB:e[i-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(o,d,{5:3}),{6:[1,4],7:5,8:6,9:a,10:8,21:h,23:k,25:S,27:g,28:13,29:14,30:15,31:16,32:17,34:T,37:f,38:y,39:I,40:Z,41:X,43:C,46:D,47:te,51:R,53:L,54:B,55:F},s(o,Ve,{1:[2,1]}),s(u,[2,3]),s(u,[2,4]),s(u,[2,5]),s(u,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:Se,70:Te,71:Ce,72:Oe,73:Ne}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(u,[2,26]),s(u,[2,27]),s(u,[2,28]),s(u,[2,29]),s(u,[2,30]),s(u,d,{5:44}),s(se,[2,58]),s(se,[2,59]),s(se,[2,60]),s(se,[2,61]),s(se,[2,62]),s(u,[2,36]),s(u,[2,37]),s(u,[2,38]),s(u,[2,39]),{15:45,43:Y,44:P},{15:48,43:Y,44:P},{15:49,43:Y,44:P},{10:50,43:C,51:R,53:L,54:B,55:F},{10:51,43:C,51:R,53:L,54:B,55:F},{15:52,43:Y,44:P},{17:53,18:[1,54],56:55,57:56,61:ie},{10:58,43:C,51:R,53:L,54:B,55:F},{68:59,74:[1,60],75:[1,61]},s(re,[2,77]),s(re,[2,78]),s(re,[2,79]),s(re,[2,80]),s(re,[2,81]),s(u,[2,23]),s(u,[2,24]),s(u,[2,25]),{6:[1,63],7:5,8:6,9:a,10:8,21:h,23:k,25:S,27:g,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:T,37:f,38:y,39:I,40:Z,41:X,43:C,46:D,47:te,51:R,53:L,54:B,55:F},{12:ae,42:64,44:ne,45:U,48:66,49:67,51:oe,52:le},s(ue,[2,41]),s(ue,[2,42]),{15:72,43:Y,44:P,45:U},{12:ae,42:73,44:ne,45:U,48:66,49:67,51:oe,52:le},{6:de,9:be,19:[1,75],35:74,50:pe},{12:[1,79],14:[1,80]},s(u,[2,16],{67:35,11:81,16:[1,82],45:U,69:Se,70:Te,71:Ce,72:Oe,73:Ne}),{18:[1,83]},s(u,[2,13]),{17:84,18:[2,63],56:55,57:56,61:ie},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:Se,70:Te,71:Ce,72:Oe,73:Ne},s(Me,[2,82]),s(Me,[2,83]),s(u,[2,31]),s(u,Ve),{6:de,9:be,35:90,45:Be,50:pe},{43:[1,92],44:[1,93]},s(Ge,[2,47],{49:94,12:ae,44:ne,51:oe,52:le}),s(J,[2,49]),s(J,[2,54]),s(J,[2,55]),s(J,[2,56]),s(J,[2,57]),s(u,[2,45],{45:U}),{6:de,9:be,35:95,45:Be,50:pe},s(u,[2,32]),{10:97,36:96,43:C,51:R,53:L,54:B,55:F},s(u,[2,51]),s(u,[2,52]),s(u,[2,53]),{13:98,43:fe,53:ke,76:ge},{15:102,43:Y,44:P},{10:103,43:C,51:R,53:L,54:B,55:F},{17:104,18:[1,105],56:55,57:56,61:ie},s(u,[2,11]),{18:[2,64]},s(ce,[2,65],{59:106,60:107,63:108,65:Fe,66:Ye}),s([18,61,65,66],[2,71]),{61:[2,70]},s(u,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(u,[2,40]),{12:ae,44:ne,48:113,49:67,51:oe,52:le},s(ue,[2,43]),s(ue,[2,44]),s(J,[2,50]),s(u,[2,46]),{10:115,20:[1,114],43:C,51:R,53:L,54:B,55:F},s(Pe,[2,34]),s(u,[2,7]),s(u,[2,84]),s(u,[2,85]),s(u,[2,86]),{12:[1,116],45:U},{12:[1,118],14:[1,117]},{18:[1,119]},s(u,[2,14]),s(ce,[2,66],{60:120,64:[1,121],66:Ye}),s(ce,[2,67]),s(xe,[2,72]),s(ce,[2,75]),s(xe,[2,74]),{17:122,18:[1,123],56:55,57:56,61:ie},{15:124,43:Y,44:P},s(Ge,[2,48],{49:94,12:ae,44:ne,51:oe,52:le}),{6:de,9:be,35:125,50:pe},s(Pe,[2,35]),{13:126,43:fe,53:ke,76:ge},{15:127,43:Y,44:P},{13:128,43:fe,53:ke,76:ge},s(u,[2,12]),s(ce,[2,68]),{63:129,65:Fe},{18:[1,130]},s(u,[2,19]),s(u,[2,22],{16:[1,131],45:U}),s(u,[2,33]),s(u,[2,10]),{12:[1,132],45:U},s(u,[2,9]),s(xe,[2,73]),s(u,[2,17]),{17:133,18:[1,134],56:55,57:56,61:ie},{13:135,43:fe,53:ke,76:ge},{18:[1,136]},s(u,[2,20]),s(u,[2,8]),s(u,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:t(function(n,c){if(c.recoverable)this.trace(n);else{var p=Error(n);throw p.hash=c,p}},"parseError"),parse:t(function(n){var c=this,p=[0],r=[],_=[null],e=[],he=this.table,i="",_e=0,ze=0,Ue=0,Qe=2,Ke=1,Xe=e.slice.call(arguments,1),E=Object.create(this.lexer),W={yy:{}};for(var Ie in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Ie))W.yy[Ie]=this.yy[Ie];if(E.setInput(n,W.yy),W.yy.lexer=E,W.yy.parser=this,typeof E.yylloc>"u")E.yylloc={};var Re=E.yylloc;e.push(Re);var Je=E.options&&E.options.ranges;if(typeof W.yy.parseError==="function")this.parseError=W.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function $e(A){p.length=p.length-2*A,_.length=_.length-A,e.length=e.length-A}t($e,"popStack");function Ze(){var A=r.pop()||E.lex()||Ke;if(typeof A!=="number"){if(A instanceof Array)r=A,A=r.pop();A=c.symbols_[A]||A}return A}t(Ze,"lex");var N,ve,Q,x,nt,De,ee={},me,v,je,Ee;while(!0){if(Q=p[p.length-1],this.defaultActions[Q])x=this.defaultActions[Q];else{if(N===null||typeof N>"u")N=Ze();x=he[Q]&&he[Q][N]}if(typeof x>"u"||!x.length||!x[0]){var Le="";Ee=[];for(me in he[Q])if(this.terminals_[me]&&me>Qe)Ee.push("'"+this.terminals_[me]+"'");if(E.showPosition)Le="Parse error on line "+(_e+1)+`:
2
2
  `+E.showPosition()+`
3
3
  Expecting `+Ee.join(", ")+", got '"+(this.terminals_[N]||N)+"'";else Le="Parse error on line "+(_e+1)+": Unexpected "+(N==Ke?"end of input":"'"+(this.terminals_[N]||N)+"'");this.parseError(Le,{text:E.match,token:this.terminals_[N]||N,line:E.yylineno,loc:Re,expected:Ee})}if(x[0]instanceof Array&&x.length>1)throw Error("Parse Error: multiple actions possible at state: "+Q+", token: "+N);switch(x[0]){case 1:if(p.push(N),_.push(E.yytext),e.push(E.yylloc),p.push(x[1]),N=null,!ve){if(ze=E.yyleng,i=E.yytext,_e=E.yylineno,Re=E.yylloc,Ue>0)Ue--}else N=ve,ve=null;break;case 2:if(v=this.productions_[x[1]][1],ee.$=_[_.length-v],ee._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},Je)ee._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]];if(De=this.performAction.apply(ee,[i,ze,_e,W.yy,x[1],_,e].concat(Xe)),typeof De<"u")return De;if(v)p=p.slice(0,-1*v*2),_=_.slice(0,-1*v),e=e.slice(0,-1*v);p.push(this.productions_[x[1]][0]),_.push(ee.$),e.push(ee._$),je=he[p[p.length-2]][p[p.length-1]],p.push(je);break;case 3:return!0}}return!0},"parse")},He=function(){var K={EOF:1,parseError:t(function(c,p){if(this.yy.parser)this.yy.parser.parseError(c,p);else throw Error(c)},"parseError"),setInput:t(function(n,c){if(this.yy=c||this.yy||{},this._input=n,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];return this.offset=0,this},"setInput"),input:t(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var c=n.match(/(?:\r\n?|\n).*/g);if(c)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),n},"input"),unput:t(function(n){var c=n.length,p=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var r=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1)this.yylineno-=p.length-1;var _=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===r.length?this.yylloc.first_column:0)+r[r.length-p.length].length-p[0].length:this.yylloc.first_column-c},this.options.ranges)this.yylloc.range=[_[0],_[0]+this.yyleng-c];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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:t(function(n){this.unput(this.match.slice(n))},"less"),pastInput:t(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var n=this.match;if(n.length<20)n+=this._input.substr(0,20-n.length);return(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var n=this.pastInput(),c=Array(n.length+1).join("-");return n+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import"./index-4fpyzg5e.js";import"./index-q178zgxp.js";import{eb}from"./index-8e66p2a7.js";export{eb as diagram};
@@ -1,4 +1,4 @@
1
- import{t,qp,l,w,ne,M,O,G,z,j,q,H,m,b,Ji,mc,Zi,Lg,Gn,ah,li,_o,ll,V}from"./index-pqmvhqmj.js";import{Jl,od,Ep,id,Aa}from"./index-3x88fxzj.js";import{xn,$n}from"./index-8pqx5n2p.js";var fn=$n(function(Ke,tr){(function(e,r){typeof Ke=="object"&&typeof tr<"u"?tr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=r()})(Ke,function(){var e="day";return function(r,n,i){var a=function(x){return x.add(4-x.isoWeekday(),e)},s=n.prototype;s.isoWeekYear=function(){return a(this).year()},s.isoWeek=function(x){if(!this.$utils().u(x))return this.add(7*(x-this.isoWeek()),e);var C,E,Y,rt,A=a(this),F=(C=this.isoWeekYear(),E=this.$u,Y=(E?i.utc:i)().year(C).startOf("year"),rt=4-Y.isoWeekday(),Y.isoWeekday()>4&&(rt+=7),Y.add(rt,e));return A.diff(F,"week")+1},s.isoWeekday=function(x){return this.$utils().u(x)?this.day()||7:this.day(this.day()%7?x:x-7)};var c=s.startOf;s.startOf=function(x,C){var E=this.$utils(),Y=!!E.u(C)||C;return E.p(x)==="isoweek"?Y?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(x,C)}}})});var dn=$n(function(er,rr){(function(e,r){typeof er=="object"&&typeof rr<"u"?rr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=r()})(er,function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,c={},x=function(W){return(W=+W)+(W>68?1900:2000)},C=function(W){return function(N){this[W]=+N}},E=[/[+-]\d\d:?(\d\d)?|Z/,function(W){(this.zone||(this.zone={})).offset=function(N){if(!N)return 0;if(N==="Z")return 0;var I=N.match(/([+-]|\d\d)/g),J=60*I[1]+(+I[2]||0);return J===0?0:I[0]==="+"?-J:J}(W)}],Y=function(W){var N=c[W];return N&&(N.indexOf?N:N.s.concat(N.f))},rt=function(W,N){var I,J=c.meridiem;if(J){for(var lt=1;lt<=24;lt+=1)if(W.indexOf(J(lt,0,N))>-1){I=lt>12;break}}else I=W===(N?"pm":"PM");return I},A={A:[s,function(W){this.afternoon=rt(W,!1)}],a:[s,function(W){this.afternoon=rt(W,!0)}],Q:[n,function(W){this.month=3*(W-1)+1}],S:[n,function(W){this.milliseconds=100*+W}],SS:[i,function(W){this.milliseconds=10*+W}],SSS:[/\d{3}/,function(W){this.milliseconds=+W}],s:[a,C("seconds")],ss:[a,C("seconds")],m:[a,C("minutes")],mm:[a,C("minutes")],H:[a,C("hours")],h:[a,C("hours")],HH:[a,C("hours")],hh:[a,C("hours")],D:[a,C("day")],DD:[i,C("day")],Do:[s,function(W){var N=c.ordinal,I=W.match(/\d+/);if(this.day=I[0],N)for(var J=1;J<=31;J+=1)N(J).replace(/\[|\]/g,"")===W&&(this.day=J)}],w:[a,C("week")],ww:[i,C("week")],M:[a,C("month")],MM:[i,C("month")],MMM:[s,function(W){var N=Y("months"),I=(Y("monthsShort")||N.map(function(J){return J.slice(0,3)})).indexOf(W)+1;if(I<1)throw Error();this.month=I%12||I}],MMMM:[s,function(W){var N=Y("months").indexOf(W)+1;if(N<1)throw Error();this.month=N%12||N}],Y:[/[+-]?\d+/,C("year")],YY:[i,function(W){this.year=x(W)}],YYYY:[/\d{4}/,C("year")],Z:E,ZZ:E};function F(W){var N,I;N=W,I=c&&c.formats;for(var J=(W=N.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(tt,et,T){var _=T&&T.toUpperCase();return et||I[T]||e[T]||I[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(S,L,f){return L||f.slice(1)})})).match(r),lt=J.length,it=0;it<lt;it+=1){var P=J[it],D=A[P],u=D&&D[0],U=D&&D[1];J[it]=U?{regex:u,parser:U}:P.replace(/^\[|\]$/g,"")}return function(tt){for(var et={},T=0,_=0;T<lt;T+=1){var S=J[T];if(typeof S=="string")_+=S.length;else{var{regex:L,parser:f}=S,v=tt.slice(_),p=L.exec(v)[0];f.call(et,p),tt=tt.replace(p,"")}}return function(k){var Z=k.afternoon;if(Z!==void 0){var o=k.hours;Z?o<12&&(k.hours+=12):o===12&&(k.hours=0),delete k.afternoon}}(et),et}}return function(W,N,I){I.p.customParseFormat=!0,W&&W.parseTwoDigitYear&&(x=W.parseTwoDigitYear);var J=N.prototype,lt=J.parse;J.parse=function(it){var{date:P,utc:D,args:u}=it;this.$u=D;var U=u[1];if(typeof U=="string"){var tt=u[2]===!0,et=u[3]===!0,T=tt||et,_=u[2];et&&(_=u[2]),c=this.$locale(),!tt&&_&&(c=I.Ls[_]),this.$d=function(v,p,k,Z){try{if(["x","X"].indexOf(p)>-1)return new Date((p==="X"?1000:1)*v);var o=F(p)(v),{year:X,month:h,day:dt,hours:d,minutes:B,seconds:Q,milliseconds:ct,zone:ut,week:nt}=o,g=new Date,R=dt||(X||h?1:g.getDate()),K=X||g.getFullYear(),y=0;X&&!h||(y=h>0?h-1:g.getMonth());var mt,at=d||0,st=B||0,ht=Q||0,yt=ct||0;return ut?new Date(Date.UTC(K,y,R,at,st,ht,yt+60*ut.offset*1000)):k?new Date(Date.UTC(K,y,R,at,st,ht,yt)):(mt=new Date(K,y,R,at,st,ht,yt),nt&&(mt=Z(mt).week(nt).toDate()),mt)}catch(pt){return new Date("")}}(P,U,D,I),this.init(),_&&_!==!0&&(this.$L=this.locale(_).$L),T&&P!=this.format(U)&&(this.$d=new Date("")),c={}}else if(U instanceof Array)for(var S=U.length,L=1;L<=S;L+=1){u[1]=U[L-1];var f=I.apply(this,u);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}L===S&&(this.$d=new Date(""))}else lt.call(this,it)}}})});var mn=$n(function(nr,ir){(function(e,r){typeof nr=="object"&&typeof ir<"u"?ir.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=r()})(nr,function(){return function(e,r){var n=r.prototype,i=n.format;n.format=function(a){var s=this,c=this.$locale();if(!this.isValid())return i.bind(this)(a);var x=this.$utils(),C=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(E){switch(E){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return c.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return c.ordinal(s.week(),"W");case"w":case"ww":return x.s(s.week(),E==="w"?1:2,"0");case"W":case"WW":return x.s(s.isoWeek(),E==="W"?1:2,"0");case"k":case"kk":return x.s(String(s.$H===0?24:s.$H),E==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1000);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return E}});return i.bind(this)(C)}}})});var hn=$n(function(ar,sr){(function(e,r){typeof ar=="object"&&typeof sr<"u"?sr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=r()})(ar,function(){var e,r,n=1000,i=60000,a=3600000,s=86400000,c=31536000000,x=2628000000,C=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,E=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,Y={years:c,months:x,days:s,hours:a,minutes:i,seconds:n,milliseconds:1,weeks:604800000},rt=function(P){return P instanceof lt},A=function(P,D,u){return new lt(P,u,D.$l)},F=function(P){return r.p(P)+"s"},W=function(P){return P<0},N=function(P){return W(P)?Math.ceil(P):Math.floor(P)},I=function(P){return Math.abs(P)},J=function(P,D){return P?W(P)?{negative:!0,format:""+I(P)+D}:{negative:!1,format:""+P+D}:{negative:!1,format:""}},lt=function(){function P(u,U,tt){var et=this;if(this.$d={},this.$l=tt,u===void 0&&(this.$ms=0,this.parseFromMilliseconds()),U)return A(u*Y[F(U)],this);if(typeof u=="number")return this.$ms=u,this.parseFromMilliseconds(),this;if(typeof u=="object")return Object.keys(u).forEach(function(S){et.$d[F(S)]=u[S]}),this.calMilliseconds(),this;if(typeof u=="string"){var T=u.match(C);if(T){var _=T.slice(2).map(function(S){return S!=null?Number(S):0});return this.$d.years=_[0],this.$d.months=_[1],this.$d.weeks=_[2],this.$d.days=_[3],this.$d.hours=_[4],this.$d.minutes=_[5],this.$d.seconds=_[6],this.calMilliseconds(),this}}return this}var D=P.prototype;return D.calMilliseconds=function(){var u=this;this.$ms=Object.keys(this.$d).reduce(function(U,tt){return U+(u.$d[tt]||0)*Y[tt]},0)},D.parseFromMilliseconds=function(){var u=this.$ms;this.$d.years=N(u/c),u%=c,this.$d.months=N(u/x),u%=x,this.$d.days=N(u/s),u%=s,this.$d.hours=N(u/a),u%=a,this.$d.minutes=N(u/i),u%=i,this.$d.seconds=N(u/n),u%=n,this.$d.milliseconds=u},D.toISOString=function(){var u=J(this.$d.years,"Y"),U=J(this.$d.months,"M"),tt=+this.$d.days||0;this.$d.weeks&&(tt+=7*this.$d.weeks);var et=J(tt,"D"),T=J(this.$d.hours,"H"),_=J(this.$d.minutes,"M"),S=this.$d.seconds||0;this.$d.milliseconds&&(S+=this.$d.milliseconds/1000,S=Math.round(1000*S)/1000);var L=J(S,"S"),f=u.negative||U.negative||et.negative||T.negative||_.negative||L.negative,v=T.format||_.format||L.format?"T":"",p=(f?"-":"")+"P"+u.format+U.format+et.format+v+T.format+_.format+L.format;return p==="P"||p==="-P"?"P0D":p},D.toJSON=function(){return this.toISOString()},D.format=function(u){var U=u||"YYYY-MM-DDTHH:mm:ss",tt={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return U.replace(E,function(et,T){return T||String(tt[et])})},D.as=function(u){return this.$ms/Y[F(u)]},D.get=function(u){var U=this.$ms,tt=F(u);return tt==="milliseconds"?U%=1000:U=tt==="weeks"?N(U/Y[tt]):this.$d[tt],U||0},D.add=function(u,U,tt){var et;return et=U?u*Y[F(U)]:rt(u)?u.$ms:A(u,this).$ms,A(this.$ms+et*(tt?-1:1),this)},D.subtract=function(u,U){return this.add(u,U,!0)},D.locale=function(u){var U=this.clone();return U.$l=u,U},D.clone=function(){return A(this.$ms,this)},D.humanize=function(u){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!u)},D.valueOf=function(){return this.asMilliseconds()},D.milliseconds=function(){return this.get("milliseconds")},D.asMilliseconds=function(){return this.as("milliseconds")},D.seconds=function(){return this.get("seconds")},D.asSeconds=function(){return this.as("seconds")},D.minutes=function(){return this.get("minutes")},D.asMinutes=function(){return this.as("minutes")},D.hours=function(){return this.get("hours")},D.asHours=function(){return this.as("hours")},D.days=function(){return this.get("days")},D.asDays=function(){return this.as("days")},D.weeks=function(){return this.get("weeks")},D.asWeeks=function(){return this.as("weeks")},D.months=function(){return this.get("months")},D.asMonths=function(){return this.as("months")},D.years=function(){return this.get("years")},D.asYears=function(){return this.as("years")},P}(),it=function(P,D,u){return P.add(D.years()*u,"y").add(D.months()*u,"M").add(D.days()*u,"d").add(D.hours()*u,"h").add(D.minutes()*u,"m").add(D.seconds()*u,"s").add(D.milliseconds()*u,"ms")};return function(P,D,u){e=u,r=u().$utils(),u.duration=function(et,T){var _=u.locale();return A(et,{$l:_},T)},u.isDuration=rt;var U=D.prototype.add,tt=D.prototype.subtract;D.prototype.add=function(et,T){return rt(et)?it(this,et,1):U.bind(this)(et,T)},D.prototype.subtract=function(et,T){return rt(et)?it(this,et,-1):tt.bind(this)(et,T)}}})});function Ie(e,r){let n;if(r===void 0){for(let i of e)if(i!=null&&(n<i||n===void 0&&i>=i))n=i}else{let i=-1;for(let a of e)if((a=r(a,++i,e))!=null&&(n<a||n===void 0&&a>=a))n=a}return n}function Ue(e,r){let n;if(r===void 0){for(let i of e)if(i!=null&&(n>i||n===void 0&&i>=i))n=i}else{let i=-1;for(let a of e)if((a=r(a,++i,e))!=null&&(n>a||n===void 0&&a>=a))n=a}return n}function Le(e){return e}var me=1,We=2,Ee=3,de=4,wr=0.000001;function Ln(e){return"translate("+e+",0)"}function Wn(e){return"translate(0,"+e+")"}function En(e){return(r)=>+e(r)}function An(e,r){if(r=Math.max(0,e.bandwidth()-r*2)/2,e.round())r=Math.round(r);return(n)=>+e(n)+r}function On(){return!this.__axis}function Mr(e,r){var n=[],i=null,a=null,s=6,c=6,x=3,C=typeof window<"u"&&window.devicePixelRatio>1?0:0.5,E=e===me||e===de?-1:1,Y=e===de||e===We?"x":"y",rt=e===me||e===Ee?Ln:Wn;function A(F){var W=i==null?r.ticks?r.ticks.apply(r,n):r.domain():i,N=a==null?r.tickFormat?r.tickFormat.apply(r,n):Le:a,I=Math.max(s,0)+x,J=r.range(),lt=+J[0]+C,it=+J[J.length-1]+C,P=(r.bandwidth?An:En)(r.copy(),C),D=F.selection?F.selection():F,u=D.selectAll(".domain").data([null]),U=D.selectAll(".tick").data(W,r).order(),tt=U.exit(),et=U.enter().append("g").attr("class","tick"),T=U.select("line"),_=U.select("text");if(u=u.merge(u.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),U=U.merge(et),T=T.merge(et.append("line").attr("stroke","currentColor").attr(Y+"2",E*s)),_=_.merge(et.append("text").attr("fill","currentColor").attr(Y,E*I).attr("dy",e===me?"0em":e===Ee?"0.71em":"0.32em")),F!==D)u=u.transition(F),U=U.transition(F),T=T.transition(F),_=_.transition(F),tt=tt.transition(F).attr("opacity",wr).attr("transform",function(S){return isFinite(S=P(S))?rt(S+C):this.getAttribute("transform")}),et.attr("opacity",wr).attr("transform",function(S){var L=this.parentNode.__axis;return rt((L&&isFinite(L=L(S))?L:P(S))+C)});tt.remove(),u.attr("d",e===de||e===We?c?"M"+E*c+","+lt+"H"+C+"V"+it+"H"+E*c:"M"+C+","+lt+"V"+it:c?"M"+lt+","+E*c+"V"+C+"H"+it+"V"+E*c:"M"+lt+","+C+"H"+it),U.attr("opacity",1).attr("transform",function(S){return rt(P(S)+C)}),T.attr(Y+"2",E*s),_.attr(Y,E*I).text(N),D.filter(On).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===We?"start":e===de?"end":"middle"),D.each(function(){this.__axis=P})}return A.scale=function(F){return arguments.length?(r=F,A):r},A.ticks=function(){return n=Array.from(arguments),A},A.tickArguments=function(F){return arguments.length?(n=F==null?[]:Array.from(F),A):n.slice()},A.tickValues=function(F){return arguments.length?(i=F==null?null:Array.from(F),A):i&&i.slice()},A.tickFormat=function(F){return arguments.length?(a=F,A):a},A.tickSize=function(F){return arguments.length?(s=c=+F,A):s},A.tickSizeInner=function(F){return arguments.length?(s=+F,A):s},A.tickSizeOuter=function(F){return arguments.length?(c=+F,A):c},A.tickPadding=function(F){return arguments.length?(x=+F,A):x},A.offset=function(F){return arguments.length?(C=+F,A):C},A}function Ae(e){return Mr(me,e)}function Oe(e){return Mr(Ee,e)}var Dr=Math.PI/180,Cr=180/Math.PI;var he=18,Sr=0.96422,_r=1,Yr=0.82521,Fr=0.13793103448275862,Xt=0.20689655172413793,Ir=3*Xt*Xt,Hn=Xt*Xt*Xt;function Ur(e){if(e instanceof _t)return new _t(e.l,e.a,e.b,e.opacity);if(e instanceof Wt)return Wr(e);if(!(e instanceof Gn))e=Lg(e);var r=Pe(e.r),n=Pe(e.g),i=Pe(e.b),a=$e((0.2225045*r+0.7168786*n+0.0606169*i)/_r),s,c;if(r===n&&n===i)s=c=a;else s=$e((0.4360747*r+0.3850649*n+0.1430804*i)/Sr),c=$e((0.0139322*r+0.0971045*n+0.7141733*i)/Yr);return new _t(116*a-16,500*(s-a),200*(a-c),e.opacity)}function Lr(e,r,n,i){return arguments.length===1?Ur(e):new _t(e,r,n,i==null?1:i)}function _t(e,r,n,i){this.l=+e,this.a=+r,this.b=+n,this.opacity=+i}Ji(_t,Lr,mc(Zi,{brighter(e){return new _t(this.l+he*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new _t(this.l-he*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,r=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return r=Sr*He(r),e=_r*He(e),n=Yr*He(n),new Gn(Ne(3.1338561*r-1.6168667*e-0.4906146*n),Ne(-0.9787684*r+1.9161415*e+0.033454*n),Ne(0.0719453*r-0.2289914*e+1.4052427*n),this.opacity)}}));function $e(e){return e>Hn?Math.pow(e,0.3333333333333333):e/Ir+Fr}function He(e){return e>Xt?e*e*e:Ir*(e-Fr)}function Ne(e){return 255*(e<=0.0031308?12.92*e:1.055*Math.pow(e,0.4166666666666667)-0.055)}function Pe(e){return(e/=255)<=0.04045?e/12.92:Math.pow((e+0.055)/1.055,2.4)}function Nn(e){if(e instanceof Wt)return new Wt(e.h,e.c,e.l,e.opacity);if(!(e instanceof _t))e=Ur(e);if(e.a===0&&e.b===0)return new Wt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var r=Math.atan2(e.b,e.a)*Cr;return new Wt(r<0?r+360:r,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ye(e,r,n,i){return arguments.length===1?Nn(e):new Wt(e,r,n,i==null?1:i)}function Wt(e,r,n,i){this.h=+e,this.c=+r,this.l=+n,this.opacity=+i}function Wr(e){if(isNaN(e.h))return new _t(e.l,0,0,e.opacity);var r=e.h*Dr;return new _t(e.l,Math.cos(r)*e.c,Math.sin(r)*e.c,e.opacity)}Ji(Wt,ye,mc(Zi,{brighter(e){return new Wt(this.h,this.c,this.l+he*(e==null?1:e),this.opacity)},darker(e){return new Wt(this.h,this.c,this.l-he*(e==null?1:e),this.opacity)},rgb(){return Wr(this).rgb()}}));function Er(e){return function(r,n){var i=e((r=ye(r)).h,(n=ye(n)).h),a=li(r.c,n.c),s=li(r.l,n.l),c=li(r.opacity,n.opacity);return function(x){return r.h=i(x),r.c=a(x),r.l=s(x),r.opacity=c(x),r+""}}}var Ar=Er(ah),Ds=Er(li);function Ve(e,r){e=e.slice();var n=0,i=e.length-1,a=e[n],s=e[i],c;if(s<a)c=n,n=i,i=c,c=a,a=s,s=c;return e[n]=r.floor(a),e[i]=r.ceil(s),e}var ze=new Date,Re=new Date;function ft(e,r,n,i){function a(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}if(a.floor=(s)=>(e(s=new Date(+s)),s),a.ceil=(s)=>(e(s=new Date(s-1)),r(s,1),e(s),s),a.round=(s)=>{let c=a(s),x=a.ceil(s);return s-c<x-s?c:x},a.offset=(s,c)=>(r(s=new Date(+s),c==null?1:Math.floor(c)),s),a.range=(s,c,x)=>{let C=[];if(s=a.ceil(s),x=x==null?1:Math.floor(x),!(s<c)||!(x>0))return C;let E;do C.push(E=new Date(+s)),r(s,x),e(s);while(E<s&&s<c);return C},a.filter=(s)=>ft((c)=>{if(c>=c)while(e(c),!s(c))c.setTime(c-1)},(c,x)=>{if(c>=c)if(x<0)while(++x<=0)while(r(c,-1),!s(c));else while(--x>=0)while(r(c,1),!s(c));}),n)a.count=(s,c)=>(ze.setTime(+s),Re.setTime(+c),e(ze),e(Re),Math.floor(n(ze,Re))),a.every=(s)=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:!(s>1)?a:a.filter(i?(c)=>i(c)%s===0:(c)=>a.count(0,c)%s===0));return a}var Yt=ft(()=>{},(e,r)=>{e.setTime(+e+r)},(e,r)=>r-e);Yt.every=(e)=>{if(e=Math.floor(e),!isFinite(e)||!(e>0))return null;if(!(e>1))return Yt;return ft((r)=>{r.setTime(Math.floor(r/e)*e)},(r,n)=>{r.setTime(+r+n*e)},(r,n)=>(n-r)/e)};var Or=Yt.range;var Mt=1000,Tt=60000,Ft=3600000,Ht=86400000,ie=604800000,Be=2592000000,ge=31536000000;var vt=ft((e)=>{e.setTime(e-e.getMilliseconds())},(e,r)=>{e.setTime(+e+r*Mt)},(e,r)=>(r-e)/Mt,(e)=>e.getUTCSeconds()),$r=vt.range;var Et=ft((e)=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mt)},(e,r)=>{e.setTime(+e+r*Tt)},(e,r)=>(r-e)/Tt,(e)=>e.getMinutes()),Pn=Et.range,ke=ft((e)=>{e.setUTCSeconds(0,0)},(e,r)=>{e.setTime(+e+r*Tt)},(e,r)=>(r-e)/Tt,(e)=>e.getUTCMinutes()),Vn=ke.range;var At=ft((e)=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mt-e.getMinutes()*Tt)},(e,r)=>{e.setTime(+e+r*Ft)},(e,r)=>(r-e)/Ft,(e)=>e.getHours()),zn=At.range,pe=ft((e)=>{e.setUTCMinutes(0,0,0)},(e,r)=>{e.setTime(+e+r*Ft)},(e,r)=>(r-e)/Ft,(e)=>e.getUTCHours()),Rn=pe.range;var Dt=ft((e)=>e.setHours(0,0,0,0),(e,r)=>e.setDate(e.getDate()+r),(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Tt)/Ht,(e)=>e.getDate()-1),Bn=Dt.range,ae=ft((e)=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ht,(e)=>e.getUTCDate()-1),Zn=ae.range,Te=ft((e)=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ht,(e)=>Math.floor(e/Ht)),jn=Te.range;function Vt(e){return ft((r)=>{r.setDate(r.getDate()-(r.getDay()+7-e)%7),r.setHours(0,0,0,0)},(r,n)=>{r.setDate(r.getDate()+n*7)},(r,n)=>(n-r-(n.getTimezoneOffset()-r.getTimezoneOffset())*Tt)/ie)}var Ct=Vt(0),Nt=Vt(1),ve=Vt(2),xe=Vt(3),It=Vt(4),be=Vt(5),we=Vt(6),Hr=Ct.range,Xn=Nt.range,qn=ve.range,Qn=xe.range,Jn=It.range,Kn=be.range,ti=we.range;function zt(e){return ft((r)=>{r.setUTCDate(r.getUTCDate()-(r.getUTCDay()+7-e)%7),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCDate(r.getUTCDate()+n*7)},(r,n)=>(n-r)/ie)}var Rt=zt(0),qt=zt(1),Nr=zt(2),Pr=zt(3),Pt=zt(4),Vr=zt(5),zr=zt(6),Rr=Rt.range,ei=qt.range,ri=Nr.range,ni=Pr.range,ii=Pt.range,ai=Vr.range,si=zr.range;var Ot=ft((e)=>{e.setDate(1),e.setHours(0,0,0,0)},(e,r)=>{e.setMonth(e.getMonth()+r)},(e,r)=>r.getMonth()-e.getMonth()+(r.getFullYear()-e.getFullYear())*12,(e)=>e.getMonth()),oi=Ot.range,Me=ft((e)=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCMonth(e.getUTCMonth()+r)},(e,r)=>r.getUTCMonth()-e.getUTCMonth()+(r.getUTCFullYear()-e.getUTCFullYear())*12,(e)=>e.getUTCMonth()),ci=Me.range;var xt=ft((e)=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r)},(e,r)=>r.getFullYear()-e.getFullYear(),(e)=>e.getFullYear());xt.every=(e)=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft((r)=>{r.setFullYear(Math.floor(r.getFullYear()/e)*e),r.setMonth(0,1),r.setHours(0,0,0,0)},(r,n)=>{r.setFullYear(r.getFullYear()+n*e)});var ui=xt.range,St=ft((e)=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r)},(e,r)=>r.getUTCFullYear()-e.getUTCFullYear(),(e)=>e.getUTCFullYear());St.every=(e)=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft((r)=>{r.setUTCFullYear(Math.floor(r.getUTCFullYear()/e)*e),r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCFullYear(r.getUTCFullYear()+n*e)});var fi=St.range;function Br(e,r,n,i,a,s){let c=[[vt,1,Mt],[vt,5,5*Mt],[vt,15,15*Mt],[vt,30,30*Mt],[s,1,Tt],[s,5,5*Tt],[s,15,15*Tt],[s,30,30*Tt],[a,1,Ft],[a,3,3*Ft],[a,6,6*Ft],[a,12,12*Ft],[i,1,Ht],[i,2,2*Ht],[n,1,ie],[r,1,Be],[r,3,3*Be],[e,1,ge]];function x(E,Y,rt){let A=Y<E;if(A)[E,Y]=[Y,E];let F=rt&&typeof rt.range==="function"?rt:C(E,Y,rt),W=F?F.range(E,+Y+1):[];return A?W.reverse():W}function C(E,Y,rt){let A=Math.abs(Y-E)/rt,F=Jl(([,,I])=>I).right(c,A);if(F===c.length)return e.every(od(E/ge,Y/ge,rt));if(F===0)return Yt.every(Math.max(od(E,Y,rt),1));let[W,N]=c[A/c[F-1][2]<c[F][2]/A?F-1:F];return W.every(N)}return[x,C]}var[di,mi]=Br(St,Me,Rt,Te,pe,ke),[Ze,je]=Br(xt,Ot,Ct,Dt,At,Et);function Xe(e){if(0<=e.y&&e.y<100){var r=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return r.setFullYear(e.y),r}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function qe(e){if(0<=e.y&&e.y<100){var r=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return r.setUTCFullYear(e.y),r}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function se(e,r,n){return{y:e,m:r,d:n,H:0,M:0,S:0,L:0}}function Ge(e){var{dateTime:r,date:n,time:i,periods:a,days:s,shortDays:c,months:x,shortMonths:C}=e,E=oe(a),Y=ce(a),rt=oe(s),A=ce(s),F=oe(c),W=ce(c),N=oe(x),I=ce(x),J=oe(C),lt=ce(C),it={a:k,A:Z,b:o,B:X,c:null,d:Qr,e:Qr,f:Ai,g:ji,G:qi,H:Li,I:Wi,j:Ei,L:rn,m:Oi,M:$i,p:h,q:dt,Q:tn,s:en,S:Hi,u:Ni,U:Pi,V:Vi,w:zi,W:Ri,x:null,X:null,y:Bi,Y:Xi,Z:Gi,"%":Kr},P={a:d,A:B,b:Q,B:ct,c:null,d:Jr,e:Jr,f:ea,g:fa,G:ma,H:Qi,I:Ki,j:ta,L:an,m:ra,M:na,p:ut,q:nt,Q:tn,s:en,S:ia,u:aa,U:sa,V:oa,w:ca,W:ua,x:null,X:null,y:la,Y:da,Z:ha,"%":Kr},D={a:T,A:_,b:S,B:L,c:f,d:qr,e:qr,f:Yi,g:Xr,G:jr,H:Gr,I:Gr,j:Di,L:_i,m:Mi,M:Ci,p:et,q:wi,Q:Ii,s:Ui,S:Si,u:pi,U:Ti,V:vi,w:ki,W:xi,x:v,X:p,y:Xr,Y:jr,Z:bi,"%":Fi};it.x=u(n,it),it.X=u(i,it),it.c=u(r,it),P.x=u(n,P),P.X=u(i,P),P.c=u(r,P);function u(g,R){return function(K){var y=[],mt=-1,at=0,st=g.length,ht,yt,pt;if(!(K instanceof Date))K=new Date(+K);while(++mt<st)if(g.charCodeAt(mt)===37){if(y.push(g.slice(at,mt)),(yt=Zr[ht=g.charAt(++mt)])!=null)ht=g.charAt(++mt);else yt=ht==="e"?" ":"0";if(pt=R[ht])ht=pt(K,yt);y.push(ht),at=mt+1}return y.push(g.slice(at,mt)),y.join("")}}function U(g,R){return function(K){var y=se(1900,void 0,1),mt=tt(y,g,K+="",0),at,st;if(mt!=K.length)return null;if("Q"in y)return new Date(y.Q);if("s"in y)return new Date(y.s*1000+("L"in y?y.L:0));if(R&&!("Z"in y))y.Z=0;if("p"in y)y.H=y.H%12+y.p*12;if(y.m===void 0)y.m="q"in y?y.q:0;if("V"in y){if(y.V<1||y.V>53)return null;if(!("w"in y))y.w=1;if("Z"in y)at=qe(se(y.y,0,1)),st=at.getUTCDay(),at=st>4||st===0?qt.ceil(at):qt(at),at=ae.offset(at,(y.V-1)*7),y.y=at.getUTCFullYear(),y.m=at.getUTCMonth(),y.d=at.getUTCDate()+(y.w+6)%7;else at=Xe(se(y.y,0,1)),st=at.getDay(),at=st>4||st===0?Nt.ceil(at):Nt(at),at=Dt.offset(at,(y.V-1)*7),y.y=at.getFullYear(),y.m=at.getMonth(),y.d=at.getDate()+(y.w+6)%7}else if("W"in y||"U"in y){if(!("w"in y))y.w="u"in y?y.u%7:("W"in y)?1:0;st="Z"in y?qe(se(y.y,0,1)).getUTCDay():Xe(se(y.y,0,1)).getDay(),y.m=0,y.d="W"in y?(y.w+6)%7+y.W*7-(st+5)%7:y.w+y.U*7-(st+6)%7}if("Z"in y)return y.H+=y.Z/100|0,y.M+=y.Z%100,qe(y);return Xe(y)}}function tt(g,R,K,y){var mt=0,at=R.length,st=K.length,ht,yt;while(mt<at){if(y>=st)return-1;if(ht=R.charCodeAt(mt++),ht===37){if(ht=R.charAt(mt++),yt=D[ht in Zr?R.charAt(mt++):ht],!yt||(y=yt(g,K,y))<0)return-1}else if(ht!=K.charCodeAt(y++))return-1}return y}function et(g,R,K){var y=E.exec(R.slice(K));return y?(g.p=Y.get(y[0].toLowerCase()),K+y[0].length):-1}function T(g,R,K){var y=F.exec(R.slice(K));return y?(g.w=W.get(y[0].toLowerCase()),K+y[0].length):-1}function _(g,R,K){var y=rt.exec(R.slice(K));return y?(g.w=A.get(y[0].toLowerCase()),K+y[0].length):-1}function S(g,R,K){var y=J.exec(R.slice(K));return y?(g.m=lt.get(y[0].toLowerCase()),K+y[0].length):-1}function L(g,R,K){var y=N.exec(R.slice(K));return y?(g.m=I.get(y[0].toLowerCase()),K+y[0].length):-1}function f(g,R,K){return tt(g,r,R,K)}function v(g,R,K){return tt(g,n,R,K)}function p(g,R,K){return tt(g,i,R,K)}function k(g){return c[g.getDay()]}function Z(g){return s[g.getDay()]}function o(g){return C[g.getMonth()]}function X(g){return x[g.getMonth()]}function h(g){return a[+(g.getHours()>=12)]}function dt(g){return 1+~~(g.getMonth()/3)}function d(g){return c[g.getUTCDay()]}function B(g){return s[g.getUTCDay()]}function Q(g){return C[g.getUTCMonth()]}function ct(g){return x[g.getUTCMonth()]}function ut(g){return a[+(g.getUTCHours()>=12)]}function nt(g){return 1+~~(g.getUTCMonth()/3)}return{format:function(g){var R=u(g+="",it);return R.toString=function(){return g},R},parse:function(g){var R=U(g+="",!1);return R.toString=function(){return g},R},utcFormat:function(g){var R=u(g+="",P);return R.toString=function(){return g},R},utcParse:function(g){var R=U(g+="",!0);return R.toString=function(){return g},R}}}var Zr={"-":"",_:" ","0":"0"},kt=/^\s*\d+/,hi=/^%/,yi=/[\\^$*+?|[\]().{}]/g;function ot(e,r,n){var i=e<0?"-":"",a=(i?-e:e)+"",s=a.length;return i+(s<n?Array(n-s+1).join(r)+a:a)}function gi(e){return e.replace(yi,"\\$&")}function oe(e){return new RegExp("^(?:"+e.map(gi).join("|")+")","i")}function ce(e){return new Map(e.map((r,n)=>[r.toLowerCase(),n]))}function ki(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function pi(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function Ti(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function vi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function xi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function jr(e,r,n){var i=kt.exec(r.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function Xr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2000),n+i[0].length):-1}function bi(e,r,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(r.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function wi(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.q=i[0]*3-3,n+i[0].length):-1}function Mi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function qr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function Di(e,r,n){var i=kt.exec(r.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function Gr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function Ci(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function Si(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function _i(e,r,n){var i=kt.exec(r.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Yi(e,r,n){var i=kt.exec(r.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1000),n+i[0].length):-1}function Fi(e,r,n){var i=hi.exec(r.slice(n,n+1));return i?n+i[0].length:-1}function Ii(e,r,n){var i=kt.exec(r.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Ui(e,r,n){var i=kt.exec(r.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function Qr(e,r){return ot(e.getDate(),r,2)}function Li(e,r){return ot(e.getHours(),r,2)}function Wi(e,r){return ot(e.getHours()%12||12,r,2)}function Ei(e,r){return ot(1+Dt.count(xt(e),e),r,3)}function rn(e,r){return ot(e.getMilliseconds(),r,3)}function Ai(e,r){return rn(e,r)+"000"}function Oi(e,r){return ot(e.getMonth()+1,r,2)}function $i(e,r){return ot(e.getMinutes(),r,2)}function Hi(e,r){return ot(e.getSeconds(),r,2)}function Ni(e){var r=e.getDay();return r===0?7:r}function Pi(e,r){return ot(Ct.count(xt(e)-1,e),r,2)}function nn(e){var r=e.getDay();return r>=4||r===0?It(e):It.ceil(e)}function Vi(e,r){return e=nn(e),ot(It.count(xt(e),e)+(xt(e).getDay()===4),r,2)}function zi(e){return e.getDay()}function Ri(e,r){return ot(Nt.count(xt(e)-1,e),r,2)}function Bi(e,r){return ot(e.getFullYear()%100,r,2)}function ji(e,r){return e=nn(e),ot(e.getFullYear()%100,r,2)}function Xi(e,r){return ot(e.getFullYear()%1e4,r,4)}function qi(e,r){var n=e.getDay();return e=n>=4||n===0?It(e):It.ceil(e),ot(e.getFullYear()%1e4,r,4)}function Gi(e){var r=e.getTimezoneOffset();return(r>0?"-":(r*=-1,"+"))+ot(r/60|0,"0",2)+ot(r%60,"0",2)}function Jr(e,r){return ot(e.getUTCDate(),r,2)}function Qi(e,r){return ot(e.getUTCHours(),r,2)}function Ki(e,r){return ot(e.getUTCHours()%12||12,r,2)}function ta(e,r){return ot(1+ae.count(St(e),e),r,3)}function an(e,r){return ot(e.getUTCMilliseconds(),r,3)}function ea(e,r){return an(e,r)+"000"}function ra(e,r){return ot(e.getUTCMonth()+1,r,2)}function na(e,r){return ot(e.getUTCMinutes(),r,2)}function ia(e,r){return ot(e.getUTCSeconds(),r,2)}function aa(e){var r=e.getUTCDay();return r===0?7:r}function sa(e,r){return ot(Rt.count(St(e)-1,e),r,2)}function sn(e){var r=e.getUTCDay();return r>=4||r===0?Pt(e):Pt.ceil(e)}function oa(e,r){return e=sn(e),ot(Pt.count(St(e),e)+(St(e).getUTCDay()===4),r,2)}function ca(e){return e.getUTCDay()}function ua(e,r){return ot(qt.count(St(e)-1,e),r,2)}function la(e,r){return ot(e.getUTCFullYear()%100,r,2)}function fa(e,r){return e=sn(e),ot(e.getUTCFullYear()%100,r,2)}function da(e,r){return ot(e.getUTCFullYear()%1e4,r,4)}function ma(e,r){var n=e.getUTCDay();return e=n>=4||n===0?Pt(e):Pt.ceil(e),ot(e.getUTCFullYear()%1e4,r,4)}function ha(){return"+0000"}function Kr(){return"%"}function tn(e){return+e}function en(e){return Math.floor(+e/1000)}var Gt,Bt,on,cn,un;Qe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Qe(e){return Gt=Ge(e),Bt=Gt.format,on=Gt.parse,cn=Gt.utcFormat,un=Gt.utcParse,Gt}function ya(e){return new Date(e)}function ga(e){return e instanceof Date?+e:+new Date(+e)}function ln(e,r,n,i,a,s,c,x,C,E){var Y=id(),{invert:rt,domain:A}=Y,F=E(".%L"),W=E(":%S"),N=E("%I:%M"),I=E("%I %p"),J=E("%a %d"),lt=E("%b %d"),it=E("%B"),P=E("%Y");function D(u){return(C(u)<u?F:x(u)<u?W:c(u)<u?N:s(u)<u?I:i(u)<u?a(u)<u?J:lt:n(u)<u?it:P)(u)}return Y.invert=function(u){return new Date(rt(u))},Y.domain=function(u){return arguments.length?A(Array.from(u,ga)):A().map(ya)},Y.ticks=function(u){var U=A();return e(U[0],U[U.length-1],u==null?10:u)},Y.tickFormat=function(u,U){return U==null?D:E(U)},Y.nice=function(u){var U=A();if(!u||typeof u.range!=="function")u=r(U[0],U[U.length-1],u==null?10:u);return u?A(Ve(U,u)):Y},Y.copy=function(){return Ep(Y,ln(e,r,n,i,a,s,c,x,C,E))},Y}function Je(){return _o.apply(ln(Ze,je,xt,Ot,Ct,Dt,At,Et,vt,Bt).domain([new Date(2000,0,1),new Date(2000,0,2)]),arguments)}var pn=xn(ll(),1),bt=xn(qp(),1),Tn=xn(fn(),1),vn=xn(dn(),1),bn=xn(mn(),1),Jt=xn(qp(),1),Un=xn(hn(),1);var cr=function(){var e=t(function(L,f,v,p){for(v=v||{},p=L.length;p--;v[L[p]]=f);return v},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],a=[1,28],s=[1,29],c=[1,30],x=[1,31],C=[1,32],E=[1,33],Y=[1,34],rt=[1,9],A=[1,10],F=[1,11],W=[1,12],N=[1,13],I=[1,14],J=[1,15],lt=[1,16],it=[1,19],P=[1,20],D=[1,21],u=[1,22],U=[1,23],tt=[1,25],et=[1,35],T={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:t(function(f,v,p,k,Z,o,X){var h=o.length-1;switch(Z){case 1:return o[h-1];case 2:this.$=[];break;case 3:o[h-1].push(o[h]),this.$=o[h-1];break;case 4:case 5:this.$=o[h];break;case 6:case 7:this.$=[];break;case 8:k.setWeekday("monday");break;case 9:k.setWeekday("tuesday");break;case 10:k.setWeekday("wednesday");break;case 11:k.setWeekday("thursday");break;case 12:k.setWeekday("friday");break;case 13:k.setWeekday("saturday");break;case 14:k.setWeekday("sunday");break;case 15:k.setWeekend("friday");break;case 16:k.setWeekend("saturday");break;case 17:k.setDateFormat(o[h].substr(11)),this.$=o[h].substr(11);break;case 18:k.enableInclusiveEndDates(),this.$=o[h].substr(18);break;case 19:k.TopAxis(),this.$=o[h].substr(8);break;case 20:k.setAxisFormat(o[h].substr(11)),this.$=o[h].substr(11);break;case 21:k.setTickInterval(o[h].substr(13)),this.$=o[h].substr(13);break;case 22:k.setExcludes(o[h].substr(9)),this.$=o[h].substr(9);break;case 23:k.setIncludes(o[h].substr(9)),this.$=o[h].substr(9);break;case 24:k.setTodayMarker(o[h].substr(12)),this.$=o[h].substr(12);break;case 27:k.setDiagramTitle(o[h].substr(6)),this.$=o[h].substr(6);break;case 28:this.$=o[h].trim(),k.setAccTitle(this.$);break;case 29:case 30:this.$=o[h].trim(),k.setAccDescription(this.$);break;case 31:k.addSection(o[h].substr(8)),this.$=o[h].substr(8);break;case 33:k.addTask(o[h-1],o[h]),this.$="task";break;case 34:this.$=o[h-1],k.setClickEvent(o[h-1],o[h],null);break;case 35:this.$=o[h-2],k.setClickEvent(o[h-2],o[h-1],o[h]);break;case 36:this.$=o[h-2],k.setClickEvent(o[h-2],o[h-1],null),k.setLink(o[h-2],o[h]);break;case 37:this.$=o[h-3],k.setClickEvent(o[h-3],o[h-2],o[h-1]),k.setLink(o[h-3],o[h]);break;case 38:this.$=o[h-2],k.setClickEvent(o[h-2],o[h],null),k.setLink(o[h-2],o[h-1]);break;case 39:this.$=o[h-3],k.setClickEvent(o[h-3],o[h-1],o[h]),k.setLink(o[h-3],o[h-2]);break;case 40:this.$=o[h-1],k.setLink(o[h-1],o[h]);break;case 41:case 47:this.$=o[h-1]+" "+o[h];break;case 42:case 43:case 45:this.$=o[h-2]+" "+o[h-1]+" "+o[h];break;case 44:case 46:this.$=o[h-3]+" "+o[h-2]+" "+o[h-1]+" "+o[h];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:s,16:c,17:x,18:C,19:18,20:E,21:Y,22:rt,23:A,24:F,25:W,26:N,27:I,28:J,29:lt,30:it,31:P,33:D,35:u,36:U,37:24,38:tt,40:et},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:s,16:c,17:x,18:C,19:18,20:E,21:Y,22:rt,23:A,24:F,25:W,26:N,27:I,28:J,29:lt,30:it,31:P,33:D,35:u,36:U,37:24,38:tt,40:et},e(r,[2,5]),e(r,[2,6]),e(r,[2,17]),e(r,[2,18]),e(r,[2,19]),e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),e(r,[2,23]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),e(r,[2,27]),{32:[1,37]},{34:[1,38]},e(r,[2,30]),e(r,[2,31]),e(r,[2,32]),{39:[1,39]},e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{41:[1,40],43:[1,41]},e(r,[2,4]),e(r,[2,28]),e(r,[2,29]),e(r,[2,33]),e(r,[2,34],{42:[1,42],43:[1,43]}),e(r,[2,40],{41:[1,44]}),e(r,[2,35],{43:[1,45]}),e(r,[2,36]),e(r,[2,38],{42:[1,46]}),e(r,[2,37]),e(r,[2,39])],defaultActions:{},parseError:t(function(f,v){if(v.recoverable)this.trace(f);else{var p=Error(f);throw p.hash=v,p}},"parseError"),parse:t(function(f){var v=this,p=[0],k=[],Z=[null],o=[],X=this.table,h="",dt=0,d=0,B=0,Q=2,ct=1,ut=o.slice.call(arguments,1),nt=Object.create(this.lexer),g={yy:{}};for(var R in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,R))g.yy[R]=this.yy[R];if(nt.setInput(f,g.yy),g.yy.lexer=nt,g.yy.parser=this,typeof nt.yylloc>"u")nt.yylloc={};var K=nt.yylloc;o.push(K);var y=nt.options&&nt.options.ranges;if(typeof g.yy.parseError==="function")this.parseError=g.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(wt){p.length=p.length-2*wt,Z.length=Z.length-wt,o.length=o.length-wt}t(mt,"popStack");function at(){var wt=k.pop()||nt.lex()||ct;if(typeof wt!=="number"){if(wt instanceof Array)k=wt,wt=k.pop();wt=v.symbols_[wt]||wt}return wt}t(at,"lex");var st,ht,yt,pt,cs,Ye,jt={},le,Lt,br,fe;while(!0){if(yt=p[p.length-1],this.defaultActions[yt])pt=this.defaultActions[yt];else{if(st===null||typeof st>"u")st=at();pt=X[yt]&&X[yt][st]}if(typeof pt>"u"||!pt.length||!pt[0]){var Fe="";fe=[];for(le in X[yt])if(this.terminals_[le]&&le>Q)fe.push("'"+this.terminals_[le]+"'");if(nt.showPosition)Fe="Parse error on line "+(dt+1)+`:
1
+ import{t,qp,l,w,ne,M,O,G,z,j,q,H,m,b,Ji,mc,Zi,Lg,Gn,ah,li,_o,ll,V}from"./index-4fpyzg5e.js";import{Jl,od,Ep,id,Aa}from"./index-3k45gspr.js";import{xn,$n}from"./index-8pqx5n2p.js";var fn=$n(function(Ke,tr){(function(e,r){typeof Ke=="object"&&typeof tr<"u"?tr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=r()})(Ke,function(){var e="day";return function(r,n,i){var a=function(x){return x.add(4-x.isoWeekday(),e)},s=n.prototype;s.isoWeekYear=function(){return a(this).year()},s.isoWeek=function(x){if(!this.$utils().u(x))return this.add(7*(x-this.isoWeek()),e);var C,E,Y,rt,A=a(this),F=(C=this.isoWeekYear(),E=this.$u,Y=(E?i.utc:i)().year(C).startOf("year"),rt=4-Y.isoWeekday(),Y.isoWeekday()>4&&(rt+=7),Y.add(rt,e));return A.diff(F,"week")+1},s.isoWeekday=function(x){return this.$utils().u(x)?this.day()||7:this.day(this.day()%7?x:x-7)};var c=s.startOf;s.startOf=function(x,C){var E=this.$utils(),Y=!!E.u(C)||C;return E.p(x)==="isoweek"?Y?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(x,C)}}})});var dn=$n(function(er,rr){(function(e,r){typeof er=="object"&&typeof rr<"u"?rr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=r()})(er,function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,c={},x=function(W){return(W=+W)+(W>68?1900:2000)},C=function(W){return function(N){this[W]=+N}},E=[/[+-]\d\d:?(\d\d)?|Z/,function(W){(this.zone||(this.zone={})).offset=function(N){if(!N)return 0;if(N==="Z")return 0;var I=N.match(/([+-]|\d\d)/g),J=60*I[1]+(+I[2]||0);return J===0?0:I[0]==="+"?-J:J}(W)}],Y=function(W){var N=c[W];return N&&(N.indexOf?N:N.s.concat(N.f))},rt=function(W,N){var I,J=c.meridiem;if(J){for(var lt=1;lt<=24;lt+=1)if(W.indexOf(J(lt,0,N))>-1){I=lt>12;break}}else I=W===(N?"pm":"PM");return I},A={A:[s,function(W){this.afternoon=rt(W,!1)}],a:[s,function(W){this.afternoon=rt(W,!0)}],Q:[n,function(W){this.month=3*(W-1)+1}],S:[n,function(W){this.milliseconds=100*+W}],SS:[i,function(W){this.milliseconds=10*+W}],SSS:[/\d{3}/,function(W){this.milliseconds=+W}],s:[a,C("seconds")],ss:[a,C("seconds")],m:[a,C("minutes")],mm:[a,C("minutes")],H:[a,C("hours")],h:[a,C("hours")],HH:[a,C("hours")],hh:[a,C("hours")],D:[a,C("day")],DD:[i,C("day")],Do:[s,function(W){var N=c.ordinal,I=W.match(/\d+/);if(this.day=I[0],N)for(var J=1;J<=31;J+=1)N(J).replace(/\[|\]/g,"")===W&&(this.day=J)}],w:[a,C("week")],ww:[i,C("week")],M:[a,C("month")],MM:[i,C("month")],MMM:[s,function(W){var N=Y("months"),I=(Y("monthsShort")||N.map(function(J){return J.slice(0,3)})).indexOf(W)+1;if(I<1)throw Error();this.month=I%12||I}],MMMM:[s,function(W){var N=Y("months").indexOf(W)+1;if(N<1)throw Error();this.month=N%12||N}],Y:[/[+-]?\d+/,C("year")],YY:[i,function(W){this.year=x(W)}],YYYY:[/\d{4}/,C("year")],Z:E,ZZ:E};function F(W){var N,I;N=W,I=c&&c.formats;for(var J=(W=N.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(tt,et,T){var _=T&&T.toUpperCase();return et||I[T]||e[T]||I[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(S,L,f){return L||f.slice(1)})})).match(r),lt=J.length,it=0;it<lt;it+=1){var P=J[it],D=A[P],u=D&&D[0],U=D&&D[1];J[it]=U?{regex:u,parser:U}:P.replace(/^\[|\]$/g,"")}return function(tt){for(var et={},T=0,_=0;T<lt;T+=1){var S=J[T];if(typeof S=="string")_+=S.length;else{var{regex:L,parser:f}=S,v=tt.slice(_),p=L.exec(v)[0];f.call(et,p),tt=tt.replace(p,"")}}return function(k){var Z=k.afternoon;if(Z!==void 0){var o=k.hours;Z?o<12&&(k.hours+=12):o===12&&(k.hours=0),delete k.afternoon}}(et),et}}return function(W,N,I){I.p.customParseFormat=!0,W&&W.parseTwoDigitYear&&(x=W.parseTwoDigitYear);var J=N.prototype,lt=J.parse;J.parse=function(it){var{date:P,utc:D,args:u}=it;this.$u=D;var U=u[1];if(typeof U=="string"){var tt=u[2]===!0,et=u[3]===!0,T=tt||et,_=u[2];et&&(_=u[2]),c=this.$locale(),!tt&&_&&(c=I.Ls[_]),this.$d=function(v,p,k,Z){try{if(["x","X"].indexOf(p)>-1)return new Date((p==="X"?1000:1)*v);var o=F(p)(v),{year:X,month:h,day:dt,hours:d,minutes:B,seconds:Q,milliseconds:ct,zone:ut,week:nt}=o,g=new Date,R=dt||(X||h?1:g.getDate()),K=X||g.getFullYear(),y=0;X&&!h||(y=h>0?h-1:g.getMonth());var mt,at=d||0,st=B||0,ht=Q||0,yt=ct||0;return ut?new Date(Date.UTC(K,y,R,at,st,ht,yt+60*ut.offset*1000)):k?new Date(Date.UTC(K,y,R,at,st,ht,yt)):(mt=new Date(K,y,R,at,st,ht,yt),nt&&(mt=Z(mt).week(nt).toDate()),mt)}catch(pt){return new Date("")}}(P,U,D,I),this.init(),_&&_!==!0&&(this.$L=this.locale(_).$L),T&&P!=this.format(U)&&(this.$d=new Date("")),c={}}else if(U instanceof Array)for(var S=U.length,L=1;L<=S;L+=1){u[1]=U[L-1];var f=I.apply(this,u);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}L===S&&(this.$d=new Date(""))}else lt.call(this,it)}}})});var mn=$n(function(nr,ir){(function(e,r){typeof nr=="object"&&typeof ir<"u"?ir.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=r()})(nr,function(){return function(e,r){var n=r.prototype,i=n.format;n.format=function(a){var s=this,c=this.$locale();if(!this.isValid())return i.bind(this)(a);var x=this.$utils(),C=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(E){switch(E){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return c.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return c.ordinal(s.week(),"W");case"w":case"ww":return x.s(s.week(),E==="w"?1:2,"0");case"W":case"WW":return x.s(s.isoWeek(),E==="W"?1:2,"0");case"k":case"kk":return x.s(String(s.$H===0?24:s.$H),E==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1000);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return E}});return i.bind(this)(C)}}})});var hn=$n(function(ar,sr){(function(e,r){typeof ar=="object"&&typeof sr<"u"?sr.exports=r():typeof define=="function"&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=r()})(ar,function(){var e,r,n=1000,i=60000,a=3600000,s=86400000,c=31536000000,x=2628000000,C=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,E=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,Y={years:c,months:x,days:s,hours:a,minutes:i,seconds:n,milliseconds:1,weeks:604800000},rt=function(P){return P instanceof lt},A=function(P,D,u){return new lt(P,u,D.$l)},F=function(P){return r.p(P)+"s"},W=function(P){return P<0},N=function(P){return W(P)?Math.ceil(P):Math.floor(P)},I=function(P){return Math.abs(P)},J=function(P,D){return P?W(P)?{negative:!0,format:""+I(P)+D}:{negative:!1,format:""+P+D}:{negative:!1,format:""}},lt=function(){function P(u,U,tt){var et=this;if(this.$d={},this.$l=tt,u===void 0&&(this.$ms=0,this.parseFromMilliseconds()),U)return A(u*Y[F(U)],this);if(typeof u=="number")return this.$ms=u,this.parseFromMilliseconds(),this;if(typeof u=="object")return Object.keys(u).forEach(function(S){et.$d[F(S)]=u[S]}),this.calMilliseconds(),this;if(typeof u=="string"){var T=u.match(C);if(T){var _=T.slice(2).map(function(S){return S!=null?Number(S):0});return this.$d.years=_[0],this.$d.months=_[1],this.$d.weeks=_[2],this.$d.days=_[3],this.$d.hours=_[4],this.$d.minutes=_[5],this.$d.seconds=_[6],this.calMilliseconds(),this}}return this}var D=P.prototype;return D.calMilliseconds=function(){var u=this;this.$ms=Object.keys(this.$d).reduce(function(U,tt){return U+(u.$d[tt]||0)*Y[tt]},0)},D.parseFromMilliseconds=function(){var u=this.$ms;this.$d.years=N(u/c),u%=c,this.$d.months=N(u/x),u%=x,this.$d.days=N(u/s),u%=s,this.$d.hours=N(u/a),u%=a,this.$d.minutes=N(u/i),u%=i,this.$d.seconds=N(u/n),u%=n,this.$d.milliseconds=u},D.toISOString=function(){var u=J(this.$d.years,"Y"),U=J(this.$d.months,"M"),tt=+this.$d.days||0;this.$d.weeks&&(tt+=7*this.$d.weeks);var et=J(tt,"D"),T=J(this.$d.hours,"H"),_=J(this.$d.minutes,"M"),S=this.$d.seconds||0;this.$d.milliseconds&&(S+=this.$d.milliseconds/1000,S=Math.round(1000*S)/1000);var L=J(S,"S"),f=u.negative||U.negative||et.negative||T.negative||_.negative||L.negative,v=T.format||_.format||L.format?"T":"",p=(f?"-":"")+"P"+u.format+U.format+et.format+v+T.format+_.format+L.format;return p==="P"||p==="-P"?"P0D":p},D.toJSON=function(){return this.toISOString()},D.format=function(u){var U=u||"YYYY-MM-DDTHH:mm:ss",tt={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return U.replace(E,function(et,T){return T||String(tt[et])})},D.as=function(u){return this.$ms/Y[F(u)]},D.get=function(u){var U=this.$ms,tt=F(u);return tt==="milliseconds"?U%=1000:U=tt==="weeks"?N(U/Y[tt]):this.$d[tt],U||0},D.add=function(u,U,tt){var et;return et=U?u*Y[F(U)]:rt(u)?u.$ms:A(u,this).$ms,A(this.$ms+et*(tt?-1:1),this)},D.subtract=function(u,U){return this.add(u,U,!0)},D.locale=function(u){var U=this.clone();return U.$l=u,U},D.clone=function(){return A(this.$ms,this)},D.humanize=function(u){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!u)},D.valueOf=function(){return this.asMilliseconds()},D.milliseconds=function(){return this.get("milliseconds")},D.asMilliseconds=function(){return this.as("milliseconds")},D.seconds=function(){return this.get("seconds")},D.asSeconds=function(){return this.as("seconds")},D.minutes=function(){return this.get("minutes")},D.asMinutes=function(){return this.as("minutes")},D.hours=function(){return this.get("hours")},D.asHours=function(){return this.as("hours")},D.days=function(){return this.get("days")},D.asDays=function(){return this.as("days")},D.weeks=function(){return this.get("weeks")},D.asWeeks=function(){return this.as("weeks")},D.months=function(){return this.get("months")},D.asMonths=function(){return this.as("months")},D.years=function(){return this.get("years")},D.asYears=function(){return this.as("years")},P}(),it=function(P,D,u){return P.add(D.years()*u,"y").add(D.months()*u,"M").add(D.days()*u,"d").add(D.hours()*u,"h").add(D.minutes()*u,"m").add(D.seconds()*u,"s").add(D.milliseconds()*u,"ms")};return function(P,D,u){e=u,r=u().$utils(),u.duration=function(et,T){var _=u.locale();return A(et,{$l:_},T)},u.isDuration=rt;var U=D.prototype.add,tt=D.prototype.subtract;D.prototype.add=function(et,T){return rt(et)?it(this,et,1):U.bind(this)(et,T)},D.prototype.subtract=function(et,T){return rt(et)?it(this,et,-1):tt.bind(this)(et,T)}}})});function Ie(e,r){let n;if(r===void 0){for(let i of e)if(i!=null&&(n<i||n===void 0&&i>=i))n=i}else{let i=-1;for(let a of e)if((a=r(a,++i,e))!=null&&(n<a||n===void 0&&a>=a))n=a}return n}function Ue(e,r){let n;if(r===void 0){for(let i of e)if(i!=null&&(n>i||n===void 0&&i>=i))n=i}else{let i=-1;for(let a of e)if((a=r(a,++i,e))!=null&&(n>a||n===void 0&&a>=a))n=a}return n}function Le(e){return e}var me=1,We=2,Ee=3,de=4,wr=0.000001;function Ln(e){return"translate("+e+",0)"}function Wn(e){return"translate(0,"+e+")"}function En(e){return(r)=>+e(r)}function An(e,r){if(r=Math.max(0,e.bandwidth()-r*2)/2,e.round())r=Math.round(r);return(n)=>+e(n)+r}function On(){return!this.__axis}function Mr(e,r){var n=[],i=null,a=null,s=6,c=6,x=3,C=typeof window<"u"&&window.devicePixelRatio>1?0:0.5,E=e===me||e===de?-1:1,Y=e===de||e===We?"x":"y",rt=e===me||e===Ee?Ln:Wn;function A(F){var W=i==null?r.ticks?r.ticks.apply(r,n):r.domain():i,N=a==null?r.tickFormat?r.tickFormat.apply(r,n):Le:a,I=Math.max(s,0)+x,J=r.range(),lt=+J[0]+C,it=+J[J.length-1]+C,P=(r.bandwidth?An:En)(r.copy(),C),D=F.selection?F.selection():F,u=D.selectAll(".domain").data([null]),U=D.selectAll(".tick").data(W,r).order(),tt=U.exit(),et=U.enter().append("g").attr("class","tick"),T=U.select("line"),_=U.select("text");if(u=u.merge(u.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),U=U.merge(et),T=T.merge(et.append("line").attr("stroke","currentColor").attr(Y+"2",E*s)),_=_.merge(et.append("text").attr("fill","currentColor").attr(Y,E*I).attr("dy",e===me?"0em":e===Ee?"0.71em":"0.32em")),F!==D)u=u.transition(F),U=U.transition(F),T=T.transition(F),_=_.transition(F),tt=tt.transition(F).attr("opacity",wr).attr("transform",function(S){return isFinite(S=P(S))?rt(S+C):this.getAttribute("transform")}),et.attr("opacity",wr).attr("transform",function(S){var L=this.parentNode.__axis;return rt((L&&isFinite(L=L(S))?L:P(S))+C)});tt.remove(),u.attr("d",e===de||e===We?c?"M"+E*c+","+lt+"H"+C+"V"+it+"H"+E*c:"M"+C+","+lt+"V"+it:c?"M"+lt+","+E*c+"V"+C+"H"+it+"V"+E*c:"M"+lt+","+C+"H"+it),U.attr("opacity",1).attr("transform",function(S){return rt(P(S)+C)}),T.attr(Y+"2",E*s),_.attr(Y,E*I).text(N),D.filter(On).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===We?"start":e===de?"end":"middle"),D.each(function(){this.__axis=P})}return A.scale=function(F){return arguments.length?(r=F,A):r},A.ticks=function(){return n=Array.from(arguments),A},A.tickArguments=function(F){return arguments.length?(n=F==null?[]:Array.from(F),A):n.slice()},A.tickValues=function(F){return arguments.length?(i=F==null?null:Array.from(F),A):i&&i.slice()},A.tickFormat=function(F){return arguments.length?(a=F,A):a},A.tickSize=function(F){return arguments.length?(s=c=+F,A):s},A.tickSizeInner=function(F){return arguments.length?(s=+F,A):s},A.tickSizeOuter=function(F){return arguments.length?(c=+F,A):c},A.tickPadding=function(F){return arguments.length?(x=+F,A):x},A.offset=function(F){return arguments.length?(C=+F,A):C},A}function Ae(e){return Mr(me,e)}function Oe(e){return Mr(Ee,e)}var Dr=Math.PI/180,Cr=180/Math.PI;var he=18,Sr=0.96422,_r=1,Yr=0.82521,Fr=0.13793103448275862,Xt=0.20689655172413793,Ir=3*Xt*Xt,Hn=Xt*Xt*Xt;function Ur(e){if(e instanceof _t)return new _t(e.l,e.a,e.b,e.opacity);if(e instanceof Wt)return Wr(e);if(!(e instanceof Gn))e=Lg(e);var r=Pe(e.r),n=Pe(e.g),i=Pe(e.b),a=$e((0.2225045*r+0.7168786*n+0.0606169*i)/_r),s,c;if(r===n&&n===i)s=c=a;else s=$e((0.4360747*r+0.3850649*n+0.1430804*i)/Sr),c=$e((0.0139322*r+0.0971045*n+0.7141733*i)/Yr);return new _t(116*a-16,500*(s-a),200*(a-c),e.opacity)}function Lr(e,r,n,i){return arguments.length===1?Ur(e):new _t(e,r,n,i==null?1:i)}function _t(e,r,n,i){this.l=+e,this.a=+r,this.b=+n,this.opacity=+i}Ji(_t,Lr,mc(Zi,{brighter(e){return new _t(this.l+he*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new _t(this.l-he*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,r=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return r=Sr*He(r),e=_r*He(e),n=Yr*He(n),new Gn(Ne(3.1338561*r-1.6168667*e-0.4906146*n),Ne(-0.9787684*r+1.9161415*e+0.033454*n),Ne(0.0719453*r-0.2289914*e+1.4052427*n),this.opacity)}}));function $e(e){return e>Hn?Math.pow(e,0.3333333333333333):e/Ir+Fr}function He(e){return e>Xt?e*e*e:Ir*(e-Fr)}function Ne(e){return 255*(e<=0.0031308?12.92*e:1.055*Math.pow(e,0.4166666666666667)-0.055)}function Pe(e){return(e/=255)<=0.04045?e/12.92:Math.pow((e+0.055)/1.055,2.4)}function Nn(e){if(e instanceof Wt)return new Wt(e.h,e.c,e.l,e.opacity);if(!(e instanceof _t))e=Ur(e);if(e.a===0&&e.b===0)return new Wt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var r=Math.atan2(e.b,e.a)*Cr;return new Wt(r<0?r+360:r,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ye(e,r,n,i){return arguments.length===1?Nn(e):new Wt(e,r,n,i==null?1:i)}function Wt(e,r,n,i){this.h=+e,this.c=+r,this.l=+n,this.opacity=+i}function Wr(e){if(isNaN(e.h))return new _t(e.l,0,0,e.opacity);var r=e.h*Dr;return new _t(e.l,Math.cos(r)*e.c,Math.sin(r)*e.c,e.opacity)}Ji(Wt,ye,mc(Zi,{brighter(e){return new Wt(this.h,this.c,this.l+he*(e==null?1:e),this.opacity)},darker(e){return new Wt(this.h,this.c,this.l-he*(e==null?1:e),this.opacity)},rgb(){return Wr(this).rgb()}}));function Er(e){return function(r,n){var i=e((r=ye(r)).h,(n=ye(n)).h),a=li(r.c,n.c),s=li(r.l,n.l),c=li(r.opacity,n.opacity);return function(x){return r.h=i(x),r.c=a(x),r.l=s(x),r.opacity=c(x),r+""}}}var Ar=Er(ah),Ds=Er(li);function Ve(e,r){e=e.slice();var n=0,i=e.length-1,a=e[n],s=e[i],c;if(s<a)c=n,n=i,i=c,c=a,a=s,s=c;return e[n]=r.floor(a),e[i]=r.ceil(s),e}var ze=new Date,Re=new Date;function ft(e,r,n,i){function a(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}if(a.floor=(s)=>(e(s=new Date(+s)),s),a.ceil=(s)=>(e(s=new Date(s-1)),r(s,1),e(s),s),a.round=(s)=>{let c=a(s),x=a.ceil(s);return s-c<x-s?c:x},a.offset=(s,c)=>(r(s=new Date(+s),c==null?1:Math.floor(c)),s),a.range=(s,c,x)=>{let C=[];if(s=a.ceil(s),x=x==null?1:Math.floor(x),!(s<c)||!(x>0))return C;let E;do C.push(E=new Date(+s)),r(s,x),e(s);while(E<s&&s<c);return C},a.filter=(s)=>ft((c)=>{if(c>=c)while(e(c),!s(c))c.setTime(c-1)},(c,x)=>{if(c>=c)if(x<0)while(++x<=0)while(r(c,-1),!s(c));else while(--x>=0)while(r(c,1),!s(c));}),n)a.count=(s,c)=>(ze.setTime(+s),Re.setTime(+c),e(ze),e(Re),Math.floor(n(ze,Re))),a.every=(s)=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:!(s>1)?a:a.filter(i?(c)=>i(c)%s===0:(c)=>a.count(0,c)%s===0));return a}var Yt=ft(()=>{},(e,r)=>{e.setTime(+e+r)},(e,r)=>r-e);Yt.every=(e)=>{if(e=Math.floor(e),!isFinite(e)||!(e>0))return null;if(!(e>1))return Yt;return ft((r)=>{r.setTime(Math.floor(r/e)*e)},(r,n)=>{r.setTime(+r+n*e)},(r,n)=>(n-r)/e)};var Or=Yt.range;var Mt=1000,Tt=60000,Ft=3600000,Ht=86400000,ie=604800000,Be=2592000000,ge=31536000000;var vt=ft((e)=>{e.setTime(e-e.getMilliseconds())},(e,r)=>{e.setTime(+e+r*Mt)},(e,r)=>(r-e)/Mt,(e)=>e.getUTCSeconds()),$r=vt.range;var Et=ft((e)=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mt)},(e,r)=>{e.setTime(+e+r*Tt)},(e,r)=>(r-e)/Tt,(e)=>e.getMinutes()),Pn=Et.range,ke=ft((e)=>{e.setUTCSeconds(0,0)},(e,r)=>{e.setTime(+e+r*Tt)},(e,r)=>(r-e)/Tt,(e)=>e.getUTCMinutes()),Vn=ke.range;var At=ft((e)=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mt-e.getMinutes()*Tt)},(e,r)=>{e.setTime(+e+r*Ft)},(e,r)=>(r-e)/Ft,(e)=>e.getHours()),zn=At.range,pe=ft((e)=>{e.setUTCMinutes(0,0,0)},(e,r)=>{e.setTime(+e+r*Ft)},(e,r)=>(r-e)/Ft,(e)=>e.getUTCHours()),Rn=pe.range;var Dt=ft((e)=>e.setHours(0,0,0,0),(e,r)=>e.setDate(e.getDate()+r),(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Tt)/Ht,(e)=>e.getDate()-1),Bn=Dt.range,ae=ft((e)=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ht,(e)=>e.getUTCDate()-1),Zn=ae.range,Te=ft((e)=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ht,(e)=>Math.floor(e/Ht)),jn=Te.range;function Vt(e){return ft((r)=>{r.setDate(r.getDate()-(r.getDay()+7-e)%7),r.setHours(0,0,0,0)},(r,n)=>{r.setDate(r.getDate()+n*7)},(r,n)=>(n-r-(n.getTimezoneOffset()-r.getTimezoneOffset())*Tt)/ie)}var Ct=Vt(0),Nt=Vt(1),ve=Vt(2),xe=Vt(3),It=Vt(4),be=Vt(5),we=Vt(6),Hr=Ct.range,Xn=Nt.range,qn=ve.range,Qn=xe.range,Jn=It.range,Kn=be.range,ti=we.range;function zt(e){return ft((r)=>{r.setUTCDate(r.getUTCDate()-(r.getUTCDay()+7-e)%7),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCDate(r.getUTCDate()+n*7)},(r,n)=>(n-r)/ie)}var Rt=zt(0),qt=zt(1),Nr=zt(2),Pr=zt(3),Pt=zt(4),Vr=zt(5),zr=zt(6),Rr=Rt.range,ei=qt.range,ri=Nr.range,ni=Pr.range,ii=Pt.range,ai=Vr.range,si=zr.range;var Ot=ft((e)=>{e.setDate(1),e.setHours(0,0,0,0)},(e,r)=>{e.setMonth(e.getMonth()+r)},(e,r)=>r.getMonth()-e.getMonth()+(r.getFullYear()-e.getFullYear())*12,(e)=>e.getMonth()),oi=Ot.range,Me=ft((e)=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCMonth(e.getUTCMonth()+r)},(e,r)=>r.getUTCMonth()-e.getUTCMonth()+(r.getUTCFullYear()-e.getUTCFullYear())*12,(e)=>e.getUTCMonth()),ci=Me.range;var xt=ft((e)=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r)},(e,r)=>r.getFullYear()-e.getFullYear(),(e)=>e.getFullYear());xt.every=(e)=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft((r)=>{r.setFullYear(Math.floor(r.getFullYear()/e)*e),r.setMonth(0,1),r.setHours(0,0,0,0)},(r,n)=>{r.setFullYear(r.getFullYear()+n*e)});var ui=xt.range,St=ft((e)=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r)},(e,r)=>r.getUTCFullYear()-e.getUTCFullYear(),(e)=>e.getUTCFullYear());St.every=(e)=>!isFinite(e=Math.floor(e))||!(e>0)?null:ft((r)=>{r.setUTCFullYear(Math.floor(r.getUTCFullYear()/e)*e),r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCFullYear(r.getUTCFullYear()+n*e)});var fi=St.range;function Br(e,r,n,i,a,s){let c=[[vt,1,Mt],[vt,5,5*Mt],[vt,15,15*Mt],[vt,30,30*Mt],[s,1,Tt],[s,5,5*Tt],[s,15,15*Tt],[s,30,30*Tt],[a,1,Ft],[a,3,3*Ft],[a,6,6*Ft],[a,12,12*Ft],[i,1,Ht],[i,2,2*Ht],[n,1,ie],[r,1,Be],[r,3,3*Be],[e,1,ge]];function x(E,Y,rt){let A=Y<E;if(A)[E,Y]=[Y,E];let F=rt&&typeof rt.range==="function"?rt:C(E,Y,rt),W=F?F.range(E,+Y+1):[];return A?W.reverse():W}function C(E,Y,rt){let A=Math.abs(Y-E)/rt,F=Jl(([,,I])=>I).right(c,A);if(F===c.length)return e.every(od(E/ge,Y/ge,rt));if(F===0)return Yt.every(Math.max(od(E,Y,rt),1));let[W,N]=c[A/c[F-1][2]<c[F][2]/A?F-1:F];return W.every(N)}return[x,C]}var[di,mi]=Br(St,Me,Rt,Te,pe,ke),[Ze,je]=Br(xt,Ot,Ct,Dt,At,Et);function Xe(e){if(0<=e.y&&e.y<100){var r=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return r.setFullYear(e.y),r}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function qe(e){if(0<=e.y&&e.y<100){var r=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return r.setUTCFullYear(e.y),r}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function se(e,r,n){return{y:e,m:r,d:n,H:0,M:0,S:0,L:0}}function Ge(e){var{dateTime:r,date:n,time:i,periods:a,days:s,shortDays:c,months:x,shortMonths:C}=e,E=oe(a),Y=ce(a),rt=oe(s),A=ce(s),F=oe(c),W=ce(c),N=oe(x),I=ce(x),J=oe(C),lt=ce(C),it={a:k,A:Z,b:o,B:X,c:null,d:Qr,e:Qr,f:Ai,g:ji,G:qi,H:Li,I:Wi,j:Ei,L:rn,m:Oi,M:$i,p:h,q:dt,Q:tn,s:en,S:Hi,u:Ni,U:Pi,V:Vi,w:zi,W:Ri,x:null,X:null,y:Bi,Y:Xi,Z:Gi,"%":Kr},P={a:d,A:B,b:Q,B:ct,c:null,d:Jr,e:Jr,f:ea,g:fa,G:ma,H:Qi,I:Ki,j:ta,L:an,m:ra,M:na,p:ut,q:nt,Q:tn,s:en,S:ia,u:aa,U:sa,V:oa,w:ca,W:ua,x:null,X:null,y:la,Y:da,Z:ha,"%":Kr},D={a:T,A:_,b:S,B:L,c:f,d:qr,e:qr,f:Yi,g:Xr,G:jr,H:Gr,I:Gr,j:Di,L:_i,m:Mi,M:Ci,p:et,q:wi,Q:Ii,s:Ui,S:Si,u:pi,U:Ti,V:vi,w:ki,W:xi,x:v,X:p,y:Xr,Y:jr,Z:bi,"%":Fi};it.x=u(n,it),it.X=u(i,it),it.c=u(r,it),P.x=u(n,P),P.X=u(i,P),P.c=u(r,P);function u(g,R){return function(K){var y=[],mt=-1,at=0,st=g.length,ht,yt,pt;if(!(K instanceof Date))K=new Date(+K);while(++mt<st)if(g.charCodeAt(mt)===37){if(y.push(g.slice(at,mt)),(yt=Zr[ht=g.charAt(++mt)])!=null)ht=g.charAt(++mt);else yt=ht==="e"?" ":"0";if(pt=R[ht])ht=pt(K,yt);y.push(ht),at=mt+1}return y.push(g.slice(at,mt)),y.join("")}}function U(g,R){return function(K){var y=se(1900,void 0,1),mt=tt(y,g,K+="",0),at,st;if(mt!=K.length)return null;if("Q"in y)return new Date(y.Q);if("s"in y)return new Date(y.s*1000+("L"in y?y.L:0));if(R&&!("Z"in y))y.Z=0;if("p"in y)y.H=y.H%12+y.p*12;if(y.m===void 0)y.m="q"in y?y.q:0;if("V"in y){if(y.V<1||y.V>53)return null;if(!("w"in y))y.w=1;if("Z"in y)at=qe(se(y.y,0,1)),st=at.getUTCDay(),at=st>4||st===0?qt.ceil(at):qt(at),at=ae.offset(at,(y.V-1)*7),y.y=at.getUTCFullYear(),y.m=at.getUTCMonth(),y.d=at.getUTCDate()+(y.w+6)%7;else at=Xe(se(y.y,0,1)),st=at.getDay(),at=st>4||st===0?Nt.ceil(at):Nt(at),at=Dt.offset(at,(y.V-1)*7),y.y=at.getFullYear(),y.m=at.getMonth(),y.d=at.getDate()+(y.w+6)%7}else if("W"in y||"U"in y){if(!("w"in y))y.w="u"in y?y.u%7:("W"in y)?1:0;st="Z"in y?qe(se(y.y,0,1)).getUTCDay():Xe(se(y.y,0,1)).getDay(),y.m=0,y.d="W"in y?(y.w+6)%7+y.W*7-(st+5)%7:y.w+y.U*7-(st+6)%7}if("Z"in y)return y.H+=y.Z/100|0,y.M+=y.Z%100,qe(y);return Xe(y)}}function tt(g,R,K,y){var mt=0,at=R.length,st=K.length,ht,yt;while(mt<at){if(y>=st)return-1;if(ht=R.charCodeAt(mt++),ht===37){if(ht=R.charAt(mt++),yt=D[ht in Zr?R.charAt(mt++):ht],!yt||(y=yt(g,K,y))<0)return-1}else if(ht!=K.charCodeAt(y++))return-1}return y}function et(g,R,K){var y=E.exec(R.slice(K));return y?(g.p=Y.get(y[0].toLowerCase()),K+y[0].length):-1}function T(g,R,K){var y=F.exec(R.slice(K));return y?(g.w=W.get(y[0].toLowerCase()),K+y[0].length):-1}function _(g,R,K){var y=rt.exec(R.slice(K));return y?(g.w=A.get(y[0].toLowerCase()),K+y[0].length):-1}function S(g,R,K){var y=J.exec(R.slice(K));return y?(g.m=lt.get(y[0].toLowerCase()),K+y[0].length):-1}function L(g,R,K){var y=N.exec(R.slice(K));return y?(g.m=I.get(y[0].toLowerCase()),K+y[0].length):-1}function f(g,R,K){return tt(g,r,R,K)}function v(g,R,K){return tt(g,n,R,K)}function p(g,R,K){return tt(g,i,R,K)}function k(g){return c[g.getDay()]}function Z(g){return s[g.getDay()]}function o(g){return C[g.getMonth()]}function X(g){return x[g.getMonth()]}function h(g){return a[+(g.getHours()>=12)]}function dt(g){return 1+~~(g.getMonth()/3)}function d(g){return c[g.getUTCDay()]}function B(g){return s[g.getUTCDay()]}function Q(g){return C[g.getUTCMonth()]}function ct(g){return x[g.getUTCMonth()]}function ut(g){return a[+(g.getUTCHours()>=12)]}function nt(g){return 1+~~(g.getUTCMonth()/3)}return{format:function(g){var R=u(g+="",it);return R.toString=function(){return g},R},parse:function(g){var R=U(g+="",!1);return R.toString=function(){return g},R},utcFormat:function(g){var R=u(g+="",P);return R.toString=function(){return g},R},utcParse:function(g){var R=U(g+="",!0);return R.toString=function(){return g},R}}}var Zr={"-":"",_:" ","0":"0"},kt=/^\s*\d+/,hi=/^%/,yi=/[\\^$*+?|[\]().{}]/g;function ot(e,r,n){var i=e<0?"-":"",a=(i?-e:e)+"",s=a.length;return i+(s<n?Array(n-s+1).join(r)+a:a)}function gi(e){return e.replace(yi,"\\$&")}function oe(e){return new RegExp("^(?:"+e.map(gi).join("|")+")","i")}function ce(e){return new Map(e.map((r,n)=>[r.toLowerCase(),n]))}function ki(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function pi(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function Ti(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function vi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function xi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function jr(e,r,n){var i=kt.exec(r.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function Xr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2000),n+i[0].length):-1}function bi(e,r,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(r.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function wi(e,r,n){var i=kt.exec(r.slice(n,n+1));return i?(e.q=i[0]*3-3,n+i[0].length):-1}function Mi(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function qr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function Di(e,r,n){var i=kt.exec(r.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function Gr(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function Ci(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function Si(e,r,n){var i=kt.exec(r.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function _i(e,r,n){var i=kt.exec(r.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Yi(e,r,n){var i=kt.exec(r.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1000),n+i[0].length):-1}function Fi(e,r,n){var i=hi.exec(r.slice(n,n+1));return i?n+i[0].length:-1}function Ii(e,r,n){var i=kt.exec(r.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Ui(e,r,n){var i=kt.exec(r.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function Qr(e,r){return ot(e.getDate(),r,2)}function Li(e,r){return ot(e.getHours(),r,2)}function Wi(e,r){return ot(e.getHours()%12||12,r,2)}function Ei(e,r){return ot(1+Dt.count(xt(e),e),r,3)}function rn(e,r){return ot(e.getMilliseconds(),r,3)}function Ai(e,r){return rn(e,r)+"000"}function Oi(e,r){return ot(e.getMonth()+1,r,2)}function $i(e,r){return ot(e.getMinutes(),r,2)}function Hi(e,r){return ot(e.getSeconds(),r,2)}function Ni(e){var r=e.getDay();return r===0?7:r}function Pi(e,r){return ot(Ct.count(xt(e)-1,e),r,2)}function nn(e){var r=e.getDay();return r>=4||r===0?It(e):It.ceil(e)}function Vi(e,r){return e=nn(e),ot(It.count(xt(e),e)+(xt(e).getDay()===4),r,2)}function zi(e){return e.getDay()}function Ri(e,r){return ot(Nt.count(xt(e)-1,e),r,2)}function Bi(e,r){return ot(e.getFullYear()%100,r,2)}function ji(e,r){return e=nn(e),ot(e.getFullYear()%100,r,2)}function Xi(e,r){return ot(e.getFullYear()%1e4,r,4)}function qi(e,r){var n=e.getDay();return e=n>=4||n===0?It(e):It.ceil(e),ot(e.getFullYear()%1e4,r,4)}function Gi(e){var r=e.getTimezoneOffset();return(r>0?"-":(r*=-1,"+"))+ot(r/60|0,"0",2)+ot(r%60,"0",2)}function Jr(e,r){return ot(e.getUTCDate(),r,2)}function Qi(e,r){return ot(e.getUTCHours(),r,2)}function Ki(e,r){return ot(e.getUTCHours()%12||12,r,2)}function ta(e,r){return ot(1+ae.count(St(e),e),r,3)}function an(e,r){return ot(e.getUTCMilliseconds(),r,3)}function ea(e,r){return an(e,r)+"000"}function ra(e,r){return ot(e.getUTCMonth()+1,r,2)}function na(e,r){return ot(e.getUTCMinutes(),r,2)}function ia(e,r){return ot(e.getUTCSeconds(),r,2)}function aa(e){var r=e.getUTCDay();return r===0?7:r}function sa(e,r){return ot(Rt.count(St(e)-1,e),r,2)}function sn(e){var r=e.getUTCDay();return r>=4||r===0?Pt(e):Pt.ceil(e)}function oa(e,r){return e=sn(e),ot(Pt.count(St(e),e)+(St(e).getUTCDay()===4),r,2)}function ca(e){return e.getUTCDay()}function ua(e,r){return ot(qt.count(St(e)-1,e),r,2)}function la(e,r){return ot(e.getUTCFullYear()%100,r,2)}function fa(e,r){return e=sn(e),ot(e.getUTCFullYear()%100,r,2)}function da(e,r){return ot(e.getUTCFullYear()%1e4,r,4)}function ma(e,r){var n=e.getUTCDay();return e=n>=4||n===0?Pt(e):Pt.ceil(e),ot(e.getUTCFullYear()%1e4,r,4)}function ha(){return"+0000"}function Kr(){return"%"}function tn(e){return+e}function en(e){return Math.floor(+e/1000)}var Gt,Bt,on,cn,un;Qe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Qe(e){return Gt=Ge(e),Bt=Gt.format,on=Gt.parse,cn=Gt.utcFormat,un=Gt.utcParse,Gt}function ya(e){return new Date(e)}function ga(e){return e instanceof Date?+e:+new Date(+e)}function ln(e,r,n,i,a,s,c,x,C,E){var Y=id(),{invert:rt,domain:A}=Y,F=E(".%L"),W=E(":%S"),N=E("%I:%M"),I=E("%I %p"),J=E("%a %d"),lt=E("%b %d"),it=E("%B"),P=E("%Y");function D(u){return(C(u)<u?F:x(u)<u?W:c(u)<u?N:s(u)<u?I:i(u)<u?a(u)<u?J:lt:n(u)<u?it:P)(u)}return Y.invert=function(u){return new Date(rt(u))},Y.domain=function(u){return arguments.length?A(Array.from(u,ga)):A().map(ya)},Y.ticks=function(u){var U=A();return e(U[0],U[U.length-1],u==null?10:u)},Y.tickFormat=function(u,U){return U==null?D:E(U)},Y.nice=function(u){var U=A();if(!u||typeof u.range!=="function")u=r(U[0],U[U.length-1],u==null?10:u);return u?A(Ve(U,u)):Y},Y.copy=function(){return Ep(Y,ln(e,r,n,i,a,s,c,x,C,E))},Y}function Je(){return _o.apply(ln(Ze,je,xt,Ot,Ct,Dt,At,Et,vt,Bt).domain([new Date(2000,0,1),new Date(2000,0,2)]),arguments)}var pn=xn(ll(),1),bt=xn(qp(),1),Tn=xn(fn(),1),vn=xn(dn(),1),bn=xn(mn(),1),Jt=xn(qp(),1),Un=xn(hn(),1);var cr=function(){var e=t(function(L,f,v,p){for(v=v||{},p=L.length;p--;v[L[p]]=f);return v},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],a=[1,28],s=[1,29],c=[1,30],x=[1,31],C=[1,32],E=[1,33],Y=[1,34],rt=[1,9],A=[1,10],F=[1,11],W=[1,12],N=[1,13],I=[1,14],J=[1,15],lt=[1,16],it=[1,19],P=[1,20],D=[1,21],u=[1,22],U=[1,23],tt=[1,25],et=[1,35],T={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:t(function(f,v,p,k,Z,o,X){var h=o.length-1;switch(Z){case 1:return o[h-1];case 2:this.$=[];break;case 3:o[h-1].push(o[h]),this.$=o[h-1];break;case 4:case 5:this.$=o[h];break;case 6:case 7:this.$=[];break;case 8:k.setWeekday("monday");break;case 9:k.setWeekday("tuesday");break;case 10:k.setWeekday("wednesday");break;case 11:k.setWeekday("thursday");break;case 12:k.setWeekday("friday");break;case 13:k.setWeekday("saturday");break;case 14:k.setWeekday("sunday");break;case 15:k.setWeekend("friday");break;case 16:k.setWeekend("saturday");break;case 17:k.setDateFormat(o[h].substr(11)),this.$=o[h].substr(11);break;case 18:k.enableInclusiveEndDates(),this.$=o[h].substr(18);break;case 19:k.TopAxis(),this.$=o[h].substr(8);break;case 20:k.setAxisFormat(o[h].substr(11)),this.$=o[h].substr(11);break;case 21:k.setTickInterval(o[h].substr(13)),this.$=o[h].substr(13);break;case 22:k.setExcludes(o[h].substr(9)),this.$=o[h].substr(9);break;case 23:k.setIncludes(o[h].substr(9)),this.$=o[h].substr(9);break;case 24:k.setTodayMarker(o[h].substr(12)),this.$=o[h].substr(12);break;case 27:k.setDiagramTitle(o[h].substr(6)),this.$=o[h].substr(6);break;case 28:this.$=o[h].trim(),k.setAccTitle(this.$);break;case 29:case 30:this.$=o[h].trim(),k.setAccDescription(this.$);break;case 31:k.addSection(o[h].substr(8)),this.$=o[h].substr(8);break;case 33:k.addTask(o[h-1],o[h]),this.$="task";break;case 34:this.$=o[h-1],k.setClickEvent(o[h-1],o[h],null);break;case 35:this.$=o[h-2],k.setClickEvent(o[h-2],o[h-1],o[h]);break;case 36:this.$=o[h-2],k.setClickEvent(o[h-2],o[h-1],null),k.setLink(o[h-2],o[h]);break;case 37:this.$=o[h-3],k.setClickEvent(o[h-3],o[h-2],o[h-1]),k.setLink(o[h-3],o[h]);break;case 38:this.$=o[h-2],k.setClickEvent(o[h-2],o[h],null),k.setLink(o[h-2],o[h-1]);break;case 39:this.$=o[h-3],k.setClickEvent(o[h-3],o[h-1],o[h]),k.setLink(o[h-3],o[h-2]);break;case 40:this.$=o[h-1],k.setLink(o[h-1],o[h]);break;case 41:case 47:this.$=o[h-1]+" "+o[h];break;case 42:case 43:case 45:this.$=o[h-2]+" "+o[h-1]+" "+o[h];break;case 44:case 46:this.$=o[h-3]+" "+o[h-2]+" "+o[h-1]+" "+o[h];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:s,16:c,17:x,18:C,19:18,20:E,21:Y,22:rt,23:A,24:F,25:W,26:N,27:I,28:J,29:lt,30:it,31:P,33:D,35:u,36:U,37:24,38:tt,40:et},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:s,16:c,17:x,18:C,19:18,20:E,21:Y,22:rt,23:A,24:F,25:W,26:N,27:I,28:J,29:lt,30:it,31:P,33:D,35:u,36:U,37:24,38:tt,40:et},e(r,[2,5]),e(r,[2,6]),e(r,[2,17]),e(r,[2,18]),e(r,[2,19]),e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),e(r,[2,23]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),e(r,[2,27]),{32:[1,37]},{34:[1,38]},e(r,[2,30]),e(r,[2,31]),e(r,[2,32]),{39:[1,39]},e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{41:[1,40],43:[1,41]},e(r,[2,4]),e(r,[2,28]),e(r,[2,29]),e(r,[2,33]),e(r,[2,34],{42:[1,42],43:[1,43]}),e(r,[2,40],{41:[1,44]}),e(r,[2,35],{43:[1,45]}),e(r,[2,36]),e(r,[2,38],{42:[1,46]}),e(r,[2,37]),e(r,[2,39])],defaultActions:{},parseError:t(function(f,v){if(v.recoverable)this.trace(f);else{var p=Error(f);throw p.hash=v,p}},"parseError"),parse:t(function(f){var v=this,p=[0],k=[],Z=[null],o=[],X=this.table,h="",dt=0,d=0,B=0,Q=2,ct=1,ut=o.slice.call(arguments,1),nt=Object.create(this.lexer),g={yy:{}};for(var R in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,R))g.yy[R]=this.yy[R];if(nt.setInput(f,g.yy),g.yy.lexer=nt,g.yy.parser=this,typeof nt.yylloc>"u")nt.yylloc={};var K=nt.yylloc;o.push(K);var y=nt.options&&nt.options.ranges;if(typeof g.yy.parseError==="function")this.parseError=g.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(wt){p.length=p.length-2*wt,Z.length=Z.length-wt,o.length=o.length-wt}t(mt,"popStack");function at(){var wt=k.pop()||nt.lex()||ct;if(typeof wt!=="number"){if(wt instanceof Array)k=wt,wt=k.pop();wt=v.symbols_[wt]||wt}return wt}t(at,"lex");var st,ht,yt,pt,cs,Ye,jt={},le,Lt,br,fe;while(!0){if(yt=p[p.length-1],this.defaultActions[yt])pt=this.defaultActions[yt];else{if(st===null||typeof st>"u")st=at();pt=X[yt]&&X[yt][st]}if(typeof pt>"u"||!pt.length||!pt[0]){var Fe="";fe=[];for(le in X[yt])if(this.terminals_[le]&&le>Q)fe.push("'"+this.terminals_[le]+"'");if(nt.showPosition)Fe="Parse error on line "+(dt+1)+`:
2
2
  `+nt.showPosition()+`
3
3
  Expecting `+fe.join(", ")+", got '"+(this.terminals_[st]||st)+"'";else Fe="Parse error on line "+(dt+1)+": Unexpected "+(st==ct?"end of input":"'"+(this.terminals_[st]||st)+"'");this.parseError(Fe,{text:nt.match,token:this.terminals_[st]||st,line:nt.yylineno,loc:K,expected:fe})}if(pt[0]instanceof Array&&pt.length>1)throw Error("Parse Error: multiple actions possible at state: "+yt+", token: "+st);switch(pt[0]){case 1:if(p.push(st),Z.push(nt.yytext),o.push(nt.yylloc),p.push(pt[1]),st=null,!ht){if(d=nt.yyleng,h=nt.yytext,dt=nt.yylineno,K=nt.yylloc,B>0)B--}else st=ht,ht=null;break;case 2:if(Lt=this.productions_[pt[1]][1],jt.$=Z[Z.length-Lt],jt._$={first_line:o[o.length-(Lt||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Lt||1)].first_column,last_column:o[o.length-1].last_column},y)jt._$.range=[o[o.length-(Lt||1)].range[0],o[o.length-1].range[1]];if(Ye=this.performAction.apply(jt,[h,d,dt,g.yy,pt[1],Z,o].concat(ut)),typeof Ye<"u")return Ye;if(Lt)p=p.slice(0,-1*Lt*2),Z=Z.slice(0,-1*Lt),o=o.slice(0,-1*Lt);p.push(this.productions_[pt[1]][0]),Z.push(jt.$),o.push(jt._$),br=X[p[p.length-2]][p[p.length-1]],p.push(br);break;case 3:return!0}}return!0},"parse")},_=function(){var L={EOF:1,parseError:t(function(v,p){if(this.yy.parser)this.yy.parser.parseError(v,p);else throw Error(v)},"parseError"),setInput:t(function(f,v){if(this.yy=v||this.yy||{},this._input=f,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];return this.offset=0,this},"setInput"),input:t(function(){var f=this._input[0];this.yytext+=f,this.yyleng++,this.offset++,this.match+=f,this.matched+=f;var v=f.match(/(?:\r\n?|\n).*/g);if(v)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),f},"input"),unput:t(function(f){var v=f.length,p=f.split(/(?:\r\n?|\n)/g);this._input=f+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var k=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1)this.yylineno-=p.length-1;var Z=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===k.length?this.yylloc.first_column:0)+k[k.length-p.length].length-p[0].length:this.yylloc.first_column-v},this.options.ranges)this.yylloc.range=[Z[0],Z[0]+this.yyleng-v];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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:t(function(f){this.unput(this.match.slice(f))},"less"),pastInput:t(function(){var f=this.matched.substr(0,this.matched.length-this.match.length);return(f.length>20?"...":"")+f.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var f=this.match;if(f.length<20)f+=this._input.substr(0,20-f.length);return(f.substr(0,20)+(f.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var f=this.pastInput(),v=Array(f.length+1).join("-");return f+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{$i}from"./index-nzjc24v9.js";import{xe}from"./index-e6tjaccf.js";import{t,l,Y,C,w,M,O,G,z,j,q,H,m,pc,b,Og,ce,V}from"./index-pqmvhqmj.js";import{$e}from"./index-cwwg7k5f.js";var k={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ce=Y.gitGraph,U=t(()=>ce({...Ce,...C().gitGraph}),"getConfig"),h=new $i(()=>{let e=U(),{mainBranchName:r,mainBranchOrder:a}=e;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function ae(){return Og({length:7})}t(ae,"getID");function fe(e,r){let a=Object.create(null);return e.reduce((n,c)=>{let d=r(c);if(!a[d])a[d]=!0,n.push(c);return n},[])}t(fe,"uniqBy");var ve=t(function(e){h.records.direction=e},"setDirection"),Ee=t(function(e){l.debug("options str",e),e=e?.trim(),e=e||"{}";try{h.records.options=JSON.parse(e)}catch(r){l.error("error while parsing gitGraph options",r.message)}},"setOptions"),Te=t(function(){return h.records.options},"getOptions"),Le=t(function(e){let{msg:r,id:a,type:n,tags:c}=e;l.info("commit",r,a,n,c),l.debug("Entering commit:",r,a,n,c);let d=U();a=w.sanitizeText(a,d),r=w.sanitizeText(r,d),c=c?.map((o)=>w.sanitizeText(o,d));let s={id:a?a:h.records.seq+"-"+ae(),message:r,seq:h.records.seq++,type:n??k.NORMAL,tags:c??[],parents:h.records.head==null?[]:[h.records.head.id],branch:h.records.currBranch};if(h.records.head=s,l.info("main branch",d.mainBranchName),h.records.commits.has(s.id))l.warn(`Commit ID ${s.id} already exists`);h.records.commits.set(s.id,s),h.records.branches.set(h.records.currBranch,s.id),l.debug("in pushCommit "+s.id)},"commit"),Me=t(function(e){let{name:r,order:a}=e;if(r=w.sanitizeText(r,U()),h.records.branches.has(r))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);h.records.branches.set(r,h.records.head!=null?h.records.head.id:null),h.records.branchConfig.set(r,{name:r,order:a}),pe(r),l.debug("in createBranch")},"branch"),Pe=t((e)=>{let{branch:r,id:a,type:n,tags:c}=e,d=U();if(r=w.sanitizeText(r,d),a)a=w.sanitizeText(a,d);let s=h.records.branches.get(h.records.currBranch),o=h.records.branches.get(r),g=s?h.records.commits.get(s):void 0,p=o?h.records.commits.get(o):void 0;if(g&&p&&g.branch===r)throw Error(`Cannot merge branch '${r}' into itself.`);if(h.records.currBranch===r){let i=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(g===void 0||!g){let i=Error(`Incorrect usage of "merge". Current branch (${h.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!h.records.branches.has(r)){let i=Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if(p===void 0||!p){let i=Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(g===p){let i=Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(a&&h.records.commits.has(a)){let i=Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${a} ${n} ${c?.join(" ")}`,token:`merge ${r} ${a} ${n} ${c?.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${n} ${c?.join(" ")}`]},i}let y=o?o:"",f={id:a||`${h.records.seq}-${ae()}`,message:`merged branch ${r} into ${h.records.currBranch}`,seq:h.records.seq++,parents:h.records.head==null?[]:[h.records.head.id,y],branch:h.records.currBranch,type:k.MERGE,customType:n,customId:a?!0:!1,tags:c??[]};h.records.head=f,h.records.commits.set(f.id,f),h.records.branches.set(h.records.currBranch,f.id),l.debug(h.records.branches),l.debug("in mergeBranch")},"merge"),Re=t(function(e){let{id:r,targetId:a,tags:n,parent:c}=e;l.debug("Entering cherryPick:",r,a,n);let d=U();if(r=w.sanitizeText(r,d),a=w.sanitizeText(a,d),n=n?.map((g)=>w.sanitizeText(g,d)),c=w.sanitizeText(c,d),!r||!h.records.commits.has(r)){let g=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}let s=h.records.commits.get(r);if(s===void 0||!s)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(c&&!(Array.isArray(s.parents)&&s.parents.includes(c)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===k.MERGE&&!c)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!h.records.commits.has(a)){if(o===h.records.currBranch){let f=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let g=h.records.branches.get(h.records.currBranch);if(g===void 0||!g){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${h.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let p=h.records.commits.get(g);if(p===void 0||!p){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${h.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let y={id:h.records.seq+"-"+ae(),message:`cherry-picked ${s?.message} into ${h.records.currBranch}`,seq:h.records.seq++,parents:h.records.head==null?[]:[h.records.head.id,s.id],branch:h.records.currBranch,type:k.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===k.MERGE?`|parent:${c}`:""}`]};h.records.head=y,h.records.commits.set(y.id,y),h.records.branches.set(h.records.currBranch,y.id),l.debug(h.records.branches),l.debug("in cherryPick")}},"cherryPick"),pe=t(function(e){if(e=w.sanitizeText(e,U()),!h.records.branches.has(e)){let r=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}else{h.records.currBranch=e;let r=h.records.branches.get(h.records.currBranch);if(r===void 0||!r)h.records.head=null;else h.records.head=h.records.commits.get(r)??null}},"checkout");function ie(e,r,a){let n=e.indexOf(r);if(n===-1)e.push(a);else e.splice(n,1,a)}t(ie,"upsert");function he(e){let r=e.reduce((c,d)=>{if(c.seq>d.seq)return c;return d},e[0]),a="";e.forEach(function(c){if(c===r)a+="\t*";else a+="\t|"});let n=[a,r.id,r.seq];for(let c in h.records.branches)if(h.records.branches.get(c)===r.id)n.push(c);if(l.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){let c=h.records.commits.get(r.parents[0]);if(ie(e,r,c),r.parents[1])e.push(h.records.commits.get(r.parents[1]))}else if(r.parents.length==0)return;else if(r.parents[0]){let c=h.records.commits.get(r.parents[0]);ie(e,r,c)}e=fe(e,(c)=>c.id),he(e)}t(he,"prettyPrintCommitHistory");var Oe=t(function(){l.debug(h.records.commits);let e=ye()[0];he([e])},"prettyPrint"),Ie=t(function(){h.reset(),M()},"clear"),_e=t(function(){return[...h.records.branchConfig.values()].map((r,a)=>{if(r.order!==null&&r.order!==void 0)return r;return{...r,order:parseFloat(`0.${a}`)}}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ge=t(function(){return h.records.branches},"getBranches"),De=t(function(){return h.records.commits},"getCommits"),ye=t(function(){let e=[...h.records.commits.values()];return e.forEach(function(r){l.debug(r.id)}),e.sort((r,a)=>r.seq-a.seq),e},"getCommitsArray"),We=t(function(){return h.records.currBranch},"getCurrentBranch"),qe=t(function(){return h.records.direction},"getDirection"),Ae=t(function(){return h.records.head},"getHead"),ue={commitType:k,getConfig:U,setDirection:ve,setOptions:Ee,getOptions:Te,commit:Le,branch:Me,merge:Pe,cherryPick:Re,checkout:pe,prettyPrint:Oe,clear:Ie,getBranchesAsObjArray:_e,getBranches:Ge,getCommits:De,getCommitsArray:ye,getCurrentBranch:We,getDirection:qe,getHead:Ae,setAccTitle:O,getAccTitle:G,getAccDescription:j,setAccDescription:z,setDiagramTitle:q,getDiagramTitle:H},He=t((e,r)=>{if(xe(e,r),e.dir)r.setDirection(e.dir);for(let a of e.statements)Se(a,r)},"populate"),Se=t((e,r)=>{let n={Commit:t((c)=>r.commit(Ne(c)),"Commit"),Branch:t((c)=>r.branch(Fe(c)),"Branch"),Merge:t((c)=>r.merge(ze(c)),"Merge"),Checkout:t((c)=>r.checkout(Ye(c)),"Checkout"),CherryPicking:t((c)=>r.cherryPick(je(c)),"CherryPicking")}[e.$type];if(n)n(e);else l.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ne=t((e)=>({id:e.id,msg:e.message??"",type:e.type!==void 0?k[e.type]:k.NORMAL,tags:e.tags??void 0}),"parseCommit"),Fe=t((e)=>({name:e.name,order:e.order??0}),"parseBranch"),ze=t((e)=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?k[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ye=t((e)=>e.branch,"parseCheckout"),je=t((e)=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ke={parse:t(async(e)=>{let r=await $e("gitGraph",e);l.debug(r),He(r,ue)},"parse")},S=10,N=40,_=4,W=2,F=8,oe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),de=12,le=new Set(["redux-color","redux-dark-color"]),Ue=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),K=t((e,r,a=!1)=>{if(a&&e>0)return(e-1)%(r-1)+1;return e%r},"calcColorIndex"),P=new Map,R=new Map,te=30,J=new Map,re=[],A=0,u="LR",Ve=t(()=>{P.clear(),R.clear(),J.clear(),A=0,re=[],u="LR"},"clear"),be=t((e)=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e==="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach((n)=>{let c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),c.setAttribute("class","row"),c.textContent=n.trim(),r.appendChild(c)}),r},"drawText"),we=t((e)=>{let r,a,n;if(u==="BT")a=t((c,d)=>c<=d,"comparisonFunc"),n=1/0;else a=t((c,d)=>c>=d,"comparisonFunc"),n=0;return e.forEach((c)=>{let d=u==="TB"||u=="BT"?R.get(c)?.y:R.get(c)?.x;if(d!==void 0&&a(d,n))r=c,n=d}),r},"findClosestParent"),Ze=t((e)=>{let r="",a=1/0;return e.forEach((n)=>{let c=R.get(n).y;if(c<=a)r=n,a=c}),r||void 0},"findClosestParentBT"),Xe=t((e,r,a)=>{let n=a,c=a,d=[];e.forEach((s)=>{let o=r.get(s);if(!o)throw Error(`Commit not found for key ${s}`);if(o.parents.length)n=Qe(o),c=Math.max(n,c);else d.push(o);et(o,n)}),n=c,d.forEach((s)=>{tt(s,n,a)}),e.forEach((s)=>{let o=r.get(s);if(o?.parents.length){let g=Ze(o.parents);if(n=R.get(g).y-N,n<=c)c=n;let p=P.get(o.branch).pos,y=n-S;R.set(o.id,{x:p,y})}})},"setParallelBTPos"),Je=t((e)=>{let r=we(e.parents.filter((n)=>n!==null));if(!r)throw Error(`Closest parent not found for commit ${e.id}`);let a=R.get(r)?.y;if(a===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return a},"findClosestParentPos"),Qe=t((e)=>Je(e)+N,"calculateCommitPosition"),et=t((e,r)=>{let a=P.get(e.branch);if(!a)throw Error(`Branch not found for commit ${e.id}`);let n=a.pos,c=r+S;return R.set(e.id,{x:n,y:c}),{x:n,y:c}},"setCommitPosition"),tt=t((e,r,a)=>{let n=P.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let c=r+a,d=n.pos;R.set(e.id,{x:d,y:c})},"setRootPosition"),rt=t((e,r,a,n,c,d)=>{let{theme:s}=m(),o=oe.has(s??""),g=le.has(s??""),p=Ue.has(s??"");if(d===k.HIGHLIGHT)e.append("rect").attr("x",a.x-10+(o?3:0)).attr("y",a.y-10+(o?3:0)).attr("width",o?14:20).attr("height",o?14:20).attr("class",`commit ${r.id} commit-highlight${K(c,F,g)} ${n}-outer`),e.append("rect").attr("x",a.x-6+(o?2:0)).attr("y",a.y-6+(o?2:0)).attr("width",o?8:12).attr("height",o?8:12).attr("class",`commit ${r.id} commit${K(c,F,g)} ${n}-inner`);else if(d===k.CHERRY_PICK)e.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",o?7:10).attr("class",`commit ${r.id} ${n}`),e.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",o?2.5:2.75).attr("fill",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",o?2.5:2.75).attr("fill",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`);else{let y=e.append("circle");if(y.attr("cx",a.x),y.attr("cy",a.y),y.attr("r",o?7:10),y.attr("class",`commit ${r.id} commit${K(c,F,g)}`),d===k.MERGE){let f=e.append("circle");f.attr("cx",a.x),f.attr("cy",a.y),f.attr("r",o?5:6),f.attr("class",`commit ${n} ${r.id} commit${K(c,F,g)}`)}if(d===k.REVERSE){let f=e.append("path"),i=o?4:5;f.attr("d",`M ${a.x-i},${a.y-i}L${a.x+i},${a.y+i}M${a.x-i},${a.y+i}L${a.x+i},${a.y-i}`).attr("class",`commit ${n} ${r.id} commit${K(c,F,g)}`)}}},"drawCommitBullet"),at=t((e,r,a,n,c)=>{if(r.type!==k.CHERRY_PICK&&(r.customId&&r.type===k.MERGE||r.type!==k.MERGE)&&c.showCommitLabel){let d=e.append("g"),s=d.insert("rect").attr("class","commit-label-bkg"),o=d.append("text").attr("x",n).attr("y",a.y+25).attr("class","commit-label").text(r.id),g=o.node()?.getBBox();if(g){if(s.attr("x",a.posWithOffset-g.width/2-W).attr("y",a.y+13.5).attr("width",g.width+2*W).attr("height",g.height+2*W),u==="TB"||u==="BT")s.attr("x",a.x-(g.width+4*_+5)).attr("y",a.y-12),o.attr("x",a.x-(g.width+4*_)).attr("y",a.y+g.height-12);else o.attr("x",a.posWithOffset-g.width/2);if(c.rotateCommitLabel)if(u==="TB"||u==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),s.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{let p=-7.5-(g.width+10)/25*9.5,y=10+g.width/25*8.5;d.attr("transform","translate("+p+", "+y+") rotate(-45, "+n+", "+a.y+")")}}}},"drawCommitLabel"),ot=t((e,r,a,n)=>{if(r.tags.length>0){let c=0,d=0,s=0,o=[];for(let g of r.tags.reverse()){let p=e.insert("polygon"),y=e.append("circle"),f=e.append("text").attr("y",a.y-16-c).attr("class","tag-label").text(g),i=f.node()?.getBBox();if(!i)throw Error("Tag bbox not found");d=Math.max(d,i.width),s=Math.max(s,i.height),f.attr("x",a.posWithOffset-i.width/2),o.push({tag:f,hole:y,rect:p,yOffset:c}),c+=20}for(let{tag:g,hole:p,rect:y,yOffset:f}of o){let i=s/2,B=a.y-19.2-f;if(y.attr("class","tag-label-bkg").attr("points",`
1
+ import{$i}from"./index-s4v3vcsn.js";import{xe}from"./index-cbbwq25c.js";import{t,l,Y,C,w,M,O,G,z,j,q,H,m,pc,b,Og,ce,V}from"./index-4fpyzg5e.js";import{$e}from"./index-cwwg7k5f.js";var k={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ce=Y.gitGraph,U=t(()=>ce({...Ce,...C().gitGraph}),"getConfig"),h=new $i(()=>{let e=U(),{mainBranchName:r,mainBranchOrder:a}=e;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function ae(){return Og({length:7})}t(ae,"getID");function fe(e,r){let a=Object.create(null);return e.reduce((n,c)=>{let d=r(c);if(!a[d])a[d]=!0,n.push(c);return n},[])}t(fe,"uniqBy");var ve=t(function(e){h.records.direction=e},"setDirection"),Ee=t(function(e){l.debug("options str",e),e=e?.trim(),e=e||"{}";try{h.records.options=JSON.parse(e)}catch(r){l.error("error while parsing gitGraph options",r.message)}},"setOptions"),Te=t(function(){return h.records.options},"getOptions"),Le=t(function(e){let{msg:r,id:a,type:n,tags:c}=e;l.info("commit",r,a,n,c),l.debug("Entering commit:",r,a,n,c);let d=U();a=w.sanitizeText(a,d),r=w.sanitizeText(r,d),c=c?.map((o)=>w.sanitizeText(o,d));let s={id:a?a:h.records.seq+"-"+ae(),message:r,seq:h.records.seq++,type:n??k.NORMAL,tags:c??[],parents:h.records.head==null?[]:[h.records.head.id],branch:h.records.currBranch};if(h.records.head=s,l.info("main branch",d.mainBranchName),h.records.commits.has(s.id))l.warn(`Commit ID ${s.id} already exists`);h.records.commits.set(s.id,s),h.records.branches.set(h.records.currBranch,s.id),l.debug("in pushCommit "+s.id)},"commit"),Me=t(function(e){let{name:r,order:a}=e;if(r=w.sanitizeText(r,U()),h.records.branches.has(r))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);h.records.branches.set(r,h.records.head!=null?h.records.head.id:null),h.records.branchConfig.set(r,{name:r,order:a}),pe(r),l.debug("in createBranch")},"branch"),Pe=t((e)=>{let{branch:r,id:a,type:n,tags:c}=e,d=U();if(r=w.sanitizeText(r,d),a)a=w.sanitizeText(a,d);let s=h.records.branches.get(h.records.currBranch),o=h.records.branches.get(r),g=s?h.records.commits.get(s):void 0,p=o?h.records.commits.get(o):void 0;if(g&&p&&g.branch===r)throw Error(`Cannot merge branch '${r}' into itself.`);if(h.records.currBranch===r){let i=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(g===void 0||!g){let i=Error(`Incorrect usage of "merge". Current branch (${h.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!h.records.branches.has(r)){let i=Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if(p===void 0||!p){let i=Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(g===p){let i=Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(a&&h.records.commits.has(a)){let i=Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${a} ${n} ${c?.join(" ")}`,token:`merge ${r} ${a} ${n} ${c?.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${n} ${c?.join(" ")}`]},i}let y=o?o:"",f={id:a||`${h.records.seq}-${ae()}`,message:`merged branch ${r} into ${h.records.currBranch}`,seq:h.records.seq++,parents:h.records.head==null?[]:[h.records.head.id,y],branch:h.records.currBranch,type:k.MERGE,customType:n,customId:a?!0:!1,tags:c??[]};h.records.head=f,h.records.commits.set(f.id,f),h.records.branches.set(h.records.currBranch,f.id),l.debug(h.records.branches),l.debug("in mergeBranch")},"merge"),Re=t(function(e){let{id:r,targetId:a,tags:n,parent:c}=e;l.debug("Entering cherryPick:",r,a,n);let d=U();if(r=w.sanitizeText(r,d),a=w.sanitizeText(a,d),n=n?.map((g)=>w.sanitizeText(g,d)),c=w.sanitizeText(c,d),!r||!h.records.commits.has(r)){let g=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}let s=h.records.commits.get(r);if(s===void 0||!s)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(c&&!(Array.isArray(s.parents)&&s.parents.includes(c)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let o=s.branch;if(s.type===k.MERGE&&!c)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!h.records.commits.has(a)){if(o===h.records.currBranch){let f=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let g=h.records.branches.get(h.records.currBranch);if(g===void 0||!g){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${h.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let p=h.records.commits.get(g);if(p===void 0||!p){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${h.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},f}let y={id:h.records.seq+"-"+ae(),message:`cherry-picked ${s?.message} into ${h.records.currBranch}`,seq:h.records.seq++,parents:h.records.head==null?[]:[h.records.head.id,s.id],branch:h.records.currBranch,type:k.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===k.MERGE?`|parent:${c}`:""}`]};h.records.head=y,h.records.commits.set(y.id,y),h.records.branches.set(h.records.currBranch,y.id),l.debug(h.records.branches),l.debug("in cherryPick")}},"cherryPick"),pe=t(function(e){if(e=w.sanitizeText(e,U()),!h.records.branches.has(e)){let r=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}else{h.records.currBranch=e;let r=h.records.branches.get(h.records.currBranch);if(r===void 0||!r)h.records.head=null;else h.records.head=h.records.commits.get(r)??null}},"checkout");function ie(e,r,a){let n=e.indexOf(r);if(n===-1)e.push(a);else e.splice(n,1,a)}t(ie,"upsert");function he(e){let r=e.reduce((c,d)=>{if(c.seq>d.seq)return c;return d},e[0]),a="";e.forEach(function(c){if(c===r)a+="\t*";else a+="\t|"});let n=[a,r.id,r.seq];for(let c in h.records.branches)if(h.records.branches.get(c)===r.id)n.push(c);if(l.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){let c=h.records.commits.get(r.parents[0]);if(ie(e,r,c),r.parents[1])e.push(h.records.commits.get(r.parents[1]))}else if(r.parents.length==0)return;else if(r.parents[0]){let c=h.records.commits.get(r.parents[0]);ie(e,r,c)}e=fe(e,(c)=>c.id),he(e)}t(he,"prettyPrintCommitHistory");var Oe=t(function(){l.debug(h.records.commits);let e=ye()[0];he([e])},"prettyPrint"),Ie=t(function(){h.reset(),M()},"clear"),_e=t(function(){return[...h.records.branchConfig.values()].map((r,a)=>{if(r.order!==null&&r.order!==void 0)return r;return{...r,order:parseFloat(`0.${a}`)}}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ge=t(function(){return h.records.branches},"getBranches"),De=t(function(){return h.records.commits},"getCommits"),ye=t(function(){let e=[...h.records.commits.values()];return e.forEach(function(r){l.debug(r.id)}),e.sort((r,a)=>r.seq-a.seq),e},"getCommitsArray"),We=t(function(){return h.records.currBranch},"getCurrentBranch"),qe=t(function(){return h.records.direction},"getDirection"),Ae=t(function(){return h.records.head},"getHead"),ue={commitType:k,getConfig:U,setDirection:ve,setOptions:Ee,getOptions:Te,commit:Le,branch:Me,merge:Pe,cherryPick:Re,checkout:pe,prettyPrint:Oe,clear:Ie,getBranchesAsObjArray:_e,getBranches:Ge,getCommits:De,getCommitsArray:ye,getCurrentBranch:We,getDirection:qe,getHead:Ae,setAccTitle:O,getAccTitle:G,getAccDescription:j,setAccDescription:z,setDiagramTitle:q,getDiagramTitle:H},He=t((e,r)=>{if(xe(e,r),e.dir)r.setDirection(e.dir);for(let a of e.statements)Se(a,r)},"populate"),Se=t((e,r)=>{let n={Commit:t((c)=>r.commit(Ne(c)),"Commit"),Branch:t((c)=>r.branch(Fe(c)),"Branch"),Merge:t((c)=>r.merge(ze(c)),"Merge"),Checkout:t((c)=>r.checkout(Ye(c)),"Checkout"),CherryPicking:t((c)=>r.cherryPick(je(c)),"CherryPicking")}[e.$type];if(n)n(e);else l.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ne=t((e)=>({id:e.id,msg:e.message??"",type:e.type!==void 0?k[e.type]:k.NORMAL,tags:e.tags??void 0}),"parseCommit"),Fe=t((e)=>({name:e.name,order:e.order??0}),"parseBranch"),ze=t((e)=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?k[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ye=t((e)=>e.branch,"parseCheckout"),je=t((e)=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ke={parse:t(async(e)=>{let r=await $e("gitGraph",e);l.debug(r),He(r,ue)},"parse")},S=10,N=40,_=4,W=2,F=8,oe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),de=12,le=new Set(["redux-color","redux-dark-color"]),Ue=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),K=t((e,r,a=!1)=>{if(a&&e>0)return(e-1)%(r-1)+1;return e%r},"calcColorIndex"),P=new Map,R=new Map,te=30,J=new Map,re=[],A=0,u="LR",Ve=t(()=>{P.clear(),R.clear(),J.clear(),A=0,re=[],u="LR"},"clear"),be=t((e)=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e==="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach((n)=>{let c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),c.setAttribute("class","row"),c.textContent=n.trim(),r.appendChild(c)}),r},"drawText"),we=t((e)=>{let r,a,n;if(u==="BT")a=t((c,d)=>c<=d,"comparisonFunc"),n=1/0;else a=t((c,d)=>c>=d,"comparisonFunc"),n=0;return e.forEach((c)=>{let d=u==="TB"||u=="BT"?R.get(c)?.y:R.get(c)?.x;if(d!==void 0&&a(d,n))r=c,n=d}),r},"findClosestParent"),Ze=t((e)=>{let r="",a=1/0;return e.forEach((n)=>{let c=R.get(n).y;if(c<=a)r=n,a=c}),r||void 0},"findClosestParentBT"),Xe=t((e,r,a)=>{let n=a,c=a,d=[];e.forEach((s)=>{let o=r.get(s);if(!o)throw Error(`Commit not found for key ${s}`);if(o.parents.length)n=Qe(o),c=Math.max(n,c);else d.push(o);et(o,n)}),n=c,d.forEach((s)=>{tt(s,n,a)}),e.forEach((s)=>{let o=r.get(s);if(o?.parents.length){let g=Ze(o.parents);if(n=R.get(g).y-N,n<=c)c=n;let p=P.get(o.branch).pos,y=n-S;R.set(o.id,{x:p,y})}})},"setParallelBTPos"),Je=t((e)=>{let r=we(e.parents.filter((n)=>n!==null));if(!r)throw Error(`Closest parent not found for commit ${e.id}`);let a=R.get(r)?.y;if(a===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return a},"findClosestParentPos"),Qe=t((e)=>Je(e)+N,"calculateCommitPosition"),et=t((e,r)=>{let a=P.get(e.branch);if(!a)throw Error(`Branch not found for commit ${e.id}`);let n=a.pos,c=r+S;return R.set(e.id,{x:n,y:c}),{x:n,y:c}},"setCommitPosition"),tt=t((e,r,a)=>{let n=P.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let c=r+a,d=n.pos;R.set(e.id,{x:d,y:c})},"setRootPosition"),rt=t((e,r,a,n,c,d)=>{let{theme:s}=m(),o=oe.has(s??""),g=le.has(s??""),p=Ue.has(s??"");if(d===k.HIGHLIGHT)e.append("rect").attr("x",a.x-10+(o?3:0)).attr("y",a.y-10+(o?3:0)).attr("width",o?14:20).attr("height",o?14:20).attr("class",`commit ${r.id} commit-highlight${K(c,F,g)} ${n}-outer`),e.append("rect").attr("x",a.x-6+(o?2:0)).attr("y",a.y-6+(o?2:0)).attr("width",o?8:12).attr("height",o?8:12).attr("class",`commit ${r.id} commit${K(c,F,g)} ${n}-inner`);else if(d===k.CHERRY_PICK)e.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",o?7:10).attr("class",`commit ${r.id} ${n}`),e.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",o?2.5:2.75).attr("fill",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",o?2.5:2.75).attr("fill",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`),e.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke",p?"#000000":"#fff").attr("class",`commit ${r.id} ${n}`);else{let y=e.append("circle");if(y.attr("cx",a.x),y.attr("cy",a.y),y.attr("r",o?7:10),y.attr("class",`commit ${r.id} commit${K(c,F,g)}`),d===k.MERGE){let f=e.append("circle");f.attr("cx",a.x),f.attr("cy",a.y),f.attr("r",o?5:6),f.attr("class",`commit ${n} ${r.id} commit${K(c,F,g)}`)}if(d===k.REVERSE){let f=e.append("path"),i=o?4:5;f.attr("d",`M ${a.x-i},${a.y-i}L${a.x+i},${a.y+i}M${a.x-i},${a.y+i}L${a.x+i},${a.y-i}`).attr("class",`commit ${n} ${r.id} commit${K(c,F,g)}`)}}},"drawCommitBullet"),at=t((e,r,a,n,c)=>{if(r.type!==k.CHERRY_PICK&&(r.customId&&r.type===k.MERGE||r.type!==k.MERGE)&&c.showCommitLabel){let d=e.append("g"),s=d.insert("rect").attr("class","commit-label-bkg"),o=d.append("text").attr("x",n).attr("y",a.y+25).attr("class","commit-label").text(r.id),g=o.node()?.getBBox();if(g){if(s.attr("x",a.posWithOffset-g.width/2-W).attr("y",a.y+13.5).attr("width",g.width+2*W).attr("height",g.height+2*W),u==="TB"||u==="BT")s.attr("x",a.x-(g.width+4*_+5)).attr("y",a.y-12),o.attr("x",a.x-(g.width+4*_)).attr("y",a.y+g.height-12);else o.attr("x",a.posWithOffset-g.width/2);if(c.rotateCommitLabel)if(u==="TB"||u==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),s.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{let p=-7.5-(g.width+10)/25*9.5,y=10+g.width/25*8.5;d.attr("transform","translate("+p+", "+y+") rotate(-45, "+n+", "+a.y+")")}}}},"drawCommitLabel"),ot=t((e,r,a,n)=>{if(r.tags.length>0){let c=0,d=0,s=0,o=[];for(let g of r.tags.reverse()){let p=e.insert("polygon"),y=e.append("circle"),f=e.append("text").attr("y",a.y-16-c).attr("class","tag-label").text(g),i=f.node()?.getBBox();if(!i)throw Error("Tag bbox not found");d=Math.max(d,i.width),s=Math.max(s,i.height),f.attr("x",a.posWithOffset-i.width/2),o.push({tag:f,hole:y,rect:p,yOffset:c}),c+=20}for(let{tag:g,hole:p,rect:y,yOffset:f}of o){let i=s/2,B=a.y-19.2-f;if(y.attr("class","tag-label-bkg").attr("points",`
2
2
  ${n-d/2-_/2},${B+W}
3
3
  ${n-d/2-_/2},${B-W}
4
4
  ${a.posWithOffset-d/2-_},${B-i-W}
@@ -1 +1 @@
1
- import{d,n,o,u,le,e,B,p,dn,Pe,U,bh,Te,yl,xt,so,nt,J}from"./index-7ckzdf4r.js";function F(a){if(!Number.isFinite(a)||a<=0)return"";return new Date(a).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}function P({files:a,selected:h,onSelect:b}){let[i,l]=n(""),r=u(()=>{let t=i.trim().toLowerCase();if(!t)return a;return a.filter((c)=>c.title.toLowerCase().includes(t))},[a,i]);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-canvas/40",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2 py-1.5",children:[e(U,{size:12,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"search",value:i,onChange:(t)=>l(t.target.value),placeholder:"Filter plans…","aria-label":"Filter plans",className:"min-w-0 flex-1 bg-transparent text-[11px] text-ink outline-none placeholder:text-ink/35"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:r.length===0?e("p",{className:"px-3 py-2 text-[11px] text-ink/40 italic",children:a.length===0?"No plan yet":"No plan matches the filter"}):e("ul",{className:"py-1",children:r.map((t)=>{let c=t.path===h,m=F(t.modifiedAt);return e("li",{children:e("button",{type:"button",onClick:()=>b(t.path),"aria-current":c?"true":void 0,title:`${t.path}${m?` · ${m}`:""}`,className:`flex w-full items-start gap-1.5 px-2.5 py-1.5 text-left transition-colors ${c?"bg-ink/10 font-semibold text-ink":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[e(Pe,{size:12,className:`mt-0.5 flex-shrink-0 ${c?"text-ink":"text-ink/40"}`}),e("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block truncate text-[11.5px]",children:t.title}),m&&e("span",{className:"block truncate font-mono text-[10px] text-ink/40",children:m})]})]})},t.path)})})})]})}function y({file:a,content:h,isLoading:b,error:i,truncated:l,onBack:r}){return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-paper",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2.5 py-1.5",children:[e("button",{type:"button",onClick:r,title:"Back to the plan list","aria-label":"Back to the plan list",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink @[520px]:hidden",children:e(dn,{size:13})}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] text-ink/50",title:a?.path??"",children:a?.path??"Plan"}),b&&e(p,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:i?e("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-xs text-error",children:i})]}):!h?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:b?"Reading the plan…":"This plan is empty."}):e("article",{className:"mx-auto max-w-4xl px-5 py-4",children:[e(J,{content:h,className:"max-w-none"}),l&&e("p",{className:"mt-4 border-t border-ink/10 pt-2 text-[11px] text-ink/50",children:"This plan is longer than the reader's budget and was cut off."})]})})]})}function X({className:a="",active:h=!0,tabsMode:b=!1}){let[i]=le(),l=i.get("sessionId"),[r,t]=yl("plan.selectedFile",null),[c,m]=n(!1),k=r&&r.sessionId===l?r.path:null,s=Te(l?bh(l):null,{enabled:h}),x=s.data?.files??[],v=s.data?.current??null,f=u(()=>{if(k&&x.some((g)=>g.path===k))return k;return v},[k,x,v]),w=u(()=>x.find((g)=>g.path===f)??null,[x,f]);o(()=>{if(!l||!f||f===k)return;t({sessionId:l,path:f})},[l,f,k,t]),o(()=>{m(!1)},[l]);let S=(g)=>{if(l)t({sessionId:l,path:g});m(!0)};if(!l)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${a}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});let N=x.length>0;return e("div",{className:`@container flex h-full min-h-0 w-full flex-col bg-paper text-xs text-ink ${a}`,children:[e(xt,{left:e(d,{children:[e(Pe,{size:12,className:"flex-shrink-0 text-ink/50"}),e(so,{id:"plan",tabsMode:b,children:e("span",{className:"truncate text-[11px] font-medium text-ink/70",children:"Plan mode"})}),N&&e("span",{className:"flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 font-mono text-[10px] text-ink/60",children:x.length})]}),right:e(nt,{label:"Re-read the plan",onClick:s.refresh,busy:s.isLoading||s.refreshing,disabled:s.isLoading})}),s.stale&&!s.data?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-error",children:"The plan could not be read."}),e("button",{type:"button",onClick:s.refresh,className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!s.data?e("div",{className:"flex flex-1 items-center justify-center gap-2 text-ink/40",children:[e(p,{size:14,className:"animate-spin"}),e("span",{children:"Reading the plan…"})]}):!N?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(Pe,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:"No plan yet. Turn on Plan mode in the composer, and the plan this session writes will appear here."})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`min-h-0 w-full @[520px]:w-52 @[520px]:flex-shrink-0 border-b border-ink/10 @[520px]:border-b-0 @[520px]:border-l ${c?"hidden @[520px]:flex":"flex"} flex-col`,children:e(P,{files:x,selected:f,onSelect:S})}),e("div",{className:`min-w-0 min-h-0 flex-1 ${c?"flex":"hidden @[520px]:flex"} flex-col`,children:e(y,{file:w,content:s.data.content,isLoading:s.isLoading,error:s.stale?"The plan could not be read.":null,truncated:s.data.truncated,onBack:()=>m(!1)})})]})]})}export{X as PlanPanel};
1
+ import{d,n,o,u,le,e,B,p,pn,Pe,U,bh,Te,yl,xt,so,nt,J}from"./index-qrwjxqdh.js";function F(a){if(!Number.isFinite(a)||a<=0)return"";return new Date(a).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}function P({files:a,selected:h,onSelect:b}){let[i,l]=n(""),r=u(()=>{let t=i.trim().toLowerCase();if(!t)return a;return a.filter((c)=>c.title.toLowerCase().includes(t))},[a,i]);return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-canvas/40",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2 py-1.5",children:[e(U,{size:12,className:"flex-shrink-0 text-ink/40"}),e("input",{type:"search",value:i,onChange:(t)=>l(t.target.value),placeholder:"Filter plans…","aria-label":"Filter plans",className:"min-w-0 flex-1 bg-transparent text-[11px] text-ink outline-none placeholder:text-ink/35"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:r.length===0?e("p",{className:"px-3 py-2 text-[11px] text-ink/40 italic",children:a.length===0?"No plan yet":"No plan matches the filter"}):e("ul",{className:"py-1",children:r.map((t)=>{let c=t.path===h,m=F(t.modifiedAt);return e("li",{children:e("button",{type:"button",onClick:()=>b(t.path),"aria-current":c?"true":void 0,title:`${t.path}${m?` · ${m}`:""}`,className:`flex w-full items-start gap-1.5 px-2.5 py-1.5 text-left transition-colors ${c?"bg-ink/10 font-semibold text-ink":"text-ink/80 hover:bg-ink/5 hover:text-ink"}`,children:[e(Pe,{size:12,className:`mt-0.5 flex-shrink-0 ${c?"text-ink":"text-ink/40"}`}),e("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block truncate text-[11.5px]",children:t.title}),m&&e("span",{className:"block truncate font-mono text-[10px] text-ink/40",children:m})]})]})},t.path)})})})]})}function y({file:a,content:h,isLoading:b,error:i,truncated:l,onBack:r}){return e("div",{className:"flex h-full min-h-0 w-full flex-col bg-paper",children:[e("div",{className:"flex flex-shrink-0 items-center gap-1.5 border-b border-ink/10 px-2.5 py-1.5",children:[e("button",{type:"button",onClick:r,title:"Back to the plan list","aria-label":"Back to the plan list",className:"flex-shrink-0 rounded p-1 text-ink/60 hover:bg-ink/5 hover:text-ink @[520px]:hidden",children:e(pn,{size:13})}),e("span",{className:"min-w-0 flex-1 truncate text-[11px] text-ink/50",title:a?.path??"",children:a?.path??"Plan"}),b&&e(p,{size:12,className:"flex-shrink-0 animate-spin text-ink/40"})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto scrollbar-overlay-container",children:i?e("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-xs text-error",children:i})]}):!h?e("div",{className:"px-6 py-8 text-center text-xs text-ink/40",children:b?"Reading the plan…":"This plan is empty."}):e("article",{className:"mx-auto max-w-4xl px-5 py-4",children:[e(J,{content:h,className:"max-w-none"}),l&&e("p",{className:"mt-4 border-t border-ink/10 pt-2 text-[11px] text-ink/50",children:"This plan is longer than the reader's budget and was cut off."})]})})]})}function X({className:a="",active:h=!0,tabsMode:b=!1}){let[i]=le(),l=i.get("sessionId"),[r,t]=yl("plan.selectedFile",null),[c,m]=n(!1),k=r&&r.sessionId===l?r.path:null,s=Te(l?bh(l):null,{enabled:h}),x=s.data?.files??[],v=s.data?.current??null,f=u(()=>{if(k&&x.some((g)=>g.path===k))return k;return v},[k,x,v]),w=u(()=>x.find((g)=>g.path===f)??null,[x,f]);o(()=>{if(!l||!f||f===k)return;t({sessionId:l,path:f})},[l,f,k,t]),o(()=>{m(!1)},[l]);let S=(g)=>{if(l)t({sessionId:l,path:g});m(!0)};if(!l)return e("div",{className:`flex h-full flex-col items-center justify-center bg-paper text-ink/40 ${a}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});let N=x.length>0;return e("div",{className:`@container flex h-full min-h-0 w-full flex-col bg-paper text-xs text-ink ${a}`,children:[e(xt,{left:e(d,{children:[e(Pe,{size:12,className:"flex-shrink-0 text-ink/50"}),e(so,{id:"plan",tabsMode:b,children:e("span",{className:"truncate text-[11px] font-medium text-ink/70",children:"Plan mode"})}),N&&e("span",{className:"flex-shrink-0 rounded border border-ink/15 bg-ink/5 px-1.5 py-0.5 font-mono text-[10px] text-ink/60",children:x.length})]}),right:e(nt,{label:"Re-read the plan",onClick:s.refresh,busy:s.isLoading||s.refreshing,disabled:s.isLoading})}),s.stale&&!s.data?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(B,{size:16,className:"text-error"}),e("p",{className:"text-error",children:"The plan could not be read."}),e("button",{type:"button",onClick:s.refresh,className:"text-[11px] font-semibold text-ink/70 underline underline-offset-2 hover:text-ink",children:"Try again"})]}):!s.data?e("div",{className:"flex flex-1 items-center justify-center gap-2 text-ink/40",children:[e(p,{size:14,className:"animate-spin"}),e("span",{children:"Reading the plan…"})]}):!N?e("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[e(Pe,{size:18,className:"text-ink/30"}),e("p",{className:"max-w-sm text-[11px] leading-relaxed text-ink/60",children:"No plan yet. Turn on Plan mode in the composer, and the plan this session writes will appear here."})]}):e("div",{className:"flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse",children:[e("div",{className:`min-h-0 w-full @[520px]:w-52 @[520px]:flex-shrink-0 border-b border-ink/10 @[520px]:border-b-0 @[520px]:border-l ${c?"hidden @[520px]:flex":"flex"} flex-col`,children:e(P,{files:x,selected:f,onSelect:S})}),e("div",{className:`min-w-0 min-h-0 flex-1 ${c?"flex":"hidden @[520px]:flex"} flex-col`,children:e(y,{file:w,content:s.data.content,isLoading:s.isLoading,error:s.stale?"The plan could not be read.":null,truncated:s.data.truncated,onBack:()=>m(!1)})})]})]})}export{X as PlanPanel};