| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292 |
- import{H as en,fY as Yn,cN as nn,c_ as rn,d as sn,fc as ae,dV as Ln,dq as an,df as An,g3 as Wn,dr as On,g6 as $n,dg as Nn,g4 as Hn,aa as f,dn as _t,g0 as Zt,cb as Vn,cE as nt,eV as Tt,c4 as Rn,cU as Pn,bZ as zn,gX as Bn,cG as qn,cF as Zn}from"./builder-DygomDiV.js";import{b as Xn,t as Oe,c as jn,a as Gn,l as Qn}from"./linear-BCGW3HSw.js";import{i as Jn}from"./init-Gi6I4Gst.js";import"./defaultLocale-CrowFXzY.js";function Kn(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 tr(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 er(t){return t}var jt=1,oe=2,pe=3,Xt=4,$e=1e-6;function nr(t){return"translate("+t+",0)"}function rr(t){return"translate(0,"+t+")"}function ir(t){return e=>+t(e)}function sr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ar(){return!this.__axis}function on(t,e){var n=[],r=null,i=null,a=6,c=6,T=3,I=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===jt||t===Xt?-1:1,b=t===Xt||t===oe?"x":"y",A=t===jt||t===pe?nr:rr;function _(C){var V=r??(e.ticks?e.ticks.apply(e,n):e.domain()),E=i??(e.tickFormat?e.tickFormat.apply(e,n):er),tt=Math.max(a,0)+T,Z=e.range(),rt=+Z[0]+I,P=+Z[Z.length-1]+I,q=(e.bandwidth?sr:ir)(e.copy(),I),Q=C.selection?C.selection():C,m=Q.selectAll(".domain").data([null]),g=Q.selectAll(".tick").data(V,e).order(),y=g.exit(),h=g.enter().append("g").attr("class","tick"),D=g.select("line"),M=g.select("text");m=m.merge(m.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),g=g.merge(h),D=D.merge(h.append("line").attr("stroke","currentColor").attr(b+"2",S*a)),M=M.merge(h.append("text").attr("fill","currentColor").attr(b,S*tt).attr("dy",t===jt?"0em":t===pe?"0.71em":"0.32em")),C!==Q&&(m=m.transition(C),g=g.transition(C),D=D.transition(C),M=M.transition(C),y=y.transition(C).attr("opacity",$e).attr("transform",function(w){return isFinite(w=q(w))?A(w+I):this.getAttribute("transform")}),h.attr("opacity",$e).attr("transform",function(w){var p=this.parentNode.__axis;return A((p&&isFinite(p=p(w))?p:q(w))+I)})),y.remove(),m.attr("d",t===Xt||t===oe?c?"M"+S*c+","+rt+"H"+I+"V"+P+"H"+S*c:"M"+I+","+rt+"V"+P:c?"M"+rt+","+S*c+"V"+I+"H"+P+"V"+S*c:"M"+rt+","+I+"H"+P),g.attr("opacity",1).attr("transform",function(w){return A(q(w)+I)}),D.attr(b+"2",S*a),M.attr(b,S*tt).text(E),Q.filter(ar).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===oe?"start":t===Xt?"end":"middle"),Q.each(function(){this.__axis=q})}return _.scale=function(C){return arguments.length?(e=C,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(C){return arguments.length?(n=C==null?[]:Array.from(C),_):n.slice()},_.tickValues=function(C){return arguments.length?(r=C==null?null:Array.from(C),_):r&&r.slice()},_.tickFormat=function(C){return arguments.length?(i=C,_):i},_.tickSize=function(C){return arguments.length?(a=c=+C,_):a},_.tickSizeInner=function(C){return arguments.length?(a=+C,_):a},_.tickSizeOuter=function(C){return arguments.length?(c=+C,_):c},_.tickPadding=function(C){return arguments.length?(T=+C,_):T},_.offset=function(C){return arguments.length?(I=+C,_):I},_}function or(t){return on(jt,t)}function cr(t){return on(pe,t)}const ur=Math.PI/180,lr=180/Math.PI,te=18,cn=.96422,un=1,ln=.82521,fn=4/29,Ft=6/29,dn=3*Ft*Ft,fr=Ft*Ft*Ft;function hn(t){if(t instanceof ut)return new ut(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return mn(t);t instanceof en||(t=Yn(t));var e=fe(t.r),n=fe(t.g),r=fe(t.b),i=ce((.2225045*e+.7168786*n+.0606169*r)/un),a,c;return e===n&&n===r?a=c=i:(a=ce((.4360747*e+.3850649*n+.1430804*r)/cn),c=ce((.0139322*e+.0971045*n+.7141733*r)/ln)),new ut(116*i-16,500*(a-i),200*(i-c),t.opacity)}function dr(t,e,n,r){return arguments.length===1?hn(t):new ut(t,e,n,r??1)}function ut(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}nn(ut,dr,rn(sn,{brighter(t){return new ut(this.l+te*(t??1),this.a,this.b,this.opacity)},darker(t){return new ut(this.l-te*(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=cn*ue(e),t=un*ue(t),n=ln*ue(n),new en(le(3.1338561*e-1.6168667*t-.4906146*n),le(-.9787684*e+1.9161415*t+.033454*n),le(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ce(t){return t>fr?Math.pow(t,1/3):t/dn+fn}function ue(t){return t>Ft?t*t*t:dn*(t-fn)}function le(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function fe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function hr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ut||(t=hn(t)),t.a===0&&t.b===0)return new ht(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*lr;return new ht(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Te(t,e,n,r){return arguments.length===1?hr(t):new ht(t,e,n,r??1)}function ht(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function mn(t){if(isNaN(t.h))return new ut(t.l,0,0,t.opacity);var e=t.h*ur;return new ut(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}nn(ht,Te,rn(sn,{brighter(t){return new ht(this.h,this.c,this.l+te*(t??1),this.opacity)},darker(t){return new ht(this.h,this.c,this.l-te*(t??1),this.opacity)},rgb(){return mn(this).rgb()}}));function mr(t){return function(e,n){var r=t((e=Te(e)).h,(n=Te(n)).h),i=ae(e.c,n.c),a=ae(e.l,n.l),c=ae(e.opacity,n.opacity);return function(T){return e.h=r(T),e.c=i(T),e.l=a(T),e.opacity=c(T),e+""}}}const gr=mr(Ln);function yr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],a=t[r],c;return a<i&&(c=n,n=r,r=c,c=i,i=a,a=c),t[n]=e.floor(i),t[r]=e.ceil(a),t}const de=new Date,he=new Date;function G(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 c=i(a),T=i.ceil(a);return a-c<T-a?c:T},i.offset=(a,c)=>(e(a=new Date(+a),c==null?1:Math.floor(c)),a),i.range=(a,c,T)=>{const I=[];if(a=i.ceil(a),T=T==null?1:Math.floor(T),!(a<c)||!(T>0))return I;let S;do I.push(S=new Date(+a)),e(a,T),t(a);while(S<a&&a<c);return I},i.filter=a=>G(c=>{if(c>=c)for(;t(c),!a(c);)c.setTime(c-1)},(c,T)=>{if(c>=c)if(T<0)for(;++T<=0;)for(;e(c,-1),!a(c););else for(;--T>=0;)for(;e(c,1),!a(c););}),n&&(i.count=(a,c)=>(de.setTime(+a),he.setTime(+c),t(de),t(he),Math.floor(n(de,he))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?c=>r(c)%a===0:c=>i.count(0,c)%a===0):i)),i}const It=G(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);It.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?G(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):It);It.range;const mt=1e3,st=mt*60,gt=st*60,yt=gt*24,Ce=yt*7,Ne=yt*30,me=yt*365,pt=G(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());pt.range;const Ot=G(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*st)},(t,e)=>(e-t)/st,t=>t.getMinutes());Ot.range;const kr=G(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*st)},(t,e)=>(e-t)/st,t=>t.getUTCMinutes());kr.range;const $t=G(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*st)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());$t.range;const pr=G(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());pr.range;const vt=G(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*st)/yt,t=>t.getDate()-1);vt.range;const De=G(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);De.range;const Tr=G(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));Tr.range;function wt(t){return G(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())*st)/Ce)}const Vt=wt(0),Nt=wt(1),gn=wt(2),yn=wt(3),xt=wt(4),kn=wt(5),pn=wt(6);Vt.range;Nt.range;gn.range;yn.range;xt.range;kn.range;pn.range;function Ct(t){return G(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)/Ce)}const Tn=Ct(0),ee=Ct(1),vr=Ct(2),xr=Ct(3),Et=Ct(4),br=Ct(5),wr=Ct(6);Tn.range;ee.range;vr.range;xr.range;Et.range;br.range;wr.range;const Ht=G(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());Ht.range;const Cr=G(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());Cr.range;const kt=G(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:G(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 bt=G(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());bt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:G(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)});bt.range;function Dr(t,e,n,r,i,a){const c=[[pt,1,mt],[pt,5,5*mt],[pt,15,15*mt],[pt,30,30*mt],[a,1,st],[a,5,5*st],[a,15,15*st],[a,30,30*st],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Ce],[e,1,Ne],[e,3,3*Ne],[t,1,me]];function T(S,b,A){const _=b<S;_&&([S,b]=[b,S]);const C=A&&typeof A.range=="function"?A:I(S,b,A),V=C?C.range(S,+b+1):[];return _?V.reverse():V}function I(S,b,A){const _=Math.abs(b-S)/A,C=Xn(([,,tt])=>tt).right(c,_);if(C===c.length)return t.every(Oe(S/me,b/me,A));if(C===0)return It.every(Math.max(Oe(S,b,A),1));const[V,E]=c[_/c[C-1][2]<c[C][2]/_?C-1:C];return V.every(E)}return[T,I]}const[Mr,Sr]=Dr(kt,Ht,Vt,vt,$t,Ot);function ge(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 ye(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 _r(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,c=t.shortDays,T=t.months,I=t.shortMonths,S=At(i),b=Wt(i),A=At(a),_=Wt(a),C=At(c),V=Wt(c),E=At(T),tt=Wt(T),Z=At(I),rt=Wt(I),P={a:k,A:F,b:o,B:z,c:null,d:Be,e:Be,f:Qr,g:oi,G:ui,H:Xr,I:jr,j:Gr,L:vn,m:Jr,M:Kr,p:s,q:U,Q:Xe,s:je,S:ti,u:ei,U:ni,V:ri,w:ii,W:si,x:null,X:null,y:ai,Y:ci,Z:li,"%":Ze},q={a:R,A:$,b:O,B:J,c:null,d:qe,e:qe,f:mi,g:Ci,G:Mi,H:fi,I:di,j:hi,L:bn,m:gi,M:yi,p:Y,q:at,Q:Xe,s:je,S:ki,u:pi,U:Ti,V:vi,w:xi,W:bi,x:null,X:null,y:wi,Y:Di,Z:Si,"%":Ze},Q={a:D,A:M,b:w,B:p,c:u,d:Pe,e:Pe,f:zr,g:Re,G:Ve,H:ze,I:ze,j:Hr,L:Pr,m:Nr,M:Vr,p:h,q:$r,Q:qr,s:Zr,S:Rr,u:Yr,U:Lr,V:Ar,w:Er,W:Wr,x:d,X:v,y:Re,Y:Ve,Z:Or,"%":Br};P.x=m(n,P),P.X=m(r,P),P.c=m(e,P),q.x=m(n,q),q.X=m(r,q),q.c=m(e,q);function m(x,W){return function(N){var l=[],et=-1,L=0,X=x.length,B,ot,lt;for(N instanceof Date||(N=new Date(+N));++et<X;)x.charCodeAt(et)===37&&(l.push(x.slice(L,et)),(ot=He[B=x.charAt(++et)])!=null?B=x.charAt(++et):ot=B==="e"?" ":"0",(lt=W[B])&&(B=lt(N,ot)),l.push(B),L=et+1);return l.push(x.slice(L,et)),l.join("")}}function g(x,W){return function(N){var l=Lt(1900,void 0,1),et=y(l,x,N+="",0),L,X;if(et!=N.length)return null;if("Q"in l)return new Date(l.Q);if("s"in l)return new Date(l.s*1e3+("L"in l?l.L:0));if(W&&!("Z"in l)&&(l.Z=0),"p"in l&&(l.H=l.H%12+l.p*12),l.m===void 0&&(l.m="q"in l?l.q:0),"V"in l){if(l.V<1||l.V>53)return null;"w"in l||(l.w=1),"Z"in l?(L=ye(Lt(l.y,0,1)),X=L.getUTCDay(),L=X>4||X===0?ee.ceil(L):ee(L),L=De.offset(L,(l.V-1)*7),l.y=L.getUTCFullYear(),l.m=L.getUTCMonth(),l.d=L.getUTCDate()+(l.w+6)%7):(L=ge(Lt(l.y,0,1)),X=L.getDay(),L=X>4||X===0?Nt.ceil(L):Nt(L),L=vt.offset(L,(l.V-1)*7),l.y=L.getFullYear(),l.m=L.getMonth(),l.d=L.getDate()+(l.w+6)%7)}else("W"in l||"U"in l)&&("w"in l||(l.w="u"in l?l.u%7:"W"in l?1:0),X="Z"in l?ye(Lt(l.y,0,1)).getUTCDay():ge(Lt(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(X+5)%7:l.w+l.U*7-(X+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,ye(l)):ge(l)}}function y(x,W,N,l){for(var et=0,L=W.length,X=N.length,B,ot;et<L;){if(l>=X)return-1;if(B=W.charCodeAt(et++),B===37){if(B=W.charAt(et++),ot=Q[B in He?W.charAt(et++):B],!ot||(l=ot(x,N,l))<0)return-1}else if(B!=N.charCodeAt(l++))return-1}return l}function h(x,W,N){var l=S.exec(W.slice(N));return l?(x.p=b.get(l[0].toLowerCase()),N+l[0].length):-1}function D(x,W,N){var l=C.exec(W.slice(N));return l?(x.w=V.get(l[0].toLowerCase()),N+l[0].length):-1}function M(x,W,N){var l=A.exec(W.slice(N));return l?(x.w=_.get(l[0].toLowerCase()),N+l[0].length):-1}function w(x,W,N){var l=Z.exec(W.slice(N));return l?(x.m=rt.get(l[0].toLowerCase()),N+l[0].length):-1}function p(x,W,N){var l=E.exec(W.slice(N));return l?(x.m=tt.get(l[0].toLowerCase()),N+l[0].length):-1}function u(x,W,N){return y(x,e,W,N)}function d(x,W,N){return y(x,n,W,N)}function v(x,W,N){return y(x,r,W,N)}function k(x){return c[x.getDay()]}function F(x){return a[x.getDay()]}function o(x){return I[x.getMonth()]}function z(x){return T[x.getMonth()]}function s(x){return i[+(x.getHours()>=12)]}function U(x){return 1+~~(x.getMonth()/3)}function R(x){return c[x.getUTCDay()]}function $(x){return a[x.getUTCDay()]}function O(x){return I[x.getUTCMonth()]}function J(x){return T[x.getUTCMonth()]}function Y(x){return i[+(x.getUTCHours()>=12)]}function at(x){return 1+~~(x.getUTCMonth()/3)}return{format:function(x){var W=m(x+="",P);return W.toString=function(){return x},W},parse:function(x){var W=g(x+="",!1);return W.toString=function(){return x},W},utcFormat:function(x){var W=m(x+="",q);return W.toString=function(){return x},W},utcParse:function(x){var W=g(x+="",!0);return W.toString=function(){return x},W}}}var He={"-":"",_:" ",0:"0"},K=/^\s*\d+/,Fr=/^%/,Ur=/[\\^$*+?|[\]().{}]/g;function H(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 Ir(t){return t.replace(Ur,"\\$&")}function At(t){return new RegExp("^(?:"+t.map(Ir).join("|")+")","i")}function Wt(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Er(t,e,n){var r=K.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Yr(t,e,n){var r=K.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=K.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=K.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=K.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ve(t,e,n){var r=K.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Re(t,e,n){var r=K.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Or(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 $r(t,e,n){var r=K.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Nr(t,e,n){var r=K.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Pe(t,e,n){var r=K.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=K.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=K.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=K.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=K.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Pr(t,e,n){var r=K.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=K.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Br(t,e,n){var r=Fr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function qr(t,e,n){var r=K.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=K.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Be(t,e){return H(t.getDate(),e,2)}function Xr(t,e){return H(t.getHours(),e,2)}function jr(t,e){return H(t.getHours()%12||12,e,2)}function Gr(t,e){return H(1+vt.count(kt(t),t),e,3)}function vn(t,e){return H(t.getMilliseconds(),e,3)}function Qr(t,e){return vn(t,e)+"000"}function Jr(t,e){return H(t.getMonth()+1,e,2)}function Kr(t,e){return H(t.getMinutes(),e,2)}function ti(t,e){return H(t.getSeconds(),e,2)}function ei(t){var e=t.getDay();return e===0?7:e}function ni(t,e){return H(Vt.count(kt(t)-1,t),e,2)}function xn(t){var e=t.getDay();return e>=4||e===0?xt(t):xt.ceil(t)}function ri(t,e){return t=xn(t),H(xt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function ii(t){return t.getDay()}function si(t,e){return H(Nt.count(kt(t)-1,t),e,2)}function ai(t,e){return H(t.getFullYear()%100,e,2)}function oi(t,e){return t=xn(t),H(t.getFullYear()%100,e,2)}function ci(t,e){return H(t.getFullYear()%1e4,e,4)}function ui(t,e){var n=t.getDay();return t=n>=4||n===0?xt(t):xt.ceil(t),H(t.getFullYear()%1e4,e,4)}function li(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+H(e/60|0,"0",2)+H(e%60,"0",2)}function qe(t,e){return H(t.getUTCDate(),e,2)}function fi(t,e){return H(t.getUTCHours(),e,2)}function di(t,e){return H(t.getUTCHours()%12||12,e,2)}function hi(t,e){return H(1+De.count(bt(t),t),e,3)}function bn(t,e){return H(t.getUTCMilliseconds(),e,3)}function mi(t,e){return bn(t,e)+"000"}function gi(t,e){return H(t.getUTCMonth()+1,e,2)}function yi(t,e){return H(t.getUTCMinutes(),e,2)}function ki(t,e){return H(t.getUTCSeconds(),e,2)}function pi(t){var e=t.getUTCDay();return e===0?7:e}function Ti(t,e){return H(Tn.count(bt(t)-1,t),e,2)}function wn(t){var e=t.getUTCDay();return e>=4||e===0?Et(t):Et.ceil(t)}function vi(t,e){return t=wn(t),H(Et.count(bt(t),t)+(bt(t).getUTCDay()===4),e,2)}function xi(t){return t.getUTCDay()}function bi(t,e){return H(ee.count(bt(t)-1,t),e,2)}function wi(t,e){return H(t.getUTCFullYear()%100,e,2)}function Ci(t,e){return t=wn(t),H(t.getUTCFullYear()%100,e,2)}function Di(t,e){return H(t.getUTCFullYear()%1e4,e,4)}function Mi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Et(t):Et.ceil(t),H(t.getUTCFullYear()%1e4,e,4)}function Si(){return"+0000"}function Ze(){return"%"}function Xe(t){return+t}function je(t){return Math.floor(+t/1e3)}var Mt,ne;_i({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 _i(t){return Mt=_r(t),ne=Mt.format,Mt.parse,Mt.utcFormat,Mt.utcParse,Mt}function Fi(t){return new Date(t)}function Ui(t){return t instanceof Date?+t:+new Date(+t)}function Cn(t,e,n,r,i,a,c,T,I,S){var b=jn(),A=b.invert,_=b.domain,C=S(".%L"),V=S(":%S"),E=S("%I:%M"),tt=S("%I %p"),Z=S("%a %d"),rt=S("%b %d"),P=S("%B"),q=S("%Y");function Q(m){return(I(m)<m?C:T(m)<m?V:c(m)<m?E:a(m)<m?tt:r(m)<m?i(m)<m?Z:rt:n(m)<m?P:q)(m)}return b.invert=function(m){return new Date(A(m))},b.domain=function(m){return arguments.length?_(Array.from(m,Ui)):_().map(Fi)},b.ticks=function(m){var g=_();return t(g[0],g[g.length-1],m??10)},b.tickFormat=function(m,g){return g==null?Q:S(g)},b.nice=function(m){var g=_();return(!m||typeof m.range!="function")&&(m=e(g[0],g[g.length-1],m??10)),m?_(yr(g,m)):b},b.copy=function(){return Gn(b,Cn(t,e,n,r,i,a,c,T,I,S))},b}function Ii(){return Jn.apply(Cn(Mr,Sr,kt,Ht,Vt,vt,$t,Ot,pt,ne).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Gt={exports:{}},Ei=Gt.exports,Ge;function Yi(){return Ge||(Ge=1,(function(t,e){(function(n,r){t.exports=r()})(Ei,(function(){var n="day";return function(r,i,a){var c=function(S){return S.add(4-S.isoWeekday(),n)},T=i.prototype;T.isoWeekYear=function(){return c(this).year()},T.isoWeek=function(S){if(!this.$utils().u(S))return this.add(7*(S-this.isoWeek()),n);var b,A,_,C,V=c(this),E=(b=this.isoWeekYear(),A=this.$u,_=(A?a.utc:a)().year(b).startOf("year"),C=4-_.isoWeekday(),_.isoWeekday()>4&&(C+=7),_.add(C,n));return V.diff(E,"week")+1},T.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var I=T.startOf;T.startOf=function(S,b){var A=this.$utils(),_=!!A.u(b)||b;return A.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):I.bind(this)(S,b)}}}))})(Gt)),Gt.exports}var Li=Yi();const Ai=an(Li);var Qt={exports:{}},Wi=Qt.exports,Qe;function Oi(){return Qe||(Qe=1,(function(t,e){(function(n,r){t.exports=r()})(Wi,(function(){var n,r,i=1e3,a=6e4,c=36e5,T=864e5,I=/\[([^\]]+)]|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,S=31536e6,b=2628e6,A=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,_={years:S,months:b,days:T,hours:c,minutes:a,seconds:i,milliseconds:1,weeks:6048e5},C=function(m){return m instanceof q},V=function(m,g,y){return new q(m,y,g.$l)},E=function(m){return r.p(m)+"s"},tt=function(m){return m<0},Z=function(m){return tt(m)?Math.ceil(m):Math.floor(m)},rt=function(m){return Math.abs(m)},P=function(m,g){return m?tt(m)?{negative:!0,format:""+rt(m)+g}:{negative:!1,format:""+m+g}:{negative:!1,format:""}},q=(function(){function m(y,h,D){var M=this;if(this.$d={},this.$l=D,y===void 0&&(this.$ms=0,this.parseFromMilliseconds()),h)return V(y*_[E(h)],this);if(typeof y=="number")return this.$ms=y,this.parseFromMilliseconds(),this;if(typeof y=="object")return Object.keys(y).forEach((function(u){M.$d[E(u)]=y[u]})),this.calMilliseconds(),this;if(typeof y=="string"){var w=y.match(A);if(w){var p=w.slice(2).map((function(u){return u!=null?Number(u):0}));return this.$d.years=p[0],this.$d.months=p[1],this.$d.weeks=p[2],this.$d.days=p[3],this.$d.hours=p[4],this.$d.minutes=p[5],this.$d.seconds=p[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var y=this;this.$ms=Object.keys(this.$d).reduce((function(h,D){return h+(y.$d[D]||0)*_[D]}),0)},g.parseFromMilliseconds=function(){var y=this.$ms;this.$d.years=Z(y/S),y%=S,this.$d.months=Z(y/b),y%=b,this.$d.days=Z(y/T),y%=T,this.$d.hours=Z(y/c),y%=c,this.$d.minutes=Z(y/a),y%=a,this.$d.seconds=Z(y/i),y%=i,this.$d.milliseconds=y},g.toISOString=function(){var y=P(this.$d.years,"Y"),h=P(this.$d.months,"M"),D=+this.$d.days||0;this.$d.weeks&&(D+=7*this.$d.weeks);var M=P(D,"D"),w=P(this.$d.hours,"H"),p=P(this.$d.minutes,"M"),u=this.$d.seconds||0;this.$d.milliseconds&&(u+=this.$d.milliseconds/1e3,u=Math.round(1e3*u)/1e3);var d=P(u,"S"),v=y.negative||h.negative||M.negative||w.negative||p.negative||d.negative,k=w.format||p.format||d.format?"T":"",F=(v?"-":"")+"P"+y.format+h.format+M.format+k+w.format+p.format+d.format;return F==="P"||F==="-P"?"P0D":F},g.toJSON=function(){return this.toISOString()},g.format=function(y){var h=y||"YYYY-MM-DDTHH:mm:ss",D={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return h.replace(I,(function(M,w){return w||String(D[M])}))},g.as=function(y){return this.$ms/_[E(y)]},g.get=function(y){var h=this.$ms,D=E(y);return D==="milliseconds"?h%=1e3:h=D==="weeks"?Z(h/_[D]):this.$d[D],h||0},g.add=function(y,h,D){var M;return M=h?y*_[E(h)]:C(y)?y.$ms:V(y,this).$ms,V(this.$ms+M*(D?-1:1),this)},g.subtract=function(y,h){return this.add(y,h,!0)},g.locale=function(y){var h=this.clone();return h.$l=y,h},g.clone=function(){return V(this.$ms,this)},g.humanize=function(y){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!y)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},m})(),Q=function(m,g,y){return m.add(g.years()*y,"y").add(g.months()*y,"M").add(g.days()*y,"d").add(g.hours()*y,"h").add(g.minutes()*y,"m").add(g.seconds()*y,"s").add(g.milliseconds()*y,"ms")};return function(m,g,y){n=y,r=y().$utils(),y.duration=function(M,w){var p=y.locale();return V(M,{$l:p},w)},y.isDuration=C;var h=g.prototype.add,D=g.prototype.subtract;g.prototype.add=function(M,w){return C(M)?Q(this,M,1):h.bind(this)(M,w)},g.prototype.subtract=function(M,w){return C(M)?Q(this,M,-1):D.bind(this)(M,w)}}}))})(Qt)),Qt.exports}var $i=Oi();const Ni=an($i);var ve=(function(){var t=f(function(p,u,d,v){for(d=d||{},v=p.length;v--;d[p[v]]=u);return d},"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],c=[1,30],T=[1,31],I=[1,32],S=[1,33],b=[1,34],A=[1,9],_=[1,10],C=[1,11],V=[1,12],E=[1,13],tt=[1,14],Z=[1,15],rt=[1,16],P=[1,19],q=[1,20],Q=[1,21],m=[1,22],g=[1,23],y=[1,25],h=[1,35],D={trace:f(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:f(function(u,d,v,k,F,o,z){var s=o.length-1;switch(F){case 1:return o[s-1];case 2:this.$=[];break;case 3:o[s-1].push(o[s]),this.$=o[s-1];break;case 4:case 5:this.$=o[s];break;case 6:case 7:this.$=[];break;case 8:k.setWeekday("monday");break;case 9:k.setWeekday("tuesday");break;case 10:k.setWeekday("wednesday");break;case 11:k.setWeekday("thursday");break;case 12:k.setWeekday("friday");break;case 13:k.setWeekday("saturday");break;case 14:k.setWeekday("sunday");break;case 15:k.setWeekend("friday");break;case 16:k.setWeekend("saturday");break;case 17:k.setDateFormat(o[s].substr(11)),this.$=o[s].substr(11);break;case 18:k.enableInclusiveEndDates(),this.$=o[s].substr(18);break;case 19:k.TopAxis(),this.$=o[s].substr(8);break;case 20:k.setAxisFormat(o[s].substr(11)),this.$=o[s].substr(11);break;case 21:k.setTickInterval(o[s].substr(13)),this.$=o[s].substr(13);break;case 22:k.setExcludes(o[s].substr(9)),this.$=o[s].substr(9);break;case 23:k.setIncludes(o[s].substr(9)),this.$=o[s].substr(9);break;case 24:k.setTodayMarker(o[s].substr(12)),this.$=o[s].substr(12);break;case 27:k.setDiagramTitle(o[s].substr(6)),this.$=o[s].substr(6);break;case 28:this.$=o[s].trim(),k.setAccTitle(this.$);break;case 29:case 30:this.$=o[s].trim(),k.setAccDescription(this.$);break;case 31:k.addSection(o[s].substr(8)),this.$=o[s].substr(8);break;case 33:k.addTask(o[s-1],o[s]),this.$="task";break;case 34:this.$=o[s-1],k.setClickEvent(o[s-1],o[s],null);break;case 35:this.$=o[s-2],k.setClickEvent(o[s-2],o[s-1],o[s]);break;case 36:this.$=o[s-2],k.setClickEvent(o[s-2],o[s-1],null),k.setLink(o[s-2],o[s]);break;case 37:this.$=o[s-3],k.setClickEvent(o[s-3],o[s-2],o[s-1]),k.setLink(o[s-3],o[s]);break;case 38:this.$=o[s-2],k.setClickEvent(o[s-2],o[s],null),k.setLink(o[s-2],o[s-1]);break;case 39:this.$=o[s-3],k.setClickEvent(o[s-3],o[s-1],o[s]),k.setLink(o[s-3],o[s-2]);break;case 40:this.$=o[s-1],k.setLink(o[s-1],o[s]);break;case 41:case 47:this.$=o[s-1]+" "+o[s];break;case 42:case 43:case 45:this.$=o[s-2]+" "+o[s-1]+" "+o[s];break;case 44:case 46:this.$=o[s-3]+" "+o[s-2]+" "+o[s-1]+" "+o[s];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:c,17:T,18:I,19:18,20:S,21:b,22:A,23:_,24:C,25:V,26:E,27:tt,28:Z,29:rt,30:P,31:q,33:Q,35:m,36:g,37:24,38:y,40:h},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:c,17:T,18:I,19:18,20:S,21:b,22:A,23:_,24:C,25:V,26:E,27:tt,28:Z,29:rt,30:P,31:q,33:Q,35:m,36:g,37:24,38:y,40:h},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:f(function(u,d){if(d.recoverable)this.trace(u);else{var v=new Error(u);throw v.hash=d,v}},"parseError"),parse:f(function(u){var d=this,v=[0],k=[],F=[null],o=[],z=this.table,s="",U=0,R=0,$=2,O=1,J=o.slice.call(arguments,1),Y=Object.create(this.lexer),at={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(at.yy[x]=this.yy[x]);Y.setInput(u,at.yy),at.yy.lexer=Y,at.yy.parser=this,typeof Y.yylloc>"u"&&(Y.yylloc={});var W=Y.yylloc;o.push(W);var N=Y.options&&Y.options.ranges;typeof at.yy.parseError=="function"?this.parseError=at.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function l(it){v.length=v.length-2*it,F.length=F.length-it,o.length=o.length-it}f(l,"popStack");function et(){var it;return it=k.pop()||Y.lex()||O,typeof it!="number"&&(it instanceof Array&&(k=it,it=k.pop()),it=d.symbols_[it]||it),it}f(et,"lex");for(var L,X,B,ot,lt={},Bt,ft,We,qt;;){if(X=v[v.length-1],this.defaultActions[X]?B=this.defaultActions[X]:((L===null||typeof L>"u")&&(L=et()),B=z[X]&&z[X][L]),typeof B>"u"||!B.length||!B[0]){var se="";qt=[];for(Bt in z[X])this.terminals_[Bt]&&Bt>$&&qt.push("'"+this.terminals_[Bt]+"'");Y.showPosition?se="Parse error on line "+(U+1)+`:
- `+Y.showPosition()+`
- Expecting `+qt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":se="Parse error on line "+(U+1)+": Unexpected "+(L==O?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(se,{text:Y.match,token:this.terminals_[L]||L,line:Y.yylineno,loc:W,expected:qt})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+X+", token: "+L);switch(B[0]){case 1:v.push(L),F.push(Y.yytext),o.push(Y.yylloc),v.push(B[1]),L=null,R=Y.yyleng,s=Y.yytext,U=Y.yylineno,W=Y.yylloc;break;case 2:if(ft=this.productions_[B[1]][1],lt.$=F[F.length-ft],lt._$={first_line:o[o.length-(ft||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ft||1)].first_column,last_column:o[o.length-1].last_column},N&&(lt._$.range=[o[o.length-(ft||1)].range[0],o[o.length-1].range[1]]),ot=this.performAction.apply(lt,[s,R,U,at.yy,B[1],F,o].concat(J)),typeof ot<"u")return ot;ft&&(v=v.slice(0,-1*ft*2),F=F.slice(0,-1*ft),o=o.slice(0,-1*ft)),v.push(this.productions_[B[1]][0]),F.push(lt.$),o.push(lt._$),We=z[v[v.length-2]][v[v.length-1]],v.push(We);break;case 3:return!0}}return!0},"parse")},M=(function(){var p={EOF:1,parseError:f(function(d,v){if(this.yy.parser)this.yy.parser.parseError(d,v);else throw new Error(d)},"parseError"),setInput:f(function(u,d){return this.yy=d||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:f(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var d=u.match(/(?:\r\n?|\n).*/g);return d?(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:f(function(u){var d=u.length,v=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var k=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),v.length-1&&(this.yylineno-=v.length-1);var F=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:v?(v.length===k.length?this.yylloc.first_column:0)+k[k.length-v.length].length-v[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[F[0],F[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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).
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(u){this.unput(this.match.slice(u))},"less"),pastInput:f(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:f(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:f(function(){var u=this.pastInput(),d=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
- `+d+"^"},"showPosition"),test_match:f(function(u,d){var v,k,F;if(this.options.backtrack_lexer&&(F={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&&(F.yylloc.range=this.yylloc.range.slice(0))),k=u[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.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],v=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var o in F)this[o]=F[o];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,d,v,k;this._more||(this.yytext="",this.match="");for(var F=this._currentRules(),o=0;o<F.length;o++)if(v=this._input.match(this.rules[F[o]]),v&&(!d||v[0].length>d[0].length)){if(d=v,k=o,this.options.backtrack_lexer){if(u=this.test_match(v,F[o]),u!==!1)return u;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(u=this.test_match(d,F[k]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var d=this.next();return d||this.lex()},"lex"),begin:f(function(d){this.conditionStack.push(d)},"begin"),popState:f(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(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:f(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:f(function(d){this.begin(d)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(d,v,k,F){switch(k){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 p})();D.lexer=M;function w(){this.yy={}}return f(w,"Parser"),w.prototype=D,D.Parser=w,new w})();ve.parser=ve;var Hi=ve;nt.extend(Ai);nt.extend(qn);nt.extend(Zn);var Je={friday:5,saturday:6},ct="",Me="",Se=void 0,_e="",Rt=[],Pt=[],Fe=new Map,Ue=[],re=[],Yt="",Ie="",Dn=["active","done","crit","milestone","vert"],Ee=[],St="",zt=!1,Ye=!1,Le="sunday",ie="saturday",xe=0,Vi=f(function(){Ue=[],re=[],Yt="",Ee=[],Jt=0,we=void 0,Kt=void 0,j=[],ct="",Me="",Ie="",Se=void 0,_e="",Rt=[],Pt=[],zt=!1,Ye=!1,xe=0,Fe=new Map,St="",zn(),Le="sunday",ie="saturday"},"clear"),Ri=f(function(t){St=t},"setDiagramId"),Pi=f(function(t){Me=t},"setAxisFormat"),zi=f(function(){return Me},"getAxisFormat"),Bi=f(function(t){Se=t},"setTickInterval"),qi=f(function(){return Se},"getTickInterval"),Zi=f(function(t){_e=t},"setTodayMarker"),Xi=f(function(){return _e},"getTodayMarker"),ji=f(function(t){ct=t},"setDateFormat"),Gi=f(function(){zt=!0},"enableInclusiveEndDates"),Qi=f(function(){return zt},"endDatesAreInclusive"),Ji=f(function(){Ye=!0},"enableTopAxis"),Ki=f(function(){return Ye},"topAxisEnabled"),ts=f(function(t){Ie=t},"setDisplayMode"),es=f(function(){return Ie},"getDisplayMode"),ns=f(function(){return ct},"getDateFormat"),rs=f(function(t){Rt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),is=f(function(){return Rt},"getIncludes"),ss=f(function(t){Pt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),as=f(function(){return Pt},"getExcludes"),os=f(function(){return Fe},"getLinks"),cs=f(function(t){Yt=t,Ue.push(t)},"addSection"),us=f(function(){return Ue},"getSections"),ls=f(function(){let t=Ke();const e=10;let n=0;for(;!t&&n<e;)t=Ke(),n++;return re=j,re},"getTasks"),Mn=f(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()===Je[ie]||t.isoWeekday()===Je[ie]+1)||n.includes(t.format("dddd").toLowerCase())?!0:n.includes(i)||n.includes(a)},"isInvalidDate"),fs=f(function(t){Le=t},"setWeekday"),ds=f(function(){return Le},"getWeekday"),hs=f(function(t){ie=t},"setWeekend"),Sn=f(function(t,e,n,r){if(!n.length||t.manualEndTime)return;let i;t.startTime instanceof Date?i=nt(t.startTime):i=nt(t.startTime,e,!0),i=i.add(1,"d");let a;t.endTime instanceof Date?a=nt(t.endTime):a=nt(t.endTime,e,!0);const[c,T]=ms(i,a,e,n,r);t.endTime=c.toDate(),t.renderEndTime=T},"checkTaskDates"),ms=f(function(t,e,n,r,i){let a=!1,c=null;const T=e.add(1e4,"d");for(;t<=e;){if(a||(c=e.toDate()),a=Mn(t,n,r,i),a&&(e=e.add(1,"d"),e>T))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");t=t.add(1,"d")}return[e,c]},"fixTaskDates"),be=f(function(t,e,n){if(n=n.trim(),f(T=>{const I=T.trim();return I==="x"||I==="X"},"isTimestampFormat")(e)&&/^\d+$/.test(n))return new Date(Number(n));const a=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(a!==null){let T=null;for(const S of a.groups.ids.split(" ")){let b=Dt(S);b!==void 0&&(!T||b.endTime>T.endTime)&&(T=b)}if(T)return T.endTime;const I=new Date;return I.setHours(0,0,0,0),I}let c=nt(n,e.trim(),!0);if(c.isValid())return c.toDate();{Tt.debug("Invalid date:"+n),Tt.debug("With date format:"+e.trim());const T=new Date(n);if(T===void 0||isNaN(T.getTime())||T.getFullYear()<-1e4||T.getFullYear()>1e4)throw new Error("Invalid date:"+n);return T}},"getStartDate"),_n=f(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),Fn=f(function(t,e,n,r=!1){n=n.trim();const a=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(a!==null){let b=null;for(const _ of a.groups.ids.split(" ")){let C=Dt(_);C!==void 0&&(!b||C.startTime<b.startTime)&&(b=C)}if(b)return b.startTime;const A=new Date;return A.setHours(0,0,0,0),A}let c=nt(n,e.trim(),!0);if(c.isValid())return r&&(c=c.add(1,"d")),c.toDate();let T=nt(t);const[I,S]=_n(n);if(!Number.isNaN(I)){const b=T.add(I,S);b.isValid()&&(T=b)}return T.toDate()},"getEndDate"),Jt=0,Ut=f(function(t){return t===void 0?(Jt=Jt+1,"task"+Jt):t},"parseId"),gs=f(function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const r=n.split(","),i={};Ae(r,i,Dn);for(let c=0;c<r.length;c++)r[c]=r[c].trim();let a="";switch(r.length){case 1:i.id=Ut(),i.startTime=t.endTime,a=r[0];break;case 2:i.id=Ut(),i.startTime=be(void 0,ct,r[0]),a=r[1];break;case 3:i.id=Ut(r[0]),i.startTime=be(void 0,ct,r[1]),a=r[2];break}return a&&(i.endTime=Fn(i.startTime,ct,a,zt),i.manualEndTime=nt(a,"YYYY-MM-DD",!0).isValid(),Sn(i,ct,Pt,Rt)),i},"compileData"),ys=f(function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const r=n.split(","),i={};Ae(r,i,Dn);for(let a=0;a<r.length;a++)r[a]=r[a].trim();switch(r.length){case 1:i.id=Ut(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:r[0]};break;case 2:i.id=Ut(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=Ut(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]};break}return i},"parseData"),we,Kt,j=[],Un={},ks=f(function(t,e){const n={section:Yt,type:Yt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=ys(Kt,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=Kt,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,n.order=xe,xe++;const i=j.push(n);Kt=n.id,Un[n.id]=i-1},"addTask"),Dt=f(function(t){const e=Un[t];return j[e]},"findTaskById"),ps=f(function(t,e){const n={section:Yt,type:Yt,description:t,task:t,classes:[]},r=gs(we,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,we=n,re.push(n)},"addTaskOrg"),Ke=f(function(){const t=f(function(n){const r=j[n];let i="";switch(j[n].raw.startTime.type){case"prevTaskEnd":{const a=Dt(r.prevTaskId);r.startTime=a.endTime;break}case"getStartDate":i=be(void 0,ct,j[n].raw.startTime.startData),i&&(j[n].startTime=i);break}return j[n].startTime&&(j[n].endTime=Fn(j[n].startTime,ct,j[n].raw.endTime.data,zt),j[n].endTime&&(j[n].processed=!0,j[n].manualEndTime=nt(j[n].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Sn(j[n],ct,Pt,Rt))),j[n].processed},"compileTask");let e=!0;for(const[n,r]of j.entries())t(n),e=e&&r.processed;return e},"compileTasks"),Ts=f(function(t,e){let n=e;_t().securityLevel!=="loose"&&(n=Pn.sanitizeUrl(e)),t.split(",").forEach(function(r){Dt(r)!==void 0&&(En(r,()=>{window.open(n,"_self")}),Fe.set(r,n))}),In(t,"clickable")},"setLink"),In=f(function(t,e){t.split(",").forEach(function(n){let r=Dt(n);r!==void 0&&r.classes.push(e)})},"setClass"),vs=f(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 c=r[a].trim();c.startsWith('"')&&c.endsWith('"')&&(c=c.substr(1,c.length-2)),r[a]=c}}r.length===0&&r.push(t),Dt(t)!==void 0&&En(t,()=>{Bn.runFunc(e,...r)})},"setClickFun"),En=f(function(t,e){Ee.push(function(){const n=St?`${St}-${t}`:t,r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){const n=St?`${St}-${t}`:t,r=document.querySelector(`[id="${n}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},"pushFun"),xs=f(function(t,e,n){t.split(",").forEach(function(r){vs(r,e,n)}),In(t,"clickable")},"setClickEvent"),bs=f(function(t){Ee.forEach(function(e){e(t)})},"bindFunctions"),ws={getConfig:f(()=>_t().gantt,"getConfig"),clear:Vi,setDateFormat:ji,getDateFormat:ns,enableInclusiveEndDates:Gi,endDatesAreInclusive:Qi,enableTopAxis:Ji,topAxisEnabled:Ki,setAxisFormat:Pi,getAxisFormat:zi,setTickInterval:Bi,getTickInterval:qi,setTodayMarker:Zi,getTodayMarker:Xi,setAccTitle:Hn,getAccTitle:Nn,setDiagramTitle:$n,getDiagramTitle:On,setDiagramId:Ri,setDisplayMode:ts,getDisplayMode:es,setAccDescription:Wn,getAccDescription:An,addSection:cs,getSections:us,getTasks:ls,addTask:ks,findTaskById:Dt,addTaskOrg:ps,setIncludes:rs,getIncludes:is,setExcludes:ss,getExcludes:as,setClickEvent:xs,setLink:Ts,getLinks:os,bindFunctions:bs,parseDuration:_n,isInvalidDate:Mn,setWeekday:fs,getWeekday:ds,setWeekend:hs};function Ae(t,e,n){let r=!0;for(;r;)r=!1,n.forEach(function(i){const a="^\\s*"+i+"\\s*$",c=new RegExp(a);t[0].match(c)&&(e[i]=!0,t.shift(1),r=!0)})}f(Ae,"getTaskTags");nt.extend(Ni);var Cs=f(function(){Tt.debug("Something is calling, setConf, remove the call")},"setConf"),tn={monday:Nt,tuesday:gn,wednesday:yn,thursday:xt,friday:kn,saturday:pn,sunday:Vt},Ds=f((t,e)=>{let n=[...t].map(()=>-1/0),r=[...t].sort((a,c)=>a.startTime-c.startTime||a.order-c.order),i=0;for(const a of r)for(let c=0;c<n.length;c++)if(a.startTime>=n[c]){n[c]=a.endTime,a.order=c+e,c>i&&(i=c);break}return i},"getMaxIntersections"),dt,ke=1e4,Ms=f(function(t,e,n,r){const i=_t().gantt;r.db.setDiagramId(e);const a=_t().securityLevel;let c;a==="sandbox"&&(c=Zt("#i"+e));const T=a==="sandbox"?Zt(c.nodes()[0].contentDocument.body):Zt("body"),I=a==="sandbox"?c.nodes()[0].contentDocument:document,S=I.getElementById(e);dt=S.parentElement.offsetWidth,dt===void 0&&(dt=1200),i.useWidth!==void 0&&(dt=i.useWidth);const b=r.db.getTasks();let A=[];for(const h of b)A.push(h.type);A=y(A);const _={};let C=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const h={};for(const M of b)h[M.section]===void 0?h[M.section]=[M]:h[M.section].push(M);let D=0;for(const M of Object.keys(h)){const w=Ds(h[M],D)+1;D+=w,C+=w*(i.barHeight+i.barGap),_[M]=w}}else{C+=b.length*(i.barHeight+i.barGap);for(const h of A)_[h]=b.filter(D=>D.type===h).length}S.setAttribute("viewBox","0 0 "+dt+" "+C);const V=T.select(`[id="${e}"]`),E=Ii().domain([tr(b,function(h){return h.startTime}),Kn(b,function(h){return h.endTime})]).rangeRound([0,dt-i.leftPadding-i.rightPadding]);function tt(h,D){const M=h.startTime,w=D.startTime;let p=0;return M>w?p=1:M<w&&(p=-1),p}f(tt,"taskCompare"),b.sort(tt),Z(b,dt,C),Vn(V,C,dt,i.useMaxWidth),V.append("text").text(r.db.getDiagramTitle()).attr("x",dt/2).attr("y",i.titleTopMargin).attr("class","titleText");function Z(h,D,M){const w=i.barHeight,p=w+i.barGap,u=i.topPadding,d=i.leftPadding,v=Qn().domain([0,A.length]).range(["#00B9FA","#F95002"]).interpolate(gr);P(p,u,d,D,M,h,r.db.getExcludes(),r.db.getIncludes()),Q(d,u,D,M),rt(h,p,u,d,w,v,D),m(p,u),g(d,u,D,M)}f(Z,"makeGantt");function rt(h,D,M,w,p,u,d){h.sort((s,U)=>s.vert===U.vert?0:s.vert?1:-1);const k=[...new Set(h.map(s=>s.order))].map(s=>h.find(U=>U.order===s));V.append("g").selectAll("rect").data(k).enter().append("rect").attr("x",0).attr("y",function(s,U){return U=s.order,U*D+M-2}).attr("width",function(){return d-i.rightPadding/2}).attr("height",D).attr("class",function(s){for(const[U,R]of A.entries())if(s.type===R)return"section section"+U%i.numberSectionStyles;return"section section0"}).enter();const F=V.append("g").selectAll("rect").data(h).enter(),o=r.db.getLinks();if(F.append("rect").attr("id",function(s){return e+"-"+s.id}).attr("rx",3).attr("ry",3).attr("x",function(s){return s.milestone?E(s.startTime)+w+.5*(E(s.endTime)-E(s.startTime))-.5*p:E(s.startTime)+w}).attr("y",function(s,U){return U=s.order,s.vert?i.gridLineStartPadding:U*D+M}).attr("width",function(s){return s.milestone?p:s.vert?.08*p:E(s.renderEndTime||s.endTime)-E(s.startTime)}).attr("height",function(s){return s.vert?b.length*(i.barHeight+i.barGap)+i.barHeight*2:p}).attr("transform-origin",function(s,U){return U=s.order,(E(s.startTime)+w+.5*(E(s.endTime)-E(s.startTime))).toString()+"px "+(U*D+M+.5*p).toString()+"px"}).attr("class",function(s){const U="task";let R="";s.classes.length>0&&(R=s.classes.join(" "));let $=0;for(const[J,Y]of A.entries())s.type===Y&&($=J%i.numberSectionStyles);let O="";return s.active?s.crit?O+=" activeCrit":O=" active":s.done?s.crit?O=" doneCrit":O=" done":s.crit&&(O+=" crit"),O.length===0&&(O=" task"),s.milestone&&(O=" milestone "+O),s.vert&&(O=" vert "+O),O+=$,O+=" "+R,U+O}),F.append("text").attr("id",function(s){return e+"-"+s.id+"-text"}).text(function(s){return s.task}).attr("font-size",i.fontSize).attr("x",function(s){let U=E(s.startTime),R=E(s.renderEndTime||s.endTime);if(s.milestone&&(U+=.5*(E(s.endTime)-E(s.startTime))-.5*p,R=U+p),s.vert)return E(s.startTime)+w;const $=this.getBBox().width;return $>R-U?R+$+1.5*i.leftPadding>d?U+w-5:R+w+5:(R-U)/2+U+w}).attr("y",function(s,U){return s.vert?i.gridLineStartPadding+b.length*(i.barHeight+i.barGap)+60:(U=s.order,U*D+i.barHeight/2+(i.fontSize/2-2)+M)}).attr("text-height",p).attr("class",function(s){const U=E(s.startTime);let R=E(s.endTime);s.milestone&&(R=U+p);const $=this.getBBox().width;let O="";s.classes.length>0&&(O=s.classes.join(" "));let J=0;for(const[at,x]of A.entries())s.type===x&&(J=at%i.numberSectionStyles);let Y="";return s.active&&(s.crit?Y="activeCritText"+J:Y="activeText"+J),s.done?s.crit?Y=Y+" doneCritText"+J:Y=Y+" doneText"+J:s.crit&&(Y=Y+" critText"+J),s.milestone&&(Y+=" milestoneText"),s.vert&&(Y+=" vertText"),$>R-U?R+$+1.5*i.leftPadding>d?O+" taskTextOutsideLeft taskTextOutside"+J+" "+Y:O+" taskTextOutsideRight taskTextOutside"+J+" "+Y+" width-"+$:O+" taskText taskText"+J+" "+Y+" width-"+$}),_t().securityLevel==="sandbox"){let s;s=Zt("#i"+e);const U=s.nodes()[0].contentDocument;F.filter(function(R){return o.has(R.id)}).each(function(R){var $=U.querySelector("#"+CSS.escape(e+"-"+R.id)),O=U.querySelector("#"+CSS.escape(e+"-"+R.id+"-text"));const J=$.parentNode;var Y=U.createElement("a");Y.setAttribute("xlink:href",o.get(R.id)),Y.setAttribute("target","_top"),J.appendChild(Y),Y.appendChild($),Y.appendChild(O)})}}f(rt,"drawRects");function P(h,D,M,w,p,u,d,v){if(d.length===0&&v.length===0)return;let k,F;for(const{startTime:$,endTime:O}of u)(k===void 0||$<k)&&(k=$),(F===void 0||O>F)&&(F=O);if(!k||!F)return;if(nt(F).diff(nt(k),"year")>5){Tt.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 o=r.db.getDateFormat(),z=[];let s=null,U=nt(k);for(;U.valueOf()<=F;)r.db.isInvalidDate(U,o,d,v)?s?s.end=U:s={start:U,end:U}:s&&(z.push(s),s=null),U=U.add(1,"d");V.append("g").selectAll("rect").data(z).enter().append("rect").attr("id",$=>e+"-exclude-"+$.start.format("YYYY-MM-DD")).attr("x",$=>E($.start.startOf("day"))+M).attr("y",i.gridLineStartPadding).attr("width",$=>E($.end.endOf("day"))-E($.start.startOf("day"))).attr("height",p-D-i.gridLineStartPadding).attr("transform-origin",function($,O){return(E($.start)+M+.5*(E($.end)-E($.start))).toString()+"px "+(O*h+.5*p).toString()+"px"}).attr("class","exclude-range")}f(P,"drawExcludeDays");function q(h,D,M,w){if(M<=0||h>D)return 1/0;const p=D-h,u=nt.duration({[w??"day"]:M}).asMilliseconds();return u<=0?1/0:Math.ceil(p/u)}f(q,"getEstimatedTickCount");function Q(h,D,M,w){const p=r.db.getDateFormat(),u=r.db.getAxisFormat();let d;u?d=u:p==="D"?d="%d":d=i.axisFormat??"%Y-%m-%d";let v=cr(E).tickSize(-w+D+i.gridLineStartPadding).tickFormat(ne(d));const F=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(F!==null){const o=parseInt(F[1],10);if(isNaN(o)||o<=0)Tt.warn(`Invalid tick interval value: "${F[1]}". Skipping custom tick interval.`);else{const z=F[2],s=r.db.getWeekday()||i.weekday,U=E.domain(),R=U[0],$=U[1],O=q(R,$,o,z);if(O>ke)Tt.warn(`The tick interval "${o}${z}" would generate ${O} ticks, which exceeds the maximum allowed (${ke}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(z){case"millisecond":v.ticks(It.every(o));break;case"second":v.ticks(pt.every(o));break;case"minute":v.ticks(Ot.every(o));break;case"hour":v.ticks($t.every(o));break;case"day":v.ticks(vt.every(o));break;case"week":v.ticks(tn[s].every(o));break;case"month":v.ticks(Ht.every(o));break}}}if(V.append("g").attr("class","grid").attr("transform","translate("+h+", "+(w-50)+")").call(v).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 o=or(E).tickSize(-w+D+i.gridLineStartPadding).tickFormat(ne(d));if(F!==null){const z=parseInt(F[1],10);if(isNaN(z)||z<=0)Tt.warn(`Invalid tick interval value: "${F[1]}". Skipping custom tick interval.`);else{const s=F[2],U=r.db.getWeekday()||i.weekday,R=E.domain(),$=R[0],O=R[1];if(q($,O,z,s)<=ke)switch(s){case"millisecond":o.ticks(It.every(z));break;case"second":o.ticks(pt.every(z));break;case"minute":o.ticks(Ot.every(z));break;case"hour":o.ticks($t.every(z));break;case"day":o.ticks(vt.every(z));break;case"week":o.ticks(tn[U].every(z));break;case"month":o.ticks(Ht.every(z));break}}}V.append("g").attr("class","grid").attr("transform","translate("+h+", "+D+")").call(o).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}f(Q,"makeGrid");function m(h,D){let M=0;const w=Object.keys(_).map(p=>[p,_[p]]);V.append("g").selectAll("text").data(w).enter().append(function(p){const u=p[0].split(Rn.lineBreakRegex),d=-(u.length-1)/2,v=I.createElementNS("http://www.w3.org/2000/svg","text");v.setAttribute("dy",d+"em");for(const[k,F]of u.entries()){const o=I.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttribute("alignment-baseline","central"),o.setAttribute("x","10"),k>0&&o.setAttribute("dy","1em"),o.textContent=F,v.appendChild(o)}return v}).attr("x",10).attr("y",function(p,u){if(u>0)for(let d=0;d<u;d++)return M+=w[u-1][1],p[1]*h/2+M*h+D;else return p[1]*h/2+D}).attr("font-size",i.sectionFontSize).attr("class",function(p){for(const[u,d]of A.entries())if(p[0]===d)return"sectionTitle sectionTitle"+u%i.numberSectionStyles;return"sectionTitle"})}f(m,"vertLabels");function g(h,D,M,w){const p=r.db.getTodayMarker();if(p==="off")return;const u=V.append("g").attr("class","today"),d=new Date,v=u.append("line");v.attr("x1",E(d)+h).attr("x2",E(d)+h).attr("y1",i.titleTopMargin).attr("y2",w-i.titleTopMargin).attr("class","today"),p!==""&&v.attr("style",p.replace(/,/g,";"))}f(g,"drawToday");function y(h){const D={},M=[];for(let w=0,p=h.length;w<p;++w)Object.prototype.hasOwnProperty.call(D,h[w])||(D[h[w]]=!0,M.push(h[w]));return M}f(y,"checkUnique")},"draw"),Ss={setConf:Cs,draw:Ms},_s=f(t=>`
- .mermaid-main-font {
- font-family: ${t.fontFamily};
- }
- .exclude-range {
- fill: ${t.excludeBkgColor};
- }
- .section {
- stroke: none;
- opacity: 0.2;
- }
- .section0 {
- fill: ${t.sectionBkgColor};
- }
- .section2 {
- fill: ${t.sectionBkgColor2};
- }
- .section1,
- .section3 {
- fill: ${t.altSectionBkgColor};
- opacity: 0.2;
- }
- .sectionTitle0 {
- fill: ${t.titleColor};
- }
- .sectionTitle1 {
- fill: ${t.titleColor};
- }
- .sectionTitle2 {
- fill: ${t.titleColor};
- }
- .sectionTitle3 {
- fill: ${t.titleColor};
- }
- .sectionTitle {
- text-anchor: start;
- font-family: ${t.fontFamily};
- }
- /* Grid and axis */
- .grid .tick {
- stroke: ${t.gridColor};
- opacity: 0.8;
- shape-rendering: crispEdges;
- }
- .grid .tick text {
- font-family: ${t.fontFamily};
- fill: ${t.textColor};
- }
- .grid path {
- stroke-width: 0;
- }
- /* Today line */
- .today {
- fill: none;
- stroke: ${t.todayLineColor};
- stroke-width: 2px;
- }
- /* Task styling */
- /* Default task */
- .task {
- stroke-width: 2;
- }
- .taskText {
- text-anchor: middle;
- font-family: ${t.fontFamily};
- }
- .taskTextOutsideRight {
- fill: ${t.taskTextDarkColor};
- text-anchor: start;
- font-family: ${t.fontFamily};
- }
- .taskTextOutsideLeft {
- fill: ${t.taskTextDarkColor};
- text-anchor: end;
- }
- /* Special case clickable */
- .task.clickable {
- cursor: pointer;
- }
- .taskText.clickable {
- cursor: pointer;
- fill: ${t.taskTextClickableColor} !important;
- font-weight: bold;
- }
- .taskTextOutsideLeft.clickable {
- cursor: pointer;
- fill: ${t.taskTextClickableColor} !important;
- font-weight: bold;
- }
- .taskTextOutsideRight.clickable {
- cursor: pointer;
- fill: ${t.taskTextClickableColor} !important;
- font-weight: bold;
- }
- /* Specific task settings for the sections*/
- .taskText0,
- .taskText1,
- .taskText2,
- .taskText3 {
- fill: ${t.taskTextColor};
- }
- .task0,
- .task1,
- .task2,
- .task3 {
- fill: ${t.taskBkgColor};
- stroke: ${t.taskBorderColor};
- }
- .taskTextOutside0,
- .taskTextOutside2
- {
- fill: ${t.taskTextOutsideColor};
- }
- .taskTextOutside1,
- .taskTextOutside3 {
- fill: ${t.taskTextOutsideColor};
- }
- /* Active task */
- .active0,
- .active1,
- .active2,
- .active3 {
- fill: ${t.activeTaskBkgColor};
- stroke: ${t.activeTaskBorderColor};
- }
- .activeText0,
- .activeText1,
- .activeText2,
- .activeText3 {
- fill: ${t.taskTextDarkColor} !important;
- }
- /* Completed task */
- .done0,
- .done1,
- .done2,
- .done3 {
- stroke: ${t.doneTaskBorderColor};
- fill: ${t.doneTaskBkgColor};
- stroke-width: 2;
- }
- .doneText0,
- .doneText1,
- .doneText2,
- .doneText3 {
- fill: ${t.taskTextDarkColor} !important;
- }
- /* Done task text displayed outside the bar sits against the diagram background,
- not against the done-task bar, so it must use the outside/contrast color. */
- .doneText0.taskTextOutsideLeft,
- .doneText0.taskTextOutsideRight,
- .doneText1.taskTextOutsideLeft,
- .doneText1.taskTextOutsideRight,
- .doneText2.taskTextOutsideLeft,
- .doneText2.taskTextOutsideRight,
- .doneText3.taskTextOutsideLeft,
- .doneText3.taskTextOutsideRight {
- fill: ${t.taskTextOutsideColor} !important;
- }
- /* Tasks on the critical line */
- .crit0,
- .crit1,
- .crit2,
- .crit3 {
- stroke: ${t.critBorderColor};
- fill: ${t.critBkgColor};
- stroke-width: 2;
- }
- .activeCrit0,
- .activeCrit1,
- .activeCrit2,
- .activeCrit3 {
- stroke: ${t.critBorderColor};
- fill: ${t.activeTaskBkgColor};
- stroke-width: 2;
- }
- .doneCrit0,
- .doneCrit1,
- .doneCrit2,
- .doneCrit3 {
- stroke: ${t.critBorderColor};
- fill: ${t.doneTaskBkgColor};
- stroke-width: 2;
- cursor: pointer;
- shape-rendering: crispEdges;
- }
- .milestone {
- transform: rotate(45deg) scale(0.8,0.8);
- }
- .milestoneText {
- font-style: italic;
- }
- .doneCritText0,
- .doneCritText1,
- .doneCritText2,
- .doneCritText3 {
- fill: ${t.taskTextDarkColor} !important;
- }
- /* Done-crit task text outside the bar — same reasoning as doneText above. */
- .doneCritText0.taskTextOutsideLeft,
- .doneCritText0.taskTextOutsideRight,
- .doneCritText1.taskTextOutsideLeft,
- .doneCritText1.taskTextOutsideRight,
- .doneCritText2.taskTextOutsideLeft,
- .doneCritText2.taskTextOutsideRight,
- .doneCritText3.taskTextOutsideLeft,
- .doneCritText3.taskTextOutsideRight {
- fill: ${t.taskTextOutsideColor} !important;
- }
- .vert {
- stroke: ${t.vertLineColor};
- }
- .vertText {
- font-size: 15px;
- text-anchor: middle;
- fill: ${t.vertLineColor} !important;
- }
- .activeCritText0,
- .activeCritText1,
- .activeCritText2,
- .activeCritText3 {
- fill: ${t.taskTextDarkColor} !important;
- }
- .titleText {
- text-anchor: middle;
- font-size: 18px;
- fill: ${t.titleColor||t.textColor};
- font-family: ${t.fontFamily};
- }
- `,"getStyles"),Fs=_s,Ls={parser:Hi,db:ws,renderer:Ss,styles:Fs};export{Ls as diagram};
|