@data_wise/hyper-markdown 1.1.2 → 1.1.4

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 (118) hide show
  1. package/LICENSE +200 -200
  2. package/README.md +470 -430
  3. package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  4. package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  5. package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  6. package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  7. package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  8. package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  9. package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  10. package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  11. package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  12. package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  13. package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  14. package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  15. package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  16. package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  17. package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  18. package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  19. package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  20. package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  21. package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  22. package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  23. package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  24. package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  25. package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  26. package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  27. package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  28. package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  29. package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  30. package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  31. package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  32. package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  33. package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  34. package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  35. package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  36. package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  37. package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  38. package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  39. package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  40. package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  41. package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  42. package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  43. package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  44. package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  45. package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  46. package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  47. package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  48. package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  49. package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  50. package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  51. package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  52. package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  53. package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  54. package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  55. package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  56. package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  57. package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  58. package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  59. package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  60. package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  61. package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  62. package/dist/assets/_basePickBy-D3MzUSH4.js +1 -0
  63. package/dist/assets/_baseUniq-DaFrQBY_.js +1 -0
  64. package/dist/assets/arc-DZmvjhwD.js +1 -0
  65. package/dist/assets/architectureDiagram-VXUJARFQ-C6IrPHE0.js +36 -0
  66. package/dist/assets/blockDiagram-VD42YOAC-Dh4VPsYt.js +122 -0
  67. package/dist/assets/c4Diagram-YG6GDRKO-CsVkrtu5.js +10 -0
  68. package/dist/assets/channel-Dba-AU8Z.js +1 -0
  69. package/dist/assets/chunk-4BX2VUAB-BHUJEoYX.js +1 -0
  70. package/dist/assets/chunk-55IACEB6-0cRbblJn.js +1 -0
  71. package/dist/assets/chunk-B4BG7PRW-DaMVtIoV.js +165 -0
  72. package/dist/assets/chunk-DI55MBZ5-mTvCW4f_.js +220 -0
  73. package/dist/assets/chunk-FMBD7UC4-DDWqZdY-.js +15 -0
  74. package/dist/assets/chunk-QN33PNHL-BUzK_5SS.js +1 -0
  75. package/dist/assets/chunk-QZHKN3VN-ilsrzkGG.js +1 -0
  76. package/dist/assets/chunk-TZMSLE5B-BkE1m5Ht.js +1 -0
  77. package/dist/assets/classDiagram-2ON5EDUG-BCFko5gn.js +1 -0
  78. package/dist/assets/classDiagram-v2-WZHVMYZB-BCFko5gn.js +1 -0
  79. package/dist/assets/clone-DwRx6AOW.js +1 -0
  80. package/dist/assets/cose-bilkent-S5V4N54A-BkgC7-2O.js +1 -0
  81. package/dist/assets/cytoscape.esm-CyJtwmzi.js +331 -0
  82. package/dist/assets/dagre-6UL2VRFP-CcG9QvkW.js +4 -0
  83. package/dist/assets/defaultLocale-C4B-KCzX.js +1 -0
  84. package/dist/assets/diagram-PSM6KHXK-BrWBNark.js +24 -0
  85. package/dist/assets/diagram-QEK2KX5R-DHn_QcDh.js +43 -0
  86. package/dist/assets/diagram-S2PKOQOG-CQZKWumy.js +24 -0
  87. package/dist/assets/erDiagram-Q2GNP2WA-BSUc4KcH.js +60 -0
  88. package/dist/assets/flowDiagram-NV44I4VS-D2JvozV8.js +162 -0
  89. package/dist/assets/ganttDiagram-LVOFAZNH-BZQALV8B.js +267 -0
  90. package/dist/assets/gitGraphDiagram-NY62KEGX-DgdbjtZn.js +65 -0
  91. package/dist/assets/graph-CcA7jmLa.js +1 -0
  92. package/dist/assets/index-CaWmtxvi.js +1194 -0
  93. package/dist/assets/index-DmD6PshK.css +10 -0
  94. package/dist/assets/infoDiagram-ER5ION4S-Bz9C0rlJ.js +2 -0
  95. package/dist/assets/init-Gi6I4Gst.js +1 -0
  96. package/dist/assets/journeyDiagram-XKPGCS4Q-iKQl2SjC.js +139 -0
  97. package/dist/assets/kanban-definition-3W4ZIXB7-D6_6neXl.js +89 -0
  98. package/dist/assets/katex-BbEIqZs1.js +261 -0
  99. package/dist/assets/layout-Dehtu5JX.js +1 -0
  100. package/dist/assets/linear-h3Olymuj.js +1 -0
  101. package/dist/assets/mindmap-definition-VGOIOE7T-CNMfMBnD.js +68 -0
  102. package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  103. package/dist/assets/pieDiagram-ADFJNKIX-BaHWC6dm.js +30 -0
  104. package/dist/assets/quadrantDiagram-AYHSOK5B-D7AbIWZg.js +7 -0
  105. package/dist/assets/requirementDiagram-UZGBJVZJ-BR0Id14z.js +64 -0
  106. package/dist/assets/sankeyDiagram-TZEHDZUN-U2E-Gi_r.js +10 -0
  107. package/dist/assets/sequenceDiagram-WL72ISMW-DPNh0ukq.js +145 -0
  108. package/dist/assets/stateDiagram-FKZM4ZOC-D_guA4Z-.js +1 -0
  109. package/dist/assets/stateDiagram-v2-4FDKWEC3-CvOsLlmK.js +1 -0
  110. package/dist/assets/timeline-definition-IT6M3QCI-CeZcUoTH.js +61 -0
  111. package/dist/assets/treemap-KMMF4GRG-ddD_Fzr5.js +128 -0
  112. package/dist/assets/xychartDiagram-PRI3JC2R-BIOWNGYZ.js +7 -0
  113. package/dist/index.html +13 -0
  114. package/package.json +70 -70
  115. package/types/index.d.ts +34 -33
  116. package/dist/hyper-markdown.css +0 -10
  117. package/dist/hyper-markdown.es.js +0 -216827
  118. package/dist/hyper-markdown.umd.js +0 -3196
@@ -0,0 +1,267 @@
1
+ import{b1 as $e,b2 as Un,b3 as Je,b4 as Ke,b5 as tn,b6 as re,b7 as En,aI as Te,aJ as be,_ as h,g as Ln,s as An,q as In,p as Wn,a as On,b as Hn,c as _t,d as Zt,e as Nn,b8 as it,l as Qt,k as Vn,j as zn,y as Pn,u as Rn}from"./index-CaWmtxvi.js";import{b as Bn,t as Ie,c as Zn,a as qn,l as Xn}from"./linear-h3Olymuj.js";import{i as Gn}from"./init-Gi6I4Gst.js";import"./defaultLocale-C4B-KCzX.js";function jn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Qn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function $n(t){return t}var Xt=1,ie=2,me=3,qt=4,We=1e-6;function Jn(t){return"translate("+t+",0)"}function Kn(t){return"translate(0,"+t+")"}function tr(t){return e=>+t(e)}function er(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function nr(){return!this.__axis}function en(t,e){var n=[],r=null,i=null,a=6,s=6,y=3,_=typeof window<"u"&&window.devicePixelRatio>1?0:.5,p=t===Xt||t===qt?-1:1,g=t===qt||t===ie?"x":"y",E=t===Xt||t===me?Jn:Kn;function C(b){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),O=i??(e.tickFormat?e.tickFormat.apply(e,n):$n),M=Math.max(a,0)+y,I=e.range(),V=+I[0]+_,W=+I[I.length-1]+_,Z=(e.bandwidth?er:tr)(e.copy(),_),Q=b.selection?b.selection():b,D=Q.selectAll(".domain").data([null]),H=Q.selectAll(".tick").data(X,e).order(),x=H.exit(),Y=H.enter().append("g").attr("class","tick"),F=H.select("line"),S=H.select("text");D=D.merge(D.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),H=H.merge(Y),F=F.merge(Y.append("line").attr("stroke","currentColor").attr(g+"2",p*a)),S=S.merge(Y.append("text").attr("fill","currentColor").attr(g,p*M).attr("dy",t===Xt?"0em":t===me?"0.71em":"0.32em")),b!==Q&&(D=D.transition(b),H=H.transition(b),F=F.transition(b),S=S.transition(b),x=x.transition(b).attr("opacity",We).attr("transform",function(v){return isFinite(v=Z(v))?E(v+_):this.getAttribute("transform")}),Y.attr("opacity",We).attr("transform",function(v){var U=this.parentNode.__axis;return E((U&&isFinite(U=U(v))?U:Z(v))+_)})),x.remove(),D.attr("d",t===qt||t===ie?s?"M"+p*s+","+V+"H"+_+"V"+W+"H"+p*s:"M"+_+","+V+"V"+W:s?"M"+V+","+p*s+"V"+_+"H"+W+"V"+p*s:"M"+V+","+_+"H"+W),H.attr("opacity",1).attr("transform",function(v){return E(Z(v)+_)}),F.attr(g+"2",p*a),S.attr(g,p*M).text(O),Q.filter(nr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ie?"start":t===qt?"end":"middle"),Q.each(function(){this.__axis=Z})}return C.scale=function(b){return arguments.length?(e=b,C):e},C.ticks=function(){return n=Array.from(arguments),C},C.tickArguments=function(b){return arguments.length?(n=b==null?[]:Array.from(b),C):n.slice()},C.tickValues=function(b){return arguments.length?(r=b==null?null:Array.from(b),C):r&&r.slice()},C.tickFormat=function(b){return arguments.length?(i=b,C):i},C.tickSize=function(b){return arguments.length?(a=s=+b,C):a},C.tickSizeInner=function(b){return arguments.length?(a=+b,C):a},C.tickSizeOuter=function(b){return arguments.length?(s=+b,C):s},C.tickPadding=function(b){return arguments.length?(y=+b,C):y},C.offset=function(b){return arguments.length?(_=+b,C):_},C}function rr(t){return en(Xt,t)}function ir(t){return en(me,t)}const ar=Math.PI/180,sr=180/Math.PI,$t=18,nn=.96422,rn=1,an=.82521,sn=4/29,St=6/29,on=3*St*St,or=St*St*St;function cn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof dt)return ln(t);t instanceof $e||(t=Un(t));var e=ce(t.r),n=ce(t.g),r=ce(t.b),i=ae((.2225045*e+.7168786*n+.0606169*r)/rn),a,s;return e===n&&n===r?a=s=i:(a=ae((.4360747*e+.3850649*n+.1430804*r)/nn),s=ae((.0139322*e+.0971045*n+.7141733*r)/an)),new ft(116*i-16,500*(a-i),200*(i-s),t.opacity)}function cr(t,e,n,r){return arguments.length===1?cn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Je(ft,cr,Ke(tn,{brighter(t){return new ft(this.l+$t*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-$t*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=nn*se(e),t=rn*se(t),n=an*se(n),new $e(oe(3.1338561*e-1.6168667*t-.4906146*n),oe(-.9787684*e+1.9161415*t+.033454*n),oe(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ae(t){return t>or?Math.pow(t,1/3):t/on+sn}function se(t){return t>St?t*t*t:on*(t-sn)}function oe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ce(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function lr(t){if(t instanceof dt)return new dt(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=cn(t)),t.a===0&&t.b===0)return new dt(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*sr;return new dt(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ge(t,e,n,r){return arguments.length===1?lr(t):new dt(t,e,n,r??1)}function dt(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function ln(t){if(isNaN(t.h))return new ft(t.l,0,0,t.opacity);var e=t.h*ar;return new ft(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Je(dt,ge,Ke(tn,{brighter(t){return new dt(this.h,this.c,this.l+$t*(t??1),this.opacity)},darker(t){return new dt(this.h,this.c,this.l-$t*(t??1),this.opacity)},rgb(){return ln(this).rgb()}}));function ur(t){return function(e,n){var r=t((e=ge(e)).h,(n=ge(n)).h),i=re(e.c,n.c),a=re(e.l,n.l),s=re(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=a(y),e.opacity=s(y),e+""}}}const fr=ur(En);function hr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],a=t[r],s;return a<i&&(s=n,n=r,r=s,s=i,i=a,a=s),t[n]=e.floor(i),t[r]=e.ceil(a),t}const le=new Date,ue=new Date;function et(t,e,n,r){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const s=i(a),y=i.ceil(a);return a-s<y-a?s:y},i.offset=(a,s)=>(e(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,y)=>{const _=[];if(a=i.ceil(a),y=y==null?1:Math.floor(y),!(a<s)||!(y>0))return _;let p;do _.push(p=new Date(+a)),e(a,y),t(a);while(p<a&&a<s);return _},i.filter=a=>et(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,y)=>{if(s>=s)if(y<0)for(;++y<=0;)for(;e(s,-1),!a(s););else for(;--y>=0;)for(;e(s,1),!a(s););}),n&&(i.count=(a,s)=>(le.setTime(+a),ue.setTime(+s),t(le),t(ue),Math.floor(n(le,ue))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?s=>r(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Yt=et(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Yt.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?et(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Yt);Yt.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,xe=yt*7,Oe=yt*30,fe=yt*365,vt=et(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Wt=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Wt.range;const dr=et(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());dr.range;const Ot=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Ot.range;const mr=et(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());mr.range;const Tt=et(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);Tt.range;const we=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);we.range;const gr=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));gr.range;function wt(t){return et(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/xe)}const Vt=wt(0),Ht=wt(1),un=wt(2),fn=wt(3),bt=wt(4),hn=wt(5),dn=wt(6);Vt.range;Ht.range;un.range;fn.range;bt.range;hn.range;dn.range;function Dt(t){return et(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/xe)}const mn=Dt(0),Jt=Dt(1),yr=Dt(2),kr=Dt(3),Ut=Dt(4),pr=Dt(5),vr=Dt(6);mn.range;Jt.range;yr.range;kr.range;Ut.range;pr.range;vr.range;const Nt=et(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Nt.range;const Tr=et(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Tr.range;const kt=et(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const xt=et(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());xt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});xt.range;function br(t,e,n,r,i,a){const s=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[a,1,ct],[a,5,5*ct],[a,15,15*ct],[a,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,xe],[e,1,Oe],[e,3,3*Oe],[t,1,fe]];function y(p,g,E){const C=g<p;C&&([p,g]=[g,p]);const b=E&&typeof E.range=="function"?E:_(p,g,E),X=b?b.range(p,+g+1):[];return C?X.reverse():X}function _(p,g,E){const C=Math.abs(g-p)/E,b=Bn(([,,M])=>M).right(s,C);if(b===s.length)return t.every(Ie(p/fe,g/fe,E));if(b===0)return Yt.every(Math.max(Ie(p,g,E),1));const[X,O]=s[C/s[b-1][2]<s[b][2]/C?b-1:b];return X.every(O)}return[y,_]}const[xr,wr]=br(kt,Nt,Vt,Tt,Ot,Wt);function he(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function de(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Lt(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Dr(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,s=t.shortDays,y=t.months,_=t.shortMonths,p=At(i),g=It(i),E=At(a),C=It(a),b=At(s),X=It(s),O=At(y),M=It(y),I=At(_),V=It(_),W={a:d,A:w,b:c,B:l,c:null,d:Re,e:Re,f:Xr,g:ri,G:ai,H:Br,I:Zr,j:qr,L:gn,m:Gr,M:jr,p:o,q:P,Q:qe,s:Xe,S:Qr,u:$r,U:Jr,V:Kr,w:ti,W:ei,x:null,X:null,y:ni,Y:ii,Z:si,"%":Ze},Z={a:z,A:R,b:K,B:G,c:null,d:Be,e:Be,f:ui,g:Ti,G:xi,H:oi,I:ci,j:li,L:kn,m:fi,M:hi,p:$,q:at,Q:qe,s:Xe,S:di,u:mi,U:gi,V:yi,w:ki,W:pi,x:null,X:null,y:vi,Y:bi,Z:wi,"%":Ze},Q={a:F,A:S,b:v,B:U,c:u,d:ze,e:ze,f:Vr,g:Ve,G:Ne,H:Pe,I:Pe,j:Wr,L:Nr,m:Ir,M:Or,p:Y,q:Ar,Q:Pr,s:Rr,S:Hr,u:Fr,U:Yr,V:Ur,w:Sr,W:Er,x:m,X:T,y:Ve,Y:Ne,Z:Lr,"%":zr};W.x=D(n,W),W.X=D(r,W),W.c=D(e,W),Z.x=D(n,Z),Z.X=D(r,Z),Z.c=D(e,Z);function D(k,A){return function(N){var f=[],J=-1,L=0,j=k.length,q,rt,st;for(N instanceof Date||(N=new Date(+N));++J<j;)k.charCodeAt(J)===37&&(f.push(k.slice(L,J)),(rt=He[q=k.charAt(++J)])!=null?q=k.charAt(++J):rt=q==="e"?" ":"0",(st=A[q])&&(q=st(N,rt)),f.push(q),L=J+1);return f.push(k.slice(L,J)),f.join("")}}function H(k,A){return function(N){var f=Lt(1900,void 0,1),J=x(f,k,N+="",0),L,j;if(J!=N.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(f.s*1e3+("L"in f?f.L:0));if(A&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+f.p*12),f.m===void 0&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>53)return null;"w"in f||(f.w=1),"Z"in f?(L=de(Lt(f.y,0,1)),j=L.getUTCDay(),L=j>4||j===0?Jt.ceil(L):Jt(L),L=we.offset(L,(f.V-1)*7),f.y=L.getUTCFullYear(),f.m=L.getUTCMonth(),f.d=L.getUTCDate()+(f.w+6)%7):(L=he(Lt(f.y,0,1)),j=L.getDay(),L=j>4||j===0?Ht.ceil(L):Ht(L),L=Tt.offset(L,(f.V-1)*7),f.y=L.getFullYear(),f.m=L.getMonth(),f.d=L.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),j="Z"in f?de(Lt(f.y,0,1)).getUTCDay():he(Lt(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(j+5)%7:f.w+f.U*7-(j+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,de(f)):he(f)}}function x(k,A,N,f){for(var J=0,L=A.length,j=N.length,q,rt;J<L;){if(f>=j)return-1;if(q=A.charCodeAt(J++),q===37){if(q=A.charAt(J++),rt=Q[q in He?A.charAt(J++):q],!rt||(f=rt(k,N,f))<0)return-1}else if(q!=N.charCodeAt(f++))return-1}return f}function Y(k,A,N){var f=p.exec(A.slice(N));return f?(k.p=g.get(f[0].toLowerCase()),N+f[0].length):-1}function F(k,A,N){var f=b.exec(A.slice(N));return f?(k.w=X.get(f[0].toLowerCase()),N+f[0].length):-1}function S(k,A,N){var f=E.exec(A.slice(N));return f?(k.w=C.get(f[0].toLowerCase()),N+f[0].length):-1}function v(k,A,N){var f=I.exec(A.slice(N));return f?(k.m=V.get(f[0].toLowerCase()),N+f[0].length):-1}function U(k,A,N){var f=O.exec(A.slice(N));return f?(k.m=M.get(f[0].toLowerCase()),N+f[0].length):-1}function u(k,A,N){return x(k,e,A,N)}function m(k,A,N){return x(k,n,A,N)}function T(k,A,N){return x(k,r,A,N)}function d(k){return s[k.getDay()]}function w(k){return a[k.getDay()]}function c(k){return _[k.getMonth()]}function l(k){return y[k.getMonth()]}function o(k){return i[+(k.getHours()>=12)]}function P(k){return 1+~~(k.getMonth()/3)}function z(k){return s[k.getUTCDay()]}function R(k){return a[k.getUTCDay()]}function K(k){return _[k.getUTCMonth()]}function G(k){return y[k.getUTCMonth()]}function $(k){return i[+(k.getUTCHours()>=12)]}function at(k){return 1+~~(k.getUTCMonth()/3)}return{format:function(k){var A=D(k+="",W);return A.toString=function(){return k},A},parse:function(k){var A=H(k+="",!1);return A.toString=function(){return k},A},utcFormat:function(k){var A=D(k+="",Z);return A.toString=function(){return k},A},utcParse:function(k){var A=H(k+="",!0);return A.toString=function(){return k},A}}}var He={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,Cr=/^%/,Mr=/[\\^$*+?|[\]().{}]/g;function B(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function _r(t){return t.replace(Mr,"\\$&")}function At(t){return new RegExp("^(?:"+t.map(_r).join("|")+")","i")}function It(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Sr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Yr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ur(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ne(t,e,n){var r=nt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ve(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Lr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ar(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Ir(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ze(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Pe(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Nr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=nt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zr(t,e,n){var r=Cr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Pr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Re(t,e){return B(t.getDate(),e,2)}function Br(t,e){return B(t.getHours(),e,2)}function Zr(t,e){return B(t.getHours()%12||12,e,2)}function qr(t,e){return B(1+Tt.count(kt(t),t),e,3)}function gn(t,e){return B(t.getMilliseconds(),e,3)}function Xr(t,e){return gn(t,e)+"000"}function Gr(t,e){return B(t.getMonth()+1,e,2)}function jr(t,e){return B(t.getMinutes(),e,2)}function Qr(t,e){return B(t.getSeconds(),e,2)}function $r(t){var e=t.getDay();return e===0?7:e}function Jr(t,e){return B(Vt.count(kt(t)-1,t),e,2)}function yn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function Kr(t,e){return t=yn(t),B(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function ti(t){return t.getDay()}function ei(t,e){return B(Ht.count(kt(t)-1,t),e,2)}function ni(t,e){return B(t.getFullYear()%100,e,2)}function ri(t,e){return t=yn(t),B(t.getFullYear()%100,e,2)}function ii(t,e){return B(t.getFullYear()%1e4,e,4)}function ai(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),B(t.getFullYear()%1e4,e,4)}function si(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+B(e/60|0,"0",2)+B(e%60,"0",2)}function Be(t,e){return B(t.getUTCDate(),e,2)}function oi(t,e){return B(t.getUTCHours(),e,2)}function ci(t,e){return B(t.getUTCHours()%12||12,e,2)}function li(t,e){return B(1+we.count(xt(t),t),e,3)}function kn(t,e){return B(t.getUTCMilliseconds(),e,3)}function ui(t,e){return kn(t,e)+"000"}function fi(t,e){return B(t.getUTCMonth()+1,e,2)}function hi(t,e){return B(t.getUTCMinutes(),e,2)}function di(t,e){return B(t.getUTCSeconds(),e,2)}function mi(t){var e=t.getUTCDay();return e===0?7:e}function gi(t,e){return B(mn.count(xt(t)-1,t),e,2)}function pn(t){var e=t.getUTCDay();return e>=4||e===0?Ut(t):Ut.ceil(t)}function yi(t,e){return t=pn(t),B(Ut.count(xt(t),t)+(xt(t).getUTCDay()===4),e,2)}function ki(t){return t.getUTCDay()}function pi(t,e){return B(Jt.count(xt(t)-1,t),e,2)}function vi(t,e){return B(t.getUTCFullYear()%100,e,2)}function Ti(t,e){return t=pn(t),B(t.getUTCFullYear()%100,e,2)}function bi(t,e){return B(t.getUTCFullYear()%1e4,e,4)}function xi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Ut(t):Ut.ceil(t),B(t.getUTCFullYear()%1e4,e,4)}function wi(){return"+0000"}function Ze(){return"%"}function qe(t){return+t}function Xe(t){return Math.floor(+t/1e3)}var Mt,Kt;Di({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 Di(t){return Mt=Dr(t),Kt=Mt.format,Mt.parse,Mt.utcFormat,Mt.utcParse,Mt}function Ci(t){return new Date(t)}function Mi(t){return t instanceof Date?+t:+new Date(+t)}function vn(t,e,n,r,i,a,s,y,_,p){var g=Zn(),E=g.invert,C=g.domain,b=p(".%L"),X=p(":%S"),O=p("%I:%M"),M=p("%I %p"),I=p("%a %d"),V=p("%b %d"),W=p("%B"),Z=p("%Y");function Q(D){return(_(D)<D?b:y(D)<D?X:s(D)<D?O:a(D)<D?M:r(D)<D?i(D)<D?I:V:n(D)<D?W:Z)(D)}return g.invert=function(D){return new Date(E(D))},g.domain=function(D){return arguments.length?C(Array.from(D,Mi)):C().map(Ci)},g.ticks=function(D){var H=C();return t(H[0],H[H.length-1],D??10)},g.tickFormat=function(D,H){return H==null?Q:p(H)},g.nice=function(D){var H=C();return(!D||typeof D.range!="function")&&(D=e(H[0],H[H.length-1],D??10)),D?C(hr(H,D)):g},g.copy=function(){return qn(g,vn(t,e,n,r,i,a,s,y,_,p))},g}function _i(){return Gn.apply(vn(xr,wr,kt,Nt,Vt,Tt,Ot,Wt,vt,Kt).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Tn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Te,function(){var n="day";return function(r,i,a){var s=function(p){return p.add(4-p.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return s(this).year()},y.isoWeek=function(p){if(!this.$utils().u(p))return this.add(7*(p-this.isoWeek()),n);var g,E,C,b,X=s(this),O=(g=this.isoWeekYear(),E=this.$u,C=(E?a.utc:a)().year(g).startOf("year"),b=4-C.isoWeekday(),C.isoWeekday()>4&&(b+=7),C.add(b,n));return X.diff(O,"week")+1},y.isoWeekday=function(p){return this.$utils().u(p)?this.day()||7:this.day(this.day()%7?p:p-7)};var _=y.startOf;y.startOf=function(p,g){var E=this.$utils(),C=!!E.u(g)||g;return E.p(p)==="isoweek"?C?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):_.bind(this)(p,g)}}})})(Tn);var Si=Tn.exports;const Fi=be(Si);var bn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Te,function(){var n={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,i=/\d/,a=/\d\d/,s=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,_={},p=function(M){return(M=+M)+(M>68?1900:2e3)},g=function(M){return function(I){this[M]=+I}},E=[/[+-]\d\d:?(\d\d)?|Z/,function(M){(this.zone||(this.zone={})).offset=function(I){if(!I||I==="Z")return 0;var V=I.match(/([+-]|\d\d)/g),W=60*V[1]+(+V[2]||0);return W===0?0:V[0]==="+"?-W:W}(M)}],C=function(M){var I=_[M];return I&&(I.indexOf?I:I.s.concat(I.f))},b=function(M,I){var V,W=_.meridiem;if(W){for(var Z=1;Z<=24;Z+=1)if(M.indexOf(W(Z,0,I))>-1){V=Z>12;break}}else V=M===(I?"pm":"PM");return V},X={A:[y,function(M){this.afternoon=b(M,!1)}],a:[y,function(M){this.afternoon=b(M,!0)}],Q:[i,function(M){this.month=3*(M-1)+1}],S:[i,function(M){this.milliseconds=100*+M}],SS:[a,function(M){this.milliseconds=10*+M}],SSS:[/\d{3}/,function(M){this.milliseconds=+M}],s:[s,g("seconds")],ss:[s,g("seconds")],m:[s,g("minutes")],mm:[s,g("minutes")],H:[s,g("hours")],h:[s,g("hours")],HH:[s,g("hours")],hh:[s,g("hours")],D:[s,g("day")],DD:[a,g("day")],Do:[y,function(M){var I=_.ordinal,V=M.match(/\d+/);if(this.day=V[0],I)for(var W=1;W<=31;W+=1)I(W).replace(/\[|\]/g,"")===M&&(this.day=W)}],w:[s,g("week")],ww:[a,g("week")],M:[s,g("month")],MM:[a,g("month")],MMM:[y,function(M){var I=C("months"),V=(C("monthsShort")||I.map(function(W){return W.slice(0,3)})).indexOf(M)+1;if(V<1)throw new Error;this.month=V%12||V}],MMMM:[y,function(M){var I=C("months").indexOf(M)+1;if(I<1)throw new Error;this.month=I%12||I}],Y:[/[+-]?\d+/,g("year")],YY:[a,function(M){this.year=p(M)}],YYYY:[/\d{4}/,g("year")],Z:E,ZZ:E};function O(M){var I,V;I=M,V=_&&_.formats;for(var W=(M=I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(F,S,v){var U=v&&v.toUpperCase();return S||V[v]||n[v]||V[U].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(u,m,T){return m||T.slice(1)})})).match(r),Z=W.length,Q=0;Q<Z;Q+=1){var D=W[Q],H=X[D],x=H&&H[0],Y=H&&H[1];W[Q]=Y?{regex:x,parser:Y}:D.replace(/^\[|\]$/g,"")}return function(F){for(var S={},v=0,U=0;v<Z;v+=1){var u=W[v];if(typeof u=="string")U+=u.length;else{var m=u.regex,T=u.parser,d=F.slice(U),w=m.exec(d)[0];T.call(S,w),F=F.replace(w,"")}}return function(c){var l=c.afternoon;if(l!==void 0){var o=c.hours;l?o<12&&(c.hours+=12):o===12&&(c.hours=0),delete c.afternoon}}(S),S}}return function(M,I,V){V.p.customParseFormat=!0,M&&M.parseTwoDigitYear&&(p=M.parseTwoDigitYear);var W=I.prototype,Z=W.parse;W.parse=function(Q){var D=Q.date,H=Q.utc,x=Q.args;this.$u=H;var Y=x[1];if(typeof Y=="string"){var F=x[2]===!0,S=x[3]===!0,v=F||S,U=x[2];S&&(U=x[2]),_=this.$locale(),!F&&U&&(_=V.Ls[U]),this.$d=function(d,w,c,l){try{if(["x","X"].indexOf(w)>-1)return new Date((w==="X"?1e3:1)*d);var o=O(w)(d),P=o.year,z=o.month,R=o.day,K=o.hours,G=o.minutes,$=o.seconds,at=o.milliseconds,k=o.zone,A=o.week,N=new Date,f=R||(P||z?1:N.getDate()),J=P||N.getFullYear(),L=0;P&&!z||(L=z>0?z-1:N.getMonth());var j,q=K||0,rt=G||0,st=$||0,pt=at||0;return k?new Date(Date.UTC(J,L,f,q,rt,st,pt+60*k.offset*1e3)):c?new Date(Date.UTC(J,L,f,q,rt,st,pt)):(j=new Date(J,L,f,q,rt,st,pt),A&&(j=l(j).week(A).toDate()),j)}catch{return new Date("")}}(D,Y,H,V),this.init(),U&&U!==!0&&(this.$L=this.locale(U).$L),v&&D!=this.format(Y)&&(this.$d=new Date("")),_={}}else if(Y instanceof Array)for(var u=Y.length,m=1;m<=u;m+=1){x[1]=Y[m-1];var T=V.apply(this,x);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}m===u&&(this.$d=new Date(""))}else Z.call(this,Q)}}})})(bn);var Yi=bn.exports;const Ui=be(Yi);var xn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Te,function(){return function(n,r){var i=r.prototype,a=i.format;i.format=function(s){var y=this,_=this.$locale();if(!this.isValid())return a.bind(this)(s);var p=this.$utils(),g=(s||"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((y.$M+1)/3);case"Do":return _.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return _.ordinal(y.week(),"W");case"w":case"ww":return p.s(y.week(),E==="w"?1:2,"0");case"W":case"WW":return p.s(y.isoWeek(),E==="W"?1:2,"0");case"k":case"kk":return p.s(String(y.$H===0?24:y.$H),E==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return E}});return a.bind(this)(g)}}})})(xn);var Ei=xn.exports;const Li=be(Ei);var ye=function(){var t=h(function(U,u,m,T){for(m=m||{},T=U.length;T--;m[U[T]]=u);return m},"o"),e=[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],r=[1,27],i=[1,28],a=[1,29],s=[1,30],y=[1,31],_=[1,32],p=[1,33],g=[1,34],E=[1,9],C=[1,10],b=[1,11],X=[1,12],O=[1,13],M=[1,14],I=[1,15],V=[1,16],W=[1,19],Z=[1,20],Q=[1,21],D=[1,22],H=[1,23],x=[1,25],Y=[1,35],F={trace:h(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:h(function(u,m,T,d,w,c,l){var o=c.length-1;switch(w){case 1:return c[o-1];case 2:this.$=[];break;case 3:c[o-1].push(c[o]),this.$=c[o-1];break;case 4:case 5:this.$=c[o];break;case 6:case 7:this.$=[];break;case 8:d.setWeekday("monday");break;case 9:d.setWeekday("tuesday");break;case 10:d.setWeekday("wednesday");break;case 11:d.setWeekday("thursday");break;case 12:d.setWeekday("friday");break;case 13:d.setWeekday("saturday");break;case 14:d.setWeekday("sunday");break;case 15:d.setWeekend("friday");break;case 16:d.setWeekend("saturday");break;case 17:d.setDateFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 18:d.enableInclusiveEndDates(),this.$=c[o].substr(18);break;case 19:d.TopAxis(),this.$=c[o].substr(8);break;case 20:d.setAxisFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 21:d.setTickInterval(c[o].substr(13)),this.$=c[o].substr(13);break;case 22:d.setExcludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 23:d.setIncludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 24:d.setTodayMarker(c[o].substr(12)),this.$=c[o].substr(12);break;case 27:d.setDiagramTitle(c[o].substr(6)),this.$=c[o].substr(6);break;case 28:this.$=c[o].trim(),d.setAccTitle(this.$);break;case 29:case 30:this.$=c[o].trim(),d.setAccDescription(this.$);break;case 31:d.addSection(c[o].substr(8)),this.$=c[o].substr(8);break;case 33:d.addTask(c[o-1],c[o]),this.$="task";break;case 34:this.$=c[o-1],d.setClickEvent(c[o-1],c[o],null);break;case 35:this.$=c[o-2],d.setClickEvent(c[o-2],c[o-1],c[o]);break;case 36:this.$=c[o-2],d.setClickEvent(c[o-2],c[o-1],null),d.setLink(c[o-2],c[o]);break;case 37:this.$=c[o-3],d.setClickEvent(c[o-3],c[o-2],c[o-1]),d.setLink(c[o-3],c[o]);break;case 38:this.$=c[o-2],d.setClickEvent(c[o-2],c[o],null),d.setLink(c[o-2],c[o-1]);break;case 39:this.$=c[o-3],d.setClickEvent(c[o-3],c[o-1],c[o]),d.setLink(c[o-3],c[o-2]);break;case 40:this.$=c[o-1],d.setLink(c[o-1],c[o]);break;case 41:case 47:this.$=c[o-1]+" "+c[o];break;case 42:case 43:case 45:this.$=c[o-2]+" "+c[o-1]+" "+c[o];break;case 44:case 46:this.$=c[o-3]+" "+c[o-2]+" "+c[o-1]+" "+c[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:s,17:y,18:_,19:18,20:p,21:g,22:E,23:C,24:b,25:X,26:O,27:M,28:I,29:V,30:W,31:Z,33:Q,35:D,36:H,37:24,38:x,40:Y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:s,17:y,18:_,19:18,20:p,21:g,22:E,23:C,24:b,25:X,26:O,27:M,28:I,29:V,30:W,31:Z,33:Q,35:D,36:H,37:24,38:x,40:Y},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:h(function(u,m){if(m.recoverable)this.trace(u);else{var T=new Error(u);throw T.hash=m,T}},"parseError"),parse:h(function(u){var m=this,T=[0],d=[],w=[null],c=[],l=this.table,o="",P=0,z=0,R=2,K=1,G=c.slice.call(arguments,1),$=Object.create(this.lexer),at={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(at.yy[k]=this.yy[k]);$.setInput(u,at.yy),at.yy.lexer=$,at.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var A=$.yylloc;c.push(A);var N=$.options&&$.options.ranges;typeof at.yy.parseError=="function"?this.parseError=at.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){T.length=T.length-2*ot,w.length=w.length-ot,c.length=c.length-ot}h(f,"popStack");function J(){var ot;return ot=d.pop()||$.lex()||K,typeof ot!="number"&&(ot instanceof Array&&(d=ot,ot=d.pop()),ot=m.symbols_[ot]||ot),ot}h(J,"lex");for(var L,j,q,rt,st={},pt,lt,Ae,Bt;;){if(j=T[T.length-1],this.defaultActions[j]?q=this.defaultActions[j]:((L===null||typeof L>"u")&&(L=J()),q=l[j]&&l[j][L]),typeof q>"u"||!q.length||!q[0]){var ne="";Bt=[];for(pt in l[j])this.terminals_[pt]&&pt>R&&Bt.push("'"+this.terminals_[pt]+"'");$.showPosition?ne="Parse error on line "+(P+1)+`:
2
+ `+$.showPosition()+`
3
+ Expecting `+Bt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":ne="Parse error on line "+(P+1)+": Unexpected "+(L==K?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(ne,{text:$.match,token:this.terminals_[L]||L,line:$.yylineno,loc:A,expected:Bt})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+L);switch(q[0]){case 1:T.push(L),w.push($.yytext),c.push($.yylloc),T.push(q[1]),L=null,z=$.yyleng,o=$.yytext,P=$.yylineno,A=$.yylloc;break;case 2:if(lt=this.productions_[q[1]][1],st.$=w[w.length-lt],st._$={first_line:c[c.length-(lt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(lt||1)].first_column,last_column:c[c.length-1].last_column},N&&(st._$.range=[c[c.length-(lt||1)].range[0],c[c.length-1].range[1]]),rt=this.performAction.apply(st,[o,z,P,at.yy,q[1],w,c].concat(G)),typeof rt<"u")return rt;lt&&(T=T.slice(0,-1*lt*2),w=w.slice(0,-1*lt),c=c.slice(0,-1*lt)),T.push(this.productions_[q[1]][0]),w.push(st.$),c.push(st._$),Ae=l[T[T.length-2]][T[T.length-1]],T.push(Ae);break;case 3:return!0}}return!0},"parse")},S=function(){var U={EOF:1,parseError:h(function(m,T){if(this.yy.parser)this.yy.parser.parseError(m,T);else throw new Error(m)},"parseError"),setInput:h(function(u,m){return this.yy=m||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var m=u.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:h(function(u){var m=u.length,T=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),T.length-1&&(this.yylineno-=T.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:T?(T.length===d.length?this.yylloc.first_column:0)+d[d.length-T.length].length-T[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(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
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(u){this.unput(this.match.slice(u))},"less"),pastInput:h(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var u=this.pastInput(),m=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
5
+ `+m+"^"},"showPosition"),test_match:h(function(u,m){var T,d,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),d=u[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],T=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),T)return T;if(this._backtrack){for(var c in w)this[c]=w[c];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,m,T,d;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),c=0;c<w.length;c++)if(T=this._input.match(this.rules[w[c]]),T&&(!m||T[0].length>m[0].length)){if(m=T,d=c,this.options.backtrack_lexer){if(u=this.test_match(T,w[c]),u!==!1)return u;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(u=this.test_match(m,w[d]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var m=this.next();return m||this.lex()},"lex"),begin:h(function(m){this.conditionStack.push(m)},"begin"),popState:h(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:h(function(m){this.begin(m)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(m,T,d,w){switch(d){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return U}();F.lexer=S;function v(){this.yy={}}return h(v,"Parser"),v.prototype=F,F.Parser=v,new v}();ye.parser=ye;var Ai=ye;it.extend(Fi);it.extend(Ui);it.extend(Li);var Ge={friday:5,saturday:6},ut="",De="",Ce=void 0,Me="",zt=[],Pt=[],_e=new Map,Se=[],te=[],Et="",Fe="",wn=["active","done","crit","milestone","vert"],Ye=[],Rt=!1,Ue=!1,Ee="sunday",ee="saturday",ke=0,Ii=h(function(){Se=[],te=[],Et="",Ye=[],Gt=0,ve=void 0,jt=void 0,tt=[],ut="",De="",Fe="",Ce=void 0,Me="",zt=[],Pt=[],Rt=!1,Ue=!1,ke=0,_e=new Map,Pn(),Ee="sunday",ee="saturday"},"clear"),Wi=h(function(t){De=t},"setAxisFormat"),Oi=h(function(){return De},"getAxisFormat"),Hi=h(function(t){Ce=t},"setTickInterval"),Ni=h(function(){return Ce},"getTickInterval"),Vi=h(function(t){Me=t},"setTodayMarker"),zi=h(function(){return Me},"getTodayMarker"),Pi=h(function(t){ut=t},"setDateFormat"),Ri=h(function(){Rt=!0},"enableInclusiveEndDates"),Bi=h(function(){return Rt},"endDatesAreInclusive"),Zi=h(function(){Ue=!0},"enableTopAxis"),qi=h(function(){return Ue},"topAxisEnabled"),Xi=h(function(t){Fe=t},"setDisplayMode"),Gi=h(function(){return Fe},"getDisplayMode"),ji=h(function(){return ut},"getDateFormat"),Qi=h(function(t){zt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),$i=h(function(){return zt},"getIncludes"),Ji=h(function(t){Pt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),Ki=h(function(){return Pt},"getExcludes"),ta=h(function(){return _e},"getLinks"),ea=h(function(t){Et=t,Se.push(t)},"addSection"),na=h(function(){return Se},"getSections"),ra=h(function(){let t=je();const e=10;let n=0;for(;!t&&n<e;)t=je(),n++;return te=tt,te},"getTasks"),Dn=h(function(t,e,n,r){const i=t.format(e.trim()),a=t.format("YYYY-MM-DD");return r.includes(i)||r.includes(a)?!1:n.includes("weekends")&&(t.isoWeekday()===Ge[ee]||t.isoWeekday()===Ge[ee]+1)||n.includes(t.format("dddd").toLowerCase())?!0:n.includes(i)||n.includes(a)},"isInvalidDate"),ia=h(function(t){Ee=t},"setWeekday"),aa=h(function(){return Ee},"getWeekday"),sa=h(function(t){ee=t},"setWeekend"),Cn=h(function(t,e,n,r){if(!n.length||t.manualEndTime)return;let i;t.startTime instanceof Date?i=it(t.startTime):i=it(t.startTime,e,!0),i=i.add(1,"d");let a;t.endTime instanceof Date?a=it(t.endTime):a=it(t.endTime,e,!0);const[s,y]=oa(i,a,e,n,r);t.endTime=s.toDate(),t.renderEndTime=y},"checkTaskDates"),oa=h(function(t,e,n,r,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),a=Dn(t,n,r,i),a&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},"fixTaskDates"),pe=h(function(t,e,n){if(n=n.trim(),(e.trim()==="x"||e.trim()==="X")&&/^\d+$/.test(n))return new Date(Number(n));const i=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(i!==null){let s=null;for(const _ of i.groups.ids.split(" ")){let p=Ct(_);p!==void 0&&(!s||p.endTime>s.endTime)&&(s=p)}if(s)return s.endTime;const y=new Date;return y.setHours(0,0,0,0),y}let a=it(n,e.trim(),!0);if(a.isValid())return a.toDate();{Qt.debug("Invalid date:"+n),Qt.debug("With date format:"+e.trim());const s=new Date(n);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+n);return s}},"getStartDate"),Mn=h(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),_n=h(function(t,e,n,r=!1){n=n.trim();const a=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(a!==null){let g=null;for(const C of a.groups.ids.split(" ")){let b=Ct(C);b!==void 0&&(!g||b.startTime<g.startTime)&&(g=b)}if(g)return g.startTime;const E=new Date;return E.setHours(0,0,0,0),E}let s=it(n,e.trim(),!0);if(s.isValid())return r&&(s=s.add(1,"d")),s.toDate();let y=it(t);const[_,p]=Mn(n);if(!Number.isNaN(_)){const g=y.add(_,p);g.isValid()&&(y=g)}return y.toDate()},"getEndDate"),Gt=0,Ft=h(function(t){return t===void 0?(Gt=Gt+1,"task"+Gt):t},"parseId"),ca=h(function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const r=n.split(","),i={};Le(r,i,wn);for(let s=0;s<r.length;s++)r[s]=r[s].trim();let a="";switch(r.length){case 1:i.id=Ft(),i.startTime=t.endTime,a=r[0];break;case 2:i.id=Ft(),i.startTime=pe(void 0,ut,r[0]),a=r[1];break;case 3:i.id=Ft(r[0]),i.startTime=pe(void 0,ut,r[1]),a=r[2];break}return a&&(i.endTime=_n(i.startTime,ut,a,Rt),i.manualEndTime=it(a,"YYYY-MM-DD",!0).isValid(),Cn(i,ut,Pt,zt)),i},"compileData"),la=h(function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const r=n.split(","),i={};Le(r,i,wn);for(let a=0;a<r.length;a++)r[a]=r[a].trim();switch(r.length){case 1:i.id=Ft(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:r[0]};break;case 2:i.id=Ft(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=Ft(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]};break}return i},"parseData"),ve,jt,tt=[],Sn={},ua=h(function(t,e){const n={section:Et,type:Et,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=la(jt,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=jt,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,n.order=ke,ke++;const i=tt.push(n);jt=n.id,Sn[n.id]=i-1},"addTask"),Ct=h(function(t){const e=Sn[t];return tt[e]},"findTaskById"),fa=h(function(t,e){const n={section:Et,type:Et,description:t,task:t,classes:[]},r=ca(ve,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,ve=n,te.push(n)},"addTaskOrg"),je=h(function(){const t=h(function(n){const r=tt[n];let i="";switch(tt[n].raw.startTime.type){case"prevTaskEnd":{const a=Ct(r.prevTaskId);r.startTime=a.endTime;break}case"getStartDate":i=pe(void 0,ut,tt[n].raw.startTime.startData),i&&(tt[n].startTime=i);break}return tt[n].startTime&&(tt[n].endTime=_n(tt[n].startTime,ut,tt[n].raw.endTime.data,Rt),tt[n].endTime&&(tt[n].processed=!0,tt[n].manualEndTime=it(tt[n].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Cn(tt[n],ut,Pt,zt))),tt[n].processed},"compileTask");let e=!0;for(const[n,r]of tt.entries())t(n),e=e&&r.processed;return e},"compileTasks"),ha=h(function(t,e){let n=e;_t().securityLevel!=="loose"&&(n=zn(e)),t.split(",").forEach(function(r){Ct(r)!==void 0&&(Yn(r,()=>{window.open(n,"_self")}),_e.set(r,n))}),Fn(t,"clickable")},"setLink"),Fn=h(function(t,e){t.split(",").forEach(function(n){let r=Ct(n);r!==void 0&&r.classes.push(e)})},"setClass"),da=h(function(t,e,n){if(_t().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a<r.length;a++){let s=r[a].trim();s.startsWith('"')&&s.endsWith('"')&&(s=s.substr(1,s.length-2)),r[a]=s}}r.length===0&&r.push(t),Ct(t)!==void 0&&Yn(t,()=>{Rn.runFunc(e,...r)})},"setClickFun"),Yn=h(function(t,e){Ye.push(function(){const n=document.querySelector(`[id="${t}"]`);n!==null&&n.addEventListener("click",function(){e()})},function(){const n=document.querySelector(`[id="${t}-text"]`);n!==null&&n.addEventListener("click",function(){e()})})},"pushFun"),ma=h(function(t,e,n){t.split(",").forEach(function(r){da(r,e,n)}),Fn(t,"clickable")},"setClickEvent"),ga=h(function(t){Ye.forEach(function(e){e(t)})},"bindFunctions"),ya={getConfig:h(()=>_t().gantt,"getConfig"),clear:Ii,setDateFormat:Pi,getDateFormat:ji,enableInclusiveEndDates:Ri,endDatesAreInclusive:Bi,enableTopAxis:Zi,topAxisEnabled:qi,setAxisFormat:Wi,getAxisFormat:Oi,setTickInterval:Hi,getTickInterval:Ni,setTodayMarker:Vi,getTodayMarker:zi,setAccTitle:Hn,getAccTitle:On,setDiagramTitle:Wn,getDiagramTitle:In,setDisplayMode:Xi,getDisplayMode:Gi,setAccDescription:An,getAccDescription:Ln,addSection:ea,getSections:na,getTasks:ra,addTask:ua,findTaskById:Ct,addTaskOrg:fa,setIncludes:Qi,getIncludes:$i,setExcludes:Ji,getExcludes:Ki,setClickEvent:ma,setLink:ha,getLinks:ta,bindFunctions:ga,parseDuration:Mn,isInvalidDate:Dn,setWeekday:ia,getWeekday:aa,setWeekend:sa};function Le(t,e,n){let r=!0;for(;r;)r=!1,n.forEach(function(i){const a="^\\s*"+i+"\\s*$",s=new RegExp(a);t[0].match(s)&&(e[i]=!0,t.shift(1),r=!0)})}h(Le,"getTaskTags");var ka=h(function(){Qt.debug("Something is calling, setConf, remove the call")},"setConf"),Qe={monday:Ht,tuesday:un,wednesday:fn,thursday:bt,friday:hn,saturday:dn,sunday:Vt},pa=h((t,e)=>{let n=[...t].map(()=>-1/0),r=[...t].sort((a,s)=>a.startTime-s.startTime||a.order-s.order),i=0;for(const a of r)for(let s=0;s<n.length;s++)if(a.startTime>=n[s]){n[s]=a.endTime,a.order=s+e,s>i&&(i=s);break}return i},"getMaxIntersections"),ht,va=h(function(t,e,n,r){const i=_t().gantt,a=_t().securityLevel;let s;a==="sandbox"&&(s=Zt("#i"+e));const y=a==="sandbox"?Zt(s.nodes()[0].contentDocument.body):Zt("body"),_=a==="sandbox"?s.nodes()[0].contentDocument:document,p=_.getElementById(e);ht=p.parentElement.offsetWidth,ht===void 0&&(ht=1200),i.useWidth!==void 0&&(ht=i.useWidth);const g=r.db.getTasks();let E=[];for(const x of g)E.push(x.type);E=H(E);const C={};let b=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const x={};for(const F of g)x[F.section]===void 0?x[F.section]=[F]:x[F.section].push(F);let Y=0;for(const F of Object.keys(x)){const S=pa(x[F],Y)+1;Y+=S,b+=S*(i.barHeight+i.barGap),C[F]=S}}else{b+=g.length*(i.barHeight+i.barGap);for(const x of E)C[x]=g.filter(Y=>Y.type===x).length}p.setAttribute("viewBox","0 0 "+ht+" "+b);const X=y.select(`[id="${e}"]`),O=_i().domain([Qn(g,function(x){return x.startTime}),jn(g,function(x){return x.endTime})]).rangeRound([0,ht-i.leftPadding-i.rightPadding]);function M(x,Y){const F=x.startTime,S=Y.startTime;let v=0;return F>S?v=1:F<S&&(v=-1),v}h(M,"taskCompare"),g.sort(M),I(g,ht,b),Nn(X,b,ht,i.useMaxWidth),X.append("text").text(r.db.getDiagramTitle()).attr("x",ht/2).attr("y",i.titleTopMargin).attr("class","titleText");function I(x,Y,F){const S=i.barHeight,v=S+i.barGap,U=i.topPadding,u=i.leftPadding,m=Xn().domain([0,E.length]).range(["#00B9FA","#F95002"]).interpolate(fr);W(v,U,u,Y,F,x,r.db.getExcludes(),r.db.getIncludes()),Z(u,U,Y,F),V(x,v,U,u,S,m,Y),Q(v,U),D(u,U,Y,F)}h(I,"makeGantt");function V(x,Y,F,S,v,U,u){x.sort((l,o)=>l.vert===o.vert?0:l.vert?1:-1);const T=[...new Set(x.map(l=>l.order))].map(l=>x.find(o=>o.order===l));X.append("g").selectAll("rect").data(T).enter().append("rect").attr("x",0).attr("y",function(l,o){return o=l.order,o*Y+F-2}).attr("width",function(){return u-i.rightPadding/2}).attr("height",Y).attr("class",function(l){for(const[o,P]of E.entries())if(l.type===P)return"section section"+o%i.numberSectionStyles;return"section section0"}).enter();const d=X.append("g").selectAll("rect").data(x).enter(),w=r.db.getLinks();if(d.append("rect").attr("id",function(l){return l.id}).attr("rx",3).attr("ry",3).attr("x",function(l){return l.milestone?O(l.startTime)+S+.5*(O(l.endTime)-O(l.startTime))-.5*v:O(l.startTime)+S}).attr("y",function(l,o){return o=l.order,l.vert?i.gridLineStartPadding:o*Y+F}).attr("width",function(l){return l.milestone?v:l.vert?.08*v:O(l.renderEndTime||l.endTime)-O(l.startTime)}).attr("height",function(l){return l.vert?g.length*(i.barHeight+i.barGap)+i.barHeight*2:v}).attr("transform-origin",function(l,o){return o=l.order,(O(l.startTime)+S+.5*(O(l.endTime)-O(l.startTime))).toString()+"px "+(o*Y+F+.5*v).toString()+"px"}).attr("class",function(l){const o="task";let P="";l.classes.length>0&&(P=l.classes.join(" "));let z=0;for(const[K,G]of E.entries())l.type===G&&(z=K%i.numberSectionStyles);let R="";return l.active?l.crit?R+=" activeCrit":R=" active":l.done?l.crit?R=" doneCrit":R=" done":l.crit&&(R+=" crit"),R.length===0&&(R=" task"),l.milestone&&(R=" milestone "+R),l.vert&&(R=" vert "+R),R+=z,R+=" "+P,o+R}),d.append("text").attr("id",function(l){return l.id+"-text"}).text(function(l){return l.task}).attr("font-size",i.fontSize).attr("x",function(l){let o=O(l.startTime),P=O(l.renderEndTime||l.endTime);if(l.milestone&&(o+=.5*(O(l.endTime)-O(l.startTime))-.5*v,P=o+v),l.vert)return O(l.startTime)+S;const z=this.getBBox().width;return z>P-o?P+z+1.5*i.leftPadding>u?o+S-5:P+S+5:(P-o)/2+o+S}).attr("y",function(l,o){return l.vert?i.gridLineStartPadding+g.length*(i.barHeight+i.barGap)+60:(o=l.order,o*Y+i.barHeight/2+(i.fontSize/2-2)+F)}).attr("text-height",v).attr("class",function(l){const o=O(l.startTime);let P=O(l.endTime);l.milestone&&(P=o+v);const z=this.getBBox().width;let R="";l.classes.length>0&&(R=l.classes.join(" "));let K=0;for(const[$,at]of E.entries())l.type===at&&(K=$%i.numberSectionStyles);let G="";return l.active&&(l.crit?G="activeCritText"+K:G="activeText"+K),l.done?l.crit?G=G+" doneCritText"+K:G=G+" doneText"+K:l.crit&&(G=G+" critText"+K),l.milestone&&(G+=" milestoneText"),l.vert&&(G+=" vertText"),z>P-o?P+z+1.5*i.leftPadding>u?R+" taskTextOutsideLeft taskTextOutside"+K+" "+G:R+" taskTextOutsideRight taskTextOutside"+K+" "+G+" width-"+z:R+" taskText taskText"+K+" "+G+" width-"+z}),_t().securityLevel==="sandbox"){let l;l=Zt("#i"+e);const o=l.nodes()[0].contentDocument;d.filter(function(P){return w.has(P.id)}).each(function(P){var z=o.querySelector("#"+P.id),R=o.querySelector("#"+P.id+"-text");const K=z.parentNode;var G=o.createElement("a");G.setAttribute("xlink:href",w.get(P.id)),G.setAttribute("target","_top"),K.appendChild(G),G.appendChild(z),G.appendChild(R)})}}h(V,"drawRects");function W(x,Y,F,S,v,U,u,m){if(u.length===0&&m.length===0)return;let T,d;for(const{startTime:z,endTime:R}of U)(T===void 0||z<T)&&(T=z),(d===void 0||R>d)&&(d=R);if(!T||!d)return;if(it(d).diff(it(T),"year")>5){Qt.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const w=r.db.getDateFormat(),c=[];let l=null,o=it(T);for(;o.valueOf()<=d;)r.db.isInvalidDate(o,w,u,m)?l?l.end=o:l={start:o,end:o}:l&&(c.push(l),l=null),o=o.add(1,"d");X.append("g").selectAll("rect").data(c).enter().append("rect").attr("id",z=>"exclude-"+z.start.format("YYYY-MM-DD")).attr("x",z=>O(z.start.startOf("day"))+F).attr("y",i.gridLineStartPadding).attr("width",z=>O(z.end.endOf("day"))-O(z.start.startOf("day"))).attr("height",v-Y-i.gridLineStartPadding).attr("transform-origin",function(z,R){return(O(z.start)+F+.5*(O(z.end)-O(z.start))).toString()+"px "+(R*x+.5*v).toString()+"px"}).attr("class","exclude-range")}h(W,"drawExcludeDays");function Z(x,Y,F,S){const v=r.db.getDateFormat(),U=r.db.getAxisFormat();let u;U?u=U:v==="D"?u="%d":u=i.axisFormat??"%Y-%m-%d";let m=ir(O).tickSize(-S+Y+i.gridLineStartPadding).tickFormat(Kt(u));const d=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(d!==null){const w=d[1],c=d[2],l=r.db.getWeekday()||i.weekday;switch(c){case"millisecond":m.ticks(Yt.every(w));break;case"second":m.ticks(vt.every(w));break;case"minute":m.ticks(Wt.every(w));break;case"hour":m.ticks(Ot.every(w));break;case"day":m.ticks(Tt.every(w));break;case"week":m.ticks(Qe[l].every(w));break;case"month":m.ticks(Nt.every(w));break}}if(X.append("g").attr("class","grid").attr("transform","translate("+x+", "+(S-50)+")").call(m).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||i.topAxis){let w=rr(O).tickSize(-S+Y+i.gridLineStartPadding).tickFormat(Kt(u));if(d!==null){const c=d[1],l=d[2],o=r.db.getWeekday()||i.weekday;switch(l){case"millisecond":w.ticks(Yt.every(c));break;case"second":w.ticks(vt.every(c));break;case"minute":w.ticks(Wt.every(c));break;case"hour":w.ticks(Ot.every(c));break;case"day":w.ticks(Tt.every(c));break;case"week":w.ticks(Qe[o].every(c));break;case"month":w.ticks(Nt.every(c));break}}X.append("g").attr("class","grid").attr("transform","translate("+x+", "+Y+")").call(w).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}h(Z,"makeGrid");function Q(x,Y){let F=0;const S=Object.keys(C).map(v=>[v,C[v]]);X.append("g").selectAll("text").data(S).enter().append(function(v){const U=v[0].split(Vn.lineBreakRegex),u=-(U.length-1)/2,m=_.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("dy",u+"em");for(const[T,d]of U.entries()){const w=_.createElementNS("http://www.w3.org/2000/svg","tspan");w.setAttribute("alignment-baseline","central"),w.setAttribute("x","10"),T>0&&w.setAttribute("dy","1em"),w.textContent=d,m.appendChild(w)}return m}).attr("x",10).attr("y",function(v,U){if(U>0)for(let u=0;u<U;u++)return F+=S[U-1][1],v[1]*x/2+F*x+Y;else return v[1]*x/2+Y}).attr("font-size",i.sectionFontSize).attr("class",function(v){for(const[U,u]of E.entries())if(v[0]===u)return"sectionTitle sectionTitle"+U%i.numberSectionStyles;return"sectionTitle"})}h(Q,"vertLabels");function D(x,Y,F,S){const v=r.db.getTodayMarker();if(v==="off")return;const U=X.append("g").attr("class","today"),u=new Date,m=U.append("line");m.attr("x1",O(u)+x).attr("x2",O(u)+x).attr("y1",i.titleTopMargin).attr("y2",S-i.titleTopMargin).attr("class","today"),v!==""&&m.attr("style",v.replace(/,/g,";"))}h(D,"drawToday");function H(x){const Y={},F=[];for(let S=0,v=x.length;S<v;++S)Object.prototype.hasOwnProperty.call(Y,x[S])||(Y[x[S]]=!0,F.push(x[S]));return F}h(H,"checkUnique")},"draw"),Ta={setConf:ka,draw:va},ba=h(t=>`
7
+ .mermaid-main-font {
8
+ font-family: ${t.fontFamily};
9
+ }
10
+
11
+ .exclude-range {
12
+ fill: ${t.excludeBkgColor};
13
+ }
14
+
15
+ .section {
16
+ stroke: none;
17
+ opacity: 0.2;
18
+ }
19
+
20
+ .section0 {
21
+ fill: ${t.sectionBkgColor};
22
+ }
23
+
24
+ .section2 {
25
+ fill: ${t.sectionBkgColor2};
26
+ }
27
+
28
+ .section1,
29
+ .section3 {
30
+ fill: ${t.altSectionBkgColor};
31
+ opacity: 0.2;
32
+ }
33
+
34
+ .sectionTitle0 {
35
+ fill: ${t.titleColor};
36
+ }
37
+
38
+ .sectionTitle1 {
39
+ fill: ${t.titleColor};
40
+ }
41
+
42
+ .sectionTitle2 {
43
+ fill: ${t.titleColor};
44
+ }
45
+
46
+ .sectionTitle3 {
47
+ fill: ${t.titleColor};
48
+ }
49
+
50
+ .sectionTitle {
51
+ text-anchor: start;
52
+ font-family: ${t.fontFamily};
53
+ }
54
+
55
+
56
+ /* Grid and axis */
57
+
58
+ .grid .tick {
59
+ stroke: ${t.gridColor};
60
+ opacity: 0.8;
61
+ shape-rendering: crispEdges;
62
+ }
63
+
64
+ .grid .tick text {
65
+ font-family: ${t.fontFamily};
66
+ fill: ${t.textColor};
67
+ }
68
+
69
+ .grid path {
70
+ stroke-width: 0;
71
+ }
72
+
73
+
74
+ /* Today line */
75
+
76
+ .today {
77
+ fill: none;
78
+ stroke: ${t.todayLineColor};
79
+ stroke-width: 2px;
80
+ }
81
+
82
+
83
+ /* Task styling */
84
+
85
+ /* Default task */
86
+
87
+ .task {
88
+ stroke-width: 2;
89
+ }
90
+
91
+ .taskText {
92
+ text-anchor: middle;
93
+ font-family: ${t.fontFamily};
94
+ }
95
+
96
+ .taskTextOutsideRight {
97
+ fill: ${t.taskTextDarkColor};
98
+ text-anchor: start;
99
+ font-family: ${t.fontFamily};
100
+ }
101
+
102
+ .taskTextOutsideLeft {
103
+ fill: ${t.taskTextDarkColor};
104
+ text-anchor: end;
105
+ }
106
+
107
+
108
+ /* Special case clickable */
109
+
110
+ .task.clickable {
111
+ cursor: pointer;
112
+ }
113
+
114
+ .taskText.clickable {
115
+ cursor: pointer;
116
+ fill: ${t.taskTextClickableColor} !important;
117
+ font-weight: bold;
118
+ }
119
+
120
+ .taskTextOutsideLeft.clickable {
121
+ cursor: pointer;
122
+ fill: ${t.taskTextClickableColor} !important;
123
+ font-weight: bold;
124
+ }
125
+
126
+ .taskTextOutsideRight.clickable {
127
+ cursor: pointer;
128
+ fill: ${t.taskTextClickableColor} !important;
129
+ font-weight: bold;
130
+ }
131
+
132
+
133
+ /* Specific task settings for the sections*/
134
+
135
+ .taskText0,
136
+ .taskText1,
137
+ .taskText2,
138
+ .taskText3 {
139
+ fill: ${t.taskTextColor};
140
+ }
141
+
142
+ .task0,
143
+ .task1,
144
+ .task2,
145
+ .task3 {
146
+ fill: ${t.taskBkgColor};
147
+ stroke: ${t.taskBorderColor};
148
+ }
149
+
150
+ .taskTextOutside0,
151
+ .taskTextOutside2
152
+ {
153
+ fill: ${t.taskTextOutsideColor};
154
+ }
155
+
156
+ .taskTextOutside1,
157
+ .taskTextOutside3 {
158
+ fill: ${t.taskTextOutsideColor};
159
+ }
160
+
161
+
162
+ /* Active task */
163
+
164
+ .active0,
165
+ .active1,
166
+ .active2,
167
+ .active3 {
168
+ fill: ${t.activeTaskBkgColor};
169
+ stroke: ${t.activeTaskBorderColor};
170
+ }
171
+
172
+ .activeText0,
173
+ .activeText1,
174
+ .activeText2,
175
+ .activeText3 {
176
+ fill: ${t.taskTextDarkColor} !important;
177
+ }
178
+
179
+
180
+ /* Completed task */
181
+
182
+ .done0,
183
+ .done1,
184
+ .done2,
185
+ .done3 {
186
+ stroke: ${t.doneTaskBorderColor};
187
+ fill: ${t.doneTaskBkgColor};
188
+ stroke-width: 2;
189
+ }
190
+
191
+ .doneText0,
192
+ .doneText1,
193
+ .doneText2,
194
+ .doneText3 {
195
+ fill: ${t.taskTextDarkColor} !important;
196
+ }
197
+
198
+
199
+ /* Tasks on the critical line */
200
+
201
+ .crit0,
202
+ .crit1,
203
+ .crit2,
204
+ .crit3 {
205
+ stroke: ${t.critBorderColor};
206
+ fill: ${t.critBkgColor};
207
+ stroke-width: 2;
208
+ }
209
+
210
+ .activeCrit0,
211
+ .activeCrit1,
212
+ .activeCrit2,
213
+ .activeCrit3 {
214
+ stroke: ${t.critBorderColor};
215
+ fill: ${t.activeTaskBkgColor};
216
+ stroke-width: 2;
217
+ }
218
+
219
+ .doneCrit0,
220
+ .doneCrit1,
221
+ .doneCrit2,
222
+ .doneCrit3 {
223
+ stroke: ${t.critBorderColor};
224
+ fill: ${t.doneTaskBkgColor};
225
+ stroke-width: 2;
226
+ cursor: pointer;
227
+ shape-rendering: crispEdges;
228
+ }
229
+
230
+ .milestone {
231
+ transform: rotate(45deg) scale(0.8,0.8);
232
+ }
233
+
234
+ .milestoneText {
235
+ font-style: italic;
236
+ }
237
+ .doneCritText0,
238
+ .doneCritText1,
239
+ .doneCritText2,
240
+ .doneCritText3 {
241
+ fill: ${t.taskTextDarkColor} !important;
242
+ }
243
+
244
+ .vert {
245
+ stroke: ${t.vertLineColor};
246
+ }
247
+
248
+ .vertText {
249
+ font-size: 15px;
250
+ text-anchor: middle;
251
+ fill: ${t.vertLineColor} !important;
252
+ }
253
+
254
+ .activeCritText0,
255
+ .activeCritText1,
256
+ .activeCritText2,
257
+ .activeCritText3 {
258
+ fill: ${t.taskTextDarkColor} !important;
259
+ }
260
+
261
+ .titleText {
262
+ text-anchor: middle;
263
+ font-size: 18px;
264
+ fill: ${t.titleColor||t.textColor};
265
+ font-family: ${t.fontFamily};
266
+ }
267
+ `,"getStyles"),xa=ba,_a={parser:Ai,db:ya,renderer:Ta,styles:xa};export{_a as diagram};
@@ -0,0 +1,65 @@
1
+ import{p as Z}from"./chunk-4BX2VUAB-BHUJEoYX.js";import{I as F}from"./chunk-QZHKN3VN-ilsrzkGG.js";import{_ as h,q as U,p as rr,s as er,g as tr,a as ar,b as nr,l as m,c as sr,d as or,u as cr,C as ir,y as dr,k as B,D as hr,E as lr,F as $r,G as fr}from"./index-CaWmtxvi.js";import{p as gr}from"./treemap-KMMF4GRG-ddD_Fzr5.js";import"./_baseUniq-DaFrQBY_.js";import"./_basePickBy-D3MzUSH4.js";import"./clone-DwRx6AOW.js";var u={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},yr=$r.gitGraph,z=h(()=>hr({...yr,...lr().gitGraph}),"getConfig"),i=new F(()=>{const t=z(),r=t.mainBranchName,a=t.mainBranchOrder;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 S(){return fr({length:7})}h(S,"getID");function N(t,r){const a=Object.create(null);return t.reduce((s,e)=>{const n=r(e);return a[n]||(a[n]=!0,s.push(e)),s},[])}h(N,"uniqBy");var xr=h(function(t){i.records.direction=t},"setDirection"),ur=h(function(t){m.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(r){m.error("error while parsing gitGraph options",r.message)}},"setOptions"),pr=h(function(){return i.records.options},"getOptions"),br=h(function(t){let r=t.msg,a=t.id;const s=t.type;let e=t.tags;m.info("commit",r,a,s,e),m.debug("Entering commit:",r,a,s,e);const n=z();a=B.sanitizeText(a,n),r=B.sanitizeText(r,n),e=e==null?void 0:e.map(o=>B.sanitizeText(o,n));const c={id:a||i.records.seq+"-"+S(),message:r,seq:i.records.seq++,type:s??u.NORMAL,tags:e??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=c,m.info("main branch",n.mainBranchName),i.records.commits.has(c.id)&&m.warn(`Commit ID ${c.id} already exists`),i.records.commits.set(c.id,c),i.records.branches.set(i.records.currBranch,c.id),m.debug("in pushCommit "+c.id)},"commit"),mr=h(function(t){let r=t.name;const a=t.order;if(r=B.sanitizeText(r,z()),i.records.branches.has(r))throw new 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}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:a}),_(r),m.debug("in createBranch")},"branch"),wr=h(t=>{let r=t.branch,a=t.id;const s=t.type,e=t.tags,n=z();r=B.sanitizeText(r,n),a&&(a=B.sanitizeText(a,n));const c=i.records.branches.get(i.records.currBranch),o=i.records.branches.get(r),$=c?i.records.commits.get(c):void 0,l=o?i.records.commits.get(o):void 0;if($&&l&&$.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if($===void 0||!$){const d=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},d}if(!i.records.branches.has(r)){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},d}if(l===void 0||!l){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},d}if($===l){const d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(a&&i.records.commits.has(a)){const d=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw d.hash={text:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,token:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${s} ${e==null?void 0:e.join(" ")}`]},d}const f=o||"",g={id:a||`${i.records.seq}-${S()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:u.MERGE,customType:s,customId:!!a,tags:e??[]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),m.debug(i.records.branches),m.debug("in mergeBranch")},"merge"),vr=h(function(t){let r=t.id,a=t.targetId,s=t.tags,e=t.parent;m.debug("Entering cherryPick:",r,a,s);const n=z();if(r=B.sanitizeText(r,n),a=B.sanitizeText(a,n),s=s==null?void 0:s.map($=>B.sanitizeText($,n)),e=B.sanitizeText(e,n),!r||!i.records.commits.has(r)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},$}const c=i.records.commits.get(r);if(c===void 0||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const o=c.branch;if(c.type===u.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(o===i.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const $=i.records.branches.get(i.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const l=i.records.commits.get($);if(l===void 0||!l){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const f={id:i.records.seq+"-"+S(),message:`cherry-picked ${c==null?void 0:c.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,c.id],branch:i.records.currBranch,type:u.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${c.id}${c.type===u.MERGE?`|parent:${e}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),m.debug(i.records.branches),m.debug("in cherryPick")}},"cherryPick"),_=h(function(t){if(t=B.sanitizeText(t,z()),i.records.branches.has(t)){i.records.currBranch=t;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function D(t,r,a){const s=t.indexOf(r);s===-1?t.push(a):t.splice(s,1,a)}h(D,"upsert");function A(t){const r=t.reduce((e,n)=>e.seq>n.seq?e:n,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const s=[a,r.id,r.seq];for(const e in i.records.branches)i.records.branches.get(e)===r.id&&s.push(e);if(m.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=i.records.commits.get(r.parents[0]);D(t,r,e),r.parents[1]&&t.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=i.records.commits.get(r.parents[0]);D(t,r,e)}}t=N(t,e=>e.id),A(t)}h(A,"prettyPrintCommitHistory");var Cr=h(function(){m.debug(i.records.commits);const t=V()[0];A([t])},"prettyPrint"),Er=h(function(){i.reset(),dr()},"clear"),Br=h(function(){return[...i.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),kr=h(function(){return i.records.branches},"getBranches"),Lr=h(function(){return i.records.commits},"getCommits"),V=h(function(){const t=[...i.records.commits.values()];return t.forEach(function(r){m.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),Tr=h(function(){return i.records.currBranch},"getCurrentBranch"),Mr=h(function(){return i.records.direction},"getDirection"),Rr=h(function(){return i.records.head},"getHead"),X={commitType:u,getConfig:z,setDirection:xr,setOptions:ur,getOptions:pr,commit:br,branch:mr,merge:wr,cherryPick:vr,checkout:_,prettyPrint:Cr,clear:Er,getBranchesAsObjArray:Br,getBranches:kr,getCommits:Lr,getCommitsArray:V,getCurrentBranch:Tr,getDirection:Mr,getHead:Rr,setAccTitle:nr,getAccTitle:ar,getAccDescription:tr,setAccDescription:er,setDiagramTitle:rr,getDiagramTitle:U},Ir=h((t,r)=>{Z(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)qr(a,r)},"populate"),qr=h((t,r)=>{const s={Commit:h(e=>r.commit(Or(e)),"Commit"),Branch:h(e=>r.branch(zr(e)),"Branch"),Merge:h(e=>r.merge(Gr(e)),"Merge"),Checkout:h(e=>r.checkout(Hr(e)),"Checkout"),CherryPicking:h(e=>r.cherryPick(Pr(e)),"CherryPicking")}[t.$type];s?s(t):m.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Or=h(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?u[t.type]:u.NORMAL,tags:t.tags??void 0}),"parseCommit"),zr=h(t=>({name:t.name,order:t.order??0}),"parseBranch"),Gr=h(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?u[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Hr=h(t=>t.branch,"parseCheckout"),Pr=h(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),Wr={parse:h(async t=>{const r=await gr("gitGraph",t);m.debug(r),Ir(r,X)},"parse")},j=sr(),b=j==null?void 0:j.gitGraph,R=10,I=40,k=4,L=2,O=8,C=new Map,E=new Map,P=30,G=new Map,W=[],M=0,x="LR",Sr=h(()=>{C.clear(),E.clear(),G.clear(),M=0,W=[],x="LR"},"clear"),J=h(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(s=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=s.trim(),r.appendChild(e)}),r},"drawText"),Q=h(t=>{let r,a,s;return x==="BT"?(a=h((e,n)=>e<=n,"comparisonFunc"),s=1/0):(a=h((e,n)=>e>=n,"comparisonFunc"),s=0),t.forEach(e=>{var c,o;const n=x==="TB"||x=="BT"?(c=E.get(e))==null?void 0:c.y:(o=E.get(e))==null?void 0:o.x;n!==void 0&&a(n,s)&&(r=e,s=n)}),r},"findClosestParent"),jr=h(t=>{let r="",a=1/0;return t.forEach(s=>{const e=E.get(s).y;e<=a&&(r=s,a=e)}),r||void 0},"findClosestParentBT"),Dr=h((t,r,a)=>{let s=a,e=a;const n=[];t.forEach(c=>{const o=r.get(c);if(!o)throw new Error(`Commit not found for key ${c}`);o.parents.length?(s=Yr(o),e=Math.max(s,e)):n.push(o),Kr(o,s)}),s=e,n.forEach(c=>{Nr(c,s,a)}),t.forEach(c=>{const o=r.get(c);if(o!=null&&o.parents.length){const $=jr(o.parents);s=E.get($).y-I,s<=e&&(e=s);const l=C.get(o.branch).pos,f=s-R;E.set(o.id,{x:l,y:f})}})},"setParallelBTPos"),Ar=h(t=>{var s;const r=Q(t.parents.filter(e=>e!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(s=E.get(r))==null?void 0:s.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Yr=h(t=>Ar(t)+I,"calculateCommitPosition"),Kr=h((t,r)=>{const a=C.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const s=a.pos,e=r+R;return E.set(t.id,{x:s,y:e}),{x:s,y:e}},"setCommitPosition"),Nr=h((t,r,a)=>{const s=C.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,n=s.pos;E.set(t.id,{x:n,y:e})},"setRootPosition"),_r=h((t,r,a,s,e,n)=>{if(n===u.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%O} ${s}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%O} ${s}-inner`);else if(n===u.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`);else{const c=t.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",r.type===u.MERGE?9:10),c.attr("class",`commit ${r.id} commit${e%O}`),n===u.MERGE){const o=t.append("circle");o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",6),o.attr("class",`commit ${s} ${r.id} commit${e%O}`)}n===u.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${s} ${r.id} commit${e%O}`)}},"drawCommitBullet"),Vr=h((t,r,a,s)=>{var e;if(r.type!==u.CHERRY_PICK&&(r.customId&&r.type===u.MERGE||r.type!==u.MERGE)&&(b!=null&&b.showCommitLabel)){const n=t.append("g"),c=n.insert("rect").attr("class","commit-label-bkg"),o=n.append("text").attr("x",s).attr("y",a.y+25).attr("class","commit-label").text(r.id),$=(e=o.node())==null?void 0:e.getBBox();if($&&(c.attr("x",a.posWithOffset-$.width/2-L).attr("y",a.y+13.5).attr("width",$.width+2*L).attr("height",$.height+2*L),x==="TB"||x==="BT"?(c.attr("x",a.x-($.width+4*k+5)).attr("y",a.y-12),o.attr("x",a.x-($.width+4*k)).attr("y",a.y+$.height-12)):o.attr("x",a.posWithOffset-$.width/2),b.rotateCommitLabel))if(x==="TB"||x==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const l=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+l+", "+f+") rotate(-45, "+s+", "+a.y+")")}}},"drawCommitLabel"),Xr=h((t,r,a,s)=>{var e;if(r.tags.length>0){let n=0,c=0,o=0;const $=[];for(const l of r.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),d=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(l),y=(e=d.node())==null?void 0:e.getBBox();if(!y)throw new Error("Tag bbox not found");c=Math.max(c,y.width),o=Math.max(o,y.height),d.attr("x",a.posWithOffset-y.width/2),$.push({tag:d,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:l,hole:f,rect:g,yOffset:d}of $){const y=o/2,p=a.y-19.2-d;if(g.attr("class","tag-label-bkg").attr("points",`
2
+ ${s-c/2-k/2},${p+L}
3
+ ${s-c/2-k/2},${p-L}
4
+ ${a.posWithOffset-c/2-k},${p-y-L}
5
+ ${a.posWithOffset+c/2+k},${p-y-L}
6
+ ${a.posWithOffset+c/2+k},${p+y+L}
7
+ ${a.posWithOffset-c/2-k},${p+y+L}`),f.attr("cy",p).attr("cx",s-c/2+k/2).attr("r",1.5).attr("class","tag-hole"),x==="TB"||x==="BT"){const w=s+d;g.attr("class","tag-label-bkg").attr("points",`
8
+ ${a.x},${w+2}
9
+ ${a.x},${w-2}
10
+ ${a.x+R},${w-y-2}
11
+ ${a.x+R+c+4},${w-y-2}
12
+ ${a.x+R+c+4},${w+y+2}
13
+ ${a.x+R},${w+y+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),f.attr("cx",a.x+k/2).attr("cy",w).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),l.attr("x",a.x+5).attr("y",w+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+s+")")}}}},"drawCommitTags"),Jr=h(t=>{switch(t.customType??t.type){case u.NORMAL:return"commit-normal";case u.REVERSE:return"commit-reverse";case u.HIGHLIGHT:return"commit-highlight";case u.MERGE:return"commit-merge";case u.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Qr=h((t,r,a,s)=>{const e={x:0,y:0};if(t.parents.length>0){const n=Q(t.parents);if(n){const c=s.get(n)??e;return r==="TB"?c.y+I:r==="BT"?(s.get(t.id)??e).y-I:c.x+I}}else return r==="TB"?P:r==="BT"?(s.get(t.id)??e).y-I:0;return 0},"calculatePosition"),Zr=h((t,r,a)=>{var c,o;const s=x==="BT"&&a?r:r+R,e=x==="TB"||x==="BT"?s:(c=C.get(t.branch))==null?void 0:c.pos,n=x==="TB"||x==="BT"?(o=C.get(t.branch))==null?void 0:o.pos:s;if(n===void 0||e===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:n,y:e,posWithOffset:s}},"getCommitPosition"),K=h((t,r,a)=>{if(!b)throw new Error("GitGraph config not found");const s=t.append("g").attr("class","commit-bullets"),e=t.append("g").attr("class","commit-labels");let n=x==="TB"||x==="BT"?P:0;const c=[...r.keys()],o=(b==null?void 0:b.parallelCommits)??!1,$=h((f,g)=>{var p,w;const d=(p=r.get(f))==null?void 0:p.seq,y=(w=r.get(g))==null?void 0:w.seq;return d!==void 0&&y!==void 0?d-y:0},"sortKeys");let l=c.sort($);x==="BT"&&(o&&Dr(l,r,n),l=l.reverse()),l.forEach(f=>{var y;const g=r.get(f);if(!g)throw new Error(`Commit not found for key ${f}`);o&&(n=Qr(g,x,n,E));const d=Zr(g,n,o);if(a){const p=Jr(g),w=g.customType??g.type,q=((y=C.get(g.branch))==null?void 0:y.index)??0;_r(s,g,d,p,q,w),Vr(e,g,d,n),Xr(e,g,d,n)}x==="TB"||x==="BT"?E.set(g.id,{x:d.x,y:d.posWithOffset}):E.set(g.id,{x:d.posWithOffset,y:d.y}),n=x==="BT"&&o?n+I:n+I+R,n>M&&(M=n)})},"drawCommits"),Fr=h((t,r,a,s,e)=>{const c=(x==="TB"||x==="BT"?a.x<s.x:a.y<s.y)?r.branch:t.branch,o=h(l=>l.branch===c,"isOnBranchToGetCurve"),$=h(l=>l.seq>t.seq&&l.seq<r.seq,"isBetweenCommits");return[...e.values()].some(l=>$(l)&&o(l))},"shouldRerouteArrow"),H=h((t,r,a=0)=>{const s=t+Math.abs(t-r)/2;if(a>5)return s;if(W.every(c=>Math.abs(c-s)>=10))return W.push(s),s;const n=Math.abs(t-r);return H(t,r-n/5,a+1)},"findLane"),Ur=h((t,r,a,s)=>{var y,p,w,q,Y;const e=E.get(r.id),n=E.get(a.id);if(e===void 0||n===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${a.id}`);const c=Fr(r,a,e,n,s);let o="",$="",l=0,f=0,g=(y=C.get(a.branch))==null?void 0:y.index;a.type===u.MERGE&&r.id!==a.parents[0]&&(g=(p=C.get(r.branch))==null?void 0:p.index);let d;if(c){o="A 10 10, 0, 0, 0,",$="A 10 10, 0, 0, 1,",l=10,f=10;const T=e.y<n.y?H(e.y,n.y):H(n.y,e.y),v=e.x<n.x?H(e.x,n.x):H(n.x,e.x);x==="TB"?e.x<n.x?d=`M ${e.x} ${e.y} L ${v-l} ${e.y} ${$} ${v} ${e.y+f} L ${v} ${n.y-l} ${o} ${v+f} ${n.y} L ${n.x} ${n.y}`:(g=(w=C.get(r.branch))==null?void 0:w.index,d=`M ${e.x} ${e.y} L ${v+l} ${e.y} ${o} ${v} ${e.y+f} L ${v} ${n.y-l} ${$} ${v-f} ${n.y} L ${n.x} ${n.y}`):x==="BT"?e.x<n.x?d=`M ${e.x} ${e.y} L ${v-l} ${e.y} ${o} ${v} ${e.y-f} L ${v} ${n.y+l} ${$} ${v+f} ${n.y} L ${n.x} ${n.y}`:(g=(q=C.get(r.branch))==null?void 0:q.index,d=`M ${e.x} ${e.y} L ${v+l} ${e.y} ${$} ${v} ${e.y-f} L ${v} ${n.y+l} ${o} ${v-f} ${n.y} L ${n.x} ${n.y}`):e.y<n.y?d=`M ${e.x} ${e.y} L ${e.x} ${T-l} ${o} ${e.x+f} ${T} L ${n.x-l} ${T} ${$} ${n.x} ${T+f} L ${n.x} ${n.y}`:(g=(Y=C.get(r.branch))==null?void 0:Y.index,d=`M ${e.x} ${e.y} L ${e.x} ${T+l} ${$} ${e.x+f} ${T} L ${n.x-l} ${T} ${o} ${n.x} ${T-f} L ${n.x} ${n.y}`)}else o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,x==="TB"?(e.x<n.x&&(a.type===u.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y-l} ${o} ${e.x+f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${$} ${n.x} ${e.y+f} L ${n.x} ${n.y}`),e.x>n.x&&(o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===u.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y-l} ${$} ${e.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x+l} ${e.y} ${o} ${n.x} ${e.y+f} L ${n.x} ${n.y}`),e.x===n.x&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`)):x==="BT"?(e.x<n.x&&(a.type===u.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${$} ${e.x+f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`),e.x>n.x&&(o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===u.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${o} ${e.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`),e.x===n.x&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`)):(e.y<n.y&&(a.type===u.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${$} ${n.x} ${e.y+f} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${e.x} ${n.y-l} ${o} ${e.x+f} ${n.y} L ${n.x} ${n.y}`),e.y>n.y&&(a.type===u.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${$} ${e.x+f} ${n.y} L ${n.x} ${n.y}`),e.y===n.y&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+g%O)},"drawArrow"),re=h((t,r)=>{const a=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(s=>{const e=r.get(s);e.parents&&e.parents.length>0&&e.parents.forEach(n=>{Ur(a,r.get(n),e,r)})})},"drawArrows"),ee=h((t,r)=>{const a=t.append("g");r.forEach((s,e)=>{var p;const n=e%O,c=(p=C.get(s.name))==null?void 0:p.pos;if(c===void 0)throw new Error(`Position not found for branch ${s.name}`);const o=a.append("line");o.attr("x1",0),o.attr("y1",c),o.attr("x2",M),o.attr("y2",c),o.attr("class","branch branch"+n),x==="TB"?(o.attr("y1",P),o.attr("x1",c),o.attr("y2",M),o.attr("x2",c)):x==="BT"&&(o.attr("y1",M),o.attr("x1",c),o.attr("y2",P),o.attr("x2",c)),W.push(c);const $=s.name,l=J($),f=a.insert("rect"),d=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);d.node().appendChild(l);const y=l.getBBox();f.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-y.width-4-((b==null?void 0:b.rotateCommitLabel)===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),d.attr("transform","translate("+(-y.width-14-((b==null?void 0:b.rotateCommitLabel)===!0?30:0))+", "+(c-y.height/2-1)+")"),x==="TB"?(f.attr("x",c-y.width/2-10).attr("y",0),d.attr("transform","translate("+(c-y.width/2-5)+", 0)")):x==="BT"?(f.attr("x",c-y.width/2-10).attr("y",M),d.attr("transform","translate("+(c-y.width/2-5)+", "+M+")")):f.attr("transform","translate(-19, "+(c-y.height/2)+")")})},"drawBranches"),te=h(function(t,r,a,s,e){return C.set(t,{pos:r,index:a}),r+=50+(e?40:0)+(x==="TB"||x==="BT"?s.width/2:0),r},"setBranchPosition"),ae=h(function(t,r,a,s){if(Sr(),m.debug("in gitgraph renderer",t+`
14
+ `,"id:",r,a),!b)throw new Error("GitGraph config not found");const e=b.rotateCommitLabel??!1,n=s.db;G=n.getCommits();const c=n.getBranchesAsObjArray();x=n.getDirection();const o=or(`[id="${r}"]`);let $=0;c.forEach((l,f)=>{var q;const g=J(l.name),d=o.append("g"),y=d.insert("g").attr("class","branchLabel"),p=y.insert("g").attr("class","label branch-label");(q=p.node())==null||q.appendChild(g);const w=g.getBBox();$=te(l.name,$,f,w,e),p.remove(),y.remove(),d.remove()}),K(o,G,!1),b.showBranches&&ee(o,c),re(o,G),K(o,G,!0),cr.insertTitle(o,"gitTitleText",b.titleTopMargin??0,n.getDiagramTitle()),ir(void 0,o,b.diagramPadding,b.useMaxWidth)},"draw"),ne={draw:ae},se=h(t=>`
15
+ .commit-id,
16
+ .commit-msg,
17
+ .branch-label {
18
+ fill: lightgrey;
19
+ color: lightgrey;
20
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
21
+ font-family: var(--mermaid-font-family);
22
+ }
23
+ ${[0,1,2,3,4,5,6,7].map(r=>`
24
+ .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; }
25
+ .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }
26
+ .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }
27
+ .label${r} { fill: ${t["git"+r]}; }
28
+ .arrow${r} { stroke: ${t["git"+r]}; }
29
+ `).join(`
30
+ `)}
31
+
32
+ .branch {
33
+ stroke-width: 1;
34
+ stroke: ${t.lineColor};
35
+ stroke-dasharray: 2;
36
+ }
37
+ .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
38
+ .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
39
+ .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
40
+ .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
41
+ .tag-hole { fill: ${t.textColor}; }
42
+
43
+ .commit-merge {
44
+ stroke: ${t.primaryColor};
45
+ fill: ${t.primaryColor};
46
+ }
47
+ .commit-reverse {
48
+ stroke: ${t.primaryColor};
49
+ fill: ${t.primaryColor};
50
+ stroke-width: 3;
51
+ }
52
+ .commit-highlight-outer {
53
+ }
54
+ .commit-highlight-inner {
55
+ stroke: ${t.primaryColor};
56
+ fill: ${t.primaryColor};
57
+ }
58
+
59
+ .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
60
+ .gitTitleText {
61
+ text-anchor: middle;
62
+ font-size: 18px;
63
+ fill: ${t.textColor};
64
+ }
65
+ `,"getStyles"),oe=se,ge={parser:Wr,db:X,renderer:ne,styles:oe};export{ge as diagram};
@@ -0,0 +1 @@
1
+ import{aA as N,aB as j,aC as f,aD as b,aE as E}from"./index-CaWmtxvi.js";import{a as v,c as P,k as _,f as g,d,i as l,v as p,r as D}from"./_baseUniq-DaFrQBY_.js";var w=N(function(o){return v(P(o,1,j,!0))}),F="\0",a="\0",O="";class L{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=f(void 0),this._defaultEdgeLabelFn=f(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return b(e)||(e=f(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var e=this;return g(this.nodes(),function(t){return E(e._in[t])})}sinks(){var e=this;return g(this.nodes(),function(t){return E(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return d(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),d(_(this._in[e]),t),delete this._in[e],delete this._preds[e],d(_(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(t))t=a;else{t+="";for(var s=t;!l(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(l(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return _(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return _(t)}successors(e){var t=this._sucs[e];if(t)return _(t)}neighbors(e){var t=this.predecessors(e);if(t)return w(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),d(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&d(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return b(e)||(e=f(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return D(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,l(s)||(s=""+s);var h=c(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var u=M(this._isDirected,e,t,s);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[h]=u,C(this._preds[t],e),C(this._sucs[e],t),this._in[t][h]=u,this._out[e][h]=u,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],y(this._preds[t],e),y(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?g(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?g(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function C(o,e){o[e]?o[e]++:o[e]=1}function y(o,e){--o[e]||delete o[e]}function c(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}return i+O+r+O+(l(s)?F:s)}function M(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function m(o,e){return c(o,e.v,e.w,e.name)}export{L as G};