@hardikg/mdview 0.8.1 → 0.9.1
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 +39 -0
- package/README.md +6 -5
- package/bin/mdview.mjs +89 -73
- package/dist/client/assets/{abnfDiagram-VCTEODGH-DafRYfx3.js → abnfDiagram-VCTEODGH-BJQEGN-7.js} +1 -1
- package/dist/client/assets/{arc-BqKZ1e2b.js → arc-C6Oi4WlG.js} +1 -1
- package/dist/client/assets/{architectureDiagram-5GKGNRK7-_94hPNdL.js → architectureDiagram-5GKGNRK7-CvFdvi3K.js} +1 -1
- package/dist/client/assets/{blockDiagram-NRAW4CY4-BegJqAzx.js → blockDiagram-NRAW4CY4-D8P8a3XW.js} +1 -1
- package/dist/client/assets/{c4Diagram-UCG6FXSJ-DYBJe_j-.js → c4Diagram-UCG6FXSJ-WcmmjfHX.js} +1 -1
- package/dist/client/assets/channel-UA4WTF8Q.js +1 -0
- package/dist/client/assets/{chunk-2Q5K7J3B-CarNPuoG.js → chunk-2Q5K7J3B-LeZsbe9d.js} +1 -1
- package/dist/client/assets/{chunk-5VM5RSS4-Bmb8JM_j.js → chunk-5VM5RSS4-COq9euGx.js} +1 -1
- package/dist/client/assets/{chunk-F27PBJKO-BhLIUyGL.js → chunk-F27PBJKO-BxcjnaqW.js} +1 -1
- package/dist/client/assets/{chunk-G27WJ6UU-B_7t7iym.js → chunk-G27WJ6UU-CscpPXiS.js} +1 -1
- package/dist/client/assets/{chunk-JWPE2WC7-6WDfZVE5.js → chunk-JWPE2WC7-DD0M0JL-.js} +1 -1
- package/dist/client/assets/{chunk-LCL6LL3I-BnM13fhY.js → chunk-LCL6LL3I-DXhJ59Qq.js} +1 -1
- package/dist/client/assets/{chunk-POPQ4Y6H-DQMWRZKQ.js → chunk-POPQ4Y6H-Bj3eKHA8.js} +1 -1
- package/dist/client/assets/{chunk-SVP7TREG-DPpw4ke1.js → chunk-SVP7TREG-CDQ9vZv1.js} +1 -1
- package/dist/client/assets/{chunk-XXDRQBXY-ByC-zeqG.js → chunk-XXDRQBXY-91VBn0TQ.js} +1 -1
- package/dist/client/assets/classDiagram-DTDB5LWJ-Ch3MnxRH.js +1 -0
- package/dist/client/assets/classDiagram-v2-JRS7N3AN-Ch3MnxRH.js +1 -0
- package/dist/client/assets/{cose-bilkent-JH36ORCC-CiRnFlQp.js → cose-bilkent-JH36ORCC-BaQN6N6K.js} +1 -1
- package/dist/client/assets/{cynefin-OW5HDTMX-DqTFYole.js → cynefin-OW5HDTMX-DFpC3uqz.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-B1WAhR06.js → cynefinDiagram-5FMLGOSQ-CSeSIxw6.js} +1 -1
- package/dist/client/assets/{dagre-3AP2YEHR-DQK5a43-.js → dagre-3AP2YEHR-BBkMnw1s.js} +1 -1
- package/dist/client/assets/{diagram-S7CK7UJ4-BMQ8dao_.js → diagram-S7CK7UJ4-BRdjuShi.js} +1 -1
- package/dist/client/assets/{diagram-UQ7AKVKN-CT7KIFG4.js → diagram-UQ7AKVKN-D-RaNNET.js} +1 -1
- package/dist/client/assets/{diagram-VSXAHHWV-By0SbfXs.js → diagram-VSXAHHWV-eL5_j9pa.js} +1 -1
- package/dist/client/assets/{diagram-VX7I27RA-DwshpqNi.js → diagram-VX7I27RA-nlUjCwlX.js} +1 -1
- package/dist/client/assets/{diagram-Z3DM3KII-CG7wA7Kr.js → diagram-Z3DM3KII-DvhXGz8M.js} +1 -1
- package/dist/client/assets/{ebnfDiagram-PWID7BFC-XlNRbCZw.js → ebnfDiagram-PWID7BFC-LgynLQ4Z.js} +1 -1
- package/dist/client/assets/{erDiagram-SSCWMZ5O-BtDUPrpL.js → erDiagram-SSCWMZ5O-Bc2j9FRV.js} +1 -1
- package/dist/client/assets/{flowDiagram-A5DVABFB-DKJ5hkO-.js → flowDiagram-A5DVABFB-ClpDS0y_.js} +1 -1
- package/dist/client/assets/{ganttDiagram-EL5Y4UJY-B8rnbHA1.js → ganttDiagram-EL5Y4UJY-_RmNHCQH.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-Conc20s7.js → gitGraphDiagram-WWUBYQGX-F1UGJQ4d.js} +1 -1
- package/dist/client/assets/index-BP_8buXC.css +1 -0
- package/dist/client/assets/index-DqIihcNP.js +2 -0
- package/dist/client/assets/{infoDiagram-RXCK75RN-DNuHlrdu.js → infoDiagram-RXCK75RN-BR20W1yx.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-5VMMS53U-DkYaQbSy.js → ishikawaDiagram-5VMMS53U-D6bgpoOj.js} +1 -1
- package/dist/client/assets/{journeyDiagram-EYS64GPL-BdoQruin.js → journeyDiagram-EYS64GPL-CBjB_0Bx.js} +1 -1
- package/dist/client/assets/{kanban-definition-3QL26DDD-BD3QQjwp.js → kanban-definition-3QL26DDD-Bz0HhYZd.js} +1 -1
- package/dist/client/assets/{layout-DKu9QfZ6.js → layout-BmTy4KT7.js} +1 -1
- package/dist/client/assets/{linear-DMmTRDu2.js → linear-Cgk2Kw-d.js} +1 -1
- package/dist/client/assets/{mermaid.core-2ESgyZ95.js → mermaid.core-Dq2piIpp.js} +65 -65
- package/dist/client/assets/{mindmap-definition-FBJOCRG2-CokK9_yg.js → mindmap-definition-FBJOCRG2-BSbZ3zKk.js} +1 -1
- package/dist/client/assets/{pegDiagram-XKGWAZYB-CUAn26Uv.js → pegDiagram-XKGWAZYB-BLsHBZ_O.js} +1 -1
- package/dist/client/assets/{pieDiagram-E7YTZNPT-BT-XLIyl.js → pieDiagram-E7YTZNPT-BTtaojGC.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-AXDQQJYC-dDr-ZgjR.js → quadrantDiagram-AXDQQJYC-W-VPz1gZ.js} +1 -1
- package/dist/client/assets/{railroadDiagram-O6MQD6OU-B5rCSICc.js → railroadDiagram-O6MQD6OU-CstXUJhE.js} +1 -1
- package/dist/client/assets/{requirementDiagram-EFPCY7ZU-DyI3FGB5.js → requirementDiagram-EFPCY7ZU-DPpI_Lvd.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-P5KCCOFB-CGXj8eCe.js → sankeyDiagram-P5KCCOFB-B3HiW1sY.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-C3yr2FVq.js → sequenceDiagram-WJ2MYXX4-CfpZAY9b.js} +1 -1
- package/dist/client/assets/{sizeCapture-X5ZJPWSS-CCnkSxko.js → sizeCapture-X5ZJPWSS-Dsdx6W_J.js} +1 -1
- package/dist/client/assets/{stateDiagram-HBIQ2CUA-BG5Dshx6.js → stateDiagram-HBIQ2CUA-DPm-o7Ee.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-4QOOHH4V-DDqXMzve.js +1 -0
- package/dist/client/assets/{swimlanes-XN3QIQJK-MGfvzMlQ.js → swimlanes-XN3QIQJK-BPdZeRls.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-VK2B7HYN-BHORPcrU.js +8 -0
- package/dist/client/assets/{timeline-definition-24CTP7MA-Bj3gMrOq.js → timeline-definition-24CTP7MA-1bs3iV0k.js} +1 -1
- package/dist/client/assets/{vennDiagram-4TSXK5OY-CiIW_j8g.js → vennDiagram-4TSXK5OY-vYOlmqTL.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-VM6X3IG4-DQTIyknP.js → wardleyDiagram-VM6X3IG4-DTPUMRNL.js} +1 -1
- package/dist/client/assets/{xychartDiagram-S5SC5T6Z-Bg0tzmhJ.js → xychartDiagram-S5SC5T6Z-M5kqQyt7.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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var qe,D,Hn,On,J,en,Rn,Bn,it,xe,de,Kn,Ht,pt,ht,Le={},$e=[],Jr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,je=Array.isArray;function V(e,t){for(var n in t)e[n]=t[n];return e}function Ot(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Gr(e,t,n){var r,i,s,l={};for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:l[s]=t[s];if(arguments.length>2&&(l.children=arguments.length>3?qe.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)l[s]===void 0&&(l[s]=e.defaultProps[s]);return De(e,l,r,i,null)}function De(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Hn,__i:-1,__u:0};return i==null&&D.vnode!=null&&D.vnode(s),s}function ee(e){return e.children}function me(e,t){this.props=e,this.context=t}function le(e,t){if(t==null)return e.__?le(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"?le(e):null}function Xr(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],s=V({},t);s.__v=t.__v+1,D.vnode&&D.vnode(s),Rt(e.__P,s,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??le(t),!!(32&t.__u),i),s.__v=t.__v,s.__.__k[s.__i]=s,qn(r,s,i),t.__e=t.__=null,s.__e!=n&&Vn(s)}}function Vn(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}),Vn(e)}function tn(e){(!e.__d&&(e.__d=!0)&&J.push(e)&&!Me.__r++||en!=D.debounceRendering)&&((en=D.debounceRendering)||Rn)(Me)}function Me(){try{for(var e,t=1;J.length;)J.length>t&&J.sort(Bn),e=J.shift(),t=J.length,Xr(e)}finally{J.length=Me.__r=0}}function Wn(e,t,n,r,i,s,l,a,d,c,m){var u,p,f,h,g,k,_,b=r&&r.__k||$e,T=t.length;for(d=Yr(n,t,b,d,T),u=0;u<T;u++)(f=n.__k[u])!=null&&(p=f.__i!=-1&&b[f.__i]||Le,f.__i=u,k=Rt(e,f,p,i,s,l,a,d,c,m),h=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&Bt(p.ref,null,f),m.push(f.ref,f.__c||h,f)),g==null&&h!=null&&(g=h),(_=!!(4&f.__u))||p.__k===f.__k?(d=zn(f,d,e,_),_&&p.__e&&(p.__e=null)):typeof f.type=="function"&&k!==void 0?d=k:h&&(d=h.nextSibling),f.__u&=-7);return n.__e=g,d}function Yr(e,t,n,r,i){var s,l,a,d,c,m=n.length,u=m,p=0;for(e.__k=new Array(i),s=0;s<i;s++)(l=t[s])!=null&&typeof l!="boolean"&&typeof l!="function"?(typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?l=e.__k[s]=De(null,l,null,null,null):je(l)?l=e.__k[s]=De(ee,{children:l},null,null,null):l.constructor===void 0&&l.__b>0?l=e.__k[s]=De(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[s]=l,d=s+p,l.__=e,l.__b=e.__b+1,a=null,(c=l.__i=Qr(l,n,d,u))!=-1&&(u--,(a=n[c])&&(a.__u|=2)),a==null||a.__v==null?(c==-1&&(i>m?p--:i<m&&p++),typeof l.type!="function"&&(l.__u|=4)):c!=d&&(c==d-1?p--:c==d+1?p++:(c>d?p--:p++,l.__u|=4))):e.__k[s]=null;if(u)for(s=0;s<m;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=le(a)),Jn(a,a));return r}function zn(e,t,n,r){var i,s;if(typeof e.type=="function"){for(i=e.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=e,t=zn(i[s],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=le(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Qr(e,t,n,r){var i,s,l,a=e.key,d=e.type,c=t[n],m=c!=null&&(2&c.__u)==0;if(c===null&&a==null||m&&a==c.key&&d==c.type)return n;if(r>(m?1:0)){for(i=n-1,s=n+1;i>=0||s<t.length;)if((c=t[l=i>=0?i--:s++])!=null&&(2&c.__u)==0&&a==c.key&&d==c.type)return l}return-1}function nn(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Jr.test(t)?n:n+"px"}function ye(e,t,n,r,i){var s,l;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||nn(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||nn(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(Kn,"$1")),l=t.toLowerCase(),t=l in e||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n[de]=r[de]:(n[de]=Ht,e.addEventListener(t,s?ht:pt,s)):e.removeEventListener(t,s?ht:pt,s);else{if(i=="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[xe]==null)t[xe]=Ht++;else if(t[xe]<n[de])return;return n(D.event?D.event(t):t)}}}function Rt(e,t,n,r,i,s,l,a,d,c){var m,u,p,f,h,g,k,_,b,T,L,F,z,N,w,v=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(d=!!(32&n.__u),s=[a=t.__e=n.__e]),(m=D.__b)&&m(t);e:if(typeof v=="function")try{if(_=t.props,b=v.prototype&&v.prototype.render,T=(m=v.contextType)&&r[m.__c],L=m?T?T.props.value:m.__:r,n.__c?k=(u=t.__c=n.__c).__=u.__E:(b?t.__c=u=new v(_,L):(t.__c=u=new me(_,L),u.constructor=v,u.render=ei),T&&T.sub(u),u.state||(u.state={}),u.__n=r,p=u.__d=!0,u.__h=[],u._sb=[]),b&&u.__s==null&&(u.__s=u.state),b&&v.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=V({},u.__s)),V(u.__s,v.getDerivedStateFromProps(_,u.__s))),f=u.props,h=u.state,u.__v=t,p)b&&v.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),b&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(b&&v.getDerivedStateFromProps==null&&_!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(_,L),t.__v==n.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(_,u.__s,L)===!1){t.__v!=n.__v&&(u.props=_,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(U){U&&(U.__=t)}),$e.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&l.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(_,u.__s,L),b&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,h,g)})}if(u.context=L,u.props=_,u.__P=e,u.__e=!1,F=D.__r,z=0,b)u.state=u.__s,u.__d=!1,F&&F(t),m=u.render(u.props,u.state,u.context),$e.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,F&&F(t),m=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++z<25);u.state=u.__s,u.getChildContext!=null&&(r=V(V({},r),u.getChildContext())),b&&!p&&u.getSnapshotBeforeUpdate!=null&&(g=u.getSnapshotBeforeUpdate(f,h)),N=m!=null&&m.type===ee&&m.key==null?jn(m.props.children):m,a=Wn(e,je(N)?N:[N],t,n,r,i,s,l,a,d,c),u.base=t.__e,t.__u&=-161,u.__h.length&&l.push(u),k&&(u.__E=u.__=null)}catch(U){if(t.__v=null,d||s!=null)if(U.then){for(t.__u|=d?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else{for(w=s.length;w--;)Ot(s[w]);ft(t)}else t.__e=n.__e,t.__k=n.__k,U.then||ft(t);D.__e(U,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Zr(n.__e,t,n,r,i,s,l,d,c);return(m=D.diffed)&&m(t),128&t.__u?void 0:a}function ft(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ft))}function qn(e,t,n){for(var r=0;r<n.length;r++)Bt(n[r],n[++r],n[++r]);D.__c&&D.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){D.__e(s,i.__v)}})}function jn(e){return typeof e!="object"||e==null||e.__b>0?e:je(e)?e.map(jn):V({},e)}function Zr(e,t,n,r,i,s,l,a,d){var c,m,u,p,f,h,g,k=n.props||Le,_=t.props,b=t.type;if(b=="svg"?i="http://www.w3.org/2000/svg":b=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((f=s[c])&&"setAttribute"in f==!!b&&(b?f.localName==b:f.nodeType==3)){e=f,s[c]=null;break}}if(e==null){if(b==null)return document.createTextNode(_);e=document.createElementNS(i,b,_.is&&_),a&&(D.__m&&D.__m(t,s),a=!1),s=null}if(b==null)k===_||a&&e.data==_||(e.data=_);else{if(s=s&&qe.call(e.childNodes),!a&&s!=null)for(k={},c=0;c<e.attributes.length;c++)k[(f=e.attributes[c]).name]=f.value;for(c in k)f=k[c],c=="dangerouslySetInnerHTML"?u=f:c=="children"||c in _||c=="value"&&"defaultValue"in _||c=="checked"&&"defaultChecked"in _||ye(e,c,null,f,i);for(c in _)f=_[c],c=="children"?p=f:c=="dangerouslySetInnerHTML"?m=f:c=="value"?h=f:c=="checked"?g=f:a&&typeof f!="function"||k[c]===f||ye(e,c,f,k[c],i);if(m)a||u&&(m.__html==u.__html||m.__html==e.innerHTML)||(e.innerHTML=m.__html),t.__k=[];else if(u&&(e.innerHTML=""),Wn(t.type=="template"?e.content:e,je(p)?p:[p],t,n,r,b=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,l,s?s[0]:n.__k&&le(n,0),a,d),s!=null)for(c=s.length;c--;)Ot(s[c]);a||(c="value",b=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[c]||b=="progress"&&!h||b=="option"&&h!=k[c])&&ye(e,c,h,k[c],i),c="checked",g!=null&&g!=e[c]&&ye(e,c,g,k[c],i))}return e}function Bt(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){D.__e(i,n)}}function Jn(e,t,n){var r,i;if(D.unmount&&D.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Bt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){D.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Jn(r[i],t,n||typeof e.type!="function");n||Ot(e.__e),e.__c=e.__=e.__e=void 0}function ei(e,t,n){return this.constructor(e,n)}function ti(e,t,n){var r,i,s,l;t==document&&(t=document.documentElement),D.__&&D.__(e,t),i=(r=!1)?null:t.__k,s=[],l=[],Rt(t,e=t.__k=Gr(ee,null,[e]),i||Le,Le,t.namespaceURI,i?null:t.firstChild?qe.call(t.childNodes):null,s,i?i.__e:t.firstChild,r,l),qn(s,e,l)}qe=$e.slice,D={__e:function(e,t,n,r){for(var i,s,l;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),l=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),l=i.__d),l)return i.__E=i}catch(a){e=a}throw e}},Hn=0,On=function(e){return e!=null&&e.constructor===void 0},me.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=V({},this.state),typeof e=="function"&&(e=e(V({},n),this.props)),e&&V(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),tn(this))},me.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tn(this))},me.prototype.render=ee,J=[],Rn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Bn=function(e,t){return e.__v.__b-t.__v.__b},Me.__r=0,it=Math.random().toString(8),xe="__d"+it,de="__a"+it,Kn=/(PointerCapture)$|Capture$/i,Ht=0,pt=rn(!1),ht=rn(!0);var ni=0;function o(e,t,n,r,i,s){t||(t={});var l,a,d=t;if("ref"in d)for(a in d={},t)a=="ref"?l=t[a]:d[a]=t[a];var c={type:e,props:d,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ni,__i:-1,__u:0,__source:i,__self:s};if(typeof e=="function"&&(l=e.defaultProps))for(a in l)d[a]===void 0&&(d[a]=l[a]);return D.vnode&&D.vnode(c),c}const Je=["flexoki","paper","solarized","everforest","rose-pine","kanagawa","catppuccin","high-contrast"];var ve,C,st,sn,ge=0,Gn=[],E=D,on=E.__b,ln=E.__r,an=E.diffed,cn=E.__c,un=E.unmount,dn=E.__;function Kt(e,t){E.__h&&E.__h(C,e,ge||t),ge=0;var n=C.__H||(C.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function W(e){return ge=1,ri(Qn,e)}function ri(e,t,n){var r=Kt(ve++,2);if(r.t=e,!r.__c&&(r.__=[Qn(void 0,t),function(a){var d=r.__N?r.__N[0]:r.__[0],c=r.t(d,a);d!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=C,!C.__f)){var i=function(a,d,c){if(!r.__c.__H)return!0;var m=r.__c.__H.__.filter(function(p){return p.__c});if(m.every(function(p){return!p.__N}))return!s||s.call(this,a,d,c);var u=r.__c.props!==a;return m.some(function(p){if(p.__N){var f=p.__[0];p.__=p.__N,p.__N=void 0,f!==p.__[0]&&(u=!0)}}),s&&s.call(this,a,d,c)||u};C.__f=!0;var s=C.shouldComponentUpdate,l=C.componentWillUpdate;C.componentWillUpdate=function(a,d,c){if(this.__e){var m=s;s=void 0,i(a,d,c),s=m}l&&l.call(this,a,d,c)},C.shouldComponentUpdate=i}return r.__N||r.__}function y(e,t){var n=Kt(ve++,3);!E.__s&&Yn(n.__H,t)&&(n.__=e,n.u=t,C.__H.__h.push(n))}function R(e){return ge=5,H(function(){return{current:e}},[])}function H(e,t){var n=Kt(ve++,7);return Yn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Xn(e,t){return ge=8,H(function(){return e},t)}function ii(){for(var e;e=Gn.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ue),t.__h.some(vt),t.__h=[]}catch(n){t.__h=[],E.__e(n,e.__v)}}}E.__b=function(e){C=null,on&&on(e)},E.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),dn&&dn(e,t)},E.__r=function(e){ln&&ln(e),ve=0;var t=(C=e.__c).__H;t&&(st===C?(t.__h=[],C.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(Ue),t.__h.some(vt),t.__h=[],ve=0)),st=C},E.diffed=function(e){an&&an(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Gn.push(t)!==1&&sn===E.requestAnimationFrame||((sn=E.requestAnimationFrame)||si)(ii)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),st=C=null},E.__c=function(e,t){t.some(function(n){try{n.__h.some(Ue),n.__h=n.__h.filter(function(r){return!r.__||vt(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],E.__e(r,n.__v)}}),cn&&cn(e,t)},E.unmount=function(e){un&&un(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Ue(r)}catch(i){t=i}}),n.__H=void 0,t&&E.__e(t,n.__v))};var mn=typeof requestAnimationFrame=="function";function si(e){var t,n=function(){clearTimeout(r),mn&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);mn&&(t=requestAnimationFrame(n))}function Ue(e){var t=C,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),C=t}function vt(e){var t=C;e.__c=e.__(),C=t}function Yn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Qn(e,t){return typeof t=="function"?t(e):t}var oi=Symbol.for("preact-signals");function Vt(){if(Q>1)Q--;else{var e,t=!1;for((function(){var i=He;for(He=void 0;i!==void 0;)i.S.v===i.v&&(i.S.i=i.i),i=i.o})();pe!==void 0;){var n=pe;for(pe=void 0,Fe++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&tr(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(Fe=0,Q--,t)throw e}}var x=void 0;function Zn(e){var t=x;x=void 0;try{return e()}finally{x=t}}var pe=void 0,Q=0,Fe=0,pn=0,He=void 0,Oe=0;function er(e){if(x!==void 0){var t=e.n;if(t===void 0||t.t!==x)return t={i:0,S:e,p:x.s,n:void 0,t:x,e:void 0,x:void 0,r:t},x.s!==void 0&&(x.s.n=t),x.s=t,e.n=t,32&x.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=x.s,t.n=void 0,x.s.n=t,x.s=t),t}}function A(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}A.prototype.brand=oi;A.prototype.h=function(){return!0};A.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 r;(r=t.W)==null||r.call(t)}))};A.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&Zn(function(){var i;(i=t.Z)==null||i.call(t)}))}};A.prototype.subscribe=function(e){var t=this;return Ge(function(){var n=t.value,r=x;x=void 0;try{e(n)}finally{x=r}},{name:"sub"})};A.prototype.valueOf=function(){return this.value};A.prototype.toString=function(){return this.value+""};A.prototype.toJSON=function(){return this.value};A.prototype.peek=function(){var e=x;x=void 0;try{return this.value}finally{x=e}};Object.defineProperty(A.prototype,"value",{get:function(){var e=er(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!==pn&&(n.l=pn,He={S:n,v:n.v,i:n.i,o:He})})(this),this.v=e,this.i++,Oe++,Q++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Vt()}}}});function I(e,t){return new A(e,t)}function tr(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 nr(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 rr(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function te(e,t){A.call(this,void 0),this.x=e,this.s=void 0,this.g=Oe-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 A;te.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Oe))return!0;if(this.g=Oe,this.f|=1,this.i>0&&!tr(this))return this.f&=-2,!0;var e=x;try{nr(this),x=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 x=e,rr(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)}A.prototype.S.call(this,e)};te.prototype.U=function(e){if(this.t!==void 0&&(A.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=er(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function ir(e,t){return new te(e,t)}function sr(e){var t=e.m;if(e.m=void 0,typeof t=="function"){Q++;var n=x;x=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Wt(e),r}finally{x=n,Vt()}}}function Wt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,sr(e)}function li(e){if(x!==this)throw new Error("Out-of-order effect");rr(this),x=e,this.f&=-2,8&this.f&&Wt(this),Vt()}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,sr(this),nr(this),Q++;var e=x;return x=this,li.bind(this,e)};ce.prototype.N=function(){2&this.f||(this.f|=2,this.u=pe,pe=this)};ce.prototype.d=function(){this.f|=8,1&this.f||Wt(this)};ce.prototype.dispose=function(){this.d()};function Ge(e,t){var n=new ce(e,t);try{n.c()}catch(i){throw n.d(),i}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var _e;function ue(e,t){D[e]=t.bind(null,D[e]||function(){})}function Re(e){if(_e){var t=_e;_e=void 0,t()}_e=e&&e.S()}function or(e){var t=this,n=e.data,r=j(n);r.value=n;var i=H(function(){for(var s=t.__v;s=s.__;)if(s.__c){s.__c.__$f|=4;break}return t.__$u.c=function(){var l,a=t.__$u.S(),d=i.value;a(),On(d)||((l=t.base)==null?void 0:l.nodeType)!==3?(t.__$f|=1,t.setState({})):t.base.data=d},ir(function(){var l=r.value.value;return l===0?0:l===!0?"":l||""})},[]);return i.value}or.displayName="_st";Object.defineProperties(A.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:or},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,r=t.props;for(var i in r)if(i!=="children"){var s=r[i];s instanceof A&&(n||(t.__np=n={}),n[i]=s,r[i]=s.peek())}}e(t)});ue("__r",function(e,t){e(t),Re();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=(function(i){var s;return Ge(function(){s=this}),s.c=function(){r.__$f|=1,r.setState({})},s})())),Re(n)});ue("__e",function(e,t,n,r){Re(),e(t,n,r)});ue("diffed",function(e,t){Re();var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var s=n.U;if(s)for(var l in s){var a=s[l];a!==void 0&&!(l in r)&&(a.d(),s[l]=void 0)}else n.U=s={};for(var d in r){var c=s[d],m=r[d];c===void 0?(c=ai(n,d,m,i),s[d]=c):c.o(m,i)}}}e(t)});function ai(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,s=I(n);return{o:function(l,a){s.value=l,r=a},d:Ge(function(){var l=s.value.value;r[t]!==l&&(r[t]=l,i?e[t]=l:l?e.setAttribute(t,l):e.removeAttribute(t))})}}ue("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var s=r[i];s&&s.d()}}}}else{var l=t.__c;if(l){var a=l.__$u;a&&(l.__$u=void 0,a.d())}}e(t)});ue("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)});me.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){if(!(r||2&this.__$f||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var s in e)if(s!=="__source"&&e[s]!==this.props[s])return!0;for(var l in this.props)if(!(l in e))return!0;return!1};function j(e){return H(function(){return I(e)},[])}const Xe=I(!1);function ci(){Xe.value=!0}function Se(){Xe.value=!1}const ae=I(null),gt=I(null);async function lr(){const e=await fetch("/api/tree");if(!e.ok)return;const t=await e.json();ae.value=t,gt.value=t.config??null}function ui(){return y(()=>{lr()},[]),ae.value}function ar(e){const t=[];function n(r){for(const i of r)i.type==="file"&&i.isMarkdown?t.push({relPath:i.relPath,name:i.name}):i.type==="dir"&&i.children&&n(i.children)}return n(e),t}function di(e,t){if(!t)return{...e,score:0,matchRanges:[]};const n=t.toLowerCase(),r=e.relPath.toLowerCase(),s=e.name.toLowerCase().indexOf(n);if(s!==-1){const m=e.relPath.length-e.name.length+s;return{...e,score:1e3-m-e.relPath.length,matchRanges:[[m,m+n.length]]}}const l=r.indexOf(n);if(l!==-1)return{...e,score:500-l-e.relPath.length,matchRanges:[[l,l+n.length]]};const a=[];let d=0,c=-1;for(let m=0;m<r.length&&d<n.length;m++)r[m]===n[d]?(c===-1&&(c=m),d++):c!==-1&&(a.push([c,c+1]),c=-1);return c!==-1&&a.push([c,d-(n.length-1)+c]),d===n.length?{...e,score:100-e.relPath.length,matchRanges:a}:null}function mi(e,t,n=50){const r=[];for(const i of e){const s=di(i,t);s&&r.push(s)}return r.sort((i,s)=>s.score-i.score),r.slice(0,n)}function cr(e){for(const t of e){if(t.type==="file"&&t.isMarkdown)return t.relPath;if(t.type==="dir"&&t.children){const n=cr(t.children);if(n)return n}}return null}function ur(e,t){for(const n of e){const r=n.relPath===t||n.relPath.startsWith(`${t}/`);if(n.type==="file"){if(r&&n.isMarkdown)return n.relPath;continue}if(n.children&&(r||t.startsWith(`${n.relPath}/`))){const i=ur(n.children,t);if(i)return i}}return null}function pi(e,t){if(t.length===0)return e;const n=[];let r=0;for(const[i,s]of t)i>r&&n.push(e.slice(r,i)),n.push({mark:e.slice(i,s)}),r=s;return r<e.length&&n.push(e.slice(r)),n.map((i,s)=>typeof i=="string"?o("span",{children:i},s,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:23,columnNumber:9},this):o("mark",{class:"palette-match",children:i.mark},s,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:24,columnNumber:9},this))}function hi({currentPath:e,onSelect:t}){const n=Xe.value,r=ae.value,[i,s]=W(""),[l,a]=W(0),d=R(null),c=R(null),m=H(()=>r?ar(r.tree):[],[r]),u=H(()=>n?i.trim()?mi(m,i.trim()):m.slice(0,50).map(h=>({...h,score:0,matchRanges:[]})):[],[m,i,n]);if(y(()=>{n&&(s(""),a(0),requestAnimationFrame(()=>{var h,g;(h=d.current)==null||h.focus(),(g=d.current)==null||g.select()}))},[n]),y(()=>{l>=u.length&&a(Math.max(0,u.length-1))},[u.length,l]),y(()=>{if(!n||!c.current)return;const h=c.current.children[l];h==null||h.scrollIntoView({block:"nearest"})},[l,n]),!n)return null;function p(h){const g=u[h];g&&(t(g.relPath),Se())}function f(h){h.key==="Escape"?(h.preventDefault(),Se()):h.key==="ArrowDown"||h.ctrlKey&&h.key==="n"?(h.preventDefault(),a(g=>u.length===0?0:(g+1)%u.length)):h.key==="ArrowUp"||h.ctrlKey&&h.key==="p"?(h.preventDefault(),a(g=>u.length===0?0:(g-1+u.length)%u.length)):h.key==="Enter"&&(h.preventDefault(),p(l))}return o("div",{class:"palette-overlay",role:"dialog","aria-modal":"true","aria-label":"Switch file",onClick:Se,children:o("div",{class:"palette",onClick:h=>h.stopPropagation(),children:[o("div",{class:"palette-input-wrap",children:[o("span",{class:"palette-prefix","aria-hidden":!0,children:"⌘P"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:113,columnNumber:11},this),o("input",{ref:d,type:"text",class:"palette-input",placeholder:"Switch file…",value:i,onInput:h=>{s(h.target.value),a(0)},onKeyDown:f,"aria-label":"Find file"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:114,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:112,columnNumber:9},this),o("ul",{class:"palette-list",ref:c,role:"listbox",children:[u.length===0&&o("li",{class:"palette-empty",children:"No files match"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:130,columnNumber:13},this),u.map((h,g)=>{const k=g===l,_=e===h.relPath,b=h.relPath.lastIndexOf("/"),T=b>=0?h.relPath.slice(0,b+1):"",L=b>=0?h.relPath.slice(b+1):h.relPath;return o("li",{class:`palette-item${k?" is-active":""}${_?" is-current":""}`,role:"option","aria-selected":k,onMouseEnter:()=>a(g),onClick:()=>p(g),children:[o("span",{class:"palette-item-name",children:h.matchRanges.length>0?pi(h.relPath,h.matchRanges):o(ee,{children:[T&&o("span",{class:"palette-dir",children:T},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:150,columnNumber:33},this),o("span",{children:L},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:150,columnNumber:72},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:150,columnNumber:23},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:147,columnNumber:17},this),_&&o("span",{class:"palette-tag",children:"current"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:152,columnNumber:31},this)]},h.relPath,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:139,columnNumber:15},this)})]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:128,columnNumber:9},this),o("div",{class:"palette-foot",children:[o("span",{children:[o("kbd",{children:"↑"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:158,columnNumber:17},this),o("kbd",{children:"↓"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:158,columnNumber:29},this)," navigate"]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:158,columnNumber:11},this),o("span",{children:[o("kbd",{children:"Enter"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:159,columnNumber:17},this)," open"]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:159,columnNumber:11},this),o("span",{children:[o("kbd",{children:"Esc"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:160,columnNumber:17},this)," close"]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:160,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:157,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:111,columnNumber:7},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/CommandPalette.tsx",lineNumber:104,columnNumber:5},this)}function fi(e,t=Date.now()){const n=Math.max(0,t-e),r=Math.round(n/1e3);if(r<30)return"just now";if(r<90)return"1 minute ago";const i=Math.round(r/60);if(i<60)return`${i} minutes ago`;const s=Math.round(i/60);if(s<24)return s===1?"1 hour ago":`${s} hours ago`;const l=Math.round(s/24);return l<30?l===1?"yesterday":`${l} days ago`:new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function vi(e){return new Date(e).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}const B=I(null);I([]);const be=I(null);let dr=0;function gi(e,t=600){B.value=e,be.value=e,dr=performance.now()+t}function bi(e,t,n,r){if(e.length===0)return null;if(t<=0)return e[0].id;if(t+n>=r-1)return e[e.length-1].id;const i=16,s=6;let l=e[0].id;for(const a of e)if(a.top-i<=t+s)l=a.id;else break;return l}const Ni=.35;function ki(e,t,n,r){if(e.length===0)return null;if(t<=0)return e[0].id;if(t+n>=r-1)return e[e.length-1].id;const i=t+n*Ni;let s=e[0].id;for(const l of e)if(l.top<=i)s=l.id;else break;return s}function yi(e){y(()=>{if(!e)return;let t=0,n=[],r=[];function i(){const c=e.getBoundingClientRect(),m=e.scrollTop;n=Array.from(e.querySelectorAll(".markdown-content :is(h1,h2,h3,h4,h5,h6)[id]")),r=n.map(u=>{const p=u.getBoundingClientRect();return{id:u.id,top:p.top-c.top+m}})}function s(){if(performance.now()<dr)return;const c=e,m=c.scrollTop,u=c.clientHeight,p=c.scrollHeight,f=bi(r,m,u,p);f!==B.value&&(B.value=f);const h=ki(r,m,u,p);h!==be.value&&(be.value=h)}function l(){cancelAnimationFrame(t),t=requestAnimationFrame(s)}i(),s();const a=new ResizeObserver(()=>{i(),s()});a.observe(e);const d=new MutationObserver(()=>{i(),s()});return d.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["hidden"]}),e.addEventListener("scroll",l,{passive:!0}),()=>{cancelAnimationFrame(t),a.disconnect(),d.disconnect(),e.removeEventListener("scroll",l)}},[e])}let hn=!1;function _i(e){try{return localStorage.getItem(e)}catch(t){return hn||(hn=!0,console.warn("[mdview] localStorage read blocked; falling back to defaults. Theme/UI prefs will not persist across reloads.",t)),null}}function wi(e,t){try{localStorage.setItem(e,t)}catch{}}function zt(e,t,n){const r=_i(e),i=r!==null?n.parse(r):null,s=I(i??t);return{signal:s,set(l){s.value=l,wi(e,n.serialize(l))}}}function X(e,t){return zt(e,t,{parse:n=>n==="1"?!0:n==="0"?!1:null,serialize:n=>n?"1":"0"})}function Ye(e,t,n){const r=i=>Math.min(n.max,Math.max(n.min,i));return zt(e,t,{parse:i=>{const s=Number(i);return Number.isFinite(s)?r(s):null},serialize:i=>String(r(i))})}function mr(e,t,n){return zt(e,t,{parse:r=>n.includes(r)?r:null,serialize:r=>r})}const bt=X("mdview-tree-collapsed",!1),Nt=X("mdview-outline-collapsed",!1),kt=X("mdview-focus-mode",!1),yt=X("mdview-minimap",!1),_t=X("mdview-wide-layout",!1),wt=kt.signal,xt=yt.signal,pr=_t.signal;function hr(){kt.set(!kt.signal.value)}function fr(){yt.set(!yt.signal.value)}function vr(){_t.set(!_t.signal.value)}const gr=264,br=280,Be=180,Ke=480,fn=140,qt=Ye("mdview-tree-width",gr,{min:Be,max:Ke}),jt=Ye("mdview-outline-width",br,{min:Be,max:Ke}),xi=bt.signal,Di=Nt.signal,vn=qt.signal,gn=jt.signal;function Ce(){bt.set(!bt.signal.value)}function Ee(){Nt.set(!Nt.signal.value)}function Ui(e){qt.set(e)}function Si(e){jt.set(e)}function Ci(){qt.set(gr)}function Ei(){jt.set(br)}const Ii=225;function Nr(e){let t=0;for(const n of e)t+=1+Nr(n.children);return t}function Pi(e,t){const n=document.createElement("div");n.innerHTML=e;const r=(n.textContent??"").trim(),i=r.length===0?0:r.split(/\s+/).filter(Boolean).length,s=Math.max(1,Math.round(i/Ii)),l=Nr(t);return{words:i,readingMinutes:s,headings:l}}function Ti(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 Dt="is-dimmed",Ut="is-focused",bn=new Set(["H1","H2","H3","H4","H5","H6"]);function Nn(e){return Number(e.tagName[1])}function kr(e){e.querySelectorAll(`.${Dt}, .${Ut}`).forEach(t=>{t.classList.remove(Dt,Ut)})}function Ai(e,t){if(kr(e),!t)return;const n=e.querySelector(`#${CSS.escape(t)}`);if(!n||!bn.has(n.tagName))return;const r=Nn(n),i=n.closest(".markdown-content")??e,s=Array.from(i.children),l=s.indexOf(n);if(l<0)return;let a=s.length;for(let d=l+1;d<s.length;d++){const c=s[d];if(bn.has(c.tagName)&&Nn(c)<=r){a=d;break}}for(let d=0;d<s.length;d++){const c=s[d];d>=l&&d<a?c.classList.add(Ut):c.classList.add(Dt)}}function Li(e){kr(e)}async function $i(e,t,n){for(const r of n)try{await r.run(e,t)}catch(i){console.error(`[mdview] wire "${r.name}" failed:`,i)}}function Mi(){return new URLSearchParams(window.location.search).get("root")}function yr(){return new URLSearchParams(window.location.search).get("file")}function _r(e,t=""){const r=new URLSearchParams(window.location.search).get("embed"),i=new URLSearchParams({file:e});r!==null&&i.set("embed",r);const s=`?${i.toString()}${t}`;history.pushState({file:e},"",s)}const Qe=I(yr());function Ie(e){Qe.value=e}function Fi(){y(()=>{const t=()=>Ie(yr());return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)},[]);const e=Xn((t,n="")=>{Ie(t),_r(t,n)},[]);return{currentPath:Qe.value,setCurrentPath:Ie,navigate:e}}const St=new Set(["H1","H2","H3","H4","H5","H6"]),Jt="section-toggle",Hi="section-heading-collapsed",ot="data-section-collapsed-by",$=new Set;let kn,M=null,yn=!1;function _n(e){return Number(e.tagName[1])}function Gt(e){return!!e&&St.has(e.tagName)}function wr(e,t){const n=e[t];if(!n||!St.has(n.tagName))return null;const r=_n(n);for(let i=t+1;i<e.length;i++){const s=e[i];if(St.has(s.tagName)&&_n(s)<=r)return i}return e.length}function Xt(e){return Array.from(e.children)}function xr(e){return Xt(e).filter(t=>Gt(t)&&!!t.id)}function ke(e,t,n){const r=Xt(e),i=r.indexOf(t);if(i<0)return;const s=wr(r,i);if(s===null)return;const l=t.querySelector(`button.${Jt}`);l&&(l.setAttribute("aria-expanded",n?"false":"true"),l.setAttribute("aria-label",n?"Expand section":"Collapse section"),l.title=n?"Expand section":"Collapse section"),t.classList.toggle(Hi,n);for(let a=i+1;a<s;a++){const d=r[a];n?d.hasAttribute("hidden")||(d.setAttribute("hidden",""),d.setAttribute(ot,t.id)):d.getAttribute(ot)===t.id&&(d.removeAttribute("hidden"),d.removeAttribute(ot))}}function Oi(e,t){const n=t.id,r=!$.has(n);r?$.add(n):$.delete(n),ke(e,t,r)}function Yt(e,t){for(const n of xr(e))t?$.add(n.id):$.delete(n.id),ke(e,n,t)}function Ri(){M&&Yt(M,!1)}function Bi(){M&&Yt(M,!0)}function Ct(e){if(!M||$.size===0||!e||!M.contains(e))return;const t=Xt(M);for(let n=0;n<t.length;n++){const r=t[n];if(!Gt(r)||!r.id||!$.has(r.id))continue;const i=wr(t,n);if(i!==null)for(let s=n+1;s<i;s++){const l=t[s];if(l===e||l.contains(e)){$.delete(r.id),ke(M,r,!1);break}}}}function lt(e){e&&Ct(document.getElementById(e))}function Ki(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",r=>{r.preventDefault(),r.stopPropagation(),Oi(e,t)}),n}let he=null;function Vi(){M&&he===null&&(he=[...$],Yt(M,!1))}function Wi(){if(!(!M||!he)){for(const e of he){$.add(e);const t=document.getElementById(e);t&&Gt(t)&&M.contains(t)&&ke(M,t,!0)}he=null}}function zi(){yn||(window.addEventListener("beforeprint",Vi),window.addEventListener("afterprint",Wi),yn=!0)}const qi={name:"collapsible-sections",run:e=>{M=e;const t=Qe.value;t!==kn&&($.clear(),kn=t);const n=xr(e);for(const i of n)i.querySelector(`button.${Jt}`)||i.insertBefore(Ki(e,i),i.firstChild);const r=new Set(n.map(i=>i.id));for(const i of[...$])r.has(i)||$.delete(i);for(const i of n)ke(e,i,$.has(i.id));zi()}};function ji(e){e.querySelectorAll("pre").forEach(n=>{var s;if(n.closest(".mermaid-block")||(s=n.parentElement)!=null&&s.classList.contains("pre-wrap"))return;const r=document.createElement("div");r.className="pre-wrap",n.replaceWith(r),r.appendChild(n);const i=document.createElement("button");i.type="button",i.className="copy-btn",i.textContent="Copy",i.setAttribute("aria-label","Copy code to clipboard"),i.addEventListener("click",async l=>{l.stopPropagation();const a=n.querySelector("code"),d=((a==null?void 0:a.textContent)??n.textContent??"").replace(/\s+$/,"");try{await navigator.clipboard.writeText(d),i.textContent="Copied",i.classList.add("is-copied")}catch{i.textContent="Failed"}window.setTimeout(()=>{i.textContent="Copy",i.classList.remove("is-copied")},1600)}),r.appendChild(i)})}function Ji(e){e.querySelectorAll("a[href]").forEach(n=>{if(n.dataset.externalProcessed==="1"||n.hasAttribute("data-internal-link"))return;const r=n.getAttribute("href")??"";if(/^https?:\/\//i.test(r)&&!n.classList.contains("heading-anchor")){if(n.target="_blank",n.rel="noopener noreferrer",n.classList.add("is-external"),!n.querySelector(".external-icon")){const i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("class","external-icon"),i.setAttribute("viewBox","0 0 12 12"),i.setAttribute("width","11"),i.setAttribute("height","11"),i.setAttribute("aria-hidden","true"),i.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(i)}n.dataset.externalProcessed="1"}})}const Ze=I(null);function wn(e,t){Ze.value={src:e,alt:t}}function Pe(){Ze.value=null}function Gi(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",()=>{wn(n.src,n.alt)}),n.addEventListener("keydown",r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),wn(n.src,n.alt))})))})}const Xi="modulepreload",Yi=function(e){return"/"+e},xn={},Qt=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(c){return Promise.all(c.map(m=>Promise.resolve(m).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),d=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=l(n.map(c=>{if(c=Yi(c),c in xn)return;xn[c]=!0;const m=c.endsWith(".css"),u=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const p=document.createElement("link");if(p.rel=m?"stylesheet":Xi,m||(p.as="script"),p.crossOrigin="",p.href=c,d&&p.setAttribute("nonce",d),document.head.appendChild(p),m)return new Promise((f,h)=>{p.addEventListener("load",f),p.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(l){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=l,window.dispatchEvent(a),!a.defaultPrevented)throw l}return i.then(l=>{for(const a of l||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};let at=null,Dn=!1;function Qi(){return at||(at=Qt(()=>import("./katex-C5jXJg4s.js"),[])),at}async function Zi(){if(Dn)return;Dn=!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 es(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[r]=await Promise.all([Qi(),Zi()]),i=r.default;for(const s of t){const l=decodeURIComponent(s.dataset.source??"");try{i.render(l,s,{displayMode:!1,throwOnError:!1})}catch(a){s.textContent=`[math error: ${a.message}]`}s.dataset.rendered="true"}for(const s of n){const l=decodeURIComponent(s.dataset.source??"");try{i.render(l,s,{displayMode:!0,throwOnError:!1})}catch(a){s.textContent=`[math error: ${a.message}]`}s.dataset.rendered="true"}}const ts=/\.(md|markdown|mdx)$/i;function Un(e){return e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0}function ns(e){return!!(e.target&&e.target!==""&&e.target!=="_self"||e.hasAttribute("download"))}function rs(e,t){e.addEventListener("click",n=>{const r=n.target.closest("a");if(!r)return;const i=r.matches("[data-internal-link]")?r.getAttribute("data-internal-link"):null;if(i!==null){if(Un(n))return;n.preventDefault();const c=i??"",m=c.indexOf("#"),u=m>=0?c.slice(0,m):c,p=m>=0?c.slice(m):"";t(u,p);return}if(Un(n)||ns(r))return;const s=r.href;if(!s)return;let l;try{l=new URL(s)}catch{return}if(l.origin!==window.location.origin||!ts.test(l.pathname))return;n.preventDefault();let a;try{a=decodeURIComponent(l.pathname)}catch{a=l.pathname}const d=a.replace(/^\/+/,"");t(d,l.hash)})}const is=["light","dark"],Et=window.matchMedia("(prefers-color-scheme: dark)");function ss(){try{const e=localStorage.getItem("mdview-theme");if(e==="light"||e==="dark")return e}catch{}return null}const Dr=ss(),Ur=mr("mdview-theme",Dr??(Et.matches?"dark":"light"),is),Z=Ur.signal,Sr=I(Dr!==null);function os(e){Ur.set(e),Sr.value=!0}function Cr(){os(Z.value==="dark"?"light":"dark")}function ls(){return y(()=>{const e=t=>{Sr.value||(Z.value=t.matches?"dark":"light")};return Et.addEventListener("change",e),()=>Et.removeEventListener("change",e)},[]),y(()=>{document.documentElement.dataset.theme=Z.value}),Z.value}let ct=null,as=0,It=null;function cs(){return ct||(ct=Qt(()=>import("./mermaid.core-Dq2piIpp.js").then(e=>e.cc),[])),ct}function us(){return Z.value==="dark"?"dark":"default"}async function Er(e){const t=e.querySelectorAll(".mermaid-block");if(t.length===0)return;const r=(await cs()).default,i=us();if(It!==i){r.initialize({startOnLoad:!1,theme:i,securityLevel:"strict"}),It=i;for(const s of Array.from(t))delete s.dataset.rendered}await Promise.all(Array.from(t).map(s=>ds(r,s)))}async function ds(e,t){if(t.dataset.rendered)return;const n=decodeURIComponent(t.dataset.source??""),r=`mermaid-${++as}`;try{if(!await e.parse(n,{suppressErrors:!0})){Sn(t,"syntax error");return}const{svg:s}=await e.render(r,n);t.innerHTML=s,t.dataset.rendered="true"}catch(i){Sn(t,i.message)}finally{ms(r)}}function Sn(e,t){const n=document.createElement("pre");n.className="mermaid-error",n.textContent=`Mermaid: ${t}`,e.replaceChildren(n),e.dataset.rendered="true"}function ms(e){for(const t of[e,`d${e}`]){const n=document.getElementById(t);n&&n.parentElement===document.body&&n.remove()}}Ge(()=>{if(Z.value,It===null)return;const e=document.querySelector(".markdown-content");e&&Er(e)});function ps(e){e.querySelectorAll(".markdown-content :is(h1,h2,h3,h4,h5,h6)[id]").forEach(n=>{if(n.querySelector(".heading-anchor"))return;const r=document.createElement("a");r.className="heading-anchor",r.href=`#${n.id}`,r.setAttribute("aria-label",`Copy link to ${n.textContent??""}`),r.title="Copy link to this section",r.textContent="#",r.addEventListener("click",async i=>{i.preventDefault();const l=new URLSearchParams(window.location.search).get("file"),a=`${window.location.origin}${window.location.pathname}${l?`?file=${encodeURIComponent(l)}`:""}#${n.id}`;try{await navigator.clipboard.writeText(a),r.textContent="✓",r.classList.add("is-copied")}catch{r.textContent="!"}window.setTimeout(()=>{r.textContent="#",r.classList.remove("is-copied")},1500)}),n.appendChild(r)})}const hs=[qi,{name:"mermaid",run:e=>Er(e)},{name:"math",run:e=>es(e)},{name:"internal-links",run:(e,t)=>rs(e,t.onInternalNavigate)},{name:"copy-buttons",run:e=>ji(e)},{name:"permalinks",run:e=>ps(e)},{name:"external-links",run:e=>Ji(e)},{name:"image-lightbox",run:e=>Gi(e)}];function fs({file:e,onInternalNavigate:t}){const n=R(null),r=H(()=>Pi(e.html,e.outline),[e]);return y(()=>{n.current&&(n.current.innerHTML=e.html,$i(n.current,{onInternalNavigate:t},hs))},[e]),y(()=>{n.current&&(wt.value?Ai(n.current,be.value):Li(n.current))},[wt.value,be.value,e]),o("article",{class:"markdown-body",children:[e.frontmatter&&Object.keys(e.frontmatter).length>0&&o("details",{class:"frontmatter-block",children:[o("summary",{children:"frontmatter"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Content.tsx",lineNumber:45,columnNumber:11},this),o("pre",{children:o("code",{children:JSON.stringify(e.frontmatter,null,2)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Content.tsx",lineNumber:46,columnNumber:16},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Content.tsx",lineNumber:46,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Content.tsx",lineNumber:44,columnNumber:9},this),r.words>0&&o("div",{class:"doc-stats","aria-label":"Document statistics",children:[o("span",{children:Ti(r)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Content.tsx",lineNumber:51,columnNumber:11},this),e.lastModified>0&&o(ee,{children:[o("span",{class:"doc-stats-sep","aria-hidden":!0,children:"·"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Content.tsx",lineNumber:54,columnNumber:15},this),o("span",{class:"doc-stats-updated",title:vi(e.lastModified),children:["Updated ",fi(e.lastModified)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Content.tsx",lineNumber:55,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Content.tsx",lineNumber:53,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Content.tsx",lineNumber:50,columnNumber:9},this),o("div",{ref:n,class:"markdown-content"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Content.tsx",lineNumber:65,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Content.tsx",lineNumber:42,columnNumber:5},this)}function vs(){return o("div",{class:"skeleton","aria-hidden":"true",children:[o("div",{class:"skeleton__h1"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ContentSkeleton.tsx",lineNumber:4,columnNumber:7},this),o("div",{class:"skeleton__meta"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ContentSkeleton.tsx",lineNumber:5,columnNumber:7},this),o("div",{class:"skeleton__line",style:{width:"94%"}},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ContentSkeleton.tsx",lineNumber:6,columnNumber:7},this),o("div",{class:"skeleton__line",style:{width:"88%"}},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ContentSkeleton.tsx",lineNumber:7,columnNumber:7},this),o("div",{class:"skeleton__line",style:{width:"76%"}},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ContentSkeleton.tsx",lineNumber:8,columnNumber:7},this),o("div",{class:"skeleton__h2"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ContentSkeleton.tsx",lineNumber:9,columnNumber:7},this),o("div",{class:"skeleton__line",style:{width:"92%"}},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ContentSkeleton.tsx",lineNumber:10,columnNumber:7},this),o("div",{class:"skeleton__line",style:{width:"84%"}},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ContentSkeleton.tsx",lineNumber:11,columnNumber:7},this),o("div",{class:"skeleton__code"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ContentSkeleton.tsx",lineNumber:12,columnNumber:7},this),o("div",{class:"skeleton__line",style:{width:"90%"}},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ContentSkeleton.tsx",lineNumber:13,columnNumber:7},this),o("div",{class:"skeleton__line",style:{width:"70%"}},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ContentSkeleton.tsx",lineNumber:14,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ContentSkeleton.tsx",lineNumber:3,columnNumber:5},this)}const gs=["node_modules","dist","build","out","target","coverage","vendor","__pycache__","venv","Pods","DerivedData","_build"],P=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 Ir({size:e=14,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:o("polyline",{points:"9 6 15 12 9 18"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:23,columnNumber:7},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:22,columnNumber:5},this)}function bs({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:o("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"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:31,columnNumber:7},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:30,columnNumber:5},this)}function Ns({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("path",{d:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v1H3V7z"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:39,columnNumber:7},this),o("path",{d:"M3 9h18l-2 8a2 2 0 0 1-2 1.5H6A2 2 0 0 1 4 17L3 9z"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:40,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:38,columnNumber:5},this)}function ks({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("path",{d:"M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6z"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:48,columnNumber:7},this),o("polyline",{points:"14 3 14 9 20 9"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:49,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:47,columnNumber:5},this)}function ys({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("path",{d:"M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6z"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:58,columnNumber:7},this),o("polyline",{points:"14 3 14 9 20 9"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:59,columnNumber:7},this),o("path",{d:"M8 14l2 2 2-3 2 3 2-2"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:60,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:57,columnNumber:5},this)}function _s({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("circle",{cx:"12",cy:"12",r:"4"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:68,columnNumber:7},this),o("line",{x1:"12",y1:"2",x2:"12",y2:"5"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:69,columnNumber:7},this),o("line",{x1:"12",y1:"19",x2:"12",y2:"22"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:70,columnNumber:7},this),o("line",{x1:"2",y1:"12",x2:"5",y2:"12"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:71,columnNumber:7},this),o("line",{x1:"19",y1:"12",x2:"22",y2:"12"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:72,columnNumber:7},this),o("line",{x1:"4.5",y1:"4.5",x2:"6.6",y2:"6.6"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:73,columnNumber:7},this),o("line",{x1:"17.4",y1:"17.4",x2:"19.5",y2:"19.5"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:74,columnNumber:7},this),o("line",{x1:"4.5",y1:"19.5",x2:"6.6",y2:"17.4"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:75,columnNumber:7},this),o("line",{x1:"17.4",y1:"6.6",x2:"19.5",y2:"4.5"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:76,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:67,columnNumber:5},this)}function ws({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:o("path",{d:"M21 13.5A8.5 8.5 0 0 1 10.5 3a7 7 0 1 0 10.5 10.5z"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:84,columnNumber:7},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:83,columnNumber:5},this)}function xs({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:92,columnNumber:7},this),o("line",{x1:"9",y1:"4",x2:"9",y2:"20"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:93,columnNumber:7},this),o("polyline",{points:"15 9 12 12 15 15"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:94,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:91,columnNumber:5},this)}function Ds({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:102,columnNumber:7},this),o("line",{x1:"9",y1:"4",x2:"9",y2:"20"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:103,columnNumber:7},this),o("polyline",{points:"13 9 16 12 13 15"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:104,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:101,columnNumber:5},this)}function Us({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:112,columnNumber:7},this),o("line",{x1:"15",y1:"4",x2:"15",y2:"20"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:113,columnNumber:7},this),o("polyline",{points:"9 9 12 12 9 15"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:114,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:111,columnNumber:5},this)}function Ss({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:122,columnNumber:7},this),o("line",{x1:"15",y1:"4",x2:"15",y2:"20"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:123,columnNumber:7},this),o("polyline",{points:"11 9 8 12 11 15"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:124,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:121,columnNumber:5},this)}function Cs({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("rect",{x:"2",y:"6",width:"20",height:"13",rx:"2"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:132,columnNumber:7},this),o("line",{x1:"6",y1:"10",x2:"6.01",y2:"10"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:133,columnNumber:7},this),o("line",{x1:"10",y1:"10",x2:"10.01",y2:"10"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:134,columnNumber:7},this),o("line",{x1:"14",y1:"10",x2:"14.01",y2:"10"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:135,columnNumber:7},this),o("line",{x1:"18",y1:"10",x2:"18.01",y2:"10"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:136,columnNumber:7},this),o("line",{x1:"6",y1:"14",x2:"6.01",y2:"14"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:137,columnNumber:7},this),o("line",{x1:"18",y1:"14",x2:"18.01",y2:"14"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:138,columnNumber:7},this),o("line",{x1:"9",y1:"14",x2:"15",y2:"14"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:139,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:131,columnNumber:5},this)}function Es({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("circle",{cx:"12",cy:"12",r:"3"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:159,columnNumber:7},this),o("circle",{cx:"12",cy:"12",r:"9"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:160,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:158,columnNumber:5},this)}function Is({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("rect",{x:"4",y:"3",width:"16",height:"18",rx:"2"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:168,columnNumber:7},this),o("line",{x1:"8",y1:"7",x2:"14",y2:"7"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:169,columnNumber:7},this),o("line",{x1:"8",y1:"11",x2:"16",y2:"11"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:170,columnNumber:7},this),o("line",{x1:"8",y1:"15",x2:"12",y2:"15"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:171,columnNumber:7},this),o("line",{x1:"8",y1:"19",x2:"14",y2:"19"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:172,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:167,columnNumber:5},this)}function Ps({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("circle",{cx:"12",cy:"12",r:"3"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:180,columnNumber:7},this),o("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"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:181,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:179,columnNumber:5},this)}function Pr({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:o("polyline",{points:"20 6 9 17 4 12"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:189,columnNumber:7},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:188,columnNumber:5},this)}function Ts({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("polyline",{points:"4 9 4 4 9 4"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:197,columnNumber:7},this),o("polyline",{points:"20 9 20 4 15 4"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:198,columnNumber:7},this),o("polyline",{points:"4 15 4 20 9 20"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:199,columnNumber:7},this),o("polyline",{points:"20 15 20 20 15 20"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:200,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:196,columnNumber:5},this)}function As({size:e=16,class:t}){return o("svg",{...P(e),class:t,"aria-hidden":!0,children:[o("circle",{cx:"12",cy:"12",r:"9"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:208,columnNumber:7},this),o("line",{x1:"12",y1:"11",x2:"12",y2:"16"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:209,columnNumber:7},this),o("line",{x1:"12",y1:"8",x2:"12",y2:"8"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:210,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Icons.tsx",lineNumber:207,columnNumber:5},this)}const Ls=["Hidden from the tree to keep the watcher under the OS file-watch limit:","• dotfiles / dotdirs (.git, .next, .venv, …)",`• built-in heavy dirs: ${gs.join(", ")}`,"","Add your own in ~/.config/mdview/config.json:",'{ "ignore": ["my-build-dir"] }',"","Restart mdview after editing."].join(`
|
|
2
|
+
`);function $s({tree:e,currentPath:t,onSelect:n,onCollapse:r}){return o("div",{class:"pane-content tree-pane",children:[o("div",{class:"pane-head",children:[o("span",{class:"pane-head-title",children:["Files",o("span",{class:"pane-head-info",role:"button",tabIndex:0,"aria-label":"Why some folders aren't shown","data-tooltip":Ls,"data-tooltip-multiline":!0,"data-tooltip-align":"left",children:o(As,{size:11},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:47,columnNumber:13},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:38,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:36,columnNumber:9},this),o("button",{class:"pane-head-btn","aria-label":"Hide file tree","data-tooltip":"Hide file tree (⌘B)","data-tooltip-align":"right",onClick:r,children:o(xs,{size:14},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:57,columnNumber:11},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:50,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:35,columnNumber:7},this),e.length===0?o("p",{class:"tree-empty",children:["No folders open. Run ",o("code",{children:"mdview <path>"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:62,columnNumber:32},this)," to add one."]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:61,columnNumber:9},this):o("div",{class:"tree-scroll",children:o("ul",{class:"tree",role:"tree",children:e.map(i=>o(Tr,{node:i,currentPath:t,onSelect:n,depth:0},i.relPath,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:68,columnNumber:15},this))},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:66,columnNumber:11},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:65,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:34,columnNumber:5},this)}function Tr({node:e,currentPath:t,onSelect:n,depth:r}){const i=(t==null?void 0:t.startsWith(e.relPath+"/"))??!1,s=r===0&&!e.relPath.includes("/"),[l,a]=W(i||s);if(y(()=>{i&&a(!0)},[t]),e.type==="dir")return o("li",{class:"tree-li tree-li-dir",role:"treeitem","aria-expanded":l,children:[o("button",{class:`tree-item tree-dir ${l?"is-open":""} ${s?"tree-root":""}`,onClick:()=>a(p=>!p),children:[o("span",{class:`chev ${l?"open":""}`,"aria-hidden":!0,children:o(Ir,{size:12},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:108,columnNumber:13},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:107,columnNumber:11},this),o("span",{class:"tree-icon","aria-hidden":!0,children:l?o(Ns,{size:15},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:111,columnNumber:21},this):o(bs,{size:15},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:111,columnNumber:52},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:110,columnNumber:11},this),o("span",{class:"name",children:e.name},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:113,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:103,columnNumber:9},this),l&&e.children&&e.children.length>0&&o("ul",{class:"tree-children",children:e.children.map(p=>o(Tr,{node:p,currentPath:t,onSelect:n,depth:r+1},p.relPath,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:118,columnNumber:15},this))},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:116,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:102,columnNumber:7},this);const d=e.isMarkdown??!1,c=t===e.relPath,m=`tree-item tree-file ${d?"":"is-disabled"} ${c?"is-current":""}`,u=d?`/?file=${encodeURIComponent(e.relPath)}`:void 0;return o("li",{class:"tree-li tree-li-file",role:"treeitem",children:d?o("a",{class:m,href:u,title:e.name,onClick:p=>{p.metaKey||p.ctrlKey||p.shiftKey||p.altKey||(p.preventDefault(),n(e.relPath))},children:[o("span",{class:"tree-icon","aria-hidden":!0,children:o(ys,{size:14},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:157,columnNumber:13},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:156,columnNumber:11},this),o("span",{class:"name",children:e.name},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:159,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:143,columnNumber:9},this):o("span",{class:m,title:e.name,children:[o("span",{class:"tree-icon","aria-hidden":!0,children:o(ks,{size:14},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:164,columnNumber:13},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:163,columnNumber:11},this),o("span",{class:"name",children:e.name},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:166,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:162,columnNumber:9},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/FolderTree.tsx",lineNumber:141,columnNumber:5},this)}const et=I(!1);function Ar(){et.value=!0}function Te(){et.value=!1}function Lr(e,t,n=[]){for(const r of e){const i=[...n,r];if(r.id===t)return i;const s=Lr(r.children,t,i);if(s)return s}return null}function Cn(e){return e.trim().toLowerCase()}function Ms({outline:e,fileName:t,onJump:n}){var s;const r=B.value;let i=r?Lr(e,r)??[]:[];return t&&i.length>0&&((s=i[0])==null?void 0:s.level)===1&&Cn(i[0].text)===Cn(t)&&(i=i.slice(1)),o("nav",{class:"breadcrumbs","aria-label":"Current section",children:[t&&o("button",{type:"button",class:"bc-item bc-root",onClick:()=>n(null),title:"Scroll to top",children:t},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Breadcrumbs.tsx",lineNumber:44,columnNumber:9},this),i.map((l,a)=>{const d=a===i.length-1;return o("span",{class:"bc-step",children:[o("span",{class:"bc-sep","aria-hidden":!0,children:"›"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Breadcrumbs.tsx",lineNumber:57,columnNumber:13},this),o("button",{type:"button",class:`bc-item${d?" is-current":""}`,onClick:()=>n(l.id),"aria-current":d?"location":void 0,children:l.text},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Breadcrumbs.tsx",lineNumber:58,columnNumber:13},this)]},l.id,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Breadcrumbs.tsx",lineNumber:56,columnNumber:11},this)})]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Breadcrumbs.tsx",lineNumber:42,columnNumber:5},this)}const $r="mdview-palette";function Fs(){try{const e=localStorage.getItem($r);if(e&&Je.includes(e))return e}catch{}return null}const Mr=Fs(),Fr=mr($r,Mr??"flexoki",Je),se=Fr.signal,Hr=I(Mr!==null);function Or(e){Fr.set(e),Hr.value=!0}function Hs(){return y(()=>{var e;!Hr.value&&((e=gt.value)!=null&&e.palette)&&(se.value=gt.value.palette)}),y(()=>{document.documentElement.dataset.palette=se.value}),se.value}const Os={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:r,onToggle:i}){return o("button",{class:`view-menu-row${r?" is-on":""}`,role:"menuitemcheckbox","aria-checked":r,onClick:i,children:[o("span",{class:"view-menu-icon","aria-hidden":!0,children:e},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:48,columnNumber:7},this),o("span",{class:"view-menu-label",children:t},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:49,columnNumber:7},this),n&&o("span",{class:"view-menu-kbd","aria-hidden":!0,children:n},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:50,columnNumber:20},this),o("span",{class:"view-menu-check","aria-hidden":!0,children:r?o(Pr,{size:14},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:52,columnNumber:15},this):null},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:51,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:42,columnNumber:5},this)}function Rs(){const[e,t]=W(!1),n=R(null);y(()=>{if(!e)return;function a(c){var m;(m=n.current)!=null&&m.contains(c.target)||t(!1)}function d(c){c.key==="Escape"&&t(!1)}return document.addEventListener("mousedown",a),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",d)}},[e]);const r=wt.value,i=xt.value,s=pr.value,l=se.value;return o("div",{class:"view-menu",ref:n,children:[o("button",{class:`icon-btn${e?" is-active":""}`,"aria-label":"View settings","data-tooltip":"View settings","aria-haspopup":"menu","aria-expanded":e,onClick:()=>t(a=>!a),children:o(Ps,{},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:93,columnNumber:9},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:85,columnNumber:7},this),e&&o("div",{class:"view-menu-popover",role:"menu","aria-label":"View settings",children:[o("div",{class:"view-menu-section",children:[o(ut,{icon:o(Es,{size:14},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:99,columnNumber:21},this),label:"Focus mode",shortcut:"f",on:r,onToggle:hr},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:98,columnNumber:13},this),o(ut,{icon:o(Is,{size:14},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:106,columnNumber:21},this),label:"Minimap",shortcut:"m",on:i,onToggle:fr},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:105,columnNumber:13},this),o(ut,{icon:o(Ts,{size:14},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:113,columnNumber:21},this),label:"Wide layout",on:s,onToggle:vr},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:112,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:97,columnNumber:11},this),o("div",{class:"view-menu-divider"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:119,columnNumber:11},this),o("div",{class:"view-menu-section",children:[o("div",{class:"view-menu-heading",children:"Palette"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:121,columnNumber:13},this),Je.map(a=>o("button",{role:"menuitemradio","aria-checked":l===a,class:`view-menu-row view-menu-palette${l===a?" is-on":""}`,onClick:()=>Or(a),children:[o("span",{class:`palette-swatch palette-swatch-${a}`,"aria-hidden":!0},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:130,columnNumber:17},this),o("span",{class:"view-menu-label",children:Os[a]},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:131,columnNumber:17},this),o("span",{class:"view-menu-check","aria-hidden":!0,children:l===a?o(Pr,{size:14},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:133,columnNumber:43},this):null},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:132,columnNumber:17},this)]},a,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:123,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:120,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:96,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ViewMenu.tsx",lineNumber:84,columnNumber:5},this)}function Bs({outline:e,fileName:t,onJumpHeading:n}){const r=Z.value,i=r==="dark"?"Switch to light (⌘\\)":"Switch to dark (⌘\\)";return o("div",{class:"header-inner",children:[o("div",{class:"header-left",children:o("span",{class:"brand",children:"mdview"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Header.tsx",lineNumber:20,columnNumber:9},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Header.tsx",lineNumber:19,columnNumber:7},this),o("div",{class:"header-center",children:o(Ms,{outline:e,fileName:t,onJump:n},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Header.tsx",lineNumber:24,columnNumber:9},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Header.tsx",lineNumber:23,columnNumber:7},this),o("div",{class:"header-right",children:[o(Rs,{},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Header.tsx",lineNumber:28,columnNumber:9},this),o("button",{class:"icon-btn theme-btn","aria-label":i,"data-tooltip":i,onClick:Cr,children:r==="dark"?o(_s,{},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Header.tsx",lineNumber:35,columnNumber:31},this):o(ws,{},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Header.tsx",lineNumber:35,columnNumber:45},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Header.tsx",lineNumber:29,columnNumber:9},this),o("button",{class:"icon-btn","aria-label":"Keyboard shortcuts","data-tooltip":"Shortcuts (?)","data-tooltip-align":"right",onClick:Ar,children:o(Cs,{},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Header.tsx",lineNumber:44,columnNumber:11},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Header.tsx",lineNumber:37,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Header.tsx",lineNumber:27,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Header.tsx",lineNumber:18,columnNumber:5},this)}function Ks(){const e=Ze.value;return y(()=>{if(!e)return;function t(r){r.key==="Escape"&&Pe()}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?o("div",{class:"lightbox-overlay",role:"dialog","aria-modal":"true","aria-label":e.alt||"Image preview",onClick:Pe,children:[o("button",{type:"button",class:"lightbox-close","aria-label":"Close image preview",onClick:t=>{t.stopPropagation(),Pe()},children:"×"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Lightbox.tsx",lineNumber:31,columnNumber:7},this),o("img",{class:"lightbox-img",src:e.src,alt:e.alt,onClick:t=>t.stopPropagation()},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Lightbox.tsx",lineNumber:42,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Lightbox.tsx",lineNumber:24,columnNumber:5},this):null}const Ne=I(null);function Vs(e){Ne.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 En(e,t,n){var l,a;const r=tt(e);if(r.length===0)return null;if(!t)return n===1?((l=r[0])==null?void 0:l.id)??null:((a=r[r.length-1])==null?void 0:a.id)??null;const i=r.findIndex(d=>d.id===t);if(i<0)return null;const s=r[i].level;if(n===1){for(let d=i+1;d<r.length;d++)if(r[d].level===s)return r[d].id}else for(let d=i-1;d>=0;d--)if(r[d].level===s)return r[d].id;return null}function Ws(e,t){if(!e)return[];const n=tt(t),r=e.scrollHeight;if(r===0)return[];const i=[],s=e.getBoundingClientRect();for(const{id:l,level:a}of n){const d=e.querySelector(`#${CSS.escape(l)}`);if(!d)continue;const u=(d.getBoundingClientRect().top-s.top+e.scrollTop)/r;i.push({id:l,level:a,ratio:Math.max(0,Math.min(1,u))})}return i}function zs({outline:e}){const t=Ne.value,[n,r]=W([]),[i,s]=W({top:0,height:0}),l=R(null);y(()=>{if(!t)return;const c=()=>r(Ws(t,e));c();const m=new ResizeObserver(c);return m.observe(t),()=>m.disconnect()},[t,e]),y(()=>{if(!t)return;const c=()=>{const m=t.scrollHeight||1;s({top:t.scrollTop/m,height:t.clientHeight/m})};return c(),t.addEventListener("scroll",c,{passive:!0}),()=>t.removeEventListener("scroll",c)},[t]);function a(c){const m=l.current;if(!m||!t)return;const u=m.getBoundingClientRect(),p=Math.max(0,Math.min(1,(c-u.top)/u.height));t.scrollTo({top:p*t.scrollHeight,behavior:"smooth"})}if(!t||n.length===0)return null;const d=B.value;return o("div",{ref:l,class:"minimap",role:"navigation","aria-label":"Document minimap",onClick:c=>a(c.clientY),children:[n.map(c=>o("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,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Minimap.tsx",lineNumber:89,columnNumber:9},this)),o("div",{class:"minimap-viewport",style:{top:`${(i.top*100).toFixed(2)}%`,height:`${(i.height*100).toFixed(2)}%`}},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Minimap.tsx",lineNumber:96,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Minimap.tsx",lineNumber:81,columnNumber:5},this)}const G=1,oe=6,Ve=Ye("mdview-outline-min-level",G,{min:G,max:oe}),We=Ye("mdview-outline-max-level",oe,{min:G,max:oe}),Rr=Ve.signal,Br=We.signal;function qs(e){Ve.set(e),e>We.signal.value&&We.set(e)}function js(e){We.set(e),e<Ve.signal.value&&Ve.set(e)}const Js=ir(()=>{const e=Rr.value,t=Br.value,n=new Set;for(let r=e;r<=t;r++)n.add(r);return n});function Kr(e,t){const n=[];for(const r of e){const i=Kr(r.children,t);t.has(r.level)?n.push({...r,children:i}):n.push(...i)}return n}function Gs({nodes:e,onJump:t,onCollapse:n}){const r=Js.value,i=Rr.value,s=Br.value,l=H(()=>Kr(e,r),[e,r]),a=i===s?`H${i}`:`H${i}–H${s}`,d=oe-G,c=(i-G)/d*100,m=100-(s-G)/d*100;return o("nav",{class:"outline","aria-label":"Document outline",children:[o("div",{class:"outline-head",children:[o("button",{class:"pane-head-btn","aria-label":"Hide outline","data-tooltip":"Hide outline (⌘.)","data-tooltip-align":"left",onClick:n,children:o(Us,{size:14},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:42,columnNumber:11},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:35,columnNumber:9},this),o("span",{class:"outline-title",children:"On this page"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:44,columnNumber:9},this),o("div",{class:"outline-depth","data-tooltip":`Show ${a}`,"data-tooltip-align":"right",children:[o("span",{class:"outline-depth-label","aria-hidden":!0,children:a},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:50,columnNumber:11},this),o("div",{class:"outline-depth-range",role:"group","aria-label":"Heading depth range",children:[o("div",{class:"outline-depth-track","aria-hidden":!0,children:o("div",{class:"outline-depth-track-fill",style:`left:${c}%;right:${m}%`},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:53,columnNumber:15},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:52,columnNumber:13},this),o("input",{type:"range",class:"outline-depth-slider outline-depth-slider-min",min:G,max:oe,step:1,value:i,"aria-label":`Minimum heading level (currently H${i})`,onInput:u=>{const p=Number(u.currentTarget.value);Number.isFinite(p)&&qs(p)}},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:58,columnNumber:13},this),o("input",{type:"range",class:"outline-depth-slider outline-depth-slider-max",min:G,max:oe,step:1,value:s,"aria-label":`Maximum heading level (currently H${s})`,onInput:u=>{const p=Number(u.currentTarget.value);Number.isFinite(p)&&js(p)}},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:71,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:51,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:45,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:34,columnNumber:7},this),l.length===0?o("div",{class:"outline-empty",children:e.length===0?"No headings":"All levels hidden"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:88,columnNumber:9},this):o("ul",{children:l.map(u=>o(Vr,{node:u,onJump:t,depth:0},u.id,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:94,columnNumber:13},this))},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:92,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:33,columnNumber:5},this)}function Vr({node:e,onJump:t,depth:n}){const[r,i]=W(!1),s=e.children.length>0,l=B.value===e.id,a=Math.min(n,5);return o("li",{class:`outline-li depth-${a}`,children:[o("div",{class:`outline-row ${l?"is-active":""}`,children:[s?o("button",{class:`outline-toggle ${r?"":"open"}`,"aria-label":r?"Expand section":"Collapse section",onClick:d=>{d.stopPropagation(),i(c=>!c)},children:o(Ir,{size:11},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:126,columnNumber:13},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:118,columnNumber:11},this):o("span",{class:"outline-toggle is-spacer","aria-hidden":!0},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:129,columnNumber:11},this),o("button",{class:"outline-link",onClick:()=>t(e.id),title:e.text,children:e.text},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:131,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:116,columnNumber:7},this),s&&!r&&o("ul",{class:"outline-children",children:e.children.map(d=>o(Vr,{node:d,onJump:t,depth:n+1},d.id,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:142,columnNumber:13},this))},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:140,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Outline.tsx",lineNumber:115,columnNumber:5},this)}function Xs({scroller:e,trigger:t}){const[n,r]=W(0);return y(()=>{if(!e)return;let i=0;function s(){if(!e)return;const a=e.scrollHeight-e.clientHeight;if(a<=0){r(0);return}const d=Math.max(0,Math.min(1,e.scrollTop/a));r(d)}function l(){cancelAnimationFrame(i),i=requestAnimationFrame(s)}return e.addEventListener("scroll",l,{passive:!0}),s(),()=>{cancelAnimationFrame(i),e.removeEventListener("scroll",l)}},[e,t]),o("div",{class:"reading-progress",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(n*100),"aria-label":"Reading progress",children:o("div",{class:"reading-progress__bar",style:{width:`${n*100}%`}},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ReadingProgress.tsx",lineNumber:48,columnNumber:7},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ReadingProgress.tsx",lineNumber:40,columnNumber:5},this)}function In(e){const t=R(null),n=R(e);return n.current=e,y(()=>{const r=t.current;if(!r)return;let i=null;function s(d){if(!i)return;const{side:c,onResize:m,min:u,max:p}=n.current,f=d.clientX-i.startX,h=c==="left"?i.startWidth+f:i.startWidth-f;m(Math.min(p,Math.max(u,h)))}function l(){if(!i)return;const{collapseAt:d,onCollapse:c,getCurrent:m}=n.current,u=m(),p=t.current;try{p==null||p.releasePointerCapture(i.pointerId)}catch{}i=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",l),u<d&&c()}function a(d){i={startX:d.clientX,startWidth:n.current.getCurrent(),pointerId:d.pointerId};try{r.setPointerCapture(d.pointerId)}catch{}document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",s),window.addEventListener("pointerup",l),d.preventDefault()}return r.addEventListener("pointerdown",a),()=>{if(r.removeEventListener("pointerdown",a),window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",l),i){try{r.releasePointerCapture(i.pointerId)}catch{}document.body.style.cursor="",document.body.style.userSelect=""}}},[]),o("div",{ref:t,class:`resizer resizer-${e.side}`,role:"separator","aria-orientation":"vertical","aria-label":e.ariaLabel},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/Resizer.tsx",lineNumber:83,columnNumber:5},this)}const nt=I(!1),Zt=I("doc"),Pt=X("mdview-search-case",!1),Tt=X("mdview-search-word",!1),At=X("mdview-search-regex",!1),Ys=Pt.signal,Qs=Tt.signal,Zs=At.signal;function eo(){Pt.set(!Pt.signal.value)}function to(){Tt.set(!Tt.signal.value)}function no(){At.set(!At.signal.value)}function dt(e="doc"){Zt.value=e,nt.value=!0}function fe(){nt.value=!1}function ro(e){Zt.value=e}function Pn(e,t){let n=null,r=null;const i=((...s)=>{r=s,n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null;const l=r;r=null,l&&e(...l)},t)});return i.cancel=()=>{n!==null&&(clearTimeout(n),n=null),r=null},i.flush=()=>{if(n===null)return;clearTimeout(n),n=null;const s=r;r=null,s&&e(...s)},i}async function io(e,t,n){const r=new URLSearchParams({q:e});t.caseSensitive&&r.set("case","1"),t.wholeWord&&r.set("word","1"),t.regex&&r.set("regex","1");const i=await fetch(`/api/search?${r.toString()}`,{signal:n});if(!i.ok)throw new Error(`HTTP ${i.status}`);return await i.json()}const so={caseSensitive:!1,wholeWord:!1,regex:!1};function oo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function lo(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 r=oo(e);t.wholeWord&&(r=`\\b${r}\\b`),n=new RegExp(r,t.caseSensitive?"g":"gi")}return{query:e,valid:!0,test(r){return n.lastIndex=0,n.exec(r)},matchAll(r){n.lastIndex=0;const i=[];let s;for(;(s=n.exec(r))!==null;){if(s[0].length===0){n.lastIndex++;continue}i.push({index:s.index,length:s[0].length})}return i},matchAllWithBudget(r,i){n.lastIndex=0;const s=[],l=performance.now()+i;let a;for(;(a=n.exec(r))!==null;){if(a[0].length===0){n.lastIndex++;continue}if(s.push({index:a.index,length:a[0].length}),performance.now()>l)return{matches:s,truncated:!0}}return{matches:s,truncated:!1}}}}const rt="search-hit",Lt="is-active";function we(e){e.querySelectorAll(`mark.${rt}`).forEach(n=>{const r=n.parentNode;if(r){for(;n.firstChild;)r.insertBefore(n.firstChild,n);r.removeChild(n),r.normalize()}})}function ao(e){let t=e.parentNode;for(;t;){if(t instanceof HTMLElement&&t.tagName==="MARK"&&t.classList.contains(rt))return!0;t=t.parentNode}return!1}function co(e,t,n=so){if(!t)return[];const r=lo(t,n);if(!r.valid)return[];const i=[],s=e.querySelector(".markdown-content")??e,l=document.createTreeWalker(s,NodeFilter.SHOW_TEXT,{acceptNode(d){if(!d.nodeValue||ao(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 a=l.nextNode();for(;a;){const d=a.nodeValue??"";for(const c of r.matchAll(d))i.push({node:a,start:c.index,end:c.index+c.length});a=l.nextNode()}return i}function uo(e,t){const n=[],r=new Map;e.forEach(s=>{const l=r.get(s.node)??[];l.push(s),r.set(s.node,l)});const i=new Map;return e.forEach((s,l)=>{i.set(s,l)}),r.forEach((s,l)=>{var m;s.sort((u,p)=>u.start-p.start);let a=0;const d=l.parentNode;if(!d)return;const c=document.createDocumentFragment();s.forEach(u=>{u.start>a&&c.appendChild(document.createTextNode(l.nodeValue.slice(a,u.start)));const p=document.createElement("mark");p.className=rt;const f=i.get(u);f===t&&p.classList.add(Lt),p.dataset.hit=String(f),p.textContent=l.nodeValue.slice(u.start,u.end),c.appendChild(p),n.push(p),a=u.end}),a<(((m=l.nodeValue)==null?void 0:m.length)??0)&&c.appendChild(document.createTextNode(l.nodeValue.slice(a))),d.replaceChild(c,l)}),n}function mo(e,t){const n=e.querySelectorAll(`mark.${rt}`);let r=null;return n.forEach(i=>{Number(i.dataset.hit??-1)===t?(i.classList.add(Lt),r=i):i.classList.remove(Lt)}),r}const po=250,ho=150;function fo({scroller:e,fileTrigger:t,onOpenFile:n}){const[r,i]=W(""),s=Zt.value,l=Ys.value,a=Qs.value,d=Zs.value,c=R(null),m=j([]),u=j(0),p=j(0),f=j(null),h=j(!1),g=j(null),k=j(0);y(()=>{var v,U;(v=c.current)==null||v.focus(),(U=c.current)==null||U.select()},[]);const _=H(()=>Pn((v,U,O)=>{we(v);const ne=co(v,U,O);m.value=ne,u.value=0,ne.length>0?(uo(ne,0),p.value=v.querySelectorAll("mark.search-hit").length,requestAnimationFrame(()=>{const q=v.querySelector("mark.search-hit.is-active");q&&(Ct(q),q.scrollIntoView({behavior:"smooth",block:"center"}))})):p.value=0},ho),[]);y(()=>{if(s==="doc"&&e){if(!r.trim()){_.cancel(),we(e),m.value=[],u.value=0,p.value=0;return}return _(e,r,{caseSensitive:l,wholeWord:a,regex:d}),()=>_.cancel()}},[r,s,e,t,l,a,d]),y(()=>{if(s!=="doc"||!e||m.value.length===0)return;const v=mo(e,u.value);v&&(Ct(v),v.scrollIntoView({behavior:"smooth",block:"center"}))},[u.value,s,e,m.value.length]);const b=R(null),T=H(()=>Pn((v,U)=>{var ne;(ne=b.current)==null||ne.abort();const O=new AbortController;b.current=O,(async()=>{try{const q=await io(v,U,O.signal);if(O.signal.aborted)return;f.value=q,g.value=null,k.value=0}catch(q){if(q.name==="AbortError")return;g.value=q.message}finally{b.current===O&&(b.current=null),O.signal.aborted||(h.value=!1)}})()},po),[]);y(()=>{var v;if(s==="folder"){if(!r.trim()){T.cancel(),(v=b.current)==null||v.abort(),b.current=null,f.value=null,g.value=null,h.value=!1;return}return h.value=!0,T(r.trim(),{caseSensitive:l,wholeWord:a,regex:d}),()=>{var U;T.cancel(),(U=b.current)==null||U.abort(),b.current=null}}},[r,s,l,a,d]),y(()=>()=>{e&&we(e)},[e]),y(()=>{s!=="doc"&&e&&we(e)},[s,e]);function L(){if(s==="doc"){if(m.value.length===0)return;u.value=(u.value+1)%m.value.length}else{const v=mt(f.value);if(v.length===0)return;k.value=(k.value+1)%v.length}}function F(){if(s==="doc"){if(m.value.length===0)return;u.value=(u.value-1+m.value.length)%m.value.length}else{const v=mt(f.value);if(v.length===0)return;k.value=(k.value-1+v.length)%v.length}}function z(){const U=mt(f.value)[k.value];U&&(n(U.relPath),fe())}function N(v){v!==s&&ro(v)}function w(v){v.key==="Escape"?(v.preventDefault(),fe()):v.key==="Tab"?(v.preventDefault(),N(s==="doc"?"folder":"doc")):v.key==="Enter"?(v.preventDefault(),s==="doc"?v.shiftKey?F():L():z()):v.key==="ArrowDown"?(v.preventDefault(),L()):v.key==="ArrowUp"&&(v.preventDefault(),F())}return o("div",{class:"search-bar",role:"search","aria-label":"Find",children:[o("div",{class:"search-scope",role:"tablist","aria-label":"Search scope",children:[o("button",{type:"button",role:"tab","aria-selected":s==="doc",class:`scope-pill${s==="doc"?" is-active":""}`,"data-tooltip":"Search in document (Tab)","data-tooltip-side":"top",onClick:()=>N("doc"),tabIndex:-1,children:"Doc"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:253,columnNumber:9},this),o("button",{type:"button",role:"tab","aria-selected":s==="folder",class:`scope-pill${s==="folder"?" is-active":""}`,"data-tooltip":"Search across folder (⇧⌘F)","data-tooltip-side":"top",onClick:()=>N("folder"),tabIndex:-1,children:"Folder"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:265,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:252,columnNumber:7},this),o("input",{ref:c,type:"search",class:"search-input",placeholder:s==="doc"?"Find in document":"Find in folder",value:r,onInput:v=>i(v.target.value),onKeyDown:w,"aria-label":"Search query"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:278,columnNumber:7},this),o("div",{class:"search-options",role:"group","aria-label":"Search options",children:[o("button",{type:"button",class:`search-opt${l?" is-on":""}`,"aria-pressed":l,title:"Match case",onClick:eo,tabIndex:-1,children:"Aa"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:289,columnNumber:9},this),o("button",{type:"button",class:`search-opt${a?" is-on":""}`,"aria-pressed":a,title:"Whole word",onClick:to,tabIndex:-1,children:"ab"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:299,columnNumber:9},this),o("button",{type:"button",class:`search-opt${d?" is-on":""}`,"aria-pressed":d,title:"Regular expression",onClick:no,tabIndex:-1,children:".*"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:309,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:288,columnNumber:7},this),o("span",{class:"search-count","aria-live":"polite",children:go(s,r.trim(),u.value,p.value,h.value,f.value)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:320,columnNumber:7},this),o("button",{type:"button",class:"search-btn",onClick:F,"aria-label":"Previous match",title:"Previous (↑ / Shift+Enter)",children:"↑"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:330,columnNumber:7},this),o("button",{type:"button",class:"search-btn",onClick:L,"aria-label":"Next match",title:"Next (↓ / Enter)",children:"↓"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:339,columnNumber:7},this),o("button",{type:"button",class:"search-btn search-close",onClick:fe,"aria-label":"Close search",title:"Close (Esc)",children:"×"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:348,columnNumber:7},this),s==="folder"&&o(bo,{state:f.value,loading:h.value,error:g.value,query:r.trim(),activeIndex:k.value,onHover:v=>k.value=v,onPick:v=>{k.value=v,z()}},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:359,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:251,columnNumber:5},this)}function mt(e){if(!e)return[];const t=[];for(const n of e.results)for(const r of n.hits)t.push({relPath:n.relPath,fileTotal:n.total,fileTruncated:n.truncated,hit:r});return t}function vo(e){if(e.results.length===0)return"No matches";const t=e.results.reduce((i,s)=>i+s.total,0),n=e.results.length===1?"file":"files",r=e.truncated?"+":"";return`${t}${r} hits in ${e.results.length} ${n}`}function go(e,t,n,r,i,s){return e==="doc"?t?r===0?"No matches":`${Math.min(n+1,r)} / ${r}`:"":i?"…":s?vo(s):""}function bo({state:e,loading:t,error:n,query:r,activeIndex:i,onHover:s,onPick:l}){if(!r)return null;if(t&&!e)return o("div",{class:"search-results",children:o("div",{class:"search-empty",children:"Searching…"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:440,columnNumber:40},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:440,columnNumber:12},this);if(n)return o("div",{class:"search-results",children:o("div",{class:"search-empty",children:["Error: ",n]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:443,columnNumber:40},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:443,columnNumber:12},this);if(!e||e.results.length===0)return o("div",{class:"search-results",children:o("div",{class:"search-empty",children:"No matches"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:446,columnNumber:40},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:446,columnNumber:12},this);let a=0;return o("div",{class:"search-results",children:[e.results.map(d=>o("section",{class:"search-file-group",children:[o("header",{class:"search-file-head",children:[o("span",{class:"search-file-path",children:d.relPath},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:454,columnNumber:13},this),o("span",{class:"search-file-count",children:[d.total,d.truncated?"+":""," hits"]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:455,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:453,columnNumber:11},this),o("ul",{children:d.hits.map(c=>{const m=a++;return o("li",{class:`search-hit-row${m===i?" is-active":""}`,onMouseEnter:()=>s(m),onClick:()=>l(m),children:[o("span",{class:"search-hit-line",children:["L",c.line]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:470,columnNumber:19},this),o("span",{class:"search-hit-snippet",children:No(c.snippet,c.highlight)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:471,columnNumber:19},this)]},`${d.relPath}:${c.line}:${c.col}`,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:464,columnNumber:17},this)})},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:459,columnNumber:11},this)]},d.relPath,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:452,columnNumber:9},this)),e.truncated&&o("div",{class:"search-empty",children:"More results truncated — refine your query."},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:481,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:450,columnNumber:5},this)}function No(e,t){const[n,r]=t;return o(ee,{children:[o("span",{children:e.slice(0,n)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:491,columnNumber:7},this),o("mark",{class:"search-hit",children:e.slice(n,r)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:492,columnNumber:7},this),o("span",{children:e.slice(r)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:493,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/SearchBar.tsx",lineNumber:490,columnNumber:5},this)}const ko=typeof navigator<"u"&&/mac/i.test(navigator.platform||navigator.userAgent),re=ko?"⌘":"Ctrl";function S(e){return e.metaKey||e.ctrlKey}function Tn(e,t){const n=tt(e.outline).map(i=>i.id);if(n.length===0)return;const r=B.value;if(t===1){const i=r?n.indexOf(r):-1,s=n[Math.min(i+1,n.length-1)];s&&e.onJumpHeading(s)}else{const i=r?n.indexOf(r):n.length,s=n[Math.max(i-1,0)];s&&e.onJumpHeading(s)}}function An(e){var l;const t=ae.value;if(!t)return null;const n=ar(t.tree);if(n.length===0)return null;const r=Qe.value,i=r?n.findIndex(a=>a.relPath===r):-1;if(i<0)return((l=n[0])==null?void 0:l.relPath)??null;const s=i+e;return s<0||s>=n.length?null:n[s].relPath}function Ln(e){const t=Ne.value;t&&t.scrollBy({top:e*(t.clientHeight/2),behavior:"smooth"})}let Ae=0;const yo=600,Wr=[{id:"palette",group:"Find",label:"Switch file (quick switcher)",displayKeys:[re,"P"],whenTyping:"allow",match:e=>S(e)&&e.key.toLowerCase()==="p",run:()=>ci()},{id:"search-doc-meta",group:"Find",label:"Open in-doc search",displayKeys:[re,"F"],whenTyping:"allow",match:e=>S(e)&&!e.shiftKey&&e.key.toLowerCase()==="f",run:()=>dt("doc")},{id:"search-folder-meta",group:"Find",label:"Open folder-wide search",displayKeys:[re,"⇧","F"],whenTyping:"allow",match:e=>S(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=>!S(e)&&e.key==="/",run:()=>dt("doc")},{id:"shortcuts-panel",group:"View",label:"Show shortcuts panel",displayKeys:["?"],whenTyping:"block",match:e=>!S(e)&&e.key==="?",run:()=>Ar()},{id:"toggle-tree",group:"View",label:"Toggle file tree",displayKeys:[re,"B"],whenTyping:"allow",match:e=>S(e)&&e.key.toLowerCase()==="b",run:()=>Ce()},{id:"toggle-outline",group:"View",label:"Toggle outline",displayKeys:[re,"."],whenTyping:"allow",match:e=>S(e)&&e.key===".",run:()=>Ee()},{id:"toggle-theme",group:"View",label:"Toggle theme",displayKeys:[re,"\\"],whenTyping:"allow",match:e=>S(e)&&e.key==="\\",run:()=>Cr()},{id:"toggle-focus",group:"View",label:"Toggle focus mode",displayKeys:["f"],whenTyping:"block",match:e=>!S(e)&&!e.shiftKey&&e.key==="f",run:()=>hr()},{id:"toggle-minimap",group:"View",label:"Toggle minimap",displayKeys:["m"],whenTyping:"block",match:e=>!S(e)&&!e.shiftKey&&e.key==="m",run:()=>fr()},{id:"toggle-wide-layout",group:"View",label:"Toggle wide layout",displayKeys:["w"],whenTyping:"block",match:e=>!S(e)&&!e.shiftKey&&e.key==="w",run:()=>vr()},{id:"expand-all-sections",group:"View",label:"Expand all sections",displayKeys:["e"],whenTyping:"block",match:e=>!S(e)&&!e.shiftKey&&e.key==="e",run:()=>Ri()},{id:"collapse-all-sections",group:"View",label:"Collapse all sections",displayKeys:["⇧","E"],whenTyping:"block",match:e=>!S(e)&&e.shiftKey&&e.key==="E",run:()=>Bi()},{id:"next-heading",group:"Navigation",label:"Next heading",displayKeys:["j"],whenTyping:"block",match:e=>!S(e)&&e.key==="j",run:e=>Tn(e,1)},{id:"prev-heading",group:"Navigation",label:"Previous heading",displayKeys:["k"],whenTyping:"block",match:e=>!S(e)&&e.key==="k",run:e=>Tn(e,-1)},{id:"doc-top",group:"Navigation",label:"Top of document (gg)",displayKeys:["g","g"],whenTyping:"block",match:e=>{if(S(e)||e.shiftKey||e.key!=="g")return!1;const t=performance.now();return t-Ae<yo?(Ae=0,!0):(Ae=t,!1)},run:()=>{const e=Ne.value;e&&e.scrollTo({top:0,behavior:"smooth"})}},{id:"doc-bottom",group:"Navigation",label:"Bottom of document",displayKeys:["⇧","G"],whenTyping:"block",match:e=>!S(e)&&e.shiftKey&&e.key==="G",run:()=>{const e=Ne.value;e&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"})}},{id:"next-file",group:"Navigation",label:"Next file",displayKeys:["⇧","L"],whenTyping:"block",match:e=>!S(e)&&e.shiftKey&&e.key==="L",run:e=>{const t=An(1);t&&e.navigate(t)}},{id:"prev-file",group:"Navigation",label:"Previous file",displayKeys:["⇧","H"],whenTyping:"block",match:e=>!S(e)&&e.shiftKey&&e.key==="H",run:e=>{const t=An(-1);t&&e.navigate(t)}},{id:"next-same-level",group:"Navigation",label:"Next heading at same level",displayKeys:["]"],whenTyping:"block",match:e=>!S(e)&&e.key==="]",run:e=>{const t=En(e.outline,B.value,1);t&&e.onJumpHeading(t)}},{id:"prev-same-level",group:"Navigation",label:"Previous heading at same level",displayKeys:["["],whenTyping:"block",match:e=>!S(e)&&e.key==="[",run:e=>{const t=En(e.outline,B.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:()=>Ln(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:()=>Ln(-1)}],_o=[{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 $n(e){e.key!=="g"&&(Ae=0)}const Mn=["Navigation","Find","View"];function wo(e){var n;const t=new Map;for(const r of Mn)t.set(r,[]);for(const r of e)(n=t.get(r.group))==null||n.push(r);return Mn.map(r=>({heading:r,items:t.get(r)??[]}))}function xo(){const e=et.value,t=H(()=>wo([...Wr,..._o]),[]);return y(()=>{if(!e)return;function n(r){r.key==="Escape"&&Te()}return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e]),e?o("div",{class:"shortcuts-overlay",role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",onClick:Te,children:o("div",{class:"shortcuts-panel",onClick:n=>n.stopPropagation(),children:[o("div",{class:"shortcuts-head",children:[o("span",{class:"shortcuts-eyebrow",children:"Keyboard shortcuts"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:47,columnNumber:11},this),o("button",{type:"button",class:"shortcuts-close","aria-label":"Close shortcuts panel",onClick:Te,children:"×"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:48,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:46,columnNumber:9},this),o("div",{class:"shortcuts-body",children:t.filter(n=>n.items.length>0).map(n=>o("section",{class:"shortcuts-group",children:[o("h3",{class:"shortcuts-group-title",children:n.heading},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:60,columnNumber:15},this),o("ul",{children:n.items.map(r=>o("li",{children:[o("span",{class:"shortcut-label",children:r.label},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:64,columnNumber:21},this),o("span",{class:"shortcut-keys",children:r.displayKeys.map((i,s)=>o("span",{children:[s>0&&o("span",{class:"shortcut-plus","aria-hidden":!0,children:"+"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:68,columnNumber:37},this),o("kbd",{children:i},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:69,columnNumber:27},this)]},`${i}-${s}`,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:67,columnNumber:25},this))},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:65,columnNumber:21},this)]},r.id,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:63,columnNumber:19},this))},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:61,columnNumber:15},this)]},n.heading,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:59,columnNumber:13},this))},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:57,columnNumber:9},this),o("div",{class:"shortcuts-foot",children:["Press ",o("kbd",{children:"Esc"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:80,columnNumber:17},this)," or click outside to close"]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:79,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:45,columnNumber:7},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/components/ShortcutsPanel.tsx",lineNumber:38,columnNumber:5},this):null}const Do=4;function Uo(e,t){const n=Do;y(()=>{const r=e.current;if(!r)return;function i(s){s.altKey&&(s.preventDefault(),r.scrollBy({top:s.deltaY*n,left:s.deltaX*n,behavior:"auto"}))}return r.addEventListener("wheel",i,{passive:!1}),()=>{r.removeEventListener("wheel",i)}},[e,n])}const K=I(null),ze=I(null),$t=I(!1);async function zr(e){$t.value=!0,ze.value=null;try{const t=new URLSearchParams({palette:se.value});e&&t.set("path",e);const n=`/api/file?${t}`,r=await fetch(n);if(!r.ok){const i=await r.json().catch(()=>({error:`HTTP ${r.status}`}));throw new Error(i.error??`HTTP ${r.status}`)}K.value=await r.json()}catch(t){ze.value=t.message,K.value=null}finally{$t.value=!1}}function So(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||e.isContentEditable}function Co(e){return e.key!=="Escape"?!1:Ze.value?(Pe(),e.preventDefault(),!0):Xe.value?(Se(),e.preventDefault(),!0):et.value?(Te(),e.preventDefault(),!0):nt.value?(fe(),e.preventDefault(),!0):!1}function Eo(e){y(()=>{const t={outline:e.outline,onJumpHeading:e.onJumpHeading,navigate:e.navigate};function n(r){if(Co(r))return;const i=So(r.target);for(const s of Wr)if(!(i&&s.whenTyping==="block")&&s.match(r)){r.preventDefault(),s.run(t),$n(r);return}$n(r)}return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e.outline,e.onJumpHeading,e.navigate])}function Io(e){y(()=>{const t=new EventSource("/api/watch"),n=r=>{try{const i=JSON.parse(r.data);e(i)}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 Po(e,t,n){if(e.kind!=="change")return!1;const r=(t==null?void 0:t.relPath)??n;return r!==null&&e.relPath===r}function To({currentPath:e,scrollerRef:t}){const n=Xn(r=>{var i;if(Po(r,K.value,e)){const s=((i=t.current)==null?void 0:i.scrollTop)??0;zr(e).then(()=>{requestAnimationFrame(()=>{t.current&&(t.current.scrollTop=s)})});return}(r.kind==="add"||r.kind==="unlink"||r.kind==="config"||r.kind==="workspace")&&lr()},[e,t]);Io(n)}let ie=null,Mt=[],Y=null,Fn=null;function qr(){return typeof window>"u"||window.parent===window?!1:new URLSearchParams(window.location.search).get("embed")==="vscode"}function Ft(e){if(ie===null){Mt.push(e);return}window.parent.postMessage(e,ie)}function Ao(e){if(Y=e,Fn!==null)return;const t=n=>{if(ie===null){if(n.source===window.parent&&n.data!==null&&typeof n.data=="object"&&n.data.type==="mdview/init"){ie=n.origin;for(const r of Mt)window.parent.postMessage(r,ie);Mt=[],Y==null||Y(n.data)}return}n.origin===ie&&(n.data===null||typeof n.data!="object"||typeof n.data.type!="string"||Y==null||Y(n.data))};Fn=t,window.addEventListener("message",t)}function Lo(){var z;ls(),Hs();const e=ui(),{currentPath:t,setCurrentPath:n,navigate:r}=Fi(),i=qr(),s=R(null),l=xi.value,a=Di.value,d=vn.value,c=gn.value,m=pr.value;y(()=>{const N=ae.value;if(!N)return;const w=N.roots.length===1?N.roots[0]:void 0;if((w==null?void 0:w.kind)==="file"){n(`${w.id}/${w.filePath}`);return}if(t===null){const v=Mi(),O=(v?ur(N.tree,v):null)??cr(N.tree);O&&n(O)}},[e,t]),y(()=>{zr(t)},[t,se.value]),y(()=>{fe()},[t]),y(()=>{const N=K.value;let w=null;if(N){if(N.title)w=N.title;else if(t){const v=t.lastIndexOf("/");w=v>=0?t.slice(v+1):t}}document.title=w?`${w} | mdview`:"mdview"},[K.value,t]),y(()=>{if(!K.value||!s.current)return;const N=window.location.hash.slice(1);N?requestAnimationFrame(()=>{lt(N);const w=document.getElementById(N);w==null||w.scrollIntoView({behavior:"auto",block:"start"})}):s.current.scrollTop=0},[K.value]),yi(s.current),y(()=>{Vs(s.current)},[s.current]),y(()=>{m?document.documentElement.dataset.wide="1":delete document.documentElement.dataset.wide},[m]),To({currentPath:t,scrollerRef:s}),Eo({outline:((z=K.value)==null?void 0:z.outline)??[],onJumpHeading:N=>f(N),navigate:N=>r(N)}),Uo(s);const u=N=>r(N),p=(N,w)=>{if(i&&N){Ft({type:"mdview/internal-link-clicked",relPath:N,fromFile:t??""});return}if(r(N,w),w){const v=w.slice(1);requestAnimationFrame(()=>{var U;lt(v),(U=document.getElementById(v))==null||U.scrollIntoView({behavior:"smooth"})})}},f=N=>{history.replaceState(history.state,"",`#${N}`),gi(N),lt(N);const w=document.getElementById(N);if(w==null||w.scrollIntoView({behavior:"smooth"}),i&&w){const v=w.getAttribute("data-source-line"),U=v!==null?parseInt(v,10):null;U!==null&&!Number.isNaN(U)&&Ft({type:"mdview/heading-clicked",line:U,file:t??""})}},h=N=>{var w;if(N===null){history.replaceState(history.state,"",window.location.pathname+window.location.search),B.value=null,(w=s.current)==null||w.scrollTo({top:0,behavior:"smooth"});return}f(N)},g=K.value,k=ae.value,_=xt.value,b=["app-shell",i?"embed":"",l?"tree-collapsed":"",a?"outline-collapsed":"",_?"has-minimap":""].filter(Boolean).join(" "),T=`--tree-width:${i?0:d}px;--outline-width:${c}px`,L=()=>{Ci(),l||Ce()},F=()=>{Ei(),a||Ee()};return o("div",{class:b,style:T,children:[!i&&o("aside",{class:"pane-tree","aria-label":"File tree",children:l?o("button",{class:"rail-btn","aria-label":"Expand file tree",title:"Expand file tree",onClick:Ce,children:[o(Ds,{size:15},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:225,columnNumber:15},this),o("span",{class:"rail-label",children:"FILES"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:226,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:219,columnNumber:13},this):k&&o($s,{tree:k.tree,currentPath:t,onSelect:u,onCollapse:Ce},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:230,columnNumber:15},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:217,columnNumber:9},this),!i&&!l&&o(In,{side:"left",ariaLabel:"Resize file tree",getCurrent:()=>vn.value,onResize:Ui,collapseAt:fn,onCollapse:L,min:Be,max:Ke},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:242,columnNumber:9},this),o("header",{class:"pane-header",children:[o(Bs,{outline:(g==null?void 0:g.outline)??[],fileName:(g==null?void 0:g.title)??null,onJumpHeading:h},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:255,columnNumber:9},this),o(Xs,{scroller:s.current,trigger:g},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:260,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:254,columnNumber:7},this),o("main",{class:"pane-main",ref:s,children:[nt.value&&o(fo,{scroller:s.current,fileTrigger:g,onOpenFile:u},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:265,columnNumber:11},this),(k==null?void 0:k.roots.length)===0&&o("div",{class:"status",children:["No folders open. Run ",o("code",{children:"mdview <path>"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:273,columnNumber:34},this)," in a folder to add one."]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:272,columnNumber:11},this),$t.value&&!g&&o(vs,{},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:276,columnNumber:40},this),ze.value&&o("div",{class:"status status-error",children:["Error: ",ze.value]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:277,columnNumber:29},this),g&&o(fs,{file:g,onInternalNavigate:p},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:278,columnNumber:18},this),g&&xt.value&&o(zs,{outline:g.outline},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:279,columnNumber:41},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:263,columnNumber:7},this),o(Ks,{},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:282,columnNumber:7},this),o(xo,{},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:283,columnNumber:7},this),o(hi,{currentPath:t,onSelect:u},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:284,columnNumber:7},this),!a&&o(In,{side:"right",ariaLabel:"Resize outline",getCurrent:()=>gn.value,onResize:Si,collapseAt:fn,onCollapse:F,min:Be,max:Ke},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:287,columnNumber:9},this),o("aside",{class:"pane-outline","aria-label":"Outline",children:a?o("button",{class:"rail-btn","aria-label":"Expand outline",title:"Expand outline",onClick:Ee,children:[o(Ss,{size:15},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:307,columnNumber:13},this),o("span",{class:"rail-label",children:"OUTLINE"},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:308,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:301,columnNumber:11},this):g&&o(Gs,{nodes:g.outline,onJump:f,onCollapse:Ee},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:312,columnNumber:13},this)},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:299,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/App.tsx",lineNumber:215,columnNumber:5},this)}const $o=new Set(["mdview/init","mdview/set-file","mdview/cursor-changed","mdview/palette-changed"]);function Mo(e){return e.length===0||e.startsWith("/")?!1:!e.split("/").some(t=>t==="..")}function Fo(e){if($o.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"&&Mo(t)&&(Ie(t),_r(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 r=null;for(const i of n){const s=parseInt(i.getAttribute("data-source-line")??"",10);!Number.isNaN(s)&&s<=t&&(r=i)}r==null||r.scrollIntoView({behavior:"smooth",block:"start"})});break}case"mdview/palette-changed":{const t=e.palette;typeof t=="string"&&Je.includes(t)&&Or(t);break}}}qr()&&Ao(Fo);const jr=document.getElementById("app");if(!jr)throw new Error("Missing #app");ti(o(Lo,{},void 0,!1,{fileName:"/Users/hardikgurg/Desktop/prototypes/mdview/src/client/main.tsx",lineNumber:91,columnNumber:8},void 0),jr);export{Qt as _};
|
package/dist/client/assets/{infoDiagram-RXCK75RN-DNuHlrdu.js → infoDiagram-RXCK75RN-BR20W1yx.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,l as s,D as o,d as i}from"./mermaid.core-
|
|
1
|
+
import{_ as e,l as s,D as o,d as i}from"./mermaid.core-Dq2piIpp.js";import{p as g}from"./cynefin-OW5HDTMX-DFpC3uqz.js";import"./index-DqIihcNP.js";var p={parse:e(async r=>{const a=await g("info",r);s.debug(a)},"parse")},d={version:"11.17.0"},v=e(()=>d.version,"getVersion"),m={getVersion:v},c=e((r,a,n)=>{s.debug(`rendering info diagram
|
|
2
2
|
`+r);const t=o(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),l={draw:c},b={parser:p,db:m,renderer:l};export{b as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as o,c as ot,L as ut,D as dt,an as yt,p as ft,k as pt,n as it,a as gt,b as kt,g as mt,s as wt,o as _t,d as bt}from"./mermaid.core-
|
|
1
|
+
import{_ as o,c as ot,L as ut,D as dt,an as yt,p as ft,k as pt,n as it,a as gt,b as kt,g as mt,s as wt,o as _t,d as bt}from"./mermaid.core-Dq2piIpp.js";import"./index-DqIihcNP.js";var tt=(function(){var e=o(function(M,t,s,i){for(s=s||{},i=M.length;i--;s[M[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],N={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,u,p,n,v){var w=n.length-1;switch(p){case 6:case 7:return u;case 15:u.addNode(n[w-1].length,n[w].trim());break;case 16:u.addNode(0,n[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:m},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],u=[],p=[null],n=[],v=this.table,w="",I=0,S=0,L=2,E=1,R=n.slice.call(arguments,1),b=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);b.setInput(t,C.yy),C.yy.lexer=b,C.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var T=b.yylloc;n.push(T);var D=b.options&&b.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(P){i.length=i.length-2*P,p.length=p.length-P,n.length=n.length-P}o(j,"popStack");function z(){var P;return P=u.pop()||b.lex()||E,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}o(z,"lex");for(var A,W,B,q,H={},X,V,et,Y;;){if(W=i[i.length-1],this.defaultActions[W]?B=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=z()),B=v[W]&&v[W][A]),typeof B>"u"||!B.length||!B[0]){var Q="";Y=[];for(X in v[W])this.terminals_[X]&&X>L&&Y.push("'"+this.terminals_[X]+"'");b.showPosition?Q="Parse error on line "+(I+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
3
|
Expecting `+Y.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Q="Parse error on line "+(I+1)+": Unexpected "+(A==E?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(Q,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:T,expected:Y})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(B[0]){case 1:i.push(A),p.push(b.yytext),n.push(b.yylloc),i.push(B[1]),A=null,S=b.yyleng,w=b.yytext,I=b.yylineno,T=b.yylloc;break;case 2:if(V=this.productions_[B[1]][1],H.$=p[p.length-V],H._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},D&&(H._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]]),q=this.performAction.apply(H,[w,S,I,C.yy,B[1],p,n].concat(R)),typeof q<"u")return q;V&&(i=i.slice(0,-1*V*2),p=p.slice(0,-1*V),n=n.slice(0,-1*V)),i.push(this.productions_[B[1]][0]),p.push(H.$),n.push(H._$),et=v[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},O=(function(){var M={EOF:1,parseError:o(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:o(function(t,s){return this.yy=s||this.yy||{},this._input=t,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:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=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),i.length-1&&(this.yylineno-=i.length-1);var p=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:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as gt}from"./chunk-5VM5RSS4-
|
|
1
|
+
import{g as gt}from"./chunk-5VM5RSS4-COq9euGx.js";import{a as mt,b as lt,h as xt,d as kt}from"./chunk-F27PBJKO-BxcjnaqW.js";import{g as _t,s as vt,a as bt,b as wt,o as Tt,n as St,_ as s,c as R,j as X,d as $t,p as Mt}from"./mermaid.core-Dq2piIpp.js";import{d as it}from"./arc-C6Oi4WlG.js";import"./index-DqIihcNP.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";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:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":H="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(H,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,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:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=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),l.length-1&&(this.yylineno-=l.length-1);var d=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:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as c,l as te,c as W,D as fe,af as ye,ag as be,ah as me,Y as _e,B as K,i as G,H as ke,J as Ee,V as Se,W as le,X as ce}from"./mermaid.core-
|
|
1
|
+
import{_ as c,l as te,c as W,D as fe,af as ye,ag as be,ah as me,Y as _e,B as K,i as G,H as ke,J as Ee,V as Se,W as le,X as ce}from"./mermaid.core-Dq2piIpp.js";import{g as Ne}from"./chunk-5VM5RSS4-COq9euGx.js";import"./index-DqIihcNP.js";var $=(function(){var t=c(function(_,s,n,a){for(n=n||{},a=_.length;a--;n[_[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],k=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],H=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],M=[1,35],U=[1,36],A=[1,6,7,11,13,16,17,20,23],j=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:H}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:k,18:17,19:18,20:f,23:h},t(P,[2,14],{7:M,11:U}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:H}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:j}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:M,11:U}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:j}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var q=m.yylloc;e.push(q);var de=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||m.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var E,R,v,Q,F={},X,I,oe,Y;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((E===null||typeof E>"u")&&(E=ae()),v=B[R]&&B[R][E]),typeof v>"u"||!v.length||!v[0]){var Z="";Y=[];for(X in B[R])this.terminals_[X]&&X>ue&&Y.push("'"+this.terminals_[X]+"'");m.showPosition?Z="Parse error on line "+(z+1)+`:
|
|
2
2
|
`+m.showPosition()+`
|
|
3
3
|
Expecting `+Y.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(E==re?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Z,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:q,expected:Y})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+E);switch(v[0]){case 1:a.push(E),u.push(m.yytext),e.push(m.yylloc),a.push(v[1]),E=null,ie=m.yyleng,l=m.yytext,z=m.yylineno,q=m.yylloc;break;case 2:if(I=this.productions_[v[1]][1],F.$=u[u.length-I],F._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(F._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Q=this.performAction.apply(F,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Q<"u")return Q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(F.$),e.push(F._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},y=(function(){var _={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=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),a.length-1&&(this.yylineno-=a.length-1);var u=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:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|