@bigduu/lotus 2026.3.9 → 2026.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/assets/App-GrNzEwSI.js +998 -0
- package/dist/assets/_basePickBy-B3HOvLI5.js +1 -0
- package/dist/assets/_baseUniq-C6qPwTXi.js +1 -0
- package/dist/assets/arc-DWuxk_J0.js +1 -0
- package/dist/assets/architectureDiagram-VXUJARFQ-CsrWnIJm.js +36 -0
- package/dist/assets/blockDiagram-VD42YOAC-eXYml-zi.js +122 -0
- package/dist/assets/c4Diagram-YG6GDRKO-B4UNhbcN.js +10 -0
- package/dist/assets/channel-D3Y5aOrr.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-BHI8UK28.js +1 -0
- package/dist/assets/chunk-55IACEB6-DS7V1fBl.js +1 -0
- package/dist/assets/chunk-B4BG7PRW-jtKBpnBZ.js +165 -0
- package/dist/assets/chunk-DI55MBZ5-la2oPn7S.js +220 -0
- package/dist/assets/chunk-FMBD7UC4-BWmMT5qY.js +15 -0
- package/dist/assets/chunk-QN33PNHL-BEJslXWO.js +1 -0
- package/dist/assets/chunk-QZHKN3VN-Bq498BI9.js +1 -0
- package/dist/assets/chunk-TZMSLE5B-Bc3F2cCo.js +1 -0
- package/dist/assets/classDiagram-2ON5EDUG-bLgDAyR2.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-bLgDAyR2.js +1 -0
- package/dist/assets/clone-DB5FFFZ8.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-5vEWR_Nv.js +1 -0
- package/dist/assets/cytoscape.esm-BY7v1xhs.js +331 -0
- package/dist/assets/dagre-6UL2VRFP-Co8a7B_w.js +4 -0
- package/dist/assets/diagram-PSM6KHXK-zsFKq0TC.js +24 -0
- package/dist/assets/diagram-QEK2KX5R-BS_1M6YY.js +43 -0
- package/dist/assets/diagram-S2PKOQOG-BGb4KDa2.js +24 -0
- package/dist/assets/erDiagram-Q2GNP2WA-BtLuPmLS.js +60 -0
- package/dist/assets/flowDiagram-NV44I4VS-DSVoTAvC.js +162 -0
- package/dist/assets/ganttDiagram-JELNMOA3-Bm4qhIgP.js +267 -0
- package/dist/assets/gitGraphDiagram-V2S2FVAM-JnO8qapO.js +65 -0
- package/dist/assets/graph-Ci_4DYzD.js +1 -0
- package/dist/assets/html2canvas.esm-CBrSDip1.js +22 -0
- package/dist/assets/index-3HRFQqPK.js +36 -0
- package/dist/assets/index-DIwjGrG2.js +1 -0
- package/dist/assets/index-Drp1Nta9.js +1 -0
- package/dist/assets/index-I1zrzkA6.js +1 -0
- package/dist/assets/index-WmMCq2d5.js +1 -0
- package/dist/assets/index-uQXOtSjQ.js +4 -0
- package/dist/assets/{index.es-ksd75ldm.js → index.es-DcXXvK9U.js} +2 -2
- package/dist/assets/infoDiagram-HS3SLOUP-C5I1bwn3.js +2 -0
- package/dist/assets/journeyDiagram-XKPGCS4Q-DO8cGOfm.js +139 -0
- package/dist/assets/jspdf.es.min-D_aHufzU.js +169 -0
- package/dist/assets/kanban-definition-3W4ZIXB7-DULrT064.js +89 -0
- package/dist/assets/layout-Dcb7s2K1.js +1 -0
- package/dist/assets/main-obJgfVN6.js +41 -0
- package/dist/assets/mindmap-definition-VGOIOE7T-CmtAMYDz.js +68 -0
- package/dist/assets/pieDiagram-ADFJNKIX-BNSLnR75.js +30 -0
- package/dist/assets/quadrantDiagram-AYHSOK5B-C84FGDBO.js +7 -0
- package/dist/assets/requirementDiagram-UZGBJVZJ-DG1E7PkJ.js +64 -0
- package/dist/assets/sankeyDiagram-TZEHDZUN-DGN-BmB1.js +10 -0
- package/dist/assets/sequenceDiagram-WL72ISMW-DVO0qsq0.js +145 -0
- package/dist/assets/stateDiagram-FKZM4ZOC-D0fHRsRn.js +1 -0
- package/dist/assets/stateDiagram-v2-4FDKWEC3-D3KC9QQc.js +1 -0
- package/dist/assets/timeline-definition-IT6M3QCI-CaQLEtEh.js +61 -0
- package/dist/assets/treemap-GDKQZRPO-B0RpuOqZ.js +160 -0
- package/dist/assets/xychartDiagram-PRI3JC2R-DXA11h7K.js +7 -0
- package/dist/index.html +82 -8
- package/package.json +1 -1
- package/dist/assets/index-BVq3nR2i.js +0 -5
- package/dist/assets/index-Duac2kP8.js +0 -1
- package/dist/assets/index-NorSG5v2.js +0 -1
- package/dist/assets/index-tyDAO-Rv.js +0 -1
- package/dist/assets/index-xDR7WD86.js +0 -1
- package/dist/assets/index-xYaVUSFx.js +0 -1
- package/dist/assets/main-D-vCV98n.js +0 -282
- package/dist/assets/vendor-chart-hXvGMOW0.js +0 -2558
- package/dist/assets/vendor-pdf-6UhwjNJe.js +0 -190
- package/dist/assets/vendor-react-BK4ieJpD.js +0 -108
- package/dist/assets/vendor-ui-BecvStzI.js +0 -414
- /package/dist/assets/{main-CiAWoLS2.css → App-CiAWoLS2.css} +0 -0
- /package/dist/assets/{vendor-ui-B6snAd4S.css → main-B6snAd4S.css} +0 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import{bg as he,bh as Ye,bi as me,bj as ke,bk as ye,bl as It,bm as Oe,g as Ne,c as Ve,y as Pe,x as ze,d as Re,e as Be,_ as c,f as at,h as yt,bn as He,bo as qe,bp as je,i as Xe,W as Ge,bq as z,l as nt,br as te,bs as ee,bt as Ue,bu as Ke,bv as Ze,bw as Je,bx as Qe,by as ti,bz as ei,bA as ie,bB as ne,bC as se,bD as re,bE as ae,o as ii,n as ni,D as si,v as ri,bF as ai,bG as oi}from"./App-GrNzEwSI.js";import{g as ge}from"./main-obJgfVN6.js";const ci=Math.PI/180,li=180/Math.PI,wt=18,pe=.96422,ve=1,be=.82521,Te=4/29,ot=6/29,xe=3*ot*ot,ui=ot*ot*ot;function we(t){if(t instanceof Z)return new Z(t.l,t.a,t.b,t.opacity);if(t instanceof et)return _e(t);t instanceof he||(t=Ye(t));var e=$t(t.r),n=$t(t.g),s=$t(t.b),a=Mt((.2225045*e+.7168786*n+.0606169*s)/ve),d,k;return e===n&&n===s?d=k=a:(d=Mt((.4360747*e+.3850649*n+.1430804*s)/pe),k=Mt((.0139322*e+.0971045*n+.7141733*s)/be)),new Z(116*a-16,500*(d-a),200*(a-k),t.opacity)}function di(t,e,n,s){return arguments.length===1?we(t):new Z(t,e,n,s??1)}function Z(t,e,n,s){this.l=+t,this.a=+e,this.b=+n,this.opacity=+s}me(Z,di,ke(ye,{brighter(t){return new Z(this.l+wt*(t??1),this.a,this.b,this.opacity)},darker(t){return new Z(this.l-wt*(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=pe*At(e),t=ve*At(t),n=be*At(n),new he(Ft(3.1338561*e-1.6168667*t-.4906146*n),Ft(-.9787684*e+1.9161415*t+.033454*n),Ft(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Mt(t){return t>ui?Math.pow(t,1/3):t/xe+Te}function At(t){return t>ot?t*t*t:xe*(t-Te)}function Ft(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function $t(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function fi(t){if(t instanceof et)return new et(t.h,t.c,t.l,t.opacity);if(t instanceof Z||(t=we(t)),t.a===0&&t.b===0)return new et(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*li;return new et(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Yt(t,e,n,s){return arguments.length===1?fi(t):new et(t,e,n,s??1)}function et(t,e,n,s){this.h=+t,this.c=+e,this.l=+n,this.opacity=+s}function _e(t){if(isNaN(t.h))return new Z(t.l,0,0,t.opacity);var e=t.h*ci;return new Z(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}me(et,Yt,ke(ye,{brighter(t){return new et(this.h,this.c,this.l+wt*(t??1),this.opacity)},darker(t){return new et(this.h,this.c,this.l-wt*(t??1),this.opacity)},rgb(){return _e(this).rgb()}}));function hi(t){return function(e,n){var s=t((e=Yt(e)).h,(n=Yt(n)).h),a=It(e.c,n.c),d=It(e.l,n.l),k=It(e.opacity,n.opacity);return function(D){return e.h=s(D),e.c=a(D),e.l=d(D),e.opacity=k(D),e+""}}}const mi=hi(Oe);function ki(t){return t}var pt=1,Lt=2,Ot=3,gt=4,oe=1e-6;function yi(t){return"translate("+t+",0)"}function gi(t){return"translate(0,"+t+")"}function pi(t){return e=>+t(e)}function vi(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function bi(){return!this.__axis}function De(t,e){var n=[],s=null,a=null,d=6,k=6,D=3,$=typeof window<"u"&&window.devicePixelRatio>1?0:.5,M=t===pt||t===gt?-1:1,S=t===gt||t===Lt?"x":"y",W=t===pt||t===Ot?yi:gi;function _(T){var O=s??(e.ticks?e.ticks.apply(e,n):e.domain()),C=a??(e.tickFormat?e.tickFormat.apply(e,n):ki),U=Math.max(d,0)+D,V=e.range(),X=+V[0]+$,P=+V[V.length-1]+$,B=(e.bandwidth?vi:pi)(e.copy(),$),H=T.selection?T.selection():T,I=H.selectAll(".domain").data([null]),p=H.selectAll(".tick").data(O,e).order(),f=p.exit(),u=p.enter().append("g").attr("class","tick"),v=p.select("line"),b=p.select("text");I=I.merge(I.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),p=p.merge(u),v=v.merge(u.append("line").attr("stroke","currentColor").attr(S+"2",M*d)),b=b.merge(u.append("text").attr("fill","currentColor").attr(S,M*U).attr("dy",t===pt?"0em":t===Ot?"0.71em":"0.32em")),T!==H&&(I=I.transition(T),p=p.transition(T),v=v.transition(T),b=b.transition(T),f=f.transition(T).attr("opacity",oe).attr("transform",function(g){return isFinite(g=B(g))?W(g+$):this.getAttribute("transform")}),u.attr("opacity",oe).attr("transform",function(g){var m=this.parentNode.__axis;return W((m&&isFinite(m=m(g))?m:B(g))+$)})),f.remove(),I.attr("d",t===gt||t===Lt?k?"M"+M*k+","+X+"H"+$+"V"+P+"H"+M*k:"M"+$+","+X+"V"+P:k?"M"+X+","+M*k+"V"+$+"H"+P+"V"+M*k:"M"+X+","+$+"H"+P),p.attr("opacity",1).attr("transform",function(g){return W(B(g)+$)}),v.attr(S+"2",M*d),b.attr(S,M*U).text(C),H.filter(bi).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Lt?"start":t===gt?"end":"middle"),H.each(function(){this.__axis=B})}return _.scale=function(T){return arguments.length?(e=T,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(T){return arguments.length?(n=T==null?[]:Array.from(T),_):n.slice()},_.tickValues=function(T){return arguments.length?(s=T==null?null:Array.from(T),_):s&&s.slice()},_.tickFormat=function(T){return arguments.length?(a=T,_):a},_.tickSize=function(T){return arguments.length?(d=k=+T,_):d},_.tickSizeInner=function(T){return arguments.length?(d=+T,_):d},_.tickSizeOuter=function(T){return arguments.length?(k=+T,_):k},_.tickPadding=function(T){return arguments.length?(D=+T,_):D},_.offset=function(T){return arguments.length?($=+T,_):$},_}function Ti(t){return De(pt,t)}function xi(t){return De(Ot,t)}var vt={exports:{}},wi=vt.exports,ce;function _i(){return ce||(ce=1,function(t,e){(function(n,s){t.exports=s()})(wi,function(){var n="day";return function(s,a,d){var k=function(M){return M.add(4-M.isoWeekday(),n)},D=a.prototype;D.isoWeekYear=function(){return k(this).year()},D.isoWeek=function(M){if(!this.$utils().u(M))return this.add(7*(M-this.isoWeek()),n);var S,W,_,T,O=k(this),C=(S=this.isoWeekYear(),W=this.$u,_=(W?d.utc:d)().year(S).startOf("year"),T=4-_.isoWeekday(),_.isoWeekday()>4&&(T+=7),_.add(T,n));return O.diff(C,"week")+1},D.isoWeekday=function(M){return this.$utils().u(M)?this.day()||7:this.day(this.day()%7?M:M-7)};var $=D.startOf;D.startOf=function(M,S){var W=this.$utils(),_=!!W.u(S)||S;return W.p(M)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):$.bind(this)(M,S)}}})}(vt)),vt.exports}var Di=_i();const Si=ge(Di);var bt={exports:{}},Ci=bt.exports,le;function Ei(){return le||(le=1,function(t,e){(function(n,s){t.exports=s()})(Ci,function(){var n,s,a=1e3,d=6e4,k=36e5,D=864e5,$=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M=31536e6,S=2628e6,W=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,_={years:M,months:S,days:D,hours:k,minutes:d,seconds:a,milliseconds:1,weeks:6048e5},T=function(I){return I instanceof B},O=function(I,p,f){return new B(I,f,p.$l)},C=function(I){return s.p(I)+"s"},U=function(I){return I<0},V=function(I){return U(I)?Math.ceil(I):Math.floor(I)},X=function(I){return Math.abs(I)},P=function(I,p){return I?U(I)?{negative:!0,format:""+X(I)+p}:{negative:!1,format:""+I+p}:{negative:!1,format:""}},B=function(){function I(f,u,v){var b=this;if(this.$d={},this.$l=v,f===void 0&&(this.$ms=0,this.parseFromMilliseconds()),u)return O(f*_[C(u)],this);if(typeof f=="number")return this.$ms=f,this.parseFromMilliseconds(),this;if(typeof f=="object")return Object.keys(f).forEach(function(o){b.$d[C(o)]=f[o]}),this.calMilliseconds(),this;if(typeof f=="string"){var g=f.match(W);if(g){var m=g.slice(2).map(function(o){return o!=null?Number(o):0});return this.$d.years=m[0],this.$d.months=m[1],this.$d.weeks=m[2],this.$d.days=m[3],this.$d.hours=m[4],this.$d.minutes=m[5],this.$d.seconds=m[6],this.calMilliseconds(),this}}return this}var p=I.prototype;return p.calMilliseconds=function(){var f=this;this.$ms=Object.keys(this.$d).reduce(function(u,v){return u+(f.$d[v]||0)*_[v]},0)},p.parseFromMilliseconds=function(){var f=this.$ms;this.$d.years=V(f/M),f%=M,this.$d.months=V(f/S),f%=S,this.$d.days=V(f/D),f%=D,this.$d.hours=V(f/k),f%=k,this.$d.minutes=V(f/d),f%=d,this.$d.seconds=V(f/a),f%=a,this.$d.milliseconds=f},p.toISOString=function(){var f=P(this.$d.years,"Y"),u=P(this.$d.months,"M"),v=+this.$d.days||0;this.$d.weeks&&(v+=7*this.$d.weeks);var b=P(v,"D"),g=P(this.$d.hours,"H"),m=P(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var l=P(o,"S"),y=f.negative||u.negative||b.negative||g.negative||m.negative||l.negative,h=g.format||m.format||l.format?"T":"",x=(y?"-":"")+"P"+f.format+u.format+b.format+h+g.format+m.format+l.format;return x==="P"||x==="-P"?"P0D":x},p.toJSON=function(){return this.toISOString()},p.format=function(f){var u=f||"YYYY-MM-DDTHH:mm:ss",v={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return u.replace($,function(b,g){return g||String(v[b])})},p.as=function(f){return this.$ms/_[C(f)]},p.get=function(f){var u=this.$ms,v=C(f);return v==="milliseconds"?u%=1e3:u=v==="weeks"?V(u/_[v]):this.$d[v],u||0},p.add=function(f,u,v){var b;return b=u?f*_[C(u)]:T(f)?f.$ms:O(f,this).$ms,O(this.$ms+b*(v?-1:1),this)},p.subtract=function(f,u){return this.add(f,u,!0)},p.locale=function(f){var u=this.clone();return u.$l=f,u},p.clone=function(){return O(this.$ms,this)},p.humanize=function(f){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!f)},p.valueOf=function(){return this.asMilliseconds()},p.milliseconds=function(){return this.get("milliseconds")},p.asMilliseconds=function(){return this.as("milliseconds")},p.seconds=function(){return this.get("seconds")},p.asSeconds=function(){return this.as("seconds")},p.minutes=function(){return this.get("minutes")},p.asMinutes=function(){return this.as("minutes")},p.hours=function(){return this.get("hours")},p.asHours=function(){return this.as("hours")},p.days=function(){return this.get("days")},p.asDays=function(){return this.as("days")},p.weeks=function(){return this.get("weeks")},p.asWeeks=function(){return this.as("weeks")},p.months=function(){return this.get("months")},p.asMonths=function(){return this.as("months")},p.years=function(){return this.get("years")},p.asYears=function(){return this.as("years")},I}(),H=function(I,p,f){return I.add(p.years()*f,"y").add(p.months()*f,"M").add(p.days()*f,"d").add(p.hours()*f,"h").add(p.minutes()*f,"m").add(p.seconds()*f,"s").add(p.milliseconds()*f,"ms")};return function(I,p,f){n=f,s=f().$utils(),f.duration=function(b,g){var m=f.locale();return O(b,{$l:m},g)},f.isDuration=T;var u=p.prototype.add,v=p.prototype.subtract;p.prototype.add=function(b,g){return T(b)?H(this,b,1):u.bind(this)(b,g)},p.prototype.subtract=function(b,g){return T(b)?H(this,b,-1):v.bind(this)(b,g)}}})}(bt)),bt.exports}var Ii=Ei();const Mi=ge(Ii);var Nt=function(){var t=c(function(m,o,l,y){for(l=l||{},y=m.length;y--;l[m[y]]=o);return l},"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],s=[1,27],a=[1,28],d=[1,29],k=[1,30],D=[1,31],$=[1,32],M=[1,33],S=[1,34],W=[1,9],_=[1,10],T=[1,11],O=[1,12],C=[1,13],U=[1,14],V=[1,15],X=[1,16],P=[1,19],B=[1,20],H=[1,21],I=[1,22],p=[1,23],f=[1,25],u=[1,35],v={trace:c(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:c(function(o,l,y,h,x,r,Y){var i=r.length-1;switch(x){case 1:return r[i-1];case 2:this.$=[];break;case 3:r[i-1].push(r[i]),this.$=r[i-1];break;case 4:case 5:this.$=r[i];break;case 6:case 7:this.$=[];break;case 8:h.setWeekday("monday");break;case 9:h.setWeekday("tuesday");break;case 10:h.setWeekday("wednesday");break;case 11:h.setWeekday("thursday");break;case 12:h.setWeekday("friday");break;case 13:h.setWeekday("saturday");break;case 14:h.setWeekday("sunday");break;case 15:h.setWeekend("friday");break;case 16:h.setWeekend("saturday");break;case 17:h.setDateFormat(r[i].substr(11)),this.$=r[i].substr(11);break;case 18:h.enableInclusiveEndDates(),this.$=r[i].substr(18);break;case 19:h.TopAxis(),this.$=r[i].substr(8);break;case 20:h.setAxisFormat(r[i].substr(11)),this.$=r[i].substr(11);break;case 21:h.setTickInterval(r[i].substr(13)),this.$=r[i].substr(13);break;case 22:h.setExcludes(r[i].substr(9)),this.$=r[i].substr(9);break;case 23:h.setIncludes(r[i].substr(9)),this.$=r[i].substr(9);break;case 24:h.setTodayMarker(r[i].substr(12)),this.$=r[i].substr(12);break;case 27:h.setDiagramTitle(r[i].substr(6)),this.$=r[i].substr(6);break;case 28:this.$=r[i].trim(),h.setAccTitle(this.$);break;case 29:case 30:this.$=r[i].trim(),h.setAccDescription(this.$);break;case 31:h.addSection(r[i].substr(8)),this.$=r[i].substr(8);break;case 33:h.addTask(r[i-1],r[i]),this.$="task";break;case 34:this.$=r[i-1],h.setClickEvent(r[i-1],r[i],null);break;case 35:this.$=r[i-2],h.setClickEvent(r[i-2],r[i-1],r[i]);break;case 36:this.$=r[i-2],h.setClickEvent(r[i-2],r[i-1],null),h.setLink(r[i-2],r[i]);break;case 37:this.$=r[i-3],h.setClickEvent(r[i-3],r[i-2],r[i-1]),h.setLink(r[i-3],r[i]);break;case 38:this.$=r[i-2],h.setClickEvent(r[i-2],r[i],null),h.setLink(r[i-2],r[i-1]);break;case 39:this.$=r[i-3],h.setClickEvent(r[i-3],r[i-1],r[i]),h.setLink(r[i-3],r[i-2]);break;case 40:this.$=r[i-1],h.setLink(r[i-1],r[i]);break;case 41:case 47:this.$=r[i-1]+" "+r[i];break;case 42:case 43:case 45:this.$=r[i-2]+" "+r[i-1]+" "+r[i];break;case 44:case 46:this.$=r[i-3]+" "+r[i-2]+" "+r[i-1]+" "+r[i];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:s,14:a,15:d,16:k,17:D,18:$,19:18,20:M,21:S,22:W,23:_,24:T,25:O,26:C,27:U,28:V,29:X,30:P,31:B,33:H,35:I,36:p,37:24,38:f,40:u},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:s,14:a,15:d,16:k,17:D,18:$,19:18,20:M,21:S,22:W,23:_,24:T,25:O,26:C,27:U,28:V,29:X,30:P,31:B,33:H,35:I,36:p,37:24,38:f,40:u},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:c(function(o,l){if(l.recoverable)this.trace(o);else{var y=new Error(o);throw y.hash=l,y}},"parseError"),parse:c(function(o){var l=this,y=[0],h=[],x=[null],r=[],Y=this.table,i="",w=0,L=0,F=2,A=1,R=r.slice.call(arguments,1),E=Object.create(this.lexer),J={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(J.yy[ut]=this.yy[ut]);E.setInput(o,J.yy),J.yy.lexer=E,J.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var St=E.yylloc;r.push(St);var Le=E.options&&E.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function We(j){y.length=y.length-2*j,x.length=x.length-j,r.length=r.length-j}c(We,"popStack");function Jt(){var j;return j=h.pop()||E.lex()||A,typeof j!="number"&&(j instanceof Array&&(h=j,j=h.pop()),j=l.symbols_[j]||j),j}c(Jt,"lex");for(var q,it,G,Ct,rt={},mt,Q,Qt,kt;;){if(it=y[y.length-1],this.defaultActions[it]?G=this.defaultActions[it]:((q===null||typeof q>"u")&&(q=Jt()),G=Y[it]&&Y[it][q]),typeof G>"u"||!G.length||!G[0]){var Et="";kt=[];for(mt in Y[it])this.terminals_[mt]&&mt>F&&kt.push("'"+this.terminals_[mt]+"'");E.showPosition?Et="Parse error on line "+(w+1)+`:
|
|
2
|
+
`+E.showPosition()+`
|
|
3
|
+
Expecting `+kt.join(", ")+", got '"+(this.terminals_[q]||q)+"'":Et="Parse error on line "+(w+1)+": Unexpected "+(q==A?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(Et,{text:E.match,token:this.terminals_[q]||q,line:E.yylineno,loc:St,expected:kt})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+it+", token: "+q);switch(G[0]){case 1:y.push(q),x.push(E.yytext),r.push(E.yylloc),y.push(G[1]),q=null,L=E.yyleng,i=E.yytext,w=E.yylineno,St=E.yylloc;break;case 2:if(Q=this.productions_[G[1]][1],rt.$=x[x.length-Q],rt._$={first_line:r[r.length-(Q||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(Q||1)].first_column,last_column:r[r.length-1].last_column},Le&&(rt._$.range=[r[r.length-(Q||1)].range[0],r[r.length-1].range[1]]),Ct=this.performAction.apply(rt,[i,L,w,J.yy,G[1],x,r].concat(R)),typeof Ct<"u")return Ct;Q&&(y=y.slice(0,-1*Q*2),x=x.slice(0,-1*Q),r=r.slice(0,-1*Q)),y.push(this.productions_[G[1]][0]),x.push(rt.$),r.push(rt._$),Qt=Y[y[y.length-2]][y[y.length-1]],y.push(Qt);break;case 3:return!0}}return!0},"parse")},b=function(){var m={EOF:1,parseError:c(function(l,y){if(this.yy.parser)this.yy.parser.parseError(l,y);else throw new Error(l)},"parseError"),setInput:c(function(o,l){return this.yy=l||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:c(function(o){var l=o.length,y=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var h=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),y.length-1&&(this.yylineno-=y.length-1);var x=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:y?(y.length===h.length?this.yylloc.first_column:0)+h[h.length-y.length].length-y[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(o){this.unput(this.match.slice(o))},"less"),pastInput:c(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
5
|
+
`+l+"^"},"showPosition"),test_match:c(function(o,l){var y,h,x;if(this.options.backtrack_lexer&&(x={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&&(x.yylloc.range=this.yylloc.range.slice(0))),h=o[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],y=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var r in x)this[r]=x[r];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,l,y,h;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),r=0;r<x.length;r++)if(y=this._input.match(this.rules[x[r]]),y&&(!l||y[0].length>l[0].length)){if(l=y,h=r,this.options.backtrack_lexer){if(o=this.test_match(y,x[r]),o!==!1)return o;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(o=this.test_match(l,x[h]),o!==!1?o:!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:c(function(){var l=this.next();return l||this.lex()},"lex"),begin:c(function(l){this.conditionStack.push(l)},"begin"),popState:c(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:c(function(l){this.begin(l)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(l,y,h,x){switch(h){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 m}();v.lexer=b;function g(){this.yy={}}return c(g,"Parser"),g.prototype=v,v.Parser=g,new g}();Nt.parser=Nt;var Ai=Nt;z.extend(Si);z.extend(ai);z.extend(oi);var ue={friday:5,saturday:6},K="",Rt="",Bt=void 0,Ht="",dt=[],ft=[],qt=new Map,jt=[],_t=[],lt="",Xt="",Se=["active","done","crit","milestone","vert"],Gt=[],ht=!1,Ut=!1,Kt="sunday",Dt="saturday",Vt=0,Fi=c(function(){jt=[],_t=[],lt="",Gt=[],Tt=0,zt=void 0,xt=void 0,N=[],K="",Rt="",Xt="",Bt=void 0,Ht="",dt=[],ft=[],ht=!1,Ut=!1,Vt=0,qt=new Map,si(),Kt="sunday",Dt="saturday"},"clear"),$i=c(function(t){Rt=t},"setAxisFormat"),Li=c(function(){return Rt},"getAxisFormat"),Wi=c(function(t){Bt=t},"setTickInterval"),Yi=c(function(){return Bt},"getTickInterval"),Oi=c(function(t){Ht=t},"setTodayMarker"),Ni=c(function(){return Ht},"getTodayMarker"),Vi=c(function(t){K=t},"setDateFormat"),Pi=c(function(){ht=!0},"enableInclusiveEndDates"),zi=c(function(){return ht},"endDatesAreInclusive"),Ri=c(function(){Ut=!0},"enableTopAxis"),Bi=c(function(){return Ut},"topAxisEnabled"),Hi=c(function(t){Xt=t},"setDisplayMode"),qi=c(function(){return Xt},"getDisplayMode"),ji=c(function(){return K},"getDateFormat"),Xi=c(function(t){dt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),Gi=c(function(){return dt},"getIncludes"),Ui=c(function(t){ft=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),Ki=c(function(){return ft},"getExcludes"),Zi=c(function(){return qt},"getLinks"),Ji=c(function(t){lt=t,jt.push(t)},"addSection"),Qi=c(function(){return jt},"getSections"),tn=c(function(){let t=de();const e=10;let n=0;for(;!t&&n<e;)t=de(),n++;return _t=N,_t},"getTasks"),Ce=c(function(t,e,n,s){const a=t.format(e.trim()),d=t.format("YYYY-MM-DD");return s.includes(a)||s.includes(d)?!1:n.includes("weekends")&&(t.isoWeekday()===ue[Dt]||t.isoWeekday()===ue[Dt]+1)||n.includes(t.format("dddd").toLowerCase())?!0:n.includes(a)||n.includes(d)},"isInvalidDate"),en=c(function(t){Kt=t},"setWeekday"),nn=c(function(){return Kt},"getWeekday"),sn=c(function(t){Dt=t},"setWeekend"),Ee=c(function(t,e,n,s){if(!n.length||t.manualEndTime)return;let a;t.startTime instanceof Date?a=z(t.startTime):a=z(t.startTime,e,!0),a=a.add(1,"d");let d;t.endTime instanceof Date?d=z(t.endTime):d=z(t.endTime,e,!0);const[k,D]=rn(a,d,e,n,s);t.endTime=k.toDate(),t.renderEndTime=D},"checkTaskDates"),rn=c(function(t,e,n,s,a){let d=!1,k=null;for(;t<=e;)d||(k=e.toDate()),d=Ce(t,n,s,a),d&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,k]},"fixTaskDates"),Pt=c(function(t,e,n){if(n=n.trim(),c(D=>{const $=D.trim();return $==="x"||$==="X"},"isTimestampFormat")(e)&&/^\d+$/.test(n))return new Date(Number(n));const d=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(d!==null){let D=null;for(const M of d.groups.ids.split(" ")){let S=st(M);S!==void 0&&(!D||S.endTime>D.endTime)&&(D=S)}if(D)return D.endTime;const $=new Date;return $.setHours(0,0,0,0),$}let k=z(n,e.trim(),!0);if(k.isValid())return k.toDate();{nt.debug("Invalid date:"+n),nt.debug("With date format:"+e.trim());const D=new Date(n);if(D===void 0||isNaN(D.getTime())||D.getFullYear()<-1e4||D.getFullYear()>1e4)throw new Error("Invalid date:"+n);return D}},"getStartDate"),Ie=c(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),Me=c(function(t,e,n,s=!1){n=n.trim();const d=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(d!==null){let S=null;for(const _ of d.groups.ids.split(" ")){let T=st(_);T!==void 0&&(!S||T.startTime<S.startTime)&&(S=T)}if(S)return S.startTime;const W=new Date;return W.setHours(0,0,0,0),W}let k=z(n,e.trim(),!0);if(k.isValid())return s&&(k=k.add(1,"d")),k.toDate();let D=z(t);const[$,M]=Ie(n);if(!Number.isNaN($)){const S=D.add($,M);S.isValid()&&(D=S)}return D.toDate()},"getEndDate"),Tt=0,ct=c(function(t){return t===void 0?(Tt=Tt+1,"task"+Tt):t},"parseId"),an=c(function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const s=n.split(","),a={};Zt(s,a,Se);for(let k=0;k<s.length;k++)s[k]=s[k].trim();let d="";switch(s.length){case 1:a.id=ct(),a.startTime=t.endTime,d=s[0];break;case 2:a.id=ct(),a.startTime=Pt(void 0,K,s[0]),d=s[1];break;case 3:a.id=ct(s[0]),a.startTime=Pt(void 0,K,s[1]),d=s[2];break}return d&&(a.endTime=Me(a.startTime,K,d,ht),a.manualEndTime=z(d,"YYYY-MM-DD",!0).isValid(),Ee(a,K,ft,dt)),a},"compileData"),on=c(function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const s=n.split(","),a={};Zt(s,a,Se);for(let d=0;d<s.length;d++)s[d]=s[d].trim();switch(s.length){case 1:a.id=ct(),a.startTime={type:"prevTaskEnd",id:t},a.endTime={data:s[0]};break;case 2:a.id=ct(),a.startTime={type:"getStartDate",startData:s[0]},a.endTime={data:s[1]};break;case 3:a.id=ct(s[0]),a.startTime={type:"getStartDate",startData:s[1]},a.endTime={data:s[2]};break}return a},"parseData"),zt,xt,N=[],Ae={},cn=c(function(t,e){const n={section:lt,type:lt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},s=on(xt,e);n.raw.startTime=s.startTime,n.raw.endTime=s.endTime,n.id=s.id,n.prevTaskId=xt,n.active=s.active,n.done=s.done,n.crit=s.crit,n.milestone=s.milestone,n.vert=s.vert,n.order=Vt,Vt++;const a=N.push(n);xt=n.id,Ae[n.id]=a-1},"addTask"),st=c(function(t){const e=Ae[t];return N[e]},"findTaskById"),ln=c(function(t,e){const n={section:lt,type:lt,description:t,task:t,classes:[]},s=an(zt,e);n.startTime=s.startTime,n.endTime=s.endTime,n.id=s.id,n.active=s.active,n.done=s.done,n.crit=s.crit,n.milestone=s.milestone,n.vert=s.vert,zt=n,_t.push(n)},"addTaskOrg"),de=c(function(){const t=c(function(n){const s=N[n];let a="";switch(N[n].raw.startTime.type){case"prevTaskEnd":{const d=st(s.prevTaskId);s.startTime=d.endTime;break}case"getStartDate":a=Pt(void 0,K,N[n].raw.startTime.startData),a&&(N[n].startTime=a);break}return N[n].startTime&&(N[n].endTime=Me(N[n].startTime,K,N[n].raw.endTime.data,ht),N[n].endTime&&(N[n].processed=!0,N[n].manualEndTime=z(N[n].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Ee(N[n],K,ft,dt))),N[n].processed},"compileTask");let e=!0;for(const[n,s]of N.entries())t(n),e=e&&s.processed;return e},"compileTasks"),un=c(function(t,e){let n=e;at().securityLevel!=="loose"&&(n=ni.sanitizeUrl(e)),t.split(",").forEach(function(s){st(s)!==void 0&&($e(s,()=>{window.open(n,"_self")}),qt.set(s,n))}),Fe(t,"clickable")},"setLink"),Fe=c(function(t,e){t.split(",").forEach(function(n){let s=st(n);s!==void 0&&s.classes.push(e)})},"setClass"),dn=c(function(t,e,n){if(at().securityLevel!=="loose"||e===void 0)return;let s=[];if(typeof n=="string"){s=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let d=0;d<s.length;d++){let k=s[d].trim();k.startsWith('"')&&k.endsWith('"')&&(k=k.substr(1,k.length-2)),s[d]=k}}s.length===0&&s.push(t),st(t)!==void 0&&$e(t,()=>{ri.runFunc(e,...s)})},"setClickFun"),$e=c(function(t,e){Gt.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"),fn=c(function(t,e,n){t.split(",").forEach(function(s){dn(s,e,n)}),Fe(t,"clickable")},"setClickEvent"),hn=c(function(t){Gt.forEach(function(e){e(t)})},"bindFunctions"),mn={getConfig:c(()=>at().gantt,"getConfig"),clear:Fi,setDateFormat:Vi,getDateFormat:ji,enableInclusiveEndDates:Pi,endDatesAreInclusive:zi,enableTopAxis:Ri,topAxisEnabled:Bi,setAxisFormat:$i,getAxisFormat:Li,setTickInterval:Wi,getTickInterval:Yi,setTodayMarker:Oi,getTodayMarker:Ni,setAccTitle:Be,getAccTitle:Re,setDiagramTitle:ze,getDiagramTitle:Pe,setDisplayMode:Hi,getDisplayMode:qi,setAccDescription:Ve,getAccDescription:Ne,addSection:Ji,getSections:Qi,getTasks:tn,addTask:cn,findTaskById:st,addTaskOrg:ln,setIncludes:Xi,getIncludes:Gi,setExcludes:Ui,getExcludes:Ki,setClickEvent:fn,setLink:un,getLinks:Zi,bindFunctions:hn,parseDuration:Ie,isInvalidDate:Ce,setWeekday:en,getWeekday:nn,setWeekend:sn};function Zt(t,e,n){let s=!0;for(;s;)s=!1,n.forEach(function(a){const d="^\\s*"+a+"\\s*$",k=new RegExp(d);t[0].match(k)&&(e[a]=!0,t.shift(1),s=!0)})}c(Zt,"getTaskTags");z.extend(Mi);var kn=c(function(){nt.debug("Something is calling, setConf, remove the call")},"setConf"),fe={monday:ei,tuesday:ti,wednesday:Qe,thursday:Je,friday:Ze,saturday:Ke,sunday:Ue},yn=c((t,e)=>{let n=[...t].map(()=>-1/0),s=[...t].sort((d,k)=>d.startTime-k.startTime||d.order-k.order),a=0;for(const d of s)for(let k=0;k<n.length;k++)if(d.startTime>=n[k]){n[k]=d.endTime,d.order=k+e,k>a&&(a=k);break}return a},"getMaxIntersections"),tt,Wt=1e4,gn=c(function(t,e,n,s){const a=at().gantt,d=at().securityLevel;let k;d==="sandbox"&&(k=yt("#i"+e));const D=d==="sandbox"?yt(k.nodes()[0].contentDocument.body):yt("body"),$=d==="sandbox"?k.nodes()[0].contentDocument:document,M=$.getElementById(e);tt=M.parentElement.offsetWidth,tt===void 0&&(tt=1200),a.useWidth!==void 0&&(tt=a.useWidth);const S=s.db.getTasks();let W=[];for(const u of S)W.push(u.type);W=f(W);const _={};let T=2*a.topPadding;if(s.db.getDisplayMode()==="compact"||a.displayMode==="compact"){const u={};for(const b of S)u[b.section]===void 0?u[b.section]=[b]:u[b.section].push(b);let v=0;for(const b of Object.keys(u)){const g=yn(u[b],v)+1;v+=g,T+=g*(a.barHeight+a.barGap),_[b]=g}}else{T+=S.length*(a.barHeight+a.barGap);for(const u of W)_[u]=S.filter(v=>v.type===u).length}M.setAttribute("viewBox","0 0 "+tt+" "+T);const O=D.select(`[id="${e}"]`),C=He().domain([qe(S,function(u){return u.startTime}),je(S,function(u){return u.endTime})]).rangeRound([0,tt-a.leftPadding-a.rightPadding]);function U(u,v){const b=u.startTime,g=v.startTime;let m=0;return b>g?m=1:b<g&&(m=-1),m}c(U,"taskCompare"),S.sort(U),V(S,tt,T),Xe(O,T,tt,a.useMaxWidth),O.append("text").text(s.db.getDiagramTitle()).attr("x",tt/2).attr("y",a.titleTopMargin).attr("class","titleText");function V(u,v,b){const g=a.barHeight,m=g+a.barGap,o=a.topPadding,l=a.leftPadding,y=Ge().domain([0,W.length]).range(["#00B9FA","#F95002"]).interpolate(mi);P(m,o,l,v,b,u,s.db.getExcludes(),s.db.getIncludes()),H(l,o,v,b),X(u,m,o,l,g,y,v),I(m,o),p(l,o,v,b)}c(V,"makeGantt");function X(u,v,b,g,m,o,l){u.sort((i,w)=>i.vert===w.vert?0:i.vert?1:-1);const h=[...new Set(u.map(i=>i.order))].map(i=>u.find(w=>w.order===i));O.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",function(i,w){return w=i.order,w*v+b-2}).attr("width",function(){return l-a.rightPadding/2}).attr("height",v).attr("class",function(i){for(const[w,L]of W.entries())if(i.type===L)return"section section"+w%a.numberSectionStyles;return"section section0"}).enter();const x=O.append("g").selectAll("rect").data(u).enter(),r=s.db.getLinks();if(x.append("rect").attr("id",function(i){return i.id}).attr("rx",3).attr("ry",3).attr("x",function(i){return i.milestone?C(i.startTime)+g+.5*(C(i.endTime)-C(i.startTime))-.5*m:C(i.startTime)+g}).attr("y",function(i,w){return w=i.order,i.vert?a.gridLineStartPadding:w*v+b}).attr("width",function(i){return i.milestone?m:i.vert?.08*m:C(i.renderEndTime||i.endTime)-C(i.startTime)}).attr("height",function(i){return i.vert?S.length*(a.barHeight+a.barGap)+a.barHeight*2:m}).attr("transform-origin",function(i,w){return w=i.order,(C(i.startTime)+g+.5*(C(i.endTime)-C(i.startTime))).toString()+"px "+(w*v+b+.5*m).toString()+"px"}).attr("class",function(i){const w="task";let L="";i.classes.length>0&&(L=i.classes.join(" "));let F=0;for(const[R,E]of W.entries())i.type===E&&(F=R%a.numberSectionStyles);let A="";return i.active?i.crit?A+=" activeCrit":A=" active":i.done?i.crit?A=" doneCrit":A=" done":i.crit&&(A+=" crit"),A.length===0&&(A=" task"),i.milestone&&(A=" milestone "+A),i.vert&&(A=" vert "+A),A+=F,A+=" "+L,w+A}),x.append("text").attr("id",function(i){return i.id+"-text"}).text(function(i){return i.task}).attr("font-size",a.fontSize).attr("x",function(i){let w=C(i.startTime),L=C(i.renderEndTime||i.endTime);if(i.milestone&&(w+=.5*(C(i.endTime)-C(i.startTime))-.5*m,L=w+m),i.vert)return C(i.startTime)+g;const F=this.getBBox().width;return F>L-w?L+F+1.5*a.leftPadding>l?w+g-5:L+g+5:(L-w)/2+w+g}).attr("y",function(i,w){return i.vert?a.gridLineStartPadding+S.length*(a.barHeight+a.barGap)+60:(w=i.order,w*v+a.barHeight/2+(a.fontSize/2-2)+b)}).attr("text-height",m).attr("class",function(i){const w=C(i.startTime);let L=C(i.endTime);i.milestone&&(L=w+m);const F=this.getBBox().width;let A="";i.classes.length>0&&(A=i.classes.join(" "));let R=0;for(const[J,ut]of W.entries())i.type===ut&&(R=J%a.numberSectionStyles);let E="";return i.active&&(i.crit?E="activeCritText"+R:E="activeText"+R),i.done?i.crit?E=E+" doneCritText"+R:E=E+" doneText"+R:i.crit&&(E=E+" critText"+R),i.milestone&&(E+=" milestoneText"),i.vert&&(E+=" vertText"),F>L-w?L+F+1.5*a.leftPadding>l?A+" taskTextOutsideLeft taskTextOutside"+R+" "+E:A+" taskTextOutsideRight taskTextOutside"+R+" "+E+" width-"+F:A+" taskText taskText"+R+" "+E+" width-"+F}),at().securityLevel==="sandbox"){let i;i=yt("#i"+e);const w=i.nodes()[0].contentDocument;x.filter(function(L){return r.has(L.id)}).each(function(L){var F=w.querySelector("#"+L.id),A=w.querySelector("#"+L.id+"-text");const R=F.parentNode;var E=w.createElement("a");E.setAttribute("xlink:href",r.get(L.id)),E.setAttribute("target","_top"),R.appendChild(E),E.appendChild(F),E.appendChild(A)})}}c(X,"drawRects");function P(u,v,b,g,m,o,l,y){if(l.length===0&&y.length===0)return;let h,x;for(const{startTime:F,endTime:A}of o)(h===void 0||F<h)&&(h=F),(x===void 0||A>x)&&(x=A);if(!h||!x)return;if(z(x).diff(z(h),"year")>5){nt.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 r=s.db.getDateFormat(),Y=[];let i=null,w=z(h);for(;w.valueOf()<=x;)s.db.isInvalidDate(w,r,l,y)?i?i.end=w:i={start:w,end:w}:i&&(Y.push(i),i=null),w=w.add(1,"d");O.append("g").selectAll("rect").data(Y).enter().append("rect").attr("id",F=>"exclude-"+F.start.format("YYYY-MM-DD")).attr("x",F=>C(F.start.startOf("day"))+b).attr("y",a.gridLineStartPadding).attr("width",F=>C(F.end.endOf("day"))-C(F.start.startOf("day"))).attr("height",m-v-a.gridLineStartPadding).attr("transform-origin",function(F,A){return(C(F.start)+b+.5*(C(F.end)-C(F.start))).toString()+"px "+(A*u+.5*m).toString()+"px"}).attr("class","exclude-range")}c(P,"drawExcludeDays");function B(u,v,b,g){if(b<=0||u>v)return 1/0;const m=v-u,o=z.duration({[g??"day"]:b}).asMilliseconds();return o<=0?1/0:Math.ceil(m/o)}c(B,"getEstimatedTickCount");function H(u,v,b,g){const m=s.db.getDateFormat(),o=s.db.getAxisFormat();let l;o?l=o:m==="D"?l="%d":l=a.axisFormat??"%Y-%m-%d";let y=xi(C).tickSize(-g+v+a.gridLineStartPadding).tickFormat(te(l));const x=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(s.db.getTickInterval()||a.tickInterval);if(x!==null){const r=parseInt(x[1],10);if(isNaN(r)||r<=0)nt.warn(`Invalid tick interval value: "${x[1]}". Skipping custom tick interval.`);else{const Y=x[2],i=s.db.getWeekday()||a.weekday,w=C.domain(),L=w[0],F=w[1],A=B(L,F,r,Y);if(A>Wt)nt.warn(`The tick interval "${r}${Y}" would generate ${A} ticks, which exceeds the maximum allowed (${Wt}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(Y){case"millisecond":y.ticks(ae.every(r));break;case"second":y.ticks(re.every(r));break;case"minute":y.ticks(se.every(r));break;case"hour":y.ticks(ne.every(r));break;case"day":y.ticks(ie.every(r));break;case"week":y.ticks(fe[i].every(r));break;case"month":y.ticks(ee.every(r));break}}}if(O.append("g").attr("class","grid").attr("transform","translate("+u+", "+(g-50)+")").call(y).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),s.db.topAxisEnabled()||a.topAxis){let r=Ti(C).tickSize(-g+v+a.gridLineStartPadding).tickFormat(te(l));if(x!==null){const Y=parseInt(x[1],10);if(isNaN(Y)||Y<=0)nt.warn(`Invalid tick interval value: "${x[1]}". Skipping custom tick interval.`);else{const i=x[2],w=s.db.getWeekday()||a.weekday,L=C.domain(),F=L[0],A=L[1];if(B(F,A,Y,i)<=Wt)switch(i){case"millisecond":r.ticks(ae.every(Y));break;case"second":r.ticks(re.every(Y));break;case"minute":r.ticks(se.every(Y));break;case"hour":r.ticks(ne.every(Y));break;case"day":r.ticks(ie.every(Y));break;case"week":r.ticks(fe[w].every(Y));break;case"month":r.ticks(ee.every(Y));break}}}O.append("g").attr("class","grid").attr("transform","translate("+u+", "+v+")").call(r).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}c(H,"makeGrid");function I(u,v){let b=0;const g=Object.keys(_).map(m=>[m,_[m]]);O.append("g").selectAll("text").data(g).enter().append(function(m){const o=m[0].split(ii.lineBreakRegex),l=-(o.length-1)/2,y=$.createElementNS("http://www.w3.org/2000/svg","text");y.setAttribute("dy",l+"em");for(const[h,x]of o.entries()){const r=$.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttribute("alignment-baseline","central"),r.setAttribute("x","10"),h>0&&r.setAttribute("dy","1em"),r.textContent=x,y.appendChild(r)}return y}).attr("x",10).attr("y",function(m,o){if(o>0)for(let l=0;l<o;l++)return b+=g[o-1][1],m[1]*u/2+b*u+v;else return m[1]*u/2+v}).attr("font-size",a.sectionFontSize).attr("class",function(m){for(const[o,l]of W.entries())if(m[0]===l)return"sectionTitle sectionTitle"+o%a.numberSectionStyles;return"sectionTitle"})}c(I,"vertLabels");function p(u,v,b,g){const m=s.db.getTodayMarker();if(m==="off")return;const o=O.append("g").attr("class","today"),l=new Date,y=o.append("line");y.attr("x1",C(l)+u).attr("x2",C(l)+u).attr("y1",a.titleTopMargin).attr("y2",g-a.titleTopMargin).attr("class","today"),m!==""&&y.attr("style",m.replace(/,/g,";"))}c(p,"drawToday");function f(u){const v={},b=[];for(let g=0,m=u.length;g<m;++g)Object.prototype.hasOwnProperty.call(v,u[g])||(v[u[g]]=!0,b.push(u[g]));return b}c(f,"checkUnique")},"draw"),pn={setConf:kn,draw:gn},vn=c(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"),bn=vn,wn={parser:Ai,db:mn,renderer:pn,styles:bn};export{wn as diagram};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import{p as Z}from"./chunk-4BX2VUAB-BHI8UK28.js";import{I as F}from"./chunk-QZHKN3VN-Bq498BI9.js";import{y as U,x as rr,c as er,g as tr,d as ar,e as nr,_ as h,l as m,h as sr,v as or,K as cr,D as ir,o as B,N as dr,O as hr,Q as lr,f as $r,S as fr}from"./App-GrNzEwSI.js";import{p as gr}from"./treemap-GDKQZRPO-B0RpuOqZ.js";import"./main-obJgfVN6.js";import"./_baseUniq-C6qPwTXi.js";import"./_basePickBy-B3HOvLI5.js";import"./clone-DB5FFFZ8.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},yr=hr.gitGraph,z=h(()=>dr({...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 W(){return fr({length:7})}h(W,"getID");function Y(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(Y,"uniqBy");var xr=h(function(t){i.records.direction=t},"setDirection"),pr=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"),ur=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+"-"+W(),message:r,seq:i.records.seq++,type:s??p.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}-${W()}`,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:p.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===p.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+"-"+W(),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:p.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${c.id}${c.type===p.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=Y(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(),ir()},"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"),Q={commitType:p,getConfig:z,setDirection:xr,setOptions:pr,getOptions:ur,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?p[t.type]:p.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?p[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"),Sr={parse:h(async t=>{const r=await gr("gitGraph",t);m.debug(r),Ir(r,Q)},"parse")},j=$r(),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,S=[],M=0,x="LR",Wr=h(()=>{C.clear(),E.clear(),G.clear(),M=0,S=[],x="LR"},"clear"),X=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"),J=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=Kr(o),e=Math.max(s,e)):n.push(o),Nr(o,s)}),s=e,n.forEach(c=>{Yr(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=J(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"),Kr=h(t=>Ar(t)+I,"calculateCommitPosition"),Nr=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"),Yr=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===p.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===p.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===p.MERGE?9:10),c.attr("class",`commit ${r.id} commit${e%O}`),n===p.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===p.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!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.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"),Qr=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,u=a.y-19.2-d;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
2
|
+
${s-c/2-k/2},${u+L}
|
|
3
|
+
${s-c/2-k/2},${u-L}
|
|
4
|
+
${a.posWithOffset-c/2-k},${u-y-L}
|
|
5
|
+
${a.posWithOffset+c/2+k},${u-y-L}
|
|
6
|
+
${a.posWithOffset+c/2+k},${u+y+L}
|
|
7
|
+
${a.posWithOffset-c/2-k},${u+y+L}`),f.attr("cy",u).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"),Xr=h(t=>{switch(t.customType??t.type){case p.NORMAL:return"commit-normal";case p.REVERSE:return"commit-reverse";case p.HIGHLIGHT:return"commit-highlight";case p.MERGE:return"commit-merge";case p.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Jr=h((t,r,a,s)=>{const e={x:0,y:0};if(t.parents.length>0){const n=J(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"),N=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 u,w;const d=(u=r.get(f))==null?void 0:u.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=Jr(g,x,n,E));const d=Zr(g,n,o);if(a){const u=Xr(g),w=g.customType??g.type,q=((y=C.get(g.branch))==null?void 0:y.index)??0;_r(s,g,d,u,q,w),Vr(e,g,d,n),Qr(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(S.every(c=>Math.abs(c-s)>=10))return S.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,u,w,q,K;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===p.MERGE&&r.id!==a.parents[0]&&(g=(u=C.get(r.branch))==null?void 0:u.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=(K=C.get(r.branch))==null?void 0:K.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===p.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===p.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===p.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===p.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===p.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===p.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 u;const n=e%O,c=(u=C.get(s.name))==null?void 0:u.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)),S.push(c);const $=s.name,l=X($),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(Wr(),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=sr(`[id="${r}"]`);let $=0;c.forEach((l,f)=>{var q;const g=X(l.name),d=o.append("g"),y=d.insert("g").attr("class","branchLabel"),u=y.insert("g").attr("class","label branch-label");(q=u.node())==null||q.appendChild(g);const w=g.getBBox();$=te(l.name,$,f,w,e),u.remove(),y.remove(),d.remove()}),N(o,G,!1),b.showBranches&&ee(o,c),re(o,G),N(o,G,!0),or.insertTitle(o,"gitTitleText",b.titleTopMargin??0,n.getDiagramTitle()),cr(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,ye={parser:Sr,db:Q,renderer:ne,styles:oe};export{ye as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aT as N,aU as j,aV as f,aW as b,aX as E}from"./App-GrNzEwSI.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-C6qPwTXi.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,y(this._preds[t],e),y(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],C(this._preds[t],e),C(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 y(o,e){o[e]?o[e]++:o[e]=1}function C(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};
|