git-truck 4.1.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/ChevronButton-DMAgHXfP.js +1 -0
- package/build/client/assets/{CollapsibleHeader-CowQ8BBC.js → CollapsibleHeader-D64_oUaZ.js} +1 -1
- package/build/client/assets/Tooltip-DD8MeSQ5.js +5 -0
- package/build/client/assets/api.commits-B87eK7HE.js +1 -0
- package/build/client/assets/api.commits-C8MoPAnE.js +1 -0
- package/build/client/assets/api.progress-BjsGOmGF.js +1 -0
- package/build/client/assets/api.progress-ClQ--CbT.js +1 -0
- package/build/client/assets/browse-Dt072k2G.js +1 -0
- package/build/client/assets/browse-NZo8Wkxj.js +1 -0
- package/build/client/assets/clear-cache-BdOk-5Hg.js +1 -0
- package/build/client/assets/clear-cache-Dpk-kNlJ.js +1 -0
- package/build/client/assets/{manifest-27f3fdf9.js → manifest-fcb52500.js} +1 -1
- package/build/client/assets/{root-CBAhjBmF.js → root-Bw7JpNPD.js} +1 -1
- package/build/client/assets/root-ulNnm43y.css +2 -0
- package/build/client/assets/{ui-apdBVMs3.js → ui-BlLnrEiL.js} +1 -1
- package/build/client/assets/util-DXfdT-4_.js +44 -0
- package/build/client/assets/view-BO8_n49o.js +4 -0
- package/build/client/assets/{viewParams-BGn6CoZr.js → viewParams-CYa4lbK3.js} +1 -1
- package/build/server/assets/{server-build-CZoDK47O.js → server-build-ChRJnQIf.js} +525 -197
- package/build/server/index.js +1 -1
- package/cli.mjs +190 -43
- package/package.json +1 -1
- package/build/client/assets/ChevronButton-DK6ES4LI.js +0 -1
- package/build/client/assets/Tooltip-4EXAWNsE.js +0 -5
- package/build/client/assets/api.commits-B4POWHc4.js +0 -1
- package/build/client/assets/api.commits-BwXLd7eY.js +0 -1
- package/build/client/assets/api.progress-9Sjpquqz.js +0 -1
- package/build/client/assets/api.progress-PbuJDh_8.js +0 -1
- package/build/client/assets/browse-D4C7blMn.js +0 -1
- package/build/client/assets/browse-f4khjgf7.js +0 -1
- package/build/client/assets/clear-cache-BzRoZVxS.js +0 -1
- package/build/client/assets/clear-cache-_qCibnyW.js +0 -1
- package/build/client/assets/root-C1A3dI8J.css +0 -2
- package/build/client/assets/util-Cy1DhIdh.js +0 -44
- package/build/client/assets/view-xdV5WFuZ.js +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{r as e,t}from"./react-YTRJEZSD.js";import{A as n,D as r,F as i,I as a,M as o,a as s,c,i as l,j as u,o as d,t as f}from"./jsx-runtime-GK6fC0y1.js";import{t as p}from"./react-dom-QjzVRb79.js";import{$ as m,B as h,G as g,H as _,I as v,K as y,L as b,M as x,N as S,O as C,P as w,Q as T,R as E,S as D,St as O,V as k,Z as A,at as j,bt as M,c as N,d as P,et as F,ft as I,it as L,j as ee,l as te,n as R,nt as z,o as ne,q as B,r as V,rt as H,s as U,t as re,tt as W,u as G,ut as K,vt as q,xt as J,y as ie}from"./clear-cache-BdOk-5Hg.js";import{$t as Y,A as ae,B as X,D as oe,E as se,G as ce,H as le,Ht as ue,I as de,J as fe,Jt as pe,K as me,Kt as he,L as ge,M as _e,N as ve,O as ye,P as be,Q as xe,Qt as Se,R as Ce,S as we,St as Te,T as Ee,U as De,Ut as Oe,V as ke,Vt as Ae,Wt as je,Xt as Me,Y as Ne,Yt as Pe,Zt as Fe,_ as Ie,_t as Le,a as Re,an as ze,b as Be,bt as Ve,c as He,ct as Ue,d as We,dt as Ge,ft as Ke,g as qe,gt as Je,h as Ye,ht as Xe,i as Ze,it as Qe,l as $e,lt as et,m as tt,n as nt,nt as rt,o as it,ot as at,pt as ot,q as st,qt as ct,r as lt,rn as ut,rt as dt,t as ft,tn as pt,tt as mt,u as ht,ut as gt,v as _t,vt,x as yt,xt as bt,y as xt,yt as St,zt as Ct}from"./util-DXfdT-4_.js";import{c as wt,s as Tt}from"./dist-Q88wN5JZ.js";import{i as Et,n as Dt,t as Ot}from"./viewParams-CYa4lbK3.js";import{t as kt}from"./CollapsibleHeader-D64_oUaZ.js";import{t as At}from"./api.commits-B87eK7HE.js";import{t as jt}from"./api.abort-D0XxKxsc.js";import{a as Mt,i as Nt,o as Pt,t as Ft}from"./browse-Dt072k2G.js";import{i as It,n as Lt,o as Rt,r as zt,s as Bt,t as Vt}from"./Tooltip-DD8MeSQ5.js";function Ht(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Ut(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function Wt(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function Gt(){return this.eachAfter(Wt)}function Kt(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function qt(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function Jt(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function Yt(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function Xt(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function Zt(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Qt(e){for(var t=this,n=$t(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function $t(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function en(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function tn(){return Array.from(this)}function nn(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function rn(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*an(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function on(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=ln)):t===void 0&&(t=cn);for(var n=new fn(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new fn(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(dn)}function sn(){return on(this).eachBefore(un)}function cn(e){return e.children}function ln(e){return Array.isArray(e)?e[1]:null}function un(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function dn(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function fn(e){this.data=e,this.depth=this.height=0,this.parent=null}fn.prototype=on.prototype={constructor:fn,count:Gt,each:Kt,eachAfter:Jt,eachBefore:qt,find:Yt,sum:Xt,sort:Zt,path:Qt,ancestors:en,descendants:tn,leaves:nn,links:rn,copy:sn,[Symbol.iterator]:an};function pn(e){return e==null?null:mn(e)}function mn(e){if(typeof e!=`function`)throw Error();return e}function hn(){return 0}function gn(e){return function(){return e}}var _n=1664525,vn=1013904223,yn=4294967296;function bn(){let e=1;return()=>(e=(_n*e+vn)%yn)/yn}function xn(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Sn(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function Cn(e,t){for(var n=0,r=(e=Sn(Array.from(e),t)).length,i=[],a,o;n<r;)a=e[n],o&&En(o,a)?++n:(o=On(i=wn(i,a)),n=0);return o}function wn(e,t){var n,r;if(Dn(t,e))return[t];for(n=0;n<e.length;++n)if(Tn(t,e[n])&&Dn(An(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(Tn(An(e[n],e[r]),t)&&Tn(An(e[n],t),e[r])&&Tn(An(e[r],t),e[n])&&Dn(jn(e[n],e[r],t),e))return[e[n],e[r],t];throw Error()}function Tn(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function En(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Dn(e,t){for(var n=0;n<t.length;++n)if(!En(e,t[n]))return!1;return!0}function On(e){switch(e.length){case 1:return kn(e[0]);case 2:return An(e[0],e[1]);case 3:return jn(e[0],e[1],e[2])}}function kn(e){return{x:e.x,y:e.y,r:e.r}}function An(e,t){var n=e.x,r=e.y,i=e.r,a=t.x,o=t.y,s=t.r,c=a-n,l=o-r,u=s-i,d=Math.sqrt(c*c+l*l);return{x:(n+a+c/d*u)/2,y:(r+o+l/d*u)/2,r:(d+i+s)/2}}function jn(e,t,n){var r=e.x,i=e.y,a=e.r,o=t.x,s=t.y,c=t.r,l=n.x,u=n.y,d=n.r,f=r-o,p=r-l,m=i-s,h=i-u,g=c-a,_=d-a,v=r*r+i*i-a*a,y=v-o*o-s*s+c*c,b=v-l*l-u*u+d*d,x=p*m-f*h,S=(m*b-h*y)/(x*2)-r,C=(h*g-m*_)/x,w=(p*y-f*b)/(x*2)-i,T=(f*_-p*g)/x,E=C*C+T*T-1,D=2*(a+S*C+w*T),O=S*S+w*w-a*a,k=-(Math.abs(E)>1e-6?(D+Math.sqrt(D*D-4*E*O))/(2*E):O/D);return{x:r+S+C*k,y:i+w+T*k,r:k}}function Mn(e,t,n){var r=e.x-t.x,i,a,o=e.y-t.y,s,c,l=r*r+o*o;l?(a=t.r+n.r,a*=a,c=e.r+n.r,c*=c,a>c?(i=(l+c-a)/(2*l),s=Math.sqrt(Math.max(0,c/l-i*i)),n.x=e.x-i*r-s*o,n.y=e.y-i*o+s*r):(i=(l+a-c)/(2*l),s=Math.sqrt(Math.max(0,a/l-i*i)),n.x=t.x+i*r-s*o,n.y=t.y+i*o+s*r)):(n.x=t.x+n.r,n.y=t.y)}function Nn(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Pn(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function Fn(e){this._=e,this.next=null,this.previous=null}function In(e,t){if(!(a=(e=xn(e)).length))return 0;var n=e[0],r,i,a,o,s,c,l,u,d,f;if(n.x=0,n.y=0,!(a>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;Mn(r,n,i=e[2]),n=new Fn(n),r=new Fn(r),i=new Fn(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;pack:for(c=3;c<a;++c){Mn(n._,r._,i=e[c]),i=new Fn(i),l=r.next,u=n.previous,d=r._.r,f=n._.r;do if(d<=f){if(Nn(l._,i._)){r=l,n.next=r,r.previous=n,--c;continue pack}d+=l._.r,l=l.next}else{if(Nn(u._,i._)){n=u,n.next=r,r.previous=n,--c;continue pack}f+=u._.r,u=u.previous}while(l!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,o=Pn(n);(i=i.next)!==r;)(s=Pn(i))<o&&(n=i,o=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=Cn(n,t),c=0;c<a;++c)n=e[c],n.x-=i.x,n.y-=i.y;return i.r}function Ln(e){return Math.sqrt(e.value)}function Rn(){var e=null,t=1,n=1,r=hn;function i(i){let a=bn();return i.x=t/2,i.y=n/2,e?i.eachBefore(zn(e)).eachAfter(Bn(r,.5,a)).eachBefore(Vn(1)):i.eachBefore(zn(Ln)).eachAfter(Bn(hn,1,a)).eachAfter(Bn(r,i.r/Math.min(t,n),a)).eachBefore(Vn(Math.min(t,n)/(2*i.r))),i}return i.radius=function(t){return arguments.length?(e=pn(t),i):e},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(e){return arguments.length?(r=typeof e==`function`?e:gn(+e),i):r},i}function zn(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Bn(e,t,n){return function(r){if(i=r.children){var i,a,o=i.length,s=e(r)*t||0,c;if(s)for(a=0;a<o;++a)i[a].r+=s;if(c=In(i,n),s)for(a=0;a<o;++a)i[a].r-=s;r.r=c+s}}}function Vn(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function Hn(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Un(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function Wn(){var e=1,t=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=e,i.y1=t/o,i.eachBefore(a(t,o)),r&&i.eachBefore(Hn),i}function a(e,t){return function(r){r.children&&Un(r,r.x0,e*(r.depth+1)/t,r.x1,e*(r.depth+2)/t);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}return i.round=function(e){return arguments.length?(r=!!e,i):r},i.size=function(n){return arguments.length?(e=+n[0],t=+n[1],i):[e,t]},i.padding=function(e){return arguments.length?(n=+e,i):n},i}function Gn(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var Kn=(1+Math.sqrt(5))/2;function qn(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?Un(c,n,r,i,h?r+=m*g/h:a):Gn(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var Jn=(function e(t){function n(e,n,r,i,a){qn(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(Kn);function Yn(){var e=Jn,t=!1,n=1,r=1,i=[0],a=hn,o=hn,s=hn,c=hn,l=hn;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(Hn),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=mn(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:gn(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:gn(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:gn(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:gn(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:gn(+e),u):l},u}var Xn=(function e(t){function n(e,n,r,i,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,c,l,u=-1,d,f=o.length,p=e.value;++u<f;){for(s=o[u],c=s.children,l=s.value=0,d=c.length;l<d;++l)s.value+=c[l].value;s.dice?Un(s,n,r,i,p?r+=(a-r)*s.value/p:a):Gn(s,n,r,p?n+=(i-n)*s.value/p:i,a),p-=s.value}else e._squarify=o=qn(t,e,n,r,i,a),o.ratio=t}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(Kn);function Zn(){var e=pe().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=Ut(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return Zn(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},Pe.apply(d(),arguments)}var Qn=e(p(),1),Z=O(),Q=e(t(),1),$=f();function $n(e){let t=(0,Q.useId)(),n=`url('#${t}')`;return{linearGradient:(0,Q.useMemo)(()=>e.length>0?(0,$.jsx)(`linearGradient`,{id:t,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,children:Array.from(new Set(e)).toSorted().slice(0,je.length).map((e,t,n)=>(0,$.jsx)(`stop`,{offset:`${t/Math.max(n.length-1,1)*100}%`,stopColor:e},t))}):null,[e,t]),fill:n}}function er(){let e=(0,Z.c)(110),t=Ee(),n=oe(),[r,i]=ve(),{searchResults:a,hasSearchResults:o}=Bt(),s=(0,Q.useDeferredValue)(i),{databaseInfo:c}=ut(),[l]=pt(),{chartType:u,sizeMetric:d,hierarchyType:f,labelsVisible:p,renderCutOff:m,metricType:h,showFilesWithoutChanges:g,showOnlySearchMatches:_}=it(),v=Se(),y=Me(),b=Fe(),x=Xe(),S=Je(),C=ot(),[w,T]=Tt(`zoomPath`,Ot.zoomPath),E;e[0]!==c.repo||e[1]!==T?(E=e=>T(e&&e!==c.repo?Ue(e):null),e[0]=c.repo,e[1]=T,e[2]=E):E=e[2];let D=E,O=De(),k;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(k={key:`Escape`},e[3]=k):k=e[3];let A;e[4]===S?A=e[5]:(A=()=>{S(null)},e[4]=S,e[5]=A),ge(k,A);let j;if(e[6]!==c.commitCounts||e[7]!==c.fileTree||e[8]!==o||e[9]!==f||e[10]!==a||e[11]!==g||e[12]!==_){bb0:{let t;e[14]!==c.commitCounts||e[15]!==o||e[16]!==a||e[17]!==g||e[18]!==_?(t=e=>!(o&&!a[e.path]&&_||!g&&!c.commitCounts[e.path]),e[14]=c.commitCounts,e[15]=o,e[16]=a,e[17]=g,e[18]=_,e[19]=t):t=e[19];let n=ae(c.fileTree,t);if(f===`NESTED`){j=n;break bb0}j={...n,children:_e(n)}}e[6]=c.commitCounts,e[7]=c.fileTree,e[8]=o,e[9]=f,e[10]=a,e[11]=g,e[12]=_,e[13]=j}else j=e[13];let M=j,N;e[20]===l?N=e[21]:(N=l.get(`LAST_CHANGED`)?.buckets,e[20]=l,e[21]=N);let P=N,F;bb1:{if(s.width===0||s.height===0){let t;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[22]=t):t=e[22],F=t;break bb1}let t;e[23]!==u||e[24]!==c||e[25]!==M||e[26]!==P||e[27]!==m||e[28]!==s.height||e[29]!==s.width||e[30]!==d?(t=or({databaseInfo:c,tree:M,size:{height:s.height,width:s.width},chartType:u,sizeMetricType:d,renderCutOff:m,lastChangedBuckets:P}).descendants(),e[23]=u,e[24]=c,e[25]=M,e[26]=P,e[27]=m,e[28]=s.height,e[29]=s.width,e[30]=d,e[31]=t):t=e[31],F=t}let I=F,L;e[32]===n?L=e[33]:(L=()=>{n(null)},e[32]=n,e[33]=L);let ee;e[34]!==u||e[35]!==n||e[36]!==s?(ee=[u,s,n],e[34]=u,e[35]=n,e[36]=s,e[37]=ee):ee=e[37],(0,Q.useEffect)(L,ee);let te;e[38]===c.fileTree?te=e[39]:(te=rt(c.fileTree),e[38]=c.fileTree,e[39]=te);let z=te,ne=(0,Q.useRef)(0),B=(0,Q.useRef)(null),H=tr,U;if(e[40]!==M||e[41]!==y||e[42]!==b||e[43]!==h||e[44]!==l){bb2:{let e=new Set,t=l.get(h)?.categoriesMap;if(!y||!t){U=e;break bb2}let n=r=>{let i=t.get(r.path)?.some(e=>{let{category:t}=e;return b(t)})??!1,a=!1;if(dt(r))for(let e of r.children)n(e)&&(a=!0);let o=i||a;return o&&e.add(r.path),o};n(M),U=e}e[40]=M,e[41]=y,e[42]=b,e[43]=h,e[44]=l,e[45]=U}else U=e[45];let re=U,W;if(e[46]!==y||e[47]!==h||e[48]!==l||e[49]!==I||e[50]!==v){W=new Map;let t=l.get(h)?.categoriesMap;for(let e of I)W.set(e.data.path,ar(e.data,t,v,y));e[46]=y,e[47]=h,e[48]=l,e[49]=I,e[50]=v,e[51]=W}else W=e[51];let G=W,K=u===`BUBBLE_CHART`,q;e[52]===K?q=e[53]:(q=R(`relative grid overflow-hidden`,{"pb-4":K}),e[52]=K,e[53]=q);let J=C&&!z,ie;e[54]===J?ie=e[55]:(ie=V(`stroke-border dark:stroke-border-dark absolute inset-0 fill-gray-900 text-xs select-none dark:fill-gray-100`,{"cursor-zoom-out":J}),e[54]=J,e[55]=ie);let Y=`0 0 ${s.width} ${s.height}`,X;e[56]!==C||e[57]!==x||e[58]!==S||e[59]!==z||e[60]!==O?(X=e=>{let t=H(e.target);if(!t){if(!C){S(null);return}C&&!z&&O();return}e.stopPropagation(),!B.current&&(B.current=window.setTimeout(()=>{if(B.current=null,t&&x===t){S(null);return}if(!t)throw Error(`Clicked object not found on node`);S(t)},300))},e[56]=C,e[57]=x,e[58]=S,e[59]=z,e[60]=O,e[61]=X):X=e[61];let se;e[62]!==S||e[63]!==D||e[64]!==w?(se=e=>{let t=H(e.target);if(!t){S(null);return}if(D(null),e.stopPropagation(),B.current){if(window.clearTimeout(B.current),B.current=null,w&&w===t){D(``);return}D(t??null)}},e[62]=S,e[63]=D,e[64]=w,e[65]=se):se=e[65];let ce;e[66]!==c||e[67]!==t?.path||e[68]!==n?(ce=e=>{let r=H(e.target);if(!r)return;e.stopPropagation();let i=c.objectPathMap[r];i&&t?.path!==i.path&&n(i)},e[66]=c,e[67]=t?.path,e[68]=n,e[69]=ce):ce=e[69];let le;e[70]===n?le=e[71]:(le=()=>n(null),e[70]=n,e[71]=le);let ue;e[72]!==t||e[73]!==D||e[74]!==O?(ue=e=>{ne.current+=e.deltaY,ne.current<=-50&&t?((0,Q.startTransition)(()=>{D(t.path)}),ne.current=0):ne.current>=50&&t&&((0,Q.startTransition)(()=>{O()}),ne.current=0)},e[72]=t,e[73]=D,e[74]=O,e[75]=ue):ue=e[75];let de;if(e[76]!==C||e[77]!==x||e[78]!==G||e[79]!==o||e[80]!==p||e[81]!==re||e[82]!==I||e[83]!==a||e[84]!==v){let t;e[86]!==C||e[87]!==x||e[88]!==G||e[89]!==o||e[90]!==p||e[91]!==re||e[92]!==a||e[93]!==v?(t=(e,t)=>{let n=!!a[e.data.path],r=dt(e.data)?Object.keys(a).some(t=>t.startsWith(`${e.data.path}/`)):n,i=v.length===0||re.has(e.data.path),s=e.data.path===x,c=x?s||e.data.path.startsWith(x+`/`)&&i:i,l=o&&!(n||r)||!c;return(0,$.jsxs)(`g`,{"data-path":e.data.path,className:R(`cursor-pointer duration-400`,{"hover:opacity-80":mt(e.data)&&!C,"hover:stroke-border-highlight dark:hover:stroke-border-highlight-dark":dt(e.data)&&!x,"opacity-10 grayscale hover:opacity-100 hover:grayscale-0":l}),children:[(0,$.jsx)(nr,{d:e,isRoot:t===0,colors:G.get(e.data.path)??[`#c0c0c0`],clickedObjectPath:x}),p?(0,$.jsx)(rr,{isSearchMatch:n,d:e,colors:G.get(e.data.path)??[`#c0c0c0`],children:e.data.name}):null]},e.data.path)},e[86]=C,e[87]=x,e[88]=G,e[89]=o,e[90]=p,e[91]=re,e[92]=a,e[93]=v,e[94]=t):t=e[94],de=I.map(t),e[76]=C,e[77]=x,e[78]=G,e[79]=o,e[80]=p,e[81]=re,e[82]=I,e[83]=a,e[84]=v,e[85]=de}else de=e[85];let fe;e[95]!==ie||e[96]!==Y||e[97]!==X||e[98]!==se||e[99]!==ce||e[100]!==le||e[101]!==ue||e[102]!==de?(fe=(0,$.jsx)(`svg`,{className:ie,xmlns:`http://www.w3.org/2000/svg`,viewBox:Y,onClick:X,onDoubleClick:se,onMouseOver:ce,onMouseOut:le,onWheel:ue,children:de}),e[95]=ie,e[96]=Y,e[97]=X,e[98]=se,e[99]=ce,e[100]=le,e[101]=ue,e[102]=de,e[103]=fe):fe=e[103];let pe;e[104]!==r||e[105]!==fe?(pe=(0,$.jsx)(`div`,{ref:r,className:`relative`,children:fe}),e[104]=r,e[105]=fe,e[106]=pe):pe=e[106];let me;return e[107]!==q||e[108]!==pe?(me=(0,$.jsx)(`div`,{className:q,children:pe}),e[107]=q,e[108]=pe,e[109]=me):me=e[109],me}function tr(e){return e instanceof Element?e.closest(`[data-path]`)?.dataset.path:void 0}function nr(e){let t=(0,Z.c)(41),{d:n,isRoot:r,colors:i,clickedObjectPath:a}=e,{chartType:o,transitionsEnabled:s}=it(),{linearGradient:c,fill:l}=$n(i),u=i.length>1,d=n.data.path===a,f=r?12:8,p;t[0]!==i[0]||t[1]!==n.data||t[2]!==l||t[3]!==d||t[4]!==u?(p=mt(n.data)?{fill:u?l:i[0],stroke:`transparent`}:{strokeWidth:d?`2px`:`1px`},t[0]=i[0],t[1]=n.data,t[2]=l,t[3]=d,t[4]=u,t[5]=p):p=t[5];let m=p;if(o===`BUBBLE_CHART`){let e=n,r=e.x-e.r,i=e.y-e.r+16-1,a=e.r*2,o=e.r*2,s;t[6]!==e.r||t[7]!==m||t[8]!==r||t[9]!==i||t[10]!==a||t[11]!==o?(s={...m,x:r,y:i,width:a,height:o,rx:e.r,ry:e.r},t[6]=e.r,t[7]=m,t[8]=r,t[9]=i,t[10]=a,t[11]=o,t[12]=s):s=t[12],m=s}else{let e=n,r=e.x0+.5,i=e.y0+.5,a=e.x1-e.x0-1,o=e.y1-e.y0-1,s;t[13]!==f||t[14]!==n.data?(s=dt(n.data)?{rx:f,ry:f}:{rx:4,ry:4},t[13]=f,t[14]=n.data,t[15]=s):s=t[15];let c;t[16]!==m||t[17]!==r||t[18]!==i||t[19]!==a||t[20]!==o||t[21]!==s?(c={...m,x:r,y:i,width:a,height:o,...s},t[16]=m,t[17]=r,t[18]=i,t[19]=a,t[20]=o,t[21]=s,t[22]=c):c=t[22],m=c}let h=m,g;t[23]!==c||t[24]!==u?(g=u?(0,$.jsx)(`defs`,{children:c}):null,t[23]=c,t[24]=u,t[25]=g):g=t[25];let _=n.data.path,v;t[26]!==o||t[27]!==n.data||t[28]!==r?(v=dt(n.data)&&(o===`BUBBLE_CHART`||!r)?`stroke-inherit`:`stroke-transparent stroke-0`,t[26]=o,t[27]=n.data,t[28]=r,t[29]=v):v=t[29];let y;t[30]!==n.data||t[31]!==v||t[32]!==s?(y=R(v,{"fill-primary-bg dark:fill-primary-bg-dark":dt(n.data),"transition-[x,y,rx,ry,width,height,fill] duration-500 ease-in-out":s}),t[30]=n.data,t[31]=v,t[32]=s,t[33]=y):y=t[33];let b;t[34]!==h||t[35]!==n.data.path||t[36]!==y?(b=(0,$.jsx)(`rect`,{...h,"data-path":_,className:y}),t[34]=h,t[35]=n.data.path,t[36]=y,t[37]=b):b=t[37];let x;return t[38]!==g||t[39]!==b?(x=(0,$.jsxs)($.Fragment,{children:[g,b]}),t[38]=g,t[39]=b,t[40]=x):x=t[40],x}function rr(e){let t=(0,Z.c)(47),{d:n,isSearchMatch:r,colors:i,children:a}=e,o=a===void 0?null:a,s=ir(n);if(o===null)return null;let c=s?`50%`:void 0,l=s&&dt(n.data)?`central`:`hanging`,u=s?`middle`:`start`,d=`#path-${n.data.hash}`,f;t[0]!==c||t[1]!==l||t[2]!==u||t[3]!==d?(f={startOffset:c,dominantBaseline:l,textAnchor:u,href:d,className:`font-bold tracking-widest`},t[0]=c,t[1]=l,t[2]=u,t[3]=d,t[4]=f):f=t[4];let p=f,m=ir(n)?n.r*2-10/2:0,h=!1;if(ir(n)){if(mt(n.data)){if(m>n.data.name.length*7&&(h=!0),m<16)return null}else if(n.r<(dt(n.data),16)*2||n.r*Math.PI*.6666666666666666<n.data.name.length*7.3)return null}else{let e=n;if(mt(n.data)&&e.y1-e.y0-10<16)return null}let g;t[5]===n?g=t[6]:(g=ir(n)?cr(n.x,n.y+(dt(n.data)?15:16),n.r):void 0,t[5]=n,t[6]=g);let _=`path-${n.data.hash}`,v;t[7]!==g||t[8]!==_?(v=(0,$.jsx)(`path`,{d:g,id:_}),t[7]=g,t[8]=_,t[9]=v):v=t[9];let y=`clip-path-${n.data.hash}`,b;t[10]!==n||t[11]!==m?(b=(0,$.jsx)(`rect`,{stroke:`red`,fill:`transparent`,...ir(n)?{x:n.x-n.r+10/4+.5,y:n.y-n.r+16-1+10/4+.5,width:Math.max(m-1,0),height:Math.max(n.r*2-10/2-1,0),rx:n.r,ry:n.r}:{x:n.x0+10/2,y:n.y0,width:Math.max(n.x1-n.x0-10,0),height:Math.max(n.y1-n.y0-10,0),...dt(n.data)?{rx:8,ry:8}:{rx:4,ry:4}}}),t[10]=n,t[11]=m,t[12]=b):b=t[12];let x;t[13]!==y||t[14]!==b?(x=(0,$.jsx)(`clipPath`,{id:y,children:b}),t[13]=y,t[14]=b,t[15]=x):x=t[15];let S;t[16]!==x||t[17]!==v?(S=(0,$.jsxs)(`defs`,{children:[v,x]}),t[16]=x,t[17]=v,t[18]=S):S=t[18];let C;t[19]!==o||t[20]!==n||t[21]!==p?(C=dt(n.data)&&ir(n)?(0,$.jsx)(`text`,{className:R(`stroke-primary-bg dark:stroke-primary-bg-dark pointer-events-none fill-none stroke-5`),strokeLinecap:`round`,children:(0,$.jsx)(`textPath`,{...p,children:o})}):null,t[19]=o,t[20]=n,t[21]=p,t[22]=C):C=t[22];let w=h?`middle`:void 0,T;t[23]===n?T=t[24]:(T=!ir(n)||mt(n.data)?{clipPath:`url(#clip-path-${n.data.hash})`}:{},t[23]=n,t[24]=T);let E=ir(n)?dt(n.data)?0:n.x-(h?0:n.r-10/2):n.x0+10/2,D=ir(n)?dt(n.data)?0:n.y+16/2:n.y0+10/2,O;t[25]!==n.data||t[26]!==r?(O=R(`pointer-events-none stroke-none transition-all`,{"font-bold underline":r,"font-bold":dt(n.data)}),t[25]=n.data,t[26]=r,t[27]=O):O=t[27];let k;t[28]!==i||t[29]!==n.data?(k=mt(n.data)?{fill:`contrast-color(${i.length>1||i.length===0?`#ffffff`:i[0]})`}:void 0,t[28]=i,t[29]=n.data,t[30]=k):k=t[30];let A;t[31]!==o||t[32]!==n||t[33]!==p?(A=dt(n.data)&&ir(n)?(0,$.jsx)(`textPath`,{...p,children:o}):o,t[31]=o,t[32]=n,t[33]=p,t[34]=A):A=t[34];let j;t[35]!==w||t[36]!==T||t[37]!==E||t[38]!==D||t[39]!==O||t[40]!==k||t[41]!==A?(j=(0,$.jsx)(`text`,{textAnchor:w,alignmentBaseline:`hanging`,...T,x:E,y:D,className:O,style:k,children:A}),t[35]=w,t[36]=T,t[37]=E,t[38]=D,t[39]=O,t[40]=k,t[41]=A,t[42]=j):j=t[42];let M;return t[43]!==S||t[44]!==C||t[45]!==j?(M=(0,$.jsxs)(`g`,{children:[S,C,j]}),t[43]=S,t[44]=C,t[45]=j,t[46]=M):M=t[46],M}function ir(e){return typeof e.r==`number`}function ar(e,t,n,r){let i=t?.get(e.path)?.filter(({category:e})=>!r||n.includes(e)).map(({color:e})=>e)??[];return i.length>0?i:[he]}function or({databaseInfo:e,tree:t,size:n,chartType:r,sizeMetricType:i,renderCutOff:a,lastChangedBuckets:o}){let s=i===`LAST_CHANGED`?o??yt.getBuckets(e):void 0,c=on(t).sum(t=>{if(dt(t))return 0;switch(i){case`FILE_SIZE`:return t.byteSize??1;case`MOST_COMMITS`:return e.commitCounts[t.path]??1;case`EQUAL_SIZE`:return 1;case`LAST_CHANGED`:return 2**((s?.length??0)-yt.getBucketIndex(t,e,s));case`MOST_CONTRIBUTIONS`:return e.contribSumPerFile[t.path]??1}}).sort((e,t)=>(t.value??1)-(e.value??1)),l=Number.isNaN(a)?2:a;if(r===`TREE_MAP`||r===`PARTITION`){let e=(r===`TREE_MAP`?Yn().size([n.width,n.height]).round(!0).tile(Xn).paddingInner(2).paddingOuter(4).paddingTop(21):Wn().size([n.width,n.height]).padding(0))(c);return sr(e,e=>{let t=e;return t.x1-t.x0>=l&&t.y1-t.y0>=l}),e}if(r===`BUBBLE_CHART`){let e=Rn().size([n.width,n.height-16]).padding(10)(c);return sr(e,e=>e.r>=l),e}else throw Error(`Unknown chart type: `+r)}function sr(e,t){e.children&&=e.children.filter(e=>t(e));for(let n of e.children??[])(n.children?.length??0)>0&&sr(n,t)}function cr(e,t,n){return`M${e},${t}
|
|
2
|
+
m0,${n}
|
|
3
|
+
a${n},${n} 0 1,1 0,${-n*2}
|
|
4
|
+
a${n},${n} 0 1,1 0,${n*2}`}function lr(e){let t=(0,Z.c)(23),{open:n,onClose:r,children:i,title:a,icon:o}=e,s=(0,Q.useRef)(null),c,l;t[0]===n?(c=t[1],l=t[2]):(c=()=>{let e=s.current;if(e)return n?(document.body.style.setProperty(`overflow`,`hidden`),e.open||e.showModal()):(document.body.style.setProperty(`overflow`,null),e.open&&e.close()),ur},l=[n],t[0]=n,t[1]=c,t[2]=l),(0,Q.useEffect)(c,l);let u=n?`visible`:`hidden`,d;t[3]===o?d=t[4]:(d=(0,$.jsx)(J,{path:o,size:`1.75em`}),t[3]=o,t[4]=d);let f;t[5]===a?f=t[6]:(f=(0,$.jsx)(`h2`,{className:`text-2xl font-semibold`,children:a}),t[5]=a,t[6]=f);let p;t[7]!==d||t[8]!==f?(p=(0,$.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[d,f]}),t[7]=d,t[8]=f,t[9]=p):p=t[9];let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(nt,{absolute:!1,className:`justify-self-end px-1`,onClick:()=>s.current?.close()}),t[10]=m):m=t[10];let h;t[11]===p?h=t[12]:(h=(0,$.jsxs)(`div`,{className:`flex justify-between gap-2`,children:[p,m]}),t[11]=p,t[12]=h);let g;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`span`,{className:`w-full border-b-3 border-gray-500 px-20`}),t[13]=g):g=t[13];let _;t[14]!==i||t[15]!==h?(_=(0,$.jsxs)(`div`,{className:`card flex min-h-0 max-w-(--breakpoint-2xl) gap-2 rounded-xl p-4 shadow-sm`,children:[h,g,i]}),t[14]=i,t[15]=h,t[16]=_):_=t[16];let v;t[17]!==r||t[18]!==_?(v=(0,$.jsx)(`dialog`,{ref:s,"aria-modal":!0,open:!1,closedby:`any`,className:`z-10 m-auto flex flex-col bg-transparent text-inherit backdrop:bg-gray-400/75 backdrop:backdrop-blur-xs dark:backdrop:bg-gray-800/75`,onClose:r,children:_}),t[17]=r,t[18]=_,t[19]=v):v=t[19];let y;return t[20]!==v||t[21]!==u?(y=(0,$.jsx)(Q.Activity,{mode:u,children:v}),t[20]=v,t[21]=u,t[22]=y):y=t[22],y}function ur(){document.body.style.setProperty(`overflow`,null)}function dr(e){let t=(0,Z.c)(7),{open:n,onClose:r}=e,{databaseInfo:i}=ut(),a;t[0]===n?a=t[1]:(a=n.toString(),t[0]=n,t[1]=a);let o;return t[2]!==i.hiddenFiles||t[3]!==r||t[4]!==n||t[5]!==a?(o=(0,$.jsx)(fr,{open:n,initialHiddenFiles:i.hiddenFiles,onClose:r},a),t[2]=i.hiddenFiles,t[3]=r,t[4]=n,t[5]=a,t[6]=o):o=t[6],o}function fr(e){let t=(0,Z.c)(37),{open:n,initialHiddenFiles:r,onClose:i}=e,a=(0,Q.useRef)(null),o=le(),[s,c]=(0,Q.useState)(r),l;t[0]===r?l=t[1]:(l=JSON.stringify(r),t[0]=r,t[1]=l);let u;t[2]===s?u=t[3]:(u=JSON.stringify(s),t[2]=s,t[3]=u);let d=l!==u,f,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>{a.current?.focus()},p=[],t[4]=f,t[5]=p):(f=t[4],p=t[5]),(0,Q.useEffect)(f,p);let m;t[6]!==d||t[7]!==s||t[8]!==i||t[9]!==o?(m=()=>{if(d){let e=new FormData;e.append(`replaceHiddenFiles`,`true`);for(let t of s)e.append(`hidePath`,t);o(e,{method:`post`})}i()},t[6]=d,t[7]=s,t[8]=i,t[9]=o,t[10]=m):m=t[10];let h;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`p`,{className:`text-sm`,children:`Pattern-matched files are hidden from the file tree and excluded from metric computations.`}),t[11]=h):h=t[11];let g;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsxs)(`p`,{className:`text-sm`,children:[`Hidden files behave like entries in a `,(0,$.jsx)(lt,{inline:!0,children:`.gitignore`}),` file.`]}),t[12]=g):g=t[12];let _;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`hide`);typeof t!=`string`||t.length===0||(c(e=>e.includes(t)?e:[t,...e]),e.currentTarget.reset(),a.current?.setCustomValidity(``))},t[13]=_):_=t[13];let v;t[14]===s?v=t[15]:(v=(0,$.jsxs)(`label`,{className:`label flex min-w-0 flex-1 flex-col gap-2`,children:[`Path or glob`,(0,$.jsx)(`input`,{ref:a,required:!0,type:`text`,className:`input`,name:`hide`,placeholder:`Enter pattern...`,onChange:e=>{let t=s.includes(e.target.value);e.target.setCustomValidity(t?`Pattern already exists`:``)}})]}),t[14]=s,t[15]=v);let y;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(`button`,{className:`btn btn--primary whitespace-nowrap`,children:`Hide`}),t[16]=y):y=t[16];let x;t[17]===v?x=t[18]:(x=(0,$.jsxs)(`form`,{method:`post`,className:`flex w-full flex-wrap items-end gap-2`,onSubmit:_,children:[v,y]}),t[17]=v,t[18]=x);let C;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(`h3`,{className:`text-tertiary-text dark:text-tertiary-text-dark text-sm font-bold tracking-wide uppercase`,children:`Hidden files/patterns`}),t[19]=C):C=t[19];let T=s.length===0,E;t[20]===T?E=t[21]:(E=R(`btn btn--danger btn--text`,{hidden:T}),t[20]=T,t[21]=E);let D;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>{c([])},t[22]=D):D=t[22];let O;t[23]===E?O=t[24]:(O=(0,$.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[C,(0,$.jsx)(`button`,{type:`button`,className:E,onClick:D,children:`Reset`})]}),t[23]=E,t[24]=O);let k;t[25]===s?k=t[26]:(k=s.length>0?s.map(e=>(0,$.jsxs)(`div`,{className:`secondary grid grid-cols-[1fr_auto] items-center gap-x-2 gap-y-0 rounded-md px-2 py-1 text-sm`,title:e,children:[(0,$.jsx)(`span`,{className:`truncate text-sm`,title:e,children:pr(e)}),(0,$.jsxs)(`button`,{className:`btn btn--text btn--hover-swap h-6`,title:`Unhide ${e}`,onClick:()=>{c(t=>t.filter(t=>t!==e))},children:[(0,$.jsx)(J,{path:S,className:`inline-block h-full`}),(0,$.jsx)(J,{path:w,className:`hover-swap inline-block h-full`})]})]},e)):(0,$.jsx)(`div`,{className:`text-secondary-text dark:text-secondary-text-dark text-sm opacity-70`,children:`No hidden files`}),t[25]=s,t[26]=k);let A;t[27]===k?A=t[28]:(A=(0,$.jsx)(`div`,{className:`flex max-h-96 min-h-0 w-full flex-col gap-2 overflow-y-auto`,children:k}),t[27]=k,t[28]=A);let j;t[29]!==x||t[30]!==O||t[31]!==A?(j=(0,$.jsxs)(`div`,{className:`flex min-h-0 max-w-[40ch] flex-col items-start justify-center gap-3 overflow-y-auto p-2 pl-0`,children:[h,g,x,O,A]}),t[29]=x,t[30]=O,t[31]=A,t[32]=j):j=t[32];let M;return t[33]!==n||t[34]!==j||t[35]!==m?(M=(0,$.jsx)(lr,{open:n,title:`Hide files`,icon:b,onClose:m,children:j}),t[33]=n,t[34]=j,t[35]=m,t[36]=M):M=t[36],M}function pr(e){if(!e.includes(xe(e)))return e;let t=e.split(xe(e));return t[t.length-1]}function mr(){let e=(0,Z.c)(10),t=o(),[n,r]=(0,Q.useState)(!1),i=t.state!==`idle`,a,s;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>r(!0),s=(0,$.jsx)(J,{path:b}),e[0]=a,e[1]=s):(a=e[0],s=e[1]);let c;e[2]===i?c=e[3]:(c=(0,$.jsx)(`button`,{className:`btn btn--icon btn--text`,title:`Hidden files`,"aria-label":`Hidden files`,disabled:i,onClick:a,children:s}),e[2]=i,e[3]=c);let l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>r(!1),e[4]=l):l=e[4];let u;e[5]===n?u=e[6]:(u=(0,$.jsx)(dr,{open:n,onClose:l}),e[5]=n,e[6]=u);let d;return e[7]!==c||e[8]!==u?(d=(0,$.jsxs)($.Fragment,{children:[c,u]}),e[7]=c,e[8]=u,e[9]=d):d=e[9],d}function hr(e,t){let n={};for(let r in e)n[r]=e[r][t];return n}var gr={FILE_TYPE:`FILE_SIZE`,FILE_SIZE:`FILE_SIZE`,TOP_CONTRIBUTOR:`MOST_CONTRIBUTIONS`,MOST_COMMITS:`MOST_COMMITS`,LAST_CHANGED:`LAST_CHANGED`,MOST_CONTRIBUTIONS:`MOST_CONTRIBUTIONS`,CONTRIBUTORS:`EQUAL_SIZE`};function _r(){let e=(0,Z.c)(29),{metricType:t,chartType:n,sizeMetric:r,linkMetricAndSizeMetric:i,setMetricType:a,setChartType:o,setSizeMetricType:s}=it(),c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=hr(We,`icon`),e[0]=c):c=e[0];let l=c,u;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(u=hr(We,`description`),e[1]=u):u=e[1];let d=u,f;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=hr($e,`icon`),e[2]=f):f=e[2];let p=f,m;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=hr({FILE_SIZE:Ie,MOST_COMMITS:Be,MOST_CONTRIBUTIONS:xt,EQUAL_SIZE:{icon:I},LAST_CHANGED:yt},`icon`),e[3]=m):m=e[3];let h=m,g;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`label`,{htmlFor:`layout`,className:`text-tertiary-text dark:text-tertiary-text-dark ml-8 text-xs font-bold whitespace-nowrap`,children:`Layout`}),e[4]=g):g=e[4];let _;e[5]===o?_=e[6]:(_=e=>o(e),e[5]=o,e[6]=_);let v;e[7]!==n||e[8]!==_?(v=(0,$.jsx)(It,{group:He,defaultValue:n,iconMap:p,ariaLabel:`Select layout`,onChange:_}),e[7]=n,e[8]=_,e[9]=v):v=e[9];let y;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(`h3`,{className:`text-tertiary-text dark:text-tertiary-text-dark ml-8 text-xs font-bold whitespace-nowrap`,title:`Select the metric used to size the visualization`,children:`Node Size`}),e[10]=y):y=e[10];let b;e[11]===s?b=e[12]:(b=e=>{s(e)},e[11]=s,e[12]=b);let x;e[13]!==r||e[14]!==b?(x=(0,$.jsx)(It,{titleMap:Ye,group:ht,defaultValue:r,iconMap:h,ariaLabel:`Select size metric`,onChange:b}),e[13]=r,e[14]=b,e[15]=x):x=e[15];let S;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(`h3`,{className:`text-tertiary-text dark:text-tertiary-text-dark ml-8 text-xs font-bold whitespace-nowrap`,title:`Select the metric used to color the visualization`,children:`Node Color`}),e[16]=S):S=e[16];let C;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=Object.fromEntries(Object.entries(We).map(vr)),e[17]=C):C=e[17];let w;e[18]!==i||e[19]!==a||e[20]!==s?(w=e=>{if(a(e),!i)return;let t=gr[e];t&&s(t)},e[18]=i,e[19]=a,e[20]=s,e[21]=w):w=e[21];let T;e[22]!==t||e[23]!==w?(T=(0,$.jsx)(It,{titleMap:d,group:C,defaultValue:t,iconMap:l,ariaLabel:`Select color metric`,onChange:w}),e[22]=t,e[23]=w,e[24]=T):T=e[24];let E;return e[25]!==T||e[26]!==v||e[27]!==x?(E=(0,$.jsxs)(`div`,{className:`grid grid-flow-col grid-cols-3 grid-rows-[auto_auto] items-start gap-0`,children:[g,v,y,x,S,T]}),e[25]=T,e[26]=v,e[27]=x,e[28]=E):E=e[28],E}function vr(e){let[t,n]=e;return[t,n.name]}var yr=2,br=70,xr=10,Sr=7,Cr=40;function wr(e){let t=new Date(e*1e3),n=new Date(t);n.setUTCDate(n.getUTCDate()+4-(n.getUTCDay()||7));let r=new Date(Date.UTC(n.getUTCFullYear(),0,1)),i=Math.ceil(((n.getTime()-r.getTime())/864e5+1)/7);return`Week ${i<10?`0`:``}${i}, ${n.getUTCFullYear()}`}function Tr(e,t){switch(t){case`week`:return wr(e);case`month`:return new Date(e*1e3).toLocaleString(`en-gb`,{month:`long`,year:`numeric`,timeZone:`UTC`});case`year`:return new Date(e*1e3).getUTCFullYear().toString();case`day`:return st(e*1e3,{weekday:`short`})}}function Er(e){let t=(0,Z.c)(37),{scale:n,intervals:r,className:i}=e,{databaseInfo:a}=ut(),o;t[0]===a.timerange[0]?o=t[1]:(o=Ot.start.withDefault(a.timerange[0]),t[0]=a.timerange[0],t[1]=o);let s;t[2]===a.timerange[1]?s=t[3]:(s=Ot.end.withDefault(a.timerange[1]),t[2]=a.timerange[1],t[3]=s);let c;t[4]!==o||t[5]!==s?(c={start:o,end:s,includeCoauthors:Ot.includeCoauthors},t[4]=o,t[5]=s,t[6]=c):c=t[6];let[l,u]=wt(c),{start:d,end:f,includeCoauthors:p}=l,{metricType:m}=it(),h;t[7]===m?h=t[8]:(h=tt(m),t[7]=m,t[8]=h);let g=h,_=Se(),v;t[9]===_?v=t[10]:(v=new Set(_),t[9]=_,t[10]=v);let y=v,[,b]=pt(),x=Ke(),S=se(),C=gt(x),w=gt(a.fileTree)??`#c0c0c0`,T=C?{fill:C}:{fill:he},E=(0,Q.useRef)(null),[D,O]=ve(),k=(0,Q.useDeferredValue)(O),A;t[11]===n?A=t[12]:(A=e=>({...e,countLogged:n===`log`?Math.log10(e.count+1):e.count}),t[11]=n,t[12]=A);let j=a.commitCountPerTimeInterval.map(A),M=k.width,N=x.path===a.repo,P=r.length>0?r:null,F=N?P??a.commitCountPerTimeInterval:r,I=a.commitCountPerTimeIntervalUnit,L=Zn().domain(j.map(Ar)).range([0,M]),ee=ct().domain([0,Ht(j,kr)||0]).range([br,0]),te=Math.max(1,L.bandwidth()-yr*2),z=Math.max(1,Math.ceil(Cr/2/L.step()))*2,ne=z/2,B;t[13]===u?B=t[14]:(B=function(e){u(t=>({...t,start:e[0],end:e[1]}))},t[13]=u,t[14]=B);let V=B,H;t[15]===I?H=t[16]:(H=e=>[e.timestamp.toString(),Ne(e.timestamp,I)],t[15]=I,t[16]=H);let U=Object.fromEntries(j.map(H)),re=new Map,W;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(W=function(e){return e instanceof SVGRectElement?e.dataset.id:void 0},t[17]=W):W=t[17];let G=W,K;t[18]===i?K=t[19]:(K=R(`flex flex-col justify-center`,i),t[18]=i,t[19]=K);let q;t[20]!==U||t[21]!==V?(q=e=>{let t=G(e.target);if(!t)return;let[n,r]=U[t];V([n+1,r-1])},t[20]=U,t[21]=V,t[22]=q):q=t[22];let J=e=>{let t=G(e.target),n=t?re.get(t):void 0;n&&(e.stopPropagation(),S(n))},ie;t[23]===S?ie=t[24]:(ie=()=>S(null),t[23]=S,t[24]=ie);let Y=j.map((e,t)=>{let r=t%z===0,i=t%ne===0,o=L(e.timestamp.toString())??0,s=o+yr,c=br-ee(e.countLogged),l=ee(e.countLogged),[u,m]=U[e.timestamp.toString()],h=m>d&&u<f,v=F.find(e=>e.timestamp>=u&&e.timestamp<m),S=Object.entries(v?.contributors??{}).sort(Or),C=v&&_.length>0&&g?S.filter(e=>{let[t]=e;return y.has(t)}):[],E=C.reduce(Dr,0),D=_.length>0&&g?E:v?.count??0,O=D>0,k=n===`log`?Math.log10(D+1):D,A=br-ee(k),j=ee(k),M=Tr(u,I),P=j+A,R=C.map(e=>{let[t,n]=e,r=n/D*A,i=P-r;return P=i,{author:t,y:i,height:r,fill:b.get(t)??`#c0c0c0`}}),B=v&&_.length===0?S.map(e=>{let[t]=e;return b.get(t)??`#c0c0c0`}):[],V=(_.length>0&&g?C:S).map(e=>{let[t,n]=e,r=v?.contributorRoleCounts[t];return{name:t,color:b.get(t)??`#c0c0c0`,commitCount:n,authoredCommitCount:r?.authoredCommitCount??n,coauthoredCommitCount:p?r?.coauthoredCommitCount??0:null}}),H={label:M,totalCommitCount:e.count,totalObjectName:a.repo,clickedObjectName:N?null:x.name,clickedCommitCount:v?.count??null,contributors:g?V:[]},W={id:e.timestamp.toString(),x:s,y:l,hitX:o,width:te,hitWidth:L.bandwidth(),height:c,clickedY:j,clickedHeight:A,date:e.date,tooltip:H,shouldDrawLabel:r,shouldDrawTick:i,isInRange:h,hasFileActivity:O,clickedObjectIsRepo:N,clickedFill:T.fill,stackedSlices:R,gradientColors:B,rootColor:w,interval:[u,m]};return re.set(W.id,W.tooltip),(0,$.jsx)(jr,{node:W},W.id)}),ae=`M0,71 L${M},71`,X;t[25]===ae?X=t[26]:(X=(0,$.jsx)(`path`,{d:ae,className:`stroke-gray-500`,strokeWidth:1}),t[25]=ae,t[26]=X);let oe;t[27]!==q||t[28]!==J||t[29]!==ie||t[30]!==Y||t[31]!==X?(oe=(0,$.jsxs)(`svg`,{ref:E,width:`100%`,height:100,className:`fill-transparent`,onClick:q,onMouseOver:J,onMouseOut:ie,children:[Y,X]}),t[27]=q,t[28]=J,t[29]=ie,t[30]=Y,t[31]=X,t[32]=oe):oe=t[32];let ce;return t[33]!==D||t[34]!==K||t[35]!==oe?(ce=(0,$.jsx)(`div`,{ref:D,className:K,children:oe}),t[33]=D,t[34]=K,t[35]=oe,t[36]=ce):ce=t[36],ce}function Dr(e,t){let[,n]=t;return e+n}function Or(e,t){return t[1]-e[1]}function kr(e){return e.countLogged}function Ar(e){return e.timestamp.toString()}function jr(e){let t=(0,Z.c)(66),{node:n}=e,{metricType:r}=it(),i;t[0]===r?i=t[1]:(i=tt(r),t[0]=r,t[1]=i);let a=i,{fill:o,linearGradient:s}=$n(Ge(Ke())),{fill:c,linearGradient:l}=$n(n.gradientColors),u=n.gradientColors.length>1,d;t[2]!==o||t[3]!==c||t[4]!==u||t[5]!==a||t[6]!==n.clickedFill||t[7]!==n.gradientColors[0]||t[8]!==n.gradientColors.length?(d=a?u?{fill:c}:n.gradientColors.length===1?{fill:n.gradientColors[0]}:n.clickedFill?{fill:n.clickedFill}:{}:{fill:o},t[2]=o,t[3]=c,t[4]=u,t[5]=a,t[6]=n.clickedFill,t[7]=n.gradientColors[0],t[8]=n.gradientColors.length,t[9]=d):d=t[9];let f=d,p=n.hasFileActivity&&n.stackedSlices.length===0,m=n.isInRange?``:`opacity-30`,h=u?l:null,g=a?null:s,_=n.hitX,v=n.hitWidth,y=n.id,b;t[10]===n.tooltip?b=t[11]:(b=we(n.tooltip),t[10]=n.tooltip,t[11]=b);let x;t[12]!==n.hitWidth||t[13]!==n.hitX||t[14]!==n.id||t[15]!==b?(x=(0,$.jsx)(`rect`,{x:_,y:0,width:v,height:100,rx:4,ry:4,className:`peer cursor-pointer fill-transparent stroke-transparent stroke-1`,"data-id":y,"aria-label":b}),t[12]=n.hitWidth,t[13]=n.hitX,t[14]=n.id,t[15]=b,t[16]=x):x=t[16];let S=n.x,C=n.y,w=n.width,T=n.height,E=n.rootColor,D=!n.clickedObjectIsRepo||!p?`opacity-40`:``,O;t[17]===D?O=t[18]:(O=R(`pointer-events-none stroke-transparent stroke-2 opacity-100 transition-[height,width,x,y,fill,opacity] duration-300 ease-out peer-hover:stroke-black`,D),t[17]=D,t[18]=O);let k;t[19]!==n.height||t[20]!==n.rootColor||t[21]!==n.width||t[22]!==n.x||t[23]!==n.y||t[24]!==O?(k=(0,$.jsx)(`rect`,{x:S,y:C,width:w,height:T,rx:4,ry:4,fill:E,className:O}),t[19]=n.height,t[20]=n.rootColor,t[21]=n.width,t[22]=n.x,t[23]=n.y,t[24]=O,t[25]=k):k=t[25];let A;t[26]!==f||t[27]!==n.clickedHeight||t[28]!==n.clickedY||t[29]!==n.isInRange||t[30]!==n.width||t[31]!==n.x||t[32]!==p?(A=p?(0,$.jsx)(`rect`,{x:n.x,y:n.clickedY,width:n.width,height:n.clickedHeight,rx:4,ry:4,className:R(`pointer-events-none opacity-100 transition-[height,width,x,y,fill,opacity] duration-300 ease-out`,n.isInRange?`fill-blue-primary`:`fill-blue-primary/50`,{"opacity-0":n.x===0}),style:f}):null,t[26]=f,t[27]=n.clickedHeight,t[28]=n.clickedY,t[29]=n.isInRange,t[30]=n.width,t[31]=n.x,t[32]=p,t[33]=A):A=t[33];let j;if(t[34]!==n.isInRange||t[35]!==n.stackedSlices||t[36]!==n.width||t[37]!==n.x){let e;t[39]!==n.isInRange||t[40]!==n.stackedSlices.length||t[41]!==n.width||t[42]!==n.x?(e=(e,t)=>{let r=t===0,i=t===n.stackedSlices.length-1;return(0,$.jsx)(`rect`,{x:n.x,y:e.y,width:n.width,height:e.height,rx:i||r?4:0,ry:i||r?4:0,className:R(`pointer-events-none opacity-100 transition-[height,width,x,y,fill,opacity] duration-300 ease-out`,{"opacity-50":!n.isInRange}),style:{fill:e.fill}},e.author)},t[39]=n.isInRange,t[40]=n.stackedSlices.length,t[41]=n.width,t[42]=n.x,t[43]=e):e=t[43],j=n.stackedSlices.map(e),t[34]=n.isInRange,t[35]=n.stackedSlices,t[36]=n.width,t[37]=n.x,t[38]=j}else j=t[38];let M;t[44]!==n.isInRange||t[45]!==n.shouldDrawLabel||t[46]!==n.shouldDrawTick||t[47]!==n.width||t[48]!==n.x?(M=n.shouldDrawTick?(0,$.jsx)(`path`,{d:`M${n.x+n.width/2},71 L${n.x+n.width/2},${br+(n.shouldDrawLabel?xr:Sr)-2}`,className:R(`peer-hover:stroke-blue-primary pointer-events-none`,n.isInRange?`stroke-gray-500`:`stroke-gray-500/30`),strokeWidth:1}):null,t[44]=n.isInRange,t[45]=n.shouldDrawLabel,t[46]=n.shouldDrawTick,t[47]=n.width,t[48]=n.x,t[49]=M):M=t[49];let N;t[50]!==n.date||t[51]!==n.isInRange||t[52]!==n.shouldDrawLabel||t[53]!==n.width||t[54]!==n.x?(N=n.shouldDrawLabel?(0,$.jsx)(`text`,{textAnchor:`middle`,dominantBaseline:`central`,x:n.x+n.width/2,y:90,className:R(`peer-hover:fill-blue-primary pointer-events-none text-xs transition-[x]`,n.isInRange?`fill-primary-text dark:fill-primary-text-dark`:`fill-tertiary-text dark:fill-tertiary-text-dark`),children:n.date}):null,t[50]=n.date,t[51]=n.isInRange,t[52]=n.shouldDrawLabel,t[53]=n.width,t[54]=n.x,t[55]=N):N=t[55];let P;return t[56]!==x||t[57]!==k||t[58]!==A||t[59]!==j||t[60]!==M||t[61]!==N||t[62]!==m||t[63]!==h||t[64]!==g?(P=(0,$.jsxs)(`g`,{className:m,children:[h,g,x,k,A,j,M,N]}),t[56]=x,t[57]=k,t[58]=A,t[59]=j,t[60]=M,t[61]=N,t[62]=m,t[63]=h,t[64]=g,t[65]=P):P=t[65],P}var Mr=[{label:`1d`,durationSecs:1440*60,title:`Last 24 hours`,visibleForUnits:[`day`]},{label:`7d`,durationSecs:10080*60,title:`Last 7 days`,visibleForUnits:[`day`,`week`]},{label:`1m`,durationSecs:720*60*60,durationMonths:1,title:`Last 1 month`,visibleForUnits:[`day`,`week`,`month`]},{label:`3m`,durationSecs:2160*60*60,durationMonths:3,title:`Last 3 months`,visibleForUnits:[`day`,`week`,`month`]},{label:`6m`,durationSecs:4320*60*60,durationMonths:6,title:`Last 6 months`,visibleForUnits:[`day`,`week`,`month`]},{label:`YTD`,durationSecs:null,visibleForUnits:[`day`,`week`,`month`],title:`Year to last change date`},{label:`1yr`,durationSecs:1*365*24*60*60,durationMonths:12,title:`Last 1 year`,visibleForUnits:[`day`,`week`,`month`]},{label:`All`,durationSecs:1/0,title:`Entire project history`,visibleForUnits:[`day`,`week`,`month`,`year`]}];function Nr(e){let t=(0,Z.c)(27),{unit:n}=e,{timerange:r}=ut().databaseInfo,i;t[0]===r[0]?i=t[1]:(i=Ot.start.withDefault(r[0]),t[0]=r[0],t[1]=i);let a;t[2]===r[1]?a=t[3]:(a=Ot.end.withDefault(r[1]),t[2]=r[1],t[3]=a);let o;t[4]!==i||t[5]!==a?(o={...Ot,start:i,end:a},t[4]=i,t[5]=a,t[6]=o):o=t[6];let s;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(s={clearOnDefault:!1},t[7]=s):s=t[7];let[c,l]=wt(o,s),[,u]=(0,Q.useTransition)(),d;t[8]!==c.end||t[9]!==c.start?(d=[c.start,c.end],t[8]=c.end,t[9]=c.start,t[10]=d):d=t[10];let[f,p]=(0,Q.useOptimistic)(d,Pr),m=r[1]-r[0],h;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=function(e,t){let n=new Date(e*1e3);return n.setUTCDate(1),n.setUTCHours(0,0,0,0),n.setUTCMonth(n.getUTCMonth()-t+1),Math.floor(n.getTime()/1e3)},t[11]=h):h=t[11];let g=h,_;t[12]!==r[0]||t[13]!==r[1]||t[14]!==n?(_=function(e){let{duration:t,durationMonths:i}=e,a=r[1];return[n===`month`&&i?g(a,i):t===1/0?r[0]:a-Math.floor(t),a]},t[12]=r[0],t[13]=r[1],t[14]=n,t[15]=_):_=t[15];let v=_,y;t[16]!==v||t[17]!==f||t[18]!==m||t[19]!==p||t[20]!==l||t[21]!==u||t[22]!==r[1]||t[23]!==n?(y=Mr.map(e=>{if(!e.visibleForUnits.includes(n))return null;let t=new Date(r[1]*1e3);t.setMonth(0,1);let i=e.durationSecs??r[1]-t.getTime()/1e3,a=v({duration:i,durationMonths:e.durationMonths}),o=e.durationSecs===1/0&&f[1]-f[0]>=m||f[0]===a[0]&&f[1]===a[1];return i<=m||i===1/0?(0,$.jsx)(`button`,{className:R(`cursor-pointer rounded-full p-1 text-sm transition-opacity hover:opacity-80`,o?`bg-secondary-bg dark:bg-secondary-bg-dark text-primary-text dark:text-primary-text-dark`:`text-tertiary-text dark:text-tertiary-text-dark`),title:e.title,onClick:()=>{u(async()=>{p(a),await l(e=>({...e,start:a[0],end:a[1]}))})},children:e.label},e.label):null}),t[16]=v,t[17]=f,t[18]=m,t[19]=p,t[20]=l,t[21]=u,t[22]=r[1],t[23]=n,t[24]=y):y=t[24];let b;return t[25]===y?b=t[26]:(b=(0,$.jsx)(`div`,{className:`bg-primary-bg dark:bg-primary-bg-dark flex justify-end gap-0.5 rounded-full p-1`,children:y}),t[25]=y,t[26]=b),b}function Pr(e,t){return t}function Fr(){let e=(0,Z.c)(8),t=ut(),n;e[0]===t.databaseInfo.commitCountPerTimeIntervalUnit?n=e[1]:(n=Ot.timeUnit.withDefault(t.databaseInfo.commitCountPerTimeIntervalUnit),e[0]=t.databaseInfo.commitCountPerTimeIntervalUnit,e[1]=n);let[r,i]=Tt(`timeUnit`,n),a;e[2]===i?a=e[3]:(a=e=>i(e.target.value),e[2]=i,e[3]=a);let o;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=Et.map(Ir),e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==r?(s=(0,$.jsx)(`select`,{className:`uppercase`,name:`timeUnit`,value:r,onChange:a,children:o}),e[5]=a,e[6]=r,e[7]=s):s=e[7],s}function Ir(e){return(0,$.jsxs)(`option`,{value:e,children:[`Per `,e]},e)}function Lr(e){let t=(0,Z.c)(15),{dropdownButtons:n}=e,r=Ke(),i=ut(),a=dt(r)?`Commits that changed this folder`:`Commits that changed this file`,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(`div`,{className:`truncate`,children:`Commit activity`}),t[0]=o):o=t[0];let s;t[1]===a?s=t[2]:(s=(0,$.jsx)(`h2`,{className:`flex min-w-0 items-center gap-2`,title:a,children:o}),t[1]=a,t[2]=s);let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(Mt,{}),t[3]=c):c=t[3];let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(Fr,{}),t[4]=l):l=t[4];let u;t[5]===i.databaseInfo.commitCountPerTimeIntervalUnit?u=t[6]:(u=(0,$.jsx)(Nr,{unit:i.databaseInfo.commitCountPerTimeIntervalUnit}),t[5]=i.databaseInfo.commitCountPerTimeIntervalUnit,t[6]=u);let d;t[7]===n?d=t[8]:(d=(0,$.jsx)(Rr,{metricMenuItems:n}),t[7]=n,t[8]=d);let f;t[9]!==u||t[10]!==d?(f=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-end gap-2`,children:[l,u,d]}),t[9]=u,t[10]=d,t[11]=f):f=t[11];let p;return t[12]!==s||t[13]!==f?(p=(0,$.jsxs)(`div`,{className:`card__title grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-4`,children:[s,c,f]}),t[12]=s,t[13]=f,t[14]=p):p=t[14],p}function Rr(e){let t=(0,Z.c)(16),{metricMenuItems:n}=e,r=n.length===0,i=n.length===0,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(J,{path:v,size:1}),t[0]=a):a=t[0];let o;t[1]===i?o=t[2]:(o=(0,$.jsx)(`button`,{disabled:i,"aria-label":`Panel options`,title:`Panel options`,className:`btn btn--text btn--icon flex items-center`,children:a}),t[1]=i,t[2]=o);let s;t[3]!==r||t[4]!==o?(s=(0,$.jsx)(Te,{asChild:!0,disabled:r,children:o}),t[3]=r,t[4]=o,t[5]=s):s=t[5];let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(vt,{className:`fill-border dark:fill-border-dark`}),t[6]=c):c=t[6];let l;if(t[7]!==n){let e;t[9]===n.length?e=t[10]:(e=(e,t)=>(0,$.jsxs)(Ve,{className:R(`btn -mt-0.5 flex cursor-pointer flex-row items-center justify-start rounded-none px-2 py-1 text-sm hover:bg-gray-200 dark:hover:bg-gray-700`,{"rounded-t-lg":t===0,"rounded-b-lg":t===n.length-1}),onSelect:e.onClick,children:[(0,$.jsx)(J,{path:e.icon,size:`1em`}),e.label]},t),t[9]=n.length,t[10]=e),l=n.map(e),t[7]=n,t[8]=l}else l=t[8];let u;t[11]===l?u=t[12]:(u=(0,$.jsxs)(St,{align:`end`,alignOffset:5,className:`bg-primary-bg dark:bg-primary-bg-dark z-1 -mt-0.5 normal-case`,children:[c,l]}),t[11]=l,t[12]=u);let d;return t[13]!==s||t[14]!==u?(d=(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(bt,{children:[s,u]})}),t[13]=s,t[14]=u,t[15]=d):d=t[15],d}function zr(e,t,n,r){if(t.length===0)return 0;for(let i=0;i<t.length;i++){let[,a]=Ne(t[i].timestamp,n);if(r===`end`){if(e<=a)return i+1}else if(e<a)return i}return t.length}function Br({startIndex:e,endIndex:t,intervals:n,unit:r,minSecs:i,maxSecs:a}){if(n.length===0)return[i,a];let o=Math.max(0,Math.min(e,n.length-1)),s=Math.max(0,Math.min(t-1,n.length-1)),[c]=Ne(n[o].timestamp,r),[,l]=Ne(n[s].timestamp,r);return[Math.max(i,c),Math.min(a,l)]}function Vr(e){let t=(0,Z.c)(70),{className:n}=e,[i,a]=Tt(`includeCoauthors`,Ot.includeCoauthors),[s,c]=(0,Q.useState)(`log`),{databaseInfo:u}=ut(),{timerange:d}=u,[f,p]=d,m;t[0]===f?m=t[1]:(m=Ot.start.withDefault(f),t[0]=f,t[1]=m);let h;t[2]===p?h=t[3]:(h=Ot.end.withDefault(p),t[2]=p,t[3]=h);let g;t[4]!==m||t[5]!==h?(g={start:m,end:h},t[4]=m,t[5]=h,t[6]=g):g=t[6];let[_]=wt(g),{start:v,end:y}=_,b=u.commitCountPerTimeIntervalUnit,x=o().state!==`idle`,{data:S,load:C}=r(),w=Xe(),T;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(T={start:Ot.start,end:Ot.end,objectPath:Ot.objectPath,path:Ot.path,branch:Ot.branch},t[7]=T):T=t[7];let[E]=wt(T),{path:O,branch:k,start:A,end:j}=E,M,N;t[8]!==k||t[9]!==w||t[10]!==j||t[11]!==i||t[12]!==C||t[13]!==O||t[14]!==p||t[15]!==f||t[16]!==A||t[17]!==b?(M=()=>{C(l(`/api/commit-intervals`)+Dt({objectPath:w,path:O,branch:k,start:A??f,end:j??p,timeUnit:b,includeCoauthors:i}))},N=[k,w,j,i,C,O,p,f,A,b],t[8]=k,t[9]=w,t[10]=j,t[11]=i,t[12]=C,t[13]=O,t[14]=p,t[15]=f,t[16]=A,t[17]=b,t[18]=M,t[19]=N):(M=t[18],N=t[19]),(0,Q.useEffect)(M,N);let P=u.commitCountPerTimeInterval,F=P.length,I;t[20]!==v||t[21]!==P||t[22]!==b?(I=zr(v,P,b,`start`),t[20]=v,t[21]=P,t[22]=b,t[23]=I):I=t[23];let L=I,ee;t[24]!==y||t[25]!==P||t[26]!==b?(ee=zr(y,P,b,`end`),t[24]=y,t[25]=P,t[26]=b,t[27]=ee):ee=t[27];let te=ee,z;t[28]===n?z=t[29]:(z=R(`card group/card flex flex-col px-4 text-center select-none`,n),t[28]=n,t[29]=z);let B=s===`log`?D:ie,V;t[30]===B?V=t[31]:(V=(0,$.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[`Use log scale`,(0,$.jsx)(J,{path:B})]}),t[30]=B,t[31]=V);let H;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(H=()=>c(Ur),t[32]=H):H=t[32];let U;t[33]===V?U=t[34]:(U={icon:W,label:V,onClick:H},t[33]=V,t[34]=U);let re=i?D:ie,G;t[35]===re?G=t[36]:(G=(0,$.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[`Include co-authors `,(0,$.jsx)(J,{path:re})]}),t[35]=re,t[36]=G);let K;t[37]===a?K=t[38]:(K=()=>a(Hr),t[37]=a,t[38]=K);let q;t[39]!==G||t[40]!==K?(q={icon:ne,label:G,onClick:K},t[39]=G,t[40]=K,t[41]=q):q=t[41];let Y;t[42]!==U||t[43]!==q?(Y=(0,$.jsx)(Lr,{dropdownButtons:[U,q]}),t[42]=U,t[43]=q,t[44]=Y):Y=t[44];let ae;t[45]===S?.commitCountPerTimeIntervalForClickedObject?ae=t[46]:(ae=S?.commitCountPerTimeIntervalForClickedObject??[],t[45]=S?.commitCountPerTimeIntervalForClickedObject,t[46]=ae);let X;t[47]!==s||t[48]!==ae?(X=(0,$.jsx)(Er,{scale:s,className:`grid-full`,intervals:ae}),t[47]=s,t[48]=ae,t[49]=X):X=t[49];let oe;t[50]!==y||t[51]!==v?(oe=[v,y],t[50]=y,t[51]=v,t[52]=oe):oe=t[52];let se=oe.join(`-`),ce=f*1e3,le=p*1e3,ue;t[53]!==x||t[54]!==F||t[55]!==te||t[56]!==L||t[57]!==se||t[58]!==ce||t[59]!==le||t[60]!==P||t[61]!==b?(ue=(0,$.jsx)(Wr,{startUnits:L,endUnits:te,minMs:ce,maxMs:le,unit:b,domainInUnits:F,disabled:x,intervals:P},se),t[53]=x,t[54]=F,t[55]=te,t[56]=L,t[57]=se,t[58]=ce,t[59]=le,t[60]=P,t[61]=b,t[62]=ue):ue=t[62];let de;t[63]!==X||t[64]!==ue?(de=(0,$.jsxs)(`div`,{className:`group grid`,children:[X,ue]}),t[63]=X,t[64]=ue,t[65]=de):de=t[65];let fe;return t[66]!==z||t[67]!==Y||t[68]!==de?(fe=(0,$.jsxs)(`div`,{className:z,children:[Y,de]}),t[66]=z,t[67]=Y,t[68]=de,t[69]=fe):fe=t[69],fe}function Hr(e){return!e}function Ur(e){return e===`log`?`linear`:`log`}function Wr(e){let t=(0,Z.c)(24),{startUnits:n,endUnits:r,minMs:i,maxMs:a,domainInUnits:o,unit:s,disabled:c,intervals:l}=e,[u,d]=(0,Q.useTransition)(),f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f={start:Ot.start.withOptions({limitUrlUpdates:{method:`throttle`,timeMs:1e3}}),end:Ot.end.withOptions({limitUrlUpdates:{method:`throttle`,timeMs:1e3}})},t[0]=f):f=t[0];let[,p]=wt(f),m;t[1]!==l||t[2]!==a||t[3]!==i||t[4]!==p||t[5]!==s?(m=e=>{e[0]===0&&e[1]===0||d(async()=>{let[t,n]=Br({startIndex:e[0],endIndex:e[1],intervals:l,unit:s,minSecs:i/1e3,maxSecs:a/1e3});await p({start:t,end:n})})},t[1]=l,t[2]=a,t[3]=i,t[4]=p,t[5]=s,t[6]=m):m=t[6];let h=m,g;t[7]===o?g=t[8]:(g=[0,o],t[7]=o,t[8]=g);let _;t[9]!==r||t[10]!==n?(_=[n,r],t[9]=r,t[10]=n,t[11]=_):_=t[11];let y;t[12]!==c||t[13]!==o?(y=(0,$.jsx)(Ct,{children:e=>{let{handles:t,getHandleProps:n}=e;return(0,$.jsx)(Q.Fragment,{children:t.map(e=>(0,$.jsx)(Q.Fragment,{children:(0,$.jsx)(`button`,{className:R(`pointer-events-auto absolute bottom-0 z-10 flex h-6 -translate-x-1/2 place-content-center opacity-0 transition-opacity group-hover/card:opacity-100 disabled:grayscale`,{"size-5 rounded-full":!1},c?`cursor-progress`:`cursor-col-resize`),role:`slider`,"aria-disabled":c,"aria-valuemin":0,"aria-valuemax":o,"aria-valuenow":e.value,title:`Drag to adjust interval`,style:{left:`${e.percent}%`},...n(e.id),children:(0,$.jsx)(`div`,{className:R(`bg-blue-primary text-primary-text-dark flex h-full w-min items-center rounded-full`),children:(0,$.jsx)(J,{path:v,size:.5})})},e.id)},e.id))})}}),t[12]=c,t[13]=o,t[14]=y):y=t[14];let b;t[15]===u?b=t[16]:(b=(0,$.jsx)(ue,{left:!1,right:!1,children:e=>{let{tracks:t,getTrackProps:n}=e;return(0,$.jsx)(`div`,{children:t.map(e=>{let{id:t,source:r,target:i}=e;return(0,$.jsx)(`div`,{className:R(`bg-blue-primary/20 pointer-events-none absolute right-0 bottom-0 left-0 h-5 cursor-pointer rounded transition-[backdrop-filter]`,{"backdrop-blur-2xl":u}),style:{left:`${r.percent}%`,width:`${i.percent-r.percent}%`},...n()},t)})})}}),t[15]=u,t[16]=b);let x;return t[17]!==c||t[18]!==h||t[19]!==g||t[20]!==_||t[21]!==y||t[22]!==b?(x=(0,$.jsxs)(Ae,{className:`grid-full pointer-events-none relative`,mode:3,step:1,domain:g,values:_,disabled:c,onChange:h,children:[y,b]}),t[17]=c,t[18]=h,t[19]=g,t[20]=_,t[21]=y,t[22]=b,t[23]=x):x=t[23],x}function Gr(){let e=(0,Z.c)(13),t=o(),n;e[0]===t.formData?n=e[1]:(n=t.formData?.get(`refresh`),e[0]=t.formData,e[1]=n);let r=n===`true`,i=ke(),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(`input`,{type:`hidden`,name:`refresh`,value:`true`}),e[2]=a):a=e[2];let s;e[3]===r?s=e[4]:(s=R({"animate-spin":r}),e[3]=r,e[4]=s);let c;e[5]===s?c=e[6]:(c=(0,$.jsx)(J,{path:K,size:`1.25em`,className:s}),e[5]=s,e[6]=c);let l;e[7]!==r||e[8]!==c?(l=(0,$.jsx)(`button`,{className:`btn btn--icon btn--text`,disabled:r,title:`Refresh analysis`,"aria-label":`Refresh analysis`,children:c}),e[7]=r,e[8]=c,e[9]=l):l=e[9];let u;return e[10]!==l||e[11]!==i?(u=(0,$.jsxs)(d,{method:`post`,action:i,className:`contents`,children:[a,l]}),e[10]=l,e[11]=i,e[12]=u):u=e[12],u}function Kr(){let e=(0,Z.c)(10),{isFullscreen:t,toggleFullscreen:n}=be(qr),r;e[0]===t?r=e[1]:(r=R(`btn btn--icon btn--text`,{"btn--primary":t}),e[0]=t,e[1]=r);let i=t?`Exit fullscreen`:`Enter fullscreen`,a=t?`Exit fullscreen`:`Enter fullscreen`,o=t?B:y,s;e[2]===o?s=e[3]:(s=(0,$.jsx)(J,{path:o,size:1}),e[2]=o,e[3]=s);let c;return e[4]!==r||e[5]!==i||e[6]!==a||e[7]!==s||e[8]!==n?(c=(0,$.jsx)(`button`,{className:r,title:i,"aria-label":a,onClick:n,children:s}),e[4]=r,e[5]=i,e[6]=a,e[7]=s,e[8]=n,e[9]=c):c=e[9],c}function qr(){return document.documentElement}function Jr(e){let t=(0,Z.c)(57),{open:n,onClose:r}=e,{metricType:i,hierarchyType:a,transitionsEnabled:o,showFilesWithoutChanges:s,linkMetricAndSizeMetric:c,showOnlySearchMatches:l,setLinkMetricAndSizeMetric:u,setTransitionsEnabled:d,labelsVisible:f,setLabelsVisible:p,setHierarchyType:m,setSizeMetricType:h,setShowFilesWithoutChanges:g,setShowOnlySearchMatches:v}=it(),y=!!c,b;t[0]!==i||t[1]!==u||t[2]!==h?(b=e=>{u(e.target.checked),e.target.checked&&h(gr[i])},t[0]=i,t[1]=u,t[2]=h,t[3]=b):b=t[3];let x,S;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(J,{className:`ml-1.5`,path:T,size:`1.25em`}),S=(0,$.jsx)(`span`,{className:`flex-1`,children:`Link size and color option`}),t[4]=x,t[5]=S):(x=t[4],S=t[5]);let w;t[6]!==y||t[7]!==b?(w=(0,$.jsxs)(Y,{className:`group w-full text-sm hover:text-blue-500 hover:opacity-100`,checked:y,title:`Enable to sync size metric with color metric`,onChange:b,children:[x,S]}),t[6]=y,t[7]=b,t[8]=w):w=t[8];let E;t[9]===d?E=t[10]:(E=e=>d(e.target.checked),t[9]=d,t[10]=E);let D,O;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(J,{className:`ml-1.5`,path:M,size:`1.25em`}),O=(0,$.jsx)(`span`,{className:`flex-1`,children:`Transitions`}),t[11]=D,t[12]=O):(D=t[11],O=t[12]);let j;t[13]!==E||t[14]!==o?(j=(0,$.jsxs)(Y,{className:`group w-full text-sm hover:text-blue-500 hover:opacity-100`,checked:o,title:`Disable to improve performance when zooming`,onChange:E,children:[D,O]}),t[13]=E,t[14]=o,t[15]=j):j=t[15];let N;t[16]===p?N=t[17]:(N=e=>p(e.target.checked),t[16]=p,t[17]=N);let P,F;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(J,{className:`ml-1.5`,path:A,size:`1.25em`}),F=(0,$.jsx)(`span`,{className:`flex-1`,children:`Labels`}),t[18]=P,t[19]=F):(P=t[18],F=t[19]);let I;t[20]!==f||t[21]!==N?(I=(0,$.jsxs)(Y,{className:`group w-full text-sm hover:text-blue-500 hover:opacity-100`,checked:f,title:`Disable to improve performance`,onChange:N,children:[P,F]}),t[20]=f,t[21]=N,t[22]=I):I=t[22];let L;t[23]===g?L=t[24]:(L=e=>g(e.target.checked),t[23]=g,t[24]=L);let te,R;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,$.jsx)(J,{className:`ml-1.5`,path:C,size:`1.25em`}),R=(0,$.jsx)(`span`,{className:`flex-1`,children:`Show files with no activity`}),t[25]=te,t[26]=R):(te=t[25],R=t[26]);let z;t[27]!==s||t[28]!==L?(z=(0,$.jsxs)(Y,{className:`group w-full text-sm hover:text-blue-500 hover:opacity-100`,checked:s,title:`Show files that have had no changes in the selected time range`,onChange:L,children:[te,R]}),t[27]=s,t[28]=L,t[29]=z):z=t[29];let ne=a===`FLAT`,B;t[30]!==a||t[31]!==m?(B=()=>{m(a===`FLAT`?`NESTED`:`FLAT`)},t[30]=a,t[31]=m,t[32]=B):B=t[32];let V,H;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(J,{className:`ml-1.5`,path:k,size:`1.25em`}),H=(0,$.jsx)(`span`,{className:`flex-1`,children:`Flatten file tree`}),t[33]=V,t[34]=H):(V=t[33],H=t[34]);let U;t[35]!==ne||t[36]!==B?(U=(0,$.jsxs)(Y,{className:`group w-full text-sm hover:text-blue-500 hover:opacity-100`,checked:ne,title:`Show all files on the same level, instead of as a file tree`,onChange:B,children:[V,H]}),t[35]=ne,t[36]=B,t[37]=U):U=t[37];let W;t[38]===v?W=t[39]:(W=e=>v(e.target.checked),t[38]=v,t[39]=W);let G;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,$.jsx)(J,{className:`ml-1.5`,path:_,size:`1.25em`}),t[40]=G):G=t[40];let K;t[41]!==l||t[42]!==W?(K=(0,$.jsxs)(Y,{className:`group w-full text-sm hover:text-blue-500 hover:opacity-100`,checked:l,title:`When searching, hide files that do not match the search query`,onChange:W,children:[G,`Show only search matches`]}),t[41]=l,t[42]=W,t[43]=K):K=t[43];let q,ie;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,$.jsx)(Yr,{}),ie=(0,$.jsx)(re,{}),t[44]=q,t[45]=ie):(q=t[44],ie=t[45]);let ae;t[46]!==I||t[47]!==z||t[48]!==U||t[49]!==K||t[50]!==w||t[51]!==j?(ae=(0,$.jsxs)(`div`,{className:`flex min-h-0 max-w-max flex-col items-start gap-3 overflow-y-auto p-2 pl-0`,children:[w,j,I,z,U,K,q,ie]}),t[46]=I,t[47]=z,t[48]=U,t[49]=K,t[50]=w,t[51]=j,t[52]=ae):ae=t[52];let X;return t[53]!==r||t[54]!==n||t[55]!==ae?(X=(0,$.jsx)(lr,{open:n,title:`Settings`,icon:ee,onClose:r,children:ae}),t[53]=r,t[54]=n,t[55]=ae,t[56]=X):X=t[56],X}function Yr(){let e=(0,Z.c)(7),{renderCutOff:t,setRenderCutOff:n}=it(),[r,i]=(0,Q.useState)(t),[,a]=(0,Q.useTransition)(),o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsxs)(`span`,{className:`group flex grow items-center gap-2`,children:[(0,$.jsx)(J,{className:`ml-1.5`,path:x,size:`1.25em`}),`Pixel render cut-off`]}),e[0]=o):o=e[0];let s;e[1]!==n||e[2]!==a?(s=e=>{let t=Number.isNaN(e.target.valueAsNumber)?Re().renderCutOff:e.target.valueAsNumber;i(t),a(()=>n(t))},e[1]=n,e[2]=a,e[3]=s):s=e[3];let c;return e[4]!==s||e[5]!==r?(c=(0,$.jsxs)(`label`,{className:`label group flex w-full items-center justify-start gap-2 text-sm hover:text-blue-500 hover:opacity-100`,title:`Increase to improve render performance, decrease it to get higher level of detail`,children:[o,(0,$.jsx)(`input`,{type:`number`,min:0,value:r,className:`mr-1 w-12 place-self-end border-b-2`,onChange:s})]}),e[4]=s,e[5]=r,e[6]=c):c=e[6],c}function Xr(){let e=(0,Z.c)(4),[t,n]=(0,Q.useState)(!1),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`button`,{className:`btn btn--icon btn--text`,title:`Settings`,"aria-label":`Settings`,onClick:()=>n(!0),children:(0,$.jsx)(J,{path:ee})}),e[0]=r):r=e[0];let i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>n(!1),e[1]=i):i=e[1];let a;return e[2]===t?a=e[3]:(a=(0,$.jsxs)($.Fragment,{children:[r,(0,$.jsx)(Jr,{open:t,onClose:i})]}),e[2]=t,e[3]=a),a}function Zr(e){let t=e.trim(),n=t.length===0?[]:t.split(/\s+/),r=Math.max(n.length-2,0);return{startsWithCapital:+!!/^\p{Lu}/u.test(t),middleNames:r,words:n.length,length:t.length,name:t}}function Qr(e,t){return e.startsWithCapital===t.startsWithCapital?e.middleNames===t.middleNames?e.words===t.words?e.length===t.length?e.name.toLowerCase().localeCompare(t.name.toLowerCase()):t.length-e.length:t.words-e.words:t.middleNames-e.middleNames:t.startsWithCapital-e.startsWithCapital}function $r(e){return e.length===0?`Group`:e.map(e=>Zr(e.name)).filter(e=>e.name.length>0).sort(Qr)[0]?.name??`Group`}var ei=e=>e.match(/^(\d+)-[^@]+@users\.noreply\.github\.com$/i)?.[1]??null;function ti(e){if(e.length<2)return[];let t=Array.from({length:e.length},(e,t)=>t),n=Array(e.length).fill(0),r=e=>(t[e]!==e&&(t[e]=r(t[e])),t[e]),i=(e,i)=>{let a=r(e),o=r(i);a!==o&&(n[a]<n[o]?t[a]=o:n[a]>n[o]?t[o]=a:(t[o]=a,n[a]++))},a=new Map,o=new Map,s=new Map;for(let[t,{name:n,email:r}]of e.entries())if(n&&(a.has(n)?i(t,a.get(n)):a.set(n,t)),r){o.has(r)?i(t,o.get(r)):o.set(r,t);let e=ei(r);e&&(s.has(e)?i(t,s.get(e)):s.set(e,t))}let c=new Map;for(let[t,n]of e.entries()){let e=r(t),i=c.get(e)??[];i.push(n),c.set(e,i)}return Array.from(c.values()).filter(e=>e.length>1).map(e=>({displayName:$r(e),members:e})).toSorted((e,t)=>e.displayName.localeCompare(t.displayName))}function ni(e){let t=(0,Z.c)(9),{open:n,onClose:r}=e,{databaseInfo:i}=ut(),[,a]=pt(),{contributorGroups:o,contributors:s}=i,c;t[0]===n?c=t[1]:(c=n.toString(),t[0]=n,t[1]=c);let l;return t[2]!==a||t[3]!==o||t[4]!==s||t[5]!==r||t[6]!==n||t[7]!==c?(l=(0,$.jsx)(ri,{open:n,contributorGroups:o,contributors:s,contributorColors:a,onClose:r},c),t[2]=a,t[3]=o,t[4]=s,t[5]=r,t[6]=n,t[7]=c,t[8]=l):l=t[8],l}function ri(e){let t=(0,Z.c)(116),{open:n,contributorGroups:r,contributors:i,contributorColors:a,onClose:o}=e,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=[],t[0]=s):s=t[0];let[c,l]=(0,Q.useState)(s),[u,d]=(0,Q.useState)(r),[f,p]=(0,Q.useState)(``),[,m]=(0,Q.useTransition)(),h=le(),g;t[1]!==r||t[2]!==u||t[3]!==h?(g=()=>{let e=JSON.stringify(u);if(e===JSON.stringify(r))return;let t=new FormData;t.append(`groupedContributors`,e),h(t,{method:`post`})},t[1]=r,t[2]=u,t[3]=h,t[4]=g):g=t[4];let _=g,v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=function(e,t){d(n=>{let r=n[t];return!r||r.displayName===e?n:n.map((n,r)=>r===t?{...n,displayName:e}:n)})},t[5]=v):v=t[5];let y=v,b;t[6]===u?b=t[7]:(b=new Set(u.flatMap(ui).map(fi)),t[6]=u,t[7]=b);let x=b,S;if(t[8]!==i||t[9]!==x){let e;t[11]===x?e=t[12]:(e=e=>!x.has(fi(e)),t[11]=x,t[12]=e),S=i.filter(e).toSorted(li),t[8]=i,t[9]=x,t[10]=S}else S=t[10];let C=S,w;if(t[13]!==f||t[14]!==C){let e;t[16]===f?e=t[17]:(e=e=>e.name.toLowerCase().includes(f.toLowerCase()),t[16]=f,t[17]=e),w=C.filter(e),t[13]=f,t[14]=C,t[15]=w}else w=t[15];let T=w,E;t[18]===C?E=t[19]:(E=ti(C),t[18]=C,t[19]=E);let D=E,O=D.reduce(ci,0),k;t[20]===c?k=t[21]:(k=new Set(c.map(fi)),t[20]=c,t[21]=k);let A=k,j;t[22]!==A||t[23]!==T?(j=T.length>0&&T.every(e=>A.has(fi(e))),t[22]=A,t[23]=T,t[24]=j):j=t[24];let M=j,P;t[25]===a?P=t[26]:(P=e=>a.get(e)??`#333`,t[25]=a,t[26]=P);let F=P,I;if(t[27]!==F||t[28]!==c||t[29]!==T){let e;t[31]!==F||t[32]!==c?(e=e=>{let t=c.some(t=>fi(t)===fi(e));return(0,$.jsx)(Y,{className:`contents`,checkBoxClassName:`ml-auto`,checked:t,onChange:t=>{l(n=>t.target?.checked?[...n,e]:n.filter(t=>fi(t)!==fi(e)))},children:(0,$.jsxs)(`div`,{className:`contents`,children:[(0,$.jsx)(Ze,{dotColor:F(e.name)}),(0,$.jsx)(`span`,{className:`truncate font-bold`,title:e.name,children:e.name}),(0,$.jsx)(`p`,{className:`text-secondary-text dark:text-secondary-text-dark truncate text-xs leading-tight`,title:e.email,children:e.email})]})},fi(e)+t)},t[31]=F,t[32]=c,t[33]=e):e=t[33],I=T.map(e),t[27]=F,t[28]=c,t[29]=T,t[30]=I}else I=t[30];let L=I,ee;if(t[34]!==F||t[35]!==u||t[36]!==c){let e;t[38]!==F||t[39]!==c?(e=(e,t)=>{let{displayName:n,members:r}=e;return(0,$.jsxs)(`div`,{className:`card bg-primary-bg dark:bg-primary-bg-dark group m-0 flex h-full flex-col justify-between p-2`,title:n,children:[(0,$.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,$.jsxs)(`div`,{className:`flex w-full justify-between gap-0`,children:[(0,$.jsxs)(`div`,{className:`bg-primary-bg dark:bg-primary-bg-dark hover:bg-secondary-bg focus-within:bg-secondary-bg focus-within:dark:bg-secondary-bg-dark hover:dark:bg-secondary-bg-dark focus-within:ring-blue-primary flex items-center gap-1 rounded-md px-2 py-1 transition-colors focus-within:ring-2`,children:[(0,$.jsx)(Ze,{dotColor:F(n)}),(0,$.jsx)(`select`,{className:`input h-fit w-full truncate border-0 bg-transparent px-0 text-sm font-bold ring-0!`,value:n,onChange:e=>y(e.target.value,t),children:Array.from(new Set([n,...r.map(si)])).map(oi)})]}),(0,$.jsx)(`button`,{className:`btn btn--text hover:btn--danger transition-colors`,title:`Ungroup`,"aria-label":`Ungroup`,onClick:()=>d(e=>e.filter((e,n)=>n!==t)),children:(0,$.jsx)(J,{path:G,size:1})})]}),(0,$.jsx)(`ul`,{className:`list-disc pl-6`,children:r.filter(ii).map(e=>(0,$.jsx)(di,{contributor:e,onClick:()=>d(n=>n.flatMap((n,r)=>{if(r!==t)return[n];let i=n.members.filter(t=>t.email!==e.email);return i.length>0?[{...n,members:i}]:[]}))},fi(e)))})]}),(0,$.jsx)(`div`,{className:R(`relative flex h-full w-full origin-top items-end justify-end transition-all delay-50 duration-100`,c.length===0?`max-h-0 scale-y-0 opacity-0`:`max-h-10 scale-y-100 opacity-100`),children:(0,$.jsxs)(`button`,{className:`btn btn--primary right bottom absolute h-fit w-fit px-2 py-1 text-xs shadow-lg`,title:`Add selected contributors to this group`,disabled:c.length===0,onClick:()=>{d(e=>e.map((e,n)=>n===t?{...e,members:e.members.concat(c)}:e)),l([])},children:[(0,$.jsx)(J,{path:te,size:.75}),`Add contributor`]})})]},t)},t[38]=F,t[39]=c,t[40]=e):e=t[40],ee=u.map(e),t[34]=F,t[35]=u,t[36]=c,t[37]=ee}else ee=t[37];let z=ee,B;t[41]!==_||t[42]!==o?(B=()=>{_(),o()},t[41]=_,t[42]=o,t[43]=B):B=t[43];let V;t[44]===C.length?V=t[45]:(V=(0,$.jsxs)(`h3`,{className:`text-center text-lg font-bold`,children:[`Ungrouped Contributors (`,C.length,`)`]}),t[44]=C.length,t[45]=V);let H;t[46]===z.length?H=t[47]:(H=(0,$.jsxs)(`h3`,{className:`text-center text-lg font-bold`,children:[`Contributor Groups (`,z.length,`)`]}),t[46]=z.length,t[47]=H);let re;t[48]!==V||t[49]!==H?(re=(0,$.jsxs)(`div`,{className:`grid grid-cols-[1fr_1fr] gap-2`,children:[V,H]}),t[48]=V,t[49]=H,t[50]=re):re=t[50];let W=C.length===0,K;t[51]===m?K=t[52]:(K=e=>m(()=>p(e.target.value)),t[51]=m,t[52]=K);let q;t[53]!==W||t[54]!==K?(q=(0,$.jsx)(`input`,{className:`input min-w-0`,type:`search`,placeholder:`Filter...`,disabled:W,onChange:K}),t[53]=W,t[54]=K,t[55]=q):q=t[55];let ie=c.length===0,ae;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(ae=()=>l([]),t[56]=ae):ae=t[56];let X;t[57]===ie?X=t[58]:(X=(0,$.jsx)(`button`,{disabled:ie,className:`btn w-max grow`,title:`Clear selection`,onClick:ae,children:`Clear`}),t[57]=ie,t[58]=X);let oe=T.length===0,se=M?`Deselect selected contributors`:`Select all contributors from list`,ce;t[59]!==M||t[60]!==T?(ce=()=>l(e=>M?e.filter(e=>!T.some(t=>fi(t)===fi(e))):[...e,...T.filter(t=>!e.some(e=>fi(e)===fi(t)))]),t[59]=M,t[60]=T,t[61]=ce):ce=t[61];let ue=M?`Deselect all`:`Select all`,de;t[62]!==oe||t[63]!==se||t[64]!==ce||t[65]!==ue?(de=(0,$.jsx)(`button`,{disabled:oe,className:`btn w-max grow`,title:se,onClick:ce,children:ue}),t[62]=oe,t[63]=se,t[64]=ce,t[65]=ue,t[66]=de):de=t[66];let fe;t[67]!==q||t[68]!==X||t[69]!==de?(fe=(0,$.jsxs)(`div`,{className:`flex gap-2 p-2`,children:[q,X,de]}),t[67]=q,t[68]=X,t[69]=de,t[70]=fe):fe=t[70];let pe;t[71]!==f||t[72]!==L||t[73]!==T.length?(pe=T.length>0?L:(0,$.jsx)(`p`,{className:`col-span-full place-self-center text-sm`,children:f.length>0?`No contributors found`:`All contributors have been grouped`}),t[71]=f,t[72]=L,t[73]=T.length,t[74]=pe):pe=t[74];let me;t[75]===pe?me=t[76]:(me=(0,$.jsx)(`div`,{className:`bg-primary-bg dark:bg-primary-bg-dark grid min-h-0 w-full grid-cols-[min-content_3fr_3fr_min-content] items-center gap-x-4 gap-y-1 overflow-y-auto rounded-lg p-2`,children:pe}),t[75]=pe,t[76]=me);let he;t[77]!==fe||t[78]!==me?(he=(0,$.jsxs)(`div`,{className:`flex min-h-0 flex-col rounded-md`,children:[fe,me]}),t[77]=fe,t[78]=me,t[79]=he):he=t[79];let ge;t[80]!==z||t[81]!==u.length?(ge=u.length>0?z:(0,$.jsx)(`p`,{className:`col-span-2 text-center text-sm`,children:`No contributors have been grouped yet`}),t[80]=z,t[81]=u.length,t[82]=ge):ge=t[82];let _e;t[83]===ge?_e=t[84]:(_e=(0,$.jsx)(`div`,{className:`min-h-0 overflow-y-auto`,children:(0,$.jsx)(`div`,{className:`grid h-min min-h-0 grid-cols-1 gap-4 rounded-md p-2 lg:grid-cols-1 xl:grid-cols-2`,children:ge})}),t[83]=ge,t[84]=_e);let ve;t[85]!==he||t[86]!==_e?(ve=(0,$.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-[1fr_1fr] gap-2`,children:[he,_e]}),t[85]=he,t[86]=_e,t[87]=ve):ve=t[87];let ye;t[88]!==O||t[89]!==D?(ye=O>0?(0,$.jsxs)(`button`,{className:`btn btn--primary w-fit transition-all duration-100`,title:D.length===0?`No ungrouped contributors share the same name or email`:`Create ${D.length} inferred group${D.length>1?`s`:``} containing ${O} author${O>1?`s`:``}`,disabled:D.length===0,onClick:()=>{d(e=>{let t=e.slice();for(let e of D)t.push(e);return t}),l([])},children:[(0,$.jsx)(J,{path:U,size:1}),`Auto group (`,O,`)`]}):null,t[88]=O,t[89]=D,t[90]=ye):ye=t[90];let be=c.length<2?`Select at least 2 contributors to group them`:`Group the selected contributors`,xe=c.length<2,Se;t[91]===c?Se=t[92]:(Se=()=>{d(e=>[...e,{displayName:$r(c),members:c}]),l([])},t[91]=c,t[92]=Se);let Ce;t[93]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,$.jsx)(J,{path:te,size:1}),t[93]=Ce):Ce=t[93];let we;t[94]!==be||t[95]!==xe||t[96]!==Se?(we=(0,$.jsxs)(`button`,{className:`btn btn--primary w-fit transition-all duration-100`,title:be,disabled:xe,onClick:Se,children:[Ce,`Create new group`]}),t[94]=be,t[95]=xe,t[96]=Se,t[97]=we):we=t[97];let Te;t[98]!==ye||t[99]!==we?(Te=(0,$.jsxs)(`div`,{className:`flex w-full flex-row justify-end gap-2`,children:[ye,we]}),t[98]=ye,t[99]=we,t[100]=Te):Te=t[100];let Ee=u.length===0,De,Oe;t[101]===Symbol.for(`react.memo_cache_sentinel`)?(De=()=>{confirm(`Are you sure you want to ungroup all grouped contributors?`)&&d([])},Oe=(0,$.jsx)(J,{path:N,size:1}),t[101]=De,t[102]=Oe):(De=t[101],Oe=t[102]);let ke;t[103]===Ee?ke=t[104]:(ke=(0,$.jsx)(`div`,{className:`flex w-full flex-row justify-end gap-2`,children:(0,$.jsxs)(`button`,{className:`btn btn--danger w-fit transition-all duration-100`,disabled:Ee,onClick:De,children:[Oe,`Ungroup all`]})}),t[103]=Ee,t[104]=ke);let Ae;t[105]!==Te||t[106]!==ke?(Ae=(0,$.jsxs)(`div`,{className:`grid grid-cols-[1fr_1fr] gap-2`,children:[Te,ke]}),t[105]=Te,t[106]=ke,t[107]=Ae):Ae=t[107];let je;t[108]!==re||t[109]!==ve||t[110]!==Ae?(je=(0,$.jsxs)(`div`,{className:`flex min-h-0 w-auto max-w-(--breakpoint-lg) min-w-0 flex-col gap-2 p-4`,children:[re,ve,Ae]}),t[108]=re,t[109]=ve,t[110]=Ae,t[111]=je):je=t[111];let Me;return t[112]!==n||t[113]!==B||t[114]!==je?(Me=(0,$.jsx)(lr,{open:n,title:`Group contributors`,icon:ne,onClose:B,children:je}),t[112]=n,t[113]=B,t[114]=je,t[115]=Me):Me=t[115],Me}function ii(e,t,n){return n.map(ai).indexOf(e.email)===t}function ai(e){return e.email}function oi(e){return(0,$.jsx)(`option`,{value:e,children:e},e)}function si(e){return e.name}function ci(e,t){return e+t.members.length}function li(e,t){return e.name.localeCompare(t.name)}function ui(e){return e.members}function di(e){let t=(0,Z.c)(9),{contributor:n,onClick:r,disabled:i}=e,a=`Remove `+n.email,o=`Remove `+n.email,s;t[0]===n.email?s=t[1]:(s=(0,$.jsx)(`span`,{className:`label truncate text-xs`,children:n.email}),t[0]=n.email,t[1]=s);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(`div`,{className:`flex opacity-0 transition-opacity duration-200 group-hover/alias:opacity-100`,children:(0,$.jsx)(J,{path:P,size:.75})}),t[2]=c):c=t[2];let l;return t[3]!==i||t[4]!==r||t[5]!==a||t[6]!==o||t[7]!==s?(l=(0,$.jsx)(`li`,{className:`list-item w-full items-center gap-2`,children:(0,$.jsxs)(`button`,{className:`group/alias grid w-full cursor-pointer grid-cols-[minmax(0,1fr)_1rem] items-center gap-1 text-start hover:text-red-500`,disabled:i,title:a,"aria-label":o,onClick:r,children:[s,c]})}),t[3]=i,t[4]=r,t[5]=a,t[6]=o,t[7]=s,t[8]=l):l=t[8],l}function fi(e){return`${e.name}\u0000${e.email??``}`}function pi(e){let t=(0,Z.c)(19),{compact:n}=e,r=n===void 0?!1:n,i=de(),[a,s]=(0,Q.useState)(!1),{formData:c}=o(),l;t[0]===c?l=t[1]:(l=c?.has(`contributorGroups`),t[0]=c,t[1]=l);let u=l===!0,d;t[2]===r?d=t[3]:(d=R(`btn`,{"btn--icon btn--text":r}),t[2]=r,t[3]=d);let f=u?`Grouping contributors... `:`Group contributors`,p=u||i,m,h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>s(!0),h=(0,$.jsx)(J,{path:ne}),t[4]=m,t[5]=h):(m=t[4],h=t[5]);let g;t[6]===r?g=t[7]:(g=r?null:(0,$.jsx)(`span`,{children:`Group contributors`}),t[6]=r,t[7]=g);let _;t[8]!==d||t[9]!==f||t[10]!==p||t[11]!==g?(_=(0,$.jsxs)(`button`,{className:d,title:f,"aria-label":`Group contributors`,disabled:p,onClick:m,children:[h,g]}),t[8]=d,t[9]=f,t[10]=p,t[11]=g,t[12]=_):_=t[12];let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>s(!1),t[13]=v):v=t[13];let y;t[14]===a?y=t[15]:(y=(0,$.jsx)(ni,{open:a,onClose:v}),t[14]=a,t[15]=y);let b;return t[16]!==y||t[17]!==_?(b=(0,$.jsxs)($.Fragment,{children:[_,y]}),t[16]=y,t[17]=_,t[18]=b):b=t[18],b}function mi(e){let t=(0,Z.c)(5),n;t[0]===e.keyString?n=t[1]:(n=(0,$.jsx)(`div`,{className:`text-secondary-text dark:text-secondary-text-dark flex grow overflow-hidden text-sm font-bold text-ellipsis whitespace-pre`,children:e.keyString}),t[0]=e.keyString,t[1]=n);let r;return t[2]!==e.children||t[3]!==n?(r=(0,$.jsxs)($.Fragment,{children:[n,e.children]}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4],r}function hi(e){let t=(0,Z.c)(7),n;t[0]===e.keyString?n=t[1]:(n=(0,$.jsx)(`div`,{className:`text-secondary-text dark:text-secondary-text-dark flex grow overflow-hidden text-sm font-bold text-ellipsis whitespace-pre`,children:e.keyString}),t[0]=e.keyString,t[1]=n);let r;t[2]===e.value?r=t[3]:(r=(0,$.jsx)(`p`,{className:`text-sm text-ellipsis`,children:e.value}),t[2]=e.value,t[3]=r);let i;return t[4]!==n||t[5]!==r?(i=(0,$.jsxs)($.Fragment,{children:[n,r]}),t[4]=n,t[5]=r,t[6]=i):i=t[6],i}function gi(e){let t=(0,Z.c)(4),n;t[0]===e.fileChanges?n=t[1]:(n=e.fileChanges.map(_i),t[0]=e.fileChanges,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,$.jsx)(`div`,{className:`overflow-auto`,children:(0,$.jsx)(`div`,{className:`grid max-h-64 max-w-lg grid-cols-[auto_auto_1fr] gap-x-2 gap-y-1 overflow-auto`,children:n})}),t[2]=n,t[3]=r),r}function _i(e){return(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsxs)(`div`,{className:`flex grow overflow-hidden text-sm font-semibold text-ellipsis whitespace-pre text-green-600`,children:[`+`,e.insertions.toLocaleString()]}),(0,$.jsxs)(`div`,{className:`flex grow overflow-hidden text-sm font-semibold text-ellipsis whitespace-pre text-red-600`,children:[`-`,e.deletions.toLocaleString()]}),(0,$.jsxs)(`div`,{className:`flex grow flex-row overflow-hidden text-sm text-ellipsis whitespace-nowrap`,title:e.path,children:[(0,$.jsx)(`p`,{className:`text-tertiary-text dark:text-tertiary-text-dark`,children:e.path.split(`/`).slice(0,-1).join(`/`)+`/`}),(0,$.jsx)(`p`,{className:`text-secondary-text dark:text-secondary-text-dark font-semibold`,children:e.path.split(`/`).pop()})]})]},e.path)}function vi(e){let t=(0,Z.c)(91),[,n]=pt(),r;t[0]!==n||t[1]!==e.value.author.name?(r=n.get(e.value.author.name)??`#c0c0c0`,t[0]=n,t[1]=e.value.author.name,t[2]=r):r=t[2];let i=r,a,o,s,c,l,u,d,f,p,m,h;if(t[3]!==i||t[4]!==n||t[5]!==e.value.author.email||t[6]!==e.value.author.name||t[7]!==e.value.coauthors||t[8]!==e.value.committerTime||t[9]!==e.value.hash||t[10]!==e.value.message){let r;t[22]!==e.value.author.email||t[23]!==e.value.author.name?(r=(t,n,r)=>t.name!=e.value.author.name&&t.email!=e.value.author.email&&r.findIndex(e=>e.name===t.name&&e.email===t.email)===n,t[22]=e.value.author.email,t[23]=e.value.author.name,t[24]=r):r=t[24];let g=e.value.coauthors.filter(r),_=e.value.hash+e.value.author.email+i,v;t[25]!==i||t[26]!==e.value.author.name||t[27]!==_?(v=(0,$.jsx)(Ze,{dotColor:i,title:e.value.author.name,className:`z-0`},_),t[25]=i,t[26]=e.value.author.name,t[27]=_,t[28]=v):v=t[28],h=(0,$.jsx)(`div`,{className:`flex w-min min-w-5.5 items-start`,children:(0,$.jsxs)(`div`,{className:`flex-end flex flex-row-reverse items-center`,children:[g.length>0?g.slice(0,2).map(t=>{let r=n.get(t.name)??`#c0c0c0`;return(0,$.jsx)(Ze,{title:t.name,dotColor:r,className:`z-0 -ml-2.5`},e.value.hash+t.email+r)}):null,v]})});let y=e.value.committerTime*1e3,b;t[29]===y?b=t[30]:(b=ce(y),t[29]=y,t[30]=b),t[31]===b?s=t[32]:(s=(0,$.jsx)(`p`,{className:`text-secondary-text dark:text-secondary-text-dark font-mono text-xs`,children:b}),t[31]=b,t[32]=s),a=ze,d=`flex min-w-0 w-full h-full items-center truncate hover:opacity-60`,t[33]===Symbol.for(`react.memo_cache_sentinel`)?(f=[`right`,`bottom`,`top`,`left`],t[33]=f):f=t[33],p=`Commit Details`,t[34]===e.value.message?m=t[35]:(m=t=>{let{onClick:n}=t;return(0,$.jsx)(`button`,{className:`text-tertiary-text dark:text-tertiary-text-dark h-full w-full min-w-0 cursor-pointer truncate pl-1.5 text-start text-xs font-bold`,onClick:n,children:e.value.message})},t[34]=e.value.message,t[35]=m),o=`grid max-w-lg grid-cols-[max-content_auto] gap-x-3 gap-y-1`,t[36]===e.value.hash?c=t[37]:(c=(0,$.jsx)(hi,{keyString:`Hash`,value:e.value.hash}),t[36]=e.value.hash,t[37]=c);let x;t[38]!==n||t[39]!==e.value.author.name?(x=n.get(e.value.author.name)??`grey`,t[38]=n,t[39]=e.value.author.name,t[40]=x):x=t[40];let S;t[41]===x?S=t[42]:(S=(0,$.jsx)(Ze,{dotColor:x}),t[41]=x,t[42]=S);let C;t[43]===e.value.author.name?C=t[44]:(C=(0,$.jsx)(`span`,{title:e.value.author.name,className:`text-ellipsis`,children:e.value.author.name}),t[43]=e.value.author.name,t[44]=C);let w=`<${e.value.author.email}>`,T;t[45]===w?T=t[46]:(T=(0,$.jsxs)(`span`,{className:`text-tertiary-text dark:text-tertiary-text-dark truncate`,children:[`\xA0`,w]}),t[45]=w,t[46]=T),t[47]!==S||t[48]!==C||t[49]!==T?(l=(0,$.jsx)(mi,{keyString:`Author`,children:(0,$.jsxs)(`div`,{className:`grid grid-cols-[max-content_max-content_auto] items-center gap-1 text-sm`,children:[S,C,T]})}),t[47]=S,t[48]=C,t[49]=T,t[50]=l):l=t[50],u=g.length>0?(0,$.jsx)(mi,{keyString:`Co-authors`,children:(0,$.jsx)(`div`,{className:`flex flex-col gap-y-1`,children:g.map(e=>(0,$.jsxs)(`div`,{className:`grid grid-cols-[max-content_max-content_auto] items-center gap-1 text-sm`,children:[(0,$.jsx)(Ze,{dotColor:n.get(e.name)??`grey`}),(0,$.jsx)(`span`,{title:e.name,className:`text-ellipsis`,children:e.name}),(0,$.jsxs)(`span`,{title:e.email,className:`text-tertiary-text dark:text-tertiary-text-dark truncate`,children:[`\xA0`,`<${e.email}>`]})]},e.email))})}):null,t[3]=i,t[4]=n,t[5]=e.value.author.email,t[6]=e.value.author.name,t[7]=e.value.coauthors,t[8]=e.value.committerTime,t[9]=e.value.hash,t[10]=e.value.message,t[11]=a,t[12]=o,t[13]=s,t[14]=c,t[15]=l,t[16]=u,t[17]=d,t[18]=f,t[19]=p,t[20]=m,t[21]=h}else a=t[11],o=t[12],s=t[13],c=t[14],l=t[15],u=t[16],d=t[17],f=t[18],p=t[19],m=t[20],h=t[21];let g;t[51]!==e.value.authorTime||t[52]!==e.value.committerTime?(g=e.value.committerTime===e.value.authorTime?(0,$.jsx)(mi,{keyString:`Date`,children:(0,$.jsxs)(`div`,{className:`text-sm`,children:[fe(e.value.committerTime*1e3),(0,$.jsx)(`span`,{className:`text-tertiary-text dark:text-tertiary-text-dark`,children:` (`+me(e.value.committerTime)+` ago)`})]})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(mi,{keyString:`Date committed`,children:(0,$.jsxs)(`div`,{className:`text-sm`,children:[fe(e.value.committerTime*1e3),(0,$.jsx)(`span`,{className:`text-tertiary-text dark:text-tertiary-text-dark`,children:` (`+me(e.value.committerTime)+` ago)`})]})}),(0,$.jsx)(mi,{keyString:`Date authored`,children:(0,$.jsxs)(`div`,{className:`text-sm`,children:[fe(e.value.authorTime*1e3),(0,$.jsx)(`span`,{className:`text-tertiary-text dark:text-tertiary-text-dark`,children:` (`+me(e.value.authorTime)+` ago)`})]})})]}),t[51]=e.value.authorTime,t[52]=e.value.committerTime,t[53]=g):g=t[53];let _;t[54]===e.value.message?_=t[55]:(_=(0,$.jsx)(mi,{keyString:`Message`,children:(0,$.jsx)(`div`,{className:`flex h-full items-center text-sm text-ellipsis`,children:e.value.message})}),t[54]=e.value.message,t[55]=_);let v=e.value.body.length>0?e.value.body:`<none>`,y;t[56]===v?y=t[57]:(y=(0,$.jsx)(mi,{keyString:`Body`,children:(0,$.jsx)(`div`,{className:`text-tertiary-text dark:text-tertiary-text-dark flex max-h-64 items-start overflow-auto text-xs font-semibold text-ellipsis whitespace-pre-wrap`,children:v})}),t[56]=v,t[57]=y);let b;t[58]===e.value.fileChanges.length?b=t[59]:(b=(0,$.jsx)(`b`,{children:e.value.fileChanges.length}),t[58]=e.value.fileChanges.length,t[59]=b);let x=`+`+e.value.fileChanges.reduce(bi,0),S;t[60]===x?S=t[61]:(S=(0,$.jsx)(`b`,{className:`font-bold text-green-600`,children:x}),t[60]=x,t[61]=S);let C=`-`+e.value.fileChanges.reduce(yi,0),w;t[62]===C?w=t[63]:(w=(0,$.jsx)(`b`,{className:`font-bold text-red-600`,children:C}),t[62]=C,t[63]=w);let T;t[64]!==b||t[65]!==S||t[66]!==w?(T=(0,$.jsx)(mi,{keyString:`File changes`,children:(0,$.jsx)(`div`,{className:`flex flex-row gap-0 text-sm`,children:(0,$.jsxs)(`p`,{children:[b,` files `,`(`,S,`,\xA0`,w,`)`]})})}),t[64]=b,t[65]=S,t[66]=w,t[67]=T):T=t[67];let E;t[68]!==o||t[69]!==g||t[70]!==_||t[71]!==y||t[72]!==c||t[73]!==T||t[74]!==l||t[75]!==u?(E=(0,$.jsxs)(`div`,{className:o,children:[c,l,u,g,_,y,T]}),t[68]=o,t[69]=g,t[70]=_,t[71]=y,t[72]=c,t[73]=T,t[74]=l,t[75]=u,t[76]=E):E=t[76];let D;t[77]===e.value.fileChanges?D=t[78]:(D=(0,$.jsx)(gi,{fileChanges:e.value.fileChanges}),t[77]=e.value.fileChanges,t[78]=D);let O;t[79]!==a||t[80]!==E||t[81]!==D||t[82]!==d||t[83]!==f||t[84]!==p||t[85]!==m?(O=(0,$.jsxs)(a,{triggerClassName:d,positions:f,popoverTitle:p,trigger:m,children:[E,D]}),t[79]=a,t[80]=E,t[81]=D,t[82]=d,t[83]=f,t[84]=p,t[85]=m,t[86]=O):O=t[86];let k;return t[87]!==s||t[88]!==O||t[89]!==h?(k=(0,$.jsxs)($.Fragment,{children:[h,s,O]}),t[87]=s,t[88]=O,t[89]=h,t[90]=k):k=t[90],k}function yi(e,t){return e+t.deletions}function bi(e,t){return e+t.insertions}function xi(e){let t=(0,Z.c)(12),{commits:n,loadedCommitCount:r,totalCommitCount:i,isLoading:a,onShowMoreCommits:o}=e,s=Ke(),c=Math.ceil(i/15),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=[],t[0]=l):l=t[0];let u=`Shows the commit history for `+s.path+`. Click on a commit to see details.`,d=a?`opacity-60`:``,f=a?`pointer-events-none`:``,p;t[1]===n?p=t[2]:(p=n??[],t[1]=n,t[2]=p);let m=r<i?o:void 0,h;t[3]!==d||t[4]!==f||t[5]!==p||t[6]!==m||t[7]!==c?(h=(0,$.jsx)(et,{className:d,navClassName:f,items:p,itemsPerPage:15,totalPages:c,itemHeight:20,originalItemsCount:15,onNextFunc:m,children:Si}),t[3]=d,t[4]=f,t[5]=p,t[6]=m,t[7]=c,t[8]=h):h=t[8];let g;return t[9]!==u||t[10]!==h?(g=(0,$.jsx)($.Fragment,{children:(0,$.jsx)(Le,{className:`mt-0`,metricMenuItems:l,description:u,children:h})}),t[9]=u,t[10]=h,t[11]=g):g=t[11],g}function Si(e){return(0,$.jsx)(`div`,{className:`grid grid-cols-[max-content_max-content_1fr] items-center justify-start gap-x-1 gap-y-1.5`,children:e.map(Ci)})}function Ci(e){return(0,$.jsx)(vi,{value:e},e.hash)}function wi(e){let t=(0,Z.c)(40),{className:n}=e,i=n===void 0?``:n,[a,o]=(0,Q.useState)(!0),s=Xe(),{load:c,data:u,state:d,reset:f}=r(),[p]=wt(Ot),{path:m,branch:h,start:g,end:_}=p,{databaseInfo:v}=ut(),[y,b]=v.timerange,x=g??y,S=_??b,{metricType:C}=it(),w=Se(),T;t[0]!==C||t[1]!==w?(T=C===`TOP_CONTRIBUTOR`||C===`CONTRIBUTORS`?w:[],t[0]=C,t[1]=w,t[2]=T):T=t[2];let E=T,D;t[3]!==h||t[4]!==c||t[5]!==a||t[6]!==m||t[7]!==S||t[8]!==x?(D=e=>{let{objectPath:t,contributors:n,count:r}=e,i=l(`/api/commits`)+At({objectPath:t,path:m,branch:h,count:r,contributors:n,start:x,end:S});a&&c(i)},t[3]=h,t[4]=c,t[5]=a,t[6]=m,t[7]=S,t[8]=x,t[9]=D):D=t[9];let O=D,k,A;t[10]!==s||t[11]!==O||t[12]!==f||t[13]!==E?(k=()=>(O({objectPath:s,contributors:E,count:15}),()=>f()),A=[s,O,f,E],t[10]=s,t[11]=O,t[12]=f,t[13]=E,t[14]=k,t[15]=A):(k=t[14],A=t[15]),(0,Q.useEffect)(k,A);let j;t[16]!==s||t[17]!==O||t[18]!==f||t[19]!==E||t[20]!==d?(j=e=>{o(e),e?d===`idle`&&O({objectPath:s,contributors:E,count:15}):f()},t[16]=s,t[17]=O,t[18]=f,t[19]=E,t[20]=d,t[21]=j):j=t[21];let M;t[22]===u?.commits?M=t[23]:(M=u?.commits??[],t[22]=u?.commits,t[23]=M);let N=u?.currentCommitCount??15,P=u?.totalCommitCount??0,F=d!==`idle`,I;t[24]!==s||t[25]!==u?.currentCommitCount||t[26]!==O||t[27]!==E?(I=()=>{O({objectPath:s,contributors:E,count:(u?.currentCommitCount??15)+15})},t[24]=s,t[25]=u?.currentCommitCount,t[26]=O,t[27]=E,t[28]=I):I=t[28];let L;t[29]!==P||t[30]!==F||t[31]!==I||t[32]!==M||t[33]!==N?(L=(0,$.jsx)(xi,{commits:M,loadedCommitCount:N,totalCommitCount:P,isLoading:F,onShowMoreCommits:I}),t[29]=P,t[30]=F,t[31]=I,t[32]=M,t[33]=N,t[34]=L):L=t[34];let ee;return t[35]!==i||t[36]!==a||t[37]!==L||t[38]!==j?(ee=(0,$.jsx)(kt,{className:i,title:Ti,contentClassName:`flex flex-col gap-2`,open:a,onToggle:j,children:L}),t[35]=i,t[36]=a,t[37]=L,t[38]=j,t[39]=ee):ee=t[39],ee}function Ti(){return(0,$.jsxs)($.Fragment,{children:[`Commits`,(0,$.jsx)(Mt,{})]})}function Ei(){let e=(0,Z.c)(67),t=Ke(),{databaseInfo:n}=ut(),{metricType:i,setMetricType:a}=it(),[o,s]=(0,Q.useState)(!1),c=t?.type===`blob`,{data:u,load:d,reset:f}=r(),p=gt(t)??`#c0c0c0`,m=Xe(),_=X(m),[v]=wt(Ot),[y,b]=n.timerange,x,S;e[0]!==m||e[1]!==d||e[2]!==v||e[3]!==b||e[4]!==y||e[5]!==f?(x=()=>(d(l(`/api/metrics`)+Dt({...v,objectPath:m,start:v.start??y,end:v.end??b})),()=>f()),S=[m,d,v,b,y,f],e[0]=m,e[1]=d,e[2]=v,e[3]=b,e[4]=y,e[5]=f,e[6]=x,e[7]=S):(x=e[6],S=e[7]),(0,Q.useEffect)(x,S);let C=u,w=c||C!==void 0,T=c?n.contribSumPerFile[t.path]??0:C?.contributions,E=c?n.commitCounts[t.path]??0:C?.amountOfCommits,D=c?n.lastChanged[t.path]:C?.lastChanged,O=C?.contributors?.length,k=dt(t)?`Folder type`:`File type`,A=_?q:c?h:g,j;e[8]!==t.name||e[9]!==c||e[10]!==_?(j=_?`Repository`:c?`.`+Qe(t.name.split(`.`)):`Directory`,e[8]=t.name,e[9]=c,e[10]=_,e[11]=j):j=e[11];let M;e[12]!==k||e[13]!==A||e[14]!==j?(M={description:k,icon:A,data:j},e[12]=k,e[13]=A,e[14]=j,e[15]=M):M=e[15];let N=t.type===`tree`?`Folder size`:`File size`,P;e[16]===t.byteSize?P=e[17]:(P=_t(t.byteSize),e[16]=t.byteSize,e[17]=P);let F;e[18]===t.byteSize?F=e[19]:(F=_t(t.byteSize),e[18]=t.byteSize,e[19]=F);let I=P.value+` `+F.unit,L;e[20]!==N||e[21]!==I?(L={description:N,icon:Ie.icon,data:I},e[20]=N,e[21]=I,e[22]=L):L=e[22];let ee=E===1?`Commit`:`Commits`,te;e[23]===E?te=e[24]:(te=ji(E),e[23]=E,e[24]=te);let R;e[25]!==ee||e[26]!==te?(R={description:ee,icon:Be.icon,data:te},e[25]=ee,e[26]=te,e[27]=R):R=e[27];let z;e[28]===T?z=e[29]:(z=ji(T),e[28]=T,e[29]=z);let ne;e[30]===z?ne=e[31]:(ne={description:`Line Changes`,icon:xt.icon,data:z},e[30]=z,e[31]=ne);let B;e[32]===O?B=e[33]:(B=ji(O),e[32]=O,e[33]=B);let V;e[34]===B?V=e[35]:(V={icon:qe.icon,description:`Contributors`,data:B},e[34]=B,e[35]=V);let H=C?.multiTopContributors?`Top Churners`:`Top Churner`,U;e[36]===C?U=e[37]:(U=Ai(C),e[36]=C,e[37]=U);let re;e[38]!==H||e[39]!==U?(re={description:H,icon:ye.icon,data:U},e[38]=H,e[39]=U,e[40]=re):re=e[40];let W;e[41]!==D||e[42]!==w?(W=Mi(D,w),e[41]=D,e[42]=w,e[43]=W):W=e[43];let G;e[44]===W?G=e[45]:(G={description:`Last change`,icon:yt.icon,data:W},e[44]=W,e[45]=G);let K;e[46]!==L||e[47]!==R||e[48]!==ne||e[49]!==V||e[50]!==re||e[51]!==G||e[52]!==M?(K={FILE_TYPE:M,FILE_SIZE:L,MOST_COMMITS:R,MOST_CONTRIBUTIONS:ne,CONTRIBUTORS:V,TOP_CONTRIBUTOR:re,LAST_CHANGED:G},e[46]=L,e[47]=R,e[48]=ne,e[49]=V,e[50]=re,e[51]=G,e[52]=M,e[53]=K):K=e[53];let J=K,ie;e[54]===Symbol.for(`react.memo_cache_sentinel`)?(ie=()=>s(!1),e[54]=ie):ie=e[54];let Y;e[55]===o?Y=e[56]:(Y=(0,$.jsx)(ni,{open:o,onClose:ie}),e[55]=o,e[56]=Y);let ae;e[57]===J?ae=e[58]:(ae=Object.entries(J),e[57]=J,e[58]=ae);let oe=ae,se;e[59]!==i||e[60]!==p||e[61]!==a||e[62]!==oe?(se=(0,$.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:oe.map(e=>{let[t,n]=e,{icon:r,data:o,description:s}=n;return(0,$.jsxs)(Di,{icon:r,isCurrentMetric:t===i,color:p&&t===i?p:void 0,onClick:()=>void a(t),children:[(0,$.jsx)(`p`,{className:`truncate text-xs font-normal opacity-70`,children:s}),(0,$.jsx)(`p`,{className:`w-full truncate text-sm font-bold`,title:o,children:o})]},t)})}),e[59]=i,e[60]=p,e[61]=a,e[62]=oe,e[63]=se):se=e[63];let ce;return e[64]!==Y||e[65]!==se?(ce=(0,$.jsxs)($.Fragment,{children:[Y,se]}),e[64]=Y,e[65]=se,e[66]=ce):ce=e[66],ce}function Di(e){let t=(0,Z.c)(14),{icon:n,isCurrentMetric:r,children:i,color:a,onClick:o}=e,s;t[0]===r?s=t[1]:(s=R(`border-border flex h-full w-full cursor-pointer flex-row items-center justify-between gap-5 rounded border bg-(--bg) px-2 py-1 shadow-sm transition-colors [--brightness:1] [--metric-button-bg:var(--color-secondary-bg)] hover:[--brightness:0.6] dark:[--metric-button-bg:var(--color-secondary-bg-dark)]`,{"ring-primary ring-1":r}),t[0]=r,t[1]=s);let c;t[2]===a?c=t[3]:(c={"--color":a,"--bg":`hsl(from var(--color, var(--metric-button-bg)) h s l / var(--brightness))`,color:`contrast-color(var(--bg))`},t[2]=a,t[3]=c);let l=c,u;t[4]===n?u=t[5]:(u=(0,$.jsx)(J,{path:n,size:.75}),t[4]=n,t[5]=u);let d;t[6]===i?d=t[7]:(d=(0,$.jsx)(`div`,{className:`flex flex-col overflow-hidden text-right`,children:i}),t[6]=i,t[7]=d);let f;return t[8]!==o||t[9]!==s||t[10]!==l||t[11]!==u||t[12]!==d?(f=(0,$.jsxs)(`button`,{type:`button`,className:s,style:l,onClick:o,children:[u,d]}),t[8]=o,t[9]=s,t[10]=l,t[11]=u,t[12]=d,t[13]=f):f=t[13],f}var Oi=`loading...`,ki=`No activity`;function Ai(e){return e?e.multiTopContributors?`Multiple people`:e.topContributor[0]?.contributor??`No contributors`:Oi}function ji(e){return e==null?Oi:e.toLocaleString()}function Mi(e,t){if(e==null||e<=0)return t?ki:Oi;let n=me(e);return n?`${n} ago`:Oe}function Ni(){let e=(0,Z.c)(20),t=Ke(),r=ut(),[i]=wt(Ot),[a,o]=Tt(`zoomPath`,Ot.zoomPath),s=n(),l=t.type===`blob`,u,d,f,p;e[0]!==t.path||e[1]!==r||e[2]!==l||e[3]!==s.pathname||e[4]!==i?(p=l?at(t.path):t.path,u=(i.zoomPath??r.databaseInfo.repo)===p,d=s.pathname,f=Dt({...i,zoomPath:p??void 0}),e[0]=t.path,e[1]=r,e[2]=l,e[3]=s.pathname,e[4]=i,e[5]=u,e[6]=d,e[7]=f,e[8]=p):(u=e[5],d=e[6],f=e[7],p=e[8]);let h=d+f,g;e[9]!==u||e[10]!==p||e[11]!==h?(g=u?null:(0,$.jsxs)(c,{className:`btn btn--text`,"aria-disabled":u,to:u?``:h,title:`Zoom to ${p}`,children:[(0,$.jsx)(J,{path:m}),`Zoom in`]}),e[9]=u,e[10]=p,e[11]=h,e[12]=g):g=e[12];let _;e[13]!==r||e[14]!==o||e[15]!==a?(_=a&&a!==r.databaseInfo.repo?(0,$.jsxs)(`button`,{className:`btn btn--text`,title:`Zoom out to repository root`,onClick:()=>o(r.databaseInfo.repo),children:[(0,$.jsx)(J,{path:F}),`Zoom out`]}):null,e[13]=r,e[14]=o,e[15]=a,e[16]=_):_=e[16];let v;return e[17]!==g||e[18]!==_?(v=(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[g,_]})}),e[17]=g,e[18]=_,e[19]=v):v=e[19],v}function Pi(){let e=(0,Z.c)(43),t=Ke(),n=Je(),r=ke(),{state:i}=o(),[,a]=Tt(`zoomPath`,Ot.zoomPath);if(!t)return null;let s;e[0]===t?s=e[1]:(s=rt(t),e[0]=t,e[1]=s);let c=s,l=t.type===`blob`,u;e[2]===t.name?u=e[3]:(u=Qe(t.name.split(`.`)),e[2]=t.name,e[3]=u);let f=u,p;e[4]===t.path?p=e[5]:(p=(0,$.jsx)(`input`,{type:`hidden`,name:`open`,value:t.path}),e[4]=t.path,e[5]=p);let m=i!==`idle`,h=t.type===`blob`?`Open ${t.name} in default app`:`Browse ${t.name} in system explorer`,g;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(J,{path:j,size:`1.25em`,className:`w-max`}),e[6]=g):g=e[6];let _=t.type===`blob`?`Open`:`Browse`,v;e[7]!==m||e[8]!==h||e[9]!==_?(v=(0,$.jsxs)(`button`,{className:`btn btn--text`,disabled:m,title:h,children:[g,_]}),e[7]=m,e[8]=h,e[9]=_,e[10]=v):v=e[10];let y;e[11]!==p||e[12]!==v||e[13]!==r?(y=(0,$.jsxs)(d,{method:`post`,action:r,children:[p,v]}),e[11]=p,e[12]=v,e[13]=r,e[14]=y):y=e[14];let b;e[15]!==t.path||e[16]!==l||e[17]!==n||e[18]!==a?(b=()=>{l||a(at(t.path)),n(null)},e[15]=t.path,e[16]=l,e[17]=n,e[18]=a,e[19]=b):b=e[19];let x;e[20]===t.path?x=e[21]:(x=(0,$.jsx)(`input`,{type:`hidden`,name:`hide`,value:t.path}),e[20]=t.path,e[21]=x);let S;e[22]!==t.name||e[23]!==l||e[24]!==c||e[25]!==i?(S=!c&&l?(0,$.jsxs)(`button`,{className:`btn btn--text`,disabled:i!==`idle`,title:`Hide ${t.name} from visualization`,children:[(0,$.jsx)(J,{path:E}),`Hide`]}):null,e[22]=t.name,e[23]=l,e[24]=c,e[25]=i,e[26]=S):S=e[26];let C;e[27]!==x||e[28]!==S||e[29]!==b||e[30]!==r?(C=(0,$.jsxs)(d,{className:`w-max`,method:`post`,action:r,onSubmit:b,children:[x,S]}),e[27]=x,e[28]=S,e[29]=b,e[30]=r,e[31]=C):C=e[31];let w;e[32]!==t.name||e[33]!==f||e[34]!==l||e[35]!==i||e[36]!==r?(w=l?(0,$.jsx)($.Fragment,{children:t.name.includes(`.`)?(0,$.jsxs)(d,{className:`w-max`,method:`post`,action:r,children:[(0,$.jsx)(`input`,{type:`hidden`,name:`hide`,value:`*.${f}`}),(0,$.jsxs)(`button`,{className:`btn btn--text`,disabled:i!==`idle`,title:`Hide all files with .${f} extension`,children:[(0,$.jsx)(J,{path:E}),(0,$.jsxs)(`span`,{children:[`Hide *.`,f]})]})]}):null}):null,e[32]=t.name,e[33]=f,e[34]=l,e[35]=i,e[36]=r,e[37]=w):w=e[37];let T;e[38]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(Ni,{}),e[38]=T):T=e[38];let D;return e[39]!==C||e[40]!==w||e[41]!==y?(D=(0,$.jsxs)(`div`,{className:`flex flex-wrap`,children:[y,C,w,T]}),e[39]=C,e[40]=w,e[41]=y,e[42]=D):D=e[42],D}var Fi=`/assets/drivingTruck_32x-C9OqTj6H.gif`;function Ii(){let e=(0,Z.c)(6),t=!de(),n;e[0]===t?n=e[1]:(n=R(`flex gap-2 pr-1`,`transition-opacity`,{"opacity-0":t}),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`span`,{className:`font-bold`,children:`Loading...`}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(`div`,{className:`relative flex w-24 items-center`,children:(0,$.jsx)(`img`,{src:Fi,alt:`Loading...`,className:R(`pixelated absolute size-24 translate-y-0.75`)})}),e[3]=i):i=e[3];let a;return e[4]===n?a=e[5]:(a=(0,$.jsxs)(`div`,{className:n,children:[r,i]}),e[4]=n,e[5]=a),a}function Li(){let e=(0,Z.c)(18),t=i(),{metricType:n,showTopContributorSlider:r,setShowTopContributorSlider:a}=it(),o=ke(),[s,c]=(0,Q.useState)(!1),l;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>c(!0),e[0]=l):l=e[0];let u;e[1]!==t||e[2]!==o?(u=()=>t({rerollColors:``},{method:`post`,action:o}),e[1]=t,e[2]=o,e[3]=u):u=e[3];let d;e[4]!==a||e[5]!==r?(d=()=>a(!r),e[4]=a,e[5]=r,e[6]=d):d=e[6];let f;if(e[7]!==n||e[8]!==s||e[9]!==r||e[10]!==u||e[11]!==d){let t={"group-contributors":l,"shuffle-colors":u,"toggle-top-contributor-slider":d},i=e=>(e===void 0?[]:e).map(e=>({icon:e.icon,label:e.label,onClick:t[e.actionId]})),{icon:a,inspectionPanels:o}=We[n],p;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>c(!1),e[13]=p):p=e[13];let m;e[14]===s?m=e[15]:(m=(0,$.jsx)(ni,{open:s,onClose:p}),e[14]=s,e[15]=m);let h;e[16]===r?h=e[17]:(h=e=>!(e.id===`top-contributor-slider`&&!r),e[16]=r,e[17]=h),f=(0,$.jsxs)($.Fragment,{children:[m,o.filter(h).map((e,t)=>(0,$.jsx)(Le,{actions:e.actions,metricMenuItems:i(e.menuItems),title:(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t===0?(0,$.jsx)(J,{path:a}):null,e.title]}),description:e.description??`Description not provided.`,children:(0,$.jsx)(e.content,{})},`${n}:${e.id}`))]}),e[7]=n,e[8]=s,e[9]=r,e[10]=u,e[11]=d,e[12]=f}else f=e[12];return f}var Ri=({loaderData:e})=>[{title:`${e.repositoryName} - Git Truck`}],zi=a(function({loaderData:{parentDirectoryPath:e,versionInfo:t,dataPromise:n}}){let[{leftExpanded:i,rightExpanded:a,optionsRevision:o},d]=(0,Q.useReducer)((e,t)=>{switch(t){case`toggleLeft`:return{leftExpanded:!e.leftExpanded,rightExpanded:e.rightExpanded,optionsRevision:e.optionsRevision+1};case`toggleRight`:{let t=!e.rightExpanded;return{leftExpanded:e.leftExpanded,rightExpanded:t,optionsRevision:e.optionsRevision+1}}}},{leftExpanded:!0,rightExpanded:!0,optionsRevision:0}),f=()=>d(`toggleLeft`),p=()=>d(`toggleRight`),m=u(),h=r(),g=h.state!==`idle`,_=l(`/browse`)+Ft({path:e}),[v]=wt(Ot),y=(0,Q.useCallback)(()=>{(0,Q.startTransition)(async()=>{if(g||!v.branch||!v.path)return;let e=l(`/api/abort`)+jt({branch:v.branch,path:v.path});await h.submit(null,{action:e,method:`post`}),m(_)})},[g,v.branch,v.path,h,m,_]),b=Ce(`(min-width: var(--breakpoint-large))`);return(0,$.jsx)(Q.Suspense,{fallback:(0,$.jsx)(`div`,{className:`grid h-screen place-items-center bg-slate-200 dark:bg-stone-800`,children:(0,$.jsx)(Rt,{showProgress:!g,loadingText:({status:e})=>(0,$.jsx)(`div`,{className:`flex flex-col items-center gap-2`,children:(0,$.jsx)(`div`,{className:`flex gap-2`,children:e!==`Aborted`&&e!==`CommitHistoryProcessed`?(0,$.jsx)(`button`,{className:`btn btn--text btn--danger`,disabled:g,onClick:y,children:g?`Aborting...`:`Abort`}):(0,$.jsx)(c,{to:_,className:`btn btn--text`,children:`Go back`})})})})}),children:(0,$.jsx)(s,{resolve:n,children:e=>(0,$.jsx)(zt,{data:e,children:(0,$.jsxs)(`div`,{className:R(`min-h-100dvh bg-secondary-bg dark:bg-secondary-bg-dark grid grid-cols-2 grid-rows-[auto_100dvh_auto_auto] gap-x-1 gap-y-2 p-2 transition-all [grid-template-areas:"lheader_cheader_rheader"_"left_left_left"_"chart_chart_chart"_"barchart_barchart_barchart"] lg:h-screen lg:grid-cols-[var(--spacing-sidepanel)_1fr_var(--spacing-sidepanel)] lg:grid-rows-[auto_1fr_auto] lg:overflow-hidden lg:pr-2 lg:[grid-template-areas:"rheader_rheader"_"chart_chart"_"barchart_barchart"]`,{'lg:[grid-template-areas:"lheader_cheader_rheader"_"left_chart_chart"_"left_barchart_barchart"]':i&&!a,'lg:[grid-template-areas:"cheader_cheader_rheader"_"chart_chart_right"_"barchart_barchart_right"]':a&&!i,'lg:[grid-template-areas:"lheader_cheader_rheader"_"left_chart_right"_"left_barchart_right"]':i&&a,'lg:[grid-template-areas:"cheader_cheader_rheader"_"chart_chart_chart"_"barchart_barchart_barchart"]':!i&&!a}),children:[(0,$.jsxs)(`header`,{className:R(`bg-secondary-bg dark:bg-secondary-bg-dark flex grid-cols-3 items-center justify-between gap-2 pr-2 [grid-area:lheader]`,{hidden:!i}),children:[b?(0,$.jsx)(`button`,{title:`Hide left panel`,className:`btn btn--text aspect-square`,onClick:f,children:(0,$.jsx)(J,{path:L,size:1})}):(0,$.jsx)(`div`,{}),(0,$.jsx)(`div`,{className:R(`flex items-end gap-2`,{hidden:!i}),children:(0,$.jsx)(Pt,{installedVersion:t.installedVersion,latestVersion:t.latestVersion})}),(0,$.jsx)(`div`,{})]}),(0,$.jsxs)(`nav`,{className:`grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-2 [grid-area:cheader]`,children:[(0,$.jsxs)(`div`,{className:R(`flex min-w-0 items-center`),children:[b&&!i?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`button`,{title:`Show left panel`,className:`btn btn--text aspect-square`,onClick:f,children:(0,$.jsx)(J,{path:z,size:1})}),(0,$.jsx)(J,{"aria-hidden":!0,path:`M11,2 H13 V22 H11 Z`,size:1,className:`fill-primary-text dark:fill-primary-text-dark mx-0 align-middle opacity-20`})]}):null,(0,$.jsx)(Nt,{zoom:!0,className:`flex-1`})]}),(0,$.jsx)(Ii,{})]}),(0,$.jsxs)(`div`,{className:`flex justify-end [grid-area:rheader]`,children:[(0,$.jsx)(Lt,{}),(0,$.jsx)(Gr,{}),(0,$.jsx)(mr,{}),(0,$.jsx)(pi,{compact:!0}),(0,$.jsx)(Xr,{}),(0,$.jsx)(Kr,{}),b&&!a?(0,$.jsx)(`button`,{title:`Show Right panel`,className:`btn btn--text aspect-square`,onClick:p,children:(0,$.jsx)(J,{path:z,size:1})}):null,b&&a?(0,$.jsx)(`div`,{className:`flex items-center`,children:(0,$.jsx)(`button`,{title:`Hide right panel`,className:`btn btn--text aspect-square`,onClick:p,children:(0,$.jsx)(J,{path:H,size:1})})}):(0,$.jsx)(`div`,{})]}),(0,$.jsx)(Q.Activity,{mode:i||!b?`visible`:`hidden`,children:(0,$.jsxs)(`aside`,{className:V(`hover:scrollbar-thumb-primary-bg-dark/50 hover:dark:scrollbar-thumb-primary-bg/50 flex scrollbar-thin scrollbar-thumb-transparent scrollbar-track-transparent scrollbar-gutter-stable flex-col gap-4 overflow-y-auto lg:transition-transform`,i?`[grid-area:left]`:`lg:-translate-x-sidepanel`),children:[(0,$.jsx)(kt,{className:`card`,title:()=>`Visualization options`,children:(0,$.jsx)(_r,{},o)}),(0,$.jsx)(kt,{className:`card`,contentClassName:`flex flex-col gap-8`,title:()=>(0,$.jsxs)($.Fragment,{children:[`Legend`,(0,$.jsx)(Mt,{})]}),children:(0,$.jsx)(Li,{})})]})}),(0,$.jsx)(`div`,{className:R(`bg-primary-bg dark:bg-primary-bg-dark relative grid h-full rounded-xl shadow-md [grid-area:chart] lg:transition-transform`),children:(0,$.jsx)(ft,{children:()=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(er,{}),(0,Qn.createPortal)((0,$.jsx)(Vt,{}),document.body)]})})}),(0,$.jsx)(Vr,{className:`[grid-area:barchart]`}),(0,$.jsx)(Q.Activity,{mode:a||!b?`visible`:`hidden`,children:(0,$.jsxs)(`aside`,{className:V(`hover:scrollbar-thumb-primary-bg-dark/50 hover:dark:scrollbar-thumb-primary-bg/50 flex scrollbar-thin scrollbar-thumb-transparent scrollbar-track-transparent scrollbar-gutter-stable flex-col gap-4 overflow-y-auto pl-2 lg:transition-transform`,a?`[grid-area:right]`:`lg:translate-x-sidepanel`),children:[(0,$.jsx)(kt,{title:()=>(0,$.jsxs)($.Fragment,{children:[`Actions `,(0,$.jsx)(Mt,{})]}),className:`card`,children:(0,$.jsx)(Pi,{})}),(0,$.jsx)(kt,{className:`card`,title:()=>(0,$.jsxs)($.Fragment,{children:[`Details`,(0,$.jsx)(Mt,{})]}),children:(0,$.jsx)(Ei,{})}),(0,$.jsx)(wi,{className:`card`})]})})]})})})})});export{zi as default,Ri as meta};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-YTRJEZSD.js";e();function t(e){return e===null||Array.isArray(e)&&e.length===0}function n(e,t,n){if(typeof e==`string`)n.set(t,e);else{n.delete(t);for(let r of e)n.append(t,r);n.has(t)||n.set(t,``)}return n}function r(e,{urlKeys:n={}}={}){function r(a,{strict:o=!1}={}){if(a instanceof Promise)return a.then(e=>r(e,{strict:o}));let s=i(a),c={};for(let[r,i]of Object.entries(e)){let e=n[r]??r,a=i.type===`multi`?s.getAll(e):s.get(e);if(t(a)){c[r]=i.defaultValue??null;continue}let l;try{l=i.parse(a)}catch(e){if(o)throw Error(`[nuqs] Error while parsing query \`${a}\` for key \`${r}\`: ${e}`);l=null}if(o&&a&&l===null)throw Error(`[nuqs] Failed to parse query \`${a}\` for key \`${r}\` (got null)`);c[r]=l??i.defaultValue??null}return c}return r}function i(e){try{if(e instanceof Request)return e.url?new URL(e.url).searchParams:new URLSearchParams;if(e instanceof URL)return e.searchParams;if(e instanceof URLSearchParams)return e;if(typeof e==`object`){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(n,e);else r!==void 0&&t.set(n,r);return t}if(typeof e==`string`)return URL.hasOwnProperty(`canParse`)&&URL.canParse(e)?new URL(e).searchParams:new URLSearchParams(e)}catch{}return new URLSearchParams}function a(){if(typeof window>`u`||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}a();var o=c();function s(e,...t){o&&console.warn(e,...t)}function c(){if(typeof window>`u`)return({}.DEBUG||``).includes(`nuqs`);try{let e=`nuqs-localStorage-test`;if(typeof localStorage>`u`)return!1;localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem(`debug`)||``).includes(`nuqs`)}catch{return!1}}function l(e,t,n){try{return e(t)}catch(e){return s("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":``),t,e,n),null}}function u(e){function t(t){if(t===void 0)return null;let n=``;if(Array.isArray(t)){if(t[0]===void 0)return null;n=t[0]}return typeof t==`string`&&(n=t),l(e.parse,n)}return{type:`single`,eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide(n){return t(n)??e}}},withOptions(e){return{...this,...e}}}}var d=u({parse:e=>e,serialize:String}),f=u({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>``+Math.round(e)});u({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>``+Math.round(e+1)}),u({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(t.length&1?`0`:``)+t}}),u({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String});var p=u({parse:e=>e.toLowerCase()===`true`,serialize:String});function m(e,t){return e.valueOf()===t.valueOf()}u({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>``+e.valueOf(),eq:m}),u({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:m}),u({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:m});function h(e){return u({parse:t=>{let n=t;return e.includes(n)?n:null},serialize:String})}function g(e,t=`,`){let n=e.eq??((e,t)=>e===t),r=encodeURIComponent(t);return u({parse:n=>n===``?[]:n.split(t).map((n,i)=>l(e.parse,n.replaceAll(r,t),`[${i}]`)).filter(e=>e!=null),serialize:n=>n.map(n=>(e.serialize?e.serialize(n):String(n)).replaceAll(t,r)).join(t),eq(e,t){return e===t?!0:e.length===t.length?e.every((e,r)=>n(e,t[r])):!1}})}function _(e){if(e.size===0)return``;let t=[];for(let[n,r]of e.entries()){let e=n.replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/\+/g,`%2B`).replace(/=/g,`%3D`).replace(/\?/g,`%3F`);t.push(`${e}=${v(r)}`)}return`?`+t.join(`&`)}function v(e){return e.replace(/%/g,`%25`).replace(/\+/g,`%2B`).replace(/ /g,`+`).replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/"/g,`%22`).replace(/'/g,`%27`).replace(/`/g,`%60`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/[\x00-\x1F]/g,e=>encodeURIComponent(e))}function y(e,{clearOnDefault:t=!0,urlKeys:r={},processUrlSearchParams:i}={}){function a(a,o={}){let[s,c]=b(a)?x(a):[``,new URLSearchParams],l=b(a)?o:a;if(l===null){for(let t in e){let e=r[t]??t;c.delete(e)}return i&&(c=i(c)),s+_(c)}for(let i in e){let a=e[i],o=l[i];if(!a||o===void 0)continue;let s=r[i]??i,u=a.defaultValue!==void 0&&o!==null&&(a.eq??((e,t)=>e===t))(o,a.defaultValue);o===null||(a.clearOnDefault??t??!0)&&u?c.delete(s):c=n(a.serialize(o),s,c)}return i&&(c=i(c)),s+_(c)}return a}function b(e){return typeof e==`string`||e instanceof URLSearchParams||e instanceof URL}function x(e){if(typeof e==`string`){let[t=``,...n]=e.split(`?`);return[t,new URLSearchParams(n.join(`?`))]}else if(e instanceof URLSearchParams)return[``,new URLSearchParams(e)];else return[e.origin+e.pathname,new URLSearchParams(e.searchParams)]}var S=[`day`,`week`,`month`,`year`],C={day:1440*60*1e3,week:10080*60*1e3,month:720*60*60*1e3,year:365*24*60*60*1e3},w={path:d.withOptions({shallow:!1}),objectPath:d,zoomPath:d.withOptions({shallow:!1}),branch:d.withOptions({shallow:!1}),timeUnit:h(S).withOptions({shallow:!1}),start:f.withOptions({shallow:!1}),end:f.withOptions({shallow:!1}),includeCoauthors:p.withDefault(!
|
|
1
|
+
import{t as e}from"./react-YTRJEZSD.js";e();function t(e){return e===null||Array.isArray(e)&&e.length===0}function n(e,t,n){if(typeof e==`string`)n.set(t,e);else{n.delete(t);for(let r of e)n.append(t,r);n.has(t)||n.set(t,``)}return n}function r(e,{urlKeys:n={}}={}){function r(a,{strict:o=!1}={}){if(a instanceof Promise)return a.then(e=>r(e,{strict:o}));let s=i(a),c={};for(let[r,i]of Object.entries(e)){let e=n[r]??r,a=i.type===`multi`?s.getAll(e):s.get(e);if(t(a)){c[r]=i.defaultValue??null;continue}let l;try{l=i.parse(a)}catch(e){if(o)throw Error(`[nuqs] Error while parsing query \`${a}\` for key \`${r}\`: ${e}`);l=null}if(o&&a&&l===null)throw Error(`[nuqs] Failed to parse query \`${a}\` for key \`${r}\` (got null)`);c[r]=l??i.defaultValue??null}return c}return r}function i(e){try{if(e instanceof Request)return e.url?new URL(e.url).searchParams:new URLSearchParams;if(e instanceof URL)return e.searchParams;if(e instanceof URLSearchParams)return e;if(typeof e==`object`){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(n,e);else r!==void 0&&t.set(n,r);return t}if(typeof e==`string`)return URL.hasOwnProperty(`canParse`)&&URL.canParse(e)?new URL(e).searchParams:new URLSearchParams(e)}catch{}return new URLSearchParams}function a(){if(typeof window>`u`||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}a();var o=c();function s(e,...t){o&&console.warn(e,...t)}function c(){if(typeof window>`u`)return({}.DEBUG||``).includes(`nuqs`);try{let e=`nuqs-localStorage-test`;if(typeof localStorage>`u`)return!1;localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem(`debug`)||``).includes(`nuqs`)}catch{return!1}}function l(e,t,n){try{return e(t)}catch(e){return s("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":``),t,e,n),null}}function u(e){function t(t){if(t===void 0)return null;let n=``;if(Array.isArray(t)){if(t[0]===void 0)return null;n=t[0]}return typeof t==`string`&&(n=t),l(e.parse,n)}return{type:`single`,eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide(n){return t(n)??e}}},withOptions(e){return{...this,...e}}}}var d=u({parse:e=>e,serialize:String}),f=u({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>``+Math.round(e)});u({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>``+Math.round(e+1)}),u({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(t.length&1?`0`:``)+t}}),u({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String});var p=u({parse:e=>e.toLowerCase()===`true`,serialize:String});function m(e,t){return e.valueOf()===t.valueOf()}u({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>``+e.valueOf(),eq:m}),u({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:m}),u({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:m});function h(e){return u({parse:t=>{let n=t;return e.includes(n)?n:null},serialize:String})}function g(e,t=`,`){let n=e.eq??((e,t)=>e===t),r=encodeURIComponent(t);return u({parse:n=>n===``?[]:n.split(t).map((n,i)=>l(e.parse,n.replaceAll(r,t),`[${i}]`)).filter(e=>e!=null),serialize:n=>n.map(n=>(e.serialize?e.serialize(n):String(n)).replaceAll(t,r)).join(t),eq(e,t){return e===t?!0:e.length===t.length?e.every((e,r)=>n(e,t[r])):!1}})}function _(e){if(e.size===0)return``;let t=[];for(let[n,r]of e.entries()){let e=n.replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/\+/g,`%2B`).replace(/=/g,`%3D`).replace(/\?/g,`%3F`);t.push(`${e}=${v(r)}`)}return`?`+t.join(`&`)}function v(e){return e.replace(/%/g,`%25`).replace(/\+/g,`%2B`).replace(/ /g,`+`).replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/"/g,`%22`).replace(/'/g,`%27`).replace(/`/g,`%60`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/[\x00-\x1F]/g,e=>encodeURIComponent(e))}function y(e,{clearOnDefault:t=!0,urlKeys:r={},processUrlSearchParams:i}={}){function a(a,o={}){let[s,c]=b(a)?x(a):[``,new URLSearchParams],l=b(a)?o:a;if(l===null){for(let t in e){let e=r[t]??t;c.delete(e)}return i&&(c=i(c)),s+_(c)}for(let i in e){let a=e[i],o=l[i];if(!a||o===void 0)continue;let s=r[i]??i,u=a.defaultValue!==void 0&&o!==null&&(a.eq??((e,t)=>e===t))(o,a.defaultValue);o===null||(a.clearOnDefault??t??!0)&&u?c.delete(s):c=n(a.serialize(o),s,c)}return i&&(c=i(c)),s+_(c)}return a}function b(e){return typeof e==`string`||e instanceof URLSearchParams||e instanceof URL}function x(e){if(typeof e==`string`){let[t=``,...n]=e.split(`?`);return[t,new URLSearchParams(n.join(`?`))]}else if(e instanceof URLSearchParams)return[``,new URLSearchParams(e)];else return[e.origin+e.pathname,new URLSearchParams(e.searchParams)]}var S=[`day`,`week`,`month`,`year`],C={day:1440*60*1e3,week:10080*60*1e3,month:720*60*60*1e3,year:365*24*60*60*1e3},w={path:d.withOptions({shallow:!1}),objectPath:d,zoomPath:d.withOptions({shallow:!1}),branch:d.withOptions({shallow:!1}),timeUnit:h(S).withOptions({shallow:!1}),start:f.withOptions({shallow:!1}),end:f.withOptions({shallow:!1}),includeCoauthors:p.withDefault(!0).withOptions({shallow:!1})},T=y(w);r(w);export{g as a,h as c,S as i,T as n,f as o,C as r,d as s,w as t};
|