site-panzai/node_modules/@nuxt/devtools/dist/client/_nuxt/analyze-build-ct3s5wl3.js

1 line
8.3 KiB
JavaScript
Raw Permalink Normal View History

2026-11-13 13:57:04 +01:00
import{o as e}from"./nuxt-l2zm4y7d.js";import{C as t,Ct as n,Mt as r,Qt as i,S as a,T as o,W as s,Y as c,_ as l,dt as u,ft as d,g as f,h as p,m,p as h,s as g,tn as _}from"./vendor/json-editor-vue-9tyg6b65.js";import{At as v,lt as y}from"./ready-e441jhq2.js";import{_ as b,g as x}from"./utils-ivfwadyv.js";import{A as S,h as C,k as w,l as T}from"./client-kfvz1zfh.js";import{t as E}from"./_plugin-vue_export-helper-d9irwgla.js";import{t as D}from"./nbutton-g8ropw1z.js";import{r as O}from"./state-routes-pcpgumo2.js";import{t as k}from"./telemetry-c1eueoux.js";import{t as A}from"./npanel-grids-es6yvxa6.js";import{t as j}from"./ntext-input-hwoiw74g.js";import{c as M,f as N,o as P,p as F,t as I,w as L}from"#entry";import{t as R}from"./ncode-block-cfw508sn.js";import{t as z}from"./pages-dm1j9w83.js";import{t as B}from"./ncheckbox-oir9zn2f.js";import{t as V}from"./filepath-item-evfn93g6.js";import{t as H}from"./help-fab-myoje00l.js";var U={"h-full":``,grid:`~ rows-[max-content_1fr]`},W={flex:`~ wrap`,"w-full":``},G=[`onClick`],K={key:0,flex:`~ col gap-4 items-center justify-center`,p4:``},q={grid:`~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center`,"w-100":``},J=`/__nuxt_devtools__/client`,Y=Object.assign(o({__name:`BuildAnalyzeDetails`,props:{current:{},prev:{}},setup(o){let p=o,y=`${e().app.baseURL.replace(J,`/`)}/__nuxt_devtools__/analyze/`.replace(/\/+/g,`/`),b=h(()=>{let e=[{name:`Overview`,id:`overview`}];return p.current.features.bundleClient&&e.push({name:`Client Bundle`,id:`bundle-client`}),p.current.features.bundleNitro&&e.push({name:`Nitro Bundle`,id:`bundle-nitro`}),p.current.features.viteInspect&&e.push({name:`Vite Inspect`,id:`vite-inspect`}),e}),x=n(b.value[0]);function w(e){return`${((e.endTime-e.startTime)/1e3).toFixed(1)}s`}function E(e){return e<1024?`${e}B`:e<1048576?`${(e/1024).toFixed(1)}KB`:e<1073741824?`${(e/1024/1024).toFixed(1)}MB`:`${(e/1024/1024/1024).toFixed(1)}GB`}async function O(e){return C.clearAnalyzeBuilds(await T(),[e])}return(e,n)=>{let p=V,h=D;return s(),l(`div`,U,[m(`div`,W,[(s(!0),l(g,null,c(b.value,(e,t)=>(s(),l(`button`,{key:t,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:i(e.id===x.value?.id?``:`border-b`),onClick:t=>x.value=e},[m(`div`,{class:i(e.id===x.value?.id?``:`op30`)},_(e.name),3)],10,G))),128)),n[1]||=m(`div`,{border:`b base`,"flex-auto":``},null,-1)]),x.value?.id===`overview`?(s(),l(`div`,K,[n[15]||=m(`div`,{"flex-auto":``},null,-1),m(`div`,q,[n[10]||=m(`div`,{"i-carbon-commit":``,"text-xl":``},null,-1),m(`div`,null,[n[2]||=m(`div`,{"text-sm":``,op50:``},` Name `,-1),m(`div`,null,_(o.current.name),1)]),n[11]||=m(`div`,{"i-carbon-time":``,"text-xl":``},null,-1),m(`div`,null,[n[3]||=m(`div`,{"text-sm":``,op50:``},` Build duration `,-1),m(`div`,null,_(w(o.current)),1)]),o.current.size?.clientBundle?(s(),l(g,{key:0},[n[5]||=m(`div`,{"i-carbon-cics-program":``,"text-xl":``},null,-1),m(`div`,null,[n[4]||=m(`div`,{"text-sm":``,op50:``},` Client bundle size `,-1),m(`div`,null,_(E(o.current.size.clientBundle)),1)])],64)):f(``,!0),o.current.size?.nitroBundle?(s(),l(g,{key:1},[n[7]||=m(`div`,{"i-carbon-bare-metal-server":``,"text-xl":``},null,-1),m(`div`,null,[n[6]||=m(`div`,{"text-sm":``,op50:``},` Nitro bundle size `,-1),m(`div`,null,_(E(o.current.size.nitroBundle)),1)])],64)):f(``,!0),n[12]||=m(`div`,{"i-carbon-edge-node":``,"text-xl":``},null,-1),m(`div`,null,[n[8]||=m(`div`,{"text-sm":``,op50:``},` Built `,-1),m(`div`,null,_(r(S)(new Date(o.current.endTime))),1)]),n[13]||=m(`div`,{"i-carbon:folder-parent":``,"text-xl":``},null,-1),m(`div`,null,[n[9]||=m(`div`,{"text-sm":``,op50:``},` Report Path `,-1),t(p,{filepath:o.current.analyzeDir},null,8,[`filepath`])])]),n[16]||=m(`div`,{"flex-auto":``},null,-1),t(h,{n:`rose`,icon:`carbon-delete`,onClick:n[0]||=e=>O(o.current.name)},{default:u(()=>[...n[14]||=[a(` Delete this report `,-1)]]),_:1})])):f(``,!0),n._lazyshow1||x.value?.id===`bundle-client`?(n._lazyshow1=!0,s(),l(g,null,[d(m(`iframe`,{src:`${r(y)}${o.current.slug}/client.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[v,x.value?.id===`bundle-client`]])],64)):f(`v