@vitejs/devtools-vite 0.0.0-alpha.1 → 0.0.0-alpha.10

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.
Files changed (89) hide show
  1. package/dist/{dirs-Z7VQHyIZ.js → dirs-K_XnRVOr.js} +1 -1
  2. package/dist/dirs.js +1 -1
  3. package/dist/index.d.ts +52 -24
  4. package/dist/index.js +107 -62
  5. package/dist/nitro.json +2 -2
  6. package/dist/public/200.html +1 -1
  7. package/dist/public/404.html +1 -1
  8. package/dist/public/_nuxt/17ealR8P.js +1 -0
  9. package/dist/public/_nuxt/2OALqkc2.js +1 -0
  10. package/dist/public/_nuxt/AuXMpmu_.js +1 -0
  11. package/dist/public/_nuxt/B-LCQpq9.js +2 -0
  12. package/dist/public/_nuxt/B-MkobAt.js +1 -0
  13. package/dist/public/_nuxt/BFwdTbGt.js +1 -0
  14. package/dist/public/_nuxt/BQPGP7j8.js +1 -0
  15. package/dist/public/_nuxt/BWDYSEh7.js +11 -0
  16. package/dist/public/_nuxt/B_mZ82Ef.js +1 -0
  17. package/dist/public/_nuxt/BkcJ9YuP.js +33 -0
  18. package/dist/public/_nuxt/Bs1eUuZt.js +1 -0
  19. package/dist/public/_nuxt/C2Zn9dj_.js +1 -0
  20. package/dist/public/_nuxt/CIZ7KSXz.js +1 -0
  21. package/dist/public/_nuxt/CbzAqNxs.js +1 -0
  22. package/dist/public/_nuxt/ChaI2u-J.js +1 -0
  23. package/dist/public/_nuxt/CmZYssbg.js +1 -0
  24. package/dist/public/_nuxt/Cnct9GAr.js +1 -0
  25. package/dist/public/_nuxt/Cq2KqeQT.js +1 -0
  26. package/dist/public/_nuxt/Cql2HFZJ.js +1 -0
  27. package/dist/public/_nuxt/D-ZnEyqr.js +1 -0
  28. package/dist/public/_nuxt/D2Zr4_9a.js +1 -0
  29. package/dist/public/_nuxt/D7AVRXB9.js +1 -0
  30. package/dist/public/_nuxt/{BQ-NBLhA.js → DL1ysgP5.js} +1 -1
  31. package/dist/public/_nuxt/DP5rIU2b.js +1 -0
  32. package/dist/public/_nuxt/DQtLZa7C.js +1 -0
  33. package/dist/public/_nuxt/DcamI1aQ.js +1 -0
  34. package/dist/public/_nuxt/HzvsUJ0F.js +1 -0
  35. package/dist/public/_nuxt/Jdu9jmuG.js +1 -0
  36. package/dist/public/_nuxt/{IrMnfQaU.js → LMGHh3hZ.js} +1 -1
  37. package/dist/public/_nuxt/{BdGMcGSQ.js → SO3ppn9m.js} +1 -1
  38. package/dist/public/_nuxt/X7aOo9pb.js +1 -0
  39. package/dist/public/_nuxt/_hSlj5r4.js +1 -0
  40. package/dist/public/_nuxt/builds/latest.json +1 -1
  41. package/dist/public/_nuxt/builds/meta/a75cfc75-2758-4449-8135-5151dc9f3c34.json +1 -0
  42. package/dist/public/_nuxt/diff.worker-DCsgdfuV.js +10 -0
  43. package/dist/public/_nuxt/entry.CxcRHwcK.css +1 -0
  44. package/dist/public/_nuxt/error-404.CCdr3eE4.css +1 -0
  45. package/dist/public/_nuxt/error-500.D-vBsHK_.css +1 -0
  46. package/dist/public/_nuxt/lxg2Cb0s.js +1 -0
  47. package/dist/public/_nuxt/mIZU4Om9.js +1 -0
  48. package/dist/public/_nuxt/qkzn-X0p.js +1 -0
  49. package/dist/public/_nuxt/vzoJapJG.js +1 -0
  50. package/dist/public/index.html +1 -1
  51. package/package.json +16 -16
  52. package/dist/public/_nuxt/B1Vd6rqS.js +0 -1
  53. package/dist/public/_nuxt/B2YLpys2.js +0 -1
  54. package/dist/public/_nuxt/B2fBtupD.js +0 -1
  55. package/dist/public/_nuxt/BBRXmiYk.js +0 -1
  56. package/dist/public/_nuxt/BL9XEsp7.js +0 -1
  57. package/dist/public/_nuxt/BO9hKuA-.js +0 -1
  58. package/dist/public/_nuxt/BcAccMwu.js +0 -1
  59. package/dist/public/_nuxt/BdSZoQls.js +0 -1
  60. package/dist/public/_nuxt/BjbaCuBE.js +0 -1
  61. package/dist/public/_nuxt/Bjr51Ks8.js +0 -1
  62. package/dist/public/_nuxt/BvuqupwD.js +0 -1
  63. package/dist/public/_nuxt/C2X_oPur.js +0 -1
  64. package/dist/public/_nuxt/C5J04JCq.js +0 -1
  65. package/dist/public/_nuxt/CQNn9qP2.js +0 -1
  66. package/dist/public/_nuxt/CS0-317H.js +0 -1
  67. package/dist/public/_nuxt/CciM0jEL.js +0 -1
  68. package/dist/public/_nuxt/CcwEApAr.js +0 -1
  69. package/dist/public/_nuxt/Ci9NHG69.js +0 -1
  70. package/dist/public/_nuxt/D1yk44lc.js +0 -1
  71. package/dist/public/_nuxt/DKn-LAPX.js +0 -11
  72. package/dist/public/_nuxt/DS2MKblJ.js +0 -1
  73. package/dist/public/_nuxt/DSjlpmm-.js +0 -1
  74. package/dist/public/_nuxt/DZeYNBxL.js +0 -1
  75. package/dist/public/_nuxt/D_Sk_I-u.js +0 -1
  76. package/dist/public/_nuxt/Dl8iHwQo.js +0 -2
  77. package/dist/public/_nuxt/Z5tyTJaP.js +0 -1
  78. package/dist/public/_nuxt/builds/meta/6f75d3aa-4cfc-4ed3-af3a-9078b8defb8f.json +0 -1
  79. package/dist/public/_nuxt/cRQbgMUp.js +0 -1
  80. package/dist/public/_nuxt/diff.worker-BXxwMoGc.js +0 -10
  81. package/dist/public/_nuxt/entry.Dufqy7qJ.css +0 -1
  82. package/dist/public/_nuxt/error-404.yUUAZDjV.css +0 -1
  83. package/dist/public/_nuxt/error-500.BHZzZRS-.css +0 -1
  84. package/dist/public/_nuxt/pXptjyzi.js +0 -1
  85. package/dist/public/_nuxt/rwBDQBzn.js +0 -1
  86. package/dist/public/_nuxt/tS5wJZMm.js +0 -1
  87. package/dist/public/_nuxt/yfNgynAH.js +0 -33
  88. package/dist/public/_nuxt/z9pSC1xM.js +0 -1
  89. /package/dist/public/_nuxt/{l47FwQA-.js → D03ETnho.js} +0 -0
@@ -0,0 +1 @@
1
+ import{At as e,Tt as t,ft as n,in as r,lt as i,mt as a,ot as o,tn as s,ut as c}from"#entry";var l=a({__name:`NumberBadge`,props:{number:{},color:{default:`badge-color-gray op75`},icon:{},prefix:{},suffix:{},format:{default:`locale`}},setup(a){let l=a,u=o(()=>l.format===`percent`?Number(l.number).toLocaleString(void 0,{style:`percent`,minimumFractionDigits:2,maximumFractionDigits:2}):Number(l.number).toLocaleString());return(o,l)=>(t(),c(`div`,{class:s([a.color,`px-0.4em py-0.2em font-mono line-height-none flex items-center`])},[a.icon?(t(),c(`div`,{key:0,class:s([a.icon,`mr-1`])},null,2)):i(``,!0),n(` `+r(a.prefix||``)+r(u.value)+r(a.suffix||``)+` `,1),e(o.$slots,`after`)],2))}}),u=Object.assign(l,{__name:`DisplayNumberBadge`});export{u as t};
@@ -0,0 +1 @@
1
+ import{E as e,Tt as t,Vt as n,W as r,c as i,ct as a,en as o,in as s,it as c,kt as l,lt as u,mt as d,pt as f,st as p,ut as m,x as h,y as g}from"#entry";import"./Jdu9jmuG.js";import"./B_mZ82Ef.js";import"./2OALqkc2.js";import{r as _,t as v}from"./DL1ysgP5.js";import{t as y}from"./CbzAqNxs.js";import{t as b}from"./CIZ7KSXz.js";var x={key:0},S={key:2},C={op50:``},w={key:3},T=[`textContent`],E=[`textContent`],D=d({__name:`RawEventsTable`,props:{events:{},fields:{default:()=>[`event_id`,`action`,`module_id`,`plugin_name`,`timestamp`,`content`,`*`]},session:{}},setup(r){let i=r;function d(e,t){let n=new Set(t);return n.has(`content`)&&n.add(`content`),n.has(`plugin_name`)&&n.add(`plugin_index`),Object.fromEntries(Object.entries(e).filter(([e])=>!n.has(e)))}function h(e){return e.action===`HookLoadCallEnd`||e.action===`HookTransformCallStart`||e.action===`HookTransformCallEnd`?e.content:null}return(g,D)=>{let O=v,k=_,A=b,j=y;return t(),m(c,null,[r.events.length?u(``,!0):(t(),m(`div`,x,[...D[0]||=[p(`div`,{p5:``,italic:``},` No events found `,-1)]])),p(`table`,null,[p(`tbody`,null,[(t(!0),m(c,null,l(i.events,g=>(t(),m(`tr`,{key:g.event_id},[(t(!0),m(c,null,l(i.fields,i=>(t(),m(`td`,{key:i,px2:``},[i===`module_id`?(t(),a(O,{key:0,id:`module_id`in g?g.module_id:``,session:r.session},null,8,[`id`,`session`])):i===`action`?(t(),a(k,{key:1,text:g.action},null,8,[`text`])):i===`plugin_name`&&`plugin_name`in g?(t(),m(`div`,S,[f(A,{"font-mono":``,name:g.plugin_name},null,8,[`name`]),p(`code`,C,`#`+s(g.plugin_id),1)])):i===`event_id`?(t(),m(`div`,w,s(g.event_id),1)):i===`content`&&h(g)?(t(),a(o(e),{key:4},{popper:n(()=>[p(`pre`,{p1:``,"text-sm":``,textContent:s(h(g))},null,8,T)]),default:n(()=>[D[1]||=p(`div`,{"i-ph-code":``},null,-1)]),_:2},1024)):i===`timestamp`&&`timestamp`in g?(t(),a(j,{key:5,"text-sm":``,timestamp:g.timestamp},null,8,[`timestamp`])):i===`*`?(t(),m(`pre`,{key:6,"text-sm":``,textContent:s(d(g,r.fields))},null,8,E)):u(``,!0)]))),128))]))),128))])])],64)}}}),O=Object.assign(D,{__name:`DataRawEventsTable`}),k={key:1},A=d({__name:`raw`,props:{session:{}},setup(e){let n=e,s=g(),l=r().query,d=i(async()=>await s.value[`vite:rolldown:get-module-raw-events`]?.({session:n.session.id,module:l.module}),{events:[]});return(n,r)=>{let i=h,s=O;return t(),m(c,null,[o(d).isLoading?(t(),a(i,{key:0})):u(``,!0),p(`div`,null,[o(d).isReady?(t(),a(s,{key:0,events:o(d).state.value.events,session:e.session},null,8,[`events`,`session`])):(t(),m(`div`,k,[f(i)]))])],64)}}});export{A as default};
@@ -0,0 +1 @@
1
+ import{Nt as e,Tt as t,_t as n,ct as r,mt as i}from"#entry";import{r as a}from"./B_mZ82Ef.js";var o=i({__name:`PluginName`,props:{name:{},compact:{type:Boolean},colored:{type:Boolean},hide:{type:Boolean}},setup(i){let o=i,s=[`__load__`,`vite-plugin-`,`vite-`,`rollup-plugin-`,`rollup-`,`unplugin-`],c=[...s,`vite:`];function l(){let e=o.compact?c:s;for(let t of e)if(o.name.startsWith(t))return o.compact?n(`span`,o.name.slice(t.length)):n(`span`,[n(`span`,{class:`op50`},t),n(`span`,o.name.slice(t.length))]);let t=o.name.split(`:`);return t.length>1?n(`span`,[n(`span`,{style:{color:a(t[0])}},`${t[0]}:`),n(`span`,t.slice(1).join(`:`))]):n(`span`,o.name)}return(n,i)=>(t(),r(e(l)))}}),s=Object.assign(o,{__name:`DisplayPluginName`});export{s as t};
@@ -0,0 +1 @@
1
+ import{Tt as e,en as t,i as n,in as r,lt as i,mt as a,ut as o}from"#entry";var s={key:0,"font-mono":``},c=a({__name:`Timestamp`,props:{timestamp:{}},setup(a){let c=a;return(l,u)=>a.timestamp?(e(),o(`span`,s,r(t(n)(new Date(c.timestamp))),1)):i(``,!0)}}),l=Object.assign(c,{__name:`DisplayTimestamp`});export{l as t};
@@ -0,0 +1 @@
1
+ import{Kt as e,Rt as t,Zt as n,ot as r,qt as i}from"#entry";var a=0,o=i(new Map);const s=r(()=>Array.from(o.values()).flat());function c(r){let i=n(r),s=()=>{};function c(e){s();let t=a++;return o.set(t,e),s=()=>{o.delete(t)},t}return t(i,e=>{c(e)},{immediate:!0}),e(()=>{s()}),()=>{s()}}export{c as n,s as t};
@@ -0,0 +1 @@
1
+ import{Tt as e,Vt as t,ct as n,en as r,ft as i,in as a,it as o,kt as s,lt as c,mt as l,ot as u,pt as d,st as f,tn as p,ut as m}from"#entry";import{t as h}from"./Jdu9jmuG.js";import"./DQtLZa7C.js";import"./B_mZ82Ef.js";import"./2OALqkc2.js";import{r as g,t as _}from"./DL1ysgP5.js";import{t as v}from"./ChaI2u-J.js";import{t as y}from"./X7aOo9pb.js";import{t as b}from"./Bs1eUuZt.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":``},T=[`datetime`],E={key:4},D={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_1fr] gap-2 items-center`},O={flex:`~ gap-2`},k=l({__name:`index`,props:{session:{}},setup(l){let k=l,A=u(()=>[{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(u,j)=>{let M=h,N=g,P=y,F=b,I=_;return e(),m(`div`,x,[f(`div`,S,[d(M,{"btn-action":``,to:{path:`/`}},{default:t(()=>[...j[0]||=[f(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),i(` Re-select Session `,-1)]]),_:1})]),j[1]||=f(`div`,{op50:``,"mt-10":``},` Meta Info `,-1),f(`div`,C,[(e(!0),m(o,null,s(A.value,t=>(e(),m(o,{key:t.title},[f(`div`,{class:p(t.icon)},null,2),f(`div`,null,a(t.title),1),f(`div`,w,[t.value instanceof Date?(e(),m(`time`,{key:0,datetime:t.value.toISOString()},a(t.value.toLocaleString()),9,T)):t.type===`badge`?(e(),n(N,{key:1,text:String(t.value),py1:``},null,8,[`text`])):t.type===`duration`?(e(),n(P,{key:2,duration:+t.value},null,8,[`duration`])):typeof t.value==`number`?(e(),n(F,{key:3,number:t.value,py1:``,"rounded-full":``,"inline-block":``,"text-sm":``},null,8,[`number`])):(e(),m(`span`,E,a(t.value),1))])],64))),128))]),j[2]||=f(`div`,{op50:``,"mt-4":``},` Build Entries `,-1),f(`div`,D,[(e(!0),m(o,null,s(k.session.meta.inputs,t=>(e(),m(o,{key:t},[d(N,{text:t.name||``},null,8,[`text`]),d(I,{id:t.filename||``,session:l.session,link:!0},null,8,[`id`,`session`])],64))),128))]),j[3]||=f(`div`,{op50:``,"mt-4":``},` Views `,-1),f(`div`,O,[(e(!0),m(o,null,s(r(v),r=>(e(),m(o,{key:r.to},[r.category===`session`?(e(),n(M,{key:0,"btn-action":``,to:{path:r.to},flex:`~ col`,"min-w-40":``,p4:``},{default:t(()=>[f(`div`,{class:p(r.icon),"text-2xl":``},null,2),i(` `+a(r.title),1)]),_:2},1032,[`to`])):c(``,!0)],64))),128))])])}}});export{k as default};
@@ -0,0 +1 @@
1
+ import{Ft as e,Nt as t,Tt as n,Vt as r,W as i,ct as a,en as o,it as s,kt as c,lt as l,mt as u,pt as d,rn as f,st as p,tn as m,ut as h,yt as g}from"#entry";import{t as _}from"./Jdu9jmuG.js";import{n as v,t as y}from"./2OALqkc2.js";var b=[`open`],x={"font-mono":``},S={"font-mono":``},C=u({__name:`TreeNode`,props:g({node:{},icon:{default:`i-catppuccin:folder icon-catppuccin`},iconOpen:{default:`i-catppuccin:folder-open icon-catppuccin`},link:{type:[String,Boolean]},linkQueryKey:{default:`module`},padding:{default:0},open:{type:Boolean}},{open:{type:Boolean,required:!1,default:!0},openModifiers:{}}),emits:g([`select`],[`update:open`]),setup(u,{emit:g}){let C=u,T=g,E=e(u,`open`),D=i(),O=window.location;function k(e){C.link||T(`select`,e)}return(e,i)=>{let g=y,C=w,T=v;return n(),h(`details`,{open:E.value,onToggle:i[0]||=e=>E.value=e.target?.open},[p(`summary`,{"cursor-default":``,"select-none":``,"text-sm":``,truncate:``,style:f({paddingLeft:`${u.padding+.5}rem`}),flex:`~ gap-1`,px2:``,py1:``,rounded:``,hover:`bg-active `},[p(`div`,{class:m([`i-ph-caret-right-duotone transition op50`,E.value?`rotate-90`:``])},null,2),p(`div`,{class:m(E.value&&u.iconOpen||u.icon),"inline-block":``,"vertical-text-bottom":``},null,2),p(`div`,x,[d(g,{path:u.node.name||``},null,8,[`path`])])],4),E.value?(n(),h(s,{key:0},[(n(!0),h(s,null,c(Object.entries(u.node.children),e=>(n(),a(C,{key:e[0],node:e[1],link:u.link,padding:u.padding+1,"link-query-key":u.linkQueryKey,onSelect:k},null,8,[`node`,`link`,`padding`,`link-query-key`]))),128)),(n(!0),h(s,null,c(u.node.items,e=>(n(),a(t(u.link?o(_):`div`),{key:e.full,to:u.link?typeof u.link==`string`?u.link:{path:o(D).path,query:{...o(D).query,[u.linkQueryKey]:e.full},hash:o(O).hash}:void 0,"text-sm":``,"ws-nowrap":``,flex:`~ gap-1`,px2:``,py1:``,rounded:``,hover:`bg-active`,style:f({paddingLeft:`${u.padding+2.7}rem`}),onClick:t=>k(e)},{default:r(()=>[d(T,{filename:e.full},null,8,[`filename`]),p(`div`,S,[d(g,{path:e.path.split(`/`).pop()||``},null,8,[`path`])])]),_:2},1032,[`to`,`style`,`onClick`]))),128))],64)):l(``,!0)],40,b)}}}),w=Object.assign(C,{__name:`DisplayTreeNode`});export{w as t};
@@ -0,0 +1 @@
1
+ import{At as e,Lt as t,Tt as n,mt as r,st as i,ut as a,zt as o}from"#entry";var s={class:`px4`,flex:`~ col gap2`},c=r({__name:`Treemap`,props:{graph:{},selected:{}},emits:[`select`],setup(r,{emit:c}){let l=r,u=c,d=t(`el`);return o(()=>d.value?.append(l.graph.el)),(t,o)=>(n(),a(`div`,s,[e(t.$slots,`default`,{selected:r.selected,options:r.graph.options,onSelect:o[0]||=e=>u(`select`,e)},()=>[o[1]||=i(`div`,{border:`b base`,py2:``,"min-h-10":``},null,-1)]),i(`div`,{ref_key:`el`,ref:d},null,512)]))}}),l=Object.assign(c,{__name:`ChartTreemap`});export{l as t};
@@ -0,0 +1 @@
1
+ import{At as e,Tt as t,d as n,ft as r,in as i,lt as a,mt as o,ot as s,st as c,tn as l,ut as u}from"#entry";import{t as d}from"./DQtLZa7C.js";var f={"text-xs":``,op75:``,"ml-0.4":``},p={key:0,"text-xs":``,ml1:``,"op-fade":``,border:`l base`,pl1:``},m=1024,h=o({__name:`FileSizeBadge`,props:{bytes:{},colorize:{type:Boolean,default:!0},digits:{default:2},percent:{type:Boolean,default:!0},total:{},icon:{},percentRatio:{default:.5}},setup(n){let o=n,h=m**2,g=[[80*m,`color-scale-neutral`],[500*m,`color-scale-low`],[1*h,`color-scale-medium`],[10*h,`color-scale-high`],[20*h,`color-scale-critical`]],_=s(()=>{if(!o.colorize)return g[0];let e=o.bytes||0;for(let[t,n]of g)if(e<t)return n;return g[g.length-1]?.[1]}),v=s(()=>o.total?(o.bytes||0)*100/o.total:0),y=s(()=>d(o.bytes||0,o.digits));return(o,s)=>n.bytes?(t(),u(`div`,{key:0,class:l([_.value,`px-0.4em py-0.2em font-mono line-height-none bg-gray:5 dark:bg-gray:4 flex items-center`])},[n.icon?(t(),u(`div`,{key:0,class:l([n.icon,`mr-1`])},null,2)):a(``,!0),r(` `+i(y.value[0]),1),c(`span`,f,i(y.value[1]),1),e(o.$slots,`after`,{},()=>[n.percent&&v.value>n.percentRatio?(t(),u(`span`,p,i(+v.value.toFixed(1))+`%`,1)):a(``,!0)])],2)):a(``,!0)}}),g=Object.assign(h,{__name:`DisplayFileSizeBadge`});const _=n(`vite-devtools-settings`,{codeviewerLineWrap:!1,codeviewerDiffPanelSize:50,flowExpandResolveId:!0,flowExpandTransforms:!0,flowExpandLoads:!0,flowExpandChunks:!0,flowExpandAssets:!0,flowShowAllTransforms:!1,flowShowAllLoads:!1,moduleGraphViewType:`list`,assetViewType:`list`,chartAnimation:!0,moduleDetailsViewType:`flow`,pluginDetailsViewType:`flow`,pluginDetailsTableFields:null,pluginDetailsModuleTypes:null,pluginDetailsDurationSortType:``,pluginDetailSelectedHook:``,chunkViewType:`list`,pluginDetailsShowType:`all`,packageViewType:`table`,packageSizeSortType:``},{mergeDefaults:!0});function v(e){let t=new Map;return new Proxy(e.value,{get(e,n){return t.has(n)||t.set(n,s({get(){return e[n]},set(t){e[n]=t}})),t.get(n)}})}const y=v(_);export{y as n,g as r,_ as t};
@@ -0,0 +1 @@
1
+ import{C as e,Tt as t,V as n,Vt as r,ft as i,in as a,pt as o,st as s,ut as c}from"#entry";import{t as l}from"./Jdu9jmuG.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=e({__name:`error-404`,props:{appName:{type:String,default:`Nuxt`},statusCode:{type:Number,default:404},statusMessage:{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(e){let g=e;return n({title:`${g.statusCode} - ${g.statusMessage} | ${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: }`}]}),(n,g)=>{let _=l;return t(),c(`div`,u,[s(`div`,d,[s(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:a(e.statusCode)},null,8,f),s(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:a(e.statusMessage)},null,8,p),s(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:a(e.description)},null,8,m),s(`div`,h,[o(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:r(()=>[i(a(e.backHome),1)]),_:1})])])])}}},[[`__scopeId`,`data-v-03ce26ec`]]);export{g as default};
@@ -0,0 +1 @@
1
+ import{G as e,Ht as t,Jt as n,Lt as r,Mt as i,Rt as a,Tt as o,Vt as s,W as c,c as l,ct as u,en as d,ft as f,g as p,in as m,it as h,kt as g,lt as _,mt as v,ot as y,p as b,pt as x,qt as S,rn as C,st as w,tn as T,ut as E,x as D,y as O,zt as k}from"#entry";import{t as A}from"./Jdu9jmuG.js";import{i as j}from"./DQtLZa7C.js";import"./B_mZ82Ef.js";import{n as M}from"./2OALqkc2.js";import{r as N,t as P}from"./Cql2HFZJ.js";import{a as ee,c as te,i as F,n as I,o as L,r as R,t as z}from"./BFwdTbGt.js";import{n as B,t as V}from"./B-LCQpq9.js";import{t as H}from"./Cnct9GAr.js";import{t as ne}from"./lxg2Cb0s.js";import{t as re}from"./Cq2KqeQT.js";var U={flex:`~ gap-1`},W={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},G=v({__name:`ListItem`,props:{asset:{}},setup(e){return(t,n)=>{let r=M,i=A;return o(),u(i,{to:{query:{asset:e.asset.filename}},"w-full":``,"font-mono":``,border:`~ rounded base`,px2:``,py1:``,"text-sm":``,hover:`bg-active`},{default:s(()=>[w(`div`,U,[x(r,{filename:e.asset.filename},null,8,[`filename`]),w(`span`,W,m(e.asset.filename),1)])]),_:1},8,[`to`])}}}),K=Object.assign(G,{__name:`AssetsListItem`}),q={p4:``},J={flex:``,pb2:``},Y=v({__name:`List`,props:{assets:{}},setup(e){return(t,n)=>{let r=K,i=V;return o(),E(`div`,q,[x(i,{items:e.assets,"key-prop":`filename`},{default:s(({item:e})=>[w(`div`,J,[x(r,{asset:e},null,8,[`asset`])])]),_:1},8,[`items`])])}}}),X=Object.assign(Y,{__name:`AssetsList`}),Z={flex:`~ gap-2`,p4:``},Q=v({__name:`Folder`,props:{assets:{},session:{}},setup(e){let t=e,n=y(()=>{let e=[];return t.assets.forEach(t=>{e.push({full:t.filename,path:t.filename})}),j(e,`Project`)});return(t,r)=>{let i=H;return o(),E(`div`,Z,[e.assets?.length?(o(),u(i,{key:0,"flex-1":``,node:n.value,icon:`i-catppuccin:folder-dist catppuccin`,"icon-open":`i-catppuccin:folder-dist-open catppuccin`,link:!0,"link-query-key":`asset`},null,8,[`node`])):_(``,!0)])}}}),ie=Object.assign(Q,{__name:`AssetsFolder`}),ae={grid:`~ cols-[max-content_1fr] gap-2`,p4:``},oe={flex:`~ col gap-4`},se={key:0,grid:`~ cols-[250px_1fr] gap-1`},ce=[`onClick`],le={key:0,"text-primary":``},ue={key:1},de=[`onClick`],fe=[`title`],pe=v({__name:`Sunburst`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:n}){let a=e,s=n,c=r(`el`);return k(()=>c.value?.append(a.graph.el)),(n,r)=>{let a=I,l=N,u=i(`tooltip`);return o(),E(`div`,ae,[w(`div`,{ref_key:`el`,ref:c,"w-500px":``},null,512),w(`div`,oe,[x(a,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:r[0]||=e=>s(`select`,e)},null,8,[`selected`,`options`]),e.selected?(o(),E(`div`,se,[(o(!0),E(h,null,g(e.selected.children,n=>(o(),E(h,{key:n.id},[w(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>s(`select`,n)},[n.meta&&n.meta===e.selected?.meta?(o(),E(`span`,le,`(self)`)):(o(),E(`span`,ue,m(n.id),1))],8,ce),w(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>s(`select`,n)},[w(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:C({background:d(L)(e.graph.options.getColor?.(n)||`#000`),width:`${n.size/e.selected.size*100}%`})},null,4),x(l,{"text-xs":``,bytes:n.size,total:e.selected.size,"percent-ratio":3},null,8,[`bytes`,`total`]),n.children.length>0?t((o(),E(`div`,{key:0,title:`${n.children.length} dependencies`,"text-xs":``,"op-fade":``},[f(` (`+m(n.children.length)+`) `,1)],8,fe)),[[u,`${n.children.length} dependencies`]]):_(``,!0)],8,de)],64))),128))])):_(``,!0)])])}}}),me=Object.assign(pe,{__name:`AssetsSunburst`}),he=v({__name:`Flamegraph`,props:{graph:{}},setup(e){let t=e,n=r(`el`);return k(()=>n.value?.append(t.graph.el)),(e,t)=>(o(),E(`div`,{ref_key:`el`,ref:n},null,512))}}),ge=Object.assign(he,{__name:`AssetsFlamegraph`}),_e={key:1,relative:``,"max-h-screen":``,"of-hidden":``},ve={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},ye={flex:`~ gap-2 items-center`,p2:``,border:`t base`},be=[`onClick`],xe={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt32:``},$={absolute:``,"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={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},we={flex:`~ gap-1 items-center`},Te={flex:`~ gap-1 items-center`},Ee=v({__name:`assets`,props:{session:{}},setup(t){let r=t,i=S(b()),v=n({search:``}),C=e(),k=c(),A=[{label:`List`,value:`list`,icon:`i-ph-list-duotone`},{label:`Folder`,value:`folder`,icon:`i-ph-folder-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`}],j=O(),{state:M,isLoading:L}=l(async()=>await j.value[`vite:rolldown:get-assets-list`]?.({session:r.session.id}),null),V=p(()=>M.value,()=>new ne(M.value,{includeScore:!0,keys:[`filename`],ignoreLocation:!0,threshold:.4})),H=y(()=>v.value.search?V.value.search(v.value.search).map(e=>e.item):M.value);function U(e){P.value.assetViewType=e}let{tree:W,chartOptions:G,graph:K,nodeHover:q,nodeSelected:J,selectedNode:Y,selectNode:Z,buildGraph:Q}=z({data:H,nameKey:`filename`,sizeKey:`size`,rootText:`Project`,nodeType:`file`,graphOptions:{onClick(e){e&&(q.value=e),e.meta?.type===`file`&&(Y.value=e.meta,C.replace({query:{asset:e.meta.filename}}))},onHover(e){e&&!k.query.asset&&(q.value=e),e===null&&(q.value=void 0)},onLeave(){q.value=void 0},onSelect(e){J.value=e||W.value.root,Y.value=e?.meta}},onUpdate(){switch(P.value.assetViewType){case`sunburst`:K.value=new F(W.value.root,G.value);break;case`treemap`:K.value=new ee(W.value.root,{...G.value,selectedPaddingRatio:0});break;default:K.value=new R(W.value.root,G.value)}}});return a(()=>P.value.assetViewType,()=>{Q()}),(e,n)=>{let r=D,a=B,c=X,l=ie,p=I,y=me,b=ge,S=N,C=te;return d(L)?(o(),u(r,{key:0})):(o(),E(`div`,_e,[w(`div`,ve,[x(a,{modelValue:v.value,"onUpdate:modelValue":n[0]||=e=>v.value=e,rules:[]},{default:s(()=>[w(`div`,ye,[n[3]||=w(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(o(),E(h,null,g(A,e=>w(`button`,{key:e.value,"btn-action":``,class:T(d(P).assetViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>U(e.value)},[w(`div`,{class:T(e.icon)},null,2),f(` `+m(e.label),1)],10,be)),64))])]),_:1},8,[`modelValue`])]),w(`div`,xe,[d(P).assetViewType===`list`?(o(),E(h,{key:0},[H.value?.length?(o(),u(c,{key:0,assets:H.value,session:t.session},null,8,[`assets`,`session`])):_(``,!0),w(`div`,$,[w(`span`,Se,m(H.value.length)+` of `+m(d(M)?.length||0),1)])],64)):d(P).assetViewType===`folder`?(o(),E(h,{key:1},[H.value?.length?(o(),u(l,{key:0,assets:H.value,session:t.session},null,8,[`assets`,`session`])):_(``,!0)],64)):d(P).assetViewType===`treemap`?(o(),E(h,{key:2},[d(K)?(o(),u(re,{key:0,graph:d(K),selected:d(J),onSelect:n[1]||=e=>d(Z)(e)},{default:s(({selected:e,options:t,onSelect:n})=>[x(p,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:t,onSelect:n},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):_(``,!0)],64)):d(P).assetViewType===`sunburst`?(o(),E(h,{key:3},[d(K)?(o(),u(y,{key:0,graph:d(K),selected:d(J),onSelect:n[2]||=e=>d(Z)(e)},null,8,[`graph`,`selected`])):_(``,!0)],64)):d(P).assetViewType===`flamegraph`?(o(),E(h,{key:4},[d(K)?(o(),u(b,{key:0,graph:d(K)},null,8,[`graph`])):_(``,!0)],64)):_(``,!0)]),x(C,{"hover-x":i.x,"hover-y":i.y},{default:s(()=>[d(q)?.meta?(o(),E(`div`,Ce,[w(`div`,we,m(d(q).text),1),w(`div`,Te,[x(S,{bytes:d(q).size,percent:!1},null,8,[`bytes`])])])):_(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{Ee as default};
@@ -0,0 +1 @@
1
+ import{At as e,Ft as t,Tt as n,Vt as r,W as i,c as a,ct as o,en as s,ft as c,in as l,it as u,kt as d,lt as f,mt as p,ot as m,pt as h,st as g,ut as _,x as v,y,yt as b}from"#entry";import{t as x}from"./Jdu9jmuG.js";import{r as S,t as C}from"./DL1ysgP5.js";import{r as w}from"./Cql2HFZJ.js";import{t as T}from"./Bs1eUuZt.js";var E={relative:``},D={key:0,"pointer-events-none":``,absolute:``,"left-0":``,"right-0":``,"bottom-0":``,"bg-gradient-more":``,"h-30":``,flex:`~ justify-center`},O=p({__name:`ExpandableContainer`,props:b({list:{}},{count:{default:20},countModifiers:{}}),emits:[`update:count`],setup(r){let i=r,a=t(r,`count`),o=a.value,c=m(()=>i.list.slice(0,a.value));return(t,l)=>{let u=T;return n(),_(`div`,E,[e(t.$slots,`default`,{items:c.value}),r.list.length>a.value?(n(),_(`div`,D,[g(`button`,{op35:``,p2:``,pt4:``,mta:``,"pointer-events-auto":``,"hover:op100":``,flex:`~ items-center gap-1 justify-center`,onClick:l[0]||=e=>a.value=Math.round(a.value+s(o))},[l[2]||=g(`div`,{"i-ri:arrow-down-double-line":``},null,-1),l[3]||=g(`span`,null,`More`,-1),h(u,{prefix:`+`,number:Math.min(Math.round(s(o)),i.list.length-a.value),"rounded-full":``,"text-sm":``},null,8,[`number`])]),g(`button`,{op35:``,p2:``,pt4:``,mta:``,"pointer-events-auto":``,"hover:op100":``,flex:`~ items-center gap-1 justify-center`,onClick:l[1]||=e=>a.value=i.list.length},[l[4]||=g(`div`,{"i-ph-arrows-out-line-vertical-duotone":``},null,-1),l[5]||=g(`span`,null,`All`,-1),h(u,{number:i.list.length,"rounded-full":``,"text-sm":``},null,8,[`number`])])])):f(``,!0)])}}}),k=Object.assign(O,{__name:`DisplayExpandableContainer`}),A=[`title`],j={key:0,"i-ph-file-duotone":``},M={key:1,"i-ph-lightning-duotone":``},N={"text-sm":``,flex:`~ items-center gap-2`},P={op50:``,"font-mono":``},F={flex:`~ gap-1 items-center`},I={flex:`~ gap-1 items-center`},L=p({__name:`ImportItem`,props:{chunk:{}},setup(e){let t=i();return(i,a)=>{let u=S,d=x;return e.chunk?(n(),o(d,{key:0,flex:`~ items-center`,to:{path:s(t).path,query:{chunk:e.chunk.chunk_id}}},{default:r(()=>[g(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.chunk.chunk_id}`},[e.chunk.kind===`import-statement`?(n(),_(`div`,j)):f(``,!0),e.chunk.kind===`dynamic-import`?(n(),_(`div`,M)):f(``,!0),g(`div`,null,l(e.chunk.name||`[unnamed]`),1),h(u,{text:e.chunk.reason},null,8,[`text`]),h(u,{text:e.chunk.kind},null,8,[`text`])],8,A),a[2]||=g(`div`,{"flex-auto":``},null,-1),g(`div`,N,[g(`span`,P,`#`+l(e.chunk.chunk_id),1),g(`div`,F,[a[0]||=g(`div`,{"i-ph-file-arrow-up-duotone":``},null,-1),c(` `+l(e.chunk.imports),1)]),g(`div`,I,[a[1]||=g(`div`,{"i-ph-package-duotone":``},null,-1),c(` `+l(e.chunk.modules),1)])])]),_:1},8,[`to`])):f(``,!0)}}}),R=Object.assign(L,{__name:`ChunksImportItem`}),z=p({__name:`Imports`,props:{imports:{}},setup(e){return(t,i)=>{let a=R,s=k;return n(),o(s,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:e.imports},{default:r(({items:e})=>[(n(!0),_(u,null,d(e,(e,t)=>(n(),o(a,{key:t,chunk:e,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},null,8,[`chunk`]))),128))]),_:1},8,[`list`])}}}),B=Object.assign(z,{__name:`ChunksImports`}),V={flex:`~ col gap-3`},H={flex:`~ gap-3 items-center`},U=[`title`],W={op50:``,"font-mono":``},G={flex:`~ gap-1 items-center`},K={flex:`~ gap-1 items-center`},q={key:0,open:`true`},J={op50:``},Y={key:0,open:`true`},X={op50:``},Z={key:1,open:`true`},Q={op50:``},$=p({__name:`ChunkDetails`,props:{chunk:{},session:{},showModules:{type:Boolean,default:!0},showImports:{type:Boolean,default:!0},chunks:{}},setup(t){let i=t,p=m(()=>{let e=new Map;for(let t of i.session.modulesList)e.set(t.id,t);return e}),b=m(()=>i.chunk.modules.reduce((e,t)=>{let n=p.value.get(t)?.buildMetrics?.transforms;return n?.length?e+n[n.length-1].transformed_code_size:e},0)),x=y(),{state:T,isLoading:E}=a(async()=>{if(!i.chunks)return await x.value[`vite:rolldown:get-chunks-graph`]?.({session:i.session.id})},null),D=m(()=>i.chunks||T.value),O=m(()=>i.chunk.imports.map(e=>{let t=D.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}})),A=m(()=>D.value?.filter(e=>e.imports.some(e=>e.chunk_id===i.chunk.chunk_id)).map(e=>({...e.imports.find(e=>e.chunk_id===i.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(i,a)=>{let p=S,m=w,y=C,x=k,T=v,D=B;return n(),_(`div`,V,[g(`div`,H,[g(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${t.chunk.chunk_id}`},[a[0]||=g(`div`,{"i-ph-shapes-duotone":``},null,-1),g(`div`,null,l(t.chunk.name||`[unnamed]`),1),h(p,{text:t.chunk.reason},null,8,[`text`]),h(m,{bytes:b.value,"text-sm":``},null,8,[`bytes`])],8,U),a[3]||=g(`div`,{"flex-auto":``},null,-1),g(`span`,W,`#`+l(t.chunk.chunk_id),1),g(`div`,G,[a[1]||=g(`div`,{"i-ph-file-arrow-up-duotone":``},null,-1),c(` `+l(t.chunk.imports.length),1)]),g(`div`,K,[a[2]||=g(`div`,{"i-ph-package-duotone":``},null,-1),c(` `+l(t.chunk.modules.length),1)]),e(i.$slots,`default`)]),t.showModules?(n(),_(`details`,q,[g(`summary`,J,[g(`span`,null,`Modules (`+l(t.chunk.modules.length)+`)`,1)]),h(x,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:t.chunk.modules},{default:r(({items:e})=>[(n(!0),_(u,null,d(e,e=>(n(),o(y,{id:e,key:e,session:t.session,link:!0,minimal:!0,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},null,8,[`id`,`session`]))),128))]),_:1},8,[`list`])])):f(``,!0),s(E)?(n(),o(T,{key:1})):t.showImports?(n(),_(u,{key:2},[t.chunk.imports.length?(n(),_(`details`,Y,[g(`summary`,X,[g(`span`,null,`Imports (`+l(t.chunk.imports.length)+`)`,1)]),h(D,{imports:O.value},null,8,[`imports`])])):f(``,!0),A.value.length?(n(),_(`details`,Z,[g(`summary`,Q,[g(`span`,null,`Importers (`+l(A.value.length)+`)`,1)]),h(D,{imports:A.value},null,8,[`imports`])])):f(``,!0)],64)):f(``,!0)])}}}),ee=Object.assign($,{__name:`DataChunkDetails`});export{k as n,ee as t};
@@ -1 +1 @@
1
- import{It as e,X as t,bt as n,ft as r,gt as i,ht as a,j as o,jt as s,ln as c,mt as l,on as u,pt as d,qt as f,sn as p,un as m,yt as h,zt as g}from"#entry";import{t as _}from"./Bjr51Ks8.js";import{n as v,t as y}from"./CQNn9qP2.js";import{n as b,t as x}from"./BO9hKuA-.js";var S=[`textContent`],C=n({__name:`Badge`,props:{text:{},color:{type:[Boolean,Number],default:!0},as:{},size:{}},setup(t){let n=t,i=r(()=>!n.text||n.color===!1?{}:{color:typeof n.color==`number`?v(n.color):y(n.text),background:typeof n.color==`number`?v(n.color,.1):y(n.text,.1)}),a=r(()=>{switch(n.size||`sm`){case`sm`:return`px-1.5 text-11px leading-1.6em`}return``});return(r,o)=>(s(),l(g(t.as||`span`),{"ws-nowrap":``,rounded:``,class:p(a.value),style:c(i.value)},{default:f(()=>[e(r.$slots,`default`,{},()=>[d(`span`,{textContent:m(n.text)},null,8,S)])]),_:3},8,[`class`,`style`]))}}),w=Object.assign(C,{__name:`DisplayBadge`}),T=/^[A-Za-z]:\//;function E(e=``){return e&&e.replace(/\\/g,`/`).replace(T,e=>e.toUpperCase())}var D=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,O=/^\/([A-Za-z]:)?$/;function k(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}var A=function(...e){e=e.map(e=>E(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:k();!i||i.length===0||(t=`${i}/${t}`,n=M(i))}return t=j(t,!n),n&&!M(t)?`/${t}`:t.length>0?t:`.`};function j(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}var M=function(e){return D.test(e)},N=function(e,t){let n=A(e).replace(O,`$1`).split(`/`),r=A(t).replace(O,`$1`).split(`/`);if(r[0][1]===`:`&&n[0][1]===`:`&&n[0]!==r[0])return r.join(`/`);let i=[...n];for(let e of i){if(r[0]!==e)break;n.shift(),r.shift()}return[...n.map(()=>`..`),...r].join(`/`)},P={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},F={"font-mono":``,"text-sm":``},I=n({__name:`ModuleId`,props:{id:{},badges:{type:Boolean},icon:{type:Boolean,default:!0},link:{type:[Boolean,String]},minimal:{type:Boolean},kind:{},session:{},cwd:{},disableTooltip:{type:Boolean,default:!1}},setup(n){let c=n,v=t(),y=window.location,S=r(()=>{if(!c.id)return``;let e=c.id.replace(/%2F/g,`/`),t=c.cwd||c.session.meta.cwd,n=t?N(t,e):e;return n.startsWith(`.`)||(n=`./${n}`),n.startsWith(`./`)||n.match(/^(?:\.\.\/){1,3}[^.]/)?n:e}),C=r(()=>`flex items-center`);return(t,r)=>{let T=b,E=x,D=w;return s(),l(g(n.link?u(_):`div`),{to:n.link?typeof n.link==`string`?n.link:{path:u(v).path,query:{...u(v).query,module:n.id,chunk:void 0},hash:u(y).hash}:void 0},{default:f(()=>[h(u(o),{"my-auto":``,"text-sm":``,"font-mono":``,block:``,"w-full":``,triggers:[`hover`],delay:1200,disabled:n.disableTooltip||(c.id?.length||0)<30,placement:`bottom-start`},{popper:f(()=>[d(`span`,F,m(c.id),1)]),default:f(()=>[n.id?(s(),i(`div`,{key:0,class:p(C.value)},[n.icon?(s(),l(T,{key:0,filename:n.id,"mr1.5":``},null,8,[`filename`])):a(``,!0),d(`span`,P,[h(E,{path:S.value,minimal:n.minimal},null,8,[`path`,`minimal`])]),e(t.$slots,`default`),n.kind?(s(),l(D,{key:1,class:`ml1`,text:n.kind},null,8,[`text`])):a(``,!0)],2)):a(``,!0),d(`div`,null,[e(t.$slots,`detail`)])]),_:3},8,[`disabled`])]),_:3},8,[`to`])}}}),L=Object.assign(I,{__name:`DisplayModuleId`});export{N as n,w as r,L as t};
1
+ import{At as e,Nt as t,T as n,Tt as r,Vt as i,W as a,ct as o,en as s,in as c,lt as l,mt as u,ot as d,pt as f,rn as p,st as m,tn as h,ut as g}from"#entry";import{t as _}from"./Jdu9jmuG.js";import{n as v,t as y}from"./B_mZ82Ef.js";import{n as b,t as x}from"./2OALqkc2.js";var S=[`textContent`],C=u({__name:`Badge`,props:{text:{},color:{type:[Boolean,Number],default:!0},as:{},size:{}},setup(n){let a=n,s=d(()=>!a.text||a.color===!1?{}:{color:typeof a.color==`number`?v(a.color):y(a.text),background:typeof a.color==`number`?v(a.color,.1):y(a.text,.1)}),l=d(()=>{switch(a.size||`sm`){case`sm`:return`px-1.5 text-11px leading-1.6em`}return``});return(u,d)=>(r(),o(t(n.as||`span`),{"ws-nowrap":``,rounded:``,class:h(l.value),style:p(s.value)},{default:i(()=>[e(u.$slots,`default`,{},()=>[m(`span`,{textContent:c(a.text)},null,8,S)])]),_:3},8,[`class`,`style`]))}}),w=Object.assign(C,{__name:`DisplayBadge`}),T=/^[A-Za-z]:\//;function E(e=``){return e&&e.replace(/\\/g,`/`).replace(T,e=>e.toUpperCase())}var D=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,O=/^\/([A-Za-z]:)?$/;function k(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}var A=function(...e){e=e.map(e=>E(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:k();!i||i.length===0||(t=`${i}/${t}`,n=M(i))}return t=j(t,!n),n&&!M(t)?`/${t}`:t.length>0?t:`.`};function j(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}var M=function(e){return D.test(e)},N=function(e,t){let n=A(e).replace(O,`$1`).split(`/`),r=A(t).replace(O,`$1`).split(`/`);if(r[0][1]===`:`&&n[0][1]===`:`&&n[0]!==r[0])return r.join(`/`);let i=[...n];for(let e of i){if(r[0]!==e)break;n.shift(),r.shift()}return[...n.map(()=>`..`),...r].join(`/`)},P={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},F={"font-mono":``,"text-sm":``},I=u({__name:`ModuleId`,props:{id:{},badges:{type:Boolean},icon:{type:Boolean,default:!0},link:{type:[Boolean,String]},minimal:{type:Boolean},kind:{},session:{},cwd:{},disableTooltip:{type:Boolean,default:!1}},setup(u){let p=u,v=a(),y=window.location,S=d(()=>{if(!p.id)return``;let e=p.id.replace(/%2F/g,`/`),t=p.cwd||p.session.meta.cwd,n=t?N(t,e):e;return n.startsWith(`.`)||(n=`./${n}`),n.startsWith(`./`)||n.match(/^(?:\.\.\/){1,3}[^.]/)?n:e}),C=d(()=>`flex items-center`);return(a,d)=>{let T=b,E=x,D=w;return r(),o(t(u.link?s(_):`div`),{to:u.link?typeof u.link==`string`?u.link:{path:s(v).path,query:{...s(v).query,module:u.id,chunk:void 0},hash:s(y).hash}:void 0},{default:i(()=>[f(s(n),{"my-auto":``,"text-sm":``,"font-mono":``,block:``,"w-full":``,triggers:[`hover`],delay:1200,disabled:u.disableTooltip||(p.id?.length||0)<30,placement:`bottom-start`},{popper:i(()=>[m(`span`,F,c(p.id),1)]),default:i(()=>[u.id?(r(),g(`div`,{key:0,class:h(C.value)},[u.icon?(r(),o(T,{key:0,filename:u.id,"mr1.5":``},null,8,[`filename`])):l(``,!0),m(`span`,P,[f(E,{path:S.value,minimal:u.minimal},null,8,[`path`,`minimal`])]),e(a.$slots,`default`),u.kind?(r(),o(D,{key:1,class:`ml1`,text:u.kind},null,8,[`text`])):l(``,!0)],2)):l(``,!0),m(`div`,null,[e(a.$slots,`detail`)])]),_:3},8,[`disabled`])]),_:3},8,[`to`])}}}),L=Object.assign(I,{__name:`DisplayModuleId`});export{N as n,w as r,L as t};
@@ -0,0 +1 @@
1
+ import{Tt as e,Vt as t,W as n,c as r,ct as i,en as a,ft as o,in as s,it as c,kt as l,lt as u,mt as d,ot as f,pt as p,st as m,tn as h,ut as g,x as _,xt as v,y}from"#entry";import{t as b}from"./Jdu9jmuG.js";import"./DQtLZa7C.js";import"./B_mZ82Ef.js";import"./2OALqkc2.js";import{r as x}from"./DL1ysgP5.js";import{t as S}from"./Cql2HFZJ.js";import"./Bs1eUuZt.js";import{t as C}from"./D7AVRXB9.js";import{t as w}from"./LMGHh3hZ.js";import{t as T}from"./DcamI1aQ.js";var E={op50:``,"font-mono":``,w12:``},D=[`title`],O={flex:`~ gap-1 items-center`},k=d({__name:`Graph`,props:{session:{},chunks:{}},setup(r){let c=r,l=f(()=>c.chunks),u=n();return w({modules:l,spacing:{width:450,height:55,linkOffset:15,margin:120,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:t,scale:n,spacing:r,tree:i,hierarchy:o,collapsedNodes:s,container:c,modulesMap:u,nodes:d,links:f,nodesMap:p,linksMap:m,width:h,height:g,childToParentMap:_}=e;return()=>{h.value=window.innerWidth,g.value=window.innerHeight;let e=l.value.filter(e=>e.reason===`entry`),y=new Set,b=o({module:{id:`~root`}},n=>`${n.module?.id}`==`~root`?(e.forEach(e=>{y.add(e),t.value&&_.set(e.id,`~root`)}),e.map(e=>({module:e,expanded:!s.has(e.id),hasChildren:!1}))):s.has(`${n.module?.id}`)?[]:n.module.imports?.map(e=>{let r=u.value.get(`${e.chunk_id}`);if(!(!r||y.has(r)))return t.value&&_.set(r.id,n.module.id),y.add(r),{module:r,expanded:!s.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));t.value&&=!1,i().nodeSize([a(r.height),a(r.width)+a(r.gap)])(b);let x=b.descendants();for(let e of x)[e.x,e.y]=[e.y-a(r.width),e.x];let S=Math.min(...x.map(e=>e.x)),C=Math.min(...x.map(e=>e.y));if(S<a(r.margin))for(let e of x)e.x+=Math.abs(S)+a(r.margin);if(C<a(r.margin))for(let e of x)e.y+=Math.abs(C)+a(r.margin);d.value=x,p.clear();for(let e of x)p.set(`${e.data.module.id}`,e);let w=b.links().filter(e=>`${e.source.data.module.id}`!=`~root`).map(e=>({...e,id:`${e.source.data.module.id}|${e.target.data.module.id}`})),T=l.value.flatMap(e=>e.imports.filter(t=>!w.find(n=>n.id===`${e.chunk_id}|${t.chunk_id}`)).map(t=>({source:p.get(`${e.chunk_id}`),target:p.get(`${t.chunk_id}`),id:`${e.chunk_id}|${t.chunk_id}`}))),E=[...w,...T];m.clear();for(let e of E)m.set(e.id,e);f.value=E,v(()=>{h.value=c.value.scrollWidth/n.value+a(r.margin),g.value=c.value.scrollHeight/n.value+a(r.margin)})}}}),(n,c)=>{let d=x,f=b,h=T;return e(),i(h,{session:r.session,modules:l.value,"expand-controls":!1},{default:t(({node:e})=>[p(f,{class:`flex items-center`,to:{path:a(u).path,query:{chunk:e.data.module.chunk_id}}},{default:t(()=>[m(`span`,E,`#`+s(e.data.module.id),1),m(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.data.module.id}`},[m(`div`,null,s(e.data.module.name||`[unnamed]`),1),p(d,{text:e.data.module.reason},null,8,[`text`])],8,D),c[1]||=m(`div`,{"flex-auto":``},null,-1),m(`div`,O,[c[0]||=m(`div`,{"i-ph-package-duotone":``},null,-1),o(` `+s(e.data.module.modules.length),1)])]),_:2},1032,[`to`])]),_:1},8,[`session`,`modules`])}}}),A=Object.assign(k,{__name:`ChunksGraph`}),j={key:1,relative:``,"max-h-screen":``,"of-hidden":``},M={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},N={flex:`~ gap-2 items-center`,p2:``,border:`~ base rounded-xl`,"bg-glass":``},P=[`onClick`],F={key:0,class:`px5 pt24 of-auto h-screen`,flex:`~ col gap-4`},I=d({__name:`chunks`,props:{session:{}},setup(t){let n=t,d=[{label:`List`,value:`list`,icon:`i-ph-list-bullets-duotone`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`}],p=y(),{state:v,isLoading:b}=r(async()=>await p.value[`vite:rolldown:get-chunks-graph`]?.({session:n.session.id}),null),x=f(()=>v.value?.map(e=>({...e,id:`${e.chunk_id}`}))??[]);function w(e){S.value.chunkViewType=e}return(n,r)=>{let f=_,p=C,y=A;return a(b)?(e(),i(f,{key:0})):(e(),g(`div`,j,[m(`div`,M,[m(`div`,N,[r[0]||=m(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(e(),g(c,null,l(d,e=>m(`button`,{key:e.value,"btn-action":``,class:h(a(S).chunkViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>w(e.value)},[m(`div`,{class:h(e.icon)},null,2),o(` `+s(e.label),1)],10,P)),64))])]),a(S).chunkViewType===`list`?(e(),g(`div`,F,[(e(!0),g(c,null,l(a(v),n=>(e(),i(p,{key:n.id,border:`~ base rounded-lg`,p3:``,chunk:n,chunks:a(v),session:t.session},null,8,[`chunk`,`chunks`,`session`]))),128))])):a(S).chunkViewType===`graph`?(e(),i(y,{key:1,session:t.session,chunks:x.value},null,8,[`session`,`chunks`])):u(``,!0)]))}}});export{I as default};
@@ -0,0 +1 @@
1
+ function e(e,t=2){let n=[`Bytes`,`KB`,`MB`,`GB`,`TB`],r=Math.floor(Math.log(e)/Math.log(1024));return r===0?[e,`B`]:[(+(e/1024**r).toFixed(t)).toLocaleString(),n[r]]}function t(e,t){let n={name:t,children:{},items:[]};function r(e,t,i=n){if(!e)return;if(t.length<=1){i.items.push(e);return}let a=t.shift();i.children[a]||(i.children[a]={name:a,children:{},items:[]}),r(e,t,i.children[a])}e.forEach(e=>{r(e,e.path.split(/\//g).filter(Boolean))});function i(e){if(!e)return;let t=Object.values(e.children);if(t.length===1&&!e.items.length){let n=t[0];e.name=e.name?`${e.name}/${n.name}`:n.name,e.items=n.items,e.children=n.children,i(e)}else t.forEach(i)}return Object.values(n.children).forEach(i),n}function n(e){return new Date(e).toLocaleString(void 0,{hour12:!1,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3})}function r(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}export{t as i,r as n,n as r,e as t};
@@ -0,0 +1 @@
1
+ import{At as e,Ct as t,Ht as n,Jt as r,Mt as i,Rt as a,Tt as o,Vt as s,bt as c,ct as l,en as u,et as d,in as f,it as p,kt as m,lt as h,mt as g,nn as _,pt as v,rn as y,rt as b,st as x,tn as S,ut as C}from"#entry";import{a as w,i as ee,n as T,o as E,r as D,s as O}from"./LMGHh3hZ.js";var k=g({inheritAttrs:!1,__name:`TimeoutView`,props:{content:{},hideInterval:{default:1500}},setup(e){let t=r(!1),n=null;return a(()=>e.content,()=>{n&&clearTimeout(n),t.value=!0,n=setTimeout(()=>{t.value=!1},e.hideInterval)}),(n,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:s(()=>[t.value?(o(),C(`div`,_(c({key:0},n.$attrs)),f(e.content),17)):h(``,!0)]),_:1}))}}),A=Object.assign(k,{__name:`DisplayTimeoutView`}),j=[`width`,`height`],M=[`d`],N={class:`w-4`},P=[`disabled`,`title`,`onClick`],F={fixed:``,"right-6":``,"bottom-6":``,"z-panel-nav":``,flex:`~ col gap-2 items-center`},I={"w-10":``,flex:`~ items-center justify-center`},L={"bg-glass":``,"rounded-full":``,border:``,"border-base":``,shadow:``,flex:`~ col gap-1 p1`},R=[`disabled`],z=[`disabled`],B=[`disabled`],V=[`disabled`],H=g({__name:`ModuleGraph`,props:{modules:{},session:{},expandControls:{type:Boolean,default:!0}},setup(r){let s=r,{isFirstCalculateGraph:c,childToParentMap:l,collapsedNodes:d,calculateGraph:f,container:g,width:_,height:k,scale:H,nodes:U,links:W,spacing:G,nodesRefMap:K}=E(),{isGrabbing:q,init:J}=ee(),{zoomIn:Y,zoomOut:X,ZOOM_MIN:Z,ZOOM_MAX:Q}=w(),{isGraphNodeToggling:$,toggleNode:te,expandAll:ne,collapseAll:re}=O({modules:s.modules});return t(()=>{J(),a(()=>s.modules,()=>{c.value=!0,d.clear(),l.clear(),f()},{immediate:!0})}),(t,a)=>{let s=A,c=i(`tooltip`);return o(),C(`div`,{ref_key:`container`,ref:g,"w-full":``,"h-screen":``,"of-scroll":``,relative:``,"select-none":``,class:S(u(q)?`cursor-grabbing`:``)},[x(`div`,{style:y({width:`${u(_)*u(H)}px`,height:`${u(k)*u(H)}px`})},[x(`div`,{flex:`~ items-center justify-center`,style:y({transform:`scale(${u(H)})`,transformOrigin:`0 0`})},[x(`div`,{absolute:``,"left-0":``,"top-0":``,style:y({width:`${u(_)}px`,height:`${u(k)}px`}),class:`bg-dots`},null,4),(o(),C(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,width:u(_),height:u(k)},[x(`g`,null,[(o(!0),C(p,null,m(u(W),n=>e(t.$slots,`link`,{key:n.id,link:n,d:u(T)(n,u(G)),linkClass:u(D)(n)},()=>[(o(),C(`path`,{key:n.id,d:u(T)(n,u(G)),class:S(u(D)(n)),fill:`none`},null,10,M))])),128))])],8,j)),(o(!0),C(p,null,m(u(U),n=>(o(),C(p,{key:n.data.module.id},[n.data.module.id===`~root`?h(``,!0):(o(),C(`div`,{key:0,absolute:``,class:`group z-graph-node flex gap-1 items-center`,style:y({left:`${n.x}px`,top:`${n.y}px`,transform:`translate(-50%, -50%)`})},[x(`div`,{flex:`~ items-center gap-1`,"bg-glass":``,border:`~ base rounded`,class:`group-hover:bg-active block px2 p1`,style:y({minWidth:`${u(u(G).width)}px`,maxWidth:`${u(u(G).width)}px`,maxHeight:`${u(u(G).height)}px`,overflow:`hidden`,transition:`all 0.3s ease`})},[e(t.$slots,`default`,{node:n,nodesRefMap:u(K)})],4),x(`div`,N,[n.data.hasChildren?(o(),C(`button`,{key:0,"w-4":``,"h-4":``,"rounded-full":``,flex:`items-center justify-center`,"text-xs":``,border:`~ active`,class:S([`flex cursor-pointer z-graph-node-active bg-base`,{"cursor-not-allowed":u($),"hover:bg-active":!u($)}]),disabled:u($),title:n.data.expanded?`Collapse`:`Expand`,onClick:b(e=>u(te)(n.data.module.id),[`stop`])},[x(`div`,{class:S([`text-primary h-4`,[n.data.expanded?`i-ph-minus`:`i-ph-plus`]]),transition:`transform duration-200`},null,2)],10,P)):h(``,!0)])],4))],64))),128))],4)],4),x(`div`,F,[x(`div`,I,[v(s,{content:`${Math.round(u(H)*100)}%`,class:`text-sm`},null,8,[`content`])]),x(`div`,L,[r.expandControls?(o(),C(p,{key:0},[n((o(),C(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:u($),class:S({"op50 cursor-not-allowed":u($),"hover:bg-active":!u($)}),title:`Expand All`,onClick:a[0]||=e=>u(ne)()},[...a[4]||=[x(`div`,{class:`i-ph-arrows-out-simple-duotone`},null,-1)]],10,R)),[[c,`Expand All`,void 0,{left:!0}]]),n((o(),C(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:u($),class:S({"op50 cursor-not-allowed":u($),"hover:bg-active":!u($)}),title:`Collapse All`,onClick:a[1]||=e=>u(re)()},[...a[5]||=[x(`div`,{class:`i-ph-arrows-in-simple-duotone`},null,-1)]],10,z)),[[c,`Collapse All`,void 0,{left:!0}]]),a[6]||=x(`div`,{border:`t base`,my1:``},null,-1)],64)):h(``,!0),n((o(),C(`button`,{disabled:u(H)>=u(Q),"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=>u(Y)()},[...a[7]||=[x(`div`,{"i-ph-magnifying-glass-plus-duotone":``},null,-1)]],8,B)),[[c,`Zoom In (Ctrl + =)`,void 0,{left:!0}]]),n((o(),C(`button`,{disabled:u(H)<=u(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=>u(X)()},[...a[8]||=[x(`div`,{"i-ph-magnifying-glass-minus-duotone":``},null,-1)]],8,V)),[[c,`Zoom Out (Ctrl + -)`,void 0,{left:!0}]])])])],2)}}}),U=Object.assign(H,{__name:`DisplayModuleGraph`});export{U as t};
@@ -0,0 +1 @@
1
+ import{G as e,Jt as t,Tt as n,Vt as r,W as i,_ as a,ct as o,en as s,ft as c,g as l,in as u,it as d,kt as f,lt as p,mt as m,ot as h,pt as g,st as _,tn as v,ut as y,xt as b}from"#entry";import"./Jdu9jmuG.js";import{i as x}from"./DQtLZa7C.js";import{a as S,s as C}from"./B_mZ82Ef.js";import"./2OALqkc2.js";import{t as w}from"./DL1ysgP5.js";import"./DnpfwSMy.js";import{t as T}from"./SO3ppn9m.js";import"./X7aOo9pb.js";import{t as E}from"./Cql2HFZJ.js";import{t as D}from"./_hSlj5r4.js";import{t as O}from"./LMGHh3hZ.js";import{t as k}from"./CIZ7KSXz.js";import{n as A,t as j}from"./B-LCQpq9.js";import{t as M}from"./Cnct9GAr.js";import{t as ee}from"./lxg2Cb0s.js";import{t as N}from"./DcamI1aQ.js";import{n as P,t as F}from"./D03ETnho.js";var I={flex:`~ col gap-2`,p4:``},L={flex:``,pb2:``},R=m({__name:`FlatList`,props:{session:{},modules:{}},setup(e){return(t,i)=>{let a=w,o=j;return n(),y(`div`,I,[g(o,{items:e.modules,"key-prop":`id`},{default:r(({item:t})=>[_(`div`,L,[g(a,{id:t.id,session:e.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:!0},null,8,[`id`,`session`])])]),_:1},8,[`items`])])}}}),z=Object.assign(R,{__name:`ModulesFlatList`}),B={flex:`~ col gap-2`,p4:``},V={flex:``,pb2:``},H={flex:`~ gap-1 wrap`,"text-xs":``},U={flex:`~ auto text-xs wrap`},W={key:0,flex:`~ items-center`},G={key:0,op20:``},K={flex:`~ none gap-1 wrap justify-end`},q=m({__name:`DetailedList`,props:{session:{},modules:{}},setup(e){let t=e,i=h(()=>{let e=new Map;for(let n of t.modules){let t=n.buildMetrics?.transforms.filter(e=>e.source_code_size!==e.transformed_code_size).filter(e=>e.transformed_code_size);e.set(n.id,t)}return e});return(t,a)=>{let s=k,c=D,l=w,u=j;return n(),y(`div`,B,[g(u,{items:e.modules,"key-prop":`id`},{default:r(({item:t})=>[_(`div`,V,[g(l,{id:t.id,session:e.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:!0},{detail:r(()=>[_(`div`,H,[_(`ul`,U,[(n(!0),y(d,null,f(i.value.get(t.id),(e,r)=>(n(),y(d,{key:r},[e.source_code_size!==e.transformed_code_size&&e.transformed_code_size?(n(),y(`li`,W,[g(s,{name:e.plugin_name,class:`font-mono ws-nowrap op-50`},null,8,[`name`]),r===i.value.get(t.id).length-1?p(``,!0):(n(),y(`span`,G,`|`))])):p(``,!0)],64))),128))]),a[0]||=_(`div`,{flex:`~ auto gap-1`,"of-hidden":``},null,-1),_(`div`,K,[_(`span`,null,[t.buildMetrics?(n(),o(c,{key:0,metrics:t.buildMetrics},null,8,[`metrics`])):p(``,!0)])])])]),_:2},1032,[`id`,`session`])])]),_:1},8,[`items`])])}}}),J=Object.assign(q,{__name:`ModulesDetailedList`}),Y=[`d`,`stroke-dasharray`],X=m({__name:`Graph`,props:{modules:{},session:{}},setup(e){let t=e,i=h(()=>t.modules);return O({modules:i,spacing:{width:400,height:55,linkOffset:20,margin:800,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:t,scale:n,spacing:r,tree:a,hierarchy:o,collapsedNodes:c,container:l,modulesMap:u,nodes:d,links:f,nodesMap:p,linksMap:m,width:g,height:_,childToParentMap:v,focusOn:y}=e,x=h(()=>i.value.filter(e=>e.importers.length===0));return(e=!0)=>{g.value=window.innerWidth,_.value=window.innerHeight;let i=new Set,h=o({module:{id:`~root`}},e=>e.module.id===`~root`?(x.value.forEach(e=>{i.add(e),t.value&&v.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(n=>{let r=u.value.get(n.module_id);if(r&&!i.has(r)&&!(v.has(r.id)&&v.get(r.id)!==e.module.id))return i.add(r),t.value&&v.set(r.id,e.module.id),{module:r,import:n,expanded:!c.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));t.value&&=!1,a().nodeSize([s(r.height),s(r.width)+s(r.gap)])(h);let S=h.descendants();for(let e of S)[e.x,e.y]=[e.y-s(r.width),e.x],e.data.module.imports&&(e.data.hasChildren=e.data.module.imports?.filter(t=>v.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<s(r.margin))for(let e of S)e.x+=Math.abs(C)+s(r.margin);if(w<s(r.margin))for(let e of S)e.y+=Math.abs(w)+s(r.margin);d.value=S,p.clear();for(let e of S)p.set(e.data.module.id,e);let T=h.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}`}));m.clear();for(let e of T)m.set(e.id,e);f.value=T,b(()=>{g.value=l.value.scrollWidth/n.value+s(r.margin),_.value=l.value.scrollHeight/n.value+s(r.margin);let t=x.value?.[0]?.id;e&&t&&b(()=>{y(t,!1)})})}}}),(t,a)=>{let s=w,c=N;return n(),o(c,{session:e.session,modules:i.value},{default:r(({node:t,nodesRefMap:n})=>[g(s,{id:t.data.module.id,ref:e=>n.set(t.data.module.id,e?.$el),link:!0,session:e.session,minimal:!0,flex:`1`},null,8,[`id`,`session`])]),link:r(({link:e,d:t,linkClass:n})=>[_(`path`,{d:t,class:v(n),"stroke-dasharray":e.import?.kind===`dynamic-import`?`3 6`:void 0,fill:`none`},null,10,Y)]),_:1},8,[`session`,`modules`])}}}),Z=Object.assign(X,{__name:`ModulesGraph`}),Q={"of-auto":``,"max-h-screen":``,"pt-45":``,relative:``},te={flex:`~ col gap-2`,p4:``},ne=m({__name:`Folder`,props:{session:{},modules:{}},setup(e){let t=e,r=h(()=>{if(!t.session.modulesList.length)return{workspace:{children:{},items:[]},nodeModules:{children:{},items:[]},virtual:{children:{},items:[]}};let e=[],n=[],r=[];return t.modules.map(e=>({full:e.id,path:e.path})).forEach(i=>{i.full.startsWith(t.session.meta.cwd)?(i.path.startsWith(`../`)||(i.path=i.full.slice(t.session.meta.cwd.length+1)),e.push(i)):i.full.includes(`node_modules`)?n.push({full:i.full,path:i.full}):i.full.startsWith(`virtual:`)&&r.push(i)}),{workspace:x(e,`Project Root`),nodeModules:x(n,`Node Modules`),virtual:x(r,`Virtual Modules`)}});return(e,t)=>{let i=M;return n(),y(`div`,Q,[_(`div`,te,[Object.keys(r.value.workspace.children).length?(n(),o(i,{key:0,node:r.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`])):p(``,!0),Object.keys(r.value.nodeModules.children).length?(n(),y(d,{key:1},[t[0]||=_(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),g(i,{node:r.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)):p(``,!0),Object.keys(r.value.virtual.children).length?(n(),y(d,{key:2},[t[1]||=_(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),g(i,{node:r.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)):p(``,!0)])])}}}),re=Object.assign(ne,{__name:`ModulesFolder`}),ie={relative:``,"max-h-screen":``,"of-hidden":``},ae={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},oe={flex:`~ gap-2 items-center`,p2:``,border:`t base`},$=[`onClick`],se={key:0,"of-auto":``,"h-screen":``,"pt-45":``},ce={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},le={op50:``},ue={key:1,"of-auto":``,"h-screen":``,"pt-45":``},de={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},fe={op50:``},pe=m({__name:`index`,props:{session:{}},setup(p){let m=p,b=i(),x=e(),w=t({search:b.query.search||``,selected:b.query.file_types?P(b.query.file_types):null,node_modules:b.query.node_modules?P(b.query.node_modules):null}),D=[{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`}];a(w.value,e=>{let t={...b.query,search:e.search||void 0,file_types:e.selected||void 0,node_modules:e.node_modules||void 0};x.replace({query:F(t)})},{debounce:500});let O=h(()=>m.session.modulesList.map(e=>({mod:e,path:T(e.id,m.session.meta.cwd),type:C(e.id)}))),k=h(()=>S.filter(e=>O.value.some(t=>e.match.test(t.mod.id)))),j=h(()=>{let e=O.value;return w.value.selected&&(e=e.filter(e=>{let t=C(e.mod.id);return w.value.selected.includes(t.name)})),w.value.node_modules&&(e=e.filter(e=>e.path.moduleName&&w.value.node_modules.includes(e.path.moduleName))),e.map(e=>({...e.mod,path:e.path.path}))}),M=l(()=>j.value,()=>new ee(j.value,{includeScore:!0,keys:[`id`],ignoreLocation:!0,threshold:.4})),N=h(()=>w.value.search?M.value.search(w.value.search).map(e=>e.item):j.value);function I(e){b.query.module&&x.replace({query:{...b.query,module:void 0}}),E.value.moduleGraphViewType=e}return(e,t)=>{let i=A,a=z,l=J,m=Z,h=re;return n(),y(`div`,ie,[_(`div`,ae,[g(i,{modelValue:w.value,"onUpdate:modelValue":t[0]||=e=>w.value=e,rules:k.value},{default:r(()=>[_(`div`,oe,[t[1]||=_(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(n(),y(d,null,f(D,e=>_(`button`,{key:e.value,"btn-action":``,class:v(s(E).moduleGraphViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>I(e.value)},[_(`div`,{class:v(e.icon)},null,2),c(` `+u(e.label),1)],10,$)),64))])]),_:1},8,[`modelValue`,`rules`])]),s(E).moduleGraphViewType===`list`?(n(),y(`div`,se,[g(a,{session:p.session,modules:N.value},null,8,[`session`,`modules`]),_(`div`,ce,[_(`span`,le,u(N.value.length)+` of `+u(p.session.modulesList.length),1)])])):s(E).moduleGraphViewType===`detailed-list`?(n(),y(`div`,ue,[g(l,{session:p.session,modules:N.value},null,8,[`session`,`modules`]),_(`div`,de,[_(`span`,fe,u(N.value.length)+` of `+u(p.session.modulesList.length),1)])])):s(E).moduleGraphViewType===`graph`?(n(),o(m,{key:2,session:p.session,modules:N.value},null,8,[`session`,`modules`])):(n(),o(h,{key:3,session:p.session,modules:N.value},null,8,[`session`,`modules`]))])}}});export{pe as default};
@@ -0,0 +1 @@
1
+ import{$ as e,B as t,Ct as n,G as r,H as i,I as a,J as o,Jt as s,K as c,L as l,Q as u,R as d,St as f,U as p,X as m,Xt as h,Y as g,Z as _,_t as v,jt as y,mt as b,ot as x,q as S,z as C}from"#entry";var w=(...e)=>e.find(e=>e!==void 0);function T(e){let t=e.componentName||`NuxtLink`;function o(e){return typeof e==`string`&&e.startsWith(`#`)}function u(t,n,r){let i=r??e.trailingSlash;if(!t||i!==`append`&&i!==`remove`)return t;if(typeof t==`string`)return D(t,i);let a=`path`in t&&t.path!==void 0?t.path:n(t).path;return{...t,name:void 0,path:D(a,i)}}function T(t){let n=r(),a=S(),s=x(()=>!!t.target&&t.target!==`_self`),c=x(()=>{let e=t.to||t.href||``;return typeof e==`string`&&g(e,{acceptRelative:!0})}),l=y(`RouterLink`),d=l&&typeof l!=`string`?l.useLink:void 0,f=x(()=>{if(t.external)return!0;let e=t.to||t.href||``;return typeof e==`object`?!1:e===``||c.value}),h=x(()=>{let e=t.to||t.href||``;return f.value?e:u(e,n.resolve,t.trailingSlash)}),_=f.value?void 0:d?.({...t,to:h}),v=x(()=>{let r=t.trailingSlash??e.trailingSlash;if(!h.value||c.value||o(h.value))return h.value;if(f.value){let e=typeof h.value==`object`&&`path`in h.value?p(h.value):h.value;return D(typeof e==`object`?n.resolve(e).href:e,r)}return typeof h.value==`object`?n.resolve(h.value)?.href??null:D(m(a.app.baseURL,h.value),r)});return{to:h,hasTarget:s,isAbsoluteUrl:c,isExternal:f,href:v,isActive:_?.isActive??x(()=>h.value===n.currentRoute.value.path),isExactActive:_?.isExactActive??x(()=>h.value===n.currentRoute.value.path),route:_?.route??x(()=>n.resolve(h.value)),async navigate(e){await i(v.value,{replace:t.replace,external:f.value||s.value})}}}return b({name:t,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:T,setup(t,{slots:i}){let u=r(),{to:m,href:g,navigate:b,isExternal:x,hasTarget:S,isAbsoluteUrl:E}=T(t),D=h(!1),k=s(null),j=e=>{k.value=t.custom?e?.$el?.nextElementSibling:e?.$el};function M(n){return!D.value&&(typeof t.prefetchOn==`string`?t.prefetchOn===n:t.prefetchOn?.[n]??e.prefetchOn?.[n])&&(t.prefetch??e.prefetch)!==!1&&t.noPrefetch!==!0&&t.target!==`_blank`&&!A()}async function N(e=c()){if(D.value)return;D.value=!0;let t=typeof m.value==`string`?m.value:x.value?p(m.value):u.resolve(m.value).fullPath,n=x.value?new URL(t,window.location.href).href:t;await Promise.all([e.hooks.callHook(`link:prefetch`,n).catch(()=>{}),!x.value&&!S.value&&a(m.value,u).catch(()=>{})])}if(M(`visibility`)){let e=c(),t,r=null;n(()=>{let n=O();l(()=>{t=C(()=>{k?.value?.tagName&&(r=n.observe(k.value,async()=>{r?.(),r=null,await N(e)}))})})}),f(()=>{t&&d(t),r?.(),r=null})}return()=>{if(!x.value&&!S.value&&!o(m.value)){let n={ref:j,to:m.value,activeClass:t.activeClass||e.activeClass,exactActiveClass:t.exactActiveClass||e.exactActiveClass,replace:t.replace,ariaCurrentValue:t.ariaCurrentValue,custom:t.custom};return t.custom||(M(`interaction`)&&(n.onPointerenter=N.bind(null,void 0),n.onFocus=N.bind(null,void 0)),D.value&&(n.class=t.prefetchedClass||e.prefetchedClass),n.rel=t.rel||void 0),v(y(`RouterLink`),n,i.default)}let n=t.target||null,r=w(t.noRel?``:t.rel,e.externalRelAttribute,E.value||S.value?`noopener noreferrer`:``)||null;return t.custom?i.default?i.default({href:g.value,navigate:b,prefetch:N,get route(){if(!g.value)return;let e=new URL(g.value,window.location.href);return{path:e.pathname,fullPath:e.pathname,get query(){return _(e.search)},hash:e.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:g.value}},rel:r,target:n,isExternal:x.value||S.value,isActive:!1,isExactActive:!1}):null:v(`a`,{ref:k,href:g.value||null,rel:r,target:n,onClick:e=>{if(!(x.value||S.value))return e.preventDefault(),t.replace?u.replace(g.value):u.push(g.value)}},i.default?.())}}})}var E=T(o);function D(t,n){let r=n===`append`?u:e;return g(t)&&!t.startsWith(`http`)?t:r(t,!0)}function O(){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 k=/2g/;function A(){let e=navigator.connection;return!!(e&&(e.saveData||k.test(e.effectiveType)))}export{E as t};
@@ -1 +1 @@
1
- import{Dt as e,Nt as t,an as n,d as r,en as i,ft as a,l as o,nn as s,o as c,on as l,tn as u,wt as d}from"#entry";function f(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function p(){return this.eachAfter(f)}function m(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function h(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function g(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function _(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function v(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function y(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function b(e){for(var t=this,n=x(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function x(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function S(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function C(){return Array.from(this)}function w(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function T(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*ee(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function E(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=k)):t===void 0&&(t=O);for(var n=new j(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new j(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(A)}function D(){return E(this).eachBefore(te)}function O(e){return e.children}function k(e){return Array.isArray(e)?e[1]:null}function te(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function A(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}j.prototype=E.prototype={constructor:j,count:p,each:m,eachAfter:g,eachBefore:h,find:_,sum:v,sort:y,path:b,ancestors:S,descendants:C,leaves:w,links:T,copy:D,[Symbol.iterator]:ee};function M(e,t){return e.parent===t.parent?1:2}function N(e){var t=e.children;return t?t[0]:e.t}function P(e){var t=e.children;return t?t[t.length-1]:e.t}function F(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function ne(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function re(e,t,n){return e.a.parent===t.parent?e.a:n}function I(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}I.prototype=Object.create(j.prototype);function ie(e){for(var t=new I(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new I(a[o],o)),i.parent=n;return(t.parent=new I(null,0)).children=[t],t}function ae(){var e=M,t=1,n=1,r=null;function i(i){var s=ie(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){ne(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=P(o),i=N(i),o&&i;)s=N(s),a=P(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(F(re(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!P(a)&&(a.t=o,a.m+=u-l),i&&!N(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function L(e){return function(){return e}}var R=Math.PI,z=2*R,B=1e-6,V=z-B;function H(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function U(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return H;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var W=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?H:U(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>B)if(!(Math.abs(u*s-c*l)>B)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((R-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>B&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>B||Math.abs(this._y1-l)>B)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%z+z),d>V?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>B&&this._append`A${n},${n},0,${+(d>=R)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function G(){return new W}G.prototype=W.prototype;function K(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new W(t)}var q=Array.prototype.slice;function oe(e){return e[0]}function se(e){return e[1]}var J=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function ce(e){return new J(e,!0)}function le(e){return new J(e,!1)}function ue(e){return e.source}function de(e){return e.target}function Y(e){let t=ue,n=de,r=oe,i=se,a=null,o=null,s=K(c);function c(){let c,l=q.call(arguments),u=t.apply(this,l),d=n.apply(this,l);if(a??(o=e(c=s())),o.lineStart(),l[0]=u,o.point(+r.apply(this,l),+i.apply(this,l)),l[0]=d,o.point(+r.apply(this,l),+i.apply(this,l)),o.lineEnd(),c)return o=null,c+``||null}return c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.x=function(e){return arguments.length?(r=typeof e==`function`?e:L(+e),c):r},c.y=function(e){return arguments.length?(i=typeof e==`function`?e:L(+e),c):i},c.context=function(t){return arguments.length?(t==null?a=o=null:o=e(a=t),c):a},c}function fe(){return Y(ce)}function pe(){return Y(le)}function me(e,{wheel:t=!0,minScale:r=.5,maxScale:a=2}={}){let s=i(1);function c(t,i,o){let c=n(e);if(!c)return;let{left:l,top:u,width:d,height:f}=c.getBoundingClientRect(),p=i??l+d/2,m=o??u+f/2,h=p-l,g=m-u,_=s.value;s.value=Math.max(r,Math.min(a,_+t));let v=s.value/_;c.scrollLeft=(c.scrollLeft+h)*v-h,c.scrollTop=(c.scrollTop+g)*v-g}function l(e){if(n(t)){e.preventDefault();let t=.2;c(e.deltaY<0?t:t*-1,e.clientX,e.clientY)}else e.ctrlKey&&(e.preventDefault(),c(e.deltaY*.004*-1,e.clientX,e.clientY))}function u(e=.2){c(e)}function d(e=.2){c(e*-1)}return o(e,`wheel`,l),{scale:s,zoom:c,zoomIn:u,zoomOut:d}}var X=Symbol.for(`ViteDevToolsModuleGraphState`);const Z=fe().x(e=>e[0]).y(e=>e[1]),Q=pe().x(e=>e[0]).y(e=>e[1]);function $(e,t){return t?e.target.x<=e.source.x?Q({source:[e.source.x+l(t.width)/2-l(t.linkOffset),e.source.y],target:[e.target.x-l(t.width)/2+l(t.linkOffset),e.target.y]}):Z({source:[e.source.x+l(t.width)/2-l(t.linkOffset),e.source.y],target:[e.target.x-l(t.width)/2+l(t.linkOffset),e.target.y]}):e.target.x<=e.source.x?Q({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]}):Z({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]})}function he(e){return`stroke-#8885`}function ge(e){let n=.4,o=i(),c=i(window.innerWidth),l=i(window.innerHeight),d=u(new Map),f=u(new Set),p=i(!0),m=u(new Map),h=s([]),g=s([]),_=u(new Map),v=u(new Map),y=a(()=>{let t=new Map;for(let n of e.modules.value)t.set(n.id,n);return t}),{control:b}=r(),{scale:x,zoomIn:S,zoomOut:C}=me(o,{wheel:b,minScale:n,maxScale:2});function w(e,t=!0){d.get(e)?.scrollIntoView({block:`center`,inline:`center`,behavior:t?`smooth`:`instant`})}let T=e.generateGraph({isFirstCalculateGraph:p,hierarchy:E,tree:ae,nodesRefMap:d,container:o,modulesMap:y,nodes:h,links:g,scale:x,nodesMap:_,linksMap:v,width:c,height:l,childToParentMap:m,focusOn:w,collapsedNodes:f,spacing:e.spacing});t(X,{spacing:e.spacing,calculateGraph:T,isFirstCalculateGraph:p,container:o,width:c,height:l,scale:x,nodes:h,links:g,nodesRefMap:d,collapsedNodes:f,childToParentMap:m,ZOOM_MIN:n,ZOOM_MAX:2,zoomIn:S,zoomOut:C})}function _e(){return d(X)}function ve(t){let{nodesRefMap:n,container:r,calculateGraph:a,collapsedNodes:o}=d(X),s=i(!1);function c(t,i){e(()=>{e(()=>{let e=n.get(t);if(e&&i&&r.value){let t=r.value.getBoundingClientRect(),n=e.getBoundingClientRect(),a=n.left-t.left-i.x,o=n.top-t.top-i.y;r.value.scrollLeft+=a,r.value.scrollTop+=o}})})}function u(e){if(s.value)return;s.value=!0;let t=n.get(e),i=null;if(t&&r.value){let e=r.value.getBoundingClientRect(),n=t.getBoundingClientRect();i={x:n.left-e.left,y:n.top-e.top}}o.has(e)?o.delete(e):o.add(e),a(),i&&c(e,i),s.value=!1}function f(){s.value||(s.value=!0,o.clear(),a(),setTimeout(()=>{s.value=!1},300))}function p(){s.value||(s.value=!0,l(t.modules).forEach(e=>{e.imports.length>0&&o.add(e.id)}),a(),setTimeout(()=>{s.value=!1},300))}return{isGraphNodeToggling:s,toggleNode:u,expandAll:f,collapseAll:p}}function ye(){let{scale:e,zoomIn:t,zoomOut:n,ZOOM_MIN:r,ZOOM_MAX:i}=d(X);return c([`-`,`_`],e=>{e.ctrlKey&&n()}),c([`=`,`+`],e=>{e.ctrlKey&&t()}),{ZOOM_MIN:r,ZOOM_MAX:i,scale:e,zoomIn:t,zoomOut:n}}function be(){let{container:e}=d(X),t=i(!1),n=0,r=0;function a(){o(e,`mousedown`,i=>{let a=e.value.getBoundingClientRect(),o=a.right-i.clientX,s=a.bottom-i.clientY;o<=20||s<=20||(t.value=!0,n=e.value.scrollLeft+i.pageX,r=e.value.scrollTop+i.pageY)}),o(e,`contextmenu`,e=>e.preventDefault()),o(`mouseleave`,()=>t.value=!1),o(`mouseup`,()=>t.value=!1),o(`mousemove`,i=>{t.value&&(i.preventDefault(),e.value.scrollLeft=n-i.pageX,e.value.scrollTop=r-i.pageY)})}return{init:a,isGrabbing:t}}export{ye as a,be as i,$ as n,_e as o,he as r,ve as s,ge as t};
1
+ import{$t as e,Dt as t,Jt as n,Xt as r,Yt as i,en as a,f as o,ot as s,s as c,u as l,vt as u,xt as d}from"#entry";function f(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function p(){return this.eachAfter(f)}function m(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function h(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function g(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function _(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function v(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function y(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function b(e){for(var t=this,n=x(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function x(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function S(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function C(){return Array.from(this)}function w(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function T(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*ee(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function E(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=k)):t===void 0&&(t=O);for(var n=new j(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new j(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(A)}function D(){return E(this).eachBefore(te)}function O(e){return e.children}function k(e){return Array.isArray(e)?e[1]:null}function te(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function A(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}j.prototype=E.prototype={constructor:j,count:p,each:m,eachAfter:g,eachBefore:h,find:_,sum:v,sort:y,path:b,ancestors:S,descendants:C,leaves:w,links:T,copy:D,[Symbol.iterator]:ee};function M(e,t){return e.parent===t.parent?1:2}function N(e){var t=e.children;return t?t[0]:e.t}function P(e){var t=e.children;return t?t[t.length-1]:e.t}function F(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function ne(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function re(e,t,n){return e.a.parent===t.parent?e.a:n}function I(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}I.prototype=Object.create(j.prototype);function ie(e){for(var t=new I(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new I(a[o],o)),i.parent=n;return(t.parent=new I(null,0)).children=[t],t}function ae(){var e=M,t=1,n=1,r=null;function i(i){var s=ie(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){ne(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=P(o),i=N(i),o&&i;)s=N(s),a=P(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(F(re(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!P(a)&&(a.t=o,a.m+=u-l),i&&!N(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function L(e){return function(){return e}}var R=Math.PI,z=2*R,B=1e-6,V=z-B;function H(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function U(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return H;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var W=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?H:U(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>B)if(!(Math.abs(u*s-c*l)>B)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((R-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>B&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>B||Math.abs(this._y1-l)>B)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%z+z),d>V?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>B&&this._append`A${n},${n},0,${+(d>=R)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function G(){return new W}G.prototype=W.prototype;function K(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new W(t)}var q=Array.prototype.slice;function oe(e){return e[0]}function se(e){return e[1]}var J=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function ce(e){return new J(e,!0)}function le(e){return new J(e,!1)}function ue(e){return e.source}function de(e){return e.target}function Y(e){let t=ue,n=de,r=oe,i=se,a=null,o=null,s=K(c);function c(){let c,l=q.call(arguments),u=t.apply(this,l),d=n.apply(this,l);if(a??(o=e(c=s())),o.lineStart(),l[0]=u,o.point(+r.apply(this,l),+i.apply(this,l)),l[0]=d,o.point(+r.apply(this,l),+i.apply(this,l)),o.lineEnd(),c)return o=null,c+``||null}return c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.x=function(e){return arguments.length?(r=typeof e==`function`?e:L(+e),c):r},c.y=function(e){return arguments.length?(i=typeof e==`function`?e:L(+e),c):i},c.context=function(t){return arguments.length?(t==null?a=o=null:o=e(a=t),c):a},c}function fe(){return Y(ce)}function pe(){return Y(le)}function me(t,{wheel:r=!0,minScale:i=.5,maxScale:a=2}={}){let o=n(1);function s(n,r,s){let c=e(t);if(!c)return;let{left:l,top:u,width:d,height:f}=c.getBoundingClientRect(),p=r??l+d/2,m=s??u+f/2,h=p-l,g=m-u,_=o.value;o.value=Math.max(i,Math.min(a,_+n));let v=o.value/_;c.scrollLeft=(c.scrollLeft+h)*v-h,c.scrollTop=(c.scrollTop+g)*v-g}function c(t){if(e(r)){t.preventDefault();let e=.2;s(t.deltaY<0?e:e*-1,t.clientX,t.clientY)}else t.ctrlKey&&(t.preventDefault(),s(t.deltaY*.004*-1,t.clientX,t.clientY))}function u(e=.2){s(e)}function d(e=.2){s(e*-1)}return l(t,`wheel`,c),{scale:o,zoom:s,zoomIn:u,zoomOut:d}}var X=Symbol.for(`ViteDevToolsModuleGraphState`);const Z=fe().x(e=>e[0]).y(e=>e[1]),Q=pe().x(e=>e[0]).y(e=>e[1]);function $(e,t){return t?e.target.x<=e.source.x?Q({source:[e.source.x+a(t.width)/2-a(t.linkOffset),e.source.y],target:[e.target.x-a(t.width)/2+a(t.linkOffset),e.target.y]}):Z({source:[e.source.x+a(t.width)/2-a(t.linkOffset),e.source.y],target:[e.target.x-a(t.width)/2+a(t.linkOffset),e.target.y]}):e.target.x<=e.source.x?Q({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]}):Z({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]})}function he(e){return`stroke-#8885`}function ge(e){let a=.4,c=n(),l=n(window.innerWidth),u=n(window.innerHeight),d=i(new Map),f=i(new Set),p=n(!0),m=i(new Map),h=r([]),g=r([]),_=i(new Map),v=i(new Map),y=s(()=>{let t=new Map;for(let n of e.modules.value)t.set(n.id,n);return t}),{control:b}=o(),{scale:x,zoomIn:S,zoomOut:C}=me(c,{wheel:b,minScale:a,maxScale:2});function w(e,t=!0){d.get(e)?.scrollIntoView({block:`center`,inline:`center`,behavior:t?`smooth`:`instant`})}let T=e.generateGraph({isFirstCalculateGraph:p,hierarchy:E,tree:ae,nodesRefMap:d,container:c,modulesMap:y,nodes:h,links:g,scale:x,nodesMap:_,linksMap:v,width:l,height:u,childToParentMap:m,focusOn:w,collapsedNodes:f,spacing:e.spacing});t(X,{spacing:e.spacing,calculateGraph:T,isFirstCalculateGraph:p,container:c,width:l,height:u,scale:x,nodes:h,links:g,nodesRefMap:d,collapsedNodes:f,childToParentMap:m,ZOOM_MIN:a,ZOOM_MAX:2,zoomIn:S,zoomOut:C})}function _e(){return u(X)}function ve(e){let{nodesRefMap:t,container:r,calculateGraph:i,collapsedNodes:o}=u(X),s=n(!1);function c(e,n){d(()=>{d(()=>{let i=t.get(e);if(i&&n&&r.value){let e=r.value.getBoundingClientRect(),t=i.getBoundingClientRect(),a=t.left-e.left-n.x,o=t.top-e.top-n.y;r.value.scrollLeft+=a,r.value.scrollTop+=o}})})}function l(e){if(s.value)return;s.value=!0;let n=t.get(e),a=null;if(n&&r.value){let e=r.value.getBoundingClientRect(),t=n.getBoundingClientRect();a={x:t.left-e.left,y:t.top-e.top}}o.has(e)?o.delete(e):o.add(e),i(),a&&c(e,a),s.value=!1}function f(){s.value||(s.value=!0,o.clear(),i(),setTimeout(()=>{s.value=!1},300))}function p(){s.value||(s.value=!0,a(e.modules).forEach(e=>{e.imports.length>0&&o.add(e.id)}),i(),setTimeout(()=>{s.value=!1},300))}return{isGraphNodeToggling:s,toggleNode:l,expandAll:f,collapseAll:p}}function ye(){let{scale:e,zoomIn:t,zoomOut:n,ZOOM_MIN:r,ZOOM_MAX:i}=u(X);return c([`-`,`_`],e=>{e.ctrlKey&&n()}),c([`=`,`+`],e=>{e.ctrlKey&&t()}),{ZOOM_MIN:r,ZOOM_MAX:i,scale:e,zoomIn:t,zoomOut:n}}function be(){let{container:e}=u(X),t=n(!1),r=0,i=0;function a(){l(e,`mousedown`,n=>{let a=e.value.getBoundingClientRect(),o=a.right-n.clientX,s=a.bottom-n.clientY;o<=20||s<=20||(t.value=!0,r=e.value.scrollLeft+n.pageX,i=e.value.scrollTop+n.pageY)}),l(e,`contextmenu`,e=>e.preventDefault()),l(`mouseleave`,()=>t.value=!1),l(`mouseup`,()=>t.value=!1),l(`mousemove`,n=>{t.value&&(n.preventDefault(),e.value.scrollLeft=r-n.pageX,e.value.scrollTop=i-n.pageY)})}return{init:a,isGrabbing:t}}export{ye as a,be as i,$ as n,_e as o,he as r,ve as s,ge as t};
@@ -1 +1 @@
1
- import{u as e}from"./CQNn9qP2.js";import{n as t}from"./BQ-NBLhA.js";import{n,t as r}from"./DnpfwSMy.js";function i(e){let t=e.match(/.*\/node_modules\/(.*)$/)?.[1];if(t)return t}const a=e((e,a)=>{let o=e.replace(/%2F/g,`/`).replace(/\\/g,`/`);if(n(o)||o.match(/^\w+:/)&&!e.match(/^[a-z]:\\/i))return{moduleName:o,path:o};let s=r(o),c=i(o);if(s&&c)return{moduleName:s,path:c};try{let e=t(a,o);return!e.startsWith(`./`)&&!e.startsWith(`../`)&&(e=`./${e}`),e.startsWith(`./.nuxt/`)&&(e=`#build${e.slice(7)}`),{path:e}}catch{return{path:o}}});export{a as t};
1
+ import{u as e}from"./B_mZ82Ef.js";import{n as t}from"./DL1ysgP5.js";import{n,t as r}from"./DnpfwSMy.js";function i(e){let t=e.match(/.*\/node_modules\/(.*)$/)?.[1];if(t)return t}const a=e((e,a)=>{let o=e.replace(/%2F/g,`/`).replace(/\\/g,`/`);if(n(o)||o.match(/^\w+:/)&&!e.match(/^[a-z]:\\/i))return{moduleName:o,path:o};let s=r(o),c=i(o);if(s&&c)return{moduleName:s,path:c};try{let e=t(a,o);return!e.startsWith(`./`)&&!e.startsWith(`../`)&&(e=`./${e}`),e.startsWith(`./.nuxt/`)&&(e=`#build${e.slice(7)}`),{path:e}}catch{return{path:o}}});export{a as t};
@@ -0,0 +1 @@
1
+ import{At as e,Tt as t,Vt as n,ct as r,in as i,mt as a,ot as o,st as s,tn as c,ut as l}from"#entry";import{n as u}from"./DQtLZa7C.js";var d={"ml-0.4":``,"text-xs":``,op75:``},f=a({__name:`NumberWithUnit`,props:{number:{},unit:{}},setup(n){return(r,a)=>(t(),l(`div`,null,[e(r.$slots,`default`),s(`span`,null,i(n.number),1),s(`span`,d,i(n.unit),1)]))}}),p=Object.assign(f,{__name:`DisplayNumberWithUnit`}),m=a({__name:`Duration`,props:{duration:{},factor:{default:1},unit:{default:`ms`},color:{type:Boolean,default:!0}},setup(i){let a=i,s=o(()=>{if(a.duration!=null)return a.unit===`ns`?a.duration/1e3:a.duration});function l(e){return!a.color||e==null?``:(e*=a.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=o(()=>u(s.value));return(i,a)=>{let o=p;return t(),r(o,{class:c(l(s.value)),number:d.value[0],unit:d.value[1]},{default:n(()=>[e(i.$slots,`default`)]),_:3},8,[`class`,`number`,`unit`])}}}),h=Object.assign(m,{__name:`DisplayDuration`});export{h as t};
@@ -0,0 +1 @@
1
+ import{Tt as e,Vt as t,en as n,it as r,lt as i,mt as a,ot as o,pt as s,st as c,ut as l}from"#entry";import{n as u}from"./DQtLZa7C.js";import{t as d}from"./X7aOo9pb.js";import{r as f}from"./Cql2HFZJ.js";var p={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},m={flex:`~ gap-1 items-center`},h=a({__name:`BuildMetrics`,props:{metrics:{}},setup(a){let h=a,g=o(()=>{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}}),_=o(()=>(h.metrics?.transforms)?.[0]?.source_code_size),v=o(()=>{let e=h.metrics?.transforms.filter(e=>e.transformed_code_size);return e?.[e.length-1]?.transformed_code_size});return(a,o)=>{let h=d,y=f;return e(),l(`div`,p,[s(h,{duration:g.value.resolveIds,flex:`~ gap-1 items-center`,title:`Resolve Id hooks cost: ${n(u)(g.value.resolveIds,!0)}`},{default:t(()=>[...o[0]||=[c(`span`,{"i-ph-magnifying-glass-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),s(h,{duration:g.value.loads,flex:`~ gap-1 items-center`,title:`Load hooks cost: ${n(u)(g.value.loads,!0)}`},{default:t(()=>[...o[1]||=[c(`span`,{"i-ph-upload-simple-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),s(h,{duration:g.value.transforms,flex:`~ gap-1 items-center`,title:`Transform hooks cost: ${n(u)(g.value.transforms,!0)}`},{default:t(()=>[...o[2]||=[c(`span`,{"i-ph-magic-wand-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),o[6]||=c(`span`,{op40:``},`|`,-1),s(h,{duration:g.value.total,flex:`~ gap-1 items-center`,title:`Total build cost: ${n(u)(g.value.total,!0)}`},{default:t(()=>[...o[3]||=[c(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),_.value&&v.value?(e(),l(r,{key:0},[o[5]||=c(`span`,{op40:``},`|`,-1),c(`div`,m,[s(y,{title:`Source code size`,bytes:_.value},null,8,[`bytes`]),o[4]||=c(`span`,{"i-ph-arrow-right-duotone":``,op50:``},null,-1),s(y,{title:`Transformed code size`,bytes:v.value},null,8,[`bytes`])])],64)):i(``,!0)])}}}),g=Object.assign(h,{__name:`ModulesBuildMetrics`});export{g as t};
@@ -1 +1 @@
1
- {"id":"6f75d3aa-4cfc-4ed3-af3a-9078b8defb8f","timestamp":1759290821774}
1
+ {"id":"a75cfc75-2758-4449-8135-5151dc9f3c34","timestamp":1762243680163}
@@ -0,0 +1 @@
1
+ {"id":"a75cfc75-2758-4449-8135-5151dc9f3c34","timestamp":1762243680163,"matcher":{"static":{"/":{"prerender":true},"/200.html":{"prerender":true},"/404.html":{"prerender":true}},"wildcard":{},"dynamic":{}},"prerendered":[]}
@@ -0,0 +1,10 @@
1
+ (function(){
2
+ /**
3
+ * @license
4
+ * Copyright 2019 Google LLC
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+ let e=Symbol(`Comlink.proxy`),t=Symbol(`Comlink.endpoint`),n=Symbol(`Comlink.releaseProxy`),r=Symbol(`Comlink.finalizer`),i=Symbol(`Comlink.thrown`),a=e=>typeof e==`object`&&!!e||typeof e==`function`,o=new Map([[`proxy`,{canHandle:t=>a(t)&&t[e],serialize(e){let{port1:t,port2:n}=new MessageChannel;return c(e,t),[n,[n]]},deserialize(e){return e.start(),d(e)}}],[`throw`,{canHandle:e=>a(e)&&i in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(Error(e.value.message),e.value):e.value}}]]);function s(e,t){for(let n of e)if(t===n||n===`*`||n instanceof RegExp&&n.test(t))return!0;return!1}function c(e,t=globalThis,n=[`*`]){t.addEventListener(`message`,function a(o){if(!o||!o.data)return;if(!s(n,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}let{id:l,type:d,path:f}=Object.assign({path:[]},o.data),p=(o.data.argumentList||[]).map(T),m;try{let t=f.slice(0,-1).reduce((e,t)=>e[t],e),n=f.reduce((e,t)=>e[t],e);switch(d){case`GET`:m=n;break;case`SET`:t[f.slice(-1)[0]]=T(o.data.value),m=!0;break;case`APPLY`:m=n.apply(t,p);break;case`CONSTRUCT`:m=C(new n(...p));break;case`ENDPOINT`:{let{port1:t,port2:n}=new MessageChannel;c(e,n),m=S(t,[t])}break;case`RELEASE`:m=void 0;break;default:return}}catch(e){m={value:e,[i]:0}}Promise.resolve(m).catch(e=>({value:e,[i]:0})).then(n=>{let[i,o]=w(n);t.postMessage(Object.assign(Object.assign({},i),{id:l}),o),d===`RELEASE`&&(t.removeEventListener(`message`,a),u(t),r in e&&typeof e[r]==`function`&&e[r]())}).catch(e=>{let[n,r]=w({value:TypeError(`Unserializable return value`),[i]:0});t.postMessage(Object.assign(Object.assign({},n),{id:l}),r)})}),t.start&&t.start()}function l(e){return e.constructor.name===`MessagePort`}function u(e){l(e)&&e.close()}function d(e,t){let n=new Map;return e.addEventListener(`message`,function(e){let{data:t}=e;if(!t||!t.id)return;let r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}}),v(e,n,[],t)}function f(e){if(e)throw Error(`Proxy has been released and is not useable`)}function p(e){return E(e,new Map,{type:`RELEASE`}).then(()=>{u(e)})}let m=new WeakMap,h=`FinalizationRegistry`in globalThis&&new FinalizationRegistry(e=>{let t=(m.get(e)||0)-1;m.set(e,t),t===0&&p(e)});function g(e,t){let n=(m.get(t)||0)+1;m.set(t,n),h&&h.register(e,t,e)}function _(e){h&&h.unregister(e)}function v(e,r,i=[],a=function(){}){let o=!1,s=new Proxy(a,{get(t,a){if(f(o),a===n)return()=>{_(s),p(e),r.clear(),o=!0};if(a===`then`){if(i.length===0)return{then:()=>s};let t=E(e,r,{type:`GET`,path:i.map(e=>e.toString())}).then(T);return t.then.bind(t)}return v(e,r,[...i,a])},set(t,n,a){f(o);let[s,c]=w(a);return E(e,r,{type:`SET`,path:[...i,n].map(e=>e.toString()),value:s},c).then(T)},apply(n,a,s){f(o);let c=i[i.length-1];if(c===t)return E(e,r,{type:`ENDPOINT`}).then(T);if(c===`bind`)return v(e,r,i.slice(0,-1));let[l,u]=b(s);return E(e,r,{type:`APPLY`,path:i.map(e=>e.toString()),argumentList:l},u).then(T)},construct(t,n){f(o);let[a,s]=b(n);return E(e,r,{type:`CONSTRUCT`,path:i.map(e=>e.toString()),argumentList:a},s).then(T)}});return g(s,e),s}function y(e){return Array.prototype.concat.apply([],e)}function b(e){let t=e.map(w);return[t.map(e=>e[0]),y(t.map(e=>e[1]))]}let x=new WeakMap;function S(e,t){return x.set(e,t),e}function C(t){return Object.assign(t,{[e]:!0})}function w(e){for(let[t,n]of o)if(n.canHandle(e)){let[r,i]=n.serialize(e);return[{type:`HANDLER`,name:t,value:r},i]}return[{type:`RAW`,value:e},x.get(e)||[]]}function T(e){switch(e.type){case`HANDLER`:return o.get(e.name).deserialize(e.value);case`RAW`:return e.value}}function E(e,t,n,r){return new Promise(i=>{let a=D();t.set(a,i),e.start&&e.start(),e.postMessage(Object.assign({id:a},n),r)})}function D(){return[,,,,].fill(0).map(()=>Math.floor(Math.random()*(2**53-1)).toString(16)).join(`-`)}let O=Object.freeze({diffTimeout:1,diffEditCost:4,matchThreshold:.5,matchDistance:1e3,patchDeleteThreshold:.5,patchMargin:4,matchMaxBits:32});function k(e){if(e?.__resolved)return e;let t={...O,...e};return Object.defineProperty(t,`__resolved`,{value:!0,enumerable:!1}),t}function A(e,t){return[e,t]}function j(e,t,n,r=!0,i){let a=k(n);i===void 0&&(i=a.diffTimeout<=0?Number.MAX_VALUE:new Date().getTime()+a.diffTimeout*1e3);let o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e===t)return e?[A(0,e)]:[];let s=r,c=R(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=z(e,t);let u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);let d=M(e,t,a,s,o);return l&&d.unshift(A(0,l)),u&&d.push(A(0,u)),Y(d),d}function M(e,t,n,r,i){let a;if(!e)return[A(1,t)];if(!t)return[A(-1,e)];let o=e.length>t.length?e:t,s=e.length>t.length?t:e,c=o.indexOf(s);if(c!==-1)return a=[A(1,o.substring(0,c)),A(0,s),A(1,o.substring(c+s.length))],e.length>t.length&&(a[0][0]=a[2][0]=-1),a;if(s.length===1)return[A(-1,e),A(1,t)];let l=V(e,t,n);if(l){let e=l[0],t=l[1],a=l[2],o=l[3],s=l[4],c=j(e,a,n,r,i),u=j(t,o,n,r,i);return c.concat([A(0,s)],u)}return r&&e.length>100&&t.length>100?N(e,t,n,i):P(e,t,n,i)}function N(e,t,n,r){let i=I(e,t);e=i.chars1,t=i.chars2;let a=i.lineArray,o=j(e,t,n,!1,r);L(o,a),H(o),o.push(A(0,``));let s=0,c=0,l=0,u=``,d=``;for(;s<o.length;){switch(o[s][0]){case 1:l++,d+=o[s][1];break;case-1:c++,u+=o[s][1];break;case 0:if(c>=1&&l>=1){o.splice(s-c-l,c+l),s=s-c-l;let e=j(u,d,n,!1,r);for(let t=e.length-1;t>=0;t--)o.splice(s,0,e[t]);s+=e.length}l=0,c=0,u=``,d=``;break}s++}return o.pop(),o}function P(e,t,n,r){let i=e.length,a=t.length,o=Math.ceil((i+a)/2),s=o,c=2*o,l=Array(c),u=Array(c);for(let e=0;e<c;e++)l[e]=-1,u[e]=-1;l[s+1]=0,u[s+1]=0;let d=i-a,f=d%2!=0,p=0,m=0,h=0,g=0;for(let _=0;_<o&&!(new Date().getTime()>r);_++){for(let o=-_+p;o<=_-m;o+=2){let h=s+o,g;g=o===-_||o!==_&&l[h-1]<l[h+1]?l[h+1]:l[h-1]+1;let v=g-o;for(;g<i&&v<a&&e.charAt(g)===t.charAt(v);)g++,v++;if(l[h]=g,g>i)m+=2;else if(v>a)p+=2;else if(f){let a=s+d-o;if(a>=0&&a<c&&u[a]!==-1){let o=i-u[a];if(g>=o)return F(e,t,n,g,v,r)}}}for(let o=-_+h;o<=_-g;o+=2){let p=s+o,m;m=o===-_||o!==_&&u[p-1]<u[p+1]?u[p+1]:u[p-1]+1;let v=m-o;for(;m<i&&v<a&&e.charAt(i-m-1)===t.charAt(a-v-1);)m++,v++;if(u[p]=m,m>i)g+=2;else if(v>a)h+=2;else if(!f){let a=s+d-o;if(a>=0&&a<c&&l[a]!==-1){let o=l[a],c=s+o-a;if(m=i-m,o>=m)return F(e,t,n,o,c,r)}}}}return[A(-1,e),A(1,t)]}function F(e,t,n,r,i,a){let o=e.substring(0,r),s=t.substring(0,i),c=e.substring(r),l=t.substring(i),u=j(o,s,n,!1,a),d=j(c,l,n,!1,a);return u.concat(d)}function I(e,t){let n=[],r={},i=4e4;n[0]=``;function a(e){let t=``,a=0,o=-1,s=n.length;for(;o<e.length-1;){o=e.indexOf(`
8
+ `,a),o===-1&&(o=e.length-1);let c=e.substring(a,o+1);(r.hasOwnProperty?Object.prototype.hasOwnProperty.call(r,c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s===i&&(c=e.substring(a),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),a=o+1}return t}let o=a(e);return i=65535,{chars1:o,chars2:a(t),lineArray:n}}function L(e,t){for(let n=0;n<e.length;n++){let r=e[n][1],i=[];for(let e=0;e<r.length;e++)i[e]=t[r.charCodeAt(e)];e[n][1]=i.join(``)}}function R(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),i=r,a=0;for(;n<i;)e.substring(a,i)===t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i}function z(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let n=0,r=Math.min(e.length,t.length),i=r,a=0;for(;n<i;)e.substring(e.length-i,e.length-a)===t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i}function B(e,t){let n=e.length,r=t.length;if(n===0||r===0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));let i=Math.min(n,r);if(e===t)return i;let a=0,o=1;for(;;){let n=e.substring(i-o),r=t.indexOf(n);if(r===-1)return a;o+=r,(r===0||e.substring(i-o)===t.substring(0,o))&&(a=o,o++)}}function V(e,t,n){if(n.diffTimeout<=0)return null;let r=e.length>t.length?e:t,i=e.length>t.length?t:e;if(r.length<4||i.length*2<r.length)return null;function a(e,t,n){let r=e.substring(n,n+Math.floor(e.length/4)),i=-1,a=``,o,s,c,l;for(;(i=t.indexOf(r,i+1))!==-1;){let r=R(e.substring(n),t.substring(i)),u=z(e.substring(0,n),t.substring(0,i));a.length<u+r&&(a=t.substring(i-u,i)+t.substring(i,i+r),o=e.substring(0,n-u),s=e.substring(n+r),c=t.substring(0,i-u),l=t.substring(i+r))}return a.length*2>=e.length?[o,s,c,l,a]:null}let o=a(r,i,Math.ceil(r.length/4)),s=a(r,i,Math.ceil(r.length/2)),c;if(!o&&!s)return null;c=s?o&&o[4].length>s[4].length?o:s:o;let l,u,d,f;e.length>t.length?(l=c[0],u=c[1],d=c[2],f=c[3]):(d=c[0],f=c[1],l=c[2],u=c[3]);let p=c[4];return[l,u,d,f,p]}function H(e){let t=!1,n=[],r=0,i=null,a=0,o=0,s=0,c=0,l=0;for(;a<e.length;)e[a][0]===0?(n[r++]=a,o=c,s=l,c=0,l=0,i=e[a][1]):(e[a][0]===1?c+=e[a][1].length:l+=e[a][1].length,i&&i.length<=Math.max(o,s)&&i.length<=Math.max(c,l)&&(e.splice(n[r-1],0,A(-1,i)),e[n[r-1]+1][0]=1,r--,r--,a=r>0?n[r-1]:-1,o=0,s=0,c=0,l=0,i=null,t=!0)),a++;for(t&&Y(e),J(e),a=1;a<e.length;){if(e[a-1][0]===-1&&e[a][0]===1){let t=e[a-1][1],n=e[a][1],r=B(t,n),i=B(n,t);r>=i?(r>=t.length/2||r>=n.length/2)&&(e.splice(a,0,A(0,n.substring(0,r))),e[a-1][1]=t.substring(0,t.length-r),e[a+1][1]=n.substring(r),a++):(i>=t.length/2||i>=n.length/2)&&(e.splice(a,0,A(0,t.substring(0,i))),e[a-1][0]=1,e[a-1][1]=n.substring(0,n.length-i),e[a+1][0]=-1,e[a+1][1]=t.substring(i),a++),a++}a++}}let U=/[^a-z0-9]/i,W=/\s/,G=/[\r\n]/,K=/\n\r?\n$/,q=/^\r?\n\r?\n/;function J(e){function t(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(U),a=r.match(U),o=i&&n.match(W),s=a&&r.match(W),c=o&&n.match(G),l=s&&r.match(G),u=c&&e.match(K),d=l&&t.match(q);return u||d?5:c||l?4:i&&!o&&s?3:o||s?2:i||a?1:0}let n=1;for(;n<e.length-1;){if(e[n-1][0]===0&&e[n+1][0]===0){let r=e[n-1][1],i=e[n][1],a=e[n+1][1],o=z(r,i);if(o){let e=i.substring(i.length-o);r=r.substring(0,r.length-o),i=e+i.substring(0,i.length-o),a=e+a}let s=r,c=i,l=a,u=t(r,i)+t(i,a);for(;i.charAt(0)===a.charAt(0);){r+=i.charAt(0),i=i.substring(1)+a.charAt(0),a=a.substring(1);let e=t(r,i)+t(i,a);e>=u&&(u=e,s=r,c=i,l=a)}e[n-1][1]!==s&&(s?e[n-1][1]=s:(e.splice(n-1,1),n--),e[n][1]=c,l?e[n+1][1]=l:(e.splice(n+1,1),n--))}n++}}function Y(e){e.push(A(0,``));let t=0,n=0,r=0,i=``,a=``,o;for(;t<e.length;)switch(e[t][0]){case 1:r++,a+=e[t][1],t++;break;case-1:n++,i+=e[t][1],t++;break;case 0:n+r>1?(n!==0&&r!==0&&(o=R(a,i),o!==0&&(t-n-r>0&&e[t-n-r-1][0]===0?e[t-n-r-1][1]+=a.substring(0,o):(e.splice(0,0,A(0,a.substring(0,o))),t++),a=a.substring(o),i=i.substring(o)),o=z(a,i),o!==0&&(e[t][1]=a.substring(a.length-o)+e[t][1],a=a.substring(0,a.length-o),i=i.substring(0,i.length-o))),t-=n+r,e.splice(t,n+r),i.length&&(e.splice(t,0,A(-1,i)),t++),a.length&&(e.splice(t,0,A(1,a)),t++),t++):t!==0&&e[t-1][0]===0?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,i=``,a=``;break}e[e.length-1][1]===``&&e.pop();let s=!1;for(t=1;t<e.length-1;)e[t-1][0]===0&&e[t+1][0]===0&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),s=!0):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),s=!0)),t++;s&&Y(e)}function X(e,t){let n=j(e.replace(/\r\n/g,`
9
+ `),t.replace(/\r\n/g,`
10
+ `));return H(n),n}c({calculateDiff:X})})();