import{C as e,Ct as t,E as n,Mt as r,Qt as i,W as a,X as o,Y as s,_ as c,c as l,dt as u,en as d,g as f,h as p,m,tn as h,v as g,w as _}from"./vendor/json-editor-vue-ddj4xtqm.js";import"./vendor/shiki-kunkft64.js";import{k as v,st as y}from"#entry";import"./client-cbmkjf3j.js";import{t as b}from"./ncode-block-j2hcqwrp.js";import{t as x}from"./composables-g8w9dpc0.js";import{t as S}from"./ncheckbox-f4a8016e.js";import{t as C}from"./filepath-item-osqp88cx.js";import"./nicon-title-hrj2h1mn.js";import{t as w}from"./nsection-block-kp1wt3o4.js";import{t as T}from"./nbadge-ijsj8fjy.js";import{t as E}from"./color-k274hmrf.js";var D=n({__name:`NBadgeHashed`,props:{text:{}},setup(t){let n=t,r=m(()=>({color:E(n.text,50,60),background:E(n.text,50,60,.05)}));return(n,i)=>(a(),f(T,{style:d(r.value)},{default:u(()=>[e(h(t.text),1),o(n.$slots,`default`)]),_:3},8,[`style`]))}}),O=Object.assign(D,{__name:`NBadgeHashed`}),k={flex:`~ gap-2 col`,mb4:``},A={flex:`~ gap-3 items-center`},j={key:0,flex:`~ gap-1`,"items-center":``,p1:``,border:`~ base rounded`},M={"max-w-full":``,"of-auto":``},N={"text-center":``,op50:``},P={flex:`~`,px4:``},F={key:0,op50:``},I={px2:``,"text-center":``},L={"of-auto":``},R=n({__name:`DebugModuleMutationRecords`,props:{moduleMutationRecords:{}},setup(e){let n=e;function r(e){return e.startsWith(`/`)||e.match(/^[a-z]:[\\/]/i)}let o=t(!1),d=t(!1),y=t(!1),x=t(!1),w=t(!1),T=t(``),E=m(()=>{let e=n.moduleMutationRecords;return o.value||(e=e.filter(e=>!e.name.startsWith(`nuxt:`)&&e.name!==`@nuxt/devtools`)),d.value||(e=e.filter(e=>e.keys.join(`.`)!==`build.templates`)),y.value||(e=e.filter(e=>e.keys.join(`.`)!==`build.transpile`)),x.value||(e=e.filter(e=>e.keys.join(`.`)!==`plugins`)),w.value||(e=e.filter(e=>e.method||e.value!==`[]`&&e.value!==`{}`)),T.value&&(e=e.filter(e=>e.name===T.value)),e});return(t,n)=>{let m=S,D=O,R=v,z=C,B=b;return a(),g(l,null,[p(`div`,k,[p(`div`,A,[_(m,{modelValue:o.value,"onUpdate:modelValue":n[0]||=e=>o.value=e,n:`primary`},{default:u(()=>[...n[6]||=[p(`span`,{"ws-nowrap":``,op75:``},`Builtin Modules`,-1)]]),_:1},8,[`modelValue`]),_(m,{modelValue:d.value,"onUpdate:modelValue":n[1]||=e=>d.value=e,n:`primary`},{default:u(()=>[...n[7]||=[p(`span`,{"ws-nowrap":``,op75:``},`Templates`,-1)]]),_:1},8,[`modelValue`]),_(m,{modelValue:y.value,"onUpdate:modelValue":n[2]||=e=>y.value=e,n:`primary`},{default:u(()=>[...n[8]||=[p(`span`,{"ws-nowrap":``,op75:``},`Transpile`,-1)]]),_:1},8,[`modelValue`]),_(m,{modelValue:x.value,"onUpdate:modelValue":n[3]||=e=>x.value=e,n:`primary`},{default:u(()=>[...n[9]||=[p(`span`,{"ws-nowrap":``,op75:``},`Plugins`,-1)]]),_:1},8,[`modelValue`]),_(m,{modelValue:w.value,"onUpdate:modelValue":n[4]||=e=>w.value=e,n:`primary`},{default:u(()=>[...n[10]||=[p(`span`,{"ws-nowrap":``,op75:``},`Empty Initial`,-1)]]),_:1},8,[`modelValue`]),T.value?(a(),g(`div`,j,[_(D,{"font-mono":``,text:T.value},null,8,[`text`]),_(R,{icon:`carbon-close`,border:!1,onClick:n[5]||=e=>T.value=``})])):c(``,!0)])]),p(`table`,M,[n[11]||=p(`thead`,{border:`b base`},[p(`tr`,null,[p(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Index `),p(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Module `),p(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Key Path `),p(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Method `),p(`th`,{"ws-nowrap":``,p1:``,"text-center":``,"font-bold":``},` Value `)])],-1),p(`tbody`,null,[(a(!0),g(l,null,s(E.value,t=>(a(),g(`tr`,{key:e.moduleMutationRecords.indexOf(t),border:`b dashed transparent hover:base`},[p(`td`,N,[p(`div`,null,h(e.moduleMutationRecords.indexOf(t)+1),1)]),p(`td`,null,[t.name&&r(t.name)?(a(),f(z,{key:0,filepath:t.name},null,8,[`filepath`])):(a(),f(D,{key:1,role:`button`,"font-mono":``,text:t.name,onClick:e=>T.value=t.name},null,8,[`text`,`onClick`]))]),p(`td`,null,[p(`code`,P,[(a(!0),g(l,null,s(t.keys,(e,n)=>(a(),g(l,{key:n},[p(`span`,null,h(e),1),n<t.keys.length-1?(a(),g(`span`,F,` . `)):c(``,!0)],64))),128))])]),p(`td`,I,[_(D,{"font-mono":``,text:t.method||`=`,class:i(t.method?``:`saturate-0`)},null,8,[`text`,`class`])]),p(`td`,L,[_(B,{code:String(t.value),lang:`ts`,"grammar-context-code":`let a = `,"ws-normal":``,"break-all":``,py1:``,lines:!1,inline:!0},null,8,[`code`])])]))),128))])])],64)}}}),z=Object.assign(R,{__name:`DebugModuleMutationRecords`}),B={key:0,p6:``},V={key:1},H=n({__name:`debug`,setup(e){let t=y();return(e,n)=>{let i=w;return r(t)?(a(),g(`div`,V,[_(i,{icon:`carbon-container-image-push-pull`,text:`Module Mutation Records`,description:`Records of module mutations to nuxt options`},{default:u(()=>[_(z,{"module-mutation-records":r(t).moduleMutationRecords||[]},null,8,[`module-mutation-records`])]),_:1})])):(a(),g(`div`,B,[...n[0]||=[p(`div`,null,`No Debug Context Found`,-1),p(`div`,null,"Set `debug: true` in your nuxt.config.ts to enable this panel",-1)]]))}}});export{H as default};