@vitejs/devtools-rolldown 0.0.0-alpha.28 → 0.0.0-alpha.30
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/dist/index.mjs +1 -1
- package/dist/nitro.json +1 -1
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/{HD_PrFS8.js → BG553MBL.js} +1 -1
- package/dist/public/_nuxt/{CI5axwdc.js → BdaRSTg9.js} +1 -1
- package/dist/public/_nuxt/{SRHsGr7k.js → C2Zt-inO.js} +1 -1
- package/dist/public/_nuxt/{DthxatUT.js → CKFsAdVO.js} +1 -1
- package/dist/public/_nuxt/{DfaPP0bZ.js → CPkXrqff.js} +1 -1
- package/dist/public/_nuxt/{3K8be-OO.js → DIOfQNpH.js} +2 -2
- package/dist/public/_nuxt/{uuSdsPfd.js → DJuT7S78.js} +1 -1
- package/dist/public/_nuxt/{DNJ_ymaf.js → KIwTgGRl.js} +1 -1
- package/dist/public/_nuxt/{Bwky_Ehw.js → PqwTuo4u.js} +1 -1
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/6ccec81e-7ce8-490e-996f-59c86bc421f3.json +1 -0
- package/dist/public/_nuxt/{entry.Dtc32edt.css → entry.CcTZXgrj.css} +1 -1
- package/dist/public/_nuxt/{DrxDkN_i.js → wMowadUl.js} +1 -1
- package/dist/public/index.html +1 -1
- package/package.json +3 -3
- package/dist/public/_nuxt/builds/meta/ffd6fa5b-1213-4aae-bb32-9f22025ff183.json +0 -1
package/dist/index.mjs
CHANGED
|
@@ -768,7 +768,7 @@ async function parseJsonStreamWithConcatArrays(stream, processor) {
|
|
|
768
768
|
values.push(result);
|
|
769
769
|
} catch (e) {
|
|
770
770
|
const preview = line.length > 256 ? `${line.slice(0, 256)}...` : line;
|
|
771
|
-
console.warn(`[
|
|
771
|
+
console.warn(`[rolldown-devtools] JSON parse stream skip bad line ${lineNumber}: ${e.message}\n${preview}`);
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
});
|
package/dist/nitro.json
CHANGED
package/dist/public/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-rolldown/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-rolldown/_nuxt/DIOfQNpH.js"}}</script><title>Rolldown DevTools</title><link rel="stylesheet" href="/.devtools-rolldown/_nuxt/entry.CcTZXgrj.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/.devtools-rolldown/_nuxt/DIOfQNpH.js"><script type="module" src="/.devtools-rolldown/_nuxt/DIOfQNpH.js" crossorigin></script><meta name="description" content="DevTools for Rolldown"><meta property="og:title" content="Rolldown DevTools"><meta property="og:description" content="DevTools for Rolldown"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><script id="unhead:payload" type="application/json">{"title":"Rolldown DevTools"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/.devtools-rolldown/",buildId:"6ccec81e-7ce8-490e-996f-59c86bc421f3",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1770698204891,false]</script></body></html>
|
package/dist/public/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-rolldown/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-rolldown/_nuxt/DIOfQNpH.js"}}</script><title>Rolldown DevTools</title><link rel="stylesheet" href="/.devtools-rolldown/_nuxt/entry.CcTZXgrj.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/.devtools-rolldown/_nuxt/DIOfQNpH.js"><script type="module" src="/.devtools-rolldown/_nuxt/DIOfQNpH.js" crossorigin></script><meta name="description" content="DevTools for Rolldown"><meta property="og:title" content="Rolldown DevTools"><meta property="og:description" content="DevTools for Rolldown"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><script id="unhead:payload" type="application/json">{"title":"Rolldown DevTools"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/.devtools-rolldown/",buildId:"6ccec81e-7ce8-490e-996f-59c86bc421f3",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1770698204891,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$t as e,Bt as t,at as n,ct as r,ft as i,lt as a,ot as o,pt as s,rt as c,wt as l}from"#entry";import{r as u}from"./
|
|
1
|
+
import{$t as e,Bt as t,at as n,ct as r,ft as i,lt as a,ot as o,pt as s,rt as c,wt as l}from"#entry";import{r as u}from"./CKFsAdVO.js";import{n as d,t as f}from"./Dt2e24SL.js";var p={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},m={flex:`~ gap-1 items-center`},h=s({__name:`BuildMetrics`,props:{metrics:{}},setup(s){let h=s,g=n(()=>{let e=h.metrics,t=e?.resolve_ids.reduce((e,t)=>(e+=t.duration,e),0),n=e?.loads?.reduce((e,t)=>(e+=t.duration,e),0),r=e?.transforms.reduce((e,t)=>(e+=t.duration,e),0);return{resolveIds:t,loads:n,transforms:r,total:t+n+r}}),_=n(()=>(h.metrics?.transforms)?.[0]?.source_code_size),v=n(()=>{let e=h.metrics?.transforms.filter(e=>e.transformed_code_size);return e?.[e.length-1]?.transformed_code_size});return(n,s)=>{let h=u;return l(),a(`div`,p,[i(f,{duration:g.value.resolveIds,flex:`~ gap-1 items-center`,title:`Resolve Id hooks cost: ${e(d)(g.value.resolveIds,!0)}`},{default:t(()=>[...s[0]||=[o(`span`,{"i-ph-magnifying-glass-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),i(f,{duration:g.value.loads,flex:`~ gap-1 items-center`,title:`Load hooks cost: ${e(d)(g.value.loads,!0)}`},{default:t(()=>[...s[1]||=[o(`span`,{"i-ph-upload-simple-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),i(f,{duration:g.value.transforms,flex:`~ gap-1 items-center`,title:`Transform hooks cost: ${e(d)(g.value.transforms,!0)}`},{default:t(()=>[...s[2]||=[o(`span`,{"i-ph-magic-wand-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),s[6]||=o(`span`,{op40:``},`|`,-1),i(f,{duration:g.value.total,flex:`~ gap-1 items-center`,title:`Total build cost: ${e(d)(g.value.total,!0)}`},{default:t(()=>[...s[3]||=[o(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),_.value&&v.value?(l(),a(c,{key:0},[s[5]||=o(`span`,{op40:``},`|`,-1),o(`div`,m,[i(h,{title:`Source code size`,bytes:_.value},null,8,[`bytes`]),s[4]||=o(`span`,{"i-ph-arrow-right-duotone":``,op50:``},null,-1),i(h,{title:`Transformed code size`,bytes:v.value},null,8,[`bytes`])])],64)):r(``,!0)])}}}),g=Object.assign(h,{__name:`ModulesBuildMetrics`});export{g as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$t as e,A as t,Ct as n,D as r,F as i,It as a,Lt as o,M as s,N as c,O as l,Ot as u,P as d,Yt as f,Zt as p,a as m,at as h,bt as g,ct as _,it as v,j as y,k as b,kt as ee,lt as x,nn as S,ot as te,pt as ne,qt as C,rn as re,rt as ie,st as ae,wt as w}from"#entry";import{t as T}from"./D04G8HHr.js";import{t as oe}from"./DthxatUT.js";function E(){return typeof window<`u`}function D(e){return se(e)?(e.nodeName||``).toLowerCase():`#document`}function O(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function k(e){return((se(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function se(e){return E()?e instanceof Node||e instanceof O(e).Node:!1}function A(e){return E()?e instanceof Element||e instanceof O(e).Element:!1}function j(e){return E()?e instanceof HTMLElement||e instanceof O(e).HTMLElement:!1}function ce(e){return!E()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof O(e).ShadowRoot}var le=new Set([`inline`,`contents`]);function M(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=I(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!le.has(i)}var ue=new Set([`table`,`td`,`th`]);function de(e){return ue.has(D(e))}var fe=[`:popover-open`,`:modal`];function N(e){return fe.some(t=>{try{return e.matches(t)}catch{return!1}})}var pe=[`transform`,`translate`,`scale`,`rotate`,`perspective`],me=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],he=[`paint`,`layout`,`strict`,`content`];function ge(e){let t=P(),n=A(e)?I(e):e;return pe.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||me.some(e=>(n.willChange||``).includes(e))||he.some(e=>(n.contain||``).includes(e))}function _e(e){let t=R(e);for(;j(t)&&!F(t);){if(ge(t))return t;if(N(t))return null;t=R(t)}return null}function P(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var ve=new Set([`html`,`body`,`#document`]);function F(e){return ve.has(D(e))}function I(e){return O(e).getComputedStyle(e)}function L(e){return A(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function R(e){if(D(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ce(e)&&e.host||k(e);return ce(t)?t.host:t}function ye(e){let t=R(e);return F(t)?e.ownerDocument?e.ownerDocument.body:e.body:j(t)&&M(t)?t:ye(t)}function z(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ye(e),i=r===e.ownerDocument?.body,a=O(r);if(i){let e=be(a);return t.concat(a,a.visualViewport||[],M(r)?r:[],e&&n?z(e):[])}return t.concat(r,z(r,[],n))}function be(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xe(e){let t=I(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=j(e),o=a?e.offsetWidth:n,s=a?e.offsetHeight:r,c=i(n)!==o||i(r)!==s;return c&&(n=o,r=s),{width:n,height:r,$:c}}function Se(e){return A(e)?e:e.contextElement}function B(e){let t=Se(e);if(!j(t))return y(1);let n=t.getBoundingClientRect(),{width:r,height:a,$:o}=xe(t),s=(o?i(n.width):n.width)/r,c=(o?i(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ce=y(0);function we(e){let t=O(e);return!P()||!t.visualViewport?Ce:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Te(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==O(e)?!1:t}function V(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Se(e),o=y(1);t&&(r?A(r)&&(o=B(r)):o=B(e));let s=Te(a,n,r)?we(a):y(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(a){let e=O(a),t=r&&A(r)?O(r):r,n=e,i=be(n);for(;i&&r&&t!==n;){let e=B(i),t=i.getBoundingClientRect(),r=I(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,f*=e.y,c+=a,l+=o,n=O(i),i=be(n)}}return d({width:u,height:f,x:c,y:l})}function H(e,t){let n=L(e).scrollLeft;return t?t.left+n:V(k(e)).left+n}function Ee(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-H(e,n),y:n.top+t.scrollTop}}function De(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=k(r),s=t?N(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=y(1),u=y(0),d=j(r);if((d||!d&&!a)&&((D(r)!==`body`||M(o))&&(c=L(r)),j(r))){let e=V(r);l=B(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ee(o,c):y(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Oe(e){return Array.from(e.getClientRects())}function ke(e){let t=k(e),n=L(e),r=e.ownerDocument.body,i=s(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=s(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+H(e),c=-n.scrollTop;return I(r).direction===`rtl`&&(o+=s(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:c}}var Ae=25;function je(e,t){let n=O(e),r=k(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=P();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=H(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Ae&&(a-=o)}else l<=Ae&&(a+=l);return{width:a,height:o,x:s,y:c}}var Me=new Set([`absolute`,`fixed`]);function Ne(e,t){let n=V(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=j(e)?B(e):y(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Pe(e,t,n){let r;if(t===`viewport`)r=je(e,n);else if(t===`document`)r=ke(k(e));else if(A(t))r=Ne(t,n);else{let n=we(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return d(r)}function Fe(e,t){let n=R(e);return n===t||!A(n)||F(n)?!1:I(n).position===`fixed`||Fe(n,t)}function Ie(e,t){let n=t.get(e);if(n)return n;let r=z(e,[],!1).filter(e=>A(e)&&D(e)!==`body`),i=null,a=I(e).position===`fixed`,o=a?R(e):e;for(;A(o)&&!F(o);){let t=I(o),n=ge(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Me.has(i.position)||M(o)&&!n&&Fe(e,o))?r=r.filter(e=>e!==o):i=t,o=R(o)}return t.set(e,r),r}function Le(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?N(t)?[]:Ie(t,this._c):[].concat(n),r],o=a[0],l=a.reduce((e,n)=>{let r=Pe(t,n,i);return e.top=s(r.top,e.top),e.right=c(r.right,e.right),e.bottom=c(r.bottom,e.bottom),e.left=s(r.left,e.left),e},Pe(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Re(e){let{width:t,height:n}=xe(e);return{width:t,height:n}}function ze(e,t,n){let r=j(t),i=k(t),a=n===`fixed`,o=V(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=y(0);function l(){c.x=H(i)}if(r||!r&&!a)if((D(t)!==`body`||M(i))&&(s=L(t)),r){let e=V(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Ee(i,s):y(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Be(e){return I(e).position===`static`}function Ve(e,t){if(!j(e)||I(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return k(e)===n&&(n=n.ownerDocument.body),n}function He(e,t){let n=O(e);if(N(e))return n;if(!j(e)){let t=R(e);for(;t&&!F(t);){if(A(t)&&!Be(t))return t;t=R(t)}return n}let r=Ve(e,t);for(;r&&de(r)&&Be(r);)r=Ve(r,t);return r&&F(r)&&Be(r)&&!ge(r)?n:r||_e(e)||n}var Ue=async function(e){let t=this.getOffsetParent||He,n=this.getDimensions,r=await n(e.floating);return{reference:ze(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function We(e){return I(e).direction===`rtl`}var Ge={convertOffsetParentRelativeRectToViewportRelativeRect:De,getDocumentElement:k,getClippingRect:Le,getOffsetParent:He,getElementRects:Ue,getClientRects:Oe,getDimensions:Re,getScale:B,isElement:A,isRTL:We},Ke=b,qe=t,Je=l,Ye=(e,t,n)=>{let i=new Map,a={platform:Ge,...n},o={...a.platform,_c:i};return r(e,t,{...a,platform:o})},Xe=ne({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:t,hoverY:n}=p(e),r=a(`hoverElement`),i=C(0),s=C(0);return o([t,n],([e,t])=>{Ye({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},r.value,{placement:`right-start`,middleware:[Je(),qe(),Ke({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{i.value=e,s.value=t})}),(e,t)=>(w(),ae(v,{to:`body`},[te(`div`,{ref_key:`hoverElement`,ref:r,fixed:``,"z-panel-content":``,"pointer-events-none":``,style:S({left:`${i.value}px`,top:`${s.value}px`})},[ee(e.$slots,`default`)],4)]))}}),Ze=Object.assign(Xe,{__name:`DisplayGraphHoverView`});function Qe(e,t=1,n=1){let r=(.6+.4*Math.max(0,Math.cos(e)))*t,i=(.5+.2*Math.max(0,Math.cos(e+Math.PI*2/3)))*n;return`hsl(${e*180/Math.PI}deg, ${Math.round(100*r)}%, ${Math.round(100*i)}%)`}var $e,et,tt,U,W,G=1,nt;function rt(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if($e!==t||et!==a||tt!==i){let n=Math.round(64*a)/64;G=i,G=Math.log2(G),G-=Math.floor(G);let r=G,o=Math.min(1,8*r);G=2**G;let s=8*Math.SQRT2/G;$e=t,et=a,tt=i,U||=document.createElement(`canvas`),W||=U.getContext(`2d`),U.width=U.height=Math.round(64*n),W.scale(n,n),W.fillStyle=e[0],W.fillRect(0,0,64,64),W.globalAlpha=.25,W.fillStyle=e[1],W.fillRect(0,0,64,64),W.globalAlpha=.67,W.strokeStyle=e[1],W.beginPath();for(let e=0;e<=64;e+=16)W.moveTo(e-32,e+32),W.lineTo(e+32,e-32);if(W.lineWidth=s*(1-(o-r)/2),W.stroke(),o+r>0){W.beginPath();for(let e=8;e<64;e+=16)W.moveTo(e-32,e+32),W.lineTo(e+32,e-32);W.lineWidth=s*(o+r)/2,W.stroke()}nt=t.createPattern(U,`repeat`),G/=n}return n/=64*G*a,n-=Math.floor(n),n*=64*G*a,nt.setTransform(new DOMMatrix([G,0,0,G,n,r])),nt}function it(e){return Array.isArray(e)?`url('data:image/svg+xml,<svg width="26" height="26" xmlns="http://www.w3.org/2000/svg"><rect width="26" height="26" fill="${e[0]}"/><rect width="26" height="26" fill="${e[1]}" fill-opacity="25%"/><path d="M22.5 -3.5L-3.5 22.5M35.5 9.5L9.5 35.5" stroke="${e[1]}" stroke-opacity="67%" stroke-width="9.19239"/></svg>')`:e}function at(e){return t=>t.id&&e[t.id]||t.color}function ot(e,t=1,n=1){let r={};return st(r,e,0,Math.PI*2,t,n),at(r)}function st(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=Qe(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;st(e,s,n,t,i,a),n+=t}}var ct=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function lt(e=16,t=ct){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function ut(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=lt(),r.parent||=t,r.children||=[],r.sizeSelf==null&&r.size!=null&&r.children.length===0?r.sizeSelf=r.size:r.sizeSelf||=0,r.children=(r.children||[]).map(e=>ut(e,r,n)),r.size||=r.children.reduce((e,t)=>e+t.size,0)+r.sizeSelf,n&&r.children.sort(n),Object.defineProperty(r,`__nanovis`,{enumerable:!1,value:!0}),r}function dt(e){return e.children.length===0?1:Math.max(...e.children.map(e=>dt(e)))+1}var ft=/\bFirefox\//.test(navigator.userAgent),pt;function mt(e){return pt?pt.format(e):`${e}`}function K(){return(window.performance||Date).now()}function ht(e){let t=e.toFixed(1).split(`.`,2);return`${mt(+t[0])}.${t[1]}`}function gt(e){return e===1?`1 byte`:e<1024?`${mt(e)} bytes`:e<1024*1024?`${ht(e/1024)} kb`:e<1024*1024*1024?`${ht(e/(1024*1024))} mb`:`${ht(e/(1024*1024*1024))} gb`}function _t(e,t,n,r,i,a){if(ft){let o=e.lineWidth,s=o/2;e.fillStyle=t,e.fillRect(n-s,r-s,i+o,o),e.fillRect(n-s,r+s,o,a-o),e.fillRect(n-s,r+a-s,i+o,o),e.fillRect(n+i-s,r+s,o,a-o);return}e.strokeStyle=t,e.strokeRect(n,r,i,a)}function vt(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function yt(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{pt=new Intl.NumberFormat}catch{}var bt=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r<i;r++)n[r](...t)},events:{},on(e,t){return(this.events[e]||=[]).push(t),()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}}),q={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},xt={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},St=46,Ct=`14px sans-serif`,wt=`bold ${Ct}`,Tt=class{el;canvas;c;width=0;height=0;ratio=1;root;maxDepth;events;options;palette;disposables;getColor;getText;getSubtext;_animationFrame=null;constructor(e,t){this.options={...q,...t};let{getColor:n=ot(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...xt,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=dt(e),this.disposables=[],this.events=bt(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(Ct),t.onClick&&this.events.on(`click`,t.onClick),t.onHover&&this.events.on(`hover`,t.onHover),t.onLeave&&this.events.on(`leave`,t.onLeave),t.onSelect&&this.events.on(`select`,t.onSelect),this.el.addEventListener(`mouseleave`,()=>{this.events.emit(`leave`)})}invalidate(){this._animationFrame===null&&(this._animationFrame=requestAnimationFrame(()=>{this._animationFrame=null,this.tick()}))}tick(){this.draw()}draw(){}resize(){this.ratio=window.devicePixelRatio||1,this.canvas.style.width=`${this.width}px`,this.canvas.style.height=`${this.height}px`,this.canvas.width=Math.round(this.width*this.ratio),this.canvas.height=Math.round(this.height*this.ratio),this.c.scale(this.ratio,this.ratio),this.draw()}select(e,t){this.events.emit(`select`,e)}dispose(){this.disposables.forEach(e=>e()),this.disposables.length=0,this.el.remove()}[Symbol.dispose](){this.dispose()}_font=`14px sans-serif`;_fontWidthCache=new Map;ellipsisWidth=0;getFontCache(){return this._fontWidthCache.has(this._font)||this._fontWidthCache.set(this._font,{}),this._fontWidthCache.get(this._font)}setFont(e){this._font=e,this.c.font=e,this.c.textBaseline=`middle`,this.ellipsisWidth=3*this.charCodeWidth(St)}charCodeWidth(e){let t=this.getFontCache(),n=t[e];return n===void 0&&(n=this.c.measureText(String.fromCharCode(e)).width,t[e]=n),n}textOverflowEllipsis(e,t){if(t<this.ellipsisWidth)return[``,0];let n=0,r=e.length,i=0;for(;i<r;){let r=this.charCodeWidth(e.charCodeAt(i));if(t<n+this.ellipsisWidth+r)return[`${e.slice(0,i)}...`,n+this.ellipsisWidth];n+=r,i++}return[e,n]}},J=24,Et=5,Dt=.01,Ot=1e3,kt=class extends Tt{mainEl=document.createElement(`div`);totalBytes;viewportMin;viewportMax;zoomedOutMin=0;zoomedOutWidth=0;prevWheelTime=0;prevWheelWasZoom=!1;stripeScaleAdjust=1;hoveredNode=null;selectedNode=null;nodeStartBytes=new Map;animationFromMin=0;animationFromMax=0;animationToMin=0;animationToMax=0;animationStart=0;constructor(e,t={}){super(e,t),this.totalBytes=e.size,this.viewportMin=this.animationFromMin=this.animationToMin=0,this.viewportMax=this.animationFromMax=this.animationToMax=this.totalBytes,Object.assign(this.mainEl.style,{position:`relative`}),Object.assign(this.canvas.style,{position:`absolute`,left:`0`,top:`0`});let n=!1;this.canvas.onmousedown=e=>{if(n=!1,e.button!==2){let t=e.pageX,r=e=>{let r=e.pageX-t;!n&&Math.abs(r)<3||(n=!0,this.modifyViewport(-r,0,null),t=e.pageX)},i=()=>{document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i)};e.preventDefault(),document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)}},this.canvas.onmousemove=e=>{this.updateHover(e)},this.canvas.onmouseout=()=>{this.changeHoveredNode(null)},this.canvas.onclick=e=>{if(n)return;let t=this.hitTestNode(e);this.changeHoveredNode(t),this.changeSelectedNode(t),t&&this.events.emit(`click`,t,e)},this.disposables.push(vt(e=>{let t=e.deltaX,n=e.deltaY,r=K(),i=r-this.prevWheelTime<50?this.prevWheelWasZoom:e.ctrlKey||e.metaKey;this.prevWheelTime=r,this.prevWheelWasZoom=i,(i||Math.abs(t)>=Math.abs(n))&&e.preventDefault(),this.modifyViewport(t,n,i?e.pageX:null),this.updateHover(e)})),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(yt(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(K()-this.animationStart)/(this.options.animateDuration??q.animateDuration);e<0||e>1?(e=1,this.viewportMin=this.animationToMin,this.viewportMax=this.animationToMax):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.viewportMin=this.animationFromMin+(this.animationToMin-this.animationFromMin)*e,this.viewportMax=this.animationFromMax+(this.animationToMax-this.animationFromMax)*e,this.invalidate()),this.draw()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.root,0,0,-1/0,1)}changeSelectedNode(e,t=this.options.animate??q.animate){if(this.selectedNode!==e&&(this.selectedNode=e,this.events.emit(`select`,e),e&&this.nodeStartBytes.has(e.id))){let n=this.nodeStartBytes.get(e.id),r=n+e.size;n=Math.max(0,n-e.size*Dt),r=Math.min(this.totalBytes,r+e.size*Dt),this.setViewport(n,r,t)}}select(e,t=this.options.animate??q.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*J+1,this.zoomedOutMin=this.width-Ot>>1,this.zoomedOutWidth=this.zoomedOutMin+Ot,this.zoomedOutMin<0&&(this.zoomedOutMin=0),this.zoomedOutWidth>this.width&&(this.zoomedOutWidth=this.width),this.zoomedOutWidth-=this.zoomedOutMin,this.stripeScaleAdjust=this.totalBytes/this.zoomedOutWidth,this.mainEl.style.height=`${this.height}px`,super.resize()}drawNode(e,t,n,r,i){this.nodeStartBytes.set(e.id,n);let a=this.zoomedOutWidth/(this.viewportMax-this.viewportMin),o=this.zoomedOutMin+(n-this.viewportMin)*a,s=e.size*a,c=o+s;if(c<r+1.5)return r;if(o+s<0||o>this.width)return c;let l=s<2?2:s,u=(o>0?o:0)+Et,d=t+J/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=rt(this.getColor(e)||this.palette.fallback,this.c,this.zoomedOutMin-this.viewportMin*a,J,a*this.stripeScaleAdjust),v=this.palette.text,y=-1/0;i&1?(v=this.palette.fg,this.setFont(wt)):(this.c.fillStyle=_,this.c.fillRect(o,t,l,J),(i&2||this.hoveredNode&&e.id===this.hoveredNode.id)&&(this.c.fillStyle=this.palette.hover,this.c.fillRect(o,t,l,J),i|=2)),this.ellipsisWidth<g&&(m=this.c.measureText(f).width,m<=g?h+=m:(f=this.textOverflowEllipsis(f,g)[0],h=g),this.c.fillStyle=v,this.c.fillText(f,u,d)),i&1&&this.setFont(Ct),h+this.ellipsisWidth<g&&(p&&f&&(p=` - ${p}`),m=this.c.measureText(p).width,h+m>g&&(p=this.textOverflowEllipsis(p,g-h)[0]),this.c.globalAlpha=.5,this.c.fillText(p,u+h,d),this.c.globalAlpha=1);for(let r of e.children)y=this.drawNode(r,t+J,n,y,i&-2),n+=r.size;return i&1||_t(this.c,this.palette.stroke,o+.5,t+.5,l,J),c}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=this.viewportMin+(this.viewportMax-this.viewportMin)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=(e,t,n)=>{if(i>=n&&i<n+e.size){if(r>=t&&r<t+J&&e.id)return e;if(r>=t+J)for(let r of e.children){let e=a(r,t+J,n);if(e)return e;n+=r.size}}return null};return a(this.root,0,0)}modifyViewport(e,t,n){let r=this.viewportMin,i=this.viewportMax,a=0;if(n!==null){let e=r+(i-r)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=1.01**t;r=e+(r-e)*a,i=e+(i-e)*a}else a=e*(i-r)/this.zoomedOutWidth;r+a<0?a=-r:i+a>this.totalBytes&&(a=this.totalBytes-i),r+=a,i+=a,r<0&&(r=0),i>this.totalBytes&&(i=this.totalBytes),this.setViewport(r,i,!1)}setViewport(e,t,n){this.animationFromMin=this.viewportMin,this.animationFromMax=this.viewportMax,this.animationToMin=e,this.animationToMax=t,n?this.animationStart=K():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};function At(e,t){for(;t;){if(t===e)return!0;t=t.parent}return!1}function Y(e,t,n){if(e===t)return;let r=t.parent,i=r.size||1,a=0;Y(e,r,n);for(let e of r.children){if(e===t){n.startAngle_+=n.sweepAngle_*a/i,n.sweepAngle_=e.size/i*n.sweepAngle_;break}a+=e.size}n.depth_+=1}var jt={};function Mt(e){return jt[e]||(jt[e]=400*Math.log(1+Math.log(1+e/8))),jt[e]}var X=-Math.PI/2,Nt=class extends Tt{currentNode;hoveredNode;centerX=0;centerY=0;animationStart=0;radiusScale=1;sourceDepth=0;sourceStartAngle=X;sourceSweepAngle=Math.PI*2;targetNode;targetDepth=this.sourceDepth;targetStartAngle=this.sourceStartAngle;targetSweepAngle=this.sourceSweepAngle;animatedNode;animatedDepth=this.sourceDepth;animatedStartAngle=this.sourceStartAngle;animatedSweepAngle=this.sourceSweepAngle;previousHoveredNode;historyStack=[];constructor(e,t={}){for(;e.children.length===1;)e=e.children[0];super(e,t),this.currentNode=e,this.targetNode=this.currentNode,this.animatedNode=this.currentNode,this.canvas.onmousemove=e=>{this.handleMouseMove(e)},this.canvas.onmouseout=e=>{this.changeHoveredNode(void 0),this.events.emit(`hover`,null,e)},this.canvas.onclick=e=>{let t=this.hitTestNode(e);if(!t)return;this.events.emit(`click`,t,e);let n=[];t===this.animatedNode.parent?this.historyStack.length>0&&(t=this.historyStack.pop(),n=this.historyStack.slice()):n=this.historyStack.concat(this.currentNode),this.events.emit(`click`,t,e),t.children.length>0?(this.select(t),this.historyStack=n):e.preventDefault()},this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(yt(()=>this.resize())),this.disposables.push(vt(e=>this.handleMouseMove(e)))}select(e,t){(this.currentNode!==e||this.root)&&(this.currentNode=e||this.root,this.updateSunburst(t),this.events.emit(`select`,e))}resize(){this.width=this.el.clientWidth,this.height=this.width,this.centerX=this.width>>1,this.centerY=this.height>>1;let e=2*Math.ceil(Mt(this.maxDepth));this.radiusScale=this.width/e,super.resize()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,3,-1/0),this.c.strokeStyle=this.palette.stroke,this.c.beginPath(),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,1,-1/0),this.c.stroke(),this.animatedDepth===0&&(this.c.fillStyle=this.palette.stroke,this.setFont(wt),this.c.textAlign=`center`,this.c.fillText(this.getSubtext(this.targetNode)??gt(this.targetNode.size),this.centerX,this.centerY))}drawNode(e,t,n,r,i,a,o){let s=this.computeRadius(t+1);if(s>this.centerY)return o;e===this.hoveredNode&&(a|=8);let c=(n+s)/2,l=r+i;if(l-o<1.5/c)return o;let u=2/c;if(i>u&&(u=i),a&2)this.c.fillStyle=rt(this.getColor(e)||this.palette.fallback,this.c,this.centerX,this.centerY,1),this.c.beginPath(),this.c.arc(this.centerX,this.centerY,n,r,r+u,!1),this.c.arc(this.centerX,this.centerY,s,r+u,r,!0),this.c.fill(),this.hoveredNode&&(a&8||e.parent===this.hoveredNode)&&(this.c.fillStyle=this.palette.hover,this.c.fill());else{let e=u===Math.PI*2,t=a&4||e?s:n;a&1&&n>0&&this.c.arc(this.centerX,this.centerY,n,r+u,r,!0),this.c.moveTo(this.centerX+t*Math.cos(r),this.centerY+t*Math.sin(r)),this.c.arc(this.centerX,this.centerY,s,r,r+u,!1),e||this.c.lineTo(this.centerX+n*Math.cos(r+u),this.centerY+n*Math.sin(r+u))}let d=e.size,f=a&10,p=0,m=-1/0;for(let n of e.children)m=this.drawNode(n,t+1,s,r+i*p/d,n.size/d*i,f,m),p+=n.size,f|=4;return l}changeHoveredNode(e,t){this.hoveredNode!==e&&(this.hoveredNode=e,this.updateSunburst(t))}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left-this.centerX,r=e.clientY-t.top-this.centerY,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n),o=(e,t,n,r,s)=>{let c=this.computeRadius(t+1);if(c>this.centerY)return;if(i>=n&&i<c){let t=a-r;if(t/=Math.PI*2,t-=Math.floor(t),t*=Math.PI*2,t<s)return e===this.animatedNode?e.parent:e}let l=e.size,u=0;for(let n of e.children){let e=o(n,t+1,c,r+s*u/l,n.size/l*s);if(e)return e;u+=n.size}};return o(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle)}tick(){let e=(K()-this.animationStart)/(this.options.animateDuration??q.animateDuration);e<0||e>1?(e=1,this.animatedNode=this.targetNode,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.invalidate()),this.animatedDepth=this.sourceDepth+(this.targetDepth-this.sourceDepth)*e,this.animatedStartAngle=this.sourceStartAngle+(this.targetStartAngle-this.sourceStartAngle)*e,this.animatedSweepAngle=this.sourceSweepAngle+(this.targetSweepAngle-this.sourceSweepAngle)*e,this.draw()}handleMouseMove(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),t&&t!==this.animatedNode.parent?(this.events.emit(`hover`,t,e),this.canvas.style.cursor=`pointer`):this.events.emit(`hover`,null,e)}computeRadius(e){return Mt(e)*this.radiusScale}updateSunburst(e=this.options.animate??!0){if(this.previousHoveredNode!==this.hoveredNode&&(this.previousHoveredNode=this.hoveredNode,this.hoveredNode||(this.canvas.style.cursor=`auto`,this.events.emit(`hover`,null)),this.invalidate()),this.targetNode!==this.currentNode){if(this.historyStack.length=0,this.invalidate(),e&&(this.animationStart=K()),At(this.animatedNode,this.currentNode)){let e={depth_:this.animatedDepth,startAngle_:this.animatedStartAngle,sweepAngle_:this.animatedSweepAngle};Y(this.animatedNode,this.currentNode,e),this.animatedDepth=e.depth_,this.animatedStartAngle=e.startAngle_,this.animatedSweepAngle=e.sweepAngle_,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2,this.animatedNode=this.currentNode}else if(At(this.currentNode,this.animatedNode)){let e={depth_:0,startAngle_:X,sweepAngle_:Math.PI*2};Y(this.currentNode,this.animatedNode,e),this.targetDepth=e.depth_,this.targetStartAngle=e.startAngle_,this.targetSweepAngle=e.sweepAngle_}else this.animationStart=-1/0,this.animatedNode=this.currentNode;this.sourceDepth=this.animatedDepth,this.sourceStartAngle=this.animatedStartAngle,this.sourceSweepAngle=this.animatedSweepAngle,this.targetNode=this.currentNode,this.events.emit(`select`,this.currentNode)}}},Z=4,Q=20,Pt=2*Z,$=Q+Z;function Ft(e,t,n,r,i){let a=[],o=(t,n,r,i,a)=>{let o=e[t].size*a,s=e[n].size*a;return Math.max(r*r*o/(i*i),i*i/(r*r*s))};return((t,n,r,i,s)=>{for(;t<e.length;){let c=0;for(let n=t;n<e.length;n++)c+=e[n].size;let l=Math.min(i,s),u=i*s/c,d=t,f=0,p=0;for(;d<e.length;){let n=e[d].size*u,r=o(t,d,l,f+n,u);if(d>t&&p<r)break;f+=n,p=r,d++}let m=Math.round(f/l),h=0;for(let o=t;o<d;o++){let t=e[o],c=t.size*u,d=Math.round(l*h/f),p=Math.round(l*(h+c)/f),[g,_,v,y]=i>=s?[n,r+d,m,p-d]:[n+d,r,p-d,m];a.push({node:t,box:[g,_,v,y],children:v>Pt&&y>$?Ft(t.children,g+Z,_+Q,v-Pt,y-$):[]}),h+=c}t=d,i>=s?(n+=m,i-=m):(r+=m,s-=m)}})(0,t,n,r,i),a}var It=class extends Tt{hoveredNode=null;currentNode=null;bgOriginX=0;bgOriginY=0;layers={base:null};baseLayoutCache;currentOriginX=0;currentOriginY=0;animationStart=0;animationBlend=1;animationSource=null;animationTarget=null;constructor(e,t={}){super(e,t),this.canvas.addEventListener(`mousemove`,e=>{this.updateHover(e)}),this.canvas.addEventListener(`mouseout`,e=>{this.changeHoveredNode(null),this.events.emit(`hover`,null,e)}),this.el.addEventListener(`click`,e=>{let t=this.hitTestNode(e);if(t){let n=t.node;this.events.emit(`click`,n,e),n.children.length?t===this.layers.current?this.updateHover(e):(this.changeCurrentLayout(t),this.changeHoveredNode(null)):this.updateHover(e)}else this.currentNode&&(this.changeCurrentLayout(null),this.updateHover(e))}),this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(vt(e=>this.updateHover(e))),this.disposables.push(yt(()=>this.resize()))}select(e,t){let n=null;e===this.root&&(e=null),n=e?this.searchFor([this.layers.current,this.layers.base],e):null,this.changeCurrentLayout(n,t)}drawBaseLayout(){!this.width||!this.height||(this.c.clearRect(0,0,this.width,this.height),this.bgOriginX=this.bgOriginY=0,this.baseLayoutCache?this.c.putImageData(this.baseLayoutCache,0,0):(this.drawLayout(this.layers.base,0,[]),this.baseLayoutCache=this.c.getImageData(0,0,this.width*this.ratio,this.height*this.ratio)))}draw(){this.drawBaseLayout(),this.layers.current||this.drawHoverHighlight(this.layers.base);let e=this.layers.current?this.animationSource?this.animationTarget?1:1-this.animationBlend:this.animationBlend:0;if(this.layers.current){let[t,n,r,i]=this.layers.base.box;this.c.globalAlpha=.6*(!this.layers.current||!this.animationSource?1:e),this.c.fillStyle=this.palette.bg,this.c.fillRect(t,n,r,i),this.c.globalAlpha=1}if(this.layers.previous&&this.drawLayout(this.layers.previous,1,[this.layers.current]),this.layers.current){let[t,n,r,i]=this.layers.current.box,a=this.c.getTransform(),o=Math.sqrt(a.a*a.d);this.c.save(),this.c.shadowColor=this.palette.shadow,this.c.shadowBlur=30*e*o,this.c.shadowOffsetX=o*(2*this.width),this.c.shadowOffsetY=o*(2*this.height+15*e),this.c.fillRect(t-2*this.width,n-2*this.height,r,i),this.c.restore(),this.bgOriginX=this.currentOriginX,this.bgOriginY=this.currentOriginY,this.drawLayout(this.layers.current,0,[]),this.drawHoverHighlight(this.layers.current)}}tick(){let e=this.animationBlend,t=this.currentNode;this.animationBlend=(K()-this.animationStart)/(this.options.animateDuration??q.animateDuration),this.animationBlend<0||this.animationBlend>1?(this.currentNode=this.animationTarget,this.layers.previous=void 0,this.animationBlend=1):(this.animationBlend=1-this.animationBlend,this.animationBlend*=this.animationBlend*this.animationBlend,this.animationBlend=1-this.animationBlend,this.invalidate()),(this.animationBlend!==e||this.currentNode!==t)&&this.updateCurrentLayout(),this.draw()}resize(){this.baseLayoutCache=void 0;let e=this.width,t=this.height;this.width=Math.min(this.el.clientWidth,1600),this.height=Math.max(Math.round(this.width/2),innerHeight-200),(this.width!==e||this.height!==t||!this.layers.base)&&(this.layers.base=Ft([this.root],0,0,this.width-1,this.height-1)[0],this.updateCurrentLayout()),super.resize()}*iterateNodeToDraw(e,t,n){let r=e.node,[i,a,o,s]=e.box,c=(r===this.hoveredNode?1:0)|(e===this.animationTarget?2:0);if(t===1)for(let e of n){if(!e)continue;let[n,r,c,l]=e.box;if(i>=n&&a>=r&&i+o<=n+c&&a+s<=r+l){t=2;break}}for(let r of e.children)c|=yield*this.iterateNodeToDraw(r,t,n);return t!==2&&(yield e),c}drawHoverHighlight(e){let t=this.iterateNodeToDraw(e,0,[]),n=this.c.globalCompositeOperation;for(;;){let e=t.next();if(e.done){this.c.globalCompositeOperation=n;return}let r=e.value.node;if(this.hoveredNode===r){this.c.globalCompositeOperation=`overlay`;let[t,n,r,i]=e.value.box;this.c.fillStyle=this.palette.hover,this.c.fillRect(t,n,r,i)}}}drawNodeBackground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return e.value;let[t,n,i,a]=e.value.box;this.c.fillStyle=rt(this.getColor(e.value.node)||this.palette.fallback,this.c,this.bgOriginX,this.bgOriginY,1),e.value.children.length?(this.c.fillRect(t,n,i,Q),this.c.fillRect(t,n+a-Z,i,Z),this.c.fillRect(t,n+Q,Z,a-$),this.c.fillRect(t+i-Z,n+Q,Z,a-$)):this.c.fillRect(t,n,i,a)}}drawLayout(e,t,n){this.drawNodeBackground(e,t,n),this.drawNodeForeground(e,t,n)}drawNodeForeground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return;let t=e.value.node,[n,i,a,o]=e.value.box;if(_t(this.c,this.palette.stroke,n+.5,i+.5,a,o),o>=Q){this.c.fillStyle=this.palette.text;let e=a-Pt,r=i+Math.round($/2),[s,c]=this.textOverflowEllipsis(this.getText(t)||``,e),l=n+Math.round((a-c)/2),u=this.getText(t),d=this.getSubtext(t);if(s===u&&t.children.length){let t=d||``;t&&u&&(t=` - ${t}`);let[i,o]=this.textOverflowEllipsis(t,e-c);l=n+Math.round((a-c-o)/2),this.c.globalAlpha=.5,this.c.fillText(i,l+c,r),this.c.globalAlpha=1}if(this.c.fillText(s,l,r),o>$+16&&!t.children.length){let[t,r]=this.textOverflowEllipsis(d||``,e);this.c.globalAlpha=.5;let s=u?Q:Q/2+Z;this.c.fillText(t,n+Math.round((a-r)/2),i+s+Math.round(o-$)/2),this.c.globalAlpha=1}}}}updateCurrentLayout(){let e=this.options.selectedPaddingRatio??.2;if(this.currentNode){let[t,n,r,i]=this.currentNode.box,a=t+r,o=n+i,s=Math.round(this.width*e/2),c=Math.round(this.height*e/2),l=this.width-s-1,u=this.height-c-1,d=this.animationTarget?this.animationBlend:1-this.animationBlend,f=Math.round(t+(s-t)*d),p=Math.round(n+(c-n)*d),m=Math.round(a+(l-a)*d),h=Math.round(o+(u-o)*d),g=e=>e-Math.floor(e/64-.5)*64;this.layers.current=Ft([this.currentNode.node],f,p,m-f,h-p)[0],this.currentOriginX=g(-(t+a)/2)*(1-d)+(f+m)/2,this.currentOriginY=g(-(n+o)/2)*(1-d)+(p+h)/2}else this.layers.current=void 0,this.currentOriginX=0,this.currentOriginY=0}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=(e,t)=>{for(let a of e){let[e,o,s,c]=a.box;if(n>=e&&r>=o&&n<e+s&&r<o+c)return i(a.children,!1)||(t?null:a)}return null};return this.layers.current?i([this.layers.current],!1):i([this.layers.base],!0)}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t&&t.node),this.events.emit(`hover`,t?.node||null,e)}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}searchFor(e,t){for(let n of e){if(!n)continue;let e=n.node===t?n:this.searchFor(n.children,t);if(e)return e}return null}changeCurrentLayout(e,t=this.options.animate){this.animationTarget!==e&&(this.events.emit(`select`,e?.node||null),this.layers.previous=e?this.layers.current:void 0,t&&(this.animationBlend=0,this.animationStart=K(),this.animationSource=this.currentNode),this.animationTarget=e,this.currentNode=e||this.searchFor([this.layers.base],this.currentNode.node),this.updateCurrentLayout(),this.invalidate())}},Lt={flex:`~ gap-1 items-center wrap`},Rt={key:0,"i-ph-arrow-right-bold":``,"text-sm":``,"op-fade":``},zt=[`onClick`],Bt=ne({__name:`NavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=h(()=>{let e=[],t=n.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,t)=>(w(),x(`div`,Lt,[(w(!0),x(ie,null,u(i.value,(e,t)=>(w(),x(ie,{key:e.id},[t>0?(w(),x(`div`,Rt)):_(``,!0),te(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>r(`select`,e)},[te(`span`,null,re(e.text||e.id),1)],8,zt)],64))),128))]))}}),Vt=Object.assign(Bt,{__name:`ChartNavBreadcrumb`});function Ht(t){let{data:r,nameKey:i,sizeKey:a,rootText:s,nodeType:c,graphOptions:l,onUpdate:u}=t,d=f(void 0),p=f(void 0),_=C(void 0),v=f(void 0),y,b=h(()=>{if(t.tree)return t.tree.value;let n=e(r),o=new Map,l=0,u={id:`~root`,text:s,size:0,sizeSelf:0,children:[]};if(!n?.length)return{map:o,root:u,maxDepth:l};let d=[];d.unshift(()=>{u.size+=u.children.reduce((e,t)=>e+t.size,0),u.subtext=T(u.size).join(` `),u.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function f(e,t,n,r,i){if(o.has(t))return o.get(t);i>l&&(l=i);let a={id:t,text:n,size:0,sizeSelf:0,children:[],meta:{...e,path:n,type:`folder`},parent:r};return o.set(t,a),r.children.push(a),d.unshift(()=>{let t=a.sizeSelf;a.size+=a.children.reduce((e,t)=>e+t.size,0),a.subtext=T(a.size).join(` `),a.children.length&&t/a.size>.1&&a.children.push({id:`${a.id}-self`,text:``,size:t,sizeSelf:t,subtext:T(t).join(` `),children:[],meta:{...e,path:``,type:c},parent:a}),a.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),a}function p(e){let t=e[i].split(`/`).filter(Boolean),n=u,r=``,s=0;t.forEach((l,u)=>{if(r+=(r?`/`:``)+l,s++,u===t.length-1){let t={id:e[i],text:l,size:e[a],sizeSelf:e[a],subtext:T(e[a]).join(` `),children:[],meta:{...e,path:l,type:c}};n.children.push(t),o.set(e[i],t)}else n=f(e,r,l,n,s)})}return n.forEach(p),d.forEach(e=>e()),{map:o,root:u,maxDepth:l}}),ee=h(()=>({animate:oe.value.chartAnimation,palette:{stroke:m.value?`#222`:`#555`,fg:m.value?`#fff`:`#000`,bg:m.value?`#111`:`#fff`},getColor:ot(b.value.root,m.value?.8:.9,m.value?1:1.1),getSubtext:e=>e.subtext,...l}));function x(e,t){_.value=e?.meta,e?.children.length||(e=e?.parent),v.value?.select(e,t)}function S(){y?.(),p.value=b.value.root,u?.(),g(()=>{let e=_.value&&b.value.map.get(_.value[i])||null;e&&x(e,!1)}),y=()=>{v.value?.dispose(),v.value=void 0,_.value=void 0}}return g(()=>{o(()=>[b.value,ee.value],()=>{S()},{deep:!0,immediate:!1}),S()}),n(()=>{y?.()}),{tree:b,graph:v,chartOptions:ee,nodeHover:d,nodeSelected:p,selectedNode:_,selectNode:x,buildGraph:S}}export{It as a,Ze as c,Nt as i,Vt as n,it as o,kt as r,ut as s,Ht as t};
|
|
1
|
+
import{$t as e,A as t,Ct as n,D as r,F as i,It as a,Lt as o,M as s,N as c,O as l,Ot as u,P as d,Yt as f,Zt as p,a as m,at as h,bt as g,ct as _,it as v,j as y,k as b,kt as ee,lt as x,nn as S,ot as te,pt as ne,qt as C,rn as re,rt as ie,st as ae,wt as w}from"#entry";import{t as T}from"./D04G8HHr.js";import{t as oe}from"./CKFsAdVO.js";function E(){return typeof window<`u`}function D(e){return se(e)?(e.nodeName||``).toLowerCase():`#document`}function O(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function k(e){return((se(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function se(e){return E()?e instanceof Node||e instanceof O(e).Node:!1}function A(e){return E()?e instanceof Element||e instanceof O(e).Element:!1}function j(e){return E()?e instanceof HTMLElement||e instanceof O(e).HTMLElement:!1}function ce(e){return!E()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof O(e).ShadowRoot}var le=new Set([`inline`,`contents`]);function M(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=I(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!le.has(i)}var ue=new Set([`table`,`td`,`th`]);function de(e){return ue.has(D(e))}var fe=[`:popover-open`,`:modal`];function N(e){return fe.some(t=>{try{return e.matches(t)}catch{return!1}})}var pe=[`transform`,`translate`,`scale`,`rotate`,`perspective`],me=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],he=[`paint`,`layout`,`strict`,`content`];function ge(e){let t=P(),n=A(e)?I(e):e;return pe.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||me.some(e=>(n.willChange||``).includes(e))||he.some(e=>(n.contain||``).includes(e))}function _e(e){let t=R(e);for(;j(t)&&!F(t);){if(ge(t))return t;if(N(t))return null;t=R(t)}return null}function P(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var ve=new Set([`html`,`body`,`#document`]);function F(e){return ve.has(D(e))}function I(e){return O(e).getComputedStyle(e)}function L(e){return A(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function R(e){if(D(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ce(e)&&e.host||k(e);return ce(t)?t.host:t}function ye(e){let t=R(e);return F(t)?e.ownerDocument?e.ownerDocument.body:e.body:j(t)&&M(t)?t:ye(t)}function z(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ye(e),i=r===e.ownerDocument?.body,a=O(r);if(i){let e=be(a);return t.concat(a,a.visualViewport||[],M(r)?r:[],e&&n?z(e):[])}return t.concat(r,z(r,[],n))}function be(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xe(e){let t=I(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=j(e),o=a?e.offsetWidth:n,s=a?e.offsetHeight:r,c=i(n)!==o||i(r)!==s;return c&&(n=o,r=s),{width:n,height:r,$:c}}function Se(e){return A(e)?e:e.contextElement}function B(e){let t=Se(e);if(!j(t))return y(1);let n=t.getBoundingClientRect(),{width:r,height:a,$:o}=xe(t),s=(o?i(n.width):n.width)/r,c=(o?i(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ce=y(0);function we(e){let t=O(e);return!P()||!t.visualViewport?Ce:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Te(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==O(e)?!1:t}function V(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Se(e),o=y(1);t&&(r?A(r)&&(o=B(r)):o=B(e));let s=Te(a,n,r)?we(a):y(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(a){let e=O(a),t=r&&A(r)?O(r):r,n=e,i=be(n);for(;i&&r&&t!==n;){let e=B(i),t=i.getBoundingClientRect(),r=I(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,f*=e.y,c+=a,l+=o,n=O(i),i=be(n)}}return d({width:u,height:f,x:c,y:l})}function H(e,t){let n=L(e).scrollLeft;return t?t.left+n:V(k(e)).left+n}function Ee(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-H(e,n),y:n.top+t.scrollTop}}function De(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=k(r),s=t?N(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=y(1),u=y(0),d=j(r);if((d||!d&&!a)&&((D(r)!==`body`||M(o))&&(c=L(r)),j(r))){let e=V(r);l=B(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ee(o,c):y(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Oe(e){return Array.from(e.getClientRects())}function ke(e){let t=k(e),n=L(e),r=e.ownerDocument.body,i=s(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=s(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+H(e),c=-n.scrollTop;return I(r).direction===`rtl`&&(o+=s(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:c}}var Ae=25;function je(e,t){let n=O(e),r=k(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=P();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=H(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Ae&&(a-=o)}else l<=Ae&&(a+=l);return{width:a,height:o,x:s,y:c}}var Me=new Set([`absolute`,`fixed`]);function Ne(e,t){let n=V(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=j(e)?B(e):y(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Pe(e,t,n){let r;if(t===`viewport`)r=je(e,n);else if(t===`document`)r=ke(k(e));else if(A(t))r=Ne(t,n);else{let n=we(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return d(r)}function Fe(e,t){let n=R(e);return n===t||!A(n)||F(n)?!1:I(n).position===`fixed`||Fe(n,t)}function Ie(e,t){let n=t.get(e);if(n)return n;let r=z(e,[],!1).filter(e=>A(e)&&D(e)!==`body`),i=null,a=I(e).position===`fixed`,o=a?R(e):e;for(;A(o)&&!F(o);){let t=I(o),n=ge(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Me.has(i.position)||M(o)&&!n&&Fe(e,o))?r=r.filter(e=>e!==o):i=t,o=R(o)}return t.set(e,r),r}function Le(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?N(t)?[]:Ie(t,this._c):[].concat(n),r],o=a[0],l=a.reduce((e,n)=>{let r=Pe(t,n,i);return e.top=s(r.top,e.top),e.right=c(r.right,e.right),e.bottom=c(r.bottom,e.bottom),e.left=s(r.left,e.left),e},Pe(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Re(e){let{width:t,height:n}=xe(e);return{width:t,height:n}}function ze(e,t,n){let r=j(t),i=k(t),a=n===`fixed`,o=V(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=y(0);function l(){c.x=H(i)}if(r||!r&&!a)if((D(t)!==`body`||M(i))&&(s=L(t)),r){let e=V(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Ee(i,s):y(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Be(e){return I(e).position===`static`}function Ve(e,t){if(!j(e)||I(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return k(e)===n&&(n=n.ownerDocument.body),n}function He(e,t){let n=O(e);if(N(e))return n;if(!j(e)){let t=R(e);for(;t&&!F(t);){if(A(t)&&!Be(t))return t;t=R(t)}return n}let r=Ve(e,t);for(;r&&de(r)&&Be(r);)r=Ve(r,t);return r&&F(r)&&Be(r)&&!ge(r)?n:r||_e(e)||n}var Ue=async function(e){let t=this.getOffsetParent||He,n=this.getDimensions,r=await n(e.floating);return{reference:ze(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function We(e){return I(e).direction===`rtl`}var Ge={convertOffsetParentRelativeRectToViewportRelativeRect:De,getDocumentElement:k,getClippingRect:Le,getOffsetParent:He,getElementRects:Ue,getClientRects:Oe,getDimensions:Re,getScale:B,isElement:A,isRTL:We},Ke=b,qe=t,Je=l,Ye=(e,t,n)=>{let i=new Map,a={platform:Ge,...n},o={...a.platform,_c:i};return r(e,t,{...a,platform:o})},Xe=ne({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:t,hoverY:n}=p(e),r=a(`hoverElement`),i=C(0),s=C(0);return o([t,n],([e,t])=>{Ye({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},r.value,{placement:`right-start`,middleware:[Je(),qe(),Ke({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{i.value=e,s.value=t})}),(e,t)=>(w(),ae(v,{to:`body`},[te(`div`,{ref_key:`hoverElement`,ref:r,fixed:``,"z-panel-content":``,"pointer-events-none":``,style:S({left:`${i.value}px`,top:`${s.value}px`})},[ee(e.$slots,`default`)],4)]))}}),Ze=Object.assign(Xe,{__name:`DisplayGraphHoverView`});function Qe(e,t=1,n=1){let r=(.6+.4*Math.max(0,Math.cos(e)))*t,i=(.5+.2*Math.max(0,Math.cos(e+Math.PI*2/3)))*n;return`hsl(${e*180/Math.PI}deg, ${Math.round(100*r)}%, ${Math.round(100*i)}%)`}var $e,et,tt,U,W,G=1,nt;function rt(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if($e!==t||et!==a||tt!==i){let n=Math.round(64*a)/64;G=i,G=Math.log2(G),G-=Math.floor(G);let r=G,o=Math.min(1,8*r);G=2**G;let s=8*Math.SQRT2/G;$e=t,et=a,tt=i,U||=document.createElement(`canvas`),W||=U.getContext(`2d`),U.width=U.height=Math.round(64*n),W.scale(n,n),W.fillStyle=e[0],W.fillRect(0,0,64,64),W.globalAlpha=.25,W.fillStyle=e[1],W.fillRect(0,0,64,64),W.globalAlpha=.67,W.strokeStyle=e[1],W.beginPath();for(let e=0;e<=64;e+=16)W.moveTo(e-32,e+32),W.lineTo(e+32,e-32);if(W.lineWidth=s*(1-(o-r)/2),W.stroke(),o+r>0){W.beginPath();for(let e=8;e<64;e+=16)W.moveTo(e-32,e+32),W.lineTo(e+32,e-32);W.lineWidth=s*(o+r)/2,W.stroke()}nt=t.createPattern(U,`repeat`),G/=n}return n/=64*G*a,n-=Math.floor(n),n*=64*G*a,nt.setTransform(new DOMMatrix([G,0,0,G,n,r])),nt}function it(e){return Array.isArray(e)?`url('data:image/svg+xml,<svg width="26" height="26" xmlns="http://www.w3.org/2000/svg"><rect width="26" height="26" fill="${e[0]}"/><rect width="26" height="26" fill="${e[1]}" fill-opacity="25%"/><path d="M22.5 -3.5L-3.5 22.5M35.5 9.5L9.5 35.5" stroke="${e[1]}" stroke-opacity="67%" stroke-width="9.19239"/></svg>')`:e}function at(e){return t=>t.id&&e[t.id]||t.color}function ot(e,t=1,n=1){let r={};return st(r,e,0,Math.PI*2,t,n),at(r)}function st(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=Qe(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;st(e,s,n,t,i,a),n+=t}}var ct=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function lt(e=16,t=ct){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function ut(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=lt(),r.parent||=t,r.children||=[],r.sizeSelf==null&&r.size!=null&&r.children.length===0?r.sizeSelf=r.size:r.sizeSelf||=0,r.children=(r.children||[]).map(e=>ut(e,r,n)),r.size||=r.children.reduce((e,t)=>e+t.size,0)+r.sizeSelf,n&&r.children.sort(n),Object.defineProperty(r,`__nanovis`,{enumerable:!1,value:!0}),r}function dt(e){return e.children.length===0?1:Math.max(...e.children.map(e=>dt(e)))+1}var ft=/\bFirefox\//.test(navigator.userAgent),pt;function mt(e){return pt?pt.format(e):`${e}`}function K(){return(window.performance||Date).now()}function ht(e){let t=e.toFixed(1).split(`.`,2);return`${mt(+t[0])}.${t[1]}`}function gt(e){return e===1?`1 byte`:e<1024?`${mt(e)} bytes`:e<1024*1024?`${ht(e/1024)} kb`:e<1024*1024*1024?`${ht(e/(1024*1024))} mb`:`${ht(e/(1024*1024*1024))} gb`}function _t(e,t,n,r,i,a){if(ft){let o=e.lineWidth,s=o/2;e.fillStyle=t,e.fillRect(n-s,r-s,i+o,o),e.fillRect(n-s,r+s,o,a-o),e.fillRect(n-s,r+a-s,i+o,o),e.fillRect(n+i-s,r+s,o,a-o);return}e.strokeStyle=t,e.strokeRect(n,r,i,a)}function vt(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function yt(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{pt=new Intl.NumberFormat}catch{}var bt=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r<i;r++)n[r](...t)},events:{},on(e,t){return(this.events[e]||=[]).push(t),()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}}),q={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},xt={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},St=46,Ct=`14px sans-serif`,wt=`bold ${Ct}`,Tt=class{el;canvas;c;width=0;height=0;ratio=1;root;maxDepth;events;options;palette;disposables;getColor;getText;getSubtext;_animationFrame=null;constructor(e,t){this.options={...q,...t};let{getColor:n=ot(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...xt,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=dt(e),this.disposables=[],this.events=bt(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(Ct),t.onClick&&this.events.on(`click`,t.onClick),t.onHover&&this.events.on(`hover`,t.onHover),t.onLeave&&this.events.on(`leave`,t.onLeave),t.onSelect&&this.events.on(`select`,t.onSelect),this.el.addEventListener(`mouseleave`,()=>{this.events.emit(`leave`)})}invalidate(){this._animationFrame===null&&(this._animationFrame=requestAnimationFrame(()=>{this._animationFrame=null,this.tick()}))}tick(){this.draw()}draw(){}resize(){this.ratio=window.devicePixelRatio||1,this.canvas.style.width=`${this.width}px`,this.canvas.style.height=`${this.height}px`,this.canvas.width=Math.round(this.width*this.ratio),this.canvas.height=Math.round(this.height*this.ratio),this.c.scale(this.ratio,this.ratio),this.draw()}select(e,t){this.events.emit(`select`,e)}dispose(){this.disposables.forEach(e=>e()),this.disposables.length=0,this.el.remove()}[Symbol.dispose](){this.dispose()}_font=`14px sans-serif`;_fontWidthCache=new Map;ellipsisWidth=0;getFontCache(){return this._fontWidthCache.has(this._font)||this._fontWidthCache.set(this._font,{}),this._fontWidthCache.get(this._font)}setFont(e){this._font=e,this.c.font=e,this.c.textBaseline=`middle`,this.ellipsisWidth=3*this.charCodeWidth(St)}charCodeWidth(e){let t=this.getFontCache(),n=t[e];return n===void 0&&(n=this.c.measureText(String.fromCharCode(e)).width,t[e]=n),n}textOverflowEllipsis(e,t){if(t<this.ellipsisWidth)return[``,0];let n=0,r=e.length,i=0;for(;i<r;){let r=this.charCodeWidth(e.charCodeAt(i));if(t<n+this.ellipsisWidth+r)return[`${e.slice(0,i)}...`,n+this.ellipsisWidth];n+=r,i++}return[e,n]}},J=24,Et=5,Dt=.01,Ot=1e3,kt=class extends Tt{mainEl=document.createElement(`div`);totalBytes;viewportMin;viewportMax;zoomedOutMin=0;zoomedOutWidth=0;prevWheelTime=0;prevWheelWasZoom=!1;stripeScaleAdjust=1;hoveredNode=null;selectedNode=null;nodeStartBytes=new Map;animationFromMin=0;animationFromMax=0;animationToMin=0;animationToMax=0;animationStart=0;constructor(e,t={}){super(e,t),this.totalBytes=e.size,this.viewportMin=this.animationFromMin=this.animationToMin=0,this.viewportMax=this.animationFromMax=this.animationToMax=this.totalBytes,Object.assign(this.mainEl.style,{position:`relative`}),Object.assign(this.canvas.style,{position:`absolute`,left:`0`,top:`0`});let n=!1;this.canvas.onmousedown=e=>{if(n=!1,e.button!==2){let t=e.pageX,r=e=>{let r=e.pageX-t;!n&&Math.abs(r)<3||(n=!0,this.modifyViewport(-r,0,null),t=e.pageX)},i=()=>{document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i)};e.preventDefault(),document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)}},this.canvas.onmousemove=e=>{this.updateHover(e)},this.canvas.onmouseout=()=>{this.changeHoveredNode(null)},this.canvas.onclick=e=>{if(n)return;let t=this.hitTestNode(e);this.changeHoveredNode(t),this.changeSelectedNode(t),t&&this.events.emit(`click`,t,e)},this.disposables.push(vt(e=>{let t=e.deltaX,n=e.deltaY,r=K(),i=r-this.prevWheelTime<50?this.prevWheelWasZoom:e.ctrlKey||e.metaKey;this.prevWheelTime=r,this.prevWheelWasZoom=i,(i||Math.abs(t)>=Math.abs(n))&&e.preventDefault(),this.modifyViewport(t,n,i?e.pageX:null),this.updateHover(e)})),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(yt(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(K()-this.animationStart)/(this.options.animateDuration??q.animateDuration);e<0||e>1?(e=1,this.viewportMin=this.animationToMin,this.viewportMax=this.animationToMax):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.viewportMin=this.animationFromMin+(this.animationToMin-this.animationFromMin)*e,this.viewportMax=this.animationFromMax+(this.animationToMax-this.animationFromMax)*e,this.invalidate()),this.draw()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.root,0,0,-1/0,1)}changeSelectedNode(e,t=this.options.animate??q.animate){if(this.selectedNode!==e&&(this.selectedNode=e,this.events.emit(`select`,e),e&&this.nodeStartBytes.has(e.id))){let n=this.nodeStartBytes.get(e.id),r=n+e.size;n=Math.max(0,n-e.size*Dt),r=Math.min(this.totalBytes,r+e.size*Dt),this.setViewport(n,r,t)}}select(e,t=this.options.animate??q.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*J+1,this.zoomedOutMin=this.width-Ot>>1,this.zoomedOutWidth=this.zoomedOutMin+Ot,this.zoomedOutMin<0&&(this.zoomedOutMin=0),this.zoomedOutWidth>this.width&&(this.zoomedOutWidth=this.width),this.zoomedOutWidth-=this.zoomedOutMin,this.stripeScaleAdjust=this.totalBytes/this.zoomedOutWidth,this.mainEl.style.height=`${this.height}px`,super.resize()}drawNode(e,t,n,r,i){this.nodeStartBytes.set(e.id,n);let a=this.zoomedOutWidth/(this.viewportMax-this.viewportMin),o=this.zoomedOutMin+(n-this.viewportMin)*a,s=e.size*a,c=o+s;if(c<r+1.5)return r;if(o+s<0||o>this.width)return c;let l=s<2?2:s,u=(o>0?o:0)+Et,d=t+J/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=rt(this.getColor(e)||this.palette.fallback,this.c,this.zoomedOutMin-this.viewportMin*a,J,a*this.stripeScaleAdjust),v=this.palette.text,y=-1/0;i&1?(v=this.palette.fg,this.setFont(wt)):(this.c.fillStyle=_,this.c.fillRect(o,t,l,J),(i&2||this.hoveredNode&&e.id===this.hoveredNode.id)&&(this.c.fillStyle=this.palette.hover,this.c.fillRect(o,t,l,J),i|=2)),this.ellipsisWidth<g&&(m=this.c.measureText(f).width,m<=g?h+=m:(f=this.textOverflowEllipsis(f,g)[0],h=g),this.c.fillStyle=v,this.c.fillText(f,u,d)),i&1&&this.setFont(Ct),h+this.ellipsisWidth<g&&(p&&f&&(p=` - ${p}`),m=this.c.measureText(p).width,h+m>g&&(p=this.textOverflowEllipsis(p,g-h)[0]),this.c.globalAlpha=.5,this.c.fillText(p,u+h,d),this.c.globalAlpha=1);for(let r of e.children)y=this.drawNode(r,t+J,n,y,i&-2),n+=r.size;return i&1||_t(this.c,this.palette.stroke,o+.5,t+.5,l,J),c}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=this.viewportMin+(this.viewportMax-this.viewportMin)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=(e,t,n)=>{if(i>=n&&i<n+e.size){if(r>=t&&r<t+J&&e.id)return e;if(r>=t+J)for(let r of e.children){let e=a(r,t+J,n);if(e)return e;n+=r.size}}return null};return a(this.root,0,0)}modifyViewport(e,t,n){let r=this.viewportMin,i=this.viewportMax,a=0;if(n!==null){let e=r+(i-r)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=1.01**t;r=e+(r-e)*a,i=e+(i-e)*a}else a=e*(i-r)/this.zoomedOutWidth;r+a<0?a=-r:i+a>this.totalBytes&&(a=this.totalBytes-i),r+=a,i+=a,r<0&&(r=0),i>this.totalBytes&&(i=this.totalBytes),this.setViewport(r,i,!1)}setViewport(e,t,n){this.animationFromMin=this.viewportMin,this.animationFromMax=this.viewportMax,this.animationToMin=e,this.animationToMax=t,n?this.animationStart=K():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};function At(e,t){for(;t;){if(t===e)return!0;t=t.parent}return!1}function Y(e,t,n){if(e===t)return;let r=t.parent,i=r.size||1,a=0;Y(e,r,n);for(let e of r.children){if(e===t){n.startAngle_+=n.sweepAngle_*a/i,n.sweepAngle_=e.size/i*n.sweepAngle_;break}a+=e.size}n.depth_+=1}var jt={};function Mt(e){return jt[e]||(jt[e]=400*Math.log(1+Math.log(1+e/8))),jt[e]}var X=-Math.PI/2,Nt=class extends Tt{currentNode;hoveredNode;centerX=0;centerY=0;animationStart=0;radiusScale=1;sourceDepth=0;sourceStartAngle=X;sourceSweepAngle=Math.PI*2;targetNode;targetDepth=this.sourceDepth;targetStartAngle=this.sourceStartAngle;targetSweepAngle=this.sourceSweepAngle;animatedNode;animatedDepth=this.sourceDepth;animatedStartAngle=this.sourceStartAngle;animatedSweepAngle=this.sourceSweepAngle;previousHoveredNode;historyStack=[];constructor(e,t={}){for(;e.children.length===1;)e=e.children[0];super(e,t),this.currentNode=e,this.targetNode=this.currentNode,this.animatedNode=this.currentNode,this.canvas.onmousemove=e=>{this.handleMouseMove(e)},this.canvas.onmouseout=e=>{this.changeHoveredNode(void 0),this.events.emit(`hover`,null,e)},this.canvas.onclick=e=>{let t=this.hitTestNode(e);if(!t)return;this.events.emit(`click`,t,e);let n=[];t===this.animatedNode.parent?this.historyStack.length>0&&(t=this.historyStack.pop(),n=this.historyStack.slice()):n=this.historyStack.concat(this.currentNode),this.events.emit(`click`,t,e),t.children.length>0?(this.select(t),this.historyStack=n):e.preventDefault()},this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(yt(()=>this.resize())),this.disposables.push(vt(e=>this.handleMouseMove(e)))}select(e,t){(this.currentNode!==e||this.root)&&(this.currentNode=e||this.root,this.updateSunburst(t),this.events.emit(`select`,e))}resize(){this.width=this.el.clientWidth,this.height=this.width,this.centerX=this.width>>1,this.centerY=this.height>>1;let e=2*Math.ceil(Mt(this.maxDepth));this.radiusScale=this.width/e,super.resize()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,3,-1/0),this.c.strokeStyle=this.palette.stroke,this.c.beginPath(),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,1,-1/0),this.c.stroke(),this.animatedDepth===0&&(this.c.fillStyle=this.palette.stroke,this.setFont(wt),this.c.textAlign=`center`,this.c.fillText(this.getSubtext(this.targetNode)??gt(this.targetNode.size),this.centerX,this.centerY))}drawNode(e,t,n,r,i,a,o){let s=this.computeRadius(t+1);if(s>this.centerY)return o;e===this.hoveredNode&&(a|=8);let c=(n+s)/2,l=r+i;if(l-o<1.5/c)return o;let u=2/c;if(i>u&&(u=i),a&2)this.c.fillStyle=rt(this.getColor(e)||this.palette.fallback,this.c,this.centerX,this.centerY,1),this.c.beginPath(),this.c.arc(this.centerX,this.centerY,n,r,r+u,!1),this.c.arc(this.centerX,this.centerY,s,r+u,r,!0),this.c.fill(),this.hoveredNode&&(a&8||e.parent===this.hoveredNode)&&(this.c.fillStyle=this.palette.hover,this.c.fill());else{let e=u===Math.PI*2,t=a&4||e?s:n;a&1&&n>0&&this.c.arc(this.centerX,this.centerY,n,r+u,r,!0),this.c.moveTo(this.centerX+t*Math.cos(r),this.centerY+t*Math.sin(r)),this.c.arc(this.centerX,this.centerY,s,r,r+u,!1),e||this.c.lineTo(this.centerX+n*Math.cos(r+u),this.centerY+n*Math.sin(r+u))}let d=e.size,f=a&10,p=0,m=-1/0;for(let n of e.children)m=this.drawNode(n,t+1,s,r+i*p/d,n.size/d*i,f,m),p+=n.size,f|=4;return l}changeHoveredNode(e,t){this.hoveredNode!==e&&(this.hoveredNode=e,this.updateSunburst(t))}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left-this.centerX,r=e.clientY-t.top-this.centerY,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n),o=(e,t,n,r,s)=>{let c=this.computeRadius(t+1);if(c>this.centerY)return;if(i>=n&&i<c){let t=a-r;if(t/=Math.PI*2,t-=Math.floor(t),t*=Math.PI*2,t<s)return e===this.animatedNode?e.parent:e}let l=e.size,u=0;for(let n of e.children){let e=o(n,t+1,c,r+s*u/l,n.size/l*s);if(e)return e;u+=n.size}};return o(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle)}tick(){let e=(K()-this.animationStart)/(this.options.animateDuration??q.animateDuration);e<0||e>1?(e=1,this.animatedNode=this.targetNode,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.invalidate()),this.animatedDepth=this.sourceDepth+(this.targetDepth-this.sourceDepth)*e,this.animatedStartAngle=this.sourceStartAngle+(this.targetStartAngle-this.sourceStartAngle)*e,this.animatedSweepAngle=this.sourceSweepAngle+(this.targetSweepAngle-this.sourceSweepAngle)*e,this.draw()}handleMouseMove(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),t&&t!==this.animatedNode.parent?(this.events.emit(`hover`,t,e),this.canvas.style.cursor=`pointer`):this.events.emit(`hover`,null,e)}computeRadius(e){return Mt(e)*this.radiusScale}updateSunburst(e=this.options.animate??!0){if(this.previousHoveredNode!==this.hoveredNode&&(this.previousHoveredNode=this.hoveredNode,this.hoveredNode||(this.canvas.style.cursor=`auto`,this.events.emit(`hover`,null)),this.invalidate()),this.targetNode!==this.currentNode){if(this.historyStack.length=0,this.invalidate(),e&&(this.animationStart=K()),At(this.animatedNode,this.currentNode)){let e={depth_:this.animatedDepth,startAngle_:this.animatedStartAngle,sweepAngle_:this.animatedSweepAngle};Y(this.animatedNode,this.currentNode,e),this.animatedDepth=e.depth_,this.animatedStartAngle=e.startAngle_,this.animatedSweepAngle=e.sweepAngle_,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2,this.animatedNode=this.currentNode}else if(At(this.currentNode,this.animatedNode)){let e={depth_:0,startAngle_:X,sweepAngle_:Math.PI*2};Y(this.currentNode,this.animatedNode,e),this.targetDepth=e.depth_,this.targetStartAngle=e.startAngle_,this.targetSweepAngle=e.sweepAngle_}else this.animationStart=-1/0,this.animatedNode=this.currentNode;this.sourceDepth=this.animatedDepth,this.sourceStartAngle=this.animatedStartAngle,this.sourceSweepAngle=this.animatedSweepAngle,this.targetNode=this.currentNode,this.events.emit(`select`,this.currentNode)}}},Z=4,Q=20,Pt=2*Z,$=Q+Z;function Ft(e,t,n,r,i){let a=[],o=(t,n,r,i,a)=>{let o=e[t].size*a,s=e[n].size*a;return Math.max(r*r*o/(i*i),i*i/(r*r*s))};return((t,n,r,i,s)=>{for(;t<e.length;){let c=0;for(let n=t;n<e.length;n++)c+=e[n].size;let l=Math.min(i,s),u=i*s/c,d=t,f=0,p=0;for(;d<e.length;){let n=e[d].size*u,r=o(t,d,l,f+n,u);if(d>t&&p<r)break;f+=n,p=r,d++}let m=Math.round(f/l),h=0;for(let o=t;o<d;o++){let t=e[o],c=t.size*u,d=Math.round(l*h/f),p=Math.round(l*(h+c)/f),[g,_,v,y]=i>=s?[n,r+d,m,p-d]:[n+d,r,p-d,m];a.push({node:t,box:[g,_,v,y],children:v>Pt&&y>$?Ft(t.children,g+Z,_+Q,v-Pt,y-$):[]}),h+=c}t=d,i>=s?(n+=m,i-=m):(r+=m,s-=m)}})(0,t,n,r,i),a}var It=class extends Tt{hoveredNode=null;currentNode=null;bgOriginX=0;bgOriginY=0;layers={base:null};baseLayoutCache;currentOriginX=0;currentOriginY=0;animationStart=0;animationBlend=1;animationSource=null;animationTarget=null;constructor(e,t={}){super(e,t),this.canvas.addEventListener(`mousemove`,e=>{this.updateHover(e)}),this.canvas.addEventListener(`mouseout`,e=>{this.changeHoveredNode(null),this.events.emit(`hover`,null,e)}),this.el.addEventListener(`click`,e=>{let t=this.hitTestNode(e);if(t){let n=t.node;this.events.emit(`click`,n,e),n.children.length?t===this.layers.current?this.updateHover(e):(this.changeCurrentLayout(t),this.changeHoveredNode(null)):this.updateHover(e)}else this.currentNode&&(this.changeCurrentLayout(null),this.updateHover(e))}),this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(vt(e=>this.updateHover(e))),this.disposables.push(yt(()=>this.resize()))}select(e,t){let n=null;e===this.root&&(e=null),n=e?this.searchFor([this.layers.current,this.layers.base],e):null,this.changeCurrentLayout(n,t)}drawBaseLayout(){!this.width||!this.height||(this.c.clearRect(0,0,this.width,this.height),this.bgOriginX=this.bgOriginY=0,this.baseLayoutCache?this.c.putImageData(this.baseLayoutCache,0,0):(this.drawLayout(this.layers.base,0,[]),this.baseLayoutCache=this.c.getImageData(0,0,this.width*this.ratio,this.height*this.ratio)))}draw(){this.drawBaseLayout(),this.layers.current||this.drawHoverHighlight(this.layers.base);let e=this.layers.current?this.animationSource?this.animationTarget?1:1-this.animationBlend:this.animationBlend:0;if(this.layers.current){let[t,n,r,i]=this.layers.base.box;this.c.globalAlpha=.6*(!this.layers.current||!this.animationSource?1:e),this.c.fillStyle=this.palette.bg,this.c.fillRect(t,n,r,i),this.c.globalAlpha=1}if(this.layers.previous&&this.drawLayout(this.layers.previous,1,[this.layers.current]),this.layers.current){let[t,n,r,i]=this.layers.current.box,a=this.c.getTransform(),o=Math.sqrt(a.a*a.d);this.c.save(),this.c.shadowColor=this.palette.shadow,this.c.shadowBlur=30*e*o,this.c.shadowOffsetX=o*(2*this.width),this.c.shadowOffsetY=o*(2*this.height+15*e),this.c.fillRect(t-2*this.width,n-2*this.height,r,i),this.c.restore(),this.bgOriginX=this.currentOriginX,this.bgOriginY=this.currentOriginY,this.drawLayout(this.layers.current,0,[]),this.drawHoverHighlight(this.layers.current)}}tick(){let e=this.animationBlend,t=this.currentNode;this.animationBlend=(K()-this.animationStart)/(this.options.animateDuration??q.animateDuration),this.animationBlend<0||this.animationBlend>1?(this.currentNode=this.animationTarget,this.layers.previous=void 0,this.animationBlend=1):(this.animationBlend=1-this.animationBlend,this.animationBlend*=this.animationBlend*this.animationBlend,this.animationBlend=1-this.animationBlend,this.invalidate()),(this.animationBlend!==e||this.currentNode!==t)&&this.updateCurrentLayout(),this.draw()}resize(){this.baseLayoutCache=void 0;let e=this.width,t=this.height;this.width=Math.min(this.el.clientWidth,1600),this.height=Math.max(Math.round(this.width/2),innerHeight-200),(this.width!==e||this.height!==t||!this.layers.base)&&(this.layers.base=Ft([this.root],0,0,this.width-1,this.height-1)[0],this.updateCurrentLayout()),super.resize()}*iterateNodeToDraw(e,t,n){let r=e.node,[i,a,o,s]=e.box,c=(r===this.hoveredNode?1:0)|(e===this.animationTarget?2:0);if(t===1)for(let e of n){if(!e)continue;let[n,r,c,l]=e.box;if(i>=n&&a>=r&&i+o<=n+c&&a+s<=r+l){t=2;break}}for(let r of e.children)c|=yield*this.iterateNodeToDraw(r,t,n);return t!==2&&(yield e),c}drawHoverHighlight(e){let t=this.iterateNodeToDraw(e,0,[]),n=this.c.globalCompositeOperation;for(;;){let e=t.next();if(e.done){this.c.globalCompositeOperation=n;return}let r=e.value.node;if(this.hoveredNode===r){this.c.globalCompositeOperation=`overlay`;let[t,n,r,i]=e.value.box;this.c.fillStyle=this.palette.hover,this.c.fillRect(t,n,r,i)}}}drawNodeBackground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return e.value;let[t,n,i,a]=e.value.box;this.c.fillStyle=rt(this.getColor(e.value.node)||this.palette.fallback,this.c,this.bgOriginX,this.bgOriginY,1),e.value.children.length?(this.c.fillRect(t,n,i,Q),this.c.fillRect(t,n+a-Z,i,Z),this.c.fillRect(t,n+Q,Z,a-$),this.c.fillRect(t+i-Z,n+Q,Z,a-$)):this.c.fillRect(t,n,i,a)}}drawLayout(e,t,n){this.drawNodeBackground(e,t,n),this.drawNodeForeground(e,t,n)}drawNodeForeground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return;let t=e.value.node,[n,i,a,o]=e.value.box;if(_t(this.c,this.palette.stroke,n+.5,i+.5,a,o),o>=Q){this.c.fillStyle=this.palette.text;let e=a-Pt,r=i+Math.round($/2),[s,c]=this.textOverflowEllipsis(this.getText(t)||``,e),l=n+Math.round((a-c)/2),u=this.getText(t),d=this.getSubtext(t);if(s===u&&t.children.length){let t=d||``;t&&u&&(t=` - ${t}`);let[i,o]=this.textOverflowEllipsis(t,e-c);l=n+Math.round((a-c-o)/2),this.c.globalAlpha=.5,this.c.fillText(i,l+c,r),this.c.globalAlpha=1}if(this.c.fillText(s,l,r),o>$+16&&!t.children.length){let[t,r]=this.textOverflowEllipsis(d||``,e);this.c.globalAlpha=.5;let s=u?Q:Q/2+Z;this.c.fillText(t,n+Math.round((a-r)/2),i+s+Math.round(o-$)/2),this.c.globalAlpha=1}}}}updateCurrentLayout(){let e=this.options.selectedPaddingRatio??.2;if(this.currentNode){let[t,n,r,i]=this.currentNode.box,a=t+r,o=n+i,s=Math.round(this.width*e/2),c=Math.round(this.height*e/2),l=this.width-s-1,u=this.height-c-1,d=this.animationTarget?this.animationBlend:1-this.animationBlend,f=Math.round(t+(s-t)*d),p=Math.round(n+(c-n)*d),m=Math.round(a+(l-a)*d),h=Math.round(o+(u-o)*d),g=e=>e-Math.floor(e/64-.5)*64;this.layers.current=Ft([this.currentNode.node],f,p,m-f,h-p)[0],this.currentOriginX=g(-(t+a)/2)*(1-d)+(f+m)/2,this.currentOriginY=g(-(n+o)/2)*(1-d)+(p+h)/2}else this.layers.current=void 0,this.currentOriginX=0,this.currentOriginY=0}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=(e,t)=>{for(let a of e){let[e,o,s,c]=a.box;if(n>=e&&r>=o&&n<e+s&&r<o+c)return i(a.children,!1)||(t?null:a)}return null};return this.layers.current?i([this.layers.current],!1):i([this.layers.base],!0)}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t&&t.node),this.events.emit(`hover`,t?.node||null,e)}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}searchFor(e,t){for(let n of e){if(!n)continue;let e=n.node===t?n:this.searchFor(n.children,t);if(e)return e}return null}changeCurrentLayout(e,t=this.options.animate){this.animationTarget!==e&&(this.events.emit(`select`,e?.node||null),this.layers.previous=e?this.layers.current:void 0,t&&(this.animationBlend=0,this.animationStart=K(),this.animationSource=this.currentNode),this.animationTarget=e,this.currentNode=e||this.searchFor([this.layers.base],this.currentNode.node),this.updateCurrentLayout(),this.invalidate())}},Lt={flex:`~ gap-1 items-center wrap`},Rt={key:0,"i-ph-arrow-right-bold":``,"text-sm":``,"op-fade":``},zt=[`onClick`],Bt=ne({__name:`NavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=h(()=>{let e=[],t=n.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,t)=>(w(),x(`div`,Lt,[(w(!0),x(ie,null,u(i.value,(e,t)=>(w(),x(ie,{key:e.id},[t>0?(w(),x(`div`,Rt)):_(``,!0),te(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>r(`select`,e)},[te(`span`,null,re(e.text||e.id),1)],8,zt)],64))),128))]))}}),Vt=Object.assign(Bt,{__name:`ChartNavBreadcrumb`});function Ht(t){let{data:r,nameKey:i,sizeKey:a,rootText:s,nodeType:c,graphOptions:l,onUpdate:u}=t,d=f(void 0),p=f(void 0),_=C(void 0),v=f(void 0),y,b=h(()=>{if(t.tree)return t.tree.value;let n=e(r),o=new Map,l=0,u={id:`~root`,text:s,size:0,sizeSelf:0,children:[]};if(!n?.length)return{map:o,root:u,maxDepth:l};let d=[];d.unshift(()=>{u.size+=u.children.reduce((e,t)=>e+t.size,0),u.subtext=T(u.size).join(` `),u.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function f(e,t,n,r,i){if(o.has(t))return o.get(t);i>l&&(l=i);let a={id:t,text:n,size:0,sizeSelf:0,children:[],meta:{...e,path:n,type:`folder`},parent:r};return o.set(t,a),r.children.push(a),d.unshift(()=>{let t=a.sizeSelf;a.size+=a.children.reduce((e,t)=>e+t.size,0),a.subtext=T(a.size).join(` `),a.children.length&&t/a.size>.1&&a.children.push({id:`${a.id}-self`,text:``,size:t,sizeSelf:t,subtext:T(t).join(` `),children:[],meta:{...e,path:``,type:c},parent:a}),a.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),a}function p(e){let t=e[i].split(`/`).filter(Boolean),n=u,r=``,s=0;t.forEach((l,u)=>{if(r+=(r?`/`:``)+l,s++,u===t.length-1){let t={id:e[i],text:l,size:e[a],sizeSelf:e[a],subtext:T(e[a]).join(` `),children:[],meta:{...e,path:l,type:c}};n.children.push(t),o.set(e[i],t)}else n=f(e,r,l,n,s)})}return n.forEach(p),d.forEach(e=>e()),{map:o,root:u,maxDepth:l}}),ee=h(()=>({animate:oe.value.chartAnimation,palette:{stroke:m.value?`#222`:`#555`,fg:m.value?`#fff`:`#000`,bg:m.value?`#111`:`#fff`},getColor:ot(b.value.root,m.value?.8:.9,m.value?1:1.1),getSubtext:e=>e.subtext,...l}));function x(e,t){_.value=e?.meta,e?.children.length||(e=e?.parent),v.value?.select(e,t)}function S(){y?.(),p.value=b.value.root,u?.(),g(()=>{let e=_.value&&b.value.map.get(_.value[i])||null;e&&x(e,!1)}),y=()=>{v.value?.dispose(),v.value=void 0,_.value=void 0}}return g(()=>{o(()=>[b.value,ee.value],()=>{S()},{deep:!0,immediate:!1}),S()}),n(()=>{y?.()}),{tree:b,graph:v,chartOptions:ee,nodeHover:d,nodeSelected:p,selectedNode:_,selectNode:x,buildGraph:S}}export{It as a,Ze as c,Nt as i,Vt as n,it as o,kt as r,ut as s,Ht as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$t as e,At as t,Bt as n,C as r,Kt as i,Lt as a,Ot as o,T as s,U as c,W as l,_ as u,at as d,b as f,ct as p,dt as m,en as h,f as g,ft as _,lt as v,ot as y,p as b,pt as x,qt as ee,r as te,rn as S,rt as C,st as w,t as T,wt as E}from"#entry";import{t as D}from"./CwTV8WCc.js";import{r as O,t as k}from"./CpJiZ7L0.js";import{r as A,t as j}from"./DthxatUT.js";import{n as ne,r as M,t as N}from"./DYuLlkFe.js";import{a as P,c as re,n as F,t as I}from"./CI5axwdc.js";import{t as L}from"./Bxdwnne9.js";import{t as ie}from"./wHgnrW62.js";var R={flex:`~ row gap-1`,"of-hidden":``},z={flex:`~ row gap-1`,"ws-nowrap":``},B={p2:``,flex:`~ col gap-1`},V=x({__name:`Importers`,props:{package:{},session:{},showVersion:{type:Boolean}},setup(e){let r=e,i=d(()=>{let e=new Map;return r.package.files.filter(e=>!!e.importers).flatMap(e=>e.importers).filter(e=>!e.path.startsWith(r.package?.dir??``)).forEach(t=>{e.set(t.path,t)}),Array.from(e.values())});return(r,a)=>{let s=k,c=t(`VMenu`);return E(),v(`div`,R,[y(`div`,z,[_(s,{id:i.value[0].path,session:e.session,link:``},null,8,[`id`,`session`]),i.value[0].version&&e.showVersion?(E(),w(O,{key:0,text:i.value[0].version,as:`span`},null,8,[`text`])):p(``,!0)]),i.value.length>1?(E(),w(c,{key:0,delay:{show:200,hide:0},"flex-none":``},{popper:n(()=>[y(`div`,B,[(E(!0),v(C,null,o(i.value,t=>(E(),v(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[_(s,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``},null,8,[`id`,`session`]),t.version&&e.showVersion?(E(),w(O,{key:0,text:`v${t.version}`,as:`span`},null,8,[`text`])):p(``,!0)]))),128))])]),default:n(()=>[_(O,{text:`+${i.value.length}`,color:100,class:`text-xs rounded px1`},null,8,[`text`])]),_:1})):p(``,!0)])}}}),H=Object.assign(V,{__name:`PackagesImporters`}),U={role:`table`,"min-w-max":``,border:`~ base rounded-xl`},W={role:`row`,class:`border-b border-base`,flex:`~ row`},G=[`title`],K={key:0,"font-mono":``},q={key:0,title:`Package version`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"min-w40":``,"ws-nowrap":``,"text-left":``,"py1.5":``,px2:``,"font-600":``},J={flex:`~ row gap1 items-center justify-end`,"w-full":``,relative:``,pr2:``},Y={key:0,role:`cell`,"font-mono":``,"flex-none":``,w80:``,"py1.5":``,px2:``,"ws-nowrap":``,"text-sm":``,"overflow-hidden":``,truncate:``},X={"font-mono":``,"text-sm":``},Z={role:`cell`,flex:`~ items-center justify-end`,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``},ae={p2:``,flex:`~ col gap-1`},Q={w24:``,"inline-flex":``},oe={role:`cell`,flex:`~ items-center`,"flex-1":``,"font-mono":``,"py1.5":``,pl20:``,pr2:``,"text-sm":``,op80:``},se={key:1},ce=x({__name:`Table`,props:{packages:{},session:{},disableSizeSort:{type:Boolean,default:!1},groupView:{type:Boolean,default:!1}},setup(t){let i=c(),{state:a,next:l}=b([``,`desc`,`asc`],{initialValue:j.value.packageSizeSortType});function u(){l(),j.value.packageSizeSortType=a.value}return(c,l)=>{let d=L,f=A,g=k,b=H,x=D;return E(),v(`div`,U,[y(`div`,W,[y(`div`,{title:t.groupView?`Package`:`Bundled packages`,role:`columnheader`,"rounded-tl-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,px2:``,"font-600":``,class:h([t.groupView?`min-w40`:`min-w80`])},[t.groupView?(E(),v(`div`,K,[_(d,{name:t.packages?.[0]?.name},null,8,[`name`])])):(E(),v(C,{key:1},[m(` Package `)],64))],10,G),t.groupView?p(``,!0):(E(),v(`div`,q,` Version `)),y(`div`,{title:`Transformed code size`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,"font-600":``,"min-w40":``,class:h([t.groupView?`px2`:`pl2`])},[y(`button`,J,[l[0]||=m(` Size `,-1),t.disableSizeSort?p(``,!0):(E(),v(`span`,{key:0,"w-6":``,"h-6":``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:u},[y(`i`,{"text-xs":``,class:h([e(a)===`asc`?`i-ph-arrow-up-duotone`:`i-ph-arrow-down-duotone`,e(a)?`op100 text-primary`:`op50`])},null,2)]))])],2),l[1]||=y(`div`,{title:`Importers`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,pl20:``,pr2:``,"font-600":``,"min-w50":``},` Importers `,-1)]),t.packages.length?(E(),w(N,{key:0,role:`rowgroup`,items:t.packages,"key-prop":`dir`},{default:n(({item:a,index:c})=>[_(x,{role:`row`,flex:`~ row`,class:h([`border-base border-b-1 border-dashed`,[c===t.packages.length-1?`border-b-0`:``]]),to:{path:e(i).path,query:{package:`${a.name}@${a.version}`}}},{default:n(()=>[_(e(s),{triggers:[`hover`],delay:1200,disabled:a.name.length<30},{popper:n(()=>[y(`span`,X,S(a.name),1)]),default:n(()=>[t.groupView?p(``,!0):(E(),v(`div`,Y,[_(d,{name:a.name},null,8,[`name`])]))]),_:2},1032,[`disabled`]),y(`div`,{role:`cell`,flex:`~ items-center`,"text-left":``,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``,class:h({"text-primary":a.duplicated})},S(a.version),3),y(`div`,Z,[_(e(r),{delay:{show:200,hide:0}},{popper:n(()=>[y(`div`,ae,[(E(!0),v(C,null,o(a.files.filter(e=>!!e.transformedCodeSize),e=>(E(),v(`div`,{key:e.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[y(`span`,Q,[_(f,{bytes:e.transformedCodeSize},null,8,[`bytes`])]),_(g,{id:e.path,session:t.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``,cwd:a.dir},null,8,[`id`,`session`,`cwd`])]))),128))])]),default:n(()=>[_(f,{bytes:a.transformedCodeSize},null,8,[`bytes`])]),_:2},1024)]),y(`div`,oe,[_(b,{package:a,session:t.session,"show-version":t.groupView},null,8,[`package`,`session`,`show-version`])])]),_:2},1032,[`class`,`to`])]),_:1},8,[`items`])):(E(),v(`div`,se,[...l[2]||=[y(`div`,{p4:``},[y(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},[y(`p`,null,` No data `)])],-1)]]))])}}}),$=Object.assign(ce,{__name:`PackagesTable`}),le={key:1,p4:``},ue=x({__name:`Duplicated`,props:{packages:{},session:{}},setup(e){let t=e,n=d(()=>t.packages.filter(e=>e.duplicated)),r=d(()=>n.value.reduce((e,t)=>(e[t.name]=[...e[t.name]||[],t],e),{}));return(t,i)=>{let a=$;return n.value.length?(E(!0),v(C,{key:0},o(r.value,(t,n)=>(E(),v(`div`,{key:n},[_(a,{packages:t,session:e.session,"group-view":``,"disable-size-sort":``},null,8,[`packages`,`session`])]))),128)):(E(),v(`div`,le,[...i[0]||=[y(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},` No duplicate packages `,-1)]]))}}}),de=Object.assign(ue,{__name:`PackagesDuplicated`}),fe={key:1,relative:``,"max-h-screen":``,"of-hidden":``},pe={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},me={flex:`~ gap-2 items-center`,p2:``,border:`t base`},he=[`onClick`],ge={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt44:``,px4:``,pb4:``},_e={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},ve={op50:``},ye={key:1,"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},be={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},xe={flex:`~ gap-1 items-center`},Se={flex:`~ gap-1 items-center`},Ce=x({__name:`packages`,props:{session:{}},setup(t){let r=t,s=i(u()),b=c(),x=l(),D=[{match:/.*/,name:`direct`,description:`Direct Dependencies`,icon:`i-octicon:package-dependencies-24 light:filter-invert-30!`},{match:/.*/,name:`transitive`,description:`Transitive Dependencies`,icon:`i-octicon:package-24 light:filter-invert-30!`}],O=T(),k=ee({search:``,selected:[`direct`,`transitive`]}),{state:N,isLoading:L}=g(async()=>await O.value.call(`vite:rolldown:get-packages`,{session:r.session.id}),null),R=f(()=>N.value,()=>new M(N.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),z=d(()=>N.value?Object.values(N.value.reduce((e,t)=>(e[t.name]=(e[t.name]||0)+1,e),{})).filter(e=>e>1).length:0),B=d(()=>[{label:`Table`,value:`table`,icon:`i-ph-table-duotone`},{label:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Duplicate Packages${z.value>0?` (${z.value})`:``}`,value:`duplicate-packages`,icon:`i-ph-package-duotone`}]),V=d(()=>k.value.search?R.value.search(k.value.search).map(e=>e.item):[...N.value||[]]),H=d(()=>{let e=j.value.packageSizeSortType,t=[...V.value].sort((e,t)=>(e.name||``).localeCompare(t.name||``));return(e?t.sort((t,n)=>e===`asc`?t.transformedCodeSize-n.transformedCodeSize:n.transformedCodeSize-t.transformedCodeSize):t).filter(e=>!k.value.selected||k.value.selected.some(t=>t.match(e.type)))});function U(e){j.value.packageViewType=e}let{tree:W,chartOptions:G,graph:K,nodeHover:q,nodeSelected:J,selectedNode:Y,selectNode:X,buildGraph:Z}=I({data:H,nameKey:`name`,sizeKey:`transformedCodeSize`,rootText:`Packages`,nodeType:`package`,graphOptions:{onHover(e){e&&!b.query.package&&(q.value=e),e===null&&(q.value=void 0)},onClick(e){e.meta?.type===`package`&&x.replace({query:{...b.query,package:`${e.meta?.name}@${e.meta?.version}`}})},onLeave(){q.value=void 0},onSelect(e){J.value=e||W.value.root,Y.value=e?.meta}},onUpdate(){j.value.packageViewType===`treemap`&&(K.value=new P(W.value.root,{...G.value,selectedPaddingRatio:0}))}});return a(()=>j.value.packageViewType,()=>{Z()}),(r,i)=>{let a=te,c=ne,l=$,u=F,d=de,f=A,g=re;return e(L)?(E(),w(a,{key:0})):(E(),v(`div`,fe,[y(`div`,pe,[_(c,{modelValue:k.value,"onUpdate:modelValue":i[0]||=e=>k.value=e,rules:D},{default:n(()=>[y(`div`,me,[i[2]||=y(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(E(!0),v(C,null,o(B.value,t=>(E(),v(`button`,{key:t.value,"btn-action":``,class:h(e(j).packageViewType===t.value?`bg-active`:`grayscale op50`),onClick:e=>U(t.value)},[y(`div`,{class:h(t.icon)},null,2),m(` `+S(t.label),1)],10,he))),128))])]),_:1},8,[`modelValue`])]),y(`div`,ge,[e(j).packageViewType===`table`?(E(),v(C,{key:0},[_(l,{packages:H.value,session:t.session},null,8,[`packages`,`session`]),y(`div`,_e,[y(`span`,ve,S(V.value.length)+` of `+S(e(N)?.length||0),1)])],64)):e(j).packageViewType===`treemap`?(E(),v(C,{key:1},[e(K)&&H.value.length?(E(),w(ie,{key:0,graph:e(K),selected:e(J),onSelect:i[1]||=t=>e(X)(t)},{default:n(({selected:e,options:t,onSelect:n})=>[_(u,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:t,onSelect:n},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):(E(),v(`span`,ye,` No Data `))],64)):e(j).packageViewType===`duplicate-packages`?(E(),w(d,{key:2,packages:H.value,session:t.session},null,8,[`packages`,`session`])):p(``,!0)]),_(g,{"hover-x":s.x,"hover-y":s.y},{default:n(()=>[e(q)?.meta?(E(),v(`div`,be,[y(`div`,xe,S(e(q).text),1),y(`div`,Se,[_(f,{bytes:e(q).size,percent:!1},null,8,[`bytes`])])])):p(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{Ce as default};
|
|
1
|
+
import{$t as e,At as t,Bt as n,C as r,Kt as i,Lt as a,Ot as o,T as s,U as c,W as l,_ as u,at as d,b as f,ct as p,dt as m,en as h,f as g,ft as _,lt as v,ot as y,p as b,pt as x,qt as ee,r as te,rn as S,rt as C,st as w,t as T,wt as E}from"#entry";import{t as D}from"./CwTV8WCc.js";import{r as O,t as k}from"./CpJiZ7L0.js";import{r as A,t as j}from"./CKFsAdVO.js";import{n as ne,r as M,t as N}from"./DYuLlkFe.js";import{a as P,c as re,n as F,t as I}from"./BdaRSTg9.js";import{t as L}from"./Bxdwnne9.js";import{t as ie}from"./wHgnrW62.js";var R={flex:`~ row gap-1`,"of-hidden":``},z={flex:`~ row gap-1`,"ws-nowrap":``},B={p2:``,flex:`~ col gap-1`},V=x({__name:`Importers`,props:{package:{},session:{},showVersion:{type:Boolean}},setup(e){let r=e,i=d(()=>{let e=new Map;return r.package.files.filter(e=>!!e.importers).flatMap(e=>e.importers).filter(e=>!e.path.startsWith(r.package?.dir??``)).forEach(t=>{e.set(t.path,t)}),Array.from(e.values())});return(r,a)=>{let s=k,c=t(`VMenu`);return E(),v(`div`,R,[y(`div`,z,[_(s,{id:i.value[0].path,session:e.session,link:``},null,8,[`id`,`session`]),i.value[0].version&&e.showVersion?(E(),w(O,{key:0,text:i.value[0].version,as:`span`},null,8,[`text`])):p(``,!0)]),i.value.length>1?(E(),w(c,{key:0,delay:{show:200,hide:0},"flex-none":``},{popper:n(()=>[y(`div`,B,[(E(!0),v(C,null,o(i.value,t=>(E(),v(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[_(s,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``},null,8,[`id`,`session`]),t.version&&e.showVersion?(E(),w(O,{key:0,text:`v${t.version}`,as:`span`},null,8,[`text`])):p(``,!0)]))),128))])]),default:n(()=>[_(O,{text:`+${i.value.length}`,color:100,class:`text-xs rounded px1`},null,8,[`text`])]),_:1})):p(``,!0)])}}}),H=Object.assign(V,{__name:`PackagesImporters`}),U={role:`table`,"min-w-max":``,border:`~ base rounded-xl`},W={role:`row`,class:`border-b border-base`,flex:`~ row`},G=[`title`],K={key:0,"font-mono":``},q={key:0,title:`Package version`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"min-w40":``,"ws-nowrap":``,"text-left":``,"py1.5":``,px2:``,"font-600":``},J={flex:`~ row gap1 items-center justify-end`,"w-full":``,relative:``,pr2:``},Y={key:0,role:`cell`,"font-mono":``,"flex-none":``,w80:``,"py1.5":``,px2:``,"ws-nowrap":``,"text-sm":``,"overflow-hidden":``,truncate:``},X={"font-mono":``,"text-sm":``},Z={role:`cell`,flex:`~ items-center justify-end`,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``},ae={p2:``,flex:`~ col gap-1`},Q={w24:``,"inline-flex":``},oe={role:`cell`,flex:`~ items-center`,"flex-1":``,"font-mono":``,"py1.5":``,pl20:``,pr2:``,"text-sm":``,op80:``},se={key:1},ce=x({__name:`Table`,props:{packages:{},session:{},disableSizeSort:{type:Boolean,default:!1},groupView:{type:Boolean,default:!1}},setup(t){let i=c(),{state:a,next:l}=b([``,`desc`,`asc`],{initialValue:j.value.packageSizeSortType});function u(){l(),j.value.packageSizeSortType=a.value}return(c,l)=>{let d=L,f=A,g=k,b=H,x=D;return E(),v(`div`,U,[y(`div`,W,[y(`div`,{title:t.groupView?`Package`:`Bundled packages`,role:`columnheader`,"rounded-tl-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,px2:``,"font-600":``,class:h([t.groupView?`min-w40`:`min-w80`])},[t.groupView?(E(),v(`div`,K,[_(d,{name:t.packages?.[0]?.name},null,8,[`name`])])):(E(),v(C,{key:1},[m(` Package `)],64))],10,G),t.groupView?p(``,!0):(E(),v(`div`,q,` Version `)),y(`div`,{title:`Transformed code size`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,"font-600":``,"min-w40":``,class:h([t.groupView?`px2`:`pl2`])},[y(`button`,J,[l[0]||=m(` Size `,-1),t.disableSizeSort?p(``,!0):(E(),v(`span`,{key:0,"w-6":``,"h-6":``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:u},[y(`i`,{"text-xs":``,class:h([e(a)===`asc`?`i-ph-arrow-up-duotone`:`i-ph-arrow-down-duotone`,e(a)?`op100 text-primary`:`op50`])},null,2)]))])],2),l[1]||=y(`div`,{title:`Importers`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,pl20:``,pr2:``,"font-600":``,"min-w50":``},` Importers `,-1)]),t.packages.length?(E(),w(N,{key:0,role:`rowgroup`,items:t.packages,"key-prop":`dir`},{default:n(({item:a,index:c})=>[_(x,{role:`row`,flex:`~ row`,class:h([`border-base border-b-1 border-dashed`,[c===t.packages.length-1?`border-b-0`:``]]),to:{path:e(i).path,query:{package:`${a.name}@${a.version}`}}},{default:n(()=>[_(e(s),{triggers:[`hover`],delay:1200,disabled:a.name.length<30},{popper:n(()=>[y(`span`,X,S(a.name),1)]),default:n(()=>[t.groupView?p(``,!0):(E(),v(`div`,Y,[_(d,{name:a.name},null,8,[`name`])]))]),_:2},1032,[`disabled`]),y(`div`,{role:`cell`,flex:`~ items-center`,"text-left":``,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``,class:h({"text-primary":a.duplicated})},S(a.version),3),y(`div`,Z,[_(e(r),{delay:{show:200,hide:0}},{popper:n(()=>[y(`div`,ae,[(E(!0),v(C,null,o(a.files.filter(e=>!!e.transformedCodeSize),e=>(E(),v(`div`,{key:e.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[y(`span`,Q,[_(f,{bytes:e.transformedCodeSize},null,8,[`bytes`])]),_(g,{id:e.path,session:t.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``,cwd:a.dir},null,8,[`id`,`session`,`cwd`])]))),128))])]),default:n(()=>[_(f,{bytes:a.transformedCodeSize},null,8,[`bytes`])]),_:2},1024)]),y(`div`,oe,[_(b,{package:a,session:t.session,"show-version":t.groupView},null,8,[`package`,`session`,`show-version`])])]),_:2},1032,[`class`,`to`])]),_:1},8,[`items`])):(E(),v(`div`,se,[...l[2]||=[y(`div`,{p4:``},[y(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},[y(`p`,null,` No data `)])],-1)]]))])}}}),$=Object.assign(ce,{__name:`PackagesTable`}),le={key:1,p4:``},ue=x({__name:`Duplicated`,props:{packages:{},session:{}},setup(e){let t=e,n=d(()=>t.packages.filter(e=>e.duplicated)),r=d(()=>n.value.reduce((e,t)=>(e[t.name]=[...e[t.name]||[],t],e),{}));return(t,i)=>{let a=$;return n.value.length?(E(!0),v(C,{key:0},o(r.value,(t,n)=>(E(),v(`div`,{key:n},[_(a,{packages:t,session:e.session,"group-view":``,"disable-size-sort":``},null,8,[`packages`,`session`])]))),128)):(E(),v(`div`,le,[...i[0]||=[y(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},` No duplicate packages `,-1)]]))}}}),de=Object.assign(ue,{__name:`PackagesDuplicated`}),fe={key:1,relative:``,"max-h-screen":``,"of-hidden":``},pe={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},me={flex:`~ gap-2 items-center`,p2:``,border:`t base`},he=[`onClick`],ge={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt44:``,px4:``,pb4:``},_e={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},ve={op50:``},ye={key:1,"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},be={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},xe={flex:`~ gap-1 items-center`},Se={flex:`~ gap-1 items-center`},Ce=x({__name:`packages`,props:{session:{}},setup(t){let r=t,s=i(u()),b=c(),x=l(),D=[{match:/.*/,name:`direct`,description:`Direct Dependencies`,icon:`i-octicon:package-dependencies-24 light:filter-invert-30!`},{match:/.*/,name:`transitive`,description:`Transitive Dependencies`,icon:`i-octicon:package-24 light:filter-invert-30!`}],O=T(),k=ee({search:``,selected:[`direct`,`transitive`]}),{state:N,isLoading:L}=g(async()=>await O.value.call(`vite:rolldown:get-packages`,{session:r.session.id}),null),R=f(()=>N.value,()=>new M(N.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),z=d(()=>N.value?Object.values(N.value.reduce((e,t)=>(e[t.name]=(e[t.name]||0)+1,e),{})).filter(e=>e>1).length:0),B=d(()=>[{label:`Table`,value:`table`,icon:`i-ph-table-duotone`},{label:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Duplicate Packages${z.value>0?` (${z.value})`:``}`,value:`duplicate-packages`,icon:`i-ph-package-duotone`}]),V=d(()=>k.value.search?R.value.search(k.value.search).map(e=>e.item):[...N.value||[]]),H=d(()=>{let e=j.value.packageSizeSortType,t=[...V.value].sort((e,t)=>(e.name||``).localeCompare(t.name||``));return(e?t.sort((t,n)=>e===`asc`?t.transformedCodeSize-n.transformedCodeSize:n.transformedCodeSize-t.transformedCodeSize):t).filter(e=>!k.value.selected||k.value.selected.some(t=>t.match(e.type)))});function U(e){j.value.packageViewType=e}let{tree:W,chartOptions:G,graph:K,nodeHover:q,nodeSelected:J,selectedNode:Y,selectNode:X,buildGraph:Z}=I({data:H,nameKey:`name`,sizeKey:`transformedCodeSize`,rootText:`Packages`,nodeType:`package`,graphOptions:{onHover(e){e&&!b.query.package&&(q.value=e),e===null&&(q.value=void 0)},onClick(e){e.meta?.type===`package`&&x.replace({query:{...b.query,package:`${e.meta?.name}@${e.meta?.version}`}})},onLeave(){q.value=void 0},onSelect(e){J.value=e||W.value.root,Y.value=e?.meta}},onUpdate(){j.value.packageViewType===`treemap`&&(K.value=new P(W.value.root,{...G.value,selectedPaddingRatio:0}))}});return a(()=>j.value.packageViewType,()=>{Z()}),(r,i)=>{let a=te,c=ne,l=$,u=F,d=de,f=A,g=re;return e(L)?(E(),w(a,{key:0})):(E(),v(`div`,fe,[y(`div`,pe,[_(c,{modelValue:k.value,"onUpdate:modelValue":i[0]||=e=>k.value=e,rules:D},{default:n(()=>[y(`div`,me,[i[2]||=y(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(E(!0),v(C,null,o(B.value,t=>(E(),v(`button`,{key:t.value,"btn-action":``,class:h(e(j).packageViewType===t.value?`bg-active`:`grayscale op50`),onClick:e=>U(t.value)},[y(`div`,{class:h(t.icon)},null,2),m(` `+S(t.label),1)],10,he))),128))])]),_:1},8,[`modelValue`])]),y(`div`,ge,[e(j).packageViewType===`table`?(E(),v(C,{key:0},[_(l,{packages:H.value,session:t.session},null,8,[`packages`,`session`]),y(`div`,_e,[y(`span`,ve,S(V.value.length)+` of `+S(e(N)?.length||0),1)])],64)):e(j).packageViewType===`treemap`?(E(),v(C,{key:1},[e(K)&&H.value.length?(E(),w(ie,{key:0,graph:e(K),selected:e(J),onSelect:i[1]||=t=>e(X)(t)},{default:n(({selected:e,options:t,onSelect:n})=>[_(u,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:t,onSelect:n},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):(E(),v(`span`,ye,` No Data `))],64)):e(j).packageViewType===`duplicate-packages`?(E(),w(d,{key:2,packages:H.value,session:t.session},null,8,[`packages`,`session`])):p(``,!0)]),_(g,{"hover-x":s.x,"hover-y":s.y},{default:n(()=>[e(q)?.meta?(E(),v(`div`,be,[y(`div`,xe,S(e(q).text),1),y(`div`,Se,[_(f,{bytes:e(q).size,percent:!1},null,8,[`bytes`])])])):p(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{Ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{at as e,ct as t,dt as n,en as r,h as i,kt as a,lt as o,ot as s,pt as c,rn as l,wt as u}from"#entry";import{t as d}from"./D04G8HHr.js";var f={"text-xs":``,op75:``,"ml-0.4":``},p={key:0,"text-xs":``,ml1:``,"op-fade":``,border:`l base`,pl1:``},m=1024,h=c({__name:`FileSizeBadge`,props:{bytes:{},colorize:{type:Boolean,default:!0},digits:{default:2},percent:{type:Boolean,default:!0},total:{},icon:{},percentRatio:{default:.5}},setup(i){let c=i,h=m**2,g=[[80*m,`color-scale-neutral`],[500*m,`color-scale-low`],[1*h,`color-scale-medium`],[10*h,`color-scale-high`],[20*h,`color-scale-critical`]],_=e(()=>{if(!c.colorize)return g[0];let e=c.bytes||0;for(let[t,n]of g)if(e<t)return n;return g[g.length-1]?.[1]}),v=e(()=>c.total?(c.bytes||0)*100/c.total:0),y=e(()=>d(c.bytes||0,c.digits));return(e,c)=>i.bytes?(u(),o(`div`,{key:0,class:r([_.value,`px-0.4em py-0.2em font-mono line-height-none bg-gray:5 dark:bg-gray:4 flex items-center`])},[i.icon?(u(),o(`div`,{key:0,class:r([i.icon,`mr-1`])},null,2)):t(``,!0),n(` `+l(y.value[0]),1),s(`span`,f,l(y.value[1]),1),a(e.$slots,`after`,{},()=>[i.percent&&v.value>i.percentRatio?(u(),o(`span`,p,l(+v.value.toFixed(1))+`%`,1)):t(``,!0)])],2)):t(``,!0)}}),g=Object.assign(h,{__name:`DisplayFileSizeBadge`});const _=i(`
|
|
1
|
+
import{at as e,ct as t,dt as n,en as r,h as i,kt as a,lt as o,ot as s,pt as c,rn as l,wt as u}from"#entry";import{t as d}from"./D04G8HHr.js";var f={"text-xs":``,op75:``,"ml-0.4":``},p={key:0,"text-xs":``,ml1:``,"op-fade":``,border:`l base`,pl1:``},m=1024,h=c({__name:`FileSizeBadge`,props:{bytes:{},colorize:{type:Boolean,default:!0},digits:{default:2},percent:{type:Boolean,default:!0},total:{},icon:{},percentRatio:{default:.5}},setup(i){let c=i,h=m**2,g=[[80*m,`color-scale-neutral`],[500*m,`color-scale-low`],[1*h,`color-scale-medium`],[10*h,`color-scale-high`],[20*h,`color-scale-critical`]],_=e(()=>{if(!c.colorize)return g[0];let e=c.bytes||0;for(let[t,n]of g)if(e<t)return n;return g[g.length-1]?.[1]}),v=e(()=>c.total?(c.bytes||0)*100/c.total:0),y=e(()=>d(c.bytes||0,c.digits));return(e,c)=>i.bytes?(u(),o(`div`,{key:0,class:r([_.value,`px-0.4em py-0.2em font-mono line-height-none bg-gray:5 dark:bg-gray:4 flex items-center`])},[i.icon?(u(),o(`div`,{key:0,class:r([i.icon,`mr-1`])},null,2)):t(``,!0),n(` `+l(y.value[0]),1),s(`span`,f,l(y.value[1]),1),a(e.$slots,`after`,{},()=>[i.percent&&v.value>i.percentRatio?(u(),o(`span`,p,l(+v.value.toFixed(1))+`%`,1)):t(``,!0)])],2)):t(``,!0)}}),g=Object.assign(h,{__name:`DisplayFileSizeBadge`});const _=i(`rolldown-devtools-settings`,{codeviewerLineWrap:!1,codeviewerDiffPanelSize:50,flowExpandResolveId:!0,flowExpandTransforms:!0,flowExpandLoads:!0,flowExpandChunks:!0,flowExpandAssets:!0,flowShowAllTransforms:!1,flowShowAllLoads:!1,moduleGraphViewType:`list`,assetViewType:`list`,chartAnimation:!0,moduleDetailsViewType:`flow`,pluginDetailsViewType:`flow`,pluginDetailsTableFields:null,pluginDetailsModuleTypes:null,pluginDetailsDurationSortType:``,pluginDetailSelectedHook:``,chunkViewType:`list`,pluginDetailsShowType:`all`,packageViewType:`table`,packageSizeSortType:``},{mergeDefaults:!0});function v(t){let n=new Map;return new Proxy(t.value,{get(t,r){return n.has(r)||n.set(r,e({get(){return t[r]},set(e){t[r]=e}})),n.get(r)}})}const y=v(_);export{y as n,g as r,_ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$t as e,Bt as t,Ot as n,S as r,U as i,W as a,at as o,b as s,bt as c,ct as l,dt as u,en as d,ft as f,lt as p,ot as m,pt as h,qt as g,rn as _,rt as v,st as y,ut as b,wt as x}from"#entry";import"./CwTV8WCc.js";import{r as S}from"./D04G8HHr.js";import{a as C,s as w}from"./Bjj8tBzd.js";import{t as T}from"./CpJiZ7L0.js";import{t as E}from"./DWqpanCf.js";import{t as D}from"./DthxatUT.js";import{t as O}from"./HD_PrFS8.js";import{n as k}from"./CANF8ydB.js";import{n as A,r as j,t as M}from"./DYuLlkFe.js";import{t as N}from"./DYSe0ST1.js";import{t as P}from"./C2A6ZQPm.js";import{n as ee,r as F,t as I}from"./DhDTn9QE.js";import{n as L,t as R}from"./DVE8edJM.js";var z={flex:`~ col gap-2`,p4:``},B=[`onClick`],V=h({__name:`FlatList`,props:{session:{},modules:{},disableTooltip:{type:Boolean,default:!1},link:{type:Boolean,default:!0}},emits:[`select`],setup(e,{emit:n}){let r=n;return(n,i)=>{let a=T;return x(),p(`div`,z,[f(M,{items:e.modules,"key-prop":`id`},{default:t(({item:t})=>[m(`div`,{flex:``,pb2:``,onClick:e=>r(`select`,t)},[f(a,{id:t.id,session:e.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:e.link,"disable-tooltip":e.disableTooltip},null,8,[`id`,`session`,`link`,`disable-tooltip`])],8,B)]),_:1},8,[`items`])])}}}),H=Object.assign(V,{__name:`ModulesFlatList`}),U={flex:`~ col gap-2`,p4:``},W={flex:``,pb2:``},G={flex:`~ gap-1 wrap`,"text-xs":``},K={flex:`~ auto text-xs wrap`},q={key:0,flex:`~ items-center`},J={key:0,op20:``},Y={flex:`~ none gap-1 wrap justify-end`},X=h({__name:`DetailedList`,props:{session:{},modules:{}},setup(e){let r=e,i=o(()=>{let e=new Map;for(let t of r.modules){let n=t.buildMetrics?.transforms.filter(e=>e.source_code_size!==e.transformed_code_size).filter(e=>e.transformed_code_size);e.set(t.id,n)}return e});return(r,a)=>{let o=N,s=O,c=T;return x(),p(`div`,U,[f(M,{items:e.modules,"key-prop":`id`},{default:t(({item:r})=>[m(`div`,W,[f(c,{id:r.id,session:e.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:!0},{detail:t(()=>[m(`div`,G,[m(`ul`,K,[(x(!0),p(v,null,n(i.value.get(r.id),(e,t)=>(x(),p(v,{key:t},[e.source_code_size!==e.transformed_code_size&&e.transformed_code_size?(x(),p(`li`,q,[f(o,{name:e.plugin_name,class:`font-mono ws-nowrap op-50`},null,8,[`name`]),t===i.value.get(r.id).length-1?l(``,!0):(x(),p(`span`,J,`|`))])):l(``,!0)],64))),128))]),a[0]||=m(`div`,{flex:`~ auto gap-1`,"of-hidden":``},null,-1),m(`div`,Y,[m(`span`,null,[r.buildMetrics?(x(),y(s,{key:0,metrics:r.buildMetrics},null,8,[`metrics`])):l(``,!0)])])])]),_:2},1032,[`id`,`session`])])]),_:1},8,[`items`])])}}}),Z=Object.assign(X,{__name:`ModulesDetailedList`}),Q=[`d`,`stroke-dasharray`],te=h({__name:`Graph`,props:{modules:{},session:{}},setup(n){let r=n,i=o(()=>r.modules);return k({modules:i,spacing:{width:400,height:55,linkOffset:20,margin:800,gap:150},generateGraph:t=>{let{isFirstCalculateGraph:n,scale:r,spacing:a,tree:s,hierarchy:l,collapsedNodes:u,container:d,modulesMap:f,nodes:p,links:m,nodesMap:h,linksMap:g,width:_,height:v,childToParentMap:y,focusOn:b}=t,x=o(()=>i.value.filter(e=>e.importers.length===0));return(t=!0)=>{_.value=window.innerWidth,v.value=window.innerHeight;let i=new Set,o=l({module:{id:`~root`}},e=>e.module.id===`~root`?(x.value.forEach(e=>{i.add(e),n.value&&y.set(e.id,`~root`)}),x.value.map(e=>({module:e,expanded:!u.has(e.id),hasChildren:!1}))):u.has(e.module.id)?[]:e.module.imports.map(t=>{let r=f.value.get(t.module_id);if(r&&!i.has(r)&&!(y.has(r.id)&&y.get(r.id)!==e.module.id))return i.add(r),n.value&&y.set(r.id,e.module.id),{module:r,import:t,expanded:!u.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));n.value&&=!1,s().nodeSize([e(a.height),e(a.width)+e(a.gap)])(o);let S=o.descendants();for(let t of S)[t.x,t.y]=[t.y-e(a.width),t.x],t.data.module.imports&&(t.data.hasChildren=t.data.module.imports?.filter(e=>y.get(e.module_id)===t.data.module.id).length>0);let C=Math.min(...S.map(e=>e.x)),w=Math.min(...S.map(e=>e.y));if(C<e(a.margin))for(let t of S)t.x+=Math.abs(C)+e(a.margin);if(w<e(a.margin))for(let t of S)t.y+=Math.abs(w)+e(a.margin);p.value=S,h.clear();for(let e of S)h.set(e.data.module.id,e);let T=o.links().filter(e=>e.source.data.module.id!==`~root`).map(e=>({...e,import:e.source.data.import,id:`${e.source.data.module.id}|${e.target.data.module.id}`}));g.clear();for(let e of T)g.set(e.id,e);m.value=T,c(()=>{_.value=d.value.scrollWidth/r.value+e(a.margin),v.value=d.value.scrollHeight/r.value+e(a.margin);let n=x.value?.[0]?.id;t&&n&&c(()=>{b(n,!1)})})}}}),(e,r)=>{let a=T,o=I;return x(),y(o,{session:n.session,modules:i.value},{default:t(({node:e,nodesRefMap:t})=>[f(a,{id:e.data.module.id,ref:n=>t.set(e.data.module.id,n?.$el),link:!0,session:n.session,minimal:!0,flex:`1`},null,8,[`id`,`session`])]),link:t(({link:e,d:t,linkClass:n})=>[m(`path`,{d:t,class:d(n),"stroke-dasharray":e.import?.kind===`dynamic-import`?`3 6`:void 0,fill:`none`},null,10,Q)]),_:1},8,[`session`,`modules`])}}}),ne=Object.assign(te,{__name:`ModulesGraph`}),re={"of-auto":``,"max-h-screen":``,"pt-45":``,relative:``},ie={flex:`~ col gap-2`,p4:``},ae=h({__name:`Folder`,props:{session:{},modules:{}},setup(e){let t=e,n=o(()=>{if(!t.session.modulesList.length)return{workspace:{children:{},items:[]},nodeModules:{children:{},items:[]},virtual:{children:{},items:[]}};let e=[],n=[],r=[];return t.modules.map(e=>({full:e.id,path:e.path})).forEach(i=>{i.full.startsWith(t.session.meta.cwd)?(i.path.startsWith(`../`)||(i.path=i.full.slice(t.session.meta.cwd.length+1)),e.push(i)):i.full.includes(`node_modules`)?n.push({full:i.full,path:i.full}):i.full.startsWith(`virtual:`)&&r.push(i)}),{workspace:S(e,`Project Root`),nodeModules:S(n,`Node Modules`),virtual:S(r,`Virtual Modules`)}});return(e,t)=>{let r=P;return x(),p(`div`,re,[m(`div`,ie,[Object.keys(n.value.workspace.children).length?(x(),y(r,{key:0,node:n.value.workspace,p:`l3`,icon:`i-catppuccin:folder-dist icon-catppuccin`,"icon-open":`i-catppuccin:folder-dist-open icon-catppuccin`,link:!0},null,8,[`node`])):l(``,!0),Object.keys(n.value.nodeModules.children).length?(x(),p(v,{key:1},[t[0]||=m(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),f(r,{node:n.value.nodeModules,p:`l3`,icon:`i-catppuccin:folder-node icon-catppuccin`,"icon-open":`i-catppuccin:folder-node-open icon-catppuccin`,link:!0,open:!1},null,8,[`node`])],64)):l(``,!0),Object.keys(n.value.virtual.children).length?(x(),p(v,{key:2},[t[1]||=m(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),f(r,{node:n.value.virtual,p:`l3`,icon:`i-catppuccin:folder-components icon-catppuccin`,"icon-open":`i-catppuccin:folder-components-open icon-catppuccin`,link:!0,open:!1},null,8,[`node`])],64)):l(``,!0)])])}}}),oe=Object.assign(ae,{__name:`ModulesFolder`}),se={relative:``,"max-h-screen":``,"of-hidden":``},ce={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},le={key:0,h10:``,mr2:``,flex:`~ items-center`},ue={flex:`~ gap-2 items-center`,p2:``,border:`t base`},de=[`onClick`],fe={key:0,"of-auto":``,"h-screen":``,"pt-45":``},pe={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},$={op50:``},me={key:1,"of-auto":``,"h-screen":``,"pt-45":``},he={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},ge={op50:``},_e=h({__name:`index`,props:{session:{}},setup(c){let h=c,S=i(),O=a(),k=g({search:S.query.search||``,selected:S.query.file_types?L(S.query.file_types):null,node_modules:S.query.node_modules?L(S.query.node_modules):null}),M=[{label:`List`,value:`list`,icon:`i-ph-list-bullets-duotone`},{label:`Detailed List`,value:`detailed-list`,icon:`i-ph-list-magnifying-glass-duotone`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`},{label:`Folder`,value:`folder`,icon:`i-ph-folder-duotone`}];r(k.value,e=>{let t={...S.query,search:e.search||void 0,file_types:e.selected||void 0,node_modules:e.node_modules||void 0};O.replace({query:R(t)})},{debounce:500});let N=o(()=>h.session.modulesList.map(e=>({mod:e,path:E(e.id,h.session.meta.cwd),type:w(e.id)}))),P=o(()=>C.filter(e=>N.value.some(t=>e.match.test(t.mod.id)))),I=o(()=>{let e=N.value;return k.value.selected&&(e=e.filter(e=>{let t=w(e.mod.id);return k.value.selected.includes(t.name)})),k.value.node_modules&&(e=e.filter(e=>e.path.moduleName&&k.value.node_modules.includes(e.path.moduleName))),e.map(e=>({...e.mod,path:e.path.path}))}),{pathSelectorVisible:z,selectPathNodes:B,togglePathSelector:V,normalizedGraph:U}=F({onToggle:e=>{k.value.search=e?!1:``},dataMap:o(()=>new Map(h.session.modulesList.map(e=>[e.id,e]))),list:I,importIdKey:`module_id`}),W=s(()=>I.value,()=>new j(I.value,{includeScore:!0,keys:[`id`],ignoreLocation:!0,threshold:.4})),G=o(()=>k.value.search?W.value.search(k.value.search).map(e=>e.item):I.value);function K(e){S.query.module&&O.replace({query:{...S.query,module:void 0}}),D.value.moduleGraphViewType=e}return(r,i)=>{let a=H,o=T,s=ee,h=A,g=Z,S=ne,C=oe;return x(),p(`div`,se,[m(`div`,ce,[f(h,{modelValue:k.value,"onUpdate:modelValue":i[2]||=e=>k.value=e,rules:P.value},b({"search-end":t(()=>[e(D).moduleGraphViewType===`graph`?(x(),p(`div`,le,[m(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Graph Path Selector`,onClick:i[1]||=t=>e(V)(!0)},[...i[3]||=[m(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):l(``,!0)]),default:t(()=>[m(`div`,ue,[i[4]||=m(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(x(),p(v,null,n(M,t=>m(`button`,{key:t.value,"btn-action":``,class:d(e(D).moduleGraphViewType===t.value?`bg-active`:`grayscale op50`),onClick:e=>K(t.value)},[m(`div`,{class:d(t.icon)},null,2),u(` `+_(t.label),1)],10,de)),64))])]),_:2},[e(z)?{name:`search`,fn:t(()=>[f(s,{session:c.session,data:G.value,"import-id-key":`module_id`,"search-keys":[`id`],onSelect:e(B),onClose:i[0]||=t=>e(V)(!1)},{list:t(({select:e,data:t})=>[t?.length?(x(),y(a,{key:0,session:c.session,modules:t,"disable-tooltip":``,link:!1,onSelect:e},null,8,[`session`,`modules`,`onSelect`])):l(``,!0)]),item:t(({id:e})=>[f(o,{id:e,session:c.session,block:``,"text-nowrap":``,link:!1,"disable-tooltip":!0},null,8,[`id`,`session`])]),_:1},8,[`session`,`data`,`onSelect`])]),key:`0`}:void 0]),1032,[`modelValue`,`rules`])]),e(D).moduleGraphViewType===`list`?(x(),p(`div`,fe,[f(a,{session:c.session,modules:G.value},null,8,[`session`,`modules`]),m(`div`,pe,[m(`span`,$,_(G.value.length)+` of `+_(c.session.modulesList.length),1)])])):e(D).moduleGraphViewType===`detailed-list`?(x(),p(`div`,me,[f(g,{session:c.session,modules:G.value},null,8,[`session`,`modules`]),m(`div`,he,[m(`span`,ge,_(G.value.length)+` of `+_(c.session.modulesList.length),1)])])):e(D).moduleGraphViewType===`graph`?(x(),y(S,{key:2,session:c.session,modules:e(U)},null,8,[`session`,`modules`])):(x(),y(C,{key:3,session:c.session,modules:G.value},null,8,[`session`,`modules`]))])}}});export{_e as default};
|
|
1
|
+
import{$t as e,Bt as t,Ot as n,S as r,U as i,W as a,at as o,b as s,bt as c,ct as l,dt as u,en as d,ft as f,lt as p,ot as m,pt as h,qt as g,rn as _,rt as v,st as y,ut as b,wt as x}from"#entry";import"./CwTV8WCc.js";import{r as S}from"./D04G8HHr.js";import{a as C,s as w}from"./Bjj8tBzd.js";import{t as T}from"./CpJiZ7L0.js";import{t as E}from"./DWqpanCf.js";import{t as D}from"./CKFsAdVO.js";import{t as O}from"./BG553MBL.js";import{n as k}from"./CANF8ydB.js";import{n as A,r as j,t as M}from"./DYuLlkFe.js";import{t as N}from"./DYSe0ST1.js";import{t as P}from"./C2A6ZQPm.js";import{n as ee,r as F,t as I}from"./DhDTn9QE.js";import{n as L,t as R}from"./DVE8edJM.js";var z={flex:`~ col gap-2`,p4:``},B=[`onClick`],V=h({__name:`FlatList`,props:{session:{},modules:{},disableTooltip:{type:Boolean,default:!1},link:{type:Boolean,default:!0}},emits:[`select`],setup(e,{emit:n}){let r=n;return(n,i)=>{let a=T;return x(),p(`div`,z,[f(M,{items:e.modules,"key-prop":`id`},{default:t(({item:t})=>[m(`div`,{flex:``,pb2:``,onClick:e=>r(`select`,t)},[f(a,{id:t.id,session:e.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:e.link,"disable-tooltip":e.disableTooltip},null,8,[`id`,`session`,`link`,`disable-tooltip`])],8,B)]),_:1},8,[`items`])])}}}),H=Object.assign(V,{__name:`ModulesFlatList`}),U={flex:`~ col gap-2`,p4:``},W={flex:``,pb2:``},G={flex:`~ gap-1 wrap`,"text-xs":``},K={flex:`~ auto text-xs wrap`},q={key:0,flex:`~ items-center`},J={key:0,op20:``},Y={flex:`~ none gap-1 wrap justify-end`},X=h({__name:`DetailedList`,props:{session:{},modules:{}},setup(e){let r=e,i=o(()=>{let e=new Map;for(let t of r.modules){let n=t.buildMetrics?.transforms.filter(e=>e.source_code_size!==e.transformed_code_size).filter(e=>e.transformed_code_size);e.set(t.id,n)}return e});return(r,a)=>{let o=N,s=O,c=T;return x(),p(`div`,U,[f(M,{items:e.modules,"key-prop":`id`},{default:t(({item:r})=>[m(`div`,W,[f(c,{id:r.id,session:e.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:!0},{detail:t(()=>[m(`div`,G,[m(`ul`,K,[(x(!0),p(v,null,n(i.value.get(r.id),(e,t)=>(x(),p(v,{key:t},[e.source_code_size!==e.transformed_code_size&&e.transformed_code_size?(x(),p(`li`,q,[f(o,{name:e.plugin_name,class:`font-mono ws-nowrap op-50`},null,8,[`name`]),t===i.value.get(r.id).length-1?l(``,!0):(x(),p(`span`,J,`|`))])):l(``,!0)],64))),128))]),a[0]||=m(`div`,{flex:`~ auto gap-1`,"of-hidden":``},null,-1),m(`div`,Y,[m(`span`,null,[r.buildMetrics?(x(),y(s,{key:0,metrics:r.buildMetrics},null,8,[`metrics`])):l(``,!0)])])])]),_:2},1032,[`id`,`session`])])]),_:1},8,[`items`])])}}}),Z=Object.assign(X,{__name:`ModulesDetailedList`}),Q=[`d`,`stroke-dasharray`],te=h({__name:`Graph`,props:{modules:{},session:{}},setup(n){let r=n,i=o(()=>r.modules);return k({modules:i,spacing:{width:400,height:55,linkOffset:20,margin:800,gap:150},generateGraph:t=>{let{isFirstCalculateGraph:n,scale:r,spacing:a,tree:s,hierarchy:l,collapsedNodes:u,container:d,modulesMap:f,nodes:p,links:m,nodesMap:h,linksMap:g,width:_,height:v,childToParentMap:y,focusOn:b}=t,x=o(()=>i.value.filter(e=>e.importers.length===0));return(t=!0)=>{_.value=window.innerWidth,v.value=window.innerHeight;let i=new Set,o=l({module:{id:`~root`}},e=>e.module.id===`~root`?(x.value.forEach(e=>{i.add(e),n.value&&y.set(e.id,`~root`)}),x.value.map(e=>({module:e,expanded:!u.has(e.id),hasChildren:!1}))):u.has(e.module.id)?[]:e.module.imports.map(t=>{let r=f.value.get(t.module_id);if(r&&!i.has(r)&&!(y.has(r.id)&&y.get(r.id)!==e.module.id))return i.add(r),n.value&&y.set(r.id,e.module.id),{module:r,import:t,expanded:!u.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));n.value&&=!1,s().nodeSize([e(a.height),e(a.width)+e(a.gap)])(o);let S=o.descendants();for(let t of S)[t.x,t.y]=[t.y-e(a.width),t.x],t.data.module.imports&&(t.data.hasChildren=t.data.module.imports?.filter(e=>y.get(e.module_id)===t.data.module.id).length>0);let C=Math.min(...S.map(e=>e.x)),w=Math.min(...S.map(e=>e.y));if(C<e(a.margin))for(let t of S)t.x+=Math.abs(C)+e(a.margin);if(w<e(a.margin))for(let t of S)t.y+=Math.abs(w)+e(a.margin);p.value=S,h.clear();for(let e of S)h.set(e.data.module.id,e);let T=o.links().filter(e=>e.source.data.module.id!==`~root`).map(e=>({...e,import:e.source.data.import,id:`${e.source.data.module.id}|${e.target.data.module.id}`}));g.clear();for(let e of T)g.set(e.id,e);m.value=T,c(()=>{_.value=d.value.scrollWidth/r.value+e(a.margin),v.value=d.value.scrollHeight/r.value+e(a.margin);let n=x.value?.[0]?.id;t&&n&&c(()=>{b(n,!1)})})}}}),(e,r)=>{let a=T,o=I;return x(),y(o,{session:n.session,modules:i.value},{default:t(({node:e,nodesRefMap:t})=>[f(a,{id:e.data.module.id,ref:n=>t.set(e.data.module.id,n?.$el),link:!0,session:n.session,minimal:!0,flex:`1`},null,8,[`id`,`session`])]),link:t(({link:e,d:t,linkClass:n})=>[m(`path`,{d:t,class:d(n),"stroke-dasharray":e.import?.kind===`dynamic-import`?`3 6`:void 0,fill:`none`},null,10,Q)]),_:1},8,[`session`,`modules`])}}}),ne=Object.assign(te,{__name:`ModulesGraph`}),re={"of-auto":``,"max-h-screen":``,"pt-45":``,relative:``},ie={flex:`~ col gap-2`,p4:``},ae=h({__name:`Folder`,props:{session:{},modules:{}},setup(e){let t=e,n=o(()=>{if(!t.session.modulesList.length)return{workspace:{children:{},items:[]},nodeModules:{children:{},items:[]},virtual:{children:{},items:[]}};let e=[],n=[],r=[];return t.modules.map(e=>({full:e.id,path:e.path})).forEach(i=>{i.full.startsWith(t.session.meta.cwd)?(i.path.startsWith(`../`)||(i.path=i.full.slice(t.session.meta.cwd.length+1)),e.push(i)):i.full.includes(`node_modules`)?n.push({full:i.full,path:i.full}):i.full.startsWith(`virtual:`)&&r.push(i)}),{workspace:S(e,`Project Root`),nodeModules:S(n,`Node Modules`),virtual:S(r,`Virtual Modules`)}});return(e,t)=>{let r=P;return x(),p(`div`,re,[m(`div`,ie,[Object.keys(n.value.workspace.children).length?(x(),y(r,{key:0,node:n.value.workspace,p:`l3`,icon:`i-catppuccin:folder-dist icon-catppuccin`,"icon-open":`i-catppuccin:folder-dist-open icon-catppuccin`,link:!0},null,8,[`node`])):l(``,!0),Object.keys(n.value.nodeModules.children).length?(x(),p(v,{key:1},[t[0]||=m(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),f(r,{node:n.value.nodeModules,p:`l3`,icon:`i-catppuccin:folder-node icon-catppuccin`,"icon-open":`i-catppuccin:folder-node-open icon-catppuccin`,link:!0,open:!1},null,8,[`node`])],64)):l(``,!0),Object.keys(n.value.virtual.children).length?(x(),p(v,{key:2},[t[1]||=m(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),f(r,{node:n.value.virtual,p:`l3`,icon:`i-catppuccin:folder-components icon-catppuccin`,"icon-open":`i-catppuccin:folder-components-open icon-catppuccin`,link:!0,open:!1},null,8,[`node`])],64)):l(``,!0)])])}}}),oe=Object.assign(ae,{__name:`ModulesFolder`}),se={relative:``,"max-h-screen":``,"of-hidden":``},ce={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},le={key:0,h10:``,mr2:``,flex:`~ items-center`},ue={flex:`~ gap-2 items-center`,p2:``,border:`t base`},de=[`onClick`],fe={key:0,"of-auto":``,"h-screen":``,"pt-45":``},pe={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},$={op50:``},me={key:1,"of-auto":``,"h-screen":``,"pt-45":``},he={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},ge={op50:``},_e=h({__name:`index`,props:{session:{}},setup(c){let h=c,S=i(),O=a(),k=g({search:S.query.search||``,selected:S.query.file_types?L(S.query.file_types):null,node_modules:S.query.node_modules?L(S.query.node_modules):null}),M=[{label:`List`,value:`list`,icon:`i-ph-list-bullets-duotone`},{label:`Detailed List`,value:`detailed-list`,icon:`i-ph-list-magnifying-glass-duotone`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`},{label:`Folder`,value:`folder`,icon:`i-ph-folder-duotone`}];r(k.value,e=>{let t={...S.query,search:e.search||void 0,file_types:e.selected||void 0,node_modules:e.node_modules||void 0};O.replace({query:R(t)})},{debounce:500});let N=o(()=>h.session.modulesList.map(e=>({mod:e,path:E(e.id,h.session.meta.cwd),type:w(e.id)}))),P=o(()=>C.filter(e=>N.value.some(t=>e.match.test(t.mod.id)))),I=o(()=>{let e=N.value;return k.value.selected&&(e=e.filter(e=>{let t=w(e.mod.id);return k.value.selected.includes(t.name)})),k.value.node_modules&&(e=e.filter(e=>e.path.moduleName&&k.value.node_modules.includes(e.path.moduleName))),e.map(e=>({...e.mod,path:e.path.path}))}),{pathSelectorVisible:z,selectPathNodes:B,togglePathSelector:V,normalizedGraph:U}=F({onToggle:e=>{k.value.search=e?!1:``},dataMap:o(()=>new Map(h.session.modulesList.map(e=>[e.id,e]))),list:I,importIdKey:`module_id`}),W=s(()=>I.value,()=>new j(I.value,{includeScore:!0,keys:[`id`],ignoreLocation:!0,threshold:.4})),G=o(()=>k.value.search?W.value.search(k.value.search).map(e=>e.item):I.value);function K(e){S.query.module&&O.replace({query:{...S.query,module:void 0}}),D.value.moduleGraphViewType=e}return(r,i)=>{let a=H,o=T,s=ee,h=A,g=Z,S=ne,C=oe;return x(),p(`div`,se,[m(`div`,ce,[f(h,{modelValue:k.value,"onUpdate:modelValue":i[2]||=e=>k.value=e,rules:P.value},b({"search-end":t(()=>[e(D).moduleGraphViewType===`graph`?(x(),p(`div`,le,[m(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Graph Path Selector`,onClick:i[1]||=t=>e(V)(!0)},[...i[3]||=[m(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):l(``,!0)]),default:t(()=>[m(`div`,ue,[i[4]||=m(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(x(),p(v,null,n(M,t=>m(`button`,{key:t.value,"btn-action":``,class:d(e(D).moduleGraphViewType===t.value?`bg-active`:`grayscale op50`),onClick:e=>K(t.value)},[m(`div`,{class:d(t.icon)},null,2),u(` `+_(t.label),1)],10,de)),64))])]),_:2},[e(z)?{name:`search`,fn:t(()=>[f(s,{session:c.session,data:G.value,"import-id-key":`module_id`,"search-keys":[`id`],onSelect:e(B),onClose:i[0]||=t=>e(V)(!1)},{list:t(({select:e,data:t})=>[t?.length?(x(),y(a,{key:0,session:c.session,modules:t,"disable-tooltip":``,link:!1,onSelect:e},null,8,[`session`,`modules`,`onSelect`])):l(``,!0)]),item:t(({id:e})=>[f(o,{id:e,session:c.session,block:``,"text-nowrap":``,link:!1,"disable-tooltip":!0},null,8,[`id`,`session`])]),_:1},8,[`session`,`data`,`onSelect`])]),key:`0`}:void 0]),1032,[`modelValue`,`rules`])]),e(D).moduleGraphViewType===`list`?(x(),p(`div`,fe,[f(a,{session:c.session,modules:G.value},null,8,[`session`,`modules`]),m(`div`,pe,[m(`span`,$,_(G.value.length)+` of `+_(c.session.modulesList.length),1)])])):e(D).moduleGraphViewType===`detailed-list`?(x(),p(`div`,me,[f(g,{session:c.session,modules:G.value},null,8,[`session`,`modules`]),m(`div`,he,[m(`span`,ge,_(G.value.length)+` of `+_(c.session.modulesList.length),1)])])):e(D).moduleGraphViewType===`graph`?(x(),y(S,{key:2,session:c.session,modules:e(U)},null,8,[`session`,`modules`])):(x(),y(C,{key:3,session:c.session,modules:G.value},null,8,[`session`,`modules`]))])}}});export{_e as default};
|