@vitejs/devtools-rolldown 0.1.20 → 0.1.22
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 +85 -49
- package/dist/nitro.json +2 -2
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/{CBfhMqaX.js → B2xjE9S9.js} +1 -1
- package/dist/public/_nuxt/{CavyT85L2.js → B7_BsZam2.js} +1 -1
- package/dist/public/_nuxt/{BWeJkag7.js → BDcpuUbg.js} +1 -1
- package/dist/public/_nuxt/{BdFYEjeH.js → BM8UMmvc.js} +1 -1
- package/dist/public/_nuxt/{D00v5GDJ.js → BQdCEVtN.js} +1 -1
- package/dist/public/_nuxt/{BQIt7f6-2.js → BT76Oq15.js} +1 -1
- package/dist/public/_nuxt/BWhQiJfC2.js +1 -0
- package/dist/public/_nuxt/{BAyxWnhM2.js → BZZwdm9H2.js} +1 -1
- package/dist/public/_nuxt/BgSZqMub.js +1 -0
- package/dist/public/_nuxt/{CJdYjM__.js → Bi5REHPk.js} +1 -1
- package/dist/public/_nuxt/{CgIVM_ZA.js → BywRM_M7.js} +1 -1
- package/dist/public/_nuxt/CCApufKY2.js +1 -0
- package/dist/public/_nuxt/{20hUiP46.js → COhEYQbe.js} +1 -1
- package/dist/public/_nuxt/{BOT9W_ZD.js → CTNFxt3v.js} +1 -1
- package/dist/public/_nuxt/{Cz_QngRP.js → CXpJVZ-W.js} +1 -1
- package/dist/public/_nuxt/{bqLEejUC.js → CY_j28gw.js} +1 -1
- package/dist/public/_nuxt/Cf2rORiJ.js +1 -0
- package/dist/public/_nuxt/{P_nXTQEe.js → Cm8gy9GJ.js} +1 -1
- package/dist/public/_nuxt/{CvnFxGBE.js → Crmmgcgo.js} +1 -1
- package/dist/public/_nuxt/{x1vnwfQM.js → D1flKd96.js} +1 -1
- package/dist/public/_nuxt/D1igyLjg.js +1 -0
- package/dist/public/_nuxt/{BP8IEXpL.js → D3O7sl5Q.js} +1 -1
- package/dist/public/_nuxt/{CUBdwZVs.js → DAfG6Q5x.js} +1 -1
- package/dist/public/_nuxt/DGp5TtxR.js +1 -0
- package/dist/public/_nuxt/{DKJ20h2B.js → DGzTCPXE.js} +2 -2
- package/dist/public/_nuxt/{B8fJ7G-T.js → DIY3Np8j.js} +1 -1
- package/dist/public/_nuxt/DMpb9tLN2.js +1 -0
- package/dist/public/_nuxt/{CKlr0Tan.js → DUEAe2mZ.js} +1 -1
- package/dist/public/_nuxt/DfB5JIVQ.js +4 -0
- package/dist/public/_nuxt/{qpeZMqnF.js → JqkF4g2X.js} +1 -1
- package/dist/public/_nuxt/{ENNcF9U5.js → Tbnz_kEc.js} +1 -1
- package/dist/public/_nuxt/{BdMtzkAy2.js → UXZdwVQx2.js} +1 -1
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/aadc6ea3-cb4b-43e9-ad21-d65e7418491c.json +1 -0
- package/dist/public/_nuxt/{entry.DguO3VpB.css → entry.CnoZstXg.css} +1 -1
- package/dist/public/_nuxt/error-404.cCAauWc2.css +1 -0
- package/dist/public/_nuxt/error-500.BFrkx7fE.css +1 -0
- package/dist/public/_nuxt/qKmu99_C.js +1 -0
- package/dist/public/_nuxt/{CbQbsbZd.js → qNFXE2Qb.js} +1 -1
- package/dist/public/_nuxt/qTund2SX.js +2 -0
- package/dist/public/_nuxt/{CWusIlaG.js → s8CxCfpb.js} +1 -1
- package/dist/public/_nuxt/{DU7iNs37.js → uoAMmAT1.js} +1 -1
- package/dist/public/_nuxt/{C5iGLYf8.js → xgeU2imy.js} +1 -1
- package/dist/public/index.html +1 -1
- package/package.json +7 -11
- package/dist/public/_nuxt/BTfiKBAm.js +0 -1
- package/dist/public/_nuxt/BTkQJesx.js +0 -1
- package/dist/public/_nuxt/BYiuS205.js +0 -4
- package/dist/public/_nuxt/BqiFImA_.js +0 -1
- package/dist/public/_nuxt/CHmEnixh2.js +0 -1
- package/dist/public/_nuxt/CK6Xn-O82.js +0 -1
- package/dist/public/_nuxt/CcXFxXMQ.js +0 -2
- package/dist/public/_nuxt/CxYeQaBW.js +0 -1
- package/dist/public/_nuxt/D8ugdtv-.js +0 -1
- package/dist/public/_nuxt/DEiLiWhM2.js +0 -1
- package/dist/public/_nuxt/builds/meta/6ec89d4d-a88a-4396-9292-3f2655baa827.json +0 -1
- package/dist/public/_nuxt/error-404.D0uDCatO.css +0 -1
- package/dist/public/_nuxt/error-500.DSBLz6Ry.css +0 -1
- package/dist/public/_nuxt/zt8ARaaw.js +0 -1
- /package/dist/public/_nuxt/{D1iwru-F2.js → qIAw3Eg02.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./
|
|
1
|
+
import{r as e}from"./DfB5JIVQ.js";import{A as t,C as n,Jt as r,M as i,Q as a,R as o,S as s,Z as c,b as l,h as u,k as d,kt as f,lt as p,q as m,rt as h,tt as g,w as _,x as v}from"./DAfG6Q5x.js";import{C as y}from"./D1igyLjg.js";import{u as b}from"./DGp5TtxR.js";import{n as x}from"#entry";import{t as S}from"./Bi5REHPk.js";import{r as C,t as w}from"./xgeU2imy.js";import{r as T}from"./B2xjE9S9.js";import{t as E}from"./BywRM_M7.js";var D=[`title`],O={key:0,flex:`~ items-center gap-2`},k={op50:``,"font-mono":``},A=[`title`],j=[`title`],M=Object.assign(i({__name:`BaseInfo`,props:{chunk:{},link:{type:Boolean,default:!1},basic:{type:Boolean,default:!1}},setup(e){let i=e,o=y(),c=l(()=>Array.isArray(i.chunk.imports)?i.chunk.imports.length:i.chunk.imports),u=l(()=>Array.isArray(i.chunk.modules)?i.chunk.modules.length:i.chunk.modules);return(i,l)=>(m(),s(g(e.link?f(S):`div`),{to:e.link?typeof e.link==`string`?e.link:{path:f(o).path,query:{chunk:e.chunk.chunk_id}}:void 0,flex:`~ gap-3 items-center`},{default:p(()=>[v(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.chunk.chunk_id}`},[a(i.$slots,`icon`,{},()=>[l[0]||=v(`div`,{"i-ph-shapes-duotone":``},null,-1)]),v(`div`,null,r(e.chunk.name||`[unnamed]`),1),t(C,{text:e.chunk.reason},null,8,[`text`]),a(i.$slots,`left-after`)],8,D),l[3]||=v(`div`,{"flex-auto":``},null,-1),e.basic?n(``,!0):(m(),_(`div`,O,[v(`span`,k,`#`+r(e.chunk.chunk_id),1),v(`div`,{flex:`~ gap-1 items-center`,title:`${c.value} imports`},[l[1]||=v(`div`,{"i-ph-file-arrow-up-duotone":``},null,-1),d(` `+r(c.value),1)],8,A),v(`div`,{flex:`~ gap-1 items-center`,title:`${u.value} modules`},[l[2]||=v(`div`,{"i-ph-package-duotone":``},null,-1),d(` `+r(u.value),1)],8,j)])),a(i.$slots,`default`)]),_:3},8,[`to`]))}}),{__name:`ChunksBaseInfo`}),N={flex:`~ gap-2 items-center`},P=Object.assign(i({__name:`BaseInfo`,props:{asset:{}},setup(e){return(n,i)=>{let a=T;return m(),_(`div`,N,[i[0]||=v(`div`,{"i-catppuccin-java-class-abstract":``},null,-1),v(`div`,null,r(e.asset.filename),1),t(a,{bytes:e.asset.size,"text-sm":``},null,8,[`bytes`]),t(C,{text:e.asset.type},null,8,[`text`])])}}}),{__name:`AssetsBaseInfo`}),F={relative:``},I={key:0,"pointer-events-none":``,absolute:``,"left-0":``,"right-0":``,"bottom-0":``,"bg-gradient-more":``,"h-30":``,flex:`~ justify-center`},L=Object.assign(i({__name:`ExpandableContainer`,props:o({list:{}},{count:{default:20},countModifiers:{}}),emits:[`update:count`],setup(e){let r=e,i=h(e,`count`),o=i.value,s=l(()=>r.list.slice(0,i.value));return(c,l)=>(m(),_(`div`,F,[a(c.$slots,`default`,{items:s.value}),e.list.length>i.value?(m(),_(`div`,I,[v(`button`,{op35:``,p2:``,pt4:``,mta:``,"pointer-events-auto":``,"hover:op100":``,flex:`~ items-center gap-1 justify-center`,onClick:l[0]||=e=>i.value=Math.round(i.value+f(o))},[l[2]||=v(`div`,{"i-ri:arrow-down-double-line":``},null,-1),l[3]||=v(`span`,null,`More`,-1),t(E,{prefix:`+`,number:Math.min(Math.round(f(o)),r.list.length-i.value),"rounded-full":``,"text-sm":``},null,8,[`number`])]),v(`button`,{op35:``,p2:``,pt4:``,mta:``,"pointer-events-auto":``,"hover:op100":``,flex:`~ items-center gap-1 justify-center`,onClick:l[1]||=e=>i.value=r.list.length},[l[4]||=v(`div`,{"i-ph-arrows-out-line-vertical-duotone":``},null,-1),l[5]||=v(`span`,null,`All`,-1),t(E,{number:r.list.length,"rounded-full":``,"text-sm":``},null,8,[`number`])])])):n(``,!0)]))}}),{__name:`DisplayExpandableContainer`}),R={key:0,"i-ph-file-duotone":``},z={key:1,"i-ph-lightning-duotone":``},B=Object.assign(i({__name:`Imports`,props:{imports:{}},setup(e){return(r,i)=>{let a=M,o=L;return m(),s(o,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:e.imports},{default:p(({items:e})=>[(m(!0),_(u,null,c(e,(e,r)=>(m(),_(u,{key:r},[e?(m(),s(a,{key:0,chunk:e,link:``,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},{icon:p(()=>[e.kind===`import-statement`?(m(),_(`div`,R)):n(``,!0),e.kind===`dynamic-import`?(m(),_(`div`,z)):n(``,!0)]),"left-after":p(()=>[t(C,{text:e.kind},null,8,[`text`])]),_:2},1032,[`chunk`])):n(``,!0)],64))),128))]),_:1},8,[`list`])}}}),{__name:`ChunksImports`}),V={flex:`~ col gap-3`},H={key:1,"text-sm":``,op50:``,flex:`~ items-center`,title:`Total size of imports`},U={open:`true`},W={open:`true`},G={op50:``},K={key:0,open:`true`},q={op50:``},J={key:1,open:`true`},Y={op50:``},X=Object.assign(i({__name:`ChunkDetails`,props:{chunk:{},session:{},showDetails:{type:Boolean,default:!0},chunks:{}},setup(i){let o=i,h=l(()=>{let e=new Map;for(let t of o.session.modulesList)e.set(t.id,t);return e});function g(e){return e.reduce((e,t)=>{let n=h.value.get(t);return!n||!n.buildMetrics?.transforms?.length?e:e+n.buildMetrics.transforms.at(-1).transformed_code_size},0)}let E=l(()=>g(o.chunk.modules)),D=y(),O=e(),{state:k,isLoading:A}=b(async()=>{if(!o.chunks)return await O.value.call(`vite:rolldown:get-chunks-graph`,{session:o.session.id})},null),j=l(()=>o.chunks||k.value),N=l(()=>o.chunk.imports.map(e=>{let t=j.value?.find(t=>t.chunk_id===e.chunk_id);return{...e,name:t?.name||`[unnamed]`,reason:t?.reason||`common`,imports:t?.imports.length||0,modules:t?.modules.length||0,size:g(t?.modules||[])}})),F=l(()=>j.value?.filter(e=>e.imports.some(e=>e.chunk_id===o.chunk.chunk_id)).map(e=>({...e.imports.find(e=>e.chunk_id===o.chunk.chunk_id),chunk_id:e.chunk_id,name:e.name||`[unnamed]`,reason:e.reason||`common`,imports:e.imports.length||0,modules:e.modules.length||0}))||[]);return(e,o)=>{let l=T,h=M,g=P,y=S,b=w,O=L,k=x,j=B;return m(),_(`div`,V,[t(h,{chunk:i.chunk},{"left-after":p(()=>[i.chunk.is_initial?(m(),s(C,{key:0,text:`initial`})):n(``,!0),t(l,{bytes:E.value,"text-sm":``,title:`Chunk size`},null,8,[`bytes`]),N.value.length?(m(),_(`div`,H,[o[0]||=d(` (`,-1),t(l,{bytes:N.value.reduce((e,t)=>e+t.size,0)},null,8,[`bytes`]),o[1]||=d(`) `,-1)])):n(``,!0)]),default:p(()=>[a(e.$slots,`default`)]),_:3},8,[`chunk`]),i.showDetails?(m(),_(u,{key:0},[v(`details`,U,[o[2]||=v(`summary`,{op50:``},` Assets `,-1),t(y,{border:`~ base rounded-lg`,px2:``,mt2:``,py1:``,"min-w-fit":``,flex:`~`,to:{path:f(D).path,query:{asset:i.chunk.asset?.filename}}},{default:p(()=>[t(g,{asset:{...i.chunk.asset,type:`asset`}},null,8,[`asset`])]),_:1},8,[`to`])]),v(`details`,W,[v(`summary`,G,[v(`span`,null,`Modules (`+r(i.chunk.modules.length)+`)`,1)]),t(O,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:i.chunk.modules},{default:p(({items:e})=>[(m(!0),_(u,null,c(e,e=>(m(),s(b,{id:e,key:e,session:i.session,link:!0,minimal:!0,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},null,8,[`id`,`session`]))),128))]),_:1},8,[`list`])]),f(A)?(m(),s(k,{key:0})):(m(),_(u,{key:1},[i.chunk.imports.length?(m(),_(`details`,K,[v(`summary`,q,[v(`span`,null,`Imports (`+r(i.chunk.imports.length)+`)`,1)]),t(j,{imports:N.value},null,8,[`imports`])])):n(``,!0),F.value.length?(m(),_(`details`,J,[v(`summary`,Y,[v(`span`,null,`Importers (`+r(F.value.length)+`)`,1)]),t(j,{imports:F.value},null,8,[`imports`])])):n(``,!0)],64))],64)):n(``,!0)])}}}),{__name:`DataChunkDetails`});export{M as i,L as n,P as r,X as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,C as t,Et as n,Jt as r,K as i,M as a,Q as o,S as s,Z as c,at as l,b as u,h as d,kt as f,ot as p,q as m,qt as h,v as g,w as _,wt as v,x as y,xt as ee}from"./CUBdwZVs.js";import{a as b,c as x,d as S,f as C,i as te,l as w,o as ne,r as re,u as ie}from"./5tvbNeKa.js";import{t as T}from"./CxYeQaBW.js";import{t as E}from"./CqfNwh25.js";import{t as ae}from"./CBfhMqaX.js";function D(){return typeof window<`u`}function O(e){return oe(e)?(e.nodeName||``).toLowerCase():`#document`}function k(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function A(e){return((oe(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function oe(e){return D()?e instanceof Node||e instanceof k(e).Node:!1}function j(e){return D()?e instanceof Element||e instanceof k(e).Element:!1}function M(e){return D()?e instanceof HTMLElement||e instanceof k(e).HTMLElement:!1}function se(e){return!D()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof k(e).ShadowRoot}function N(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=L(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ce(e){return/^(table|td|th)$/.test(O(e))}function P(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var le=/transform|translate|scale|rotate|perspective|filter/,ue=/paint|layout|strict|content/,F=e=>!!e&&e!==`none`,de;function fe(e){let t=j(e)?L(e):e;return F(t.transform)||F(t.translate)||F(t.scale)||F(t.rotate)||F(t.perspective)||!me()&&(F(t.backdropFilter)||F(t.filter))||le.test(t.willChange||``)||ue.test(t.contain||``)}function pe(e){let t=z(e);for(;M(t)&&!I(t);){if(fe(t))return t;if(P(t))return null;t=z(t)}return null}function me(){return de??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),de}function I(e){return/^(html|body|#document)$/.test(O(e))}function L(e){return k(e).getComputedStyle(e)}function R(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function z(e){if(O(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||se(e)&&e.host||A(e);return se(t)?t.host:t}function he(e){let t=z(e);return I(t)?e.ownerDocument?e.ownerDocument.body:e.body:M(t)&&N(t)?t:he(t)}function ge(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=he(e),i=r===e.ownerDocument?.body,a=k(r);if(i){let e=_e(a);return t.concat(a,a.visualViewport||[],N(r)?r:[],e&&n?ge(e):[])}else return t.concat(r,ge(r,[],n))}function _e(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ve(e){let t=L(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=M(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=C(n)!==a||C(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ye(e){return j(e)?e:e.contextElement}function B(e){let t=ye(e);if(!M(t))return x(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ve(t),o=(a?C(n.width):n.width)/r,s=(a?C(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var be=x(0);function xe(e){let t=k(e);return!me()||!t.visualViewport?be:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Se(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==k(e)?!1:t}function V(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ye(e),o=x(1);t&&(r?j(r)&&(o=B(r)):o=B(e));let s=Se(a,n,r)?xe(a):x(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=k(a),t=r&&j(r)?k(r):r,n=e,i=_e(n);for(;i&&r&&t!==n;){let e=B(i),t=i.getBoundingClientRect(),r=L(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,d*=e.y,c+=a,l+=o,n=k(i),i=_e(n)}}return S({width:u,height:d,x:c,y:l})}function H(e,t){let n=R(e).scrollLeft;return t?t.left+n:V(A(e)).left+n}function Ce(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-H(e,n),y:n.top+t.scrollTop}}function we(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=A(r),s=t?P(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=x(1),u=x(0),d=M(r);if((d||!d&&!a)&&((O(r)!==`body`||N(o))&&(c=R(r)),d)){let e=V(r);l=B(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ce(o,c):x(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 Te(e){return Array.from(e.getClientRects())}function Ee(e){let t=A(e),n=R(e),r=e.ownerDocument.body,i=w(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=w(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+H(e),s=-n.scrollTop;return L(r).direction===`rtl`&&(o+=w(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var De=25;function Oe(e,t){let n=k(e),r=A(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=me();(!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<=De&&(a-=o)}else l<=De&&(a+=l);return{width:a,height:o,x:s,y:c}}function ke(e,t){let n=V(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=M(e)?B(e):x(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ae(e,t,n){let r;if(t===`viewport`)r=Oe(e,n);else if(t===`document`)r=Ee(A(e));else if(j(t))r=ke(t,n);else{let n=xe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S(r)}function je(e,t){let n=z(e);return n===t||!j(n)||I(n)?!1:L(n).position===`fixed`||je(n,t)}function Me(e,t){let n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(e=>j(e)&&O(e)!==`body`),i=null,a=L(e).position===`fixed`,o=a?z(e):e;for(;j(o)&&!I(o);){let t=L(o),n=fe(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||N(o)&&!n&&je(e,o))?r=r.filter(e=>e!==o):i=t,o=z(o)}return t.set(e,r),r}function Ne(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?P(t)?[]:Me(t,this._c):[].concat(n),r],o=Ae(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ae(t,a[e],i);s=w(n.top,s),c=ie(n.right,c),l=ie(n.bottom,l),u=w(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Pe(e){let{width:t,height:n}=ve(e);return{width:t,height:n}}function Fe(e,t,n){let r=M(t),i=A(t),a=n===`fixed`,o=V(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=x(0);function l(){c.x=H(i)}if(r||!r&&!a)if((O(t)!==`body`||N(i))&&(s=R(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?Ce(i,s):x(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 U(e){return L(e).position===`static`}function Ie(e,t){if(!M(e)||L(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return A(e)===n&&(n=n.ownerDocument.body),n}function Le(e,t){let n=k(e);if(P(e))return n;if(!M(e)){let t=z(e);for(;t&&!I(t);){if(j(t)&&!U(t))return t;t=z(t)}return n}let r=Ie(e,t);for(;r&&ce(r)&&U(r);)r=Ie(r,t);return r&&I(r)&&U(r)&&!fe(r)?n:r||pe(e)||n}var Re=async function(e){let t=this.getOffsetParent||Le,n=this.getDimensions,r=await n(e.floating);return{reference:Fe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ze(e){return L(e).direction===`rtl`}var Be={convertOffsetParentRelativeRectToViewportRelativeRect:we,getDocumentElement:A,getClippingRect:Ne,getOffsetParent:Le,getElementRects:Re,getClientRects:Te,getDimensions:Pe,getScale:B,isElement:j,isRTL:ze},Ve=b,He=ne,Ue=te,We=(e,t,n)=>{let r=new Map,i={platform:Be,...n},a={...i.platform,_c:r};return re(e,t,{...i,platform:a})},Ge=Object.assign(a({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:t,hoverY:r}=n(e),i=l(`hoverElement`),a=ee(0),c=ee(0);return p([t,r],([e,t])=>{We({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},i.value,{placement:`right-start`,middleware:[Ue(),He(),Ve({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{a.value=e,c.value=t})}),(e,t)=>(m(),s(g,{to:`body`},[y(`div`,{ref_key:`hoverElement`,ref:i,fixed:``,"z-panel-content":``,"pointer-events-none":``,style:h({left:`${a.value}px`,top:`${c.value}px`})},[o(e.$slots,`default`)],4)]))}}),{__name:`DisplayGraphHoverView`});function Ke(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 qe,Je,Ye,W,G,K=1,Xe;function Ze(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if(qe!==t||Je!==a||Ye!==i){let n=Math.round(64*a)/64;K=i,K=Math.log2(K),K-=Math.floor(K);let r=K,o=Math.min(1,8*r);K=2**K;let s=8*Math.SQRT2/K;qe=t,Je=a,Ye=i,W||=document.createElement(`canvas`),G||=W.getContext(`2d`),W.width=W.height=Math.round(64*n),G.scale(n,n),G.fillStyle=e[0],G.fillRect(0,0,64,64),G.globalAlpha=.25,G.fillStyle=e[1],G.fillRect(0,0,64,64),G.globalAlpha=.67,G.strokeStyle=e[1],G.beginPath();for(let e=0;e<=64;e+=16)G.moveTo(e-32,e+32),G.lineTo(e+32,e-32);if(G.lineWidth=s*(1-(o-r)/2),G.stroke(),o+r>0){G.beginPath();for(let e=8;e<64;e+=16)G.moveTo(e-32,e+32),G.lineTo(e+32,e-32);G.lineWidth=s*(o+r)/2,G.stroke()}Xe=t.createPattern(W,`repeat`),K/=n}return n/=64*K*a,n-=Math.floor(n),n*=64*K*a,Xe.setTransform(new DOMMatrix([K,0,0,K,n,r])),Xe}function Qe(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 $e(e){return t=>t.id&&e[t.id]||t.color}function et(e,t=1,n=1){let r={};return tt(r,e,0,Math.PI*2,t,n),$e(r)}function tt(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=Ke(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;tt(e,s,n,t,i,a),n+=t}}var nt=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function rt(e=16,t=nt){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function it(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=rt(),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=>it(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 at(e){return e.children.length===0?1:Math.max(...e.children.map(e=>at(e)))+1}var ot=/\bFirefox\//.test(navigator.userAgent),st;function ct(e){return st?st.format(e):`${e}`}function q(){return(window.performance||Date).now()}function lt(e){let t=e.toFixed(1).split(`.`,2);return`${ct(+t[0])}.${t[1]}`}function ut(e){return e===1?`1 byte`:e<1024?`${ct(e)} bytes`:e<1024*1024?`${lt(e/1024)} kb`:e<1024*1024*1024?`${lt(e/(1024*1024))} mb`:`${lt(e/(1024*1024*1024))} gb`}function dt(e,t,n,r,i,a){if(ot){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 ft(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function pt(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{st=new Intl.NumberFormat}catch{}var mt=()=>({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)}}}),J={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},ht={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},gt=46,_t=`14px sans-serif`,vt=`bold ${_t}`,yt=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={...J,...t};let{getColor:n=et(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...ht,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=at(e),this.disposables=[],this.events=mt(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(_t),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(gt)}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]}},Y=24,bt=5,xt=.01,St=1e3,Ct=class extends yt{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(ft(e=>{let t=e.deltaX,n=e.deltaY,r=q(),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(pt(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(q()-this.animationStart)/(this.options.animateDuration??J.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??J.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*xt),r=Math.min(this.totalBytes,r+e.size*xt),this.setViewport(n,r,t)}}select(e,t=this.options.animate??J.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*Y+1,this.zoomedOutMin=this.width-St>>1,this.zoomedOutWidth=this.zoomedOutMin+St,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)+bt,d=t+Y/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=Ze(this.getColor(e)||this.palette.fallback,this.c,this.zoomedOutMin-this.viewportMin*a,Y,a*this.stripeScaleAdjust),v=this.palette.text,y=-1/0;i&1?(v=this.palette.fg,this.setFont(vt)):(this.c.fillStyle=_,this.c.fillRect(o,t,l,Y),(i&2||this.hoveredNode&&e.id===this.hoveredNode.id)&&(this.c.fillStyle=this.palette.hover,this.c.fillRect(o,t,l,Y),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(_t),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+Y,n,y,i&-2),n+=r.size;return i&1||dt(this.c,this.palette.stroke,o+.5,t+.5,l,Y),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+Y&&e.id)return e;if(r>=t+Y)for(let r of e.children){let e=a(r,t+Y,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=q():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};function wt(e,t){for(;t;){if(t===e)return!0;t=t.parent}return!1}function Tt(e,t,n){if(e===t)return;let r=t.parent,i=r.size||1,a=0;Tt(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 Et={};function Dt(e){return Et[e]||(Et[e]=400*Math.log(1+Math.log(1+e/8))),Et[e]}var X=-Math.PI/2,Ot=class extends yt{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(pt(()=>this.resize())),this.disposables.push(ft(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(Dt(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(vt),this.c.textAlign=`center`,this.c.fillText(this.getSubtext(this.targetNode)??ut(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=Ze(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=(q()-this.animationStart)/(this.options.animateDuration??J.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 Dt(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=q()),wt(this.animatedNode,this.currentNode)){let e={depth_:this.animatedDepth,startAngle_:this.animatedStartAngle,sweepAngle_:this.animatedSweepAngle};Tt(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(wt(this.currentNode,this.animatedNode)){let e={depth_:0,startAngle_:X,sweepAngle_:Math.PI*2};Tt(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,kt=2*Z,$=Q+Z;function At(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>kt&&y>$?At(t.children,g+Z,_+Q,v-kt,y-$):[]}),h+=c}t=d,i>=s?(n+=m,i-=m):(r+=m,s-=m)}})(0,t,n,r,i),a}var jt=class extends yt{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(ft(e=>this.updateHover(e))),this.disposables.push(pt(()=>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=(q()-this.animationStart)/(this.options.animateDuration??J.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=At([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|(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=Ze(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(dt(this.c,this.palette.stroke,n+.5,i+.5,a,o),o>=Q){this.c.fillStyle=this.palette.text;let e=a-kt,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=At([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=q(),this.animationSource=this.currentNode),this.animationTarget=e,this.currentNode=e||this.searchFor([this.layers.base],this.currentNode.node),this.updateCurrentLayout(),this.invalidate())}},Mt={flex:`~ gap-1 items-center wrap`},Nt={key:0,"i-ph-arrow-right-bold":``,"text-sm":``,"op-fade":``},Pt=[`onClick`],Ft=Object.assign(a({__name:`NavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:n}){let i=e,a=n,o=u(()=>{let e=[],t=i.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,n)=>(m(),_(`div`,Mt,[(m(!0),_(d,null,c(o.value,(e,n)=>(m(),_(d,{key:e.id},[n>0?(m(),_(`div`,Nt)):t(``,!0),y(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>a(`select`,e)},[y(`span`,null,r(e.text||e.id),1)],8,Pt)],64))),128))]))}}),{__name:`ChartNavBreadcrumb`});function It(t){let{data:n,nameKey:r,sizeKey:a,rootText:o,nodeType:s,graphOptions:c,onUpdate:l}=t,d=v(void 0),m=v(void 0),h=ee(void 0),g=v(void 0),_,y=u(()=>{if(t.tree)return t.tree.value;let e=f(n),i=new Map,c=0,l={id:`~root`,text:o,size:0,sizeSelf:0,children:[]};if(!e?.length)return{map:i,root:l,maxDepth:c};let u=[];u.unshift(()=>{l.size+=l.children.reduce((e,t)=>e+t.size,0),l.subtext=E(l.size).join(` `),l.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function d(e,t,n,r,a){if(i.has(t))return i.get(t);a>c&&(c=a);let o={id:t,text:n,size:0,sizeSelf:0,children:[],meta:{...e,path:n,type:`folder`},parent:r};return i.set(t,o),r.children.push(o),u.unshift(()=>{let t=o.sizeSelf;o.size+=o.children.reduce((e,t)=>e+t.size,0),o.subtext=E(o.size).join(` `),o.children.length&&t/o.size>.1&&o.children.push({id:`${o.id}-self`,text:``,size:t,sizeSelf:t,subtext:E(t).join(` `),children:[],meta:{...e,path:``,type:s},parent:o}),o.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),o}function p(e){let t=e[r].split(`/`).filter(Boolean),n=l,o=``,c=0;t.forEach((l,u)=>{if(o+=(o?`/`:``)+l,c++,u===t.length-1){let t={id:e[r],text:l,size:e[a],sizeSelf:e[a],subtext:E(e[a]).join(` `),children:[],meta:{...e,path:l,type:s}};n.children.push(t),i.set(e[r],t)}else n=d(e,o,l,n,c)})}return e.forEach(p),u.forEach(e=>e()),{map:i,root:l,maxDepth:c}}),b=u(()=>({animate:ae.value.chartAnimation,palette:{stroke:T.value?`#222`:`#555`,fg:T.value?`#fff`:`#000`,bg:T.value?`#111`:`#fff`},getColor:et(y.value.root,T.value?.8:.9,T.value?1:1.1),getSubtext:e=>e.subtext,...c}));function x(e,t){h.value=e?.meta,e?.children.length||(e=e?.parent),g.value?.select(e,t)}function S(){_?.(),m.value=y.value.root,l?.(),e(()=>{let e=h.value&&y.value.map.get(h.value[r])||null;e&&x(e,!1)}),_=()=>{g.value?.dispose(),g.value=void 0,h.value=void 0}}return e(()=>{p(()=>[y.value,b.value],()=>{S()},{deep:!0,immediate:!1}),S()}),i(()=>{_?.()}),{tree:y,graph:g,chartOptions:b,nodeHover:d,nodeSelected:m,selectedNode:h,selectNode:x,buildGraph:S}}export{jt as a,Ge as c,Ot as i,Ft as n,Qe as o,Ct as r,it as s,It as t};
|
|
1
|
+
import{B as e,C as t,Et as n,Jt as r,K as i,M as a,Q as o,S as s,Z as c,at as l,b as u,h as d,kt as f,ot as p,q as m,qt as h,v as g,w as _,wt as v,x as y,xt as ee}from"./DAfG6Q5x.js";import{a as b,c as x,d as S,f as C,i as te,l as w,o as ne,r as re,u as ie}from"./5tvbNeKa.js";import{t as T}from"./DGp5TtxR.js";import{t as E}from"./CqfNwh25.js";import{t as ae}from"./B2xjE9S9.js";function D(){return typeof window<`u`}function O(e){return oe(e)?(e.nodeName||``).toLowerCase():`#document`}function k(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function A(e){return((oe(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function oe(e){return D()?e instanceof Node||e instanceof k(e).Node:!1}function j(e){return D()?e instanceof Element||e instanceof k(e).Element:!1}function M(e){return D()?e instanceof HTMLElement||e instanceof k(e).HTMLElement:!1}function se(e){return!D()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof k(e).ShadowRoot}function N(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=L(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ce(e){return/^(table|td|th)$/.test(O(e))}function P(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var le=/transform|translate|scale|rotate|perspective|filter/,ue=/paint|layout|strict|content/,F=e=>!!e&&e!==`none`,de;function fe(e){let t=j(e)?L(e):e;return F(t.transform)||F(t.translate)||F(t.scale)||F(t.rotate)||F(t.perspective)||!me()&&(F(t.backdropFilter)||F(t.filter))||le.test(t.willChange||``)||ue.test(t.contain||``)}function pe(e){let t=z(e);for(;M(t)&&!I(t);){if(fe(t))return t;if(P(t))return null;t=z(t)}return null}function me(){return de??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),de}function I(e){return/^(html|body|#document)$/.test(O(e))}function L(e){return k(e).getComputedStyle(e)}function R(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function z(e){if(O(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||se(e)&&e.host||A(e);return se(t)?t.host:t}function he(e){let t=z(e);return I(t)?e.ownerDocument?e.ownerDocument.body:e.body:M(t)&&N(t)?t:he(t)}function ge(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=he(e),i=r===e.ownerDocument?.body,a=k(r);if(i){let e=_e(a);return t.concat(a,a.visualViewport||[],N(r)?r:[],e&&n?ge(e):[])}else return t.concat(r,ge(r,[],n))}function _e(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ve(e){let t=L(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=M(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=C(n)!==a||C(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ye(e){return j(e)?e:e.contextElement}function B(e){let t=ye(e);if(!M(t))return x(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ve(t),o=(a?C(n.width):n.width)/r,s=(a?C(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var be=x(0);function xe(e){let t=k(e);return!me()||!t.visualViewport?be:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Se(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==k(e)?!1:t}function V(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ye(e),o=x(1);t&&(r?j(r)&&(o=B(r)):o=B(e));let s=Se(a,n,r)?xe(a):x(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=k(a),t=r&&j(r)?k(r):r,n=e,i=_e(n);for(;i&&r&&t!==n;){let e=B(i),t=i.getBoundingClientRect(),r=L(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,d*=e.y,c+=a,l+=o,n=k(i),i=_e(n)}}return S({width:u,height:d,x:c,y:l})}function H(e,t){let n=R(e).scrollLeft;return t?t.left+n:V(A(e)).left+n}function Ce(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-H(e,n),y:n.top+t.scrollTop}}function we(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=A(r),s=t?P(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=x(1),u=x(0),d=M(r);if((d||!d&&!a)&&((O(r)!==`body`||N(o))&&(c=R(r)),d)){let e=V(r);l=B(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ce(o,c):x(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 Te(e){return Array.from(e.getClientRects())}function Ee(e){let t=A(e),n=R(e),r=e.ownerDocument.body,i=w(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=w(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+H(e),s=-n.scrollTop;return L(r).direction===`rtl`&&(o+=w(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var De=25;function Oe(e,t){let n=k(e),r=A(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=me();(!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<=De&&(a-=o)}else l<=De&&(a+=l);return{width:a,height:o,x:s,y:c}}function ke(e,t){let n=V(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=M(e)?B(e):x(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ae(e,t,n){let r;if(t===`viewport`)r=Oe(e,n);else if(t===`document`)r=Ee(A(e));else if(j(t))r=ke(t,n);else{let n=xe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S(r)}function je(e,t){let n=z(e);return n===t||!j(n)||I(n)?!1:L(n).position===`fixed`||je(n,t)}function Me(e,t){let n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(e=>j(e)&&O(e)!==`body`),i=null,a=L(e).position===`fixed`,o=a?z(e):e;for(;j(o)&&!I(o);){let t=L(o),n=fe(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||N(o)&&!n&&je(e,o))?r=r.filter(e=>e!==o):i=t,o=z(o)}return t.set(e,r),r}function Ne(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?P(t)?[]:Me(t,this._c):[].concat(n),r],o=Ae(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ae(t,a[e],i);s=w(n.top,s),c=ie(n.right,c),l=ie(n.bottom,l),u=w(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Pe(e){let{width:t,height:n}=ve(e);return{width:t,height:n}}function Fe(e,t,n){let r=M(t),i=A(t),a=n===`fixed`,o=V(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=x(0);function l(){c.x=H(i)}if(r||!r&&!a)if((O(t)!==`body`||N(i))&&(s=R(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?Ce(i,s):x(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 U(e){return L(e).position===`static`}function Ie(e,t){if(!M(e)||L(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return A(e)===n&&(n=n.ownerDocument.body),n}function Le(e,t){let n=k(e);if(P(e))return n;if(!M(e)){let t=z(e);for(;t&&!I(t);){if(j(t)&&!U(t))return t;t=z(t)}return n}let r=Ie(e,t);for(;r&&ce(r)&&U(r);)r=Ie(r,t);return r&&I(r)&&U(r)&&!fe(r)?n:r||pe(e)||n}var Re=async function(e){let t=this.getOffsetParent||Le,n=this.getDimensions,r=await n(e.floating);return{reference:Fe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ze(e){return L(e).direction===`rtl`}var Be={convertOffsetParentRelativeRectToViewportRelativeRect:we,getDocumentElement:A,getClippingRect:Ne,getOffsetParent:Le,getElementRects:Re,getClientRects:Te,getDimensions:Pe,getScale:B,isElement:j,isRTL:ze},Ve=b,He=ne,Ue=te,We=(e,t,n)=>{let r=new Map,i={platform:Be,...n},a={...i.platform,_c:r};return re(e,t,{...i,platform:a})},Ge=Object.assign(a({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:t,hoverY:r}=n(e),i=l(`hoverElement`),a=ee(0),c=ee(0);return p([t,r],([e,t])=>{We({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},i.value,{placement:`right-start`,middleware:[Ue(),He(),Ve({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{a.value=e,c.value=t})}),(e,t)=>(m(),s(g,{to:`body`},[y(`div`,{ref_key:`hoverElement`,ref:i,fixed:``,"z-panel-content":``,"pointer-events-none":``,style:h({left:`${a.value}px`,top:`${c.value}px`})},[o(e.$slots,`default`)],4)]))}}),{__name:`DisplayGraphHoverView`});function Ke(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 qe,Je,Ye,W,G,K=1,Xe;function Ze(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if(qe!==t||Je!==a||Ye!==i){let n=Math.round(64*a)/64;K=i,K=Math.log2(K),K-=Math.floor(K);let r=K,o=Math.min(1,8*r);K=2**K;let s=8*Math.SQRT2/K;qe=t,Je=a,Ye=i,W||=document.createElement(`canvas`),G||=W.getContext(`2d`),W.width=W.height=Math.round(64*n),G.scale(n,n),G.fillStyle=e[0],G.fillRect(0,0,64,64),G.globalAlpha=.25,G.fillStyle=e[1],G.fillRect(0,0,64,64),G.globalAlpha=.67,G.strokeStyle=e[1],G.beginPath();for(let e=0;e<=64;e+=16)G.moveTo(e-32,e+32),G.lineTo(e+32,e-32);if(G.lineWidth=s*(1-(o-r)/2),G.stroke(),o+r>0){G.beginPath();for(let e=8;e<64;e+=16)G.moveTo(e-32,e+32),G.lineTo(e+32,e-32);G.lineWidth=s*(o+r)/2,G.stroke()}Xe=t.createPattern(W,`repeat`),K/=n}return n/=64*K*a,n-=Math.floor(n),n*=64*K*a,Xe.setTransform(new DOMMatrix([K,0,0,K,n,r])),Xe}function Qe(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 $e(e){return t=>t.id&&e[t.id]||t.color}function et(e,t=1,n=1){let r={};return tt(r,e,0,Math.PI*2,t,n),$e(r)}function tt(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=Ke(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;tt(e,s,n,t,i,a),n+=t}}var nt=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function rt(e=16,t=nt){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function it(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=rt(),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=>it(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 at(e){return e.children.length===0?1:Math.max(...e.children.map(e=>at(e)))+1}var ot=/\bFirefox\//.test(navigator.userAgent),st;function ct(e){return st?st.format(e):`${e}`}function q(){return(window.performance||Date).now()}function lt(e){let t=e.toFixed(1).split(`.`,2);return`${ct(+t[0])}.${t[1]}`}function ut(e){return e===1?`1 byte`:e<1024?`${ct(e)} bytes`:e<1024*1024?`${lt(e/1024)} kb`:e<1024*1024*1024?`${lt(e/(1024*1024))} mb`:`${lt(e/(1024*1024*1024))} gb`}function dt(e,t,n,r,i,a){if(ot){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 ft(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function pt(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{st=new Intl.NumberFormat}catch{}var mt=()=>({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)}}}),J={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},ht={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},gt=46,_t=`14px sans-serif`,vt=`bold ${_t}`,yt=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={...J,...t};let{getColor:n=et(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...ht,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=at(e),this.disposables=[],this.events=mt(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(_t),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(gt)}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]}},Y=24,bt=5,xt=.01,St=1e3,Ct=class extends yt{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(ft(e=>{let t=e.deltaX,n=e.deltaY,r=q(),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(pt(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(q()-this.animationStart)/(this.options.animateDuration??J.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??J.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*xt),r=Math.min(this.totalBytes,r+e.size*xt),this.setViewport(n,r,t)}}select(e,t=this.options.animate??J.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*Y+1,this.zoomedOutMin=this.width-St>>1,this.zoomedOutWidth=this.zoomedOutMin+St,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)+bt,d=t+Y/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=Ze(this.getColor(e)||this.palette.fallback,this.c,this.zoomedOutMin-this.viewportMin*a,Y,a*this.stripeScaleAdjust),v=this.palette.text,y=-1/0;i&1?(v=this.palette.fg,this.setFont(vt)):(this.c.fillStyle=_,this.c.fillRect(o,t,l,Y),(i&2||this.hoveredNode&&e.id===this.hoveredNode.id)&&(this.c.fillStyle=this.palette.hover,this.c.fillRect(o,t,l,Y),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(_t),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+Y,n,y,i&-2),n+=r.size;return i&1||dt(this.c,this.palette.stroke,o+.5,t+.5,l,Y),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+Y&&e.id)return e;if(r>=t+Y)for(let r of e.children){let e=a(r,t+Y,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=q():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};function wt(e,t){for(;t;){if(t===e)return!0;t=t.parent}return!1}function Tt(e,t,n){if(e===t)return;let r=t.parent,i=r.size||1,a=0;Tt(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 Et={};function Dt(e){return Et[e]||(Et[e]=400*Math.log(1+Math.log(1+e/8))),Et[e]}var X=-Math.PI/2,Ot=class extends yt{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(pt(()=>this.resize())),this.disposables.push(ft(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(Dt(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(vt),this.c.textAlign=`center`,this.c.fillText(this.getSubtext(this.targetNode)??ut(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=Ze(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=(q()-this.animationStart)/(this.options.animateDuration??J.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 Dt(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=q()),wt(this.animatedNode,this.currentNode)){let e={depth_:this.animatedDepth,startAngle_:this.animatedStartAngle,sweepAngle_:this.animatedSweepAngle};Tt(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(wt(this.currentNode,this.animatedNode)){let e={depth_:0,startAngle_:X,sweepAngle_:Math.PI*2};Tt(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,kt=2*Z,$=Q+Z;function At(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>kt&&y>$?At(t.children,g+Z,_+Q,v-kt,y-$):[]}),h+=c}t=d,i>=s?(n+=m,i-=m):(r+=m,s-=m)}})(0,t,n,r,i),a}var jt=class extends yt{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(ft(e=>this.updateHover(e))),this.disposables.push(pt(()=>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=(q()-this.animationStart)/(this.options.animateDuration??J.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=At([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|(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=Ze(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(dt(this.c,this.palette.stroke,n+.5,i+.5,a,o),o>=Q){this.c.fillStyle=this.palette.text;let e=a-kt,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=At([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=q(),this.animationSource=this.currentNode),this.animationTarget=e,this.currentNode=e||this.searchFor([this.layers.base],this.currentNode.node),this.updateCurrentLayout(),this.invalidate())}},Mt={flex:`~ gap-1 items-center wrap`},Nt={key:0,"i-ph-arrow-right-bold":``,"text-sm":``,"op-fade":``},Pt=[`onClick`],Ft=Object.assign(a({__name:`NavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:n}){let i=e,a=n,o=u(()=>{let e=[],t=i.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,n)=>(m(),_(`div`,Mt,[(m(!0),_(d,null,c(o.value,(e,n)=>(m(),_(d,{key:e.id},[n>0?(m(),_(`div`,Nt)):t(``,!0),y(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>a(`select`,e)},[y(`span`,null,r(e.text||e.id),1)],8,Pt)],64))),128))]))}}),{__name:`ChartNavBreadcrumb`});function It(t){let{data:n,nameKey:r,sizeKey:a,rootText:o,nodeType:s,graphOptions:c,onUpdate:l}=t,d=v(void 0),m=v(void 0),h=ee(void 0),g=v(void 0),_,y=u(()=>{if(t.tree)return t.tree.value;let e=f(n),i=new Map,c=0,l={id:`~root`,text:o,size:0,sizeSelf:0,children:[]};if(!e?.length)return{map:i,root:l,maxDepth:c};let u=[];u.unshift(()=>{l.size+=l.children.reduce((e,t)=>e+t.size,0),l.subtext=E(l.size).join(` `),l.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function d(e,t,n,r,a){if(i.has(t))return i.get(t);a>c&&(c=a);let o={id:t,text:n,size:0,sizeSelf:0,children:[],meta:{...e,path:n,type:`folder`},parent:r};return i.set(t,o),r.children.push(o),u.unshift(()=>{let t=o.sizeSelf;o.size+=o.children.reduce((e,t)=>e+t.size,0),o.subtext=E(o.size).join(` `),o.children.length&&t/o.size>.1&&o.children.push({id:`${o.id}-self`,text:``,size:t,sizeSelf:t,subtext:E(t).join(` `),children:[],meta:{...e,path:``,type:s},parent:o}),o.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),o}function p(e){let t=e[r].split(`/`).filter(Boolean),n=l,o=``,c=0;t.forEach((l,u)=>{if(o+=(o?`/`:``)+l,c++,u===t.length-1){let t={id:e[r],text:l,size:e[a],sizeSelf:e[a],subtext:E(e[a]).join(` `),children:[],meta:{...e,path:l,type:s}};n.children.push(t),i.set(e[r],t)}else n=d(e,o,l,n,c)})}return e.forEach(p),u.forEach(e=>e()),{map:i,root:l,maxDepth:c}}),b=u(()=>({animate:ae.value.chartAnimation,palette:{stroke:T.value?`#222`:`#555`,fg:T.value?`#fff`:`#000`,bg:T.value?`#111`:`#fff`},getColor:et(y.value.root,T.value?.8:.9,T.value?1:1.1),getSubtext:e=>e.subtext,...c}));function x(e,t){h.value=e?.meta,e?.children.length||(e=e?.parent),g.value?.select(e,t)}function S(){_?.(),m.value=y.value.root,l?.(),e(()=>{let e=h.value&&y.value.map.get(h.value[r])||null;e&&x(e,!1)}),_=()=>{g.value?.dispose(),g.value=void 0,h.value=void 0}}return e(()=>{p(()=>[y.value,b.value],()=>{S()},{deep:!0,immediate:!1}),S()}),i(()=>{_?.()}),{tree:y,graph:g,chartOptions:b,nodeHover:d,nodeSelected:m,selectedNode:h,selectNode:x,buildGraph:S}}export{jt as a,Ge as c,Ot as i,Ft as n,Qe as o,Ct as r,it as s,It as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,Jt as t,k as n,lt as r,q as i,w as a,x as o}from"./
|
|
1
|
+
import{A as e,Jt as t,k as n,lt as r,q as i,w as a,x as o}from"./DAfG6Q5x.js";import{c as s}from"#entry";import{t as c}from"./Bi5REHPk.js";import{t as l}from"./BUwCbG2W.js";var u={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},d={class:`max-w-520px text-center`},f=[`textContent`],p=[`textContent`],m=[`textContent`],h={class:`flex items-center justify-center w-full`},g=l({__name:`error-404`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:404},statusText:{type:String,default:`Page not found`},description:{type:String,default:`Sorry, the page you are looking for could not be found.`},backHome:{type:String,default:`Go back home`}},setup(l){let g=l;return s({title:`${g.status} - ${g.statusText} | ${g.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(s,g)=>{let _=c;return i(),a(`div`,u,[o(`div`,d,[o(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:t(l.status)},null,8,f),o(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:t(l.statusText)},null,8,p),o(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:t(l.description)},null,8,m),o(`div`,h,[e(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:r(()=>[n(t(l.backHome),1)]),_:1})])])])}}},[[`__scopeId`,`data-v-842bd7c6`]]);export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,C as t,G as n,Gt as r,Jt as i,Kt as a,M as o,Q as s,R as c,S as l,Z as u,b as d,et as f,h as p,kt as m,lt as h,ot as g,q as _,qt as v,rt as y,ut as b,w as x,x as S,xt as C,z as w}from"./CUBdwZVs.js";import{G as T,H as E,z as D}from"./BTfiKBAm.js";import{i as O,r as k}from"#entry";import{w as A}from"./D8ugdtv-.js";import{a as j,c as M,i as N,o as P,r as F,s as ee,t as I}from"./CbQbsbZd.js";import{r as L}from"./zt8ARaaw.js";var R={"flex-1":``,"w-0":``,"h-full":``},z={key:0,"w-full":``,"overflow-hidden":``,flex:`~ items-center`,border:`~ base rounded`,p1:``,relative:``},B={"overflow-hidden":``,"text-ellipsis":``,pr6:``,"w-0":``,"flex-1":``},V=[`placeholder`],H={class:`p2 w100`,flex:`~ col gap2`},U=Object.assign(o({__name:`PathSelectorItem`,props:c({selector:{},placeholder:{},session:{},data:{default:void 0},emptyStateText:{default:void 0},onClear:{type:Function,default:void 0}},{search:{required:!0},searchModifiers:{}}),emits:c([`clear`],[`update:search`]),setup(e,{emit:t}){let n=t,r=y(e,`search`);return(t,i)=>(_(),x(`div`,R,[e.selector.state.value.selected?(_(),x(`div`,z,[S(`div`,B,[s(t.$slots,`item`)]),S(`button`,{"i-carbon-clean":``,"text-4":``,hover:`op100`,op50:``,title:`Clear`,absolute:``,"right-2":``,onClick:i[0]||=e=>n(`clear`)})])):(_(),l(m(k),{key:1,distance:15,triggers:[`click`],"auto-hide":!1,delay:{show:300,hide:150},class:`h-full`},{popper:h(()=>[S(`div`,H,[e.data?.length?s(t.$slots,`list`,{key:0}):s(t.$slots,`empty`,{key:1})])]),default:h(()=>[b(S(`input`,{"onUpdate:modelValue":i[1]||=e=>r.value=e,py1:``,px4:``,"w-full":``,"h-full":``,border:`~ base rounded-1`,style:{outline:`none`},placeholder:e.placeholder,onBlur:i[2]||=(...e)=>m(O)&&m(O)(...e)},null,40,V),[[E,r.value]])]),_:3}))]))}}),{__name:`DataPathSelectorItem`});function W(e){let t=C({search:``,selected:null}),n=C(),r=d(e.getModules);function i(t){n.value=A(t,()=>new L(t.value,{includeScore:!0,keys:e.searchKeys||[`id`],ignoreLocation:!0,threshold:.4}))}function a(e){t.value.selected=e.id,t.value.search=``}function o(){t.value.selected=null}return{state:t,modules:r,fuse:n,initSelector:i,select:a,clear:o}}function G(e){let{onToggle:t,dataMap:n,list:r,importIdKey:i}=e,a=C(!1),o=C({start:``,end:``});function s(e){a.value=e??!a.value,t?.(a.value)}function c(e){o.value={start:e.start,end:e.end}}return{pathSelectorVisible:a,togglePathSelector:s,pathNodes:o,selectPathNodes:c,normalizedGraph:d(()=>{let{start:e,end:t}=o.value;if(!e&&!t)return r.value;let a=new Set,s=(e,t,n)=>{let r=[e],i=new Set,o=new Map([[`${e}`,[`${e}`]]]);for(;r.length>0;){let e=r.shift();i.has(e)||(i.add(e),n?e===n&&o.get(e)?.forEach(e=>a.add(e)):a.add(e),(!n||e!==n)&&t(e).forEach(t=>{i.has(`${t}`)||(r.push(`${t}`),n&&o.set(`${t}`,[...o.get(e)||[],`${t}`]))}))}};return e&&t?s(e,e=>n.value.get(e)?.imports.map(e=>e[i])||[],t):e&&s(e,e=>n.value.get(e)?.imports.map(e=>e[i])||[]),r.value.filter(e=>a.has(e.id)).map(t=>t.id===e?{...t,importers:[]}:t)})}}var K={h10:``,px4:``,p1:``,relative:``,flex:`~ gap2 items-center`},q={flex:`~ items-center gap2`,class:`flex-1 h-full`,"min-w-0":``},J={flex:`~ items-center justify-center`,"w-full":``,"h-20":``},Y={italic:``,op50:``},X=Object.assign(o({__name:`PathSelector`,props:{session:{},data:{},importIdKey:{},searchKeys:{}},emits:[`close`,`select`],setup(t,{emit:n}){let r=t,a=n,o=d(()=>{let e=new Map;return r.data.forEach(t=>{e.set(t.id,t)}),e}),c=W({searchKeys:r.searchKeys,getModules:()=>c.state.value.search?c.fuse.value.value?.search(c.state.value.search).map(e=>e.item)??[]:r.data});c.initSelector(d(()=>r.data));function l(e,t=new Set){if(t.has(e))return[];t.add(e);let n=o.value.get(e);if(!n?.imports?.length)return[];let i=[];for(let e of n.imports){let n=o.value.get(`${e[r.importIdKey]}`);n&&(t.has(n.id)||(i.push(n),i.push(...l(n.id,t))))}return i}let u=W({searchKeys:r.searchKeys,getModules:()=>c.state.value.selected?l(c.state.value.selected):[]});u.initSelector(u.modules);let f=d(()=>u.state.value.search?u.fuse.value.value?.search(u.state.value.search).map(e=>e.item)??[]:u.modules.value);g([()=>c.state.value.selected,()=>u.state.value.selected],()=>{a(`select`,{start:c.state.value.selected??``,end:u.state.value.selected??``})});function p(){a(`select`,{start:``,end:``}),a(`close`)}return(n,r)=>{let a=U;return _(),x(`div`,K,[S(`div`,q,[e(a,{search:m(c).state.value.search,"onUpdate:search":r[0]||=e=>m(c).state.value.search=e,placeholder:`Start`,selector:m(c),session:t.session,data:m(c).modules.value,onClear:r[1]||=()=>{m(c).clear(),m(u).clear()}},{list:h(()=>[s(n.$slots,`list`,{select:m(c).select,data:m(c).modules.value})]),item:h(()=>[s(n.$slots,`item`,{id:m(c).state.value.selected})]),_:3},8,[`search`,`selector`,`session`,`data`]),r[3]||=S(`div`,{class:`i-carbon-arrow-right op50`,"flex-shrink-0":``},null,-1),e(a,{search:m(u).state.value.search,"onUpdate:search":r[2]||=e=>m(u).state.value.search=e,placeholder:`End`,selector:m(u),session:t.session,data:f.value,onClear:m(u).clear},{list:h(()=>[s(n.$slots,`list`,{select:m(u).select,data:f.value})]),item:h(()=>[s(n.$slots,`item`,{id:m(u).state.value.selected})]),empty:h(()=>[S(`div`,J,[S(`span`,Y,i(m(c).state.value.selected?`No modules`:`Select a start module to get end modules`),1)])]),_:3},8,[`search`,`selector`,`session`,`data`,`onClear`])]),e(I,{class:`mr--2`,onClick:p})])}}}),{__name:`DataPathSelector`}),Z=Object.assign(o({inheritAttrs:!1,__name:`TimeoutView`,props:{content:{},hideInterval:{default:1500}},setup(e){let n=C(!1),r=null;return g(()=>e.content,()=>{r&&clearTimeout(r),n.value=!0,r=setTimeout(()=>{n.value=!1},e.hideInterval)}),(r,o)=>(_(),l(D,{"enter-active-class":`transition-opacity duration-200 ease-in`,"leave-active-class":`transition-opacity duration-500 ease-out`,"enter-from-class":`opacity-0`,"leave-to-class":`opacity-0`},{default:h(()=>[n.value?(_(),x(`div`,a(w({key:0},r.$attrs)),i(e.content),17)):t(``,!0)]),_:1}))}}),{__name:`DisplayTimeoutView`}),Q=[`width`,`height`],te=[`d`],ne={class:`w-4`},re=[`disabled`,`title`,`onClick`],ie={fixed:``,"right-6":``,"bottom-6":``,"z-panel-nav":``,flex:`~ col gap-2 items-center`},ae={"w-10":``,flex:`~ items-center justify-center`},oe={"bg-glass":``,"rounded-full":``,border:``,"border-base":``,shadow:``,flex:`~ col gap-1 p1`},$=[`disabled`],se=[`disabled`],ce=[`disabled`],le=[`disabled`],ue=Object.assign(o({__name:`ModuleGraph`,props:{modules:{},session:{},expandControls:{type:Boolean,default:!0}},setup(i){let a=i,{isFirstCalculateGraph:o,childToParentMap:c,collapsedNodes:l,calculateGraph:d,container:h,width:y,height:C,scale:w,nodes:E,links:D,spacing:O,nodesRefMap:k}=ee(),{isGrabbing:A,init:I}=j(),{zoomIn:L,zoomOut:R,ZOOM_MIN:z,ZOOM_MAX:B}=P(),{isGraphNodeToggling:V,toggleNode:H,expandAll:U,collapseAll:W}=M({modules:a.modules});return n(()=>{I(),g(()=>a.modules,()=>{o.value=!0,l.clear(),c.clear(),d()},{immediate:!0})}),(n,a)=>{let o=Z,c=f(`tooltip`);return _(),x(`div`,{ref_key:`container`,ref:h,"w-full":``,"h-screen":``,"of-scroll":``,relative:``,"select-none":``,class:r(m(A)?`cursor-grabbing`:``)},[S(`div`,{style:v({width:`${m(y)*m(w)}px`,height:`${m(C)*m(w)}px`})},[S(`div`,{flex:`~ items-center justify-center`,style:v({transform:`scale(${m(w)})`,transformOrigin:`0 0`})},[S(`div`,{absolute:``,"left-0":``,"top-0":``,style:v({width:`${m(y)}px`,height:`${m(C)}px`}),class:`bg-dots`},null,4),(_(),x(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,width:m(y),height:m(C)},[S(`g`,null,[(_(!0),x(p,null,u(m(D),e=>(_(),x(p,{key:e.id},[e.target?s(n.$slots,`link`,{key:0,link:e,d:m(F)(e,m(O)),linkClass:m(N)(e)},()=>[(_(),x(`path`,{key:e.id,d:m(F)(e,m(O)),class:r(m(N)(e)),fill:`none`},null,10,te))]):t(``,!0)],64))),128))])],8,Q)),(_(!0),x(p,null,u(m(E),e=>(_(),x(p,{key:e.data.module.id},[e.data.module.id===`~root`?t(``,!0):(_(),x(`div`,{key:0,absolute:``,class:`group z-graph-node flex gap-1 items-center`,style:v({left:`${e.x}px`,top:`${e.y}px`,transform:`translate(-50%, -50%)`})},[S(`div`,{flex:`~ items-center gap-1`,"bg-glass":``,border:`~ base rounded`,class:`group-hover:bg-active block px2 p1`,style:v({minWidth:`${m(m(O).width)}px`,maxWidth:`${m(m(O).width)}px`,maxHeight:`${m(m(O).height)}px`,overflow:`hidden`,transition:`all 0.3s ease`})},[s(n.$slots,`default`,{node:e,nodesRefMap:m(k)})],4),S(`div`,ne,[e.data.hasChildren?(_(),x(`button`,{key:0,"w-4":``,"h-4":``,"rounded-full":``,flex:`items-center justify-center`,"text-xs":``,border:`~ active`,class:r([`flex cursor-pointer z-graph-node-active bg-base`,{"cursor-not-allowed":m(V),"hover:bg-active":!m(V)}]),disabled:m(V),title:e.data.expanded?`Collapse`:`Expand`,onClick:T(t=>m(H)(e.data.module.id),[`stop`])},[S(`div`,{class:r([`text-primary h-4`,[e.data.expanded?`i-ph-minus`:`i-ph-plus`]]),transition:`transform duration-200`},null,2)],10,re)):t(``,!0)])],4))],64))),128))],4)],4),S(`div`,ie,[S(`div`,ae,[e(o,{content:`${Math.round(m(w)*100)}%`,class:`text-sm`},null,8,[`content`])]),S(`div`,oe,[i.expandControls?(_(),x(p,{key:0},[b((_(),x(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:m(V),class:r({"op50 cursor-not-allowed":m(V),"hover:bg-active":!m(V)}),title:`Expand All`,onClick:a[0]||=e=>m(U)()},[...a[4]||=[S(`div`,{class:`i-ph-arrows-out-simple-duotone`},null,-1)]],10,$)),[[c,`Expand All`,void 0,{left:!0}]]),b((_(),x(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:m(V),class:r({"op50 cursor-not-allowed":m(V),"hover:bg-active":!m(V)}),title:`Collapse All`,onClick:a[1]||=e=>m(W)()},[...a[5]||=[S(`div`,{class:`i-ph-arrows-in-simple-duotone`},null,-1)]],10,se)),[[c,`Collapse All`,void 0,{left:!0}]]),a[6]||=S(`div`,{border:`t base`,my1:``},null,-1)],64)):t(``,!0),b((_(),x(`button`,{disabled:m(w)>=m(B),"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,"disabled:op20":``,"disabled:bg-none":``,"disabled:cursor-not-allowed":``,flex:`~ items-center justify-center`,title:`Zoom In (Ctrl + =)`,onClick:a[2]||=e=>m(L)()},[...a[7]||=[S(`div`,{"i-ph-magnifying-glass-plus-duotone":``},null,-1)]],8,ce)),[[c,`Zoom In (Ctrl + =)`,void 0,{left:!0}]]),b((_(),x(`button`,{disabled:m(w)<=m(z),"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,"disabled:op20":``,"disabled:bg-none":``,"disabled:cursor-not-allowed":``,flex:`~ items-center justify-center`,title:`Zoom Out (Ctrl + -)`,onClick:a[3]||=e=>m(R)()},[...a[8]||=[S(`div`,{"i-ph-magnifying-glass-minus-duotone":``},null,-1)]],8,le)),[[c,`Zoom Out (Ctrl + -)`,void 0,{left:!0}]])])])],2)}}}),{__name:`DisplayModuleGraph`});export{X as n,G as r,ue as t};
|
|
1
|
+
import{A as e,C as t,G as n,Gt as r,Jt as i,Kt as a,M as o,Q as s,R as c,S as l,Z as u,b as d,et as f,h as p,kt as m,lt as h,ot as g,q as _,qt as v,rt as y,ut as b,w as x,x as S,xt as C,z as w}from"./DAfG6Q5x.js";import{G as T,H as E,z as D}from"./D1igyLjg.js";import{D as O}from"./DGp5TtxR.js";import{i as k,r as A}from"#entry";import{a as j,c as M,i as N,o as P,r as F,s as ee,t as I}from"./qNFXE2Qb.js";import{r as L}from"./qKmu99_C.js";var R={"flex-1":``,"w-0":``,"h-full":``},z={key:0,"w-full":``,"overflow-hidden":``,flex:`~ items-center`,border:`~ base rounded`,p1:``,relative:``},B={"overflow-hidden":``,"text-ellipsis":``,pr6:``,"w-0":``,"flex-1":``},V=[`placeholder`],H={class:`p2 w100`,flex:`~ col gap2`},U=Object.assign(o({__name:`PathSelectorItem`,props:c({selector:{},placeholder:{},session:{},data:{default:void 0},emptyStateText:{default:void 0},onClear:{type:Function,default:void 0}},{search:{required:!0},searchModifiers:{}}),emits:c([`clear`],[`update:search`]),setup(e,{emit:t}){let n=t,r=y(e,`search`);return(t,i)=>(_(),x(`div`,R,[e.selector.state.value.selected?(_(),x(`div`,z,[S(`div`,B,[s(t.$slots,`item`)]),S(`button`,{"i-carbon-clean":``,"text-4":``,hover:`op100`,op50:``,title:`Clear`,absolute:``,"right-2":``,onClick:i[0]||=e=>n(`clear`)})])):(_(),l(m(A),{key:1,distance:15,triggers:[`click`],"auto-hide":!1,delay:{show:300,hide:150},class:`h-full`},{popper:h(()=>[S(`div`,H,[e.data?.length?s(t.$slots,`list`,{key:0}):s(t.$slots,`empty`,{key:1})])]),default:h(()=>[b(S(`input`,{"onUpdate:modelValue":i[1]||=e=>r.value=e,py1:``,px4:``,"w-full":``,"h-full":``,border:`~ base rounded-1`,style:{outline:`none`},placeholder:e.placeholder,onBlur:i[2]||=(...e)=>m(k)&&m(k)(...e)},null,40,V),[[E,r.value]])]),_:3}))]))}}),{__name:`DataPathSelectorItem`});function W(e){let t=C({search:``,selected:null}),n=C(),r=d(e.getModules);function i(t){n.value=O(t,()=>new L(t.value,{includeScore:!0,keys:e.searchKeys||[`id`],ignoreLocation:!0,threshold:.4}))}function a(e){t.value.selected=e.id,t.value.search=``}function o(){t.value.selected=null}return{state:t,modules:r,fuse:n,initSelector:i,select:a,clear:o}}function G(e){let{onToggle:t,dataMap:n,list:r,importIdKey:i}=e,a=C(!1),o=C({start:``,end:``});function s(e){a.value=e??!a.value,t?.(a.value)}function c(e){o.value={start:e.start,end:e.end}}return{pathSelectorVisible:a,togglePathSelector:s,pathNodes:o,selectPathNodes:c,normalizedGraph:d(()=>{let{start:e,end:t}=o.value;if(!e&&!t)return r.value;let a=new Set,s=(e,t,n)=>{let r=[e],i=new Set,o=new Map([[`${e}`,[`${e}`]]]);for(;r.length>0;){let e=r.shift();i.has(e)||(i.add(e),n?e===n&&o.get(e)?.forEach(e=>a.add(e)):a.add(e),(!n||e!==n)&&t(e).forEach(t=>{i.has(`${t}`)||(r.push(`${t}`),n&&o.set(`${t}`,[...o.get(e)||[],`${t}`]))}))}};return e&&t?s(e,e=>n.value.get(e)?.imports.map(e=>e[i])||[],t):e&&s(e,e=>n.value.get(e)?.imports.map(e=>e[i])||[]),r.value.filter(e=>a.has(e.id)).map(t=>t.id===e?{...t,importers:[]}:t)})}}var K={h10:``,px4:``,p1:``,relative:``,flex:`~ gap2 items-center`},q={flex:`~ items-center gap2`,class:`flex-1 h-full`,"min-w-0":``},J={flex:`~ items-center justify-center`,"w-full":``,"h-20":``},Y={italic:``,op50:``},X=Object.assign(o({__name:`PathSelector`,props:{session:{},data:{},importIdKey:{},searchKeys:{}},emits:[`close`,`select`],setup(t,{emit:n}){let r=t,a=n,o=d(()=>{let e=new Map;return r.data.forEach(t=>{e.set(t.id,t)}),e}),c=W({searchKeys:r.searchKeys,getModules:()=>c.state.value.search?c.fuse.value.value?.search(c.state.value.search).map(e=>e.item)??[]:r.data});c.initSelector(d(()=>r.data));function l(e,t=new Set){if(t.has(e))return[];t.add(e);let n=o.value.get(e);if(!n?.imports?.length)return[];let i=[];for(let e of n.imports){let n=o.value.get(`${e[r.importIdKey]}`);n&&(t.has(n.id)||(i.push(n),i.push(...l(n.id,t))))}return i}let u=W({searchKeys:r.searchKeys,getModules:()=>c.state.value.selected?l(c.state.value.selected):[]});u.initSelector(u.modules);let f=d(()=>u.state.value.search?u.fuse.value.value?.search(u.state.value.search).map(e=>e.item)??[]:u.modules.value);g([()=>c.state.value.selected,()=>u.state.value.selected],()=>{a(`select`,{start:c.state.value.selected??``,end:u.state.value.selected??``})});function p(){a(`select`,{start:``,end:``}),a(`close`)}return(n,r)=>{let a=U;return _(),x(`div`,K,[S(`div`,q,[e(a,{search:m(c).state.value.search,"onUpdate:search":r[0]||=e=>m(c).state.value.search=e,placeholder:`Start`,selector:m(c),session:t.session,data:m(c).modules.value,onClear:r[1]||=()=>{m(c).clear(),m(u).clear()}},{list:h(()=>[s(n.$slots,`list`,{select:m(c).select,data:m(c).modules.value})]),item:h(()=>[s(n.$slots,`item`,{id:m(c).state.value.selected})]),_:3},8,[`search`,`selector`,`session`,`data`]),r[3]||=S(`div`,{class:`i-carbon-arrow-right op50`,"flex-shrink-0":``},null,-1),e(a,{search:m(u).state.value.search,"onUpdate:search":r[2]||=e=>m(u).state.value.search=e,placeholder:`End`,selector:m(u),session:t.session,data:f.value,onClear:m(u).clear},{list:h(()=>[s(n.$slots,`list`,{select:m(u).select,data:f.value})]),item:h(()=>[s(n.$slots,`item`,{id:m(u).state.value.selected})]),empty:h(()=>[S(`div`,J,[S(`span`,Y,i(m(c).state.value.selected?`No modules`:`Select a start module to get end modules`),1)])]),_:3},8,[`search`,`selector`,`session`,`data`,`onClear`])]),e(I,{class:`mr--2`,onClick:p})])}}}),{__name:`DataPathSelector`}),Z=Object.assign(o({inheritAttrs:!1,__name:`TimeoutView`,props:{content:{},hideInterval:{default:1500}},setup(e){let n=C(!1),r=null;return g(()=>e.content,()=>{r&&clearTimeout(r),n.value=!0,r=setTimeout(()=>{n.value=!1},e.hideInterval)}),(r,o)=>(_(),l(D,{"enter-active-class":`transition-opacity duration-200 ease-in`,"leave-active-class":`transition-opacity duration-500 ease-out`,"enter-from-class":`opacity-0`,"leave-to-class":`opacity-0`},{default:h(()=>[n.value?(_(),x(`div`,a(w({key:0},r.$attrs)),i(e.content),17)):t(``,!0)]),_:1}))}}),{__name:`DisplayTimeoutView`}),Q=[`width`,`height`],te=[`d`],ne={class:`w-4`},re=[`disabled`,`title`,`onClick`],ie={fixed:``,"right-6":``,"bottom-6":``,"z-panel-nav":``,flex:`~ col gap-2 items-center`},ae={"w-10":``,flex:`~ items-center justify-center`},oe={"bg-glass":``,"rounded-full":``,border:``,"border-base":``,shadow:``,flex:`~ col gap-1 p1`},$=[`disabled`],se=[`disabled`],ce=[`disabled`],le=[`disabled`],ue=Object.assign(o({__name:`ModuleGraph`,props:{modules:{},session:{},expandControls:{type:Boolean,default:!0}},setup(i){let a=i,{isFirstCalculateGraph:o,childToParentMap:c,collapsedNodes:l,calculateGraph:d,container:h,width:y,height:C,scale:w,nodes:E,links:D,spacing:O,nodesRefMap:k}=ee(),{isGrabbing:A,init:I}=j(),{zoomIn:L,zoomOut:R,ZOOM_MIN:z,ZOOM_MAX:B}=P(),{isGraphNodeToggling:V,toggleNode:H,expandAll:U,collapseAll:W}=M({modules:a.modules});return n(()=>{I(),g(()=>a.modules,()=>{o.value=!0,l.clear(),c.clear(),d()},{immediate:!0})}),(n,a)=>{let o=Z,c=f(`tooltip`);return _(),x(`div`,{ref_key:`container`,ref:h,"w-full":``,"h-screen":``,"of-scroll":``,relative:``,"select-none":``,class:r(m(A)?`cursor-grabbing`:``)},[S(`div`,{style:v({width:`${m(y)*m(w)}px`,height:`${m(C)*m(w)}px`})},[S(`div`,{flex:`~ items-center justify-center`,style:v({transform:`scale(${m(w)})`,transformOrigin:`0 0`})},[S(`div`,{absolute:``,"left-0":``,"top-0":``,style:v({width:`${m(y)}px`,height:`${m(C)}px`}),class:`bg-dots`},null,4),(_(),x(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,width:m(y),height:m(C)},[S(`g`,null,[(_(!0),x(p,null,u(m(D),e=>(_(),x(p,{key:e.id},[e.target?s(n.$slots,`link`,{key:0,link:e,d:m(F)(e,m(O)),linkClass:m(N)(e)},()=>[(_(),x(`path`,{key:e.id,d:m(F)(e,m(O)),class:r(m(N)(e)),fill:`none`},null,10,te))]):t(``,!0)],64))),128))])],8,Q)),(_(!0),x(p,null,u(m(E),e=>(_(),x(p,{key:e.data.module.id},[e.data.module.id===`~root`?t(``,!0):(_(),x(`div`,{key:0,absolute:``,class:`group z-graph-node flex gap-1 items-center`,style:v({left:`${e.x}px`,top:`${e.y}px`,transform:`translate(-50%, -50%)`})},[S(`div`,{flex:`~ items-center gap-1`,"bg-glass":``,border:`~ base rounded`,class:`group-hover:bg-active block px2 p1`,style:v({minWidth:`${m(m(O).width)}px`,maxWidth:`${m(m(O).width)}px`,maxHeight:`${m(m(O).height)}px`,overflow:`hidden`,transition:`all 0.3s ease`})},[s(n.$slots,`default`,{node:e,nodesRefMap:m(k)})],4),S(`div`,ne,[e.data.hasChildren?(_(),x(`button`,{key:0,"w-4":``,"h-4":``,"rounded-full":``,flex:`items-center justify-center`,"text-xs":``,border:`~ active`,class:r([`flex cursor-pointer z-graph-node-active bg-base`,{"cursor-not-allowed":m(V),"hover:bg-active":!m(V)}]),disabled:m(V),title:e.data.expanded?`Collapse`:`Expand`,onClick:T(t=>m(H)(e.data.module.id),[`stop`])},[S(`div`,{class:r([`text-primary h-4`,[e.data.expanded?`i-ph-minus`:`i-ph-plus`]]),transition:`transform duration-200`},null,2)],10,re)):t(``,!0)])],4))],64))),128))],4)],4),S(`div`,ie,[S(`div`,ae,[e(o,{content:`${Math.round(m(w)*100)}%`,class:`text-sm`},null,8,[`content`])]),S(`div`,oe,[i.expandControls?(_(),x(p,{key:0},[b((_(),x(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:m(V),class:r({"op50 cursor-not-allowed":m(V),"hover:bg-active":!m(V)}),title:`Expand All`,onClick:a[0]||=e=>m(U)()},[...a[4]||=[S(`div`,{class:`i-ph-arrows-out-simple-duotone`},null,-1)]],10,$)),[[c,`Expand All`,void 0,{left:!0}]]),b((_(),x(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:m(V),class:r({"op50 cursor-not-allowed":m(V),"hover:bg-active":!m(V)}),title:`Collapse All`,onClick:a[1]||=e=>m(W)()},[...a[5]||=[S(`div`,{class:`i-ph-arrows-in-simple-duotone`},null,-1)]],10,se)),[[c,`Collapse All`,void 0,{left:!0}]]),a[6]||=S(`div`,{border:`t base`,my1:``},null,-1)],64)):t(``,!0),b((_(),x(`button`,{disabled:m(w)>=m(B),"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,"disabled:op20":``,"disabled:bg-none":``,"disabled:cursor-not-allowed":``,flex:`~ items-center justify-center`,title:`Zoom In (Ctrl + =)`,onClick:a[2]||=e=>m(L)()},[...a[7]||=[S(`div`,{"i-ph-magnifying-glass-plus-duotone":``},null,-1)]],8,ce)),[[c,`Zoom In (Ctrl + =)`,void 0,{left:!0}]]),b((_(),x(`button`,{disabled:m(w)<=m(z),"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,"disabled:op20":``,"disabled:bg-none":``,"disabled:cursor-not-allowed":``,flex:`~ items-center justify-center`,title:`Zoom Out (Ctrl + -)`,onClick:a[3]||=e=>m(R)()},[...a[8]||=[S(`div`,{"i-ph-magnifying-glass-minus-duotone":``},null,-1)]],8,le)),[[c,`Zoom Out (Ctrl + -)`,void 0,{left:!0}]])])])],2)}}}),{__name:`DisplayModuleGraph`});export{X as n,G as r,ue as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./DfB5JIVQ.js";import{A as t,B as n,C as r,D as i,Gt as a,Jt as o,M as s,S as c,Z as l,at as u,b as d,et as f,h as p,k as m,kt as h,lt as g,ot as _,q as v,qt as y,st as b,ut as x,w as S,x as C,xt as w,yt as T}from"./DAfG6Q5x.js";import{C as E}from"./D1igyLjg.js";import{D,u as O,x as k}from"./DGp5TtxR.js";import{n as ee}from"#entry";import{t as A}from"./Bi5REHPk.js";import{r as j}from"./xgeU2imy.js";import{r as M,t as N}from"./B2xjE9S9.js";import{i as P,t as te}from"./BDcpuUbg.js";import{n as F}from"./qNFXE2Qb.js";import{n as I,r as ne,t as L}from"./qKmu99_C.js";import{a as re,c as ie,i as ae,n as R,o as z,r as oe,t as se}from"./BM8UMmvc.js";import{t as ce}from"./D1flKd96.js";import{n as le,r as ue,t as B}from"./BT76Oq15.js";var V=[`onClick`],de=Object.assign(s({__name:`FlatList`,props:{chunks:{},session:{},link:{type:Boolean,default:!0},basic:{type:Boolean,default:!1}},emits:[`select`],setup(e,{emit:n}){let i=n;return(n,a)=>{let o=P;return v(),c(L,{items:e.chunks,"key-prop":`chunk_id`},{default:g(({item:n})=>[C(`div`,{flex:``,pb2:``,onClick:e=>i(`select`,n)},[t(o,{chunk:n,basic:e.basic,link:e.link,"w-full":``,"font-mono":``,border:`~ rounded base`,px2:``,py1:``,"text-sm":``,hover:`bg-active`,flex:`~ gap-4 items-center`},{"left-after":g(()=>[n.is_initial?(v(),c(j,{key:0,text:`initial`})):r(``,!0)]),_:2},1032,[`chunk`,`basic`,`link`])],8,V)]),_:1},8,[`items`])}}}),{__name:`ChunksFlatList`}),H={op50:``,"font-mono":``,w12:``},U=[`title`],W={flex:`~ gap-1 items-center`},fe=Object.assign(s({__name:`Graph`,props:{session:{},chunks:{},entryId:{default:``}},setup(e){let i=e,a=d(()=>i.chunks),s=E();return F({modules:a,spacing:{width:450,height:55,linkOffset:15,margin:120,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:t,scale:r,spacing:o,tree:s,hierarchy:c,collapsedNodes:l,container:u,modulesMap:d,nodes:f,links:p,nodesMap:m,linksMap:g,width:_,height:v,childToParentMap:y}=e;return()=>{_.value=window.innerWidth,v.value=window.innerHeight;let e=a.value.filter(e=>i.entryId?e.id===i.entryId:e.reason===`entry`),b=new Set,x=c({module:{id:`~root`}},n=>`${n.module?.id}`==`~root`?(e.forEach(e=>{b.add(e),t.value&&y.set(e.id,`~root`)}),e.map(e=>({module:e,expanded:!l.has(e.id),hasChildren:!1}))):l.has(`${n.module?.id}`)?[]:n.module.imports?.map(e=>{let r=d.value.get(`${e.chunk_id}`);if(!(!r||b.has(r)))return t.value&&y.set(r.id,n.module.id),b.add(r),{module:r,expanded:!l.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));t.value&&=!1,s().nodeSize([h(o.height),h(o.width)+h(o.gap)])(x);let S=x.descendants();for(let e of S)[e.x,e.y]=[e.y-h(o.width),e.x];let C=Math.min(...S.map(e=>e.x)),w=Math.min(...S.map(e=>e.y));if(C<h(o.margin))for(let e of S)e.x+=Math.abs(C)+h(o.margin);if(w<h(o.margin))for(let e of S)e.y+=Math.abs(w)+h(o.margin);f.value=S,m.clear();for(let e of S)m.set(`${e.data.module.id}`,e);let T=x.links().filter(e=>`${e.source.data.module.id}`!=`~root`).map(e=>({...e,id:`${e.source.data.module.id}|${e.target.data.module.id}`})),E=a.value.flatMap(e=>e.imports.filter(t=>!T.some(n=>n.id===`${e.chunk_id}|${t.chunk_id}`)).map(t=>({source:m.get(`${e.chunk_id}`),target:m.get(`${t.chunk_id}`),id:`${e.chunk_id}|${t.chunk_id}`}))),D=[...T,...E];g.clear();for(let e of D)g.set(e.id,e);p.value=D,n(()=>{_.value=u.value.scrollWidth/r.value+h(o.margin),v.value=u.value.scrollHeight/r.value+h(o.margin)})}}}),(n,i)=>{let l=A,u=B;return v(),c(u,{session:e.session,modules:a.value,"expand-controls":!1},{default:g(({node:e})=>[t(l,{class:`flex items-center`,to:{path:h(s).path,query:{chunk:e.data.module.chunk_id}}},{default:g(()=>[C(`span`,H,`#`+o(e.data.module.id),1),C(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.data.module.id}`},[C(`div`,null,o(e.data.module.name||`[unnamed]`),1),t(j,{text:e.data.module.reason},null,8,[`text`]),e.data.module.is_initial?(v(),c(j,{key:0,text:`initial`})):r(``,!0)],8,U),i[1]||=C(`div`,{"flex-auto":``},null,-1),C(`div`,W,[i[0]||=C(`div`,{"i-ph-package-duotone":``},null,-1),m(` `+o(e.data.module.modules.length),1)])]),_:2},1032,[`to`])]),_:1},8,[`session`,`modules`])}}}),{__name:`ChunksGraph`}),G={grid:`~ cols-[max-content_1fr] gap-2`,p4:``},K={flex:`~ col gap-4`},q={key:0,grid:`~ cols-[250px_1fr] gap-1`},J=[`onClick`],Y={key:0,"text-primary":``},X={key:1},Z=[`onClick`],Q=[`title`],pe=Object.assign(s({__name:`Sunburst`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:n}){let i=e,a=n,s=u(`el`);return b(()=>s.value?.append(i.graph.el)),(n,i)=>{let c=R,u=M,d=f(`tooltip`);return v(),S(`div`,G,[C(`div`,{ref_key:`el`,ref:s,"w-500px":``},null,512),C(`div`,K,[t(c,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:i[0]||=e=>a(`select`,e)},null,8,[`selected`,`options`]),e.selected?(v(),S(`div`,q,[(v(!0),S(p,null,l(e.selected.children,n=>(v(),S(p,{key:n.id},[C(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>a(`select`,n)},[n.meta&&n.meta===e.selected?.meta?(v(),S(`span`,Y,`(self)`)):(v(),S(`span`,X,o(n.meta?.name||n.id),1))],8,J),C(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>a(`select`,n)},[C(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:y({background:h(z)(e.graph.options.getColor?.(n)||`#000`),width:`${n.size/e.selected.size*100}%`})},null,4),t(u,{"text-xs":``,bytes:n.size,total:e.selected.size,"percent-ratio":3},null,8,[`bytes`,`total`]),n.children.length>0?x((v(),S(`div`,{key:0,title:`${n.children.length} modules`,"text-xs":``,"op-fade":``},[m(` (`+o(n.children.length)+`) `,1)],8,Q)),[[d,`${n.children.length} modules`]]):r(``,!0)],8,Z)],64))),128))])):r(``,!0)])])}}}),{__name:`ChunksSunburst`}),me=Object.assign(s({__name:`Flamegraph`,props:{graph:{}},setup(e){let t=e,n=u(`el`);return b(()=>n.value?.append(t.graph.el)),(e,t)=>(v(),S(`div`,{ref_key:`el`,ref:n},null,512))}}),{__name:`ChunksFlamegraph`}),he={sticky:``,"left-4":``,"right-4":``,"top-4":``,"z-panel-nav":``,"p-4":``},ge={key:0,h10:``,mr2:``,flex:`~ items-center`},_e={flex:`~ wrap gap-2 items-center`,p2:``,border:`t base`},ve=[`onClick`],ye={key:0,class:`px5 pt-4`,flex:`~ col gap-4`},be={key:1,class:`px5 pt-4`,flex:`~ col gap-4`},xe={key:3,flex:`~ col gap-2`},Se={key:4,flex:`~ col gap-2`,"pt-4":``},Ce={key:5,flex:`~ col gap-2`,"pt-4":``},we={key:0,border:`~ base rounded-lg`,"bg-base":``,p2:``,flex:`~ col gap-2`,"min-w-50":``,"shadow-lg":``},Te={flex:`~ gap-2 items-center`},Ee={truncate:``},De={flex:`~ gap-2 items-center`},Oe={key:0,flex:`~ gap-2 items-center`},ke={"text-xs":``},Ae={key:1,flex:`~ gap-2 items-center`},$=s({__name:`chunks`,props:{session:{}},setup(n){let s=n,u=T(k()),f=[{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:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Sunburst`,value:`sunburst`,icon:`i-ph-chart-donut-duotone`},{label:`Flamegraph`,value:`flamegraph`,icon:`i-ph-chart-bar-horizontal-duotone`}],y=w({search:``}),b=e(),{state:x,isLoading:E}=O(async()=>await b.value.call(`vite:rolldown:get-chunks-graph`,{session:s.session.id}),null),A=d(()=>{let e=new Map;return x.value?.forEach(t=>{e.set(`${t.chunk_id}`,t)}),e}),P=d(()=>x.value?.map(e=>({...e,id:`${e.chunk_id}`}))??[]),F=D(()=>P.value,()=>new ne(P.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),L=d(()=>y.value.search?F.value.search(y.value.search).map(e=>e.item):P.value),{pathSelectorVisible:z,pathNodes:B,selectPathNodes:V,togglePathSelector:H,normalizedGraph:U}=ue({onToggle:e=>{y.value.search=e?!1:``},dataMap:d(()=>A.value),list:d(()=>L.value),importIdKey:`chunk_id`});function W(e){N.value.chunkViewType=e}let G=d(()=>{let e=new Map;for(let t of s.session.modulesList)e.set(t.id,t);return e});function K(e){return e.asset?.size?e.asset.size:e.modules.reduce((e,t)=>{let n=G.value.get(t);return!n||!n.buildMetrics?.transforms?.length?e:e+n.buildMetrics.transforms.at(-1).transformed_code_size},0)}let{tree:q,chartOptions:J,graph:Y,nodeHover:X,nodeSelected:Z,selectedNode:Q,selectNode:$,buildGraph:je}=se({data:d(()=>L.value.map(e=>({...e,filename:e.name||`chunk-${e.chunk_id}`,size:K(e)}))),nameKey:`filename`,sizeKey:`size`,rootText:`Chunks`,nodeType:`chunk`,graphOptions:{onClick(e){e&&(X.value=e)},onHover(e){e&&(X.value=e),e===null&&(X.value=void 0)},onLeave(){X.value=void 0},onSelect(e){Z.value=e||q.value.root,Q.value=e?.meta}},onUpdate(){switch(N.value.chunkViewType){case`sunburst`:Y.value=new ae(q.value.root,J.value);break;case`treemap`:Y.value=new re(q.value.root,{...J.value,selectedPaddingRatio:0});break;case`flamegraph`:Y.value=new oe(q.value.root,J.value);break}}});return _(()=>N.value.chunkViewType,()=>{[`treemap`,`sunburst`,`flamegraph`].includes(N.value.chunkViewType)&&je()}),(e,s)=>{let d=ee,_=de,b=le,x=I,w=te,T=fe,D=R,O=pe,k=me,P=M,F=ie;return h(E)?(v(),c(d,{key:0})):(v(),S(`div`,{key:1,relative:``,class:a({"max-h-screen of-hidden":h(N).chunkViewType===`graph`})},[C(`div`,he,[t(x,{modelValue:y.value,"onUpdate:modelValue":s[2]||=e=>y.value=e,rules:[]},i({"search-end":g(()=>[h(N).chunkViewType===`graph`?(v(),S(`div`,ge,[C(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Graph Path Selector`,onClick:s[1]||=e=>h(H)(!0)},[...s[5]||=[C(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):r(``,!0)]),default:g(()=>[C(`div`,_e,[s[6]||=C(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(v(),S(p,null,l(f,e=>C(`button`,{key:e.value,"btn-action":``,class:a(h(N).chunkViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>W(e.value)},[C(`div`,{class:a(e.icon)},null,2),m(` `+o(e.label),1)],10,ve)),64))])]),_:2},[h(z)?{name:`search`,fn:g(()=>[t(b,{session:n.session,data:L.value,"import-id-key":`chunk_id`,"search-keys":[`name`],onSelect:h(V),onClose:s[0]||=e=>h(H)(!1)},{list:g(({select:e,data:r})=>[t(_,{session:n.session,chunks:r,link:!1,basic:!0,onSelect:e},null,8,[`session`,`chunks`,`onSelect`])]),item:g(({id:e})=>[m(o(A.value.get(e)?.name||`[unnamed]`),1)]),_:1},8,[`session`,`data`,`onSelect`])]),key:`0`}:void 0]),1032,[`modelValue`])]),h(N).chunkViewType===`list`?(v(),S(`div`,ye,[t(_,{session:n.session,chunks:L.value},null,8,[`session`,`chunks`])])):r(``,!0),h(N).chunkViewType===`detailed-list`?(v(),S(`div`,be,[(v(!0),S(p,null,l(L.value,e=>(v(),c(w,{key:e.id,border:`~ base rounded-lg`,p3:``,chunk:e,chunks:L.value,session:n.session},null,8,[`chunk`,`chunks`,`session`]))),128))])):h(N).chunkViewType===`graph`?(v(),c(T,{key:2,class:`pt32`,session:n.session,chunks:h(U),"entry-id":h(B).start},null,8,[`session`,`chunks`,`entry-id`])):h(N).chunkViewType===`treemap`?(v(),S(`div`,xe,[h(Y)?(v(),c(ce,{key:0,graph:h(Y),selected:h(Z),onSelect:s[3]||=e=>h($)(e)},{default:g(({selected:e,options:n,onSelect:r})=>[t(D,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:n,onSelect:r},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):r(``,!0)])):h(N).chunkViewType===`sunburst`?(v(),S(`div`,Se,[h(Y)?(v(),c(O,{key:0,graph:h(Y),selected:h(Z),onSelect:s[4]||=e=>h($)(e)},null,8,[`graph`,`selected`])):r(``,!0)])):h(N).chunkViewType===`flamegraph`?(v(),S(`div`,Ce,[h(Y)?(v(),c(k,{key:0,graph:h(Y)},null,8,[`graph`])):r(``,!0)])):r(``,!0),t(F,{"hover-x":u.x,"hover-y":u.y},{default:g(()=>[h(X)?.meta?(v(),S(`div`,we,[C(`div`,Te,[s[7]||=C(`i`,{"i-ph-shapes-duotone":``,"flex-none":``},null,-1),C(`span`,Ee,o(h(X).meta.name||`[unnamed]`),1)]),C(`div`,De,[s[8]||=C(`span`,{op50:``,"text-xs":``},`Size:`,-1),t(P,{bytes:h(X).meta.size,"text-xs":``},null,8,[`bytes`])]),h(X).meta.modules?.length?(v(),S(`div`,Oe,[s[9]||=C(`span`,{op50:``,"text-xs":``},`Modules:`,-1),C(`span`,ke,o(h(X).meta.modules?.length),1)])):r(``,!0),h(X).meta.is_initial?(v(),S(`div`,Ae,[t(j,{text:`initial`})])):r(``,!0)])):r(``,!0)]),_:1},8,[`hover-x`,`hover-y`])],2))}}});export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,C as t,Gt as n,Jt as r,M as i,S as a,Z as o,b as s,h as c,k as l,kt as u,lt as d,q as f,w as p,x as m}from"./
|
|
1
|
+
import{A as e,C as t,Gt as n,Jt as r,M as i,S as a,Z as o,b as s,h as c,k as l,kt as u,lt as d,q as f,w as p,x as m}from"./DAfG6Q5x.js";import{t as h}from"./Bi5REHPk.js";import{r as g,t as _}from"./xgeU2imy.js";import{t as v}from"./CXpJVZ-W.js";import{t as y}from"./BywRM_M7.js";import{t as b}from"./CTNFxt3v.js";var x={flex:`~ col gap-2`,p6:``},S={flex:`~ gap-2`},C={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_160px_2fr] gap-2 items-center`},w={"font-mono":``,truncate:``},T=[`datetime`],E={key:4},D={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_1fr] gap-2 items-center`},O={flex:`~ wrap gap-2`},k=i({__name:`index`,props:{session:{}},setup(i){let k=i,A=s(()=>[{title:`Build ID`,value:k.session.id,icon:`i-ph-hash-duotone`},{title:`Created At`,value:new Date(k.session.meta.timestamp),icon:`i-ph-clock-duotone`},{title:`Build Duration`,value:k.session.buildDuration,icon:`i-ph-timer-duotone`,type:`duration`},{title:`Directory`,value:k.session.meta.cwd,icon:`i-ph-folder-duotone`},{title:`Total Modules`,value:k.session.modulesList.length,icon:`i-ph-files-duotone`},{title:`Plugins`,value:k.session.meta.plugins.length,icon:`i-ph-plugs-duotone`},{title:`Platform`,value:k.session.meta.platform,icon:`i-ph-cpu-duotone`,type:`badge`},{title:`Format`,value:k.session.meta.format,icon:`i-ph-file-duotone`,type:`badge`}]);return(s,j)=>{let M=h,N=_;return f(),p(`div`,x,[m(`div`,S,[e(M,{"btn-action":``,to:{path:`/`}},{default:d(()=>[...j[0]||=[m(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),l(` Re-select Session `,-1)]]),_:1})]),j[1]||=m(`div`,{op50:``,"mt-10":``},` Meta Info `,-1),m(`div`,C,[(f(!0),p(c,null,o(A.value,e=>(f(),p(c,{key:e.title},[m(`div`,{class:n(e.icon)},null,2),m(`div`,null,r(e.title),1),m(`div`,w,[e.value instanceof Date?(f(),p(`time`,{key:0,datetime:e.value.toISOString()},r(e.value.toLocaleString()),9,T)):e.type===`badge`?(f(),a(g,{key:1,text:String(e.value),py1:``},null,8,[`text`])):e.type===`duration`?(f(),a(v,{key:2,duration:+e.value},null,8,[`duration`])):typeof e.value==`number`?(f(),a(y,{key:3,number:e.value,py1:``,"rounded-full":``,"inline-block":``,"text-sm":``},null,8,[`number`])):(f(),p(`span`,E,r(e.value),1))])],64))),128))]),j[2]||=m(`div`,{op50:``,"mt-4":``},` Build Entries `,-1),m(`div`,D,[(f(!0),p(c,null,o(k.session.meta.inputs,t=>(f(),p(c,{key:t},[e(g,{text:t.name||``},null,8,[`text`]),e(N,{id:t.filename||``,session:i.session,link:!0},null,8,[`id`,`session`])],64))),128))]),j[3]||=m(`div`,{op50:``,"mt-4":``},` Views `,-1),m(`div`,O,[(f(!0),p(c,null,o(u(b),e=>(f(),p(c,{key:e.to},[e.category===`session`?(f(),a(M,{key:0,"btn-action":``,to:{path:e.to},flex:`~ col`,"min-w-40":``,p4:``},{default:d(()=>[m(`div`,{class:n(e.icon),"text-2xl":``},null,2),l(` `+r(e.title),1)]),_:2},1032,[`to`])):t(``,!0)],64))),128))])])}}});export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./DGp5TtxR.js";var t=class{length;_mapTree;constructor(e){this.length=e,this._mapTree=new Map}_getLastMap(e){let t=this._mapTree;for(let n of e.slice(0,-1))t.has(n)||t.set(n,new Map),t=t.get(n);return t}set(e,t){if(e.length!==this.length)throw Error(`Expect tuple of length ${this.length}, got ${e.length}`);return this._getLastMap(e).set(e.at(-1),t),this}get(e){return this._getLastMap(e).get(e.at(-1))}clear(){this._mapTree.clear()}delete(e){return this._getLastMap(e).delete(e.at(-1))}get size(){return this._mapTree.size}*_traverseMap(){function*e(t,n,r){if(r===0)yield{keys:n,map:t};else for(let[i,a]of t.entries())yield*e(a,[...n,i],r-1)}yield*e(this._mapTree,[],this.length)}},n=class{_lengthMap;constructor(){this._lengthMap=new Map}get(e){let t=e.length;return this._lengthMap.get(t)?.get(e)}set(e,n){let r=e.length,i=this._lengthMap.get(r);return i||(i=new t(r),this._lengthMap.set(r,i)),i.set(e,n),this}delete(e){let t=e.length;return this._lengthMap.get(t)?.delete(e)??!1}clear(){this._lengthMap.clear()}};function r(e){let t=new n,r=function(...n){let r=t.get(n);return r||(r=e(...n),t.set(n,r),r)};return r.cache=t,r}var i=[{match:/[\\/]node_modules[\\/]/i,name:`node_modules`,description:`Node Modules`,icon:`i-catppuccin-npm`},{match:/virtual:|^\0/,name:`virtual`,description:`Virtual`,icon:`i-catppuccin-symlink`},{match:/^@?[\w-]+\/?/,name:`package`,description:`Package`,icon:`i-catppuccin-java-class-abstract`},{match:/\.vue$/i,name:`vue`,description:`Vue`,icon:`i-catppuccin-vue`},{match:/\.[cm]?[tj]sx$/i,name:`jsx`,description:`JavaScript React`,icon:`i-catppuccin-javascript-react`},{match:/\.[cm]?ts$/i,name:`ts`,description:`TypeScript`,icon:`i-catppuccin-typescript`},{match:/\.[cm]?js$/i,name:`js`,description:`JavaScript`,icon:`i-catppuccin-javascript`},{match:/\.svelte$/i,name:`svelte`,description:`Svelte`,icon:`i-catppuccin-svelte`},{match:/\.mdx$/i,name:`mdx`,description:`MDX`,icon:`i-catppuccin-mdx`},{match:/\.md$/i,name:`md`,description:`Markdown`,icon:`i-catppuccin-markdown`},{match:/\.astro$/i,name:`astro`,description:`Astro`,icon:`i-catppuccin-astro`},{match:/\.angular$/i,name:`angular`,description:`Angular`,icon:`i-catppuccin-angular`},{match:/\.html?$/i,name:`html`,description:`HTML`,icon:`i-catppuccin-html`},{match:/\.(css|scss|less|postcss)$/i,name:`css`,description:`CSS`,icon:`i-catppuccin-css`},{match:/\.json[c5]?$/i,name:`json`,description:`JSON`,icon:`i-catppuccin-json`},{match:/\.(yaml|yml)$/i,name:`yaml`,description:`YAML`,icon:`i-catppuccin-yaml`},{match:/\.toml$/i,name:`toml`,description:`TOML`,icon:`i-catppuccin-toml`},{match:/\.svg$/i,name:`svg`,description:`SVG`,icon:`i-catppuccin-svg`}],a=[{match:/^(replace|define|alias)$/,name:`rollup`,description:`Rollup`,icon:`i-catppuccin-rollup`},{match:/^vite:/i,name:`vite`,description:`Vite`,icon:`i-catppuccin-vite`},{match:/^unocss:/i,name:`unocss`,description:`Unocss`,icon:`i-catppuccin-unocss`},{match:/^nuxt:/i,name:`nuxt`,description:`Nuxt`,icon:`i-catppuccin-nuxt`},{match:/^builtin:/i,name:`builtin`,description:`Builtin`,icon:`i-catppuccin-folder-prisma`}],o={name:`file`,match:/.*/,description:`File`,icon:`i-catppuccin-file`},s={name:`plugin`,match:/.*/,description:`User Plugins`,icon:`i-catppuccin-folder-plugins`};function c(e){return i.find(t=>t.name===e)??o}var l=r(e=>{e=e.replace(/(\?|&)v=[^&]*/,`$1`).replace(/\?$/,``);for(let t of i)if(t.match.test(e))return t;return o}),u=r(e=>{for(let t of a)if(t.match.test(e))return t;return s});function d(e,t=1){let n=0;for(let t=0;t<e.length;t++)n=e.charCodeAt(t)+((n<<5)-n);return f(n%360,t)}function f(t,n=1){return`hsla(${t}, ${e.value?50:65}%, ${e.value?60:40}%, ${n})`}var p={error:0,client:60,bailout:-1,ssr:270,vite:250,vite1:240,vite2:120,rolldown:18,virtual:160,nuxt:140};function m(e,t=1){if(e=e.replace(/[^a-z]+/gi,``).toLowerCase(),e in p){let n=p[e];return typeof n==`number`?f(n,t):t===1?n:n+Math.floor(t*255).toString(16).padStart(2,`0`)}return d(e,t)}export{i as a,c,s as i,u as l,d as n,a as o,f as r,l as s,m as t,r as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,F as t,G as n,H as r,M as i,a,b as o,c as s,i as c,kt as l,wt as u,xt as d}from"./
|
|
1
|
+
import{$ as e,F as t,G as n,H as r,M as i,a,b as o,c as s,i as c,kt as l,wt as u,xt as d}from"./DAfG6Q5x.js";import{F as f,L as p,M as m,O as h,S as g,a as _,b as v,i as y,j as b,n as x,r as S,w as C,x as w}from"./D1igyLjg.js";var T=(...e)=>e.find(e=>e!==void 0);function E(s){let f=s.componentName||`NuxtLink`;function p(e){return typeof e==`string`&&e.startsWith(`#`)}function E(e,t,n){let r=n??s.trailingSlash;if(!e||r!==`append`&&r!==`remove`)return e;if(typeof e==`string`)return O(e,r);let i=`path`in e&&e.path!==void 0?e.path:t(e).path;return{...e,name:void 0,path:O(i,r)}}function D(t){let n=C(),r=a(),i=o(()=>!!l(t.target)&&l(t.target)!==`_self`),c=o(()=>{let e=l(t.to)||l(t.href)||``;return typeof e==`string`&&h(e,{acceptRelative:!0})}),u=e(`RouterLink`),d=u&&typeof u!=`string`?u.useLink:void 0,f=o(()=>{if(l(t.external))return!0;let e=l(t.to)||l(t.href)||``;return typeof e==`object`?!1:e===``||c.value}),m=o(()=>{let e=l(t.to)||l(t.href)||``;return f.value?e:E(e,n.resolve,l(t.trailingSlash))}),_=f.value?void 0:d?.({...t,to:m,viewTransition:l(t.viewTransition)}),v=o(()=>{let e=l(t.trailingSlash)??s.trailingSlash;if(!m.value||c.value||p(m.value))return m.value;if(f.value){let t=typeof m.value==`object`&&`path`in m.value?g(m.value):m.value;return O(typeof t==`object`?n.resolve(t).href:t,e)}return typeof m.value==`object`?n.resolve(m.value)?.href??null:O(b(r.app.baseURL,m.value),e)});return{to:m,hasTarget:i,isAbsoluteUrl:c,isExternal:f,href:v,isActive:_?.isActive??o(()=>m.value===n.currentRoute.value.path),isExactActive:_?.isExactActive??o(()=>m.value===n.currentRoute.value.path),route:_?.route??o(()=>n.resolve(m.value)),async navigate(e){await w(v.value,{replace:l(t.replace),external:f.value||i.value})}}}return i({name:f,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:D,setup(i,{slots:a}){let o=C(),{to:l,href:f,navigate:h,isExternal:b,hasTarget:w,isAbsoluteUrl:E}=D(i),O=u(!1),A=d(null),M=e=>{A.value=i.custom?e?.$el?.nextElementSibling:e?.$el};function N(e){return!O.value&&(typeof i.prefetchOn==`string`?i.prefetchOn===e:i.prefetchOn?.[e]??s.prefetchOn?.[e])&&(i.prefetch??s.prefetch)!==!1&&i.noPrefetch!==!0&&i.target!==`_blank`&&!j()}async function P(e=c()){if(O.value)return;O.value=!0;let t=typeof l.value==`string`?l.value:b.value?g(l.value):o.resolve(l.value).fullPath,n=b.value?new URL(t,window.location.href).href:t;await Promise.all([e.hooks.callHook(`link:prefetch`,n)?.catch(()=>{}),!b.value&&!w.value&&x(l.value,o).catch(()=>{})])}if(N(`visibility`)){let e=c(),t,i=null;n(()=>{let n=k();S(()=>{t=_(()=>{A?.value?.tagName&&(i=n.observe(A.value,async()=>{i?.(),i=null,await P(e)}))})})}),r(()=>{t&&y(t),i?.(),i=null})}return()=>{if(!b.value&&!w.value&&!p(l.value)){let n={ref:M,to:l.value,activeClass:i.activeClass||s.activeClass,exactActiveClass:i.exactActiveClass||s.exactActiveClass,replace:i.replace,ariaCurrentValue:i.ariaCurrentValue,custom:i.custom};return i.custom||(N(`interaction`)&&(n.onPointerenter=P.bind(null,void 0),n.onFocus=P.bind(null,void 0)),O.value&&(n.class=i.prefetchedClass||s.prefetchedClass),n.rel=i.rel||void 0),t(e(`RouterLink`),n,a.default)}let n=i.target||null,r=T(i.noRel?``:i.rel,s.externalRelAttribute,E.value||w.value?`noopener noreferrer`:``)||null;return i.custom?a.default?a.default({href:f.value,navigate:h,prefetch:P,get route(){if(!f.value)return;let e=new URL(f.value,window.location.href);return{path:e.pathname,fullPath:e.pathname,get query(){return m(e.search)},hash:e.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:f.value}},rel:r,target:n,isExternal:b.value||w.value,isActive:!1,isExactActive:!1}):null:t(`a`,{ref:A,href:f.value||null,rel:r,target:n,onClick:async e=>{if(!(b.value||w.value)){e.preventDefault();try{let e=v(f.value);return await(i.replace?o.replace(e):o.push(e))}finally{if(p(l.value)){let e=l.value.slice(1),t=e;try{t=decodeURIComponent(e)}catch{}document.getElementById(t)?.focus()}}}}},a.default?.())}}})}var D=E(s);function O(e,t){let n=t===`append`?f:p;return h(e)&&!e.startsWith(`http`)?e:n(e,!0)}function k(){let e=c();if(e._observer)return e._observer;let t=null,n=new Map;return e._observer={observe:(e,r)=>(t||=new IntersectionObserver(e=>{for(let t of e){let e=n.get(t.target);(t.isIntersecting||t.intersectionRatio>0)&&e&&e()}}),n.set(e,r),t.observe(e),()=>{n.delete(e),t?.unobserve(e),n.size===0&&(t?.disconnect(),t=null)})}}var A=/2g/;function j(){let e=navigator.connection;return!!(e&&(e.saveData||A.test(e.effectiveType)))}export{D as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,Gt as t,Jt as n,M as r,Q as i,b as a,k as o,q as s,w as c}from"./
|
|
1
|
+
import{C as e,Gt as t,Jt as n,M as r,Q as i,b as a,k as o,q as s,w as c}from"./DAfG6Q5x.js";var l=r({__name:`DisplayNumberBadge`,props:{number:{},color:{default:`badge-color-gray op75`},icon:{},prefix:{},suffix:{},format:{default:`locale`}},setup(r){let l=r,u=a(()=>l.format===`percent`?Number(l.number).toLocaleString(void 0,{style:`percent`,minimumFractionDigits:2,maximumFractionDigits:2}):Number(l.number).toLocaleString());return(a,l)=>(s(),c(`div`,{class:t([r.color,`px-0.4em py-0.2em font-mono line-height-none flex items-center`])},[r.icon?(s(),c(`div`,{key:0,class:t([r.icon,`mr-1`])},null,2)):e(``,!0),o(` `+n(r.prefix||``)+n(u.value)+n(r.suffix||``)+` `,1),i(a.$slots,`after`)],2))}});export{l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,B as t,C as n,D as r,Gt as i,Jt as a,M as o,S as s,Z as c,b as l,h as u,k as d,kt as f,lt as p,q as m,w as h,x as g,xt as _}from"./DAfG6Q5x.js";import{C as v,w as y}from"./D1igyLjg.js";import{D as b,j as x}from"./DGp5TtxR.js";import{r as S}from"./CqfNwh25.js";import{a as C,s as w}from"./BgSZqMub.js";import{t as T}from"./xgeU2imy.js";import{t as ee}from"./DUEAe2mZ.js";import{t as E}from"./B2xjE9S9.js";import{t as D}from"./COhEYQbe.js";import{n as O}from"./qNFXE2Qb.js";import{n as k,r as A,t as j}from"./qKmu99_C.js";import{t as M}from"./CY_j28gw.js";import{t as N}from"./s8CxCfpb.js";import{n as P,r as F,t as I}from"./BT76Oq15.js";import{n as L,t as R}from"./qIAw3Eg02.js";var z={flex:`~ col gap-2`,p4:``},B=[`onClick`],V=Object.assign(o({__name:`FlatList`,props:{session:{},modules:{},disableTooltip:{type:Boolean,default:!1},link:{type:Boolean,default:!0}},emits:[`select`],setup(t,{emit:n}){let r=n;return(n,i)=>{let a=T;return m(),h(`div`,z,[e(j,{items:t.modules,"key-prop":`id`},{default:p(({item:n})=>[g(`div`,{flex:``,pb2:``,onClick:e=>r(`select`,n)},[e(a,{id:n.id,session:t.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:t.link,"disable-tooltip":t.disableTooltip},null,8,[`id`,`session`,`link`,`disable-tooltip`])],8,B)]),_:1},8,[`items`])])}}}),{__name:`ModulesFlatList`}),H={flex:`~ col gap-2`,p4:``},U={flex:``,pb2:``},W={flex:`~ gap-1 wrap`,"text-xs":``},G={flex:`~ auto text-xs wrap`},K={key:0,flex:`~ items-center`},q={key:0,op20:``},J={flex:`~ none gap-1 wrap justify-end`},Y=Object.assign(o({__name:`DetailedList`,props:{session:{},modules:{}},setup(t){let r=t,i=l(()=>{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=M,l=D,d=T;return m(),h(`div`,H,[e(j,{items:t.modules,"key-prop":`id`},{default:p(({item:r})=>[g(`div`,U,[e(d,{id:r.id,session:t.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:!0},{detail:p(()=>[g(`div`,W,[g(`ul`,G,[(m(!0),h(u,null,c(i.value.get(r.id),(t,a)=>(m(),h(u,{key:a},[t.source_code_size!==t.transformed_code_size&&t.transformed_code_size?(m(),h(`li`,K,[e(o,{name:t.plugin_name,class:`font-mono ws-nowrap op-50`},null,8,[`name`]),a===i.value.get(r.id).length-1?n(``,!0):(m(),h(`span`,q,`|`))])):n(``,!0)],64))),128))]),a[0]||=g(`div`,{flex:`~ auto gap-1`,"of-hidden":``},null,-1),g(`div`,J,[g(`span`,null,[r.buildMetrics?(m(),s(l,{key:0,metrics:r.buildMetrics},null,8,[`metrics`])):n(``,!0)])])])]),_:2},1032,[`id`,`session`])])]),_:1},8,[`items`])])}}}),{__name:`ModulesDetailedList`}),X=[`d`,`stroke-dasharray`],Z=Object.assign(o({__name:`Graph`,props:{modules:{},session:{}},setup(n){let r=n,a=l(()=>r.modules);return O({modules:a,spacing:{width:400,height:55,linkOffset:20,margin:800,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:n,scale:r,spacing:i,tree:o,hierarchy:s,collapsedNodes:c,container:u,modulesMap:d,nodes:p,links:m,nodesMap:h,linksMap:g,width:_,height:v,childToParentMap:y,focusOn:b}=e,x=l(()=>a.value.filter(e=>e.importers.length===0));return(e=!0)=>{_.value=window.innerWidth,v.value=window.innerHeight;let a=new Set,l=s({module:{id:`~root`}},e=>e.module.id===`~root`?(x.value.forEach(e=>{a.add(e),n.value&&y.set(e.id,`~root`)}),x.value.map(e=>({module:e,expanded:!c.has(e.id),hasChildren:!1}))):c.has(e.module.id)?[]:e.module.imports.map(t=>{let r=d.value.get(t.module_id);if(r&&!a.has(r)&&!(y.has(r.id)&&y.get(r.id)!==e.module.id))return a.add(r),n.value&&y.set(r.id,e.module.id),{module:r,import:t,expanded:!c.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));n.value&&=!1,o().nodeSize([f(i.height),f(i.width)+f(i.gap)])(l);let S=l.descendants();for(let e of S)[e.x,e.y]=[e.y-f(i.width),e.x],e.data.module.imports&&(e.data.hasChildren=e.data.module.imports?.filter(t=>y.get(t.module_id)===e.data.module.id).length>0);let C=Math.min(...S.map(e=>e.x)),w=Math.min(...S.map(e=>e.y));if(C<f(i.margin))for(let e of S)e.x+=Math.abs(C)+f(i.margin);if(w<f(i.margin))for(let e of S)e.y+=Math.abs(w)+f(i.margin);p.value=S,h.clear();for(let e of S)h.set(e.data.module.id,e);let T=l.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,t(()=>{_.value=u.value.scrollWidth/r.value+f(i.margin),v.value=u.value.scrollHeight/r.value+f(i.margin);let n=x.value?.[0]?.id;e&&n&&t(()=>{b(n,!1)})})}}}),(t,r)=>{let o=T,c=I;return m(),s(c,{session:n.session,modules:a.value},{default:p(({node:t,nodesRefMap:r})=>[e(o,{id:t.data.module.id,ref:e=>r.set(t.data.module.id,e?.$el),link:!0,session:n.session,minimal:!0,flex:`1`},null,8,[`id`,`session`])]),link:p(({link:e,d:t,linkClass:n})=>[g(`path`,{d:t,class:i(n),"stroke-dasharray":e.import?.kind===`dynamic-import`?`3 6`:void 0,fill:`none`},null,10,X)]),_:1},8,[`session`,`modules`])}}}),{__name:`ModulesGraph`}),Q={"of-auto":``,"max-h-screen":``,relative:``},te={flex:`~ col gap-2`,p4:``},ne=Object.assign(o({__name:`Folder`,props:{session:{},modules:{}},setup(t){let r=t,i=l(()=>{if(!r.session.modulesList.length)return{workspace:{children:{},items:[]},nodeModules:{children:{},items:[]},virtual:{children:{},items:[]}};let e=[],t=[],n=[];return r.modules.map(e=>({full:e.id,path:e.path})).forEach(i=>{i.full.startsWith(r.session.meta.cwd)?(i.path.startsWith(`../`)||(i.path=i.full.slice(r.session.meta.cwd.length+1)),e.push(i)):i.full.includes(`node_modules`)?t.push({full:i.full,path:i.full}):i.full.startsWith(`virtual:`)&&n.push(i)}),{workspace:S(e,`Project Root`),nodeModules:S(t,`Node Modules`),virtual:S(n,`Virtual Modules`)}});return(t,r)=>{let a=N;return m(),h(`div`,Q,[g(`div`,te,[Object.keys(i.value.workspace.children).length?(m(),s(a,{key:0,node:i.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`])):n(``,!0),Object.keys(i.value.nodeModules.children).length?(m(),h(u,{key:1},[r[0]||=g(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),e(a,{node:i.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)):n(``,!0),Object.keys(i.value.virtual.children).length?(m(),h(u,{key:2},[r[1]||=g(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),e(a,{node:i.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)):n(``,!0)])])}}}),{__name:`ModulesFolder`}),re={sticky:``,"left-4":``,"right-4":``,"top-4":``,"z-panel-nav":``,"p-4":``},$={key:0,h10:``,mr2:``,flex:`~ items-center`},ie={flex:`~ wrap gap-2 items-center`,p2:``,border:`t base`},ae=[`onClick`],oe={key:4,fixed:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},se={op50:``},ce=o({__name:`index`,props:{session:{}},setup(t){let o=t,S=v(),D=y(),O=_({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}),j=[{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`}];x(O.value,e=>{let t={...S.query,search:e.search||void 0,file_types:e.selected||void 0,node_modules:e.node_modules||void 0};D.replace({query:R(t)})},{debounce:500});let M=l(()=>o.session.modulesList.map(e=>({mod:e,path:ee(e.id,o.session.meta.cwd),type:w(e.id)}))),N=l(()=>C.filter(e=>M.value.some(t=>e.match.test(t.mod.id)))),I=l(()=>{let e=M.value;return O.value.selected&&(e=e.filter(e=>{let t=w(e.mod.id);return O.value.selected.includes(t.name)})),O.value.node_modules&&(e=e.filter(e=>e.path.moduleName&&O.value.node_modules.includes(e.path.moduleName))),e.map(e=>({...e.mod,path:e.path.path}))}),{pathSelectorVisible:z,selectPathNodes:B,togglePathSelector:H,normalizedGraph:U}=F({onToggle:e=>{O.value.search=e?!1:``},dataMap:l(()=>new Map(o.session.modulesList.map(e=>[e.id,e]))),list:I,importIdKey:`module_id`}),W=b(()=>I.value,()=>new A(I.value,{includeScore:!0,keys:[`id`],ignoreLocation:!0,threshold:.4})),G=l(()=>O.value.search?W.value.search(O.value.search).map(e=>e.item):I.value);function K(e){S.query.module&&D.replace({query:{...S.query,module:void 0}}),E.value.moduleGraphViewType=e}return(o,l)=>{let _=V,v=T,y=P,b=k,x=Y,S=Z,C=ne;return m(),h(`div`,{relative:``,class:i({"max-h-screen of-hidden":f(E).moduleGraphViewType===`graph`})},[g(`div`,re,[e(b,{modelValue:O.value,"onUpdate:modelValue":l[2]||=e=>O.value=e,rules:N.value},r({"search-end":p(()=>[f(E).moduleGraphViewType===`graph`?(m(),h(`div`,$,[g(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Graph Path Selector`,onClick:l[1]||=e=>f(H)(!0)},[...l[3]||=[g(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):n(``,!0)]),default:p(()=>[g(`div`,ie,[l[4]||=g(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(m(),h(u,null,c(j,e=>g(`button`,{key:e.value,"btn-action":``,class:i(f(E).moduleGraphViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>K(e.value)},[g(`div`,{class:i(e.icon)},null,2),d(` `+a(e.label),1)],10,ae)),64))])]),_:2},[f(z)?{name:`search`,fn:p(()=>[e(y,{session:t.session,data:G.value,"import-id-key":`module_id`,"search-keys":[`id`],onSelect:f(B),onClose:l[0]||=e=>f(H)(!1)},{list:p(({select:e,data:r})=>[r?.length?(m(),s(_,{key:0,session:t.session,modules:r,"disable-tooltip":``,link:!1,onSelect:e},null,8,[`session`,`modules`,`onSelect`])):n(``,!0)]),item:p(({id:n})=>[e(v,{id:n,session:t.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`])]),f(E).moduleGraphViewType===`list`?(m(),s(_,{key:0,session:t.session,modules:G.value},null,8,[`session`,`modules`])):f(E).moduleGraphViewType===`detailed-list`?(m(),s(x,{key:1,session:t.session,modules:G.value},null,8,[`session`,`modules`])):f(E).moduleGraphViewType===`graph`?(m(),s(S,{key:2,session:t.session,modules:f(U)},null,8,[`session`,`modules`])):(m(),s(C,{key:3,session:t.session,modules:G.value},null,8,[`session`,`modules`])),f(E).moduleGraphViewType===`list`||f(E).moduleGraphViewType===`detailed-list`?(m(),h(`div`,oe,[g(`span`,se,a(G.value.length)+` of `+a(t.session.modulesList.length),1)])):n(``,!0)],2)}}});export{ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,C as t,M as n,b as r,h as i,kt as a,lt as o,q as s,w as c,x as l}from"./
|
|
1
|
+
import{A as e,C as t,M as n,b as r,h as i,kt as a,lt as o,q as s,w as c,x as l}from"./DAfG6Q5x.js";import{r as u}from"./B2xjE9S9.js";import{n as d,t as f}from"./CXpJVZ-W.js";var p={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},m={flex:`~ gap-1 items-center`},h=Object.assign(n({__name:`BuildMetrics`,props:{metrics:{}},setup(n){let h=n,g=r(()=>{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}}),_=r(()=>(h.metrics?.transforms)?.[0]?.source_code_size),v=r(()=>(h.metrics?.transforms.filter(e=>e.transformed_code_size)).at(-1)?.transformed_code_size);return(n,r)=>{let h=u;return s(),c(`div`,p,[e(f,{duration:g.value.resolveIds,flex:`~ gap-1 items-center`,title:`Resolve Id hooks cost: ${a(d)(g.value.resolveIds,!0)}`},{default:o(()=>[...r[0]||=[l(`span`,{"i-ph-magnifying-glass-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),e(f,{duration:g.value.loads,flex:`~ gap-1 items-center`,title:`Load hooks cost: ${a(d)(g.value.loads,!0)}`},{default:o(()=>[...r[1]||=[l(`span`,{"i-ph-upload-simple-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),e(f,{duration:g.value.transforms,flex:`~ gap-1 items-center`,title:`Transform hooks cost: ${a(d)(g.value.transforms,!0)}`},{default:o(()=>[...r[2]||=[l(`span`,{"i-ph-magic-wand-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),r[6]||=l(`span`,{op40:``},`|`,-1),e(f,{duration:g.value.total,flex:`~ gap-1 items-center`,title:`Total build cost: ${a(d)(g.value.total,!0)}`},{default:o(()=>[...r[3]||=[l(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),_.value&&v.value?(s(),c(i,{key:0},[r[5]||=l(`span`,{op40:``},`|`,-1),l(`div`,m,[e(h,{title:`Source code size`,bytes:_.value},null,8,[`bytes`]),r[4]||=l(`span`,{"i-ph-arrow-right-duotone":``,op50:``},null,-1),e(h,{title:`Transformed code size`,bytes:v.value},null,8,[`bytes`])])],64)):t(``,!0)])}}}),{__name:`ModulesBuildMetrics`});export{h as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Tt as e,b as t,ot as n,vt as r,yt as i}from"./
|
|
1
|
+
import{Tt as e,b as t,ot as n,vt as r,yt as i}from"./DAfG6Q5x.js";var a=0,o=i(new Map),s=t(()=>Array.from(o.values()).flat());function c(t){let i=e(t),s=()=>{};function c(e){s();let t=a++;o.set(t,e),s=()=>{o.delete(t)}}return n(i,e=>{c(e)},{immediate:!0}),r(()=>{s()}),()=>{s()}}export{c as n,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Gt as e,Jt as t,M as n,Q as r,S as i,b as a,lt as o,q as s,w as c,x as l}from"./
|
|
1
|
+
import{Gt as e,Jt as t,M as n,Q as r,S as i,b as a,lt as o,q as s,w as c,x as l}from"./DAfG6Q5x.js";function u(e,t){let n=[];return n=e==null?[``,`-`]:e<1?[`<1`,`ms`]:e<1e3?[e.toFixed(0),`ms`]:e<1e3*60?[(e/1e3).toFixed(1),`s`]:[(e/1e3/60).toFixed(1),`min`],t?n.join(` `):n}var d={"ml-0.4":``,"text-xs":``,op75:``},f=n({__name:`DisplayNumberWithUnit`,props:{number:{},unit:{}},setup(e){return(n,i)=>(s(),c(`div`,null,[r(n.$slots,`default`),l(`span`,null,t(e.number),1),l(`span`,d,t(e.unit),1)]))}}),p=n({__name:`DisplayDuration`,props:{duration:{},factor:{default:1},unit:{default:`ms`},color:{type:Boolean,default:!0}},setup(t){let n=t,c=a(()=>{if(n.duration!=null)return n.unit===`ns`?n.duration/1e3:n.duration});function l(e){return!n.color||e==null?``:(e*=n.factor,e<1?`op50`:e>1e4?`color-scale-critical`:e>1e3?`color-scale-high`:e>500?`color-scale-medium`:e>200?`color-scale-low`:`color-scale-neutral`)}let d=a(()=>u(c.value));return(t,n)=>(s(),i(f,{class:e(l(c.value)),number:d.value[0],unit:d.value[1]},{default:o(()=>[r(t.$slots,`default`)]),_:3},8,[`class`,`number`,`unit`]))}});export{u as n,p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,M as t,S as n,q as r,tt as i}from"./
|
|
1
|
+
import{F as e,M as t,S as n,q as r,tt as i}from"./DAfG6Q5x.js";import{t as a}from"./BgSZqMub.js";var o=Object.assign(t({__name:`PluginName`,props:{name:{},compact:{type:Boolean},colored:{type:Boolean},hide:{type:Boolean}},setup(t){let o=t,s=[`__load__`,`vite-plugin-`,`vite-`,`rollup-plugin-`,`rollup-`,`unplugin-`],c=[...s,`vite:`];function l(){let t=o.compact?c:s;for(let n of t)if(o.name.startsWith(n))return o.compact?e(`span`,o.name.slice(n.length)):e(`span`,[e(`span`,{class:`op50`},n),e(`span`,o.name.slice(n.length))]);let n=o.name.split(`:`);return n.length>1?e(`span`,[e(`span`,{style:{color:a(n[0])}},`${n[0]}:`),e(`span`,n.slice(1).join(`:`))]):e(`span`,o.name)}return(e,t)=>(r(),n(i(l)))}}),{__name:`DisplayPluginName`});export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,Jt as t,M as n,kt as r,q as i,w as a}from"./DAfG6Q5x.js";import{i as o}from"./DGp5TtxR.js";var s={key:0,"font-mono":``},c=n({__name:`DisplayTimestamp`,props:{timestamp:{}},setup(n){let c=n;return(l,u)=>n.timestamp?(i(),a(`span`,s,t(r(o)(new Date(c.timestamp))),1)):e(``,!0)}});export{c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./
|
|
1
|
+
import{r as e}from"./DfB5JIVQ.js";import{A as t,C as n,G as r,Gt as i,Jt as a,M as o,S as s,Z as c,b as l,h as u,k as d,lt as f,q as p,w as m,x as h,xt as g,z as _}from"./DAfG6Q5x.js";import{C as v}from"./D1igyLjg.js";import{n as y}from"#entry";import{t as b}from"./Bi5REHPk.js";import{t as x}from"./D3O7sl5Q.js";import{t as S}from"./CqfNwh25.js";var C=Object.assign(o({__name:`ComparisonMetric`,props:{current:{},previous:{}},setup(e){let t=e,n=l(()=>t.previous===t.current),r=l(()=>n.value?`0`:t.previous===0?`100.00`:Math.abs((t.current-t.previous)/t.previous*100).toFixed(2)),o=l(()=>n.value?``:t.current>t.previous?`+`:`-`),s=l(()=>n.value?`text-gray-500`:t.current>t.previous?`text-green-500`:`text-red-500`);return(e,t)=>(p(),m(`span`,{"text-4":``,"mt-1":``,"font-mono":``,class:i(s.value)},a(o.value)+a(r.value)+`% `,3))}}),{__name:`DisplayComparisonMetric`}),w=[`title`],T={flex:`~ gap-2`,"items-center":``},E={key:0},D={"font-semibold":``,"text-5":``,"font-mono":``},O={"font-semibold":``,"text-4":``,"font-mono":``},k={key:1},A={"font-semibold":``,"text-5":``,"font-mono":``},j=Object.assign(o({__name:`MetricCard`,props:{name:{},description:{},icon:{},current:{},previous:{},format:{}},setup(e){let t=e,r=l(()=>t.format===`bytes`?S(t.current):t.current);return(t,o)=>{let c=C;return p(),m(u,null,[h(`div`,{"font-500":``,op50:``,"text-4":``,flex:`~ items-center gap-2`,title:e.description},[h(`div`,{class:i([e.icon,`text-xl`])},null,2),d(` `+a(e.name),1)],8,w),h(`div`,T,[e.format===`bytes`?(p(),m(`div`,E,[h(`span`,D,a(r.value[0]),1),h(`span`,O,a(r.value[1]),1)])):(p(),m(`div`,k,[h(`span`,A,a(r.value),1)])),e.previous>0&&e.current>0?(p(),s(c,{key:2,current:e.current,previous:e.previous},null,8,[`current`,`previous`])):n(``,!0)])],64)}}}),{__name:`CompareMetricCard`}),M={key:1,"h-screen":``,"w-screen":``,"max-w-screen":``,"max-h-screen":``,"of-hidden":``,p6:``,flex:`~ col gap-2`},N={flex:`~ gap-2`},P={flex:`~ col`,border:`~ base rounded-lg`,p3:``,mt10:``},F={grid:`~ cols-6 gap5`,"w-full":``,pt3:``},I=o({__name:`index`,setup(n){let a=g(!1),o=v().params,S=e(),C=g([]),w=g([]);async function T(e){let t=await S.value.call(`vite:rolldown:get-packages`,{session:e}),n=t.filter(e=>e.duplicated);return{total:t.length,duplicated:n.length}}r(async()=>{a.value=!0;let e=o.sessions.split(`,`),[t,...n]=await Promise.all([S.value.call(`vite:rolldown:get-session-compare-summary`,{sessions:e}),...e.map(e=>T(e))]);C.value=t,w.value=n,a.value=!1});let E=l(()=>C.value.map((e,t)=>({...e,createdAt:new Date(e.meta?.timestamp??0),title:t===0?`Session A`:`Session B`}))),D=l(()=>{let[e,t]=E.value;return[{name:`Bundle Size`,description:`Total file size of the assets`,icon:`i-ph-package-duotone`,current:t?.bundle_size??0,previous:e?.bundle_size??0,format:`bytes`},{name:`Initial JS`,description:`Total file size of the initial JS chunks`,icon:`i-ph-file-js-duotone`,current:t?.initial_js??0,previous:e?.initial_js??0,format:`bytes`},{name:`Modules`,description:`Total number of modules`,icon:`i-ph-graph-duotone`,current:t?.modules??0,previous:e?.modules??0},{name:`Packages`,description:`Total number of packages`,icon:`i-ph-package-duotone`,current:w.value?.[1]?.total??0,previous:w.value?.[0]?.total??0},{name:`Duplicated Packages`,description:`Total number of duplicated packages`,icon:`i-ph-package-duotone`,current:w.value?.[1]?.duplicated??0,previous:w.value?.[0]?.duplicated??0},{name:`Plugins`,description:`Total number of plugins`,icon:`i-ph-plugs-duotone`,current:t?.meta?.plugins.length??0,previous:e?.meta?.plugins.length??0},{name:`Chunks`,description:`Total number of chunks`,icon:`i-ph-shapes-duotone`,current:t?.chunks??0,previous:e?.chunks??0},{name:`Assets`,description:`Total number of assets`,icon:`i-ph-package-duotone`,current:t?.assets??0,previous:e?.assets??0}]});return(e,n)=>{let r=y,o=b,l=x,g=j;return a.value?(p(),s(r,{key:0})):(p(),m(`div`,M,[h(`div`,N,[t(o,{"btn-action":``,to:{path:`/`}},{default:f(()=>[...n[0]||=[h(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),d(` Re-select Session `,-1)]]),_:1})]),h(`div`,P,[n[1]||=h(`div`,{py3:``,"indent-2":``},` Compare Overview `,-1),t(l,{sessions:E.value},null,8,[`sessions`]),h(`div`,F,[(p(!0),m(u,null,c(D.value,(e,n)=>(p(),m(`div`,{key:e.name,class:i(n<2?`col-span-3`:`col-span-2`),border:`~ base rounded`,p4:``,flex:`~ col`,gap2:``},[t(g,_({ref_for:!0},e),null,16)],2))),128))])])]))}}});export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,M as t}from"./
|
|
1
|
+
import{F as e,M as t}from"./DAfG6Q5x.js";import{t as n}from"./BgSZqMub.js";import{n as r}from"./DoJ6DaKu.js";var i=t({name:`HighlightedPackageName`,props:{name:{type:String,required:!0}},setup(t){return()=>{let i=t.name;if(!r(i))return e(`span`,{class:`text-gray-500`},i);let a=n(i);if(i.startsWith(`@`)){let[t,n]=i.split(`/`);return[e(`span`,{style:`color: ${a}`},t),e(`span`,{style:`color: ${a}`,class:`op50`},`/`),e(`span`,{style:`color: ${a}`},n)]}return e(`span`,{style:`color: ${a}`},i)}}});export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as e,Q as t,at as n,q as r,st as i,w as a,x as o}from"./
|
|
1
|
+
import{M as e,Q as t,at as n,q as r,st as i,w as a,x as o}from"./DAfG6Q5x.js";var s={class:`px4`,flex:`~ col gap2`},c=Object.assign(e({__name:`Treemap`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:c}){let l=e,u=c,d=n(`el`);return i(()=>d.value?.append(l.graph.el)),(n,i)=>(r(),a(`div`,s,[t(n.$slots,`default`,{selected:e.selected,options:e.graph.options,onSelect:i[0]||=e=>u(`select`,e)},()=>[i[1]||=o(`div`,{border:`b base`,py2:``,"min-h-10":``},null,-1)]),o(`div`,{ref_key:`el`,ref:d},null,512)]))}}),{__name:`ChartTreemap`});export{c as t};
|