@hardikg/mdview 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +6 -5
- package/bin/mdview.mjs +89 -73
- package/dist/client/assets/{abnfDiagram-VCTEODGH-DafRYfx3.js → abnfDiagram-VCTEODGH-d5-zUW3h.js} +1 -1
- package/dist/client/assets/{arc-BqKZ1e2b.js → arc-DIbSNhHb.js} +1 -1
- package/dist/client/assets/{architectureDiagram-5GKGNRK7-_94hPNdL.js → architectureDiagram-5GKGNRK7-Cq_KBCV9.js} +1 -1
- package/dist/client/assets/{blockDiagram-NRAW4CY4-BegJqAzx.js → blockDiagram-NRAW4CY4-CKgrJGzB.js} +1 -1
- package/dist/client/assets/{c4Diagram-UCG6FXSJ-DYBJe_j-.js → c4Diagram-UCG6FXSJ-CamsXU_i.js} +1 -1
- package/dist/client/assets/channel-MJp4QxQY.js +1 -0
- package/dist/client/assets/{chunk-2Q5K7J3B-CarNPuoG.js → chunk-2Q5K7J3B-DHB85OBA.js} +1 -1
- package/dist/client/assets/{chunk-5VM5RSS4-Bmb8JM_j.js → chunk-5VM5RSS4-C3v07bfZ.js} +1 -1
- package/dist/client/assets/{chunk-F27PBJKO-BhLIUyGL.js → chunk-F27PBJKO-bDA5q_T9.js} +1 -1
- package/dist/client/assets/{chunk-G27WJ6UU-B_7t7iym.js → chunk-G27WJ6UU-DjS6mkGt.js} +1 -1
- package/dist/client/assets/{chunk-JWPE2WC7-6WDfZVE5.js → chunk-JWPE2WC7-ln94eTAD.js} +1 -1
- package/dist/client/assets/{chunk-LCL6LL3I-BnM13fhY.js → chunk-LCL6LL3I-SEXOnCPG.js} +1 -1
- package/dist/client/assets/{chunk-POPQ4Y6H-DQMWRZKQ.js → chunk-POPQ4Y6H-Dpgmgmgq.js} +1 -1
- package/dist/client/assets/{chunk-SVP7TREG-DPpw4ke1.js → chunk-SVP7TREG-C_qgSQCy.js} +1 -1
- package/dist/client/assets/{chunk-XXDRQBXY-ByC-zeqG.js → chunk-XXDRQBXY-CguISEfl.js} +1 -1
- package/dist/client/assets/classDiagram-DTDB5LWJ-BlbBfPMZ.js +1 -0
- package/dist/client/assets/classDiagram-v2-JRS7N3AN-BlbBfPMZ.js +1 -0
- package/dist/client/assets/{cose-bilkent-JH36ORCC-CiRnFlQp.js → cose-bilkent-JH36ORCC-CjtLn09K.js} +1 -1
- package/dist/client/assets/{cynefin-OW5HDTMX-DqTFYole.js → cynefin-OW5HDTMX-BgNmTgCR.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-B1WAhR06.js → cynefinDiagram-5FMLGOSQ-BFfuQ7YY.js} +1 -1
- package/dist/client/assets/{dagre-3AP2YEHR-DQK5a43-.js → dagre-3AP2YEHR-BDLHOy1Z.js} +1 -1
- package/dist/client/assets/{diagram-S7CK7UJ4-BMQ8dao_.js → diagram-S7CK7UJ4-CfzUQiTU.js} +1 -1
- package/dist/client/assets/{diagram-UQ7AKVKN-CT7KIFG4.js → diagram-UQ7AKVKN-Ds3lTKuY.js} +1 -1
- package/dist/client/assets/{diagram-VSXAHHWV-By0SbfXs.js → diagram-VSXAHHWV-lwAuvia3.js} +1 -1
- package/dist/client/assets/{diagram-VX7I27RA-DwshpqNi.js → diagram-VX7I27RA-CsU4EPwU.js} +1 -1
- package/dist/client/assets/{diagram-Z3DM3KII-CG7wA7Kr.js → diagram-Z3DM3KII-DFieIgnM.js} +1 -1
- package/dist/client/assets/{ebnfDiagram-PWID7BFC-XlNRbCZw.js → ebnfDiagram-PWID7BFC-BzR_CBzj.js} +1 -1
- package/dist/client/assets/{erDiagram-SSCWMZ5O-BtDUPrpL.js → erDiagram-SSCWMZ5O-joYlyDrM.js} +1 -1
- package/dist/client/assets/{flowDiagram-A5DVABFB-DKJ5hkO-.js → flowDiagram-A5DVABFB-DVyMxsTJ.js} +1 -1
- package/dist/client/assets/{ganttDiagram-EL5Y4UJY-B8rnbHA1.js → ganttDiagram-EL5Y4UJY-Cf4FwZsI.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-Conc20s7.js → gitGraphDiagram-WWUBYQGX-9grceorS.js} +1 -1
- package/dist/client/assets/index-7zMmn_PY.js +2 -0
- package/dist/client/assets/index-CcKPW3Oc.css +1 -0
- package/dist/client/assets/{infoDiagram-RXCK75RN-DNuHlrdu.js → infoDiagram-RXCK75RN-ja-7F4cO.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-5VMMS53U-DkYaQbSy.js → ishikawaDiagram-5VMMS53U-uRRSMmsi.js} +1 -1
- package/dist/client/assets/{journeyDiagram-EYS64GPL-BdoQruin.js → journeyDiagram-EYS64GPL-BdD_OYKc.js} +1 -1
- package/dist/client/assets/{kanban-definition-3QL26DDD-BD3QQjwp.js → kanban-definition-3QL26DDD-3rMqnFFk.js} +1 -1
- package/dist/client/assets/{layout-DKu9QfZ6.js → layout-3dyJkKek.js} +1 -1
- package/dist/client/assets/{linear-DMmTRDu2.js → linear-B49R1aTA.js} +1 -1
- package/dist/client/assets/{mermaid.core-2ESgyZ95.js → mermaid.core-CVM43n3z.js} +5 -5
- package/dist/client/assets/{mindmap-definition-FBJOCRG2-CokK9_yg.js → mindmap-definition-FBJOCRG2-B8QesUuH.js} +1 -1
- package/dist/client/assets/{pegDiagram-XKGWAZYB-CUAn26Uv.js → pegDiagram-XKGWAZYB-BeO8X3By.js} +1 -1
- package/dist/client/assets/{pieDiagram-E7YTZNPT-BT-XLIyl.js → pieDiagram-E7YTZNPT-DD3M93Je.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-AXDQQJYC-dDr-ZgjR.js → quadrantDiagram-AXDQQJYC-LxJ8Qxzg.js} +1 -1
- package/dist/client/assets/{railroadDiagram-O6MQD6OU-B5rCSICc.js → railroadDiagram-O6MQD6OU-Cc6-wuTB.js} +1 -1
- package/dist/client/assets/{requirementDiagram-EFPCY7ZU-DyI3FGB5.js → requirementDiagram-EFPCY7ZU-D-vaSng7.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-P5KCCOFB-CGXj8eCe.js → sankeyDiagram-P5KCCOFB-C-SrB4wj.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-C3yr2FVq.js → sequenceDiagram-WJ2MYXX4-BpUTXTa1.js} +1 -1
- package/dist/client/assets/{sizeCapture-X5ZJPWSS-CCnkSxko.js → sizeCapture-X5ZJPWSS-BG1rRkMg.js} +1 -1
- package/dist/client/assets/{stateDiagram-HBIQ2CUA-BG5Dshx6.js → stateDiagram-HBIQ2CUA-CAsJ9kP3.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-4QOOHH4V-ssPfmTD6.js +1 -0
- package/dist/client/assets/{swimlanes-XN3QIQJK-MGfvzMlQ.js → swimlanes-XN3QIQJK-DH5txxCi.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-VK2B7HYN-Cqi1auey.js +8 -0
- package/dist/client/assets/{timeline-definition-24CTP7MA-Bj3gMrOq.js → timeline-definition-24CTP7MA-DPSR_k-5.js} +1 -1
- package/dist/client/assets/{vennDiagram-4TSXK5OY-CiIW_j8g.js → vennDiagram-4TSXK5OY-CRMSJqLq.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-VM6X3IG4-DQTIyknP.js → wardleyDiagram-VM6X3IG4-DRCnYQxB.js} +1 -1
- package/dist/client/assets/{xychartDiagram-S5SC5T6Z-Bg0tzmhJ.js → xychartDiagram-S5SC5T6Z-x5N3gqvJ.js} +1 -1
- package/dist/client/bootstrap.js +13 -2
- package/dist/client/index.html +2 -2
- package/package.json +2 -2
- package/dist/client/assets/channel-CzMcbnuI.js +0 -1
- package/dist/client/assets/classDiagram-DTDB5LWJ-RvAHOW66.js +0 -1
- package/dist/client/assets/classDiagram-v2-JRS7N3AN-RvAHOW66.js +0 -1
- package/dist/client/assets/index-CCiGr1hz.js +0 -2
- package/dist/client/assets/index-CJ5_G3gC.css +0 -1
- package/dist/client/assets/stateDiagram-v2-4QOOHH4V-BdraFugH.js +0 -1
- package/dist/client/assets/swimlanesDiagram-VK2B7HYN-LQu07Za2.js +0 -8
package/dist/client/assets/{ganttDiagram-EL5Y4UJY-B8rnbHA1.js → ganttDiagram-EL5Y4UJY-Cf4FwZsI.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bg as on,bh as On,bi as cn,bj as un,bk as ln,bl as ue,bm as Hn,b5 as oe,g as Nn,s as Pn,o as Vn,n as Rn,a as zn,b as qn,_ as d,c as Yt,j as Zt,d as Bn,bn as it,l as Tt,k as Zn,G as Xn,p as Gn,x as jn}from"./mermaid.core-2ESgyZ95.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-DMmTRDu2.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-CCiGr1hz.js";import"./defaultLocale-DX6XiGOO.js";function nr(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 rr(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 ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(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=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(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)*hr;return new ht(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function be(t,e,n,r){return arguments.length===1?yr(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 pn(t){if(isNaN(t.h))return new ft(t.l,0,0,t.opacity);var e=t.h*dr;return new ft(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}cn(ht,be,un(ln,{brighter(t){return new ht(this.h,this.c,this.l+ne*(t??1),this.opacity)},darker(t){return new ht(this.h,this.c,this.l-ne*(t??1),this.opacity)},rgb(){return pn(this).rgb()}}));function kr(t){return function(e,n){var r=t((e=be(e)).h,(n=be(n)).h),i=ue(e.c,n.c),s=ue(e.l,n.l),a=ue(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=s(y),e.opacity=a(y),e+""}}}const pr=kr(Hn);function vr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const ge=new Date,ye=new Date;function nt(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a<y-s?a:y},i.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s<a)||!(y>0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(S<s&&s<a);return F},i.filter=s=>nt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(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)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(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());Rt.range;const Sr=nt(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());Sr.range;const kt=nt(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:nt(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 wt=nt(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());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(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)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=w<S;_&&([S,w]=[w,S]);const Y=P&&typeof P.range=="function"?P:F(S,w,P),X=Y?Y.range(S,+w+1):[];return _?X.reverse():X}function F(S,w,P){const _=Math.abs(w-S)/P,Y=Qn(([,,v])=>v).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]<a[Y][2]/_?Y-1:Y];return X.every(B)}return[y,F]}const[Yr,Fr]=_r(kt,Rt,zt,xt,Pt,Nt);function pe(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 ve(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 $t(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Ur(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,y=t.months,F=t.shortMonths,S=Ot(i),w=Ht(i),P=Ot(s),_=Ht(s),Y=Ot(a),X=Ht(a),B=Ot(y),v=Ht(y),U=Ot(F),R=Ht(F),E={a:m,A:I,b:o,B:W,c:null,d:Xe,e:Xe,f:ti,g:li,G:di,H:Qr,I:Jr,j:Kr,L:Dn,m:ei,M:ni,p:u,q:K,Q:Qe,s:Je,S:ri,u:ii,U:si,V:ai,w:oi,W:ci,x:null,X:null,y:ui,Y:fi,Z:hi,"%":je},z={a:l,A:$,b:O,B:j,c:null,d:Ge,e:Ge,f:ki,g:Si,G:Yi,H:mi,I:gi,j:yi,L:Cn,m:pi,M:vi,p:H,q:J,Q:Qe,s:Je,S:Ti,u:xi,U:bi,V:wi,w:Di,W:Mi,x:null,X:null,y:Ci,Y:_i,Z:Fi,"%":je},G={a:x,A:C,b:M,B:D,c,d:Be,e:Be,f:Zr,g:qe,G:ze,H:Ze,I:Ze,j:Rr,L:Br,m:Vr,M:zr,p:L,q:Pr,Q:Gr,s:jr,S:qr,u:Wr,U:$r,V:Or,w:Ar,W:Hr,x:g,X:b,y:qe,Y:ze,Z:Nr,"%":Xr};E.x=T(n,E),E.X=T(r,E),E.c=T(e,E),z.x=T(n,z),z.X=T(r,z),z.c=T(e,z);function T(h,N){return function(V){var f=[],tt=-1,A=0,Q=h.length,Z,st,at;for(V instanceof Date||(V=new Date(+V));++tt<Q;)h.charCodeAt(tt)===37&&(f.push(h.slice(A,tt)),(st=Re[Z=h.charAt(++tt)])!=null?Z=h.charAt(++tt):st=Z==="e"?" ":"0",(at=N[Z])&&(Z=at(V,st)),f.push(Z),A=tt+1);return f.push(h.slice(A,tt)),f.join("")}}function k(h,N){return function(V){var f=$t(1900,void 0,1),tt=p(f,h,V+="",0),A,Q;if(tt!=V.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(f.s*1e3+("L"in f?f.L:0));if(N&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+f.p*12),f.m===void 0&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt<A;){if(f>=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function Lr(t){return t.replace(Ir,"\\$&")}function Ot(t){return new RegExp("^(?:"+t.map(Lr).join("|")+")","i")}function Ht(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(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 Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.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=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({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 Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)<T?Y:y(T)<T?X:a(T)<T?B:s(T)<T?v:r(T)<T?i(T)<T?U:R:n(T)<T?E:z)(T)}return w.invert=function(T){return new Date(P(T))},w.domain=function(T){return arguments.length?_(Array.from(T,Ii)):_().map(Ei)},w.ticks=function(T){var k=_();return t(k[0],k[k.length-1],T??10)},w.tickFormat=function(T,k){return k==null?G:S(k)},w.nice=function(T){var k=_();return(!T||typeof T.range!="function")&&(T=e(k[0],k[k.length-1],T??10)),T?_(vr(k,T)):w},w.copy=function(){return Kn(w,_n(t,e,n,r,i,s,a,y,F,S))},w}function Li(){return er.apply(_n(Yr,Fr,kt,Rt,zt,xt,Pt,Nt,vt,ie).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var jt={exports:{}},Ai=jt.exports,Ke;function Wi(){return Ke||(Ke=1,(function(t,e){(function(n,r){t.exports=r()})(Ai,(function(){var n="day";return function(r,i,s){var a=function(S){return S.add(4-S.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return a(this).year()},y.isoWeek=function(S){if(!this.$utils().u(S))return this.add(7*(S-this.isoWeek()),n);var w,P,_,Y,X=a(this),B=(w=this.isoWeekYear(),P=this.$u,_=(P?s.utc:s)().year(w).startOf("year"),Y=4-_.isoWeekday(),_.isoWeekday()>4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G<z;G+=1){var T=E[G],k=X[T],p=k&&k[0],L=k&&k[1];E[G]=L?{regex:p,parser:L}:T.replace(/^\[|\]$/g,"")}return function(x){for(var C={},M=0,D=0;M<z;M+=1){var c=E[M];if(typeof c=="string")D+=c.length;else{var g=c.regex,b=c.parser,m=x.slice(D),I=g.exec(m)[0];b.call(C,I),x=x.replace(I,"")}}return(function(o){var W=o.afternoon;if(W!==void 0){var u=o.hours;W?u<12&&(o.hours+=12):u===12&&(o.hours=0),delete o.afternoon}})(C),C}}return function(v,U,R){R.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(S=v.parseTwoDigitYear);var E=U.prototype,z=E.parse;E.parse=function(G){var T=G.date,k=G.utc,p=G.args;this.$u=k;var L=p[1];if(typeof L=="string"){var x=p[2]===!0,C=p[3]===!0,M=x||C,D=p[2];C&&(D=p[2]),F=this.$locale(),!x&&D&&(F=R.Ls[D]),this.$d=(function(m,I,o,W){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=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)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={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 L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"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],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(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:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];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:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},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:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`:
|
|
1
|
+
import{bg as on,bh as On,bi as cn,bj as un,bk as ln,bl as ue,bm as Hn,b5 as oe,g as Nn,s as Pn,o as Vn,n as Rn,a as zn,b as qn,_ as d,c as Yt,j as Zt,d as Bn,bn as it,l as Tt,k as Zn,G as Xn,p as Gn,x as jn}from"./mermaid.core-CVM43n3z.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-B49R1aTA.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-7zMmn_PY.js";import"./defaultLocale-DX6XiGOO.js";function nr(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 rr(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 ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(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=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(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)*hr;return new ht(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function be(t,e,n,r){return arguments.length===1?yr(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 pn(t){if(isNaN(t.h))return new ft(t.l,0,0,t.opacity);var e=t.h*dr;return new ft(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}cn(ht,be,un(ln,{brighter(t){return new ht(this.h,this.c,this.l+ne*(t??1),this.opacity)},darker(t){return new ht(this.h,this.c,this.l-ne*(t??1),this.opacity)},rgb(){return pn(this).rgb()}}));function kr(t){return function(e,n){var r=t((e=be(e)).h,(n=be(n)).h),i=ue(e.c,n.c),s=ue(e.l,n.l),a=ue(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=s(y),e.opacity=a(y),e+""}}}const pr=kr(Hn);function vr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const ge=new Date,ye=new Date;function nt(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a<y-s?a:y},i.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s<a)||!(y>0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(S<s&&s<a);return F},i.filter=s=>nt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(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)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(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());Rt.range;const Sr=nt(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());Sr.range;const kt=nt(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:nt(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 wt=nt(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());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(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)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=w<S;_&&([S,w]=[w,S]);const Y=P&&typeof P.range=="function"?P:F(S,w,P),X=Y?Y.range(S,+w+1):[];return _?X.reverse():X}function F(S,w,P){const _=Math.abs(w-S)/P,Y=Qn(([,,v])=>v).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]<a[Y][2]/_?Y-1:Y];return X.every(B)}return[y,F]}const[Yr,Fr]=_r(kt,Rt,zt,xt,Pt,Nt);function pe(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 ve(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 $t(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Ur(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,y=t.months,F=t.shortMonths,S=Ot(i),w=Ht(i),P=Ot(s),_=Ht(s),Y=Ot(a),X=Ht(a),B=Ot(y),v=Ht(y),U=Ot(F),R=Ht(F),E={a:m,A:I,b:o,B:W,c:null,d:Xe,e:Xe,f:ti,g:li,G:di,H:Qr,I:Jr,j:Kr,L:Dn,m:ei,M:ni,p:u,q:K,Q:Qe,s:Je,S:ri,u:ii,U:si,V:ai,w:oi,W:ci,x:null,X:null,y:ui,Y:fi,Z:hi,"%":je},z={a:l,A:$,b:O,B:j,c:null,d:Ge,e:Ge,f:ki,g:Si,G:Yi,H:mi,I:gi,j:yi,L:Cn,m:pi,M:vi,p:H,q:J,Q:Qe,s:Je,S:Ti,u:xi,U:bi,V:wi,w:Di,W:Mi,x:null,X:null,y:Ci,Y:_i,Z:Fi,"%":je},G={a:x,A:C,b:M,B:D,c,d:Be,e:Be,f:Zr,g:qe,G:ze,H:Ze,I:Ze,j:Rr,L:Br,m:Vr,M:zr,p:L,q:Pr,Q:Gr,s:jr,S:qr,u:Wr,U:$r,V:Or,w:Ar,W:Hr,x:g,X:b,y:qe,Y:ze,Z:Nr,"%":Xr};E.x=T(n,E),E.X=T(r,E),E.c=T(e,E),z.x=T(n,z),z.X=T(r,z),z.c=T(e,z);function T(h,N){return function(V){var f=[],tt=-1,A=0,Q=h.length,Z,st,at;for(V instanceof Date||(V=new Date(+V));++tt<Q;)h.charCodeAt(tt)===37&&(f.push(h.slice(A,tt)),(st=Re[Z=h.charAt(++tt)])!=null?Z=h.charAt(++tt):st=Z==="e"?" ":"0",(at=N[Z])&&(Z=at(V,st)),f.push(Z),A=tt+1);return f.push(h.slice(A,tt)),f.join("")}}function k(h,N){return function(V){var f=$t(1900,void 0,1),tt=p(f,h,V+="",0),A,Q;if(tt!=V.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(f.s*1e3+("L"in f?f.L:0));if(N&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+f.p*12),f.m===void 0&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt<A;){if(f>=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function Lr(t){return t.replace(Ir,"\\$&")}function Ot(t){return new RegExp("^(?:"+t.map(Lr).join("|")+")","i")}function Ht(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(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 Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.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=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({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 Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)<T?Y:y(T)<T?X:a(T)<T?B:s(T)<T?v:r(T)<T?i(T)<T?U:R:n(T)<T?E:z)(T)}return w.invert=function(T){return new Date(P(T))},w.domain=function(T){return arguments.length?_(Array.from(T,Ii)):_().map(Ei)},w.ticks=function(T){var k=_();return t(k[0],k[k.length-1],T??10)},w.tickFormat=function(T,k){return k==null?G:S(k)},w.nice=function(T){var k=_();return(!T||typeof T.range!="function")&&(T=e(k[0],k[k.length-1],T??10)),T?_(vr(k,T)):w},w.copy=function(){return Kn(w,_n(t,e,n,r,i,s,a,y,F,S))},w}function Li(){return er.apply(_n(Yr,Fr,kt,Rt,zt,xt,Pt,Nt,vt,ie).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var jt={exports:{}},Ai=jt.exports,Ke;function Wi(){return Ke||(Ke=1,(function(t,e){(function(n,r){t.exports=r()})(Ai,(function(){var n="day";return function(r,i,s){var a=function(S){return S.add(4-S.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return a(this).year()},y.isoWeek=function(S){if(!this.$utils().u(S))return this.add(7*(S-this.isoWeek()),n);var w,P,_,Y,X=a(this),B=(w=this.isoWeekYear(),P=this.$u,_=(P?s.utc:s)().year(w).startOf("year"),Y=4-_.isoWeekday(),_.isoWeekday()>4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G<z;G+=1){var T=E[G],k=X[T],p=k&&k[0],L=k&&k[1];E[G]=L?{regex:p,parser:L}:T.replace(/^\[|\]$/g,"")}return function(x){for(var C={},M=0,D=0;M<z;M+=1){var c=E[M];if(typeof c=="string")D+=c.length;else{var g=c.regex,b=c.parser,m=x.slice(D),I=g.exec(m)[0];b.call(C,I),x=x.replace(I,"")}}return(function(o){var W=o.afternoon;if(W!==void 0){var u=o.hours;W?u<12&&(o.hours+=12):u===12&&(o.hours=0),delete o.afternoon}})(C),C}}return function(v,U,R){R.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(S=v.parseTwoDigitYear);var E=U.prototype,z=E.parse;E.parse=function(G){var T=G.date,k=G.utc,p=G.args;this.$u=k;var L=p[1];if(typeof L=="string"){var x=p[2]===!0,C=p[3]===!0,M=x||C,D=p[2];C&&(D=p[2]),F=this.$locale(),!x&&D&&(F=R.Ls[D]),this.$d=(function(m,I,o,W){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=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)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={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 L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"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],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(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:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];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:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},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:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`:
|
|
2
2
|
`+H.showPosition()+`
|
|
3
3
|
Expecting `+Bt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":ce="Parse error on line "+(K+1)+": Unexpected "+(A==O?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(ce,{text:H.match,token:this.terminals_[A]||A,line:H.yylineno,loc:N,expected:Bt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+A);switch(Z[0]){case 1:b.push(A),I.push(H.yytext),o.push(H.yylloc),b.push(Z[1]),A=null,l=H.yyleng,u=H.yytext,K=H.yylineno,N=H.yylloc;break;case 2:if(ut=this.productions_[Z[1]][1],at.$=I[I.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},V&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),st=this.performAction.apply(at,[u,l,K,J.yy,Z[1],I,o].concat(j)),typeof st<"u")return st;ut&&(b=b.slice(0,-1*ut*2),I=I.slice(0,-1*ut),o=o.slice(0,-1*ut)),b.push(this.productions_[Z[1]][0]),I.push(at.$),o.push(at._$),He=W[b[b.length-2]][b[b.length-1]],b.push(He);break;case 3:return!0}}return!0},"parse")},C=(function(){var D={EOF:1,parseError:d(function(g,b){if(this.yy.parser)this.yy.parser.parseError(g,b);else throw new Error(g)},"parseError"),setInput:d(function(c,g){return this.yy=g||this.yy||{},this._input=c,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:d(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var g=c.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:d(function(c){var g=c.length,b=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=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),b.length-1&&(this.yylineno-=b.length-1);var I=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:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(c){this.unput(this.match.slice(c))},"less"),pastInput:d(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var c=this.pastInput(),g=new Array(c.length+1).join("-");return c+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as he}from"./chunk-2Q5K7J3B-CarNPuoG.js";import{p as $e}from"./chunk-JWPE2WC7-6WDfZVE5.js";import{o as fe,n as ge,s as ue,g as ye,a as xe,b as me,_ as $,y as Q,l as k,j as pe,c as z,x as be,z as we,p as ke,k as L,A as ve,B as Ce,C as Ee}from"./mermaid.core-2ESgyZ95.js";import{p as Be}from"./cynefin-OW5HDTMX-DqTFYole.js";import"./index-CCiGr1hz.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ce.gitGraph,D=$(()=>ve({...Te,...Q().gitGraph}),"getConfig"),i=new he(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ee({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),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:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;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 ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Ae=$(function(){i.reset(),ke()},"clear"),Se=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),Pe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),We=$(function(){return i.records.currBranch},"getCurrentBranch"),qe=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Ae,getBranchesAsObjArray:Se,getBranches:De,getCommits:Pe,getCommitsArray:se,getCurrentBranch:We,getDirection:qe,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{$e(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,A=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),J=12,ee=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),S=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Qe=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Je.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${S(s,A,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${S(s,A,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${S(s,A,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{I as he}from"./chunk-2Q5K7J3B-DHB85OBA.js";import{p as $e}from"./chunk-JWPE2WC7-ln94eTAD.js";import{o as fe,n as ge,s as ue,g as ye,a as xe,b as me,_ as $,y as Q,l as k,j as pe,c as z,x as be,z as we,p as ke,k as L,A as ve,B as Ce,C as Ee}from"./mermaid.core-CVM43n3z.js";import{p as Be}from"./cynefin-OW5HDTMX-BgNmTgCR.js";import"./index-7zMmn_PY.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ce.gitGraph,D=$(()=>ve({...Te,...Q().gitGraph}),"getConfig"),i=new he(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ee({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),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:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;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 ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Ae=$(function(){i.reset(),ke()},"clear"),Se=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),Pe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),We=$(function(){return i.records.currBranch},"getCurrentBranch"),qe=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Ae,getBranchesAsObjArray:Se,getBranches:De,getCommits:Pe,getCommitsArray:se,getCurrentBranch:We,getDirection:qe,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{$e(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,A=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),J=12,ee=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),S=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Qe=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Je.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${S(s,A,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${S(s,A,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${S(s,A,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${o-n/2-M/2},${u+I}
|
|
3
3
|
${o-n/2-M/2},${u-I}
|
|
4
4
|
${t.posWithOffset-n/2-M},${u-x-I}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();var Ve,E,On,Dn,J,en,Kn,Un,rt,Se,de,Wn,Ot,ft,pt,Me={},He=[],Ji=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,je=Array.isArray;function B(e,t){for(var n in t)e[n]=t[n];return e}function Dt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Gi(e,t,n){var i,r,o,a={};for(o in t)o=="key"?i=t[o]:o=="ref"?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Ve.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Ee(e,a,i,r,null)}function Ee(e,t,n,i,r){var o={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++On,__i:-1,__u:0};return r==null&&E.vnode!=null&&E.vnode(o),o}function ee(e){return e.children}function he(e,t){this.props=e,this.context=t}function ae(e,t){if(t==null)return e.__?ae(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?ae(e):null}function Xi(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,i=[],r=[],o=B({},t);o.__v=t.__v+1,E.vnode&&E.vnode(o),Kt(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,i,n??ae(t),!!(32&t.__u),r),o.__v=t.__v,o.__.__k[o.__i]=o,Vn(i,o,r),t.__e=t.__=null,o.__e!=n&&Bn(o)}}function Bn(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Bn(e)}function tn(e){(!e.__d&&(e.__d=!0)&&J.push(e)&&!Re.__r++||en!=E.debounceRendering)&&((en=E.debounceRendering)||Kn)(Re)}function Re(){try{for(var e,t=1;J.length;)J.length>t&&J.sort(Un),e=J.shift(),t=J.length,Xi(e)}finally{J.length=Re.__r=0}}function zn(e,t,n,i,r,o,a,s,d,c,h){var u,f,p,_,m,w,k,g=i&&i.__k||He,I=t.length;for(d=Yi(n,t,g,d,I),u=0;u<I;u++)(p=n.__k[u])!=null&&(f=p.__i!=-1&&g[p.__i]||Me,p.__i=u,w=Kt(e,p,f,r,o,a,s,d,c,h),_=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Ut(f.ref,null,p),h.push(p.ref,p.__c||_,p)),m==null&&_!=null&&(m=_),(k=!!(4&p.__u))||f.__k===p.__k?(d=qn(p,d,e,k),k&&f.__e&&(f.__e=null)):typeof p.type=="function"&&w!==void 0?d=w:_&&(d=_.nextSibling),p.__u&=-7);return n.__e=m,d}function Yi(e,t,n,i,r){var o,a,s,d,c,h=n.length,u=h,f=0;for(e.__k=new Array(r),o=0;o<r;o++)(a=t[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=e.__k[o]=Ee(null,a,null,null,null):je(a)?a=e.__k[o]=Ee(ee,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[o]=Ee(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[o]=a,d=o+f,a.__=e,a.__b=e.__b+1,s=null,(c=a.__i=Qi(a,n,d,u))!=-1&&(u--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(r>h?f--:r<h&&f++),typeof a.type!="function"&&(a.__u|=4)):c!=d&&(c==d-1?f--:c==d+1?f++:(c>d?f--:f++,a.__u|=4))):e.__k[o]=null;if(u)for(o=0;o<h;o++)(s=n[o])!=null&&(2&s.__u)==0&&(s.__e==i&&(i=ae(s)),Jn(s,s));return i}function qn(e,t,n,i){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=qn(r[o],t,n,i));return t}e.__e!=t&&(i&&(t&&e.type&&!t.parentNode&&(t=ae(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Qi(e,t,n,i){var r,o,a,s=e.key,d=e.type,c=t[n],h=c!=null&&(2&c.__u)==0;if(c===null&&s==null||h&&s==c.key&&d==c.type)return n;if(i>(h?1:0)){for(r=n-1,o=n+1;r>=0||o<t.length;)if((c=t[a=r>=0?r--:o++])!=null&&(2&c.__u)==0&&s==c.key&&d==c.type)return a}return-1}function nn(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Ji.test(t)?n:n+"px"}function be(e,t,n,i,r){var o,a;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||nn(e.style,t,"");if(n)for(t in n)i&&n[t]==i[t]||nn(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(Wn,"$1")),a=t.toLowerCase(),t=a in e||t=="onFocusOut"||t=="onFocusIn"?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i?n[de]=i[de]:(n[de]=Ot,e.addEventListener(t,o?pt:ft,o)):e.removeEventListener(t,o?pt:ft,o);else{if(r=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function rn(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[Se]==null)t[Se]=Ot++;else if(t[Se]<n[de])return;return n(E.event?E.event(t):t)}}}function Kt(e,t,n,i,r,o,a,s,d,c){var h,u,f,p,_,m,w,k,g,I,M,F,q,y,x,v=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(d=!!(32&n.__u),o=[s=t.__e=n.__e]),(h=E.__b)&&h(t);e:if(typeof v=="function")try{if(k=t.props,g=v.prototype&&v.prototype.render,I=(h=v.contextType)&&i[h.__c],M=h?I?I.props.value:h.__:i,n.__c?w=(u=t.__c=n.__c).__=u.__E:(g?t.__c=u=new v(k,M):(t.__c=u=new he(k,M),u.constructor=v,u.render=er),I&&I.sub(u),u.state||(u.state={}),u.__n=i,f=u.__d=!0,u.__h=[],u._sb=[]),g&&u.__s==null&&(u.__s=u.state),g&&v.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=B({},u.__s)),B(u.__s,v.getDerivedStateFromProps(k,u.__s))),p=u.props,_=u.state,u.__v=t,f)g&&v.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),g&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(g&&v.getDerivedStateFromProps==null&&k!==p&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(k,M),t.__v==n.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(k,u.__s,M)===!1){t.__v!=n.__v&&(u.props=k,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(C){C&&(C.__=t)}),He.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&a.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(k,u.__s,M),g&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(p,_,m)})}if(u.context=M,u.props=k,u.__P=e,u.__e=!1,F=E.__r,q=0,g)u.state=u.__s,u.__d=!1,F&&F(t),h=u.render(u.props,u.state,u.context),He.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,F&&F(t),h=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++q<25);u.state=u.__s,u.getChildContext!=null&&(i=B(B({},i),u.getChildContext())),g&&!f&&u.getSnapshotBeforeUpdate!=null&&(m=u.getSnapshotBeforeUpdate(p,_)),y=h!=null&&h.type===ee&&h.key==null?jn(h.props.children):h,s=zn(e,je(y)?y:[y],t,n,i,r,o,a,s,d,c),u.base=t.__e,t.__u&=-161,u.__h.length&&a.push(u),w&&(u.__E=u.__=null)}catch(C){if(t.__v=null,d||o!=null)if(C.then){for(t.__u|=d?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(x=o.length;x--;)Dt(o[x]);_t(t)}else t.__e=n.__e,t.__k=n.__k,C.then||_t(t);E.__e(C,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Zi(n.__e,t,n,i,r,o,a,d,c);return(h=E.diffed)&&h(t),128&t.__u?void 0:s}function _t(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(_t))}function Vn(e,t,n){for(var i=0;i<n.length;i++)Ut(n[i],n[++i],n[++i]);E.__c&&E.__c(t,e),e.some(function(r){try{e=r.__h,r.__h=[],e.some(function(o){o.call(r)})}catch(o){E.__e(o,r.__v)}})}function jn(e){return typeof e!="object"||e==null||e.__b>0?e:je(e)?e.map(jn):B({},e)}function Zi(e,t,n,i,r,o,a,s,d){var c,h,u,f,p,_,m,w=n.props||Me,k=t.props,g=t.type;if(g=="svg"?r="http://www.w3.org/2000/svg":g=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),o!=null){for(c=0;c<o.length;c++)if((p=o[c])&&"setAttribute"in p==!!g&&(g?p.localName==g:p.nodeType==3)){e=p,o[c]=null;break}}if(e==null){if(g==null)return document.createTextNode(k);e=document.createElementNS(r,g,k.is&&k),s&&(E.__m&&E.__m(t,o),s=!1),o=null}if(g==null)w===k||s&&e.data==k||(e.data=k);else{if(o=o&&Ve.call(e.childNodes),!s&&o!=null)for(w={},c=0;c<e.attributes.length;c++)w[(p=e.attributes[c]).name]=p.value;for(c in w)p=w[c],c=="dangerouslySetInnerHTML"?u=p:c=="children"||c in k||c=="value"&&"defaultValue"in k||c=="checked"&&"defaultChecked"in k||be(e,c,null,p,r);for(c in k)p=k[c],c=="children"?f=p:c=="dangerouslySetInnerHTML"?h=p:c=="value"?_=p:c=="checked"?m=p:s&&typeof p!="function"||w[c]===p||be(e,c,p,w[c],r);if(h)s||u&&(h.__html==u.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(u&&(e.innerHTML=""),zn(t.type=="template"?e.content:e,je(f)?f:[f],t,n,i,g=="foreignObject"?"http://www.w3.org/1999/xhtml":r,o,a,o?o[0]:n.__k&&ae(n,0),s,d),o!=null)for(c=o.length;c--;)Dt(o[c]);s||(c="value",g=="progress"&&_==null?e.removeAttribute("value"):_!=null&&(_!==e[c]||g=="progress"&&!_||g=="option"&&_!=w[c])&&be(e,c,_,w[c],r),c="checked",m!=null&&m!=e[c]&&be(e,c,m,w[c],r))}return e}function Ut(e,t,n){try{if(typeof e=="function"){var i=typeof e.__u=="function";i&&e.__u(),i&&t==null||(e.__u=e(t))}else e.current=t}catch(r){E.__e(r,n)}}function Jn(e,t,n){var i,r;if(E.unmount&&E.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||Ut(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(o){E.__e(o,t)}i.base=i.__P=null}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&Jn(i[r],t,n||typeof e.type!="function");n||Dt(e.__e),e.__c=e.__=e.__e=void 0}function er(e,t,n){return this.constructor(e,n)}function tr(e,t,n){var i,r,o,a;t==document&&(t=document.documentElement),E.__&&E.__(e,t),r=(i=!1)?null:t.__k,o=[],a=[],Kt(t,e=t.__k=Gi(ee,null,[e]),r||Me,Me,t.namespaceURI,r?null:t.firstChild?Ve.call(t.childNodes):null,o,r?r.__e:t.firstChild,i,a),Vn(o,e,a)}Ve=He.slice,E={__e:function(e,t,n,i){for(var r,o,a;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&o.getDerivedStateFromError!=null&&(r.setState(o.getDerivedStateFromError(e)),a=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(e,i||{}),a=r.__d),a)return r.__E=r}catch(s){e=s}throw e}},On=0,Dn=function(e){return e!=null&&e.constructor===void 0},he.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=B({},this.state),typeof e=="function"&&(e=e(B({},n),this.props)),e&&B(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),tn(this))},he.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tn(this))},he.prototype.render=ee,J=[],Kn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Un=function(e,t){return e.__v.__b-t.__v.__b},Re.__r=0,rt=Math.random().toString(8),Se="__d"+rt,de="__a"+rt,Wn=/(PointerCapture)$|Capture$/i,Ot=0,ft=rn(!1),pt=rn(!0);var nr=0;function l(e,t,n,i,r,o){t||(t={});var a,s,d=t;if("ref"in d)for(s in d={},t)s=="ref"?a=t[s]:d[s]=t[s];var c={type:e,props:d,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--nr,__i:-1,__u:0,__source:r,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)d[s]===void 0&&(d[s]=a[s]);return E.vnode&&E.vnode(c),c}const Je=["flexoki","paper","solarized","everforest","rose-pine","kanagawa","catppuccin","high-contrast"];var ve,$,ot,on,me=0,Gn=[],T=E,ln=T.__b,an=T.__r,sn=T.diffed,cn=T.__c,un=T.unmount,dn=T.__;function Wt(e,t){T.__h&&T.__h($,e,me||t),me=0;var n=$.__H||($.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function z(e){return me=1,ir(Qn,e)}function ir(e,t,n){var i=Wt(ve++,2);if(i.t=e,!i.__c&&(i.__=[Qn(void 0,t),function(s){var d=i.__N?i.__N[0]:i.__[0],c=i.t(d,s);d!==c&&(i.__N=[c,i.__[1]],i.__c.setState({}))}],i.__c=$,!$.__f)){var r=function(s,d,c){if(!i.__c.__H)return!0;var h=i.__c.__H.__.filter(function(f){return f.__c});if(h.every(function(f){return!f.__N}))return!o||o.call(this,s,d,c);var u=i.__c.props!==s;return h.some(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(u=!0)}}),o&&o.call(this,s,d,c)||u};$.__f=!0;var o=$.shouldComponentUpdate,a=$.componentWillUpdate;$.componentWillUpdate=function(s,d,c){if(this.__e){var h=o;o=void 0,r(s,d,c),o=h}a&&a.call(this,s,d,c)},$.shouldComponentUpdate=r}return i.__N||i.__}function b(e,t){var n=Wt(ve++,3);!T.__s&&Yn(n.__H,t)&&(n.__=e,n.u=t,$.__H.__h.push(n))}function K(e){return me=5,O(function(){return{current:e}},[])}function O(e,t){var n=Wt(ve++,7);return Yn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Xn(e,t){return me=8,O(function(){return e},t)}function rr(){for(var e;e=Gn.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ce),t.__h.some(vt),t.__h=[]}catch(n){t.__h=[],T.__e(n,e.__v)}}}T.__b=function(e){$=null,ln&&ln(e)},T.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),dn&&dn(e,t)},T.__r=function(e){an&&an(e),ve=0;var t=($=e.__c).__H;t&&(ot===$?(t.__h=[],$.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(Ce),t.__h.some(vt),t.__h=[],ve=0)),ot=$},T.diffed=function(e){sn&&sn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Gn.push(t)!==1&&on===T.requestAnimationFrame||((on=T.requestAnimationFrame)||or)(rr)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),ot=$=null},T.__c=function(e,t){t.some(function(n){try{n.__h.some(Ce),n.__h=n.__h.filter(function(i){return!i.__||vt(i)})}catch(i){t.some(function(r){r.__h&&(r.__h=[])}),t=[],T.__e(i,n.__v)}}),cn&&cn(e,t)},T.unmount=function(e){un&&un(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(i){try{Ce(i)}catch(r){t=r}}),n.__H=void 0,t&&T.__e(t,n.__v))};var hn=typeof requestAnimationFrame=="function";function or(e){var t,n=function(){clearTimeout(i),hn&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,35);hn&&(t=requestAnimationFrame(n))}function Ce(e){var t=$,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),$=t}function vt(e){var t=$;e.__c=e.__(),$=t}function Yn(e,t){return!e||e.length!==t.length||t.some(function(n,i){return n!==e[i]})}function Qn(e,t){return typeof t=="function"?t(e):t}var lr=Symbol.for("preact-signals");function Bt(){if(Q>1)Q--;else{var e,t=!1;for((function(){var r=Oe;for(Oe=void 0;r!==void 0;)r.S.v===r.v&&(r.S.i=r.i),r=r.o})();fe!==void 0;){var n=fe;for(fe=void 0,Fe++;n!==void 0;){var i=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&ti(n))try{n.c()}catch(r){t||(e=r,t=!0)}n=i}}if(Fe=0,Q--,t)throw e}}var S=void 0;function Zn(e){var t=S;S=void 0;try{return e()}finally{S=t}}var fe=void 0,Q=0,Fe=0,fn=0,Oe=void 0,De=0;function ei(e){if(S!==void 0){var t=e.n;if(t===void 0||t.t!==S)return t={i:0,S:e,p:S.s,n:void 0,t:S,e:void 0,x:void 0,r:t},S.s!==void 0&&(S.s.n=t),S.s=t,e.n=t,32&S.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=S.s,t.n=void 0,S.s.n=t,S.s=t),t}}function N(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}N.prototype.brand=lr;N.prototype.h=function(){return!0};N.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n!==void 0?n.e=e:Zn(function(){var i;(i=t.W)==null||i.call(t)}))};N.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,i=e.x;n!==void 0&&(n.x=i,e.e=void 0),i!==void 0&&(i.e=n,e.x=void 0),e===this.t&&(this.t=i,i===void 0&&Zn(function(){var r;(r=t.Z)==null||r.call(t)}))}};N.prototype.subscribe=function(e){var t=this;return Ge(function(){var n=t.value,i=S;S=void 0;try{e(n)}finally{S=i}},{name:"sub"})};N.prototype.valueOf=function(){return this.value};N.prototype.toString=function(){return this.value+""};N.prototype.toJSON=function(){return this.value};N.prototype.peek=function(){var e=S;S=void 0;try{return this.value}finally{S=e}};Object.defineProperty(N.prototype,"value",{get:function(){var e=ei(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Fe>100)throw new Error("Cycle detected");(function(n){Q!==0&&Fe===0&&n.l!==fn&&(n.l=fn,Oe={S:n,v:n.v,i:n.i,o:Oe})})(this),this.v=e,this.i++,De++,Q++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Bt()}}}});function P(e,t){return new N(e,t)}function ti(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ni(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function ii(e){for(var t=e.s,n=void 0;t!==void 0;){var i=t.p;t.i===-1?(t.S.U(t),i!==void 0&&(i.n=t.n),t.n!==void 0&&(t.n.p=i)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=i}e.s=n}function te(e,t){N.call(this,void 0),this.x=e,this.s=void 0,this.g=De-1,this.f=4,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}te.prototype=new N;te.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===De))return!0;if(this.g=De,this.f|=1,this.i>0&&!ti(this))return this.f&=-2,!0;var e=S;try{ni(this),S=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return S=e,ii(this),this.f&=-2,!0};te.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}N.prototype.S.call(this,e)};te.prototype.U=function(e){if(this.t!==void 0&&(N.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};te.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(te.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=ei(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function ri(e,t){return new te(e,t)}function oi(e){var t=e.m;if(e.m=void 0,typeof t=="function"){Q++;var n=S;S=void 0;try{t()}catch(i){throw e.f&=-2,e.f|=8,zt(e),i}finally{S=n,Bt()}}}function zt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,oi(e)}function ar(e){if(S!==this)throw new Error("Out-of-order effect");ii(this),S=e,this.f&=-2,8&this.f&&zt(this),Bt()}function ce(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t==null?void 0:t.name}ce.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}};ce.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,oi(this),ni(this),Q++;var e=S;return S=this,ar.bind(this,e)};ce.prototype.N=function(){2&this.f||(this.f|=2,this.u=fe,fe=this)};ce.prototype.d=function(){this.f|=8,1&this.f||zt(this)};ce.prototype.dispose=function(){this.d()};function Ge(e,t){var n=new ce(e,t);try{n.c()}catch(r){throw n.d(),r}var i=n.d.bind(n);return i[Symbol.dispose]=i,i}var ke;function ue(e,t){E[e]=t.bind(null,E[e]||function(){})}function Ke(e){if(ke){var t=ke;ke=void 0,t()}ke=e&&e.S()}function li(e){var t=this,n=e.data,i=j(n);i.value=n;var r=O(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var a,s=t.__$u.S(),d=r.value;s(),Dn(d)||((a=t.base)==null?void 0:a.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=d},ri(function(){var a=i.value.value;return a===0?0:a===!0?"":a||""})},[]);return r.value}li.displayName="_st";Object.defineProperties(N.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:li},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});ue("__b",function(e,t){if(typeof t.type=="string"){var n,i=t.props;for(var r in i)if(r!=="children"){var o=i[r];o instanceof N&&(n||(t.__np=n={}),n[r]=o,i[r]=o.peek())}}e(t)});ue("__r",function(e,t){e(t),Ke();var n,i=t.__c;i&&(i.__$f&=-2,(n=i.__$u)===void 0&&(i.__$u=n=(function(r){var o;return Ge(function(){o=this}),o.c=function(){i.__$f|=1,i.setState({})},o})())),Ke(n)});ue("__e",function(e,t,n,i){Ke(),e(t,n,i)});ue("diffed",function(e,t){Ke();var n;if(typeof t.type=="string"&&(n=t.__e)){var i=t.__np,r=t.props;if(i){var o=n.U;if(o)for(var a in o){var s=o[a];s!==void 0&&!(a in i)&&(s.d(),o[a]=void 0)}else n.U=o={};for(var d in i){var c=o[d],h=i[d];c===void 0?(c=sr(n,d,h,r),o[d]=c):c.o(h,r)}}}e(t)});function sr(e,t,n,i){var r=t in e&&e.ownerSVGElement===void 0,o=P(n);return{o:function(a,s){o.value=a,i=s},d:Ge(function(){var a=o.value.value;i[t]!==a&&(i[t]=a,r?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}ue("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var i=n.U;if(i){n.U=void 0;for(var r in i){var o=i[r];o&&o.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)});ue("__h",function(e,t,n,i){(i<3||i===9)&&(t.__$f|=2),e(t,n,i)});he.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,i=n&&n.s!==void 0;for(var r in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(i||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(i||4&this.__$f)||3&this.__$f)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function j(e){return O(function(){return P(e)},[])}const Xe=P(!1);function cr(){Xe.value=!0}function Le(){Xe.value=!1}const se=P(null),mt=P(null);async function ai(){const e=await fetch("/api/tree");if(!e.ok)return;const t=await e.json();se.value=t,mt.value=t.config??null}function ur(){return b(()=>{ai()},[]),se.value}function si(e){const t=[];function n(i){for(const r of i)r.type==="file"&&r.isMarkdown?t.push({relPath:r.relPath,name:r.name}):r.type==="dir"&&r.children&&n(r.children)}return n(e),t}function dr(e,t){if(!t)return{...e,score:0,matchRanges:[]};const n=t.toLowerCase(),i=e.relPath.toLowerCase(),o=e.name.toLowerCase().indexOf(n);if(o!==-1){const h=e.relPath.length-e.name.length+o;return{...e,score:1e3-h-e.relPath.length,matchRanges:[[h,h+n.length]]}}const a=i.indexOf(n);if(a!==-1)return{...e,score:500-a-e.relPath.length,matchRanges:[[a,a+n.length]]};const s=[];let d=0,c=-1;for(let h=0;h<i.length&&d<n.length;h++)i[h]===n[d]?(c===-1&&(c=h),d++):c!==-1&&(s.push([c,c+1]),c=-1);return c!==-1&&s.push([c,d-(n.length-1)+c]),d===n.length?{...e,score:100-e.relPath.length,matchRanges:s}:null}function hr(e,t,n=50){const i=[];for(const r of e){const o=dr(r,t);o&&i.push(o)}return i.sort((r,o)=>o.score-r.score),i.slice(0,n)}function ci(e){for(const t of e){if(t.type==="file"&&t.isMarkdown)return t.relPath;if(t.type==="dir"&&t.children){const n=ci(t.children);if(n)return n}}return null}function ui(e,t){for(const n of e){const i=n.relPath===t||n.relPath.startsWith(`${t}/`);if(n.type==="file"){if(i&&n.isMarkdown)return n.relPath;continue}if(n.children&&(i||t.startsWith(`${n.relPath}/`))){const r=ui(n.children,t);if(r)return r}}return null}function fr(e,t){if(t.length===0)return e;const n=[];let i=0;for(const[r,o]of t)r>i&&n.push(e.slice(i,r)),n.push({mark:e.slice(r,o)}),i=o;return i<e.length&&n.push(e.slice(i)),n.map((r,o)=>typeof r=="string"?l("span",{children:r},o):l("mark",{class:"palette-match",children:r.mark},o))}function pr({currentPath:e,onSelect:t}){const n=Xe.value,i=se.value,[r,o]=z(""),[a,s]=z(0),d=K(null),c=K(null),h=O(()=>i?si(i.tree):[],[i]),u=O(()=>n?r.trim()?hr(h,r.trim()):h.slice(0,50).map(_=>({..._,score:0,matchRanges:[]})):[],[h,r,n]);if(b(()=>{n&&(o(""),s(0),requestAnimationFrame(()=>{var _,m;(_=d.current)==null||_.focus(),(m=d.current)==null||m.select()}))},[n]),b(()=>{a>=u.length&&s(Math.max(0,u.length-1))},[u.length,a]),b(()=>{if(!n||!c.current)return;const _=c.current.children[a];_==null||_.scrollIntoView({block:"nearest"})},[a,n]),!n)return null;function f(_){const m=u[_];m&&(t(m.relPath),Le())}function p(_){_.key==="Escape"?(_.preventDefault(),Le()):_.key==="ArrowDown"||_.ctrlKey&&_.key==="n"?(_.preventDefault(),s(m=>u.length===0?0:(m+1)%u.length)):_.key==="ArrowUp"||_.ctrlKey&&_.key==="p"?(_.preventDefault(),s(m=>u.length===0?0:(m-1+u.length)%u.length)):_.key==="Enter"&&(_.preventDefault(),f(a))}return l("div",{class:"palette-overlay",role:"dialog","aria-modal":"true","aria-label":"Switch file",onClick:Le,children:l("div",{class:"palette",onClick:_=>_.stopPropagation(),children:[l("div",{class:"palette-input-wrap",children:[l("span",{class:"palette-prefix","aria-hidden":!0,children:"⌘P"}),l("input",{ref:d,type:"text",class:"palette-input",placeholder:"Switch file…",value:r,onInput:_=>{o(_.target.value),s(0)},onKeyDown:p,"aria-label":"Find file"})]}),l("ul",{class:"palette-list",ref:c,role:"listbox",children:[u.length===0&&l("li",{class:"palette-empty",children:"No files match"}),u.map((_,m)=>{const w=m===a,k=e===_.relPath,g=_.relPath.lastIndexOf("/"),I=g>=0?_.relPath.slice(0,g+1):"",M=g>=0?_.relPath.slice(g+1):_.relPath;return l("li",{class:`palette-item${w?" is-active":""}${k?" is-current":""}`,role:"option","aria-selected":w,onMouseEnter:()=>s(m),onClick:()=>f(m),children:[l("span",{class:"palette-item-name",children:_.matchRanges.length>0?fr(_.relPath,_.matchRanges):l(ee,{children:[I&&l("span",{class:"palette-dir",children:I}),l("span",{children:M})]})}),k&&l("span",{class:"palette-tag",children:"current"})]},_.relPath)})]}),l("div",{class:"palette-foot",children:[l("span",{children:[l("kbd",{children:"↑"}),l("kbd",{children:"↓"})," navigate"]}),l("span",{children:[l("kbd",{children:"Enter"})," open"]}),l("span",{children:[l("kbd",{children:"Esc"})," close"]})]})]})})}function _r(e,t=Date.now()){const n=Math.max(0,t-e),i=Math.round(n/1e3);if(i<30)return"just now";if(i<90)return"1 minute ago";const r=Math.round(i/60);if(r<60)return`${r} minutes ago`;const o=Math.round(r/60);if(o<24)return o===1?"1 hour ago":`${o} hours ago`;const a=Math.round(o/24);return a<30?a===1?"yesterday":`${a} days ago`:new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function vr(e){return new Date(e).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}const U=P(null);P([]);const ge=P(null);let di=0;function mr(e,t=600){U.value=e,ge.value=e,di=performance.now()+t}function gr(e,t,n,i){if(e.length===0)return null;if(t<=0)return e[0].id;if(t+n>=i-1)return e[e.length-1].id;const r=16,o=6;let a=e[0].id;for(const s of e)if(s.top-r<=t+o)a=s.id;else break;return a}const yr=.35;function wr(e,t,n,i){if(e.length===0)return null;if(t<=0)return e[0].id;if(t+n>=i-1)return e[e.length-1].id;const r=t+n*yr;let o=e[0].id;for(const a of e)if(a.top<=r)o=a.id;else break;return o}function br(e){b(()=>{if(!e)return;let t=0,n=[],i=[];function r(){const c=e.getBoundingClientRect(),h=e.scrollTop;n=Array.from(e.querySelectorAll(".markdown-content :is(h1,h2,h3,h4,h5,h6)[id]")),i=n.map(u=>{const f=u.getBoundingClientRect();return{id:u.id,top:f.top-c.top+h}})}function o(){if(performance.now()<di)return;const c=e,h=c.scrollTop,u=c.clientHeight,f=c.scrollHeight,p=gr(i,h,u,f);p!==U.value&&(U.value=p);const _=wr(i,h,u,f);_!==ge.value&&(ge.value=_)}function a(){cancelAnimationFrame(t),t=requestAnimationFrame(o)}r(),o();const s=new ResizeObserver(()=>{r(),o()});s.observe(e);const d=new MutationObserver(()=>{r(),o()});return d.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden"]}),e.addEventListener("scroll",a,{passive:!0}),()=>{cancelAnimationFrame(t),s.disconnect(),d.disconnect(),e.removeEventListener("scroll",a)}},[e])}let pn=!1;function kr(e){try{return localStorage.getItem(e)}catch(t){return pn||(pn=!0,console.warn("[mdview] localStorage read blocked; falling back to defaults. Theme/UI prefs will not persist across reloads.",t)),null}}function xr(e,t){try{localStorage.setItem(e,t)}catch{}}function qt(e,t,n){const i=kr(e),r=i!==null?n.parse(i):null,o=P(r??t);return{signal:o,set(a){o.value=a,xr(e,n.serialize(a))}}}function X(e,t){return qt(e,t,{parse:n=>n==="1"?!0:n==="0"?!1:null,serialize:n=>n?"1":"0"})}function Ye(e,t,n){const i=r=>Math.min(n.max,Math.max(n.min,r));return qt(e,t,{parse:r=>{const o=Number(r);return Number.isFinite(o)?i(o):null},serialize:r=>String(i(r))})}function hi(e,t,n){return qt(e,t,{parse:i=>n.includes(i)?i:null,serialize:i=>i})}const gt=X("mdview-tree-collapsed",!1),yt=X("mdview-outline-collapsed",!1),wt=X("mdview-focus-mode",!1),bt=X("mdview-minimap",!1),kt=X("mdview-wide-layout",!1),xt=wt.signal,St=bt.signal,fi=kt.signal;function pi(){wt.set(!wt.signal.value)}function _i(){bt.set(!bt.signal.value)}function vi(){kt.set(!kt.signal.value)}const mi=264,gi=280,Ue=180,We=480,_n=140,Vt=Ye("mdview-tree-width",mi,{min:Ue,max:We}),jt=Ye("mdview-outline-width",gi,{min:Ue,max:We}),Sr=gt.signal,Er=yt.signal,vn=Vt.signal,mn=jt.signal;function $e(){gt.set(!gt.signal.value)}function Te(){yt.set(!yt.signal.value)}function Cr(e){Vt.set(e)}function Lr(e){jt.set(e)}function $r(){Vt.set(mi)}function Tr(){jt.set(gi)}const Pr=225;function yi(e){let t=0;for(const n of e)t+=1+yi(n.children);return t}function Ar(e,t){const n=document.createElement("div");n.innerHTML=e;const i=(n.textContent??"").trim(),r=i.length===0?0:i.split(/\s+/).filter(Boolean).length,o=Math.max(1,Math.round(r/Pr)),a=yi(t);return{words:r,readingMinutes:o,headings:a}}function Ir(e){const t=e.words.toLocaleString(),n=e.headings;return`${e.readingMinutes} min read · ${t} word${e.words===1?"":"s"} · ${n} heading${n===1?"":"s"}`}const Et="is-dimmed",Ct="is-focused",gn=new Set(["H1","H2","H3","H4","H5","H6"]);function yn(e){return Number(e.tagName[1])}function wi(e){e.querySelectorAll(`.${Et}, .${Ct}`).forEach(t=>{t.classList.remove(Et,Ct)})}function Nr(e,t){if(wi(e),!t)return;const n=e.querySelector(`#${CSS.escape(t)}`);if(!n||!gn.has(n.tagName))return;const i=yn(n),r=n.closest(".markdown-content")??e,o=Array.from(r.children),a=o.indexOf(n);if(a<0)return;let s=o.length;for(let d=a+1;d<o.length;d++){const c=o[d];if(gn.has(c.tagName)&&yn(c)<=i){s=d;break}}for(let d=0;d<o.length;d++){const c=o[d];d>=a&&d<s?c.classList.add(Ct):c.classList.add(Et)}}function Mr(e){wi(e)}async function Hr(e,t,n){for(const i of n)try{await i.run(e,t)}catch(r){console.error(`[mdview] wire "${i.name}" failed:`,r)}}function Rr(){return new URLSearchParams(window.location.search).get("root")}function bi(){return new URLSearchParams(window.location.search).get("file")}function ki(e,t=""){const i=new URLSearchParams(window.location.search).get("embed"),r=new URLSearchParams({file:e});i!==null&&r.set("embed",i);const o=`?${r.toString()}${t}`;history.pushState({file:e},"",o)}const Qe=P(bi());function Pe(e){Qe.value=e}function Fr(){b(()=>{const t=()=>Pe(bi());return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)},[]);const e=Xn((t,n="")=>{Pe(t),ki(t,n)},[]);return{currentPath:Qe.value,setCurrentPath:Pe,navigate:e}}const Lt=new Set(["H1","H2","H3","H4","H5","H6"]),Jt="section-toggle",Or="section-heading-collapsed",lt="data-section-collapsed-by",H=new Set;let wn,R=null,bn=!1;function kn(e){return Number(e.tagName[1])}function Gt(e){return!!e&&Lt.has(e.tagName)}function xi(e,t){const n=e[t];if(!n||!Lt.has(n.tagName))return null;const i=kn(n);for(let r=t+1;r<e.length;r++){const o=e[r];if(Lt.has(o.tagName)&&kn(o)<=i)return r}return e.length}function Xt(e){return Array.from(e.children)}function Si(e){return Xt(e).filter(t=>Gt(t)&&!!t.id)}function we(e,t,n){const i=Xt(e),r=i.indexOf(t);if(r<0)return;const o=xi(i,r);if(o===null)return;const a=t.querySelector(`button.${Jt}`);a&&(a.setAttribute("aria-expanded",n?"false":"true"),a.setAttribute("aria-label",n?"Expand section":"Collapse section"),a.title=n?"Expand section":"Collapse section"),t.classList.toggle(Or,n);for(let s=r+1;s<o;s++){const d=i[s];n?d.hasAttribute("hidden")||(d.setAttribute("hidden",""),d.setAttribute(lt,t.id)):d.getAttribute(lt)===t.id&&(d.removeAttribute("hidden"),d.removeAttribute(lt))}}function Dr(e,t){const n=t.id,i=!H.has(n);i?H.add(n):H.delete(n),we(e,t,i)}function Yt(e,t){for(const n of Si(e))t?H.add(n.id):H.delete(n.id),we(e,n,t)}function Kr(){R&&Yt(R,!1)}function Ur(){R&&Yt(R,!0)}function $t(e){if(!R||H.size===0||!e||!R.contains(e))return;const t=Xt(R);for(let n=0;n<t.length;n++){const i=t[n];if(!Gt(i)||!i.id||!H.has(i.id))continue;const r=xi(t,n);if(r!==null)for(let o=n+1;o<r;o++){const a=t[o];if(a===e||a.contains(e)){H.delete(i.id),we(R,i,!1);break}}}}function at(e){e&&$t(document.getElementById(e))}function Wr(e,t){const n=document.createElement("button");return n.type="button",n.className=Jt,n.setAttribute("aria-expanded","true"),n.setAttribute("aria-label","Collapse section"),n.title="Collapse section",n.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),Dr(e,t)}),n}let pe=null;function Br(){R&&pe===null&&(pe=[...H],Yt(R,!1))}function zr(){if(!(!R||!pe)){for(const e of pe){H.add(e);const t=document.getElementById(e);t&&Gt(t)&&R.contains(t)&&we(R,t,!0)}pe=null}}function qr(){bn||(window.addEventListener("beforeprint",Br),window.addEventListener("afterprint",zr),bn=!0)}const Vr={name:"collapsible-sections",run:e=>{R=e;const t=Qe.value;t!==wn&&(H.clear(),wn=t);const n=Si(e);for(const r of n)r.querySelector(`button.${Jt}`)||r.insertBefore(Wr(e,r),r.firstChild);const i=new Set(n.map(r=>r.id));for(const r of[...H])i.has(r)||H.delete(r);for(const r of n)we(e,r,H.has(r.id));qr()}};function jr(e){e.querySelectorAll("pre").forEach(n=>{var o;if(n.closest(".mermaid-block")||(o=n.parentElement)!=null&&o.classList.contains("pre-wrap"))return;const i=document.createElement("div");i.className="pre-wrap",n.replaceWith(i),i.appendChild(n);const r=document.createElement("button");r.type="button",r.className="copy-btn",r.textContent="Copy",r.setAttribute("aria-label","Copy code to clipboard"),r.addEventListener("click",async a=>{a.stopPropagation();const s=n.querySelector("code"),d=((s==null?void 0:s.textContent)??n.textContent??"").replace(/\s+$/,"");try{await navigator.clipboard.writeText(d),r.textContent="Copied",r.classList.add("is-copied")}catch{r.textContent="Failed"}window.setTimeout(()=>{r.textContent="Copy",r.classList.remove("is-copied")},1600)}),i.appendChild(r)})}function Jr(e){e.querySelectorAll("a[href]").forEach(n=>{if(n.dataset.externalProcessed==="1"||n.hasAttribute("data-internal-link"))return;const i=n.getAttribute("href")??"";if(/^https?:\/\//i.test(i)&&!n.classList.contains("heading-anchor")){if(n.target="_blank",n.rel="noopener noreferrer",n.classList.add("is-external"),!n.querySelector(".external-icon")){const r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("class","external-icon"),r.setAttribute("viewBox","0 0 12 12"),r.setAttribute("width","11"),r.setAttribute("height","11"),r.setAttribute("aria-hidden","true"),r.innerHTML='<path fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" d="M4.5 2.5h5v5M9.5 2.5L4 8M2.5 5.2v4.3h4.3"/>',n.appendChild(r)}n.dataset.externalProcessed="1"}})}const Ze=P(null);function xn(e,t){Ze.value={src:e,alt:t}}function Ae(){Ze.value=null}function Gr(e){e.querySelectorAll(".markdown-content img").forEach(n=>{n.dataset.lightboxWired!=="1"&&(n.closest(".mermaid-block")||(n.dataset.lightboxWired="1",n.classList.add("img-zoomable"),n.setAttribute("tabindex","0"),n.setAttribute("role","button"),n.setAttribute("aria-label",`Open ${n.alt||"image"} fullscreen`),n.addEventListener("click",()=>{xn(n.src,n.alt)}),n.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),xn(n.src,n.alt))})))})}const Xr="modulepreload",Yr=function(e){return"/"+e},Sn={},Qt=function(t,n,i){let r=Promise.resolve();if(n&&n.length>0){let a=function(c){return Promise.all(c.map(h=>Promise.resolve(h).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),d=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=a(n.map(c=>{if(c=Yr(c),c in Sn)return;Sn[c]=!0;const h=c.endsWith(".css"),u=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const f=document.createElement("link");if(f.rel=h?"stylesheet":Xr,h||(f.as="script"),f.crossOrigin="",f.href=c,d&&f.setAttribute("nonce",d),document.head.appendChild(f),h)return new Promise((p,_)=>{f.addEventListener("load",p),f.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return r.then(a=>{for(const s of a||[])s.status==="rejected"&&o(s.reason);return t().catch(o)})};let st=null,En=!1;function Qr(){return st||(st=Qt(()=>import("./katex-C5jXJg4s.js"),[])),st}async function Zr(){if(En)return;En=!0;const e=(await Qt(async()=>{const{default:n}=await import("./katex.min-DXaO1tdm.js");return{default:n}},[])).default,t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}async function eo(e){const t=e.querySelectorAll("span.math-inline:not([data-rendered])"),n=e.querySelectorAll("div.math-block:not([data-rendered])");if(t.length===0&&n.length===0)return;const[i]=await Promise.all([Qr(),Zr()]),r=i.default;for(const o of t){const a=decodeURIComponent(o.dataset.source??"");try{r.render(a,o,{displayMode:!1,throwOnError:!1})}catch(s){o.textContent=`[math error: ${s.message}]`}o.dataset.rendered="true"}for(const o of n){const a=decodeURIComponent(o.dataset.source??"");try{r.render(a,o,{displayMode:!0,throwOnError:!1})}catch(s){o.textContent=`[math error: ${s.message}]`}o.dataset.rendered="true"}}const to=/\.(md|markdown|mdx)$/i;function Cn(e){return e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0}function no(e){return!!(e.target&&e.target!==""&&e.target!=="_self"||e.hasAttribute("download"))}function io(e,t){e.addEventListener("click",n=>{const i=n.target.closest("a");if(!i)return;const r=i.matches("[data-internal-link]")?i.getAttribute("data-internal-link"):null;if(r!==null){if(Cn(n))return;n.preventDefault();const c=r??"",h=c.indexOf("#"),u=h>=0?c.slice(0,h):c,f=h>=0?c.slice(h):"";t(u,f);return}if(Cn(n)||no(i))return;const o=i.href;if(!o)return;let a;try{a=new URL(o)}catch{return}if(a.origin!==window.location.origin||!to.test(a.pathname))return;n.preventDefault();let s;try{s=decodeURIComponent(a.pathname)}catch{s=a.pathname}const d=s.replace(/^\/+/,"");t(d,a.hash)})}const ro=["light","dark"],Tt=window.matchMedia("(prefers-color-scheme: dark)");function oo(){try{const e=localStorage.getItem("mdview-theme");if(e==="light"||e==="dark")return e}catch{}return null}const Ei=oo(),Ci=hi("mdview-theme",Ei??(Tt.matches?"dark":"light"),ro),Z=Ci.signal,Li=P(Ei!==null);function lo(e){Ci.set(e),Li.value=!0}function $i(){lo(Z.value==="dark"?"light":"dark")}function ao(){return b(()=>{const e=t=>{Li.value||(Z.value=t.matches?"dark":"light")};return Tt.addEventListener("change",e),()=>Tt.removeEventListener("change",e)},[]),b(()=>{document.documentElement.dataset.theme=Z.value}),Z.value}let ct=null,so=0,Pt=null;function co(){return ct||(ct=Qt(()=>import("./mermaid.core-CVM43n3z.js").then(e=>e.cc),[])),ct}function uo(){return Z.value==="dark"?"dark":"default"}async function Ti(e){const t=e.querySelectorAll(".mermaid-block");if(t.length===0)return;const i=(await co()).default,r=uo();if(Pt!==r){i.initialize({startOnLoad:!1,theme:r,securityLevel:"strict"}),Pt=r;for(const o of Array.from(t))delete o.dataset.rendered}await Promise.all(Array.from(t).map(o=>ho(i,o)))}async function ho(e,t){if(t.dataset.rendered)return;const n=decodeURIComponent(t.dataset.source??""),i=`mermaid-${++so}`;try{if(!await e.parse(n,{suppressErrors:!0})){Ln(t,"syntax error");return}const{svg:o}=await e.render(i,n);t.innerHTML=o,t.dataset.rendered="true"}catch(r){Ln(t,r.message)}finally{fo(i)}}function Ln(e,t){const n=document.createElement("pre");n.className="mermaid-error",n.textContent=`Mermaid: ${t}`,e.replaceChildren(n),e.dataset.rendered="true"}function fo(e){for(const t of[e,`d${e}`]){const n=document.getElementById(t);n&&n.parentElement===document.body&&n.remove()}}Ge(()=>{if(Z.value,Pt===null)return;const e=document.querySelector(".markdown-content");e&&Ti(e)});function po(e){e.querySelectorAll(".markdown-content :is(h1,h2,h3,h4,h5,h6)[id]").forEach(n=>{if(n.querySelector(".heading-anchor"))return;const i=document.createElement("a");i.className="heading-anchor",i.href=`#${n.id}`,i.setAttribute("aria-label",`Copy link to ${n.textContent??""}`),i.title="Copy link to this section",i.textContent="#",i.addEventListener("click",async r=>{r.preventDefault();const a=new URLSearchParams(window.location.search).get("file"),s=`${window.location.origin}${window.location.pathname}${a?`?file=${encodeURIComponent(a)}`:""}#${n.id}`;try{await navigator.clipboard.writeText(s),i.textContent="✓",i.classList.add("is-copied")}catch{i.textContent="!"}window.setTimeout(()=>{i.textContent="#",i.classList.remove("is-copied")},1500)}),n.appendChild(i)})}const _o=[Vr,{name:"mermaid",run:e=>Ti(e)},{name:"math",run:e=>eo(e)},{name:"internal-links",run:(e,t)=>io(e,t.onInternalNavigate)},{name:"copy-buttons",run:e=>jr(e)},{name:"permalinks",run:e=>po(e)},{name:"external-links",run:e=>Jr(e)},{name:"image-lightbox",run:e=>Gr(e)}];function vo({file:e,onInternalNavigate:t}){const n=K(null),i=O(()=>Ar(e.html,e.outline),[e]);return b(()=>{n.current&&(n.current.innerHTML=e.html,Hr(n.current,{onInternalNavigate:t},_o))},[e]),b(()=>{n.current&&(xt.value?Nr(n.current,ge.value):Mr(n.current))},[xt.value,ge.value,e]),l("article",{class:"markdown-body",children:[e.frontmatter&&Object.keys(e.frontmatter).length>0&&l("details",{class:"frontmatter-block",children:[l("summary",{children:"frontmatter"}),l("pre",{children:l("code",{children:JSON.stringify(e.frontmatter,null,2)})})]}),i.words>0&&l("div",{class:"doc-stats","aria-label":"Document statistics",children:[l("span",{children:Ir(i)}),e.lastModified>0&&l(ee,{children:[l("span",{class:"doc-stats-sep","aria-hidden":!0,children:"·"}),l("span",{class:"doc-stats-updated",title:vr(e.lastModified),children:["Updated ",_r(e.lastModified)]})]})]}),l("div",{ref:n,class:"markdown-content"})]})}function mo(){return l("div",{class:"skeleton","aria-hidden":"true",children:[l("div",{class:"skeleton__h1"}),l("div",{class:"skeleton__meta"}),l("div",{class:"skeleton__line",style:{width:"94%"}}),l("div",{class:"skeleton__line",style:{width:"88%"}}),l("div",{class:"skeleton__line",style:{width:"76%"}}),l("div",{class:"skeleton__h2"}),l("div",{class:"skeleton__line",style:{width:"92%"}}),l("div",{class:"skeleton__line",style:{width:"84%"}}),l("div",{class:"skeleton__code"}),l("div",{class:"skeleton__line",style:{width:"90%"}}),l("div",{class:"skeleton__line",style:{width:"70%"}})]})}const go=["node_modules","dist","build","out","target","coverage","vendor","__pycache__","venv","Pods","DerivedData","_build"],A=e=>({width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":1.6,"stroke-linecap":"round","stroke-linejoin":"round"});function Pi({size:e=14,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:l("polyline",{points:"9 6 15 12 9 18"})})}function yo({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:l("path",{d:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z"})})}function wo({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("path",{d:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v1H3V7z"}),l("path",{d:"M3 9h18l-2 8a2 2 0 0 1-2 1.5H6A2 2 0 0 1 4 17L3 9z"})]})}function bo({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("path",{d:"M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6z"}),l("polyline",{points:"14 3 14 9 20 9"})]})}function ko({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("path",{d:"M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6z"}),l("polyline",{points:"14 3 14 9 20 9"}),l("path",{d:"M8 14l2 2 2-3 2 3 2-2"})]})}function xo({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("circle",{cx:"12",cy:"12",r:"4"}),l("line",{x1:"12",y1:"2",x2:"12",y2:"5"}),l("line",{x1:"12",y1:"19",x2:"12",y2:"22"}),l("line",{x1:"2",y1:"12",x2:"5",y2:"12"}),l("line",{x1:"19",y1:"12",x2:"22",y2:"12"}),l("line",{x1:"4.5",y1:"4.5",x2:"6.6",y2:"6.6"}),l("line",{x1:"17.4",y1:"17.4",x2:"19.5",y2:"19.5"}),l("line",{x1:"4.5",y1:"19.5",x2:"6.6",y2:"17.4"}),l("line",{x1:"17.4",y1:"6.6",x2:"19.5",y2:"4.5"})]})}function So({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:l("path",{d:"M21 13.5A8.5 8.5 0 0 1 10.5 3a7 7 0 1 0 10.5 10.5z"})})}function Eo({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),l("line",{x1:"9",y1:"4",x2:"9",y2:"20"}),l("polyline",{points:"15 9 12 12 15 15"})]})}function Co({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),l("line",{x1:"9",y1:"4",x2:"9",y2:"20"}),l("polyline",{points:"13 9 16 12 13 15"})]})}function Lo({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),l("line",{x1:"15",y1:"4",x2:"15",y2:"20"}),l("polyline",{points:"9 9 12 12 9 15"})]})}function $o({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),l("line",{x1:"15",y1:"4",x2:"15",y2:"20"}),l("polyline",{points:"11 9 8 12 11 15"})]})}function To({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("rect",{x:"2",y:"6",width:"20",height:"13",rx:"2"}),l("line",{x1:"6",y1:"10",x2:"6.01",y2:"10"}),l("line",{x1:"10",y1:"10",x2:"10.01",y2:"10"}),l("line",{x1:"14",y1:"10",x2:"14.01",y2:"10"}),l("line",{x1:"18",y1:"10",x2:"18.01",y2:"10"}),l("line",{x1:"6",y1:"14",x2:"6.01",y2:"14"}),l("line",{x1:"18",y1:"14",x2:"18.01",y2:"14"}),l("line",{x1:"9",y1:"14",x2:"15",y2:"14"})]})}function Po({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("circle",{cx:"12",cy:"12",r:"3"}),l("circle",{cx:"12",cy:"12",r:"9"})]})}function Ao({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("rect",{x:"4",y:"3",width:"16",height:"18",rx:"2"}),l("line",{x1:"8",y1:"7",x2:"14",y2:"7"}),l("line",{x1:"8",y1:"11",x2:"16",y2:"11"}),l("line",{x1:"8",y1:"15",x2:"12",y2:"15"}),l("line",{x1:"8",y1:"19",x2:"14",y2:"19"})]})}function Io({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("circle",{cx:"12",cy:"12",r:"3"}),l("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.9 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.6-1.1 1.7 1.7 0 0 0-.3-1.9l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.9.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.9-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.9V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"})]})}function Ai({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:l("polyline",{points:"20 6 9 17 4 12"})})}function No({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("polyline",{points:"4 9 4 4 9 4"}),l("polyline",{points:"20 9 20 4 15 4"}),l("polyline",{points:"4 15 4 20 9 20"}),l("polyline",{points:"20 15 20 20 15 20"})]})}function Mo({size:e=16,class:t}){return l("svg",{...A(e),class:t,"aria-hidden":!0,children:[l("circle",{cx:"12",cy:"12",r:"9"}),l("line",{x1:"12",y1:"11",x2:"12",y2:"16"}),l("line",{x1:"12",y1:"8",x2:"12",y2:"8"})]})}const Ho=["Hidden from the tree to keep the watcher under the OS file-watch limit:","• dotfiles / dotdirs (.git, .next, .venv, …)",`• built-in heavy dirs: ${go.join(", ")}`,"","Add your own in ~/.config/mdview/config.json:",'{ "ignore": ["my-build-dir"] }',"","Restart mdview after editing."].join(`
|
|
2
|
+
`);function Ro({tree:e,currentPath:t,onSelect:n,onCollapse:i}){return l("div",{class:"pane-content",children:[l("div",{class:"pane-head",children:[l("span",{class:"pane-head-title",children:["Files",l("span",{class:"pane-head-info",role:"button",tabIndex:0,"aria-label":"Why some folders aren't shown","data-tooltip":Ho,"data-tooltip-multiline":!0,"data-tooltip-align":"left",children:l(Mo,{size:11})})]}),l("button",{class:"pane-head-btn","aria-label":"Hide file tree","data-tooltip":"Hide file tree (⌘B)","data-tooltip-align":"right",onClick:i,children:l(Eo,{size:14})})]}),e.length===0?l("p",{class:"tree-empty",children:["No folders open. Run ",l("code",{children:"mdview <path>"})," to add one."]}):l("ul",{class:"tree",role:"tree",children:e.map(r=>l(Ii,{node:r,currentPath:t,onSelect:n,depth:0},r.relPath))})]})}function Ii({node:e,currentPath:t,onSelect:n,depth:i}){const r=(t==null?void 0:t.startsWith(e.relPath+"/"))??!1,o=i===0&&!e.relPath.includes("/"),[a,s]=z(r||o);b(()=>{r&&s(!0)},[t]);const d=`${10+i*14}px`;if(e.type==="dir")return l("li",{class:"tree-li tree-li-dir",role:"treeitem","aria-expanded":a,children:[l("button",{class:`tree-item tree-dir ${a?"is-open":""} ${o?"tree-root":""}`,style:{paddingLeft:d},onClick:()=>s(p=>!p),children:[l("span",{class:`chev ${a?"open":""}`,"aria-hidden":!0,children:l(Pi,{size:12})}),l("span",{class:"tree-icon","aria-hidden":!0,children:a?l(wo,{size:15}):l(yo,{size:15})}),l("span",{class:"name",children:e.name})]}),a&&e.children&&e.children.length>0&&l("ul",{class:"tree-children",style:{paddingLeft:`${10+i*14+7}px`},children:e.children.map(p=>l(Ii,{node:p,currentPath:t,onSelect:n,depth:i+1},p.relPath))})]});const c=e.isMarkdown??!1,h=t===e.relPath,u=`tree-item tree-file ${c?"":"is-disabled"} ${h?"is-current":""}`,f=c?`/?file=${encodeURIComponent(e.relPath)}`:void 0;return l("li",{class:"tree-li tree-li-file",role:"treeitem",children:c?l("a",{class:u,style:{paddingLeft:d},href:f,title:e.name,onClick:p=>{p.metaKey||p.ctrlKey||p.shiftKey||p.altKey||(p.preventDefault(),n(e.relPath))},children:[l("span",{class:"tree-icon","aria-hidden":!0,children:l(ko,{size:14})}),l("span",{class:"name",children:e.name})]}):l("span",{class:u,style:{paddingLeft:d},title:e.name,children:[l("span",{class:"tree-icon","aria-hidden":!0,children:l(bo,{size:14})}),l("span",{class:"name",children:e.name})]})})}const et=P(!1);function Ni(){et.value=!0}function Ie(){et.value=!1}function Mi(e,t,n=[]){for(const i of e){const r=[...n,i];if(i.id===t)return r;const o=Mi(i.children,t,r);if(o)return o}return null}function $n(e){return e.trim().toLowerCase()}function Fo({outline:e,fileName:t,onJump:n}){var o;const i=U.value;let r=i?Mi(e,i)??[]:[];return t&&r.length>0&&((o=r[0])==null?void 0:o.level)===1&&$n(r[0].text)===$n(t)&&(r=r.slice(1)),l("nav",{class:"breadcrumbs","aria-label":"Current section",children:[t&&l("button",{type:"button",class:"bc-item bc-root",onClick:()=>n(null),title:"Scroll to top",children:t}),r.map((a,s)=>{const d=s===r.length-1;return l("span",{class:"bc-step",children:[l("span",{class:"bc-sep","aria-hidden":!0,children:"›"}),l("button",{type:"button",class:`bc-item${d?" is-current":""}`,onClick:()=>n(a.id),"aria-current":d?"location":void 0,children:a.text})]},a.id)})]})}const Hi="mdview-palette";function Oo(){try{const e=localStorage.getItem(Hi);if(e&&Je.includes(e))return e}catch{}return null}const Ri=Oo(),Fi=hi(Hi,Ri??"flexoki",Je),oe=Fi.signal,Oi=P(Ri!==null);function Di(e){Fi.set(e),Oi.value=!0}function Do(){return b(()=>{var e;!Oi.value&&((e=mt.value)!=null&&e.palette)&&(oe.value=mt.value.palette)}),b(()=>{document.documentElement.dataset.palette=oe.value}),oe.value}const Ko={flexoki:"Flexoki",paper:"Paper",solarized:"Solarized",everforest:"Everforest","rose-pine":"Rosé Pine",kanagawa:"Kanagawa",catppuccin:"Catppuccin","high-contrast":"High contrast"};function ut({icon:e,label:t,shortcut:n,on:i,onToggle:r}){return l("button",{class:`view-menu-row${i?" is-on":""}`,role:"menuitemcheckbox","aria-checked":i,onClick:r,children:[l("span",{class:"view-menu-icon","aria-hidden":!0,children:e}),l("span",{class:"view-menu-label",children:t}),n&&l("span",{class:"view-menu-kbd","aria-hidden":!0,children:n}),l("span",{class:"view-menu-check","aria-hidden":!0,children:i?l(Ai,{size:14}):null})]})}function Uo(){const[e,t]=z(!1),n=K(null);b(()=>{if(!e)return;function s(c){var h;(h=n.current)!=null&&h.contains(c.target)||t(!1)}function d(c){c.key==="Escape"&&t(!1)}return document.addEventListener("mousedown",s),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("keydown",d)}},[e]);const i=xt.value,r=St.value,o=fi.value,a=oe.value;return l("div",{class:"view-menu",ref:n,children:[l("button",{class:`icon-btn${e?" is-active":""}`,"aria-label":"View settings","data-tooltip":"View settings","aria-haspopup":"menu","aria-expanded":e,onClick:()=>t(s=>!s),children:l(Io,{})}),e&&l("div",{class:"view-menu-popover",role:"menu","aria-label":"View settings",children:[l("div",{class:"view-menu-section",children:[l(ut,{icon:l(Po,{size:14}),label:"Focus mode",shortcut:"f",on:i,onToggle:pi}),l(ut,{icon:l(Ao,{size:14}),label:"Minimap",shortcut:"m",on:r,onToggle:_i}),l(ut,{icon:l(No,{size:14}),label:"Wide layout",on:o,onToggle:vi})]}),l("div",{class:"view-menu-divider"}),l("div",{class:"view-menu-section",children:[l("div",{class:"view-menu-heading",children:"Palette"}),Je.map(s=>l("button",{role:"menuitemradio","aria-checked":a===s,class:`view-menu-row view-menu-palette${a===s?" is-on":""}`,onClick:()=>Di(s),children:[l("span",{class:`palette-swatch palette-swatch-${s}`,"aria-hidden":!0}),l("span",{class:"view-menu-label",children:Ko[s]}),l("span",{class:"view-menu-check","aria-hidden":!0,children:a===s?l(Ai,{size:14}):null})]},s))]})]})]})}function Wo({outline:e,fileName:t,onJumpHeading:n}){const i=Z.value,r=i==="dark"?"Switch to light (⌘\\)":"Switch to dark (⌘\\)";return l("div",{class:"header-inner",children:[l("div",{class:"header-left",children:l("span",{class:"brand",children:"mdview"})}),l("div",{class:"header-center",children:l(Fo,{outline:e,fileName:t,onJump:n})}),l("div",{class:"header-right",children:[l(Uo,{}),l("button",{class:"icon-btn theme-btn","aria-label":r,"data-tooltip":r,onClick:$i,children:i==="dark"?l(xo,{}):l(So,{})}),l("button",{class:"icon-btn","aria-label":"Keyboard shortcuts","data-tooltip":"Shortcuts (?)","data-tooltip-align":"right",onClick:Ni,children:l(To,{})})]})]})}function Bo(){const e=Ze.value;return b(()=>{if(!e)return;function t(i){i.key==="Escape"&&Ae()}window.addEventListener("keydown",t);const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",t),document.body.style.overflow=n}},[e]),e?l("div",{class:"lightbox-overlay",role:"dialog","aria-modal":"true","aria-label":e.alt||"Image preview",onClick:Ae,children:[l("button",{type:"button",class:"lightbox-close","aria-label":"Close image preview",onClick:t=>{t.stopPropagation(),Ae()},children:"×"}),l("img",{class:"lightbox-img",src:e.src,alt:e.alt,onClick:t=>t.stopPropagation()})]}):null}const ye=P(null);function zo(e){ye.value=e}function tt(e){const t=[];for(const n of e)t.push({id:n.id,level:n.level}),t.push(...tt(n.children));return t}function Tn(e,t,n){var a,s;const i=tt(e);if(i.length===0)return null;if(!t)return n===1?((a=i[0])==null?void 0:a.id)??null:((s=i[i.length-1])==null?void 0:s.id)??null;const r=i.findIndex(d=>d.id===t);if(r<0)return null;const o=i[r].level;if(n===1){for(let d=r+1;d<i.length;d++)if(i[d].level===o)return i[d].id}else for(let d=r-1;d>=0;d--)if(i[d].level===o)return i[d].id;return null}function qo(e,t){if(!e)return[];const n=tt(t),i=e.scrollHeight;if(i===0)return[];const r=[],o=e.getBoundingClientRect();for(const{id:a,level:s}of n){const d=e.querySelector(`#${CSS.escape(a)}`);if(!d)continue;const u=(d.getBoundingClientRect().top-o.top+e.scrollTop)/i;r.push({id:a,level:s,ratio:Math.max(0,Math.min(1,u))})}return r}function Vo({outline:e}){const t=ye.value,[n,i]=z([]),[r,o]=z({top:0,height:0}),a=K(null);b(()=>{if(!t)return;const c=()=>i(qo(t,e));c();const h=new ResizeObserver(c);return h.observe(t),()=>h.disconnect()},[t,e]),b(()=>{if(!t)return;const c=()=>{const h=t.scrollHeight||1;o({top:t.scrollTop/h,height:t.clientHeight/h})};return c(),t.addEventListener("scroll",c,{passive:!0}),()=>t.removeEventListener("scroll",c)},[t]);function s(c){const h=a.current;if(!h||!t)return;const u=h.getBoundingClientRect(),f=Math.max(0,Math.min(1,(c-u.top)/u.height));t.scrollTo({top:f*t.scrollHeight,behavior:"smooth"})}if(!t||n.length===0)return null;const d=U.value;return l("div",{ref:a,class:"minimap",role:"navigation","aria-label":"Document minimap",onClick:c=>s(c.clientY),children:[n.map(c=>l("div",{class:`minimap-bar minimap-level-${c.level}${d===c.id?" is-active":""}`,style:{top:`${(c.ratio*100).toFixed(2)}%`},title:c.id},c.id)),l("div",{class:"minimap-viewport",style:{top:`${(r.top*100).toFixed(2)}%`,height:`${(r.height*100).toFixed(2)}%`}})]})}const G=1,le=6,Be=Ye("mdview-outline-min-level",G,{min:G,max:le}),ze=Ye("mdview-outline-max-level",le,{min:G,max:le}),Ki=Be.signal,Ui=ze.signal;function jo(e){Be.set(e),e>ze.signal.value&&ze.set(e)}function Jo(e){ze.set(e),e<Be.signal.value&&Be.set(e)}const Go=ri(()=>{const e=Ki.value,t=Ui.value,n=new Set;for(let i=e;i<=t;i++)n.add(i);return n});function Wi(e,t){const n=[];for(const i of e){const r=Wi(i.children,t);t.has(i.level)?n.push({...i,children:r}):n.push(...r)}return n}function Xo({nodes:e,onJump:t,onCollapse:n}){const i=Go.value,r=Ki.value,o=Ui.value,a=O(()=>Wi(e,i),[e,i]),s=r===o?`H${r}`:`H${r}–H${o}`,d=le-G,c=(r-G)/d*100,h=100-(o-G)/d*100;return l("nav",{class:"outline","aria-label":"Document outline",children:[l("div",{class:"outline-head",children:[l("button",{class:"pane-head-btn","aria-label":"Hide outline","data-tooltip":"Hide outline (⌘.)","data-tooltip-align":"left",onClick:n,children:l(Lo,{size:14})}),l("span",{class:"outline-title",children:"On this page"}),l("div",{class:"outline-depth","data-tooltip":`Show ${s}`,"data-tooltip-align":"right",children:[l("span",{class:"outline-depth-label","aria-hidden":!0,children:s}),l("div",{class:"outline-depth-range",role:"group","aria-label":"Heading depth range",children:[l("div",{class:"outline-depth-track","aria-hidden":!0,children:l("div",{class:"outline-depth-track-fill",style:`left:${c}%;right:${h}%`})}),l("input",{type:"range",class:"outline-depth-slider outline-depth-slider-min",min:G,max:le,step:1,value:r,"aria-label":`Minimum heading level (currently H${r})`,onInput:u=>{const f=Number(u.currentTarget.value);Number.isFinite(f)&&jo(f)}}),l("input",{type:"range",class:"outline-depth-slider outline-depth-slider-max",min:G,max:le,step:1,value:o,"aria-label":`Maximum heading level (currently H${o})`,onInput:u=>{const f=Number(u.currentTarget.value);Number.isFinite(f)&&Jo(f)}})]})]})]}),a.length===0?l("div",{class:"outline-empty",children:e.length===0?"No headings":"All levels hidden"}):l("ul",{children:a.map(u=>l(Bi,{node:u,onJump:t,depth:0},u.id))})]})}function Bi({node:e,onJump:t,depth:n}){const[i,r]=z(!1),o=e.children.length>0,a=U.value===e.id,s=Math.min(n,5);return l("li",{class:`outline-li depth-${s}`,children:[l("div",{class:`outline-row ${a?"is-active":""}`,children:[o?l("button",{class:`outline-toggle ${i?"":"open"}`,"aria-label":i?"Expand section":"Collapse section",onClick:d=>{d.stopPropagation(),r(c=>!c)},children:l(Pi,{size:11})}):l("span",{class:"outline-toggle is-spacer","aria-hidden":!0}),l("button",{class:"outline-link",onClick:()=>t(e.id),title:e.text,children:e.text})]}),o&&!i&&l("ul",{class:"outline-children",children:e.children.map(d=>l(Bi,{node:d,onJump:t,depth:n+1},d.id))})]})}function Yo({scroller:e,trigger:t}){const[n,i]=z(0);return b(()=>{if(!e)return;let r=0;function o(){if(!e)return;const s=e.scrollHeight-e.clientHeight;if(s<=0){i(0);return}const d=Math.max(0,Math.min(1,e.scrollTop/s));i(d)}function a(){cancelAnimationFrame(r),r=requestAnimationFrame(o)}return e.addEventListener("scroll",a,{passive:!0}),o(),()=>{cancelAnimationFrame(r),e.removeEventListener("scroll",a)}},[e,t]),l("div",{class:"reading-progress",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(n*100),"aria-label":"Reading progress",children:l("div",{class:"reading-progress__bar",style:{width:`${n*100}%`}})})}function Pn(e){const t=K(null),n=K(e);return n.current=e,b(()=>{const i=t.current;if(!i)return;let r=null;function o(d){if(!r)return;const{side:c,onResize:h,min:u,max:f}=n.current,p=d.clientX-r.startX,_=c==="left"?r.startWidth+p:r.startWidth-p;h(Math.min(f,Math.max(u,_)))}function a(){if(!r)return;const{collapseAt:d,onCollapse:c,getCurrent:h}=n.current,u=h(),f=t.current;try{f==null||f.releasePointerCapture(r.pointerId)}catch{}r=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",a),u<d&&c()}function s(d){r={startX:d.clientX,startWidth:n.current.getCurrent(),pointerId:d.pointerId};try{i.setPointerCapture(d.pointerId)}catch{}document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",o),window.addEventListener("pointerup",a),d.preventDefault()}return i.addEventListener("pointerdown",s),()=>{if(i.removeEventListener("pointerdown",s),window.removeEventListener("pointermove",o),window.removeEventListener("pointerup",a),r){try{i.releasePointerCapture(r.pointerId)}catch{}document.body.style.cursor="",document.body.style.userSelect=""}}},[]),l("div",{ref:t,class:`resizer resizer-${e.side}`,role:"separator","aria-orientation":"vertical","aria-label":e.ariaLabel})}const nt=P(!1),Zt=P("doc"),At=X("mdview-search-case",!1),It=X("mdview-search-word",!1),Nt=X("mdview-search-regex",!1),Qo=At.signal,Zo=It.signal,el=Nt.signal;function tl(){At.set(!At.signal.value)}function nl(){It.set(!It.signal.value)}function il(){Nt.set(!Nt.signal.value)}function dt(e="doc"){Zt.value=e,nt.value=!0}function _e(){nt.value=!1}function rl(e){Zt.value=e}function An(e,t){let n=null,i=null;const r=((...o)=>{i=o,n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null;const a=i;i=null,a&&e(...a)},t)});return r.cancel=()=>{n!==null&&(clearTimeout(n),n=null),i=null},r.flush=()=>{if(n===null)return;clearTimeout(n),n=null;const o=i;i=null,o&&e(...o)},r}async function ol(e,t,n){const i=new URLSearchParams({q:e});t.caseSensitive&&i.set("case","1"),t.wholeWord&&i.set("word","1"),t.regex&&i.set("regex","1");const r=await fetch(`/api/search?${i.toString()}`,{signal:n});if(!r.ok)throw new Error(`HTTP ${r.status}`);return await r.json()}const ll={caseSensitive:!1,wholeWord:!1,regex:!1};function al(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sl(e,t){if(!e)return{test:()=>null,matchAll:()=>[],matchAllWithBudget:()=>({matches:[],truncated:!1}),query:e,valid:!0};let n;if(t.regex)try{n=new RegExp(e,t.caseSensitive?"g":"gi")}catch{return{test:()=>null,matchAll:()=>[],matchAllWithBudget:()=>({matches:[],truncated:!1}),query:e,valid:!1}}else{let i=al(e);t.wholeWord&&(i=`\\b${i}\\b`),n=new RegExp(i,t.caseSensitive?"g":"gi")}return{query:e,valid:!0,test(i){return n.lastIndex=0,n.exec(i)},matchAll(i){n.lastIndex=0;const r=[];let o;for(;(o=n.exec(i))!==null;){if(o[0].length===0){n.lastIndex++;continue}r.push({index:o.index,length:o[0].length})}return r},matchAllWithBudget(i,r){n.lastIndex=0;const o=[],a=performance.now()+r;let s;for(;(s=n.exec(i))!==null;){if(s[0].length===0){n.lastIndex++;continue}if(o.push({index:s.index,length:s[0].length}),performance.now()>a)return{matches:o,truncated:!0}}return{matches:o,truncated:!1}}}}const it="search-hit",Mt="is-active";function xe(e){e.querySelectorAll(`mark.${it}`).forEach(n=>{const i=n.parentNode;if(i){for(;n.firstChild;)i.insertBefore(n.firstChild,n);i.removeChild(n),i.normalize()}})}function cl(e){let t=e.parentNode;for(;t;){if(t instanceof HTMLElement&&t.tagName==="MARK"&&t.classList.contains(it))return!0;t=t.parentNode}return!1}function ul(e,t,n=ll){if(!t)return[];const i=sl(t,n);if(!i.valid)return[];const r=[],o=e.querySelector(".markdown-content")??e,a=document.createTreeWalker(o,NodeFilter.SHOW_TEXT,{acceptNode(d){if(!d.nodeValue||cl(d))return NodeFilter.FILTER_REJECT;const c=d.parentElement;return!c||c.closest(".heading-anchor, .copy-btn, .external-icon, .search-bar")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});let s=a.nextNode();for(;s;){const d=s.nodeValue??"";for(const c of i.matchAll(d))r.push({node:s,start:c.index,end:c.index+c.length});s=a.nextNode()}return r}function dl(e,t){const n=[],i=new Map;e.forEach(o=>{const a=i.get(o.node)??[];a.push(o),i.set(o.node,a)});const r=new Map;return e.forEach((o,a)=>{r.set(o,a)}),i.forEach((o,a)=>{var h;o.sort((u,f)=>u.start-f.start);let s=0;const d=a.parentNode;if(!d)return;const c=document.createDocumentFragment();o.forEach(u=>{u.start>s&&c.appendChild(document.createTextNode(a.nodeValue.slice(s,u.start)));const f=document.createElement("mark");f.className=it;const p=r.get(u);p===t&&f.classList.add(Mt),f.dataset.hit=String(p),f.textContent=a.nodeValue.slice(u.start,u.end),c.appendChild(f),n.push(f),s=u.end}),s<(((h=a.nodeValue)==null?void 0:h.length)??0)&&c.appendChild(document.createTextNode(a.nodeValue.slice(s))),d.replaceChild(c,a)}),n}function hl(e,t){const n=e.querySelectorAll(`mark.${it}`);let i=null;return n.forEach(r=>{Number(r.dataset.hit??-1)===t?(r.classList.add(Mt),i=r):r.classList.remove(Mt)}),i}const fl=250,pl=150;function _l({scroller:e,fileTrigger:t,onOpenFile:n}){const[i,r]=z(""),o=Zt.value,a=Qo.value,s=Zo.value,d=el.value,c=K(null),h=j([]),u=j(0),f=j(0),p=j(null),_=j(!1),m=j(null),w=j(0);b(()=>{var v,C;(v=c.current)==null||v.focus(),(C=c.current)==null||C.select()},[]);const k=O(()=>An((v,C,D)=>{xe(v);const ne=ul(v,C,D);h.value=ne,u.value=0,ne.length>0?(dl(ne,0),f.value=v.querySelectorAll("mark.search-hit").length,requestAnimationFrame(()=>{const V=v.querySelector("mark.search-hit.is-active");V&&($t(V),V.scrollIntoView({behavior:"smooth",block:"center"}))})):f.value=0},pl),[]);b(()=>{if(o==="doc"&&e){if(!i.trim()){k.cancel(),xe(e),h.value=[],u.value=0,f.value=0;return}return k(e,i,{caseSensitive:a,wholeWord:s,regex:d}),()=>k.cancel()}},[i,o,e,t,a,s,d]),b(()=>{if(o!=="doc"||!e||h.value.length===0)return;const v=hl(e,u.value);v&&($t(v),v.scrollIntoView({behavior:"smooth",block:"center"}))},[u.value,o,e,h.value.length]);const g=K(null),I=O(()=>An((v,C)=>{var ne;(ne=g.current)==null||ne.abort();const D=new AbortController;g.current=D,(async()=>{try{const V=await ol(v,C,D.signal);if(D.signal.aborted)return;p.value=V,m.value=null,w.value=0}catch(V){if(V.name==="AbortError")return;m.value=V.message}finally{g.current===D&&(g.current=null),D.signal.aborted||(_.value=!1)}})()},fl),[]);b(()=>{var v;if(o==="folder"){if(!i.trim()){I.cancel(),(v=g.current)==null||v.abort(),g.current=null,p.value=null,m.value=null,_.value=!1;return}return _.value=!0,I(i.trim(),{caseSensitive:a,wholeWord:s,regex:d}),()=>{var C;I.cancel(),(C=g.current)==null||C.abort(),g.current=null}}},[i,o,a,s,d]),b(()=>()=>{e&&xe(e)},[e]),b(()=>{o!=="doc"&&e&&xe(e)},[o,e]);function M(){if(o==="doc"){if(h.value.length===0)return;u.value=(u.value+1)%h.value.length}else{const v=ht(p.value);if(v.length===0)return;w.value=(w.value+1)%v.length}}function F(){if(o==="doc"){if(h.value.length===0)return;u.value=(u.value-1+h.value.length)%h.value.length}else{const v=ht(p.value);if(v.length===0)return;w.value=(w.value-1+v.length)%v.length}}function q(){const C=ht(p.value)[w.value];C&&(n(C.relPath),_e())}function y(v){v!==o&&rl(v)}function x(v){v.key==="Escape"?(v.preventDefault(),_e()):v.key==="Tab"?(v.preventDefault(),y(o==="doc"?"folder":"doc")):v.key==="Enter"?(v.preventDefault(),o==="doc"?v.shiftKey?F():M():q()):v.key==="ArrowDown"?(v.preventDefault(),M()):v.key==="ArrowUp"&&(v.preventDefault(),F())}return l("div",{class:"search-bar",role:"search","aria-label":"Find",children:[l("div",{class:"search-scope",role:"tablist","aria-label":"Search scope",children:[l("button",{type:"button",role:"tab","aria-selected":o==="doc",class:`scope-pill${o==="doc"?" is-active":""}`,"data-tooltip":"Search in document (Tab)","data-tooltip-side":"top",onClick:()=>y("doc"),tabIndex:-1,children:"Doc"}),l("button",{type:"button",role:"tab","aria-selected":o==="folder",class:`scope-pill${o==="folder"?" is-active":""}`,"data-tooltip":"Search across folder (⇧⌘F)","data-tooltip-side":"top",onClick:()=>y("folder"),tabIndex:-1,children:"Folder"})]}),l("input",{ref:c,type:"search",class:"search-input",placeholder:o==="doc"?"Find in document":"Find in folder",value:i,onInput:v=>r(v.target.value),onKeyDown:x,"aria-label":"Search query"}),l("div",{class:"search-options",role:"group","aria-label":"Search options",children:[l("button",{type:"button",class:`search-opt${a?" is-on":""}`,"aria-pressed":a,title:"Match case",onClick:tl,tabIndex:-1,children:"Aa"}),l("button",{type:"button",class:`search-opt${s?" is-on":""}`,"aria-pressed":s,title:"Whole word",onClick:nl,tabIndex:-1,children:"ab"}),l("button",{type:"button",class:`search-opt${d?" is-on":""}`,"aria-pressed":d,title:"Regular expression",onClick:il,tabIndex:-1,children:".*"})]}),l("span",{class:"search-count","aria-live":"polite",children:ml(o,i.trim(),u.value,f.value,_.value,p.value)}),l("button",{type:"button",class:"search-btn",onClick:F,"aria-label":"Previous match",title:"Previous (↑ / Shift+Enter)",children:"↑"}),l("button",{type:"button",class:"search-btn",onClick:M,"aria-label":"Next match",title:"Next (↓ / Enter)",children:"↓"}),l("button",{type:"button",class:"search-btn search-close",onClick:_e,"aria-label":"Close search",title:"Close (Esc)",children:"×"}),o==="folder"&&l(gl,{state:p.value,loading:_.value,error:m.value,query:i.trim(),activeIndex:w.value,onHover:v=>w.value=v,onPick:v=>{w.value=v,q()}})]})}function ht(e){if(!e)return[];const t=[];for(const n of e.results)for(const i of n.hits)t.push({relPath:n.relPath,fileTotal:n.total,fileTruncated:n.truncated,hit:i});return t}function vl(e){if(e.results.length===0)return"No matches";const t=e.results.reduce((r,o)=>r+o.total,0),n=e.results.length===1?"file":"files",i=e.truncated?"+":"";return`${t}${i} hits in ${e.results.length} ${n}`}function ml(e,t,n,i,r,o){return e==="doc"?t?i===0?"No matches":`${Math.min(n+1,i)} / ${i}`:"":r?"…":o?vl(o):""}function gl({state:e,loading:t,error:n,query:i,activeIndex:r,onHover:o,onPick:a}){if(!i)return null;if(t&&!e)return l("div",{class:"search-results",children:l("div",{class:"search-empty",children:"Searching…"})});if(n)return l("div",{class:"search-results",children:l("div",{class:"search-empty",children:["Error: ",n]})});if(!e||e.results.length===0)return l("div",{class:"search-results",children:l("div",{class:"search-empty",children:"No matches"})});let s=0;return l("div",{class:"search-results",children:[e.results.map(d=>l("section",{class:"search-file-group",children:[l("header",{class:"search-file-head",children:[l("span",{class:"search-file-path",children:d.relPath}),l("span",{class:"search-file-count",children:[d.total,d.truncated?"+":""," hits"]})]}),l("ul",{children:d.hits.map(c=>{const h=s++;return l("li",{class:`search-hit-row${h===r?" is-active":""}`,onMouseEnter:()=>o(h),onClick:()=>a(h),children:[l("span",{class:"search-hit-line",children:["L",c.line]}),l("span",{class:"search-hit-snippet",children:yl(c.snippet,c.highlight)})]},`${d.relPath}:${c.line}:${c.col}`)})})]},d.relPath)),e.truncated&&l("div",{class:"search-empty",children:"More results truncated — refine your query."})]})}function yl(e,t){const[n,i]=t;return l(ee,{children:[l("span",{children:e.slice(0,n)}),l("mark",{class:"search-hit",children:e.slice(n,i)}),l("span",{children:e.slice(i)})]})}const wl=typeof navigator<"u"&&/mac/i.test(navigator.platform||navigator.userAgent),ie=wl?"⌘":"Ctrl";function L(e){return e.metaKey||e.ctrlKey}function In(e,t){const n=tt(e.outline).map(r=>r.id);if(n.length===0)return;const i=U.value;if(t===1){const r=i?n.indexOf(i):-1,o=n[Math.min(r+1,n.length-1)];o&&e.onJumpHeading(o)}else{const r=i?n.indexOf(i):n.length,o=n[Math.max(r-1,0)];o&&e.onJumpHeading(o)}}function Nn(e){var a;const t=se.value;if(!t)return null;const n=si(t.tree);if(n.length===0)return null;const i=Qe.value,r=i?n.findIndex(s=>s.relPath===i):-1;if(r<0)return((a=n[0])==null?void 0:a.relPath)??null;const o=r+e;return o<0||o>=n.length?null:n[o].relPath}function Mn(e){const t=ye.value;t&&t.scrollBy({top:e*(t.clientHeight/2),behavior:"smooth"})}let Ne=0;const bl=600,zi=[{id:"palette",group:"Find",label:"Switch file (quick switcher)",displayKeys:[ie,"P"],whenTyping:"allow",match:e=>L(e)&&e.key.toLowerCase()==="p",run:()=>cr()},{id:"search-doc-meta",group:"Find",label:"Open in-doc search",displayKeys:[ie,"F"],whenTyping:"allow",match:e=>L(e)&&!e.shiftKey&&e.key.toLowerCase()==="f",run:()=>dt("doc")},{id:"search-folder-meta",group:"Find",label:"Open folder-wide search",displayKeys:[ie,"⇧","F"],whenTyping:"allow",match:e=>L(e)&&e.shiftKey&&e.key.toLowerCase()==="f",run:()=>dt("folder")},{id:"search-doc-slash",group:"Find",label:"Open search (no modifier)",displayKeys:["/"],whenTyping:"block",match:e=>!L(e)&&e.key==="/",run:()=>dt("doc")},{id:"shortcuts-panel",group:"View",label:"Show shortcuts panel",displayKeys:["?"],whenTyping:"block",match:e=>!L(e)&&e.key==="?",run:()=>Ni()},{id:"toggle-tree",group:"View",label:"Toggle file tree",displayKeys:[ie,"B"],whenTyping:"allow",match:e=>L(e)&&e.key.toLowerCase()==="b",run:()=>$e()},{id:"toggle-outline",group:"View",label:"Toggle outline",displayKeys:[ie,"."],whenTyping:"allow",match:e=>L(e)&&e.key===".",run:()=>Te()},{id:"toggle-theme",group:"View",label:"Toggle theme",displayKeys:[ie,"\\"],whenTyping:"allow",match:e=>L(e)&&e.key==="\\",run:()=>$i()},{id:"toggle-focus",group:"View",label:"Toggle focus mode",displayKeys:["f"],whenTyping:"block",match:e=>!L(e)&&!e.shiftKey&&e.key==="f",run:()=>pi()},{id:"toggle-minimap",group:"View",label:"Toggle minimap",displayKeys:["m"],whenTyping:"block",match:e=>!L(e)&&!e.shiftKey&&e.key==="m",run:()=>_i()},{id:"toggle-wide-layout",group:"View",label:"Toggle wide layout",displayKeys:["w"],whenTyping:"block",match:e=>!L(e)&&!e.shiftKey&&e.key==="w",run:()=>vi()},{id:"expand-all-sections",group:"View",label:"Expand all sections",displayKeys:["e"],whenTyping:"block",match:e=>!L(e)&&!e.shiftKey&&e.key==="e",run:()=>Kr()},{id:"collapse-all-sections",group:"View",label:"Collapse all sections",displayKeys:["⇧","E"],whenTyping:"block",match:e=>!L(e)&&e.shiftKey&&e.key==="E",run:()=>Ur()},{id:"next-heading",group:"Navigation",label:"Next heading",displayKeys:["j"],whenTyping:"block",match:e=>!L(e)&&e.key==="j",run:e=>In(e,1)},{id:"prev-heading",group:"Navigation",label:"Previous heading",displayKeys:["k"],whenTyping:"block",match:e=>!L(e)&&e.key==="k",run:e=>In(e,-1)},{id:"doc-top",group:"Navigation",label:"Top of document (gg)",displayKeys:["g","g"],whenTyping:"block",match:e=>{if(L(e)||e.shiftKey||e.key!=="g")return!1;const t=performance.now();return t-Ne<bl?(Ne=0,!0):(Ne=t,!1)},run:()=>{const e=ye.value;e&&e.scrollTo({top:0,behavior:"smooth"})}},{id:"doc-bottom",group:"Navigation",label:"Bottom of document",displayKeys:["⇧","G"],whenTyping:"block",match:e=>!L(e)&&e.shiftKey&&e.key==="G",run:()=>{const e=ye.value;e&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"})}},{id:"next-file",group:"Navigation",label:"Next file",displayKeys:["⇧","L"],whenTyping:"block",match:e=>!L(e)&&e.shiftKey&&e.key==="L",run:e=>{const t=Nn(1);t&&e.navigate(t)}},{id:"prev-file",group:"Navigation",label:"Previous file",displayKeys:["⇧","H"],whenTyping:"block",match:e=>!L(e)&&e.shiftKey&&e.key==="H",run:e=>{const t=Nn(-1);t&&e.navigate(t)}},{id:"next-same-level",group:"Navigation",label:"Next heading at same level",displayKeys:["]"],whenTyping:"block",match:e=>!L(e)&&e.key==="]",run:e=>{const t=Tn(e.outline,U.value,1);t&&e.onJumpHeading(t)}},{id:"prev-same-level",group:"Navigation",label:"Previous heading at same level",displayKeys:["["],whenTyping:"block",match:e=>!L(e)&&e.key==="[",run:e=>{const t=Tn(e.outline,U.value,-1);t&&e.onJumpHeading(t)}},{id:"half-page-down",group:"Navigation",label:"Half page down",displayKeys:["Ctrl","D"],whenTyping:"block",match:e=>e.ctrlKey&&!e.metaKey&&!e.shiftKey&&e.key.toLowerCase()==="d",run:()=>Mn(1)},{id:"half-page-up",group:"Navigation",label:"Half page up",displayKeys:["Ctrl","U"],whenTyping:"block",match:e=>e.ctrlKey&&!e.metaKey&&!e.shiftKey&&e.key.toLowerCase()==="u",run:()=>Mn(-1)}],kl=[{id:"esc-close",group:"Navigation",label:"Close search / lightbox / panel",displayKeys:["Esc"],match:()=>!1,run:()=>{}},{id:"enter-next",group:"Find",label:"Next match (in search)",displayKeys:["Enter"],match:()=>!1,run:()=>{}},{id:"shift-enter-prev",group:"Find",label:"Previous match (in search)",displayKeys:["⇧","Enter"],match:()=>!1,run:()=>{}}];function Hn(e){e.key!=="g"&&(Ne=0)}const Rn=["Navigation","Find","View"];function xl(e){var n;const t=new Map;for(const i of Rn)t.set(i,[]);for(const i of e)(n=t.get(i.group))==null||n.push(i);return Rn.map(i=>({heading:i,items:t.get(i)??[]}))}function Sl(){const e=et.value,t=O(()=>xl([...zi,...kl]),[]);return b(()=>{if(!e)return;function n(i){i.key==="Escape"&&Ie()}return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e]),e?l("div",{class:"shortcuts-overlay",role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",onClick:Ie,children:l("div",{class:"shortcuts-panel",onClick:n=>n.stopPropagation(),children:[l("div",{class:"shortcuts-head",children:[l("span",{class:"shortcuts-eyebrow",children:"Keyboard shortcuts"}),l("button",{type:"button",class:"shortcuts-close","aria-label":"Close shortcuts panel",onClick:Ie,children:"×"})]}),l("div",{class:"shortcuts-body",children:t.filter(n=>n.items.length>0).map(n=>l("section",{class:"shortcuts-group",children:[l("h3",{class:"shortcuts-group-title",children:n.heading}),l("ul",{children:n.items.map(i=>l("li",{children:[l("span",{class:"shortcut-label",children:i.label}),l("span",{class:"shortcut-keys",children:i.displayKeys.map((r,o)=>l("span",{children:[o>0&&l("span",{class:"shortcut-plus","aria-hidden":!0,children:"+"}),l("kbd",{children:r})]},`${r}-${o}`))})]},i.id))})]},n.heading))}),l("div",{class:"shortcuts-foot",children:["Press ",l("kbd",{children:"Esc"})," or click outside to close"]})]})}):null}const El=4;function Cl(e,t){const n=El;b(()=>{const i=e.current;if(!i)return;function r(o){o.altKey&&(o.preventDefault(),i.scrollBy({top:o.deltaY*n,left:o.deltaX*n,behavior:"auto"}))}return i.addEventListener("wheel",r,{passive:!1}),()=>{i.removeEventListener("wheel",r)}},[e,n])}const W=P(null),qe=P(null),Ht=P(!1);async function qi(e){Ht.value=!0,qe.value=null;try{const t=new URLSearchParams({palette:oe.value});e&&t.set("path",e);const n=`/api/file?${t}`,i=await fetch(n);if(!i.ok){const r=await i.json().catch(()=>({error:`HTTP ${i.status}`}));throw new Error(r.error??`HTTP ${i.status}`)}W.value=await i.json()}catch(t){qe.value=t.message,W.value=null}finally{Ht.value=!1}}function Ll(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||e.isContentEditable}function $l(e){return e.key!=="Escape"?!1:Ze.value?(Ae(),e.preventDefault(),!0):Xe.value?(Le(),e.preventDefault(),!0):et.value?(Ie(),e.preventDefault(),!0):nt.value?(_e(),e.preventDefault(),!0):!1}function Tl(e){b(()=>{const t={outline:e.outline,onJumpHeading:e.onJumpHeading,navigate:e.navigate};function n(i){if($l(i))return;const r=Ll(i.target);for(const o of zi)if(!(r&&o.whenTyping==="block")&&o.match(i)){i.preventDefault(),o.run(t),Hn(i);return}Hn(i)}return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e.outline,e.onJumpHeading,e.navigate])}function Pl(e){b(()=>{const t=new EventSource("/api/watch"),n=i=>{try{const r=JSON.parse(i.data);e(r)}catch{}};return t.addEventListener("change",n),t.addEventListener("add",n),t.addEventListener("unlink",n),t.addEventListener("config",n),t.addEventListener("workspace",n),()=>t.close()},[e])}function Al(e,t,n){if(e.kind!=="change")return!1;const i=(t==null?void 0:t.relPath)??n;return i!==null&&e.relPath===i}function Il({currentPath:e,scrollerRef:t}){const n=Xn(i=>{var r;if(Al(i,W.value,e)){const o=((r=t.current)==null?void 0:r.scrollTop)??0;qi(e).then(()=>{requestAnimationFrame(()=>{t.current&&(t.current.scrollTop=o)})});return}(i.kind==="add"||i.kind==="unlink"||i.kind==="config"||i.kind==="workspace")&&ai()},[e,t]);Pl(n)}let re=null,Rt=[],Y=null,Fn=null;function Vi(){return typeof window>"u"||window.parent===window?!1:new URLSearchParams(window.location.search).get("embed")==="vscode"}function Ft(e){if(re===null){Rt.push(e);return}window.parent.postMessage(e,re)}function Nl(e){if(Y=e,Fn!==null)return;const t=n=>{if(re===null){if(n.source===window.parent&&n.data!==null&&typeof n.data=="object"&&n.data.type==="mdview/init"){re=n.origin;for(const i of Rt)window.parent.postMessage(i,re);Rt=[],Y==null||Y(n.data)}return}n.origin===re&&(n.data===null||typeof n.data!="object"||typeof n.data.type!="string"||Y==null||Y(n.data))};Fn=t,window.addEventListener("message",t)}function Ml(){var q;ao(),Do();const e=ur(),{currentPath:t,setCurrentPath:n,navigate:i}=Fr(),r=Vi(),o=K(null),a=Sr.value,s=Er.value,d=vn.value,c=mn.value,h=fi.value;b(()=>{const y=se.value;if(!y)return;const x=y.roots.length===1?y.roots[0]:void 0;if((x==null?void 0:x.kind)==="file"){n(`${x.id}/${x.filePath}`);return}if(t===null){const v=Rr(),D=(v?ui(y.tree,v):null)??ci(y.tree);D&&n(D)}},[e,t]),b(()=>{qi(t)},[t,oe.value]),b(()=>{_e()},[t]),b(()=>{const y=W.value;let x=null;if(y){if(y.title)x=y.title;else if(t){const v=t.lastIndexOf("/");x=v>=0?t.slice(v+1):t}}document.title=x?`${x} | mdview`:"mdview"},[W.value,t]),b(()=>{if(!W.value||!o.current)return;const y=window.location.hash.slice(1);y?requestAnimationFrame(()=>{at(y);const x=document.getElementById(y);x==null||x.scrollIntoView({behavior:"auto",block:"start"})}):o.current.scrollTop=0},[W.value]),br(o.current),b(()=>{zo(o.current)},[o.current]),b(()=>{h?document.documentElement.dataset.wide="1":delete document.documentElement.dataset.wide},[h]),Il({currentPath:t,scrollerRef:o}),Tl({outline:((q=W.value)==null?void 0:q.outline)??[],onJumpHeading:y=>p(y),navigate:y=>i(y)}),Cl(o);const u=y=>i(y),f=(y,x)=>{if(r&&y){Ft({type:"mdview/internal-link-clicked",relPath:y,fromFile:t??""});return}if(i(y,x),x){const v=x.slice(1);requestAnimationFrame(()=>{var C;at(v),(C=document.getElementById(v))==null||C.scrollIntoView({behavior:"smooth"})})}},p=y=>{history.replaceState(history.state,"",`#${y}`),mr(y),at(y);const x=document.getElementById(y);if(x==null||x.scrollIntoView({behavior:"smooth"}),r&&x){const v=x.getAttribute("data-source-line"),C=v!==null?parseInt(v,10):null;C!==null&&!Number.isNaN(C)&&Ft({type:"mdview/heading-clicked",line:C,file:t??""})}},_=y=>{var x;if(y===null){history.replaceState(history.state,"",window.location.pathname+window.location.search),U.value=null,(x=o.current)==null||x.scrollTo({top:0,behavior:"smooth"});return}p(y)},m=W.value,w=se.value,k=St.value,g=["app-shell",r?"embed":"",a?"tree-collapsed":"",s?"outline-collapsed":"",k?"has-minimap":""].filter(Boolean).join(" "),I=`--tree-width:${r?0:d}px;--outline-width:${c}px`,M=()=>{$r(),a||$e()},F=()=>{Tr(),s||Te()};return l("div",{class:g,style:I,children:[!r&&l("aside",{class:"pane-tree","aria-label":"File tree",children:a?l("button",{class:"rail-btn","aria-label":"Expand file tree",title:"Expand file tree",onClick:$e,children:[l(Co,{size:15}),l("span",{class:"rail-label",children:"FILES"})]}):w&&l(Ro,{tree:w.tree,currentPath:t,onSelect:u,onCollapse:$e})}),!r&&!a&&l(Pn,{side:"left",ariaLabel:"Resize file tree",getCurrent:()=>vn.value,onResize:Cr,collapseAt:_n,onCollapse:M,min:Ue,max:We}),l("header",{class:"pane-header",children:[l(Wo,{outline:(m==null?void 0:m.outline)??[],fileName:(m==null?void 0:m.title)??null,onJumpHeading:_}),l(Yo,{scroller:o.current,trigger:m})]}),l("main",{class:"pane-main",ref:o,children:[nt.value&&l(_l,{scroller:o.current,fileTrigger:m,onOpenFile:u}),(w==null?void 0:w.roots.length)===0&&l("div",{class:"status",children:["No folders open. Run ",l("code",{children:"mdview <path>"})," in a folder to add one."]}),Ht.value&&!m&&l(mo,{}),qe.value&&l("div",{class:"status status-error",children:["Error: ",qe.value]}),m&&l(vo,{file:m,onInternalNavigate:f}),m&&St.value&&l(Vo,{outline:m.outline})]}),l(Bo,{}),l(Sl,{}),l(pr,{currentPath:t,onSelect:u}),!s&&l(Pn,{side:"right",ariaLabel:"Resize outline",getCurrent:()=>mn.value,onResize:Lr,collapseAt:_n,onCollapse:F,min:Ue,max:We}),l("aside",{class:"pane-outline","aria-label":"Outline",children:s?l("button",{class:"rail-btn","aria-label":"Expand outline",title:"Expand outline",onClick:Te,children:[l($o,{size:15}),l("span",{class:"rail-label",children:"OUTLINE"})]}):m&&l(Xo,{nodes:m.outline,onJump:p,onCollapse:Te})})]})}const Hl=new Set(["mdview/init","mdview/set-file","mdview/cursor-changed","mdview/palette-changed"]);function Rl(e){return e.length===0||e.startsWith("/")?!1:!e.split("/").some(t=>t==="..")}function Fl(e){if(Hl.has(e.type))switch(e.type){case"mdview/init":{Ft({type:"mdview/ready"});break}case"mdview/set-file":{const t=e.relPath;typeof t=="string"&&Rl(t)&&(Pe(t),ki(t));break}case"mdview/cursor-changed":{const t=e.line;if(typeof t!="number")break;requestAnimationFrame(()=>{const n=Array.from(document.querySelectorAll(".markdown-content :is(h1,h2,h3,h4,h5,h6)[data-source-line]"));let i=null;for(const r of n){const o=parseInt(r.getAttribute("data-source-line")??"",10);!Number.isNaN(o)&&o<=t&&(i=r)}i==null||i.scrollIntoView({behavior:"smooth",block:"start"})});break}case"mdview/palette-changed":{const t=e.palette;typeof t=="string"&&Je.includes(t)&&Di(t);break}}}Vi()&&Nl(Fl);const ji=document.getElementById("app");if(!ji)throw new Error("Missing #app");tr(l(Ml,{}),ji);export{Qt as _};
|